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

Can't visualize image in opencv. what is problem?

asked 2016-06-07 02:54:34 -0500

dinesh gravatar image

updated 2016-06-07 11:07:44 -0500

I tried to run ros opencv tutorial program: converting converting between ros image and opencv image using cv_bridge. but after i ran the command: rosrun opencv example input:=/camera/image_raw than rosrun image_view image_view image:=/image_converter/video_output etc, im not getting any visual output. it seems like my opencv node is running but somehow it is not converting the opencv image into ros image. im confused, but ill keep on trying by the way.

edit retag flag offensive close merge delete

Comments

Is something being published to /camera/image ? if you do rostopic hz /image/camera what do you get?

Mehdi. gravatar image Mehdi.  ( 2016-06-07 04:09:45 -0500 )edit

I'm getting this warning: WARNING: topic [/image/camera] does not appear to be published yet. when i do rosnode list, it shows that my opencv node named image_converter is running, when i do rostopic list it also shows that that node is publishing the topic /image_converter/output_video.

dinesh gravatar image dinesh  ( 2016-06-07 04:25:33 -0500 )edit

when i do rostopic hz /image_conerter/output_video it shows: subscribed to [/image_converter/output_video] but now as i done little research on my problem and done rosrun image_view image_view image:=/image_converter/output_video i'm only getting blank window.

dinesh gravatar image dinesh  ( 2016-06-07 04:58:23 -0500 )edit

How do you publish the images from your webcam? are you using usb_cam package?

Mehdi. gravatar image Mehdi.  ( 2016-06-07 05:13:24 -0500 )edit

im using freenect_launch, and im subscribing to /camera/rgb/image_raw inside the image_converter node by running: rosrun opencv example input:=/camera/rgb/image_raw and than in another terminal when i do rostopic echo /image_converter/output_video, it displays nothing.im using kinect xbox.

dinesh gravatar image dinesh  ( 2016-06-07 05:40:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-06-07 11:33:30 -0500

dinesh gravatar image

Since i was running kinect camera their was two types of image rgb and depth. that topic /camera/image_raw is just suitable for simple usb cameras. Since i was using kinect, i also had to put rgb after the camera like /camera/rgb/iamge_raw, for this i changed /camera/image_raw to /camera/rgb/image_raw inside src code and similary in CMakelList, and i get the result. he he he.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-06-07 02:54:34 -0500

Seen: 404 times

Last updated: Jun 07 '16