Update to 2.0.0 tree from current Fremantle build
[opencv] / docs / appPage / Calibration / cam_model.htm
diff --git a/docs/appPage/Calibration/cam_model.htm b/docs/appPage/Calibration/cam_model.htm
deleted file mode 100644 (file)
index 646feec..0000000
+++ /dev/null
@@ -1,643 +0,0 @@
-<HTML>\r
-  <HEAD>\r
-    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">\r
-    <META NAME="GENERATOR" CONTENT="Mozilla/4.03 [en] (WinNT; U) [Netscape]">\r
-    <TITLE>Camera Calibration Tool - Camera Model</TITLE>\r
-    <!-- Changed by: Ara V. Nefian, May 31-2000 -->\r
-    <!-- Formatted and proofed in GNU Emacs by: Michael Chu, 00.06.03 -->\r
-  </HEAD>\r
-  <BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000CC" VLINK="#0000FF" ALINK="#FF0000">\r
-    <a name="top">\r
-      <!-- <CENTER>\r
-    <BLOCKQUOTE>\r
-    <table border = 3 WIDTH="70%" >\r
-    <TR><TD>\r
-      -->\r
-    <CENTER><TABLE CELLSPACING=0 CELLPADDING=5 WIDTH="90%" BGCOLOR="#6A9BED" NOSAVE >\r
-       <TR NOSAVE>\r
-         <TD NOSAVE>\r
-           <CENTER><I><FONT COLOR="#000000"><FONT SIZE=+4>Camera Calibration Tool - Camera Model</FONT></FONT></I></CENTER>\r
-         </TD>\r
-       </TR>\r
-      </TABLE></CENTER>\r
-    <!--\r
-  </TD></TR>\r
-  </table>\r
-    </BLOCKQUOTE>\r
-  </center>\r
-    -->\r
-    <H1>Description of the intrinsic camera model</H1>\r
-\r
-\r
-    <P>After calibration, the intrinsic camera model may be saved into a text file by clicking on the "Save" button in the <a href="doc_calib.html#properties" target="application window">property control window</a>. An example of such a file is <a href="CalibResult.txt">CalibResult.txt</a>:\r
-\r
-<BR><BR>\r
-\r
-<tt>\r
-Camera Matrix:<BR>\r
-M[0,0]= 286.2791138       M[0,1]= 0.0000000          M[0,2]= 156.6844177<BR>\r
-M[1,0]= 0.0000000         M[1,1]= 287.7630615        M[1,2]= 130.9805145<BR>\r
-M[2,0]= 0.0000000         M[2,1]= 0.0000000          M[2,2]= 1.0000000<BR>\r
-<BR>\r
-<BR>\r
-Distortion:<BR>\r
-D[0]= -0.416691<BR>\r
-D[1]= 0.250142<BR>\r
-D[2]= -0.000386<BR>\r
-D[3]= -0.001894<BR>\r
-</tt>\r
-\r
-<BR>\r
-This complete intrinsic camera model is encoded with the matrix <b>M</b> (also known as camera matrix) and the vector <b>D</b> (distortion vector). \r
-\r
-<p><br><font size=+1>Definition of the intrinsic parameters:</font>\r
-<BR><BR>\r
-Let us make slight changes in notation: (numerical values are included for clarity purposes only - when running calibration on your camera, you will naturally obtain a different set of numerics)<BR>\r
-\r
-<ul>\r
-<li>\r
-<b><font size=+0>Focal length:</font></b> The focal length in pixels is the 2x1 vector <b>fc = [ M[0,0] ; M[1,1] ] = [286.3 ; 287.8]</b>.\r
-<!-- The quantities <b>fc(1)</b> and <b>fc(2)</b> are the horizontal and vertical focal length (in x and y) in pixels. --></li>\r
-\r
-<li>\r
-<b><font size=+0>Principal point:</font></b> The principal point in pixels is the 2x1 vector <b>cc = [ M[0,2] ; M[1,2] ] = [156.7 ; 131]</b>.</li>\r
-\r
-<li>\r
-<b><font size=+0>Skew coefficient:</font></b> The skew coefficient related to the angle between the x and y pixel axes is the scalar <b>s = M[0,1] = 0</b>.</li>\r
-\r
-<li>\r
-<b><font size=+0>Distortion:</font></b> The image distortion coefficients\r
- are <b>k1 = D[0] = -0.416691</b>, <b>k2 = D[1] = 0.250142</b>, <b>p1 = D[2] = -0.000386</b> and <b>p2 = D[3] = -0.001894</b>. The coefficients <b>k1</b> and <b>k2</b> are associated to radial distortions (up to the fourth order), and <b>p1</b> and <b>p2</b> are associated to tangential distortions.</li>\r
-</ul>\r
-\r
-\r
-A zero skew (<b>s=0</b>) means that the pixels are rectangular on the\r
-sensor. In that present release of the calibration software, the\r
-camera model will always assume rectangular pixels (or zero\r
-skew). This assumption is valid for most current imaging sensors. In future\r
-releases, a complete estimation of the skew coefficient will be included.\r
-\r
-<br><br>\r
-The next section provides detailed definitions of the entire set of intrinsic parameters.\r
-\r
-\r
-\r
-<p><br><font size=+1>Description of the pixel projection operator:</font>\r
-<BR><BR>\r
-Let us make slight changes in notation: (numerical values are included for clarity purposes only - when running calibration on your camera, you will naturally obtain a different set of numerics)<BR>\r
-\r
-<p>Let <b>P</b> be a point in space of coordinate vector <b>XX<sub>c</sub>\r
-= [X<sub>c</sub>;Y<sub>c</sub>;Z<sub>c</sub>]</b> in the camera reference\r
-frame.\r
-<br>Let us project now that point on the image plane according to the intrinsic\r
-parameters (<b>fc</b>,<b>cc</b>,<b>s</b>,<b>k1</b>,<b>k2</b>,<b>p1</b>,<b>p2</b>).\r
-<br>Let <b>x<sub>n</sub></b> be the normalized (pinehole) image projection:\r
-<br>&nbsp;\r
-<center><table>\r
-<tr>\r
-<td><b>x<sub>n</sub></b></td>\r
-<td><b> = </b></td>\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td>\r
-<center><table><tr><td>\r
-<b>X<sub>c</sub>/Z<sub>c</sub></b>\r
-</td></tr></table></center>\r
-</td>\r
-</tr>\r
-\r
-<tr>\r
-<td>\r
-<center><table><tr><td>\r
-<b>Y<sub>c</sub>/Z<sub>c</sub></b>\r
-</td></tr></table></center>\r
-</td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-<td><b>=&nbsp;</b></td>\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td>\r
-<center><table><tr><td>\r
-<b>x</b>\r
-</td></tr></table></center>\r
-</td>\r
-</tr>\r
-\r
-<tr>\r
-<td>\r
-<center><table><tr><td><center><table><tr><td>\r
-<b>y</b>\r
-</td></tr></table></center></td></tr></table></center>\r
-</td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-</tr>\r
-</table></center>\r
-\r
-<p>Let <b>r<sup>2</sup> = x<sup>2</sup> + y<sup>2</sup></b>.\r
-<br>After including lens distortion, the new normalized point coordinate\r
-<b>x<sub>d</sub></b>\r
-is defined as follows:\r
-\r
-<center>\r
-<table>\r
-<tr>\r
-\r
-<td>\r
-<b>x<sub>d</sub> \r
-</td>\r
-\r
-<td>\r
-<b> = </b>\r
-</td>\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><center><b>x<sub>d</sub>(1)</b></center></td>\r
-</tr>\r
-<tr>\r
-<td><center><b>x<sub>d</sub>(2)</b></center></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-<td>\r
-<b>=</b>\r
-</td>\r
-\r
-<td>\r
-<b>(1 + k1*r<sup>2</sup> + k2*r<sup>4</sup>) * x<sub>n</sub> + dx</b>\r
-</td>\r
-\r
-</tr>\r
-</table>\r
-</center>\r
-\r
-\r
-<p>where <b>dx</b> is the tangential distortion vector:\r
-<br>&nbsp;\r
-<center><table>\r
-<tr>\r
-<td><b>dx</b></td>\r
-<td><b> = </b></td>\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td>\r
-<center><table><tr><td>\r
-<b>2*p1*x*y + p2*(r<sup>2</sup> + 2*x<sup>2</sup>)</b>\r
-</td></tr></table></center>\r
-</td>\r
-</tr>\r
-\r
-<tr>\r
-<td>\r
-<center><table><tr><td>\r
-<b>p1*(r<sup>2</sup> + 2*y<sup>2</sup>) + 2*p2*x*y</b>\r
-</td></tr></table></center>\r
-</td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-</tr>\r
-</table></center>\r
-\r
-\r
-It is worth noticing that this distortion model was first introduced\r
-by Brown in 1966 and called "Plumb Bob" model (radial polynomial +\r
-"thin prism" ). The tangential distortion is due to "decentering", or imperfect centering of the lens components and other manufacturing defects in a compound lens.\r
-\r
-<p>Once distortion is applied, the final pixel coordinates <b>x_pixel = [x<sub>p</sub>;y<sub>p</sub>]</b>\r
-of the projection of <b>P</b> on the image plane is:\r
-<br>&nbsp;\r
-<center><table>\r
-<tr>\r
-<td>\r
-<align="left"><b>x<sub>p</sub> = fc(1)*x<sub>d</sub>(1) + s*x<sub>d</sub>(2) + cc(1)</b></align>\r
-</td>\r
-</tr>\r
-\r
-<tr>\r
-<td>\r
-<align="left"><b>y<sub>p</sub> = fc(2)*x<sub>d</sub>(2) + cc(2)</b></align>\r
-</td>\r
-</tr>\r
-</table></center>\r
-\r
-<BR>\r
-\r
-Therefore, the pixel coordinate vector <b>x_pixel</b> and the normalized (distorted) coordinate vector <b>x<sub>d</sub></b> are related to each other through the linear equation:\r
-<BR>\r
-<center>\r
-<table>\r
-<tr>\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><center><b>x<sub>p</sub></b></center></td>\r
-</tr>\r
-<tr>\r
-<td><center><b>y<sub>p</sub></b></center></td>\r
-</tr>\r
-<tr>\r
-<td><center><b>1</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-\r
-<td>\r
-<center><b>=</b></center>\r
-</td>\r
-\r
-\r
-<td>\r
-<center><b>M</b></center>\r
-</td>\r
-<td>\r
-<center><b>.</b></center>\r
-</td>\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><center><b>x<sub>d</sub>(1)</b></center></td>\r
-</tr>\r
-<tr>\r
-<td><center><b>x<sub>d</sub>(2)</b></center></td>\r
-</tr>\r
-<tr>\r
-<td><center><b>1</b></center></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-\r
-</tr>\r
-</table>\r
-</center>\r
-<BR>\r
-where <b>M</b> is known as the camera matrix, and defined as follows:\r
-\r
-<BR>\r
-\r
-\r
-<center>\r
-<table>\r
-\r
-<tr>\r
-\r
-<td>\r
-<center><b>M</b></center>\r
-</td>\r
-\r
-<td>\r
-<center><b>=</b></center>\r
-</td>\r
-\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>[</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-\r
-<td>\r
-<center>\r
-<table>\r
-\r
-<tr>\r
-<td>\r
-<center><table><tr><td><center><table><tr><td>\r
-<center><b>fc(1)</b></center>\r
-</td></tr></table></center></td></tr></table></center>\r
-</td>\r
-<td>\r
-<center><table><tr><td><center><table><tr><td>\r
-<center><b>s</b><center>\r
-</td></tr></table></center></td></tr></table></center>\r
-</td>\r
-<td>\r
-<center><table><tr><td><center><table><tr><td>\r
-<center><b>cc(1)</b><center>\r
-</td></tr></table></center></td></tr></table></center>\r
-</td>\r
-</tr>\r
-<tr>\r
-<td>\r
-<center><table><tr><td><center><table><tr><td>\r
-<center><b>0</b><center>\r
-</td></tr></table></center></td></tr></table></center>\r
-</td>\r
-<td>\r
-<center><table><tr><td><center><table><tr><td>\r
-<center><b>fc(2)</b><center>\r
-</td></tr></table></center></td></tr></table></center>\r
-</td>\r
-<td>\r
-<center><table><tr><td><center><table><tr><td>\r
-<center><b>cc(2)</b><center>\r
-</td></tr></table></center></td></tr></table></center>\r
-</td>\r
-</tr>\r
-<tr>\r
-<td>\r
-<center><table><tr><td><center><table><tr><td>\r
-<center><b>0</b><center>\r
-</td></tr></table></center></td></tr></table></center>\r
-</td>\r
-<td>\r
-<center><table><tr><td><center><table><tr><td>\r
-<center><b>0</b><center>\r
-</td></tr></table></center></td></tr></table></center>\r
-</td>\r
-<td>\r
-<center><table><tr><td><center><table><tr><td>\r
-<center><b>1</b><center>\r
-</td></tr></table></center></td></tr></table></center>\r
-</td>\r
-</tr>\r
-</table>\r
-</center>\r
-</td>\r
-\r
-\r
-<td>\r
-<center><table>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-<tr>\r
-<td><b>]</b></td>\r
-</tr>\r
-</table></center>\r
-</td>\r
-\r
-</tr>\r
-\r
-</table>\r
-</center>\r
-\r
-<BR>Observe that this matrix is exactly the same as the one appearing in the original text file generated by the calibration tool \r
-Notice that <b>fc(1)</b> and <b>fc(2)</b> are the focal\r
-distance (a unique value if expressed in mm) expressed in units of horizontal and vertical\r
-pixels. Therefore, the camera model naturally handles non-square\r
-pixels. In addition, the coefficient <b>s</b> encodes the angle\r
-between the x and y sensor axes. Consequently, this generic model allows for non-rectangular pixels (altough this release of the software does not explicitly estimate the skew coefficient - future ones will). Some authors refer to that generic type of model as\r
-"affine distortion" model. \r
-\r
-<p><i>Convention: </i>The pixel coordinates are defined such that <b>[0;0]</b> is the\r
-upper left pixel of the image (the center of the pixel),\r
-<b>[nx-1;0]</b> is the upper right corner pixel, <b>[0;ny-1]</b> is\r
-the lower left corner pixel and <b>[nx-1;ny-1]</b> is the lower right\r
-corner pixel where <b>nx</b> and <b>ny</b> are the width and height of\r
-the image (for example <b>nx=640</b> and\r
-<b>ny=480</b>).\r
-<BR>\r
-<BR>\r
-\r
-For more information, refer to the <a href="calib_doc/index.html">tutorial page</a> on Camera Calibration and try the Matlab implementation provided with it.\r
-\r
-\r
-<BR><BR>\r
-\r
-<HR noshade>\r
-\r
-<br>\r
-<FONT SIZE=+3><a href="doc_calib.html" target="application window">Back to main camera calibration page</A></FONT>\r
-\r
-\r
-    <br><br>\r
-    <hr noshade size=2 width=100%>\r
-    <H3>\r
-      <A NAME="Bottom"></A><A HREF="#Top">Back to Top<IMG SRC="up.gif" BORDER=0 HEIGHT=26 WIDTH=30></A></H3>\r
-\r
-\r
-  </BODY>\r
-</HTML>\r