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

New C++ API Documentation for OpenCV

asked 2012-05-26 17:29:28 -0500

DavidLavy gravatar image

updated 2014-01-28 17:12:28 -0500

ngrennan gravatar image

Hi,I have 3 questions:

  1. Is it possible to use the old API C++ for OpenCV while writing code in ROS?
  2. If is not, does anybody know where can I find good documentation for the new OpenCV C++ API? some books I have read only have a tiny percent explaining this new API.
  3. It should be better if I write the code on Python, how complete are the functions in Python comparing to C++ in writing code for ROS?

I'm more interested in the two first questions cause I have more experience writing code in C.

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-05-26 19:51:20 -0500

mkoval gravatar image
  1. Yes. There is even a package, cv_bridge that converts between sensor_msgs/Image and cv::Mat.
  2. The auto-generated API documentation is quite excellent for the C++ API. In general, I think the C++ API has less of a learning curve than the C API.
  3. Most (if not all) of the C++ functions are wrapped. However, I ran into quite a few functions In OpenCV 2.2 and 2.3 that were completely broken. It's possible that things have improved in OpenCV 2.4.
edit flag offensive delete link more
2

answered 2012-05-26 17:58:42 -0500

karthik gravatar image

Hi, You can always use the old APIs. If you want to learn the new C++ one which is easier then look into these documentations

Hope it helps, Karthik

edit flag offensive delete link more

Comments

Thanks, what should I add to use the old API though?, the examples I have seen were using the new one.

DavidLavy gravatar image DavidLavy  ( 2012-05-26 18:36:50 -0500 )edit

Old (iplimage) are the basics structure used in opencv even now. new Mat structures are the wrappers build on top of the old. So you can directly use them as such.

karthik gravatar image karthik  ( 2012-05-26 18:51:51 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2012-05-26 17:29:28 -0500

Seen: 819 times

Last updated: May 26 '12