This code is based on the collinearity equations of Photogrammetry and it's a solution to the problem of relative orientation of two images. Each measured point in both images corresponds to 4 equations, (x,y) in the left image and (x,y)' in the right image. Besides the 5 parameters of the relative orientation, each point introduces 3 more unknown variables (X,Y,Z).