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

How I can run contour_moments.cpp OpenCV example?

asked 2015-12-12 18:48:00 -0500

G212 gravatar image

updated 2017-04-10 09:21:01 -0500

Kei Okada gravatar image

I don’t know how to run the file contour_moments.cpp that’s able in this github link: https://github.com/ros-perception/vis...

I’m working with Indigo and I have installed OpenCV3 following this ROS.org link: http://wiki.ros.org/vision_opencv

when i run the command rosrun opencv_apps contour_moments it only appear a warning and nothing else:

[ WARN] [1450293289.992148166]: Topic 'image' has not been remapped! Typical command-line usage:
    $ rosrun image_rotate image_rotate image:=<image topic> [transport]

which topic should I use?? (I'm using a kinect, and it is working fine)

edit retag flag offensive close merge delete

Comments

paste the errors here then

clynamen gravatar image clynamen  ( 2015-12-13 07:22:40 -0500 )edit
1

The required target_link_libraries are listed in the CMakeLists.txt file in the repository.

clynamen gravatar image clynamen  ( 2015-12-13 07:23:42 -0500 )edit

It might be easier to start with the entire vision_opencv package and progressively remove things from it until it is only building contour_moments. Don't use OpenCV 3 unless you really need it instead of 2.4, building with it has some issues.

lucasw gravatar image lucasw  ( 2015-12-14 12:51:14 -0500 )edit

Ok, so I have to uninstall OpenCV3 before installing Opencv2? .. If so, how do I do that?

G212 gravatar image G212  ( 2015-12-14 13:54:03 -0500 )edit
1

OpenCV 2 is probably already installed in parallel if you have cv_bridge installed. If you have OpenCV 3 from debian/ubuntu packages sudo apt-get remove ros-indigo-opencv3

lucasw gravatar image lucasw  ( 2015-12-14 19:47:29 -0500 )edit

ok, now when i run the command rosrun opencv_apps contour_moments it only appear a warning and nothing else ...

G212 gravatar image G212  ( 2015-12-16 13:32:53 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-04-10 09:10:00 -0500

Kei Okada gravatar image

These nodes do not publish any message unless someone is reading that. so try roslaunch opencv_apps contour_moments.launch image:=image_raw and rostopic echo /contour_moments/moment

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-12-12 18:48:00 -0500

Seen: 436 times

Last updated: Apr 10 '17