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

rectify image in your package

asked 2012-03-11 22:25:37 -0600

Eddit gravatar image

Dear All,

I have a package which has 2 image_info and camera topics:

nh_.param("input_image_topic", input_image_topic_, std::string("/camera")); nh_.param("input_camera_info_topic", input_camera_info_topic_, std::string("/camera_info"));

I am wondering if there is a way to rectify images in my package.

I donot want to use the image_proc in a launch file. I need the rectify images to be called in my package to do some processing.

cheers, Eddi

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2012-03-12 03:46:31 -0600

Thomas gravatar image

The whole architecture of ROS makes the assumption that one wants to distribute the computation on several nodes dedicated to a particular subproblem that needs to be solved. Therefore, there is no direct API in image_proc to rectify an image. If performance is a problem, you may run both your algorithm and the rectification in the same process using nodelets.

Doing things differently and trying to extract C++ API from ROS nodes is not a good idea. If you really want to do so, then ROS is probably not the right tool for you and you should directly use OpenCV API.

edit flag offensive delete link more
1

answered 2012-03-12 02:48:37 -0600

Bence Magyar gravatar image

You can simply subscribe to the rectified topic and do the processing with your node. However if you are interested in removing that small overhead of communication you can still make a copy of the image_proc node, rename, and modify it to fit your needs.

You can fetch the code from the subversion repo: http://www.ros.org/wiki/image_proc

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-03-11 22:25:37 -0600

Seen: 2,654 times

Last updated: Mar 12 '12