1

I want to map the thermal image of the Flir with the depth image of the XTion. As the depth image is calculatet from Xtions IR camera I want to map the Flir with Xtions IR image.

Therefor I placed both cameras on one plane close to each other (about 7 cm in x, 1 cm in y and 3 cm in z).

Then I used ROS Indigo and openCV 2.4.9 to:

  • Set the Flir Focus to a fix on (no autofocus)
  • Get both images synchronized.
  • Resize the Xtion IR image from 640x480 to 320x240 pixels as the Flir image
  • Calculate the intrinsic camera parameters for both cameras. (Flir + Xtion IR)
  • Calculate the extrinsic parameters
  • Remap both images to get the rectified images

I now have the two rectified images but still an offset in X (horizontal direction).

If I understand that correctly, I have the offset due to the different focal lengths and field of views (Flir with objective: 45° H x 33.8° V and 9.66mm focal length, XTion: 58° H x 45° V) and could solve the problem with a perspective transform but I don't have both focal lengths in mm.

The datasheets:

  1. http://support.flir.com/DsDownload/Assets/48001-0101_en_40.pdf
  2. https://www.imc-store.com.au/v/vspfiles/assets/images/1196960_en_51.pdf
  3. http://www.asus.com/us/Multimedia/Xtion_PRO_LIVE/specifications/

I had the idea to get the focal lengths with cv::calibrationMatrixValues but I dont know the apertureWith and Heigth.

Cross-Post

How could I solve this problem?

F4B1
  • 11
  • 4
  • You should try cross-posting to answers.ros.org. Also you should be able to calculate the focal lengths in mm from the pixel focal lengths (fx/fy from the intrinsics) and the image sensor size (assuming that is in the datasheet). There are similar triangles, you have the fx and sensor width in pixels, and then the unknown focal length and sensor width in mm. – Lucas Walter Apr 30 '15 at 17:27
  • First, thanks for your responce. Correct me if im wrong, but I'm not able to find a sensor size in the flir-datasheet and the xtion-datasheet can't be really called datasheet. Could you tell me a bit more detailed how I can calculate the focal length and sensor width only with fx and sensor width in pixels? That would be really nice. – F4B1 Apr 30 '15 at 22:22
  • You do need the sensor size (maybe someone has done a teardown and posted the results?), the equation would be fx / width_pixels = focal_length_mm / width_mm, so you need three out of those four variables to solve for the fourth. – Lucas Walter May 01 '15 at 22:16
  • Thank you again. I googled (not only three mins) for the sensor size in mm but I couldn't find any information. I also tried to get the ratio between the images with `cv::getPerspectiveTransform` and a circle grid but for that I have to eliminate any rotation of the the circle grid in the real world without eliminating the ratio between the images. – F4B1 May 02 '15 at 15:10

0 Answers0