ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Bala's profile - activity

2018-11-17 20:59:55 -0500 received badge  Nice Question (source)
2015-04-24 01:47:52 -0500 received badge  Student (source)
2015-01-15 13:36:46 -0500 received badge  Popular Question (source)
2014-01-28 17:29:00 -0500 marked best answer How to use laptop integrated camera to capture image?

I'm new to ROS. I just want to capture an image with the Laptop camera and use it for object recognition. Can anyone please guide me on this?

2014-01-06 20:17:25 -0500 received badge  Famous Question (source)
2014-01-06 20:17:25 -0500 received badge  Notable Question (source)
2014-01-06 20:17:25 -0500 received badge  Popular Question (source)
2013-12-11 15:59:26 -0500 received badge  Famous Question (source)
2013-08-01 03:58:14 -0500 received badge  Famous Question (source)
2013-05-06 01:36:48 -0500 received badge  Famous Question (source)
2013-04-28 23:16:22 -0500 received badge  Famous Question (source)
2013-04-18 03:26:31 -0500 received badge  Notable Question (source)
2013-04-15 00:31:17 -0500 received badge  Famous Question (source)
2013-04-15 00:30:41 -0500 received badge  Notable Question (source)
2013-04-07 08:37:38 -0500 received badge  Notable Question (source)
2013-03-30 02:09:17 -0500 received badge  Notable Question (source)
2013-03-29 01:57:17 -0500 received badge  Popular Question (source)
2013-03-22 19:32:47 -0500 received badge  Popular Question (source)
2013-03-12 17:44:51 -0500 received badge  Popular Question (source)
2013-03-09 13:55:37 -0500 received badge  Popular Question (source)
2013-02-27 07:30:45 -0500 asked a question Coding using OpenCV2 ROS

include stdio.h>

include iostream>

include "opencv2/core/core.hpp"

include "opencv2/features2d/features2d.hpp"

include "opencv2/highgui/highgui.hpp"

include "opencv2/imgproc/imgproc.hpp"

include "opencv2/calib3d/calib3d.hpp"

using namespace cv;

int main() { Mat object = imread( "sample.jpeg", CV_LOAD_IMAGE_GRAYSCALE );

if( !object.data )
{
    std::cout<< "Error reading object " << std::endl;
    return -1;
}

//Detect the keypoints using SURF Detector
int minHessian = 500;

SurfFeatureDetector detector( minHessian );
std::vector<KeyPoint> kp_object;

detector.detect( object, kp_object );

//Calculate descriptors (feature vectors)
SurfDescriptorExtractor extractor;
Mat des_object;

extractor.compute( object, kp_object, des_object );

FlannBasedMatcher matcher;

VideoCapture cap(0);

namedWindow("Good Matches",0);
cvResizeWindow("Good Matches",800,800);

std::vector<Point2f> obj_corners(4);

//Get the corners from the object
obj_corners[0] = (cvPoint(0,0));
obj_corners[1] = (cvPoint(object.cols,0));
obj_corners[2] = (cvPoint(object.cols,object.rows));
obj_corners[3] = (cvPoint(0, object.rows));

char key = 'a';
int framecount = 0;
while (key != 27)
{
    Mat frame;
    cap >> frame;

    if (framecount < 5)
    {
        framecount++;
        continue;
    }

    Mat des_image, img_matches;
    std::vector<KeyPoint> kp_image;
    std::vector<vector<DMatch > > matches;
    std::vector<DMatch > good_matches;
    std::vector<Point2f> obj;
    std::vector<Point2f> scene;
    std::vector<Point2f> scene_corners(4);
    Mat H;
    Mat image;

    cvtColor(frame, image, CV_RGB2GRAY);

    detector.detect( image, kp_image );
   extractor.compute( image, kp_image, des_image );

    matcher.knnMatch(des_object, des_image, matches, 2);

   for(int i = 0; i < min(des_image.rows-1,(int) matches.size()); i++) //THIS LOOP IS SENSITIVE TO SEGFAULTS
  {
        if((matches[i][0].distance < 0.6*(matches[i][1].distance)) && ((int) matches[i].size()<=2 && (int) matches[i].size()>0))
     {
          good_matches.push_back(matches[i][0]);
        }
   }

    //Draw only "good" matches
 //  drawMatches( object, kp_object, image, kp_image, good_matches, img_matches, Scalar::all(-1), Scalar::all(-1), vector<char>(),DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS);

    if (good_matches.size() >= 4)
    {
        for( int i = 0; i < good_matches.size(); i++ )
        {
            //Get the keypoints from the good matches
            obj.push_back( kp_object[ good_matches[i].queryIdx ].pt );
            scene.push_back( kp_image[ good_matches[i].trainIdx ].pt );
       }

        H = findHomography( obj, scene, CV_RANSAC );

        perspectiveTransform( obj_corners, scene_corners, H);

        //Draw lines between the corners (the mapped object in the scene image )
        line( image, scene_corners[0] + Point2f( object.cols, 0), scene_corners[1] + Point2f( object.cols, 0), Scalar(0, 255, 0), 4 );
        line( image, scene_corners[1] + Point2f( object.cols, 0), scene_corners[2] + Point2f( object.cols, 0), Scalar( 0, 255, 0), 4 );
        line( image, scene_corners[2] + Point2f( object.cols, 0), scene_corners[3] + Point2f( object.cols, 0), Scalar( 0, 255, 0), 4 );
        line( image, scene_corners[3] + Point2f( object.cols, 0), scene_corners[0] + Point2f( object.cols, 0), Scalar( 0, 255, 0), 4 );
    }

    //Show detected matches
    imshow( "Good Matches", image );

    key = waitKey(1);
}
return 0;

}

