Hello everyone,(adsbygoogle = window.adsbygoogle || []).push({});

I recently began a project which using 2 parallel cameras in order to determine the 3D spacial positioning of a red ball relative to the left camera.

Here is my current setup;

Two cameras that lie on the same plane with parallel optical axis. (http://www.dis.uniroma1.it/~iocchi/ster [Broken] ... triang.gif from this webpage http://www.dis.uniroma1.it/~iocchi/stereo/triang.html)

Distance between cameras is 317mm

Resolution of images is 960x720

Effective focal length for both cameras is 2mm. (But the cameras are equipped with an auto focus feature and although not active during acquisition the cameras are set to a constant focus setting before acquisition. Would this change the focal length, also there are no units on the focus setting so I am unsure of how much I have change the focal length if at all?)

X, Y, and Z locations are in mm and relative to the left camera

and here is my math, ( assuming I have already calculated the X and Y of the red ball in each image)

Z_red=(((317*2)/((X_Position_of_Circle_in_Left_Camera_Image-0.5*960)-(X_Position_of_Circle_in_Right_Image-0.5*960))))

X_red=(((X_Position_of_Circle_in_Left_Image-0.5*960)*Z_red)/2)

Y_red=(((Y_Position_of_Circle_in_left_Image-0.5*720)*Z_red)/2)

Unfortunately the math does not work. I have tested it numerous time by placing the red ball a known distance from the left camera and it does not output the correct distance. Why could that be? I would greatly appreciate any help, if someone could post correct equations that would be phenomenal.

A friend of mine recommended adding constants to the calculations in order to scale the values to the correct position. This does produce better results however I am unsure of whether it is mathematically correct.

Z_red=(((317*2)/((X_Position_of_Circle_in_Left_Camera_Image-0.5*960)-(X_Position_of_Circle_in_Right_Image-0.5*960))))*kz

X_red=(((X_Position_of_Circle_in_Left_Image-0.5*960)*Z_red)/2)*kx

Y_red=(((Y_Position_of_Circle_in_left_Image-0.5*720)*Z_red)/2)*ky

Any help would be greatly appreciated.

Thanks,

Taylor Amarel

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# 3D Stereotriangulation Using Parallel Cameras

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Stereotriangulation Using Parallel | Date |
---|---|

I Which x_0 to use in a Taylor series expansion? | Feb 19, 2018 |

I Find the height up a ladder where a dropped bottle will break, using only two bottles | Feb 6, 2018 |

B Using trig to find distance? | Jan 18, 2018 |

Using reference angles to evaluate trig function | Jan 12, 2018 |

3D Stereotriangulation Using Parallel Cameras | Jul 30, 2011 |

**Physics Forums - The Fusion of Science and Community**