Ask Your Question

What is the value of the points from the findFundamentalMat() function?

asked 2014-04-14 03:47:24 -0500

hassan-bdw gravatar image

hello i'm using stereo vision in my final year project and one of the steps is to determine the real world coordinates in a certain volume so does this function at least give the x,y coordinates or really what does it output and in what is the reference

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-04-14 03:57:57 -0500

The functions in this section use a so-called pinhole camera model. In this model, a scene view is formed by projecting 3D points into the image plane using a perspective transformation.

s \; m' = A [R|t] M'


s \vecthree{u}{v}{1} = \vecthreethree{fx}{0}{cx}{0}{fy}{cy}{0}{0}{1} \begin{bmatrix} r{11} & r{12} & r{13} & t1 \ r{21} & r{22} & r{23} & t2 \ r{31} & r{32} & r{33} & t3 \end{bmatrix} \begin{bmatrix} X \ Y \ Z \ 1 \end{bmatrix}


    (X, Y, Z) are the coordinates of a 3D point in the world coordinate space
    (u, v) are the coordinates of the projection point in pixels
    A is a camera matrix, or a matrix of intrinsic parameters
    (cx, cy) is a principal point that is usually at the image center
    fx, fy are the focal lengths expressed in pixel units.

Thus, if an image from the camera is scaled by a factor, all of these parameters should be scaled (multiplied/divided, respectively) by the same factor. The matrix of intrinsic parameters does not depend on the scene viewed. So, once estimated, it can be re-used as long as the focal length is fixed (in case of zoom lens). The joint rotation-translation matrix [R|t] is called a matrix of extrinsic parameters. It is used to describe the camera motion around a static scene, or vice versa, rigid motion of an object in front of a still camera. That is, [R|t] translates coordinates of a point (X, Y, Z) to a coordinate system, fixed with respect to the camera. The transformation above is equivalent to the following (when z \ne 0 ):

\begin{array}{l} \vecthree{x}{y}{z} = R \vecthree{X}{Y}{Z} + t \ x' = x/z \ y' = y/z \ u = fx*x' + cx \ v = fy*y' + cy \end{array}

Real lenses usually have some distortion, mostly radial distortion and slight tangential distortion. So, the above model is extended as:

\begin{array}{l} \vecthree{x}{y}{z} = R \vecthree{X}{Y}{Z} + t \ x' = x/z \ y' = y/z \ x'' = x' \frac{1 + k1 r^2 + k2 r^4 + k3 r^6}{1 + k4 r^2 + k5 r^4 + k6 r^6} + 2 p1 x' y' + p2(r^2 + 2 x'^2) \ y'' = y' \frac{1 + k1 r^2 + k2 r^4 + k3 r^6}{1 + k4 r^2 + k5 r^4 + k6 r^6} + p1 (r^2 + 2 y'^2) + 2 p2 x' y' \ \text{where} \quad r^2 = x'^2 + y'^2 \ u = fx*x'' + cx \ v = fy*y'' + cy \end{array}

k1, k2, k3, k4, k5, and k6 are radial distortion coefficients. p1 and p2 are tangential distortion coefficients. Higher-order coefficients are not considered in OpenCV. Dog Insulin ELISA Kitlink ... (more)

edit flag offensive delete link more


Thank you a lot it was a very clear explanation..

hassan-bdw gravatar imagehassan-bdw ( 2014-04-15 00:56:36 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-04-14 03:47:24 -0500

Seen: 777 times

Last updated: Apr 14 '14