I've a SURF code that works on OpenCV. I need to run this code on ROS. How can I do it with the help of cv_bridge?

2013-02-26 08:27:45 -0500 asked a question Error running uvc_camera_node

I'm getting an error when I run uvc_camera_node

2013-02-26 08:03:26 -0500 asked a question Error in pi facetracker installing dependencies

I'm getting the following error when I try to install the dependencies for pi_face_ tracker package as given in ROS pi_face_tracker

ERROR:the following packages/stacks could not have their rosdep keys resolved to system dependencies: pi_face_tracker_gui: Missing resource mjpeg_server ROS path [0]=/opt/ros/groovy/share/ros ROS path [1]=/opt/ros/groovy/stacks ROS path [2]=/home/bala/groovy_workspace ROS path [3]=/opt/ros/groovy/share pi_face_tracker: Missing resource openni_camera ROS path [0]=/opt/ros/groovy/share/ros ROS path [1]=/opt/ros/groovy/stacks ROS path [2]=/home/bala/groovy_workspace ROS path [3]=/opt/ros/groovy/share

2013-02-25 02:19:09 -0500 received badge  Famous Question (source)
2013-02-23 07:07:51 -0500 received badge  Notable Question (source)
2013-02-23 04:03:02 -0500 answered a question SIFT object recognition using Laptop camera + ROS

Thanks. I'll look into it.

2013-02-22 04:54:36 -0500 received badge  Popular Question (source)
2013-02-21 16:27:12 -0500 asked a question SIFT object recognition using Laptop camera + ROS

Hi, I need help to implement SIFT object recognition in ROS with the help of taking images from Laptop camera. Is there any code that is already there for ROS + SIFT object recognition?

2013-02-21 16:21:16 -0500 received badge  Notable Question (source)
2013-02-15 04:41:42 -0500 asked a question Running gscam simultaneously on multiple laptops having a common ROSmaster

I have three laptops of which one will act as the master. They are all connected to the same network. When I try to run gscam on one slave and access it from the master the setup works perfectly. But when I run gscam on the second slave, the first slave's terminal that was running gscam receives a shutdown request citing the reason "new node registered with same name" and stops working. The second slave starts working. But I want them both to run simultaneously.

I tried changing the node name by changing the executable name in the CMakeLists.txt file. Even then the problem persists.

2013-02-07 06:28:16 -0500 asked a question Capture image using gscam

Hello,

I can view a live streaming of my laptop camera in image_view. How can I capture the image using termianl? It can be done by right clicking the image_view window but I need a node to capture image from gscam.

2013-02-07 04:40:51 -0500 answered a question gscam issues with ip camera

I can see my live pic in the window. How do I take a snapshot with this with terminal?

2013-02-07 00:05:17 -0500 asked a question Image comparison - two image files in different directories

Hi,

I've a set of images of an object in a directory, I take a new photo of an object 'X' and I want to compare the new image file with the previously stored images and find if they both are the same object. It's not real-time object recognition, no live image from the camera. Object recognition with image database and new image file. How can I do it?

2013-02-06 23:47:28 -0500 received badge  Editor (source)
2013-02-06 23:46:46 -0500 asked a question Object recognition - Static image comparison

Hi,

I want to capture images of an object with laptop camera and train it for that object. then I want to compare a new image (static) of an object with the previously trained images and find if the objects are same or not. How can I do that?