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

what is the first step of doing image processing with ROS?

asked 2015-12-18 08:26:04 -0500

fatima gravatar image

hi i am beginner with image processing and want to start that with ROS but i dont know what is the first step ? for example should i first install OpenCV? or its not important ? and may be i should install some package in my workspace ? i have a webcam on my laptop i want to use it. please guide me if any one could.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2015-12-18 09:13:47 -0500

The first thing you'll need to do is get your webcam output captured by a ros node and broadcast as an image topic so that other ros nodes can use the images. Take a look at


Both should work with a USB web cam. Then when the camera capture node is running you can use Rviz as a quick way to check the images are being published properly. Rviz is a GUI that allows you to visualize ros topics. If you click 'add' in the bottom left of the window and click on the add by topic tab you should see you camera node listed. Selecting this topic will add a new window to Rviz that should show the images from your webcam!

When this is all working you can have a look at the image subscriber tutorial tutorial here: to get started manipulating the image data, this is where you might starting playing with OpenCV

edit flag offensive delete link more


fatima gravatar image fatima  ( 2015-12-18 10:17:16 -0500 )edit

hi thank you so much, i run usb_cam node before and could run Rviz i clicked add the result is :

fatima gravatar image fatima  ( 2015-12-18 10:17:18 -0500 )edit
[ INFO] [1450467742.148411685]: compiled against OGRE version 1.8.1 (Byatis)
[ INFO] [1450467742.676989007]: Stereo is NOT SUPPORTED
[ INFO] [1450467742.677113146]: OpenGl version: 3 (GLSL 1.3).
fatima gravatar image fatima  ( 2015-12-18 10:17:51 -0500 )edit

i saw Rviz window with a grid i added camera but again i only have a grid i dont know how should i use the camera in rviz ?

fatima gravatar image fatima  ( 2015-12-18 10:29:13 -0500 )edit

You have to add the image topic to Rviz.

  • After you run Rviz, click on Add button on lower left corner.
  • Then click 'By topic' and select the correct topic based on your camera topic name. It should look something like:


hvpandya gravatar image hvpandya  ( 2016-01-21 15:49:16 -0500 )edit

answered 2016-01-22 12:39:48 -0500

tn0432 gravatar image

For my case when starting to learn image processing with ROS, I use gscam package to get image from camera. CV Bridge package to transfer from ROS standard image to OpenCV standard image. When you image is presented at OpenCV standard, you are able to use available functions in OpenCV for image processing.

Good luck!

edit flag offensive delete link more

answered 2016-01-21 15:53:12 -0500

hvpandya gravatar image

updated 2016-01-21 15:54:22 -0500

While the other answer gets you into getting an image stream from the camera and playing with it, I believe you should start with OpenCV bare minimum i.e.

Open an image and Display it

Then go on to

modify that image and save/write it

Once you have done that start following the other answer, get image stream from your webcam and play with advanced stuff.

Hope this helps!

edit flag offensive delete link more

Question Tools



Asked: 2015-12-18 08:26:04 -0500

Seen: 7,241 times

Last updated: Jan 22 '16