For every point in one of the two images of stereo-pair the function cvComputeCorrespondEpilines finds equation of a line that contains the corresponding point (i.e. projection of the same 3D point) in the other image. Each line is encoded by a vector of 3 elements l=[a,b,c]T, so that:
lT*[x, y, 1]T=0, or
a*x + b*y + c = 0
From the fundamental matrix definition (see cvFindFundamentalMatrix discussion), line l2 for a point p1 in the first image (which_image=1) can be computed as:
l2=F*p1and the line l1 for a point p2 in the second image (which_image=1) can be computed as:
l1=FT*p2Line coefficients are defined up to a scale. They are normalized (a2+b2=1) are stored into correspondent_lines

C# | Visual Basic | Visual C++ |

- points (IntPtr)
- The input points. 2xN, Nx2, 3xN or Nx3 array (where N number of points). Multi-channel 1xN or Nx1 array is also acceptable.
- whichImage (Int32)
- Index of the image (1 or 2) that contains the points
- fundamentalMatrix (IntPtr)
- Fundamental matrix
- correspondentLines (IntPtr)
- Computed epilines, 3xN or Nx3 array