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

OpenCV program doesnt start the camera

asked 2012-04-17 06:57:18 -0600

DavidLavy gravatar image

Hi, I recently installed ROS Electric, and now I'm trying to use OpenCV with it, I followed certain tutorials as this one Working with ROS and OpenCV (no sure if anyone else tried this too) ... Thing is, my built-in camera worked fine when i launch this .launch program:

<launch> <node name="uvc_cam_node" pkg="uvc_cam" type="uvc_cam_node" output="screen"> </node> </launch> (Refer to the part Test the launch script in the link above)

It does turn on, and writing this in terminal $ rosrun image_view image_view image:=/camera/image_raw I can see the image, but when I write my .cpp program for using OpenCV and I run it (refer to the part Write the code for image processing), my camera doesn't turn on, it doesnt show an error or anything it just stays there ... I have tried w another webcams and same thing happened. Does anyone have a clue why isn't running

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-04-17 15:00:12 -0600

Kevin gravatar image

You still have to run uvc_cam node.

The code you are talking about uses image transport in another node to grab the images from the ucv_cam node and process them. These are two different nodes working together ... one to grab images from your camera and one to process them.

edit flag offensive delete link more
0

answered 2012-04-17 19:07:06 -0600

DavidLavy gravatar image

Thank you! It worked, in the morning when i was checking the code i was actually wondering when it grabs the image from the camera, cause i havent seen that in the code, and this answered that question and solved my problem. (:

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-04-17 06:57:18 -0600

Seen: 547 times

Last updated: Apr 17 '12