Chessboard detection: Difference between revisions

Content deleted Content added
WP:CHECKWIKI error fix #69. ISBN problem. Do general fixes and cleanup if needed. - using AWB
m Replace magic links with templates per local RfC and MediaWiki RfC
Line 7:
==Chessboard camera calibration==
 
A classical problem in computer vision is [[3D reconstruction from multiple images|three-dimensional (3D) reconstruction]], where one seeks to infer 3D structure about a scene from two-dimensional (2D) images of it.<ref name=forsyth2002>D. Forsyth and J. Ponce. ''Computer Vision: A Modern Approach''. Prentice Hall. (2002). {{ISBN |978-0262061582}}.</ref> Practical cameras are complex devices, and [[photogrammetry]] is needed to model the relationship between image sensor measurements and the 3D world. In the standard [[pinhole camera model]], one models the relationship between world coordinates <math>\mathbf{X}</math> and image (pixel) coordinates <math>\mathbf{x}</math> via the [[3D projection|perspective transformation]]
 
:<math>
Line 15:
where <math>\mathbb{P}^n</math> is the [[projective space]] of dimension <math>n</math>.
 
In this setting, [[Camera resectioning|camera calibration]] is the process of estimating the parameters of the <math>3 \times 4</math> matrix <math>M = K \begin{bmatrix} R & t \end{bmatrix}</math> of the perspective model. Camera calibration is an important step in the computer vision pipeline because many subsequent algorithms require knowledge of camera parameters as input.<ref name=szeliski2010>R. Szeliski. ''Computer Vision: Algorithms and Applications''. Springer Science and Business Media. (2010). {{ISBN |978-1848829350}}.</ref> Chessboards are often used during camera calibration because they are simple to construct, and their planar grid structure defines many natural [[Interest point detection|interest points]] in an image. The following two methods are classic calibration techniques that often employ chessboards.
 
===Direct linear transformation===
 
Direct linear transformation (DLT) calibration uses correspondences between world points and camera image points to estimate camera parameters. In particular, DLT calibration exploits the fact that the perspective pinhole camera model defines a set of similarity relations that can be solved via the [[direct linear transformation]] algorithm.<ref name=faugeras1993>O. Faugeras. ''Three-dimensional Computer Vision''. MIT Press. (1993). {{ISBN |978-0262061582}}.</ref> To employ this approach, one requires accurate coordinates of a non-degenerate set of points in 3D space. A common way to achieve this is to construct a camera calibration rig (example below) built from three mutually perpendicular chessboards. Since the corners of each square are equidistant, it is straightforward to compute the 3D coordinates of each corner given the width of each square. The advantage of DLT calibration is its simplicity; arbitrary cameras can be calibrated by solving a single [[System of linear equations#Homogeneous systems|homogeneous linear system]]. However, the practical use of DLT calibration is limited by the necessity of a 3D calibration rig and the fact that extremely accurate 3D coordinates are required to avoid [[Numerical stability|numerical instability]].<ref name=forsyth2002/>
 
{{multiple image
Line 85:
===Lines===
 
Lines are another natural local [[Feature (computer vision)|image feature]] exploited in many computer vision systems. Geometrically, the set of all lines in a 2D image can be parametrized by [[Polar coordinate system|polar coordinates]] <math>(\rho,\theta)</math> describing the distance and angle, respectively, of their [[Normal (geometry)|normal vectors]] with respect to the origin. The discrete [[Hough transform]] exploits this idea by transforming a spatial image into a matrix in <math>(\rho,\theta)</math>-space whose <math>(i,j)</math>-th entry counts the number of image edge points that lie on the line parametrized by <math>(\rho_i,\theta_j)</math>.<ref name=shapiro2001>L. Shapiro and G. Stockman. ''Computer Vision''. Prentice-Hall, Inc. (2001). {{ISBN |978-0130307965}}</ref><ref name=duda1972>R. Duda and P. Hart. "Use of the Hough transformation to detect lines and curves in pictures," Comm. ACM, vol. 15, pp. 11-15 (1972).</ref><ref name=hough1959>P. Hough. "Machine analysis of bubble chamber pictures." Proc. Int. Conf. High Energy Accelerators and Instrumentation. (1959).</ref> As such, one can detect lines in an image by simply searching for [[Maxima and minima|local maxima]] of its discrete Hough transform.
 
The grid structure of a chessboard naturally defines two sets of parallel lines in an image of it. Therefore, one expects that line detection algorithms should successfully detect these lines in practice. Indeed, the following figure demonstrates Hough transform-based line detection applied to a perspective-transformed [[:Image:Perspective chessboard.png|chessboard image]]. Clearly, the Hough transform is able to accurately detect the lines induced by the board squares.