1 | initial version |

If you have the ball position at (x,y) (after correcting the distortion), you can just write the projection equations:

```
x_px = f_x * X/Z + c_x
y_px = f_y * Y/Z + c_x
```

Where (X,Y,Z) are possible 3d coordinates in the world. As you have only two equations for three unknowns (X,Y,Z), this will give you the possible positions of the ball along a line. This line goes through the optical center of your camera and e.g. the point [(x_px-c_x)/f_x,(y_px-c_y)/f_y,1]. As you have the 6D transformation between both cameras, you can bring the two rays into one coordinate system and find a point with minimal distance to both of them. (don't try to intersect them, as they probably never have an intersection point)

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.