Robotics StackExchange | Archived questions

How to publish/stream roi of rectified images by using image_proc?

I have calibrated camera by using cameracalibrator.py node. When I use image_proc node to compare raw and rectified images, I don't get what I want. Although image is rectified, border of the image is getting distorted toward opposite direction as the image below;

left is raw, right is image_rect_color

As a result, rectified image is still useless for me.

Thus, this time, I calibrated my camera using opencv so that I can get region of interest (ROI) in the image after undistortion operation. Thus, the rectified image becomes perfect for me. However, I need ROS to do that while streaming rectified image by using image_proc. Is there anyway to publish rectified images without unwanted border?

Asked by earcz on 2018-09-05 14:26:09 UTC

Comments

1) Please link the calibration package you used and consider posting a bug report there if you think you found unexpected behavior. 2) Can't you just use the calibration parameters you obtained via opencv? You know you can use opencv inside ROS too, right?

Asked by fvd on 2018-09-06 00:09:45 UTC

1) I installed calibration package for months ago. I applied the same with the tutorial. 2) I can copy calibration parameters from opencv and paste into camera.yaml file in Ros. But how to crop rectified images for streaming ?

Asked by earcz on 2018-09-06 15:08:34 UTC

Answers