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

camera calibration and ROI

asked 2011-10-20 04:19:52 -0500

Mimax gravatar image

updated 2014-01-28 17:10:37 -0500

ngrennan gravatar image

Hi there,

i've just a litte question regarding calibration of a camera and ROI. If i have calibration values for a camera and change the roi? Does this affect the calibration values in anyway and do i have to do the calibration again?

I thought that i don't have to recalibrate the camera if i just change the ROI since it can be calculated based on the calibration values of the full resolution image.

The reason why i'm asking is the camera_info_manager. I've implemented it and it works quite good.

However if change the ROI it does not affect the camera_info message in terms of ROI. I can either add the ROI to my camera_name and force the user to recalibrate the camera every time a different ROI is set or i modify my camera_info message from manager regarding ROI values.

what's the best solution?

cheers Mimax

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-10-20 07:58:26 -0500

joq gravatar image

The REP-0104 specification supports using the full resolution calibration with a cropped image.

The CameraInfo returned by camera_info_manager contains default operational parameters, including binning and ROI values. That works unmodified if your camera is publishing the full-resolution image for which it was calibrated.

To publish a cropped image, add the appropriate ROI parameters to the CameraInfo message before publishing it. You can look at the camera1394 driver for an example of this logic.

edit flag offensive delete link more

Comments

Thanks Jack. That is about the way i wanted to implement it. However wouldn't it make sense to have an member method in the camera_info_manager for changing the operation parameters which can be called if I change ROI or Binning by a service call.
Mimax gravatar image Mimax  ( 2011-10-20 21:07:43 -0500 )edit
This way i could skip the comparison of roi values every time publishing an image just modify the origin camera_info_message of the camera_info_manager
Mimax gravatar image Mimax  ( 2011-10-20 21:10:22 -0500 )edit
Adding some method like setOperationalParameters() to camera_info_manager seems reasonable. If you have suggestions, please open an enhancement ticket. We could add it for Fuerte.
joq gravatar image joq  ( 2011-10-21 02:21:13 -0500 )edit
Thanks for that hint. I'll definitely do this
Mimax gravatar image Mimax  ( 2011-10-21 04:27:26 -0500 )edit
Fuerte final freeze is coming soon, Feb. 15th. To change the API for that release we need the new interface defined, so please file an enhancement ticket right away: https://code.ros.org/trac/ros-pkg/newticket?component=image_common&type=enhancement&image_common
joq gravatar image joq  ( 2012-01-21 02:13:25 -0500 )edit
1

answered 2011-10-20 07:07:59 -0500

Assuming that setting a ROI changes where the origin of the image is, I believe that the only calibration parameters affected should be the principal point, which is part of the intrinsic camera matrix (K).

Setting a ROI is effectively pretending your imaging sensor is smaller, so nothing else should change.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-10-20 04:19:52 -0500

Seen: 2,518 times

Last updated: Oct 20 '11