0
$\begingroup$

Rosanswers logo

Hi

Im new in OpenCV and would like to learn using it with ROS fuerte. I am using Ubuntu 12 and 14 and ROS fuerte and Microsoft Kinect. Any good tutorial to start install OpenCV in ROS and start using it with some basic functions to hit the ground? Any help would really appreciate

EDIT: Do I need to change my CmakeList.txt file ? I found that I you need to include it into my CMakeList.txt (here i mean the CMakeList.txt in my package):

find_package(OpenCV REQUIRED)

target_link_libaries(your_node ${OpenCV_LIBS})

True?

Thanks


Originally posted by Astronaut on ROS Answers with karma: 330 on 2016-05-10

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

 sudo apt-get install libopencv-dev

Then I would suggest using python first. All you need to do is to import opencv in the top of your python script.

import cv2

and then do whatever you want. Opencv functions can be called in ROS callbacks. Most interesting thing would be probably converting ROS image messages to opencv format as explained here. This would allow applying image processing algorithms implemented in opencv on the images you get from ROS.


Originally posted by Mehdi. with karma: 3339 on 2016-05-10

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Astronaut on 2016-05-10:
Thanks. Im not familiar with python actually. is any option for using C++?

Comment by Airuno2L on 2016-05-11:
Yes, you can use OpenCV with C++. Installing it is done the same way.

Comment by Mehdi. on 2016-05-11:
Here is an example to publish webcam images using opencv and ros

Comment by Astronaut on 2016-05-12:
Thanks,. I followed the example. when tried to run make I got the following error: /usr/bin/ld: cannot find -lcv_bridge

I already installed before the cv_bridge package. Should I modify my CmakeList as well?Any help?

Comment by Mehdi. on 2016-05-12:
you run make or catkin_make ?

Comment by Astronaut on 2016-05-12:
I am using rosbuild. So I run make

Comment by Mehdi. on 2016-05-12:
rosmake + package_name

Comment by Astronaut on 2016-05-12:
No. It does not work. error again

Comment by Astronaut on 2016-05-16:
ok. fix it. work now.

Comment by Astronaut on 2016-05-18:
Do you know any launch file to run the node?

Comment by Astronaut on 2021-04-05:
Ok. I was the opencv version problem. Ok now

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.