2

Example Target:
enter image description here
Source: zone.ni.com

From a calibration target like the image above, I have found the center of each circle on the target. I have the center coordinates of each circle center (ex. (583, 120)). Now, I need to create a grid out of these circle centers. So the first circle center would be (0,0) and the circle center to the right of the first one would be (0,1)<--(row, col format for python) and the circle center below the first one would be (1,0). The problem I'm having with this is that the calibration target may be tilted in any direction and angle, so the center of the circles will not be in the same rows or same columns in the images (ex. center circle 1 may be at (100,150) and center circle 2 although right next to it is at (115, 200), so they are not in the same row in the image). The actual calibration target has the circles spread equal distances apart, but due to the angle of the calibration target relative to the sensor, they will not appear equally spaced in the image. I am writing this code in python. If anyone has an idea about how to go about this (not looking for someone to write code, just send me in the right direction), please let me know.

EDIT: I am not looking to do an affine transform. I am trying to find the point correspondences of the points in the image to the target in the real world.

Mick
  • 21
  • 4
  • If you are looking to correct for tilt with respect to the camera, you're looking for the affine transformation... – Aaron Jul 12 '16 at 17:31
  • I am also a big fan of fourier transforms to find regular arrays of objects in space... – Aaron Jul 12 '16 at 17:36

1 Answers1

1

are you using openCV? in any case the topic you might want to look into is Affine Transforms Although the link is python OpenCv specific, the topic itself is not.

You can actually complete the transform using only 4 points. These points can be obtained by detecting a rectangular bounding box, here is another Similar SO question OpenCV C++/Obj-C: Detecting a sheet of paper / Square Detection its in C++ but again the ideas are similar

Hope this helps

Community
  • 1
  • 1
andrew
  • 2,381
  • 1
  • 12
  • 22