0

I have two cameras I have calibrated the cameras considering there position at the same point. But actually the positions of the cameras is slightly different than considered during calibration. This caused a parallax error. Now when I capture a point with these two cameras I get a misalignment in the images due to parallax Now I want to calculate this misalignment in pixels.

I tried to calculate the misalignment in m

Z(measured) = Z(calib) + (Du /tan a1 + tan a2) Z(measured) is actual distance from cam to object in m Z(calib) is distance from camera to calibration marker point. Du is distance between the projected point of the object captured by two cameras on image plane in meters tan a1 = (distance between camera position during calibration and actual camera 1 position/ distance between camera position during calibration and position of calibration marker point)

tan a2 = (distance between camera position during calibration and actual camera 2 position/ distance between camera position during calibration and position of calibration marker point)

How can I now convert this value of Du in meters to pixels

1 Answers1

0

If you know what the ground sample distance of your image you can use that to determine how much distance a pixel represents and use that number to convert meters to pixels. Ground sample distance is calculated as:

GSD = D/F* PS
GSD = Ground sample distance
D = Distance to object (from camera)
F = Focal Length
PS = Pixel size (calculated using Photo dimension/Camera Sensor Dimension. 
PS should be almost if not exactly the same when comparing Width and Height result. 

Having GSD you can then work backwards to determine number of pixels based on distance in meters (note this means you will want units to all be in meters).

C.Radford
  • 882
  • 4
  • 13
  • 31