HOW TO USE OPENCV IN GROOVY? [closed]

asked 2013-03-27 03:18:53 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi all, I'm learning how to use opencv in ROS, following the tutorial

http://www.ros.org/wiki/cv_bridge/Tutorials/UsingCvBridgeToConvertBetweenROSImagesAndOpenCVImages

However, in the example, I was confused about the several QUESTIONS:

In the example, there is just one cpp file, does it be used as two nodes(including the publisher as well as the subscriber)?

Following the tutorial,I was going to build the node, however, at the last step, something wrong happened:

/home/tishiba/practice_no1/src/practice_no1_1/src/cv.cpp: In constructor ‘ImageConverter::ImageConverter()’:
/home/tishiba/practice_no1/src/practice_no1_1/src/cv.cpp:23:32: error: expected primary-expression before ‘/’ token
/home/tishiba/practice_no1/src/practice_no1_1/src/cv.cpp:23:33: error: ‘camera’ was not declared in this scope
/home/tishiba/practice_no1/src/practice_no1_1/src/cv.cpp:23:40: error: ‘rgb’ was not declared in this scope
/home/tishiba/practice_no1/src/practice_no1_1/src/cv.cpp:23:44: error: ‘image_color’ was not declared in this scope
make[2]: *** [practice_no1_1/CMakeFiles/cv.dir/src/cv.cpp.o] Error 1
make[1]: *** [practice_no1_1/CMakeFiles/cv.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
![image description](http://)

I wonder if I didn't include all the header file in the cpp file, now in my cpp file ,I had include header files as followed:

include <ros/ros.h>
include <image_transport/image_transport.h>
include <cv_bridge/cv_bridge.h>
include <sensor_msgs/image_encodings.h>
include <opencv2/imgproc/imgproc.hpp>
include <opencv2/highgui/highgui.hpp>

..NOW WHAT SHOULD I DO? NEED HELP ! THX!

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see http://wiki.ros.org/Support for more details. by tfoote
close date 2013-04-18 06:21:33

Comments

This is not a ROS question please see our support guidelines www.ros.org/wiki/Support

tfoote gravatar imagetfoote ( 2013-04-18 06:20:34 -0600 )edit