1

I am using ROS to control a drone for real-time image processing applications. I have calibrated camera by using cameracalibrator.py node in Ros. 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 image is raw, right image is rectified

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 do that ?

Ender Ayhan
  • 308
  • 3
  • 14

1 Answers1

1

You can directly use the image_proc/crop_decimate nodelet. You can configure it using dynamic_reconfigure to set up ROI or interpolation. However, since these are software operations, interpolation methods should be handled with care (but fastest NN method is standard anyway) since you have a real time application.

Tik0
  • 2,499
  • 4
  • 35
  • 50
  • Sorry for the late response. As far as I know, I can use image_proc/crop_decimate for only raw images. But I need rectified images to be cropped and streamed. Did I misunderstand you ? – Ender Ayhan Sep 06 '18 at 18:26
  • Should work if you just remap the subscription topic to the rectified one – Tik0 Sep 06 '18 at 18:46
  • Okay, I will try. However, I dont know how to do since your idea is really general. Is there any tutorial or example that you can recommend ? – Ender Ayhan Sep 06 '18 at 19:30
  • 1
    [This](https://answers.ros.org/question/45118/how-to-set-up-image_proccrop_decimate-nodelet-properly/) discussion should give you some hints. – Tik0 Sep 06 '18 at 20:19