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

How to use OpenCV to process image

asked 2016-03-07 02:49:36 -0600

Henschel.X gravatar image

Hi! Everyone!

I'm a beginner of ROS, and now I've been focusing on imaging processing on ROS, My robot is Turtlebot, and I use the kinect as the camera, so basically what I need to do is to find the changes in the same background, so I followed the tutorials and started to use Gazebo now, and I tested the kinect all is fine. So my question is, I am pretty lost since there is no example or demo for image processing on wiki, I am wondering what is my first step? and what should I do after that.

If there is any good website for image processing on ROS to follow, that would be perfect! Thank you so much!

edit retag flag offensive close merge delete

Comments

may I know how you are getting images? are you using pictures or video stream? let me know about these and then I'll guide you for ROS and OpenCV image processing.

PKumars gravatar image PKumars  ( 2016-03-07 03:54:26 -0600 )edit

I got the video stream from Kinect, and I need to capture one pic using an order, every time I sent an order, one pic is captured. So what I need to do is to do the rest job upon the pic.

Henschel.X gravatar image Henschel.X  ( 2016-03-07 20:48:45 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-03-07 03:28:13 -0600

Mehdi. gravatar image

updated 2016-03-07 03:29:03 -0600

ROS and OpenCV are two totally independent projects. All you need to do in ROS is to transform the image message into an opencv image using cv_bridge. Once you have this image, you can do whatever you want with it using OpenCv functionalities. Check the extremely extensive OpenCV documentation and tutorials either in Python or C++.

edit flag offensive delete link more

Comments

Thank you very much! I know what you mean, It's like I need to write a node using OpenCV library to change ROS image first and I can do the image processing after this step in the node right? I prefer C++, so which means all of these should be done by cpp file is that right?

Henschel.X gravatar image Henschel.X  ( 2016-03-07 20:43:23 -0600 )edit
1

I'm assuming you're using the image transport system and a camera to get your images. You'll need to use the ROS cv_bridge object to convert the image into a cv::Mat image. From here you'll be able to use the significant power of openCV to process your image. All of this can be done in C++

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2016-03-08 07:24:07 -0600 )edit

Thank you so much!!!! You saved me!

Henschel.X gravatar image Henschel.X  ( 2016-03-08 19:42:10 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-07 02:49:36 -0600

Seen: 3,456 times

Last updated: Mar 07 '16