Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

Are camera, projector, and camera–projector calibrations different?

Open Access Open Access

Abstract

Structured light projection systems have become a referent in three-dimensional optical metrology. Calibration of the cameras and projectors of these systems is one of the most critical procedures to achieve high-accuracy measurements. However, the calibration process requires some clarifications for adequate experimental implementation. For instance, it is typically assumed that the calibration of a camera–projector pair differs from calibrating a camera, and the calibration of a projector is possible only with an attached auxiliary camera. This paper presents a unified methodology for camera, projector, and camera–projector calibrations. Experimental results are discussed, providing practical insights into how structured light systems are calibrated. The MATLAB code and data employed in this study are available.

© 2023 Optica Publishing Group under the terms of the Optica Open Access Publishing Agreement

1. INTRODUCTION

Structured light systems for three-dimensional (3D) imaging have succeeded in diverse fields, including engineering [1], medicine [2], forensics [3], and heritage preservation [4]. Structured light systems employ a projector to illuminate the object using a known pattern [5], then a camera captures the resultant images, and the 3D shape of the object is retrieved by triangulation [6]. In this process, the camera and projector parameters need to be accurately known [7].

In a simplified manner, a camera or a projector can be considered a black box device, as shown in Fig. 1(a). The device’s input is a point ${\boldsymbol p}$ of the 3D space, and the output is the corresponding point $\boldsymbol \mu$ of the image or slide plane. The primary aim of calibration is to specify a mathematical model and its parameters to reproduce accurately the physical device of interest [8]. The general calibration scheme consists of adjusting the model to minimize the output error, also known as reprojection error, as shown in Fig. 1(b). The calibration is influenced by three main aspects [9]: the imaging model, the accuracy of the input and output points, and the optimization method.

 figure: Fig. 1.

Fig. 1. (a) Camera or projector considered as a black box receiving points of the 3D space and returning points of the image of the slide plane. (b) Device calibration by estimating the model parameters that minimize the output (reprojection) error. (c) Calibration using a 3D target. (d) Calibration using a 2D target at different poses.

Download Full Size | PDF

Imaging model. This model is aimed to describe the imaging process with high fidelity while remaining as simple as possible [10]. The pinhole model is widely used because it reproduces most typical low-distortion devices acceptably [11]. In addition, the pinhole linearity permits the design of simple parameter estimation algorithms [12], whose outcomes are also useful as an initial guess to fit more advanced models. Some advanced imaging models are distortion lens compensation [13], distorted pinhole [14], fish-eye [15], vision ray [16], division [17], and pixel-wise rational [18].

Point correspondences. Matched input and output points are known as point correspondences and must be precisely determined for accurate calibration [19]. Single-shot calibration is possible using a 3D target [20] since spatially distributed points become available, as shown in Fig. 1(c). However, 3D targets are bulky and expensive; moreover, the determination of point correspondences is challenging due to self-occlusion [21]. A more practical approach consists of using a 2D target placed at several arbitrary positions [22], as shown in Fig. 1(d). Typical 2D targets are checkerboards, circle arrays, circular points, and square-radial patterns [2325].

Optimization method. The most widely used optimization method for calibration is the least squares [26]. This method minimizes the sum of the squared output error, allowing the development of simple algorithms and stable computations. Sophisticated methods such as particle swarm optimization [27], genetic algorithms [28], and machine learning [29] are more robust to point location uncertainty and avoid local sub-optimality at the price of high computational complexity.

Physically, cameras capture light rays while projectors emit light rays. However, despite their reverse operation, cameras and projectors can be calibrated with the same methodology. Nonetheless, the specific implementation requires some considerations that can be confusing. For instance, it is erroneously understood that the calibration of a projector is possible only with an attached auxiliary camera; even more, the calibration of a camera–projector pair is quite different from the independent calibration of a camera or a projector.

In this paper, we present a simple calibration methodology by considering cameras and projectors as generic devices. The calibration process is illustrated experimentally by calibrating a camera and a projector individually. Then, we show that camera–projector calibration is equivalent to the individual calibration of the devices but performed simultaneously and with the advantage of automatically capturing point correspondences for projection calibration. The results provide useful insights into how a structured light system is calibrated. The MATLAB code and data employed in this study are available in (Code 1, Ref. [30]). This paper is organized as follows. First, the theoretical calibration principles are reviewed in Section 2. Next, Section 3 illustrates experimentally the proposed methodology by camera, projector, and camera–projector calibrations. Finally, the conclusion is presented in Section 4.

2. THEORY

For illustration purposes, the classical pinhole model, a checkerboard target, and least squares optimization criterion are employed. However, the general calibration process remains valid even considering alternative models, other calibration targets, and more sophisticated optimization methods.

A. Pinhole Model

In this model, a point ${\boldsymbol p} = [x,y,z{]^T}$ of the 3D space and its correspondence $\boldsymbol \mu$ on the image or slide plane are related as

$${\boldsymbol \mu} = {{\cal H}^{- 1}}[D{\cal H}[{\boldsymbol p}]],$$
where ${\cal H}$ is the homogeneous coordinate operator [31], and
$$D = \lambda K\left[\!{\begin{array}{*{20}{c}}{{R^T},}&{- {R^T}{\boldsymbol t}}\end{array}} \!\right]$$
is the $3 \times 4$ matrix of the device, $\lambda \ne 0$ is an arbitrary scalar utilized to introduce the invariance to multiplication by a non-zero scalar (uniqueness up to scale), $K$ is the upper triangular matrix of intrinsic parameters, and $R$ and ${\boldsymbol t}$ are the rotation matrix and translation vector defining the orientation and position of the device, respectively [14].

B. Homography Estimation

Without loss of generality, we can assume that the flat calibration target is lying on plane $xy$ while the device moves freely. The input points can be represented by 2D vectors of the form ${\boldsymbol \rho} = [x,y{]^T}$. In this manner, an input ${\boldsymbol \rho}$ and its associated output $\boldsymbol \mu$ comprise a point correspondence, denoted by

$${\boldsymbol \rho} \leftrightarrow{\boldsymbol \mu},$$
which satisfies
$${\boldsymbol \mu} = {{\cal H}^{- 1}}[G{\cal H}[{\boldsymbol \rho}]],$$
where $G$, known as homography, is obtained in this analysis by removing the third column of $D$ (the $z$ component of the input is always zero), i.e.,  
$$G = \lambda K\left[{\begin{array}{*{20}{c}}{{{\bar {\boldsymbol r}}_1},}&{{{\bar {\boldsymbol r}}_2},}&{- {R^T}t}\end{array}} \right],$$
where ${\bar {\boldsymbol r}_1}$ and ${\bar {\boldsymbol r}_2}$ are the first two rows of $R$ [32]. A homography can be estimated from a set of point correspondences using the direct linear transformation method [33]. Consider the row-partition of the homography as
$$G = \left[{\begin{array}{*{20}{c}}{{g_{11}}}&\;\;{{g_{12}}}&\;\;{{g_{13}}}\\{{g_{21}}}&\;\;{{g_{22}}}&\;\;{{g_{23}}}\\{{g_{31}}}&\;\;{{g_{32}}}&\;\;{{g_{33}}}\end{array}} \right] = \left[{\begin{array}{*{20}{c}}{\bar {\boldsymbol g}_1^T}\\[3pt]{\bar {\boldsymbol g}_2^T}\\[3pt]{\bar {\boldsymbol g}_3^T}\end{array}} \right].$$

Then, given the set of $m$ point correspondences

$${{\boldsymbol \rho} _i} \leftrightarrow {{\boldsymbol \mu} _i},\quad i = 1, \cdots ,m,$$
the rows of the homography matrix are estimated by
$$A\bar {\boldsymbol g} = {{\textbf{0}}_{2m}},$$
where $\bar {\boldsymbol g} = [\bar {\boldsymbol g}_1^T,\bar {\boldsymbol g}_2^T,\bar {\boldsymbol g}_3^T{]^T}$ is a $9 \times 1$ vector with the rows of $G$, and matrix $A$ is constructed with the point correspondences as
$$A = \left[{\begin{array}{*{20}{c}}{{\cal H}{{[{{\boldsymbol \rho} _1}]}^T}}&\;\;{{\textbf{0}}_3^T}&\;\;{- {\mu _{x1}}{\cal H}{{[{{\boldsymbol \rho} _1}]}^T}}\\ \vdots &\;\; \vdots & \;\;\vdots \\{{\cal H}{{[{{\boldsymbol \rho} _m}]}^T}}&\;\;{{\textbf{0}}_3^T}&\;\;{- {\mu _{\textit{xm}}}{\cal H}{{[{{\boldsymbol \rho} _m}]}^T}}\\\\{{\textbf{0}}_3^T}&\;\;{{\cal H}{{[{{\boldsymbol \rho} _1}]}^T}}&\;\;{- {\mu _{y1}}{\cal H}{{[{{\boldsymbol \rho} _1}]}^T}}\\ \vdots & \;\;\vdots & \;\;\vdots \\{{\textbf{0}}_3^T}&\;\;{{\cal H}{{[{{\boldsymbol \rho} _m}]}^T}}&\;\;{- {\mu _{\textit{ym}}}{\cal H}{{[{{\boldsymbol \rho} _m}]}^T}}\end{array}} \right].$$

Although $\bar {\boldsymbol g}$ has nine entries, there are only eight free unknowns because of the uniqueness up to scale of $G$. Since a point correspondence provides two constraints, the number of correspondences required to estimate $\bar {\boldsymbol g}$ is

$$m \ge 4.$$

Equation (8) can be solved for $\bar {\boldsymbol g}$ using the singular value decomposition (SVD) method [34]. Specifically, if $A = {U_A}{S_A}V_A^T$ is the SVD of $A$, then the least squares solution for $\bar {\boldsymbol g}$ is the last column of ${V_A}$.

It is worth mentioning that the point correspondences must provide as much spatial information as possible for effective calibration. If the calibration target is excessively small, points ${{\boldsymbol \mu} _k}$ tend to cluster around a single point, making the homography estimation sensitive to noise. For this reason, a calibration target covering most of the image area while lying on the focus plane is recommended. Also, arranging the projector to illuminate approximately the same area of the calibration target is desirable. When the minima of four point correspondences are available, three of them must not be collinear.

C. Intrinsic Parameter Estimation

Consider that the device is placed in different positions and orientations, and the corresponding homography is estimated in each case. The resultant homographies will have the form

$${G_k} = {\lambda _k}K\left[{\begin{array}{*{20}{c}}{{{\bar {\boldsymbol r}}_{1,k}}}&{{{\bar {\boldsymbol r}}_{2,k}}}&{- R_k^T{{\boldsymbol t}_k}}\end{array}} \right],\quad k = 1, \cdots ,n.$$

Note that the first two columns of ${G_k}$ are of the form

$$\begin{split}{{{\boldsymbol g}_{1,k}}}&= {{\lambda _k}K{{\bar {\boldsymbol r}}_{1,k}},}\\[-3pt]{{{\boldsymbol g}_{2,k}}}&= {{\lambda _k}K{{\bar {\boldsymbol r}}_{2,k}}.}\end{split}$$

The third column of the homographies is omitted to remove the unknown ${{\boldsymbol t}_k}$. Also, since vectors ${\bar {\boldsymbol r}_{1,k}}$ and ${\bar {\boldsymbol r}_{2,k}}$ are rows of a rotation matrix, they can be removed by their orthonormality property, $\bar {\boldsymbol r}_{1,k}^T{\bar {\boldsymbol r}_{2,k}} = 0$ and $\bar {\boldsymbol r}_{1,k}^T{\bar {\boldsymbol r}_{1,k}} = \bar {\boldsymbol r}_{2,k}^T{\bar {\boldsymbol r}_{2,k}}$, leading to

$$\begin{split}{{\boldsymbol g}_{1,k}^TW{{\boldsymbol g}_{2,k}}}&= {0},\\[-3pt]{{\boldsymbol g}_{1,k}^TW{{\boldsymbol g}_{1,k}} - {\boldsymbol g}_{2,k}^TW{{\boldsymbol g}_{2,k}}}&= {0},\end{split}$$
where $W$ is known as the image of the absolute conic, given by
$$W = {K^{- T}}{K^{- 1}},$$
where ${K^{- T}}$ abbreviates ${({K^{- 1}})^T}$ or ${({K^T})^{- 1}}$. Since $W$ is symmetric, it has six unknowns, forming the vector
$${\boldsymbol w} = {\left[{\begin{array}{*{20}{c}}{{w_{11}}}&{{w_{22}}}&{{w_{33}}}&{{w_{23}}}&{{w_{13}}}&{{w_{12}}}\end{array}} \right]^T}.$$

The constraints given by Eq. (13) from the $n$ available homographies can be stacked to construct the system of linear equations

$$B{\boldsymbol w} = {{\textbf{0}}_{2n}},$$
where
$$B = \left[{\begin{array}{*{20}{c}}{{\boldsymbol g}_{1,1}^TF({{\boldsymbol g}_{2,1}})}\\ \vdots \\{{\boldsymbol g}_{1,n}^TF({{\boldsymbol g}_{2,n}})}\\[6pt]{{\boldsymbol g}_{1,1}^TF({{\boldsymbol g}_{1,1}}) - {\boldsymbol g}_{2,1}^TF({{\boldsymbol g}_{2,1}})}\\ \vdots \\{{\boldsymbol g}_{1,n}^TF({{\boldsymbol g}_{1,n}}) - {\boldsymbol g}_{2,n}^TF({{\boldsymbol g}_{2,n}})}\end{array}} \right],$$
and $F({\boldsymbol v})$ is a $3 \times 6$ block matrix defined for any vector ${\boldsymbol v} = [a,b,c{]^T}$ as
$$\!\!\!\!F({\boldsymbol v}) = \left[{\begin{array}{*{20}{c}}{{\rm{diag}}({\boldsymbol v}),}&{\Gamma ({\boldsymbol v})}\end{array}} \right],\quad {\rm{where}}\quad \Gamma ({\boldsymbol v}) = \left[{\begin{array}{*{20}{c}}0&c&b\\c&0&a\\b&a&0\end{array}} \right],$$
and ${\rm{diag}}({\boldsymbol v})$ is the diagonal matrix with the elements of ${\boldsymbol v}$. Since vector ${\boldsymbol w}$ has six unknowns and each homography provides two rows in the regression matrix $B$, the number of homographies required to estimate ${\boldsymbol w}$ is
$$n \ge 3.$$

Equation (16) can be solved for ${\boldsymbol w}$ using the SVD method [34]. Then, matrix $W$ is obtained from the solution vector ${\boldsymbol w}$. Next, the Cholesky factorization of $W$ is performed, obtaining ${K^{- 1}}$, which is inverted to obtain the required intrinsic parameter matrix $K$. Theoretically, matrix $W$ in Eq. (14) is symmetric positive definite, and its Cholesky factorization exists. However, $W$ is obtained from the solution of the homogeneous matrix Eq. (16), where ${-}{\boldsymbol w}$ is also a solution, in which case, the Cholesky factorization will fail. In that case, the factorization must be retried using ${-}{\boldsymbol W}$.

Note from Eq. (12) that only the orientation is relevant for estimating $K$ (the position is on the unused third column of ${G_k}$). This peculiarity is helpful because imaging lenses introduce blur to scene points far from the focus plane. Accordingly, rotating the calibration target from the focus plane with positive and negative angles around the $x$, $y$, and $z$ axes is recommended, as shown in Fig. 2(a). For devices with large depths of field, the position can be varied to capture the calibration target into the whole workspace volume.

 figure: Fig. 2.

Fig. 2. (a) Illustrative poses ${P_1}, \cdots ,{P_5}$ of the calibration target around the focus plane for intrinsic parameter estimation. Precise control of position and orientation is not required. (b) True and apparent device poses obtained from the homographies $G$ and ${-}G$, respectively. Note that the captured/emitted light rays are at the back of the device in the apparent pose.

Download Full Size | PDF

 figure: Fig. 3.

Fig. 3. (a) Point correspondences obtained by moving freely the reference plane, the device, or both. (b) Calibration by the homography-based parameter estimation approach. (c) Checkerboard on the reference plane for camera calibration. (d) Checkerboard on the slide plane for projector calibration.

Download Full Size | PDF

D. Extrinsic Parameter Estimation

Once matrix $K$ is known, the extrinsic parameters are estimated from the intrinsic-free homographies

$${H_k} = {K^{- 1}}{G_k},$$
whose columns are given explicitly as
$$\left[{\begin{array}{*{20}{c}}{{{\boldsymbol h}_{1,k}}}&{{{\boldsymbol h}_{2,k}}}&{{{\boldsymbol h}_{3,k}}}\end{array}} \right] = \left[{\begin{array}{*{20}{c}}{{\lambda _k}{{\bar {\boldsymbol r}}_{1,k}}}&{{\lambda _k}{{\bar {\boldsymbol r}}_{2,k}}}&{- {\lambda _k}R_k^T{{\boldsymbol t}_k}}\end{array}} \right],$$
where ${{\boldsymbol h}_{1,k}}$, ${{\boldsymbol h}_{2,k}}$, and ${{\boldsymbol h}_{3,k}}$ are the columns of ${H_k}$. Column ${{\boldsymbol h}_{3,k}}$ is not considered to estimate the rotation matrix to avoid the influence of the unknown translation ${{\boldsymbol t}_k}$. A coarse estimation of the rotation matrix is given as
$$\begin{split}\tilde R_k^T = \left[{\begin{array}{*{20}{c}}{{{\boldsymbol h}_{1,k}}}&{{{\boldsymbol h}_{2,k}}}&{{{\boldsymbol h}_{1,k}} \times {{\boldsymbol h}_{2,k}}}\end{array}} \right]\\ = \left[{\begin{array}{*{20}{c}}{{\lambda _k}{{\bar {\boldsymbol r}}_{1,k}}}&{{\lambda _k}{{\bar {\boldsymbol r}}_{2,k}}}&{\lambda _k^2{{\bar {\boldsymbol r}}_{3,k}}}\end{array}} \right].\end{split}$$

Note that the columns of ${\tilde R_k}$ are not unit vectors because of scale factors ${\lambda _k}$ and $\lambda _k^2$. Also, the columns of ${\tilde R_k}$ might not be orthogonal because of noise and errors in the homography estimation process. Let ${\tilde R_k} = {U_R}{S_R}V_R^T$ be the SVD of ${\tilde R_k}$. Since all the singular values of a rotation matrix are unity, the orthogonal matrix closest to ${\tilde R_k}$ in the least squares sense is

$${R_k} = {U_R}V_R^T.$$

When rotation matrix ${R_k}$ is known, scalar ${\lambda _k}$ is estimated using the least-squares method as

$${\lambda _k} = (\bar {\boldsymbol r}_{1,k}^T{{\boldsymbol h}_{1,k}} + \bar {\boldsymbol r}_{2,k}^T{{\boldsymbol h}_{2,k}})/2,$$
and then the translation vector is obtained as
$${{\boldsymbol t}_k} = - {R_k}{{\boldsymbol h}_{3,k}}/{\lambda _k}.$$

Even though the homography is invariant to the multiplication by a scalar, the extrinsic parameters will be different if the multiplying scalar is negative. When this occurs, the camera seems to be under the reference plane and capturing light rays from the back, as shown in Fig. 2(b). This case is easily detected by checking whether the $z$ component of ${{\boldsymbol t}_k}$ is negative and correcting by using ${-}G$, which is equal to changing the sign of the first two rows of the rotation matrix and the $z$ component of  ${{\boldsymbol t}_k}$.

E. Checkerboard Location and Detection

Figures 3(a) and 3(b) depict the general scheme of the calibration process, and the MATLAB implementation is provided in (Code 1, Ref. [30]). The calibration process does not distinguish whether the device is a camera or a projector. However, both the location of the checkerboard and the registration of point correspondences differ for camera and projector calibrations, as shown in Figs. 3(c) and 3(d).

1. Camera Calibration

For camera calibration, the checkerboard is placed on the reference plane and captured by the camera, as shown in Fig. 3(c). In this manner, points ${{\boldsymbol \rho} _i}$ on the reference plane are known from the checkerboard design, while points ${{\boldsymbol \mu} _i}$ are extracted from the image by automatic checkerboard detection algorithms [35]. Therefore, the required point correspondences can be obtained accurately without user intervention.

2. Projector Calibration

For projector calibration, the checkerboard is displayed on the slide plane to illuminate the reference plane, as shown in Fig. 3(d). In this case, points ${{\boldsymbol \mu} _i}$ on the slide plane are known from the checkerboard design, while points ${{\boldsymbol \rho} _i}$ on the reference plane need to be registered.

The direct approach for registering points of the reference plane consists of manual coordinate measurement. Alternatively, an auxiliary (uncalibrated) camera can be employed as follows. A checkerboard is placed on the reference plane to obtain the homography ${G_a}$ that relates the reference and image planes, as given by Eq. (4) [7]. Then, for any given point $\boldsymbol \mu$ of the image plane, corresponding point ${\boldsymbol \rho}$ on the reference plane is computed by inverse homography $G_a^{- 1}$ as

$${\boldsymbol \rho} = {{\cal H}^{- 1}}[G_a^{- 1}{\cal H}[{\boldsymbol \mu}]].$$

Thus, when the projector illuminates the reference plane, the camera captures the resultant scene, and the image is processed for automatic checkerboard detection. Then, the obtained checkerboard points ${{\boldsymbol \mu} _i}$ are “backprojected” by Eq. (26), obtaining the required points ${{\boldsymbol \rho} _i}$ for projector calibration.

3. Camera–Projector Calibration

Camera–projector calibration requires detecting two superposed checkerboards, one located on the reference plane and another displayed on the slide plane. These two checkerboards can be detected simultaneously using different colors [36]. Suppose the checkerboards are yellow and cyan for the reference and slide planes, respectively. The captured image will provide the two checkerboards separately in red and blue color channels. In this manner, the point correspondences required to calibrate the camera and the projector are available by automatic image processing procedures [35].

F. Supplementary Remarks

Estimation refinement. The presented calibration methodology follows an estimation sequence (first ${G_k}$, next $K$, then ${R_k}$, and finally ${{\boldsymbol t}_k}$), where errors can be accumulated. A further refinement to fit all the parameters together is recommended. For example, the parameters obtained by the presented methodology can be used as the initial guess for bundle adjustment [37].

Checkerboard or device movement. In Section 2, the reference checkerboard was assumed to be on the $xy$ plane of the global frame. Since global frames are usually considered absolute and static, it is generally accepted that the checkerboard is fixed while the device is moving. However, the calibration exploits the relative pose between the reference checkerboard and the device. Thus, the checkerboard, the device, or both can move freely. Remember, however, that the device’s pose will be given with respect to the reference checkerboard because it has attached the global frame.

Axis-angle representation of rotations. A 3D rotation matrix has nine elements but only three free parameters. That redundancy is difficult to handle by further estimation refinement. Axis-angle representation is more convenient for 3D rotations because of its inherent numerical stability and compact form (a vector with three elements). The axis-angle representation of a 3D rotation is given by the vector

$${\boldsymbol r} = {\left[{\begin{array}{*{20}{c}}{{r_1}}&{{r_2}}&{{r_3}}\end{array}} \right]^T} = \theta \hat {\boldsymbol l},$$
where $\theta$ is the rotation angle, and $\hat {\boldsymbol l}$ is a unit vector defining the rotation axis. Rotation matrix $R$ and the associated rotation vector ${\boldsymbol r}$ are related by the Rodrigues formula [11].

Pixel coordinates normalization. The accepted unit of length in computer vision is the pixel. However, since the resolution of modern cameras and projectors overcomes thousands of pixels, the pixel unit is not always convenient because of the induced numerical instability. For this reason, pixel coordinate normalization is recommended [38]. Let $\{{{\boldsymbol u}_1}, \cdots ,{{\boldsymbol u}_n}\}$ be a set of $n$ points on the plane. The standard isotropic normalization translates the centroid to the origin and applies a scaling such that the average distance is the root square of two. The normalized points are computed as

$${\hat {\boldsymbol u}_k} = {{\cal H}^{- 1}}[T{\cal H}[{{\boldsymbol u}_k}]],\quad T = \left[{\begin{array}{*{20}{c}}{{\textit{sI}_2}}&{- \textit{sc}}\\[4pt]{{\textbf{0}}_2^T}&1\end{array}} \right],$$
where ${I_2}$ is the $2 \times 2$ identity matrix, and
$${\boldsymbol c} = ({{\boldsymbol u}_1} + \cdots + {{\boldsymbol u}_1})/n,\quad {\rm{(centroid)}},$$
$$a = (\parallel\! {{\boldsymbol u}_1} - {\boldsymbol c}\!\parallel + \cdots + \parallel \!{{\boldsymbol u}_1} - {\boldsymbol c}\!\parallel)/n,\quad {\rm{(average}}\;{\rm{distance)}},$$
$$s = \sqrt 2 /a,\quad {\rm{(standard}}\;{\rm{isotropic}}\;{\rm{scaling)}}.$$

For the image/slide plane, a simpler and intuitive normalization can be applied such that the center is in the middle of the image/slide, the range along the larger side is $[- 1,1]$, and the aspect ratio is preserved. Assuming the size of the image/slide is $M \times N$ pixels, $M \lt N$, the centroid and scaling are

$${\boldsymbol c} = [N + 1,M + {1]^T}/2,$$
$$s = 2/(N - 1).$$

3. EXPERIMENTAL CALIBRATION EXAMPLES

Here, the presented calibration methodology is illustrated experimentally. A color camera (iDS UI-3880CP-C-HQ, $3088 \times 2076$ pixels, and 6 mm focal length) and a portable projector (Kodak Luma 150, $1280 \times 720$ pixels) were utilized.

A. Camera Calibration

A hard clipboard covered with a black and white $7 \times 10$ checkerboard (square size of $15 \times 15\,\,{\rm{mm}}$) was used as the reference plane, as shown in Fig. 4(a). Then, the clipboard was moved at $n = 10$ different poses while the camera captured the resultant images. Figure 4(b) shows the first five captured images. Next, the $m = 54$ checkerboard inner corners were detected, obtaining points ${{\boldsymbol \mu} _{i,k}}$. Afterward, points ${{\boldsymbol \rho} _i}$ on the reference plane were replicated $n$ times to match feature points ${{\boldsymbol \mu} _{i,k}}$ and execute the calibration method. The estimated parameters are given in Table 1 (first data row).

 figure: Fig. 4.

Fig. 4. (a) Camera calibration setup with the checkerboard on the reference plane and (b) five captured images with checkerboard points detected automatically. (c) Projector calibration setup with the checkerboard on the slide plane and (d) five millimetric gridded papers with checkerboard points registered manually. (e) Camera–projector calibration setup with a cyan checkerboard on the slide plane to illuminate a yellow checkerboard on the reference plane and (f)–(h) five captured color images and the red and blue color channels, respectively.

Download Full Size | PDF

Tables Icon

Table 1. Estimated Parametersa

B. Projector Calibration

A black and white $7 \times 10$ checkerboard (rectangle size of $102 \times 128$ pixels) was displayed by the projector to illuminate a hard clipboard covered with millimetric gridded paper, as shown in Fig. 4(c). The $m = 54$ inner corners of the projected checkerboard were marked manually on the gridded paper for each of the $n = 10$ free poses of the clipboard, obtaining points ${{\boldsymbol \rho} _{i,k}}$. Figure 4(d) shows five sets of the points registered on the clipboard. Next, points ${{\boldsymbol \mu} _i}$ of the displayed checkerboard were replicated $n$ times to match ${{\boldsymbol \rho} _{i,k}}$ and execute the calibration method. The estimated parameters are given in Table 1 (second data row).

C. Camera–Projector Calibration

The color of the checkerboards was set to yellow (on the reference plane) and cyan (on the slide plane), as shown in Fig. 4(e). Then, the clipboard was moved at $n = 10$ different poses while the camera was capturing the resultant color images, as shown in Fig. 4(f). The two checkerboards were recovered from the red and blue channels of the captured images, as shown in Figs. 4(g) and 4(h). The $m = 54$ points of the $n$ checkerboards on the red channel were detected, obtaining points ${\boldsymbol \mu}_{i,k}^{\rm{red}}$. Similarly, points ${\boldsymbol \mu}_{i,k}^{\rm{blue}}$ were obtained from the checkerboards on the blue channel. Next, points ${{\boldsymbol \rho} _i}$ of the checkerboard on the reference plane were replicated $n$ times to match points ${\boldsymbol \mu}_{i,k}^{\rm{blue}}$ and perform camera calibration. The estimated parameters are given in Table 1 (third data row). The homographies $G_k^{\rm{blue}}$ obtained during camera calibration were employed to “backproject” points ${\boldsymbol \mu}_{i,k}^{\rm{red}}$ to the reference plane as

$${\boldsymbol \rho} _{i,k}^{\rm{red}} = {{\cal H}^{- 1}}[G_k^{\rm{blue}}{\cal H}[{\boldsymbol \mu} _{i,k}^{\rm{red}}]].$$

Then, points ${{\boldsymbol \mu} _i}$ of the checkerboard on the projector slide plane were replicated $n$ times to match ${\boldsymbol \rho} _{i,k}^{\rm{red}}$ and perform the projector calibration. The estimated parameters are given in Table 1 (fourth data row).

 figure: Fig. 5.

Fig. 5. Reprojection error from the experimental calibration of the (a) camera and (b) projector.

Download Full Size | PDF

D. Reprojection Error and Accuracy

The estimated parameters were employed to reproject the calibration checkerboard points and then compute the difference to the detected correspondences. The resultant reprojection error is shown in Fig. 5. Table 1 shows that calibration is comparable regardless of whether the devices were calibrated independently or simultaneously. Also, Fig. 5(a) shows that the camera parameters have similar accuracy in independent and simultaneous calibration. In contrast, obtaining the projector parameters by camera–projector calibration is much more accurate than independent projector calibration; see Fig. 5(b). This occurs because the dispersion is influenced by the resolution of the gridded paper used to register correspondences. Improving the projection calibration accuracy by manual point registration with a sub-millimetric resolution is impractical and more susceptible to human errors. For this reason, projector calibration is usually performed using an auxiliary camera to obtain point correspondences with more accuracy and without human intervention. Furthermore, if the camera and projector are elements of a structured light projection system, the camera is an auxiliary for the projector, but at the same time, it is being calibrated by applying camera–projector calibration.

4. CONCLUSIONS

Calibrations of cameras, projectors, and camera–projector pairs follow the same methodology. First, point correspondences between the reference and image/slide planes are provided. Then, the device parameters are estimated using an appropriate imaging model and optimization method. However, the experimental implementation requires some considerations about where the checkerboard is located and how the correspondences are detected.

The checkerboard is on the reference plane for camera calibration, and the correspondences can be obtained automatically and accurately by image processing algorithms. For projector calibration, the checkerboard is on the slide plane, and the correspondences on the reference plane are registered manually or by an auxiliary camera. For camera–projector calibration, the camera being calibrated is also an auxiliary for the projector, the two checkerboards (on the reference and slide planes) are detected simultaneously using different colors, and all point correspondences are obtained accurately by automatic image processing algorithms.

The camera, projector, and camera–projector calibrations were illustrated experimentally. The results highlighted the advantages of camera–projector calibration regarding the automatic detection of point correspondences and higher accuracy for projector parameter estimation. Accordingly, despite the independent calibration ability, the device parameters of a structured light system are estimated using camera–projector calibration.

Funding

Consejo Nacional de Humanidades Ciencias y Tecnologías (CONAHCYT), Fondo Sectorial de Investigación para la Educación (Basic Science A1-S-28112, Basic Science and/or Frontier Science 320890, Catedras-880); Instituto Politécnico Nacional (SIP-20230483).

Acknowledgment

The authors are grateful to the anonymous reviewers for their valuable comments and recommendations for improving the presentation of this work.

Disclosures

The authors declare no conflicts of interest.

Data availability

MATLAB code, test images, and data underlying the results presented in this paper are available in Code 1 (Ref. [30]).

REFERENCES

1. L. Yang, E. Li, T. Long, J. Fan, and Z. Liang, “A novel 3-D path extraction method for arc welding robot based on stereo structured light sensor,” IEEE Sens. J. 19, 763–773 (2019). [CrossRef]  

2. A. N. Perez, K. F. Sharif, E. Guelfi, S. Li, A. Miller, K. Prasad, R. J. Sinard, J. S. Lewis, and M. C. Topf, “Ex vivo 3D scanning and specimen mapping in anatomic pathology,” J. Pathol. Inform 14, 100186 (2023). [CrossRef]  

3. T. Thompson and P. Norris, “A new method for the recovery and evidential comparison of footwear impressions using 3D structured light scanning,” Sci. Justice 58, 237–243 (2018). [CrossRef]  

4. L. Song, X. Li, Y.-G. Yang, X. Zhu, Q. Guo, and H. Liu, “Structured-light based 3D reconstruction system for cultural relic packaging,” Sensors 18, 2981 (2018). [CrossRef]  

5. J. Salvi, S. Fernandez, T. Pribanic, and X. Llado, “A state of the art in structured light patterns for surface profilometry,” Pattern Recogn. 43, 2666–2680 (2010). [CrossRef]  

6. R. Juarez-Salazar, G. A. Rodriguez-Reveles, S. Esquivel-Hernandez, and V. H. Diaz-Ramirez, “Three-dimensional spatial point computation in fringe projection profilometry,” Opt. Laser Eng. 164, 107482 (2023). [CrossRef]  

7. D. Moreno and G. Taubin, “Simple, accurate, and robust projector-camera calibration,” in International Conference on 3D Imaging, Modeling, Processing, Visualization Transmission (2012), pp. 464–471.

8. S. Feng, C. Zuo, L. Zhang, T. Tao, Y. Hu, W. Yin, J. Qian, and Q. Chen, “Calibration of fringe projection profilometry: a comparative review,” Opt. Laser Eng. 143, 106622 (2021). [CrossRef]  

9. J. Yu and F. Da, “Calibration refinement for a fringe projection profilometry system based on plane homography,” Opt. Laser Eng. 140, 106525 (2021). [CrossRef]  

10. Z. Tang, R. G. von Gioi, P. Monasse, and J.-M. Morel, “A precision analysis of camera distortion models,” IEEE Trans. Image Process. 26, 2694–2704 (2017). [CrossRef]  

11. R. Hartley and A. Zisserman, Multiple View Geometry in Computer Vision, 2nd ed. (Cambridge University, 2003).

12. O. D. Faugeras, Q. T. Luong, and S. J. Maybank, “Camera self-calibration: theory and experiments,” in European Conference on Computer Vision (1992), pp. 321–334.

13. D. C. Brown, “Close-range camera calibration,” Photogramm. Eng. 37, 855–866 (1971).

14. R. Juarez-Salazar, J. Zheng, and V. H. Diaz-Ramirez, “Distorted pinhole camera modeling and calibration,” Appl. Opt. 59, 11310–11318 (2020). [CrossRef]  

15. J. Kannala and S. S. Brandt, “A generic camera model and calibration method for conventional, wide-angle, and fish-eye lenses,” IEEE Trans. Pattern Anal. Mach. Intell. 28, 1335–1340 (2006). [CrossRef]  

16. J. Bartsch, Y. Sperling, and R. B. Bergmann, “Efficient vision ray calibration of multi-camera systems,” Opt. Express 29, 17125–17139 (2021). [CrossRef]  

17. A. W. Fitzgibbon, “Simultaneous linear estimation of multiple view geometry and lens distortion,” in IEEE Computer Society Conference on Computer Vision and Pattern Recognition (2001), pp. I125–I132.

18. R. Vargas, L. A. Romero, S. Zhang, and A. G. Marrugo, “Pixel-wise rational model for a structured light system,” Opt. Lett. 48, 2712–2715 (2023). [CrossRef]  

19. H.-T. Chen, “Geometry-based camera calibration using five-point correspondences from a single image,” IEEE Trans. Circuits Syst. Video Technol. 27, 2555–2566 (2017). [CrossRef]  

20. D. Samper, J. Santolaria, F. J. Brosed, A. C. Majarena, and J. J. Aguilar, “Analysis of Tsai calibration method using two- and three-dimensional calibration objects,” Mach. Vis. Appl. 24, 117–131 (2013). [CrossRef]  

21. Z. Zhang, “Camera calibration with one-dimensional objects,” IEEE Trans. Pattern Anal. Mach. Intell. 26, 892–899 (2004). [CrossRef]  

22. Z. Zhang, “A flexible new technique for camera calibration,” IEEE Trans. Pattern Anal. Mach. Intell. 22, 1330–1334 (2000). [CrossRef]  

23. J. Mallon and P. F. Whelan, “Which pattern? Biasing aspects of planar calibration patterns and detection methods,” Pattern Recogn. Lett. 28, 921–930 (2007). [CrossRef]  

24. X. Meng and Z. Hu, “A new easy camera calibration technique based on circular points,” Pattern Recogn. 36, 1155–1164 (2003). [CrossRef]  

25. R. Juarez-Salazar and V. H. Diaz-Ramirez, “Homography estimation by two PClines Hough transforms and a square-radial checkerboard pattern,” Appl. Opt. 57, 3316–3322 (2018). [CrossRef]  

26. J. Salvi, X. Armangue, and J. Batlle, “A comparative review of camera calibrating methods with accuracy evaluation,” Pattern Recogn. 35, 1617–1635 (2002). [CrossRef]  

27. L. Deng, G. Lu, Y. Shao, M. Fei, and H. Hu, “A novel camera calibration technique based on differential evolution particle swarm optimization algorithm,” Neurocomputing 174, 456–465 (2016). [CrossRef]  

28. Q. Ji and Y. Zhang, “Camera calibration with genetic algorithms,” IEEE Trans. Syst. Man Cybern. A 31, 120–130 (2001). [CrossRef]  

29. S. El Ghazouali, A. Vissiere, L.-F. Lafon, M.-L. Bouazizi, and H. Nouira, “Optimised calibration of machine vision system for close range photogrammetry based on machine learning,” J. King Saud Univ. 34, 7406–7418 (2022). [CrossRef]  

30. R. Juarez-Salazar, “DevCalib: homography-based device calibration,” figshare, 2023, https://doi.org/10.6084/m9.figshare.23635968.

31. R. Juarez-Salazar and V. H. Diaz-Ramirez, “Operator-based homogeneous coordinates: application in camera document scanning,” Opt. Eng. 56, 070801 (2017). [CrossRef]  

32. V. H. Diaz-Ramirez, R. Juarez-Salazar, J. Zheng, J. E. Hernandez-Beltran, and A. Márquez, “Homography estimation from a single-point correspondence using template matching and particle swarm optimization,” Appl. Opt. 61, D63–D74 (2022). [CrossRef]  

33. S. Birchfield, Image Processing and Analysis (Cengage Learning, 2018).

34. G. Golub and C. Reinsch, “Singular value decomposition and least squares solutions,” Numer. Math. 14, 403–420 (1970). [CrossRef]  

35. M. Rufli, D. Scaramuzza, and R. Siegwart, “Automatic detection of checkerboards on blurred and distorted images,” in International Conference on Intelligent Robots and Systems (2008), pp. 3121–3126.

36. R. Juarez-Salazar and V. H. Diaz-Ramirez, “Flexible camera-projector calibration using superposed color checkerboards,” Opt. Laser Eng. 120, 59–65 (2019). [CrossRef]  

37. B. Triggs, P. F. McLauchlan, R. I. Hartley, and A. W. Fitzgibbon, “Bundle adjustment - a modern synthesis,” in Vision Algorithms: Theory and Practice (Springer, 2000), pp. 298–372.

38. R. I. Hartley, “In defense of the eight-point algorithm,” IEEE Trans. Pattern Anal. Mach. Intell. 19, 580–593 (1997). [CrossRef]  

Supplementary Material (1)

NameDescription
Code 1       Implementation of the calibration methodology, test images, and data sets reported.

Data availability

MATLAB code, test images, and data underlying the results presented in this paper are available in Code 1 (Ref. [30]).

30. R. Juarez-Salazar, “DevCalib: homography-based device calibration,” figshare, 2023, https://doi.org/10.6084/m9.figshare.23635968.

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (5)

Fig. 1.
Fig. 1. (a) Camera or projector considered as a black box receiving points of the 3D space and returning points of the image of the slide plane. (b) Device calibration by estimating the model parameters that minimize the output (reprojection) error. (c) Calibration using a 3D target. (d) Calibration using a 2D target at different poses.
Fig. 2.
Fig. 2. (a) Illustrative poses ${P_1}, \cdots ,{P_5}$ of the calibration target around the focus plane for intrinsic parameter estimation. Precise control of position and orientation is not required. (b) True and apparent device poses obtained from the homographies $G$ and ${-}G$, respectively. Note that the captured/emitted light rays are at the back of the device in the apparent pose.
Fig. 3.
Fig. 3. (a) Point correspondences obtained by moving freely the reference plane, the device, or both. (b) Calibration by the homography-based parameter estimation approach. (c) Checkerboard on the reference plane for camera calibration. (d) Checkerboard on the slide plane for projector calibration.
Fig. 4.
Fig. 4. (a) Camera calibration setup with the checkerboard on the reference plane and (b) five captured images with checkerboard points detected automatically. (c) Projector calibration setup with the checkerboard on the slide plane and (d) five millimetric gridded papers with checkerboard points registered manually. (e) Camera–projector calibration setup with a cyan checkerboard on the slide plane to illuminate a yellow checkerboard on the reference plane and (f)–(h) five captured color images and the red and blue color channels, respectively.
Fig. 5.
Fig. 5. Reprojection error from the experimental calibration of the (a) camera and (b) projector.

Tables (1)

Tables Icon

Table 1. Estimated Parametersa

Equations (34)

Equations on this page are rendered with MathJax. Learn more.

μ = H 1 [ D H [ p ] ] ,
D = λ K [ R T , R T t ]
ρ μ ,
μ = H 1 [ G H [ ρ ] ] ,
G = λ K [ r ¯ 1 , r ¯ 2 , R T t ] ,
G = [ g 11 g 12 g 13 g 21 g 22 g 23 g 31 g 32 g 33 ] = [ g ¯ 1 T g ¯ 2 T g ¯ 3 T ] .
ρ i μ i , i = 1 , , m ,
A g ¯ = 0 2 m ,
A = [ H [ ρ 1 ] T 0 3 T μ x 1 H [ ρ 1 ] T H [ ρ m ] T 0 3 T μ xm H [ ρ m ] T 0 3 T H [ ρ 1 ] T μ y 1 H [ ρ 1 ] T 0 3 T H [ ρ m ] T μ ym H [ ρ m ] T ] .
m 4.
G k = λ k K [ r ¯ 1 , k r ¯ 2 , k R k T t k ] , k = 1 , , n .
g 1 , k = λ k K r ¯ 1 , k , g 2 , k = λ k K r ¯ 2 , k .
g 1 , k T W g 2 , k = 0 , g 1 , k T W g 1 , k g 2 , k T W g 2 , k = 0 ,
W = K T K 1 ,
w = [ w 11 w 22 w 33 w 23 w 13 w 12 ] T .
B w = 0 2 n ,
B = [ g 1 , 1 T F ( g 2 , 1 ) g 1 , n T F ( g 2 , n ) g 1 , 1 T F ( g 1 , 1 ) g 2 , 1 T F ( g 2 , 1 ) g 1 , n T F ( g 1 , n ) g 2 , n T F ( g 2 , n ) ] ,
F ( v ) = [ d i a g ( v ) , Γ ( v ) ] , w h e r e Γ ( v ) = [ 0 c b c 0 a b a 0 ] ,
n 3.
H k = K 1 G k ,
[ h 1 , k h 2 , k h 3 , k ] = [ λ k r ¯ 1 , k λ k r ¯ 2 , k λ k R k T t k ] ,
R ~ k T = [ h 1 , k h 2 , k h 1 , k × h 2 , k ] = [ λ k r ¯ 1 , k λ k r ¯ 2 , k λ k 2 r ¯ 3 , k ] .
R k = U R V R T .
λ k = ( r ¯ 1 , k T h 1 , k + r ¯ 2 , k T h 2 , k ) / 2 ,
t k = R k h 3 , k / λ k .
ρ = H 1 [ G a 1 H [ μ ] ] .
r = [ r 1 r 2 r 3 ] T = θ l ^ ,
u ^ k = H 1 [ T H [ u k ] ] , T = [ sI 2 sc 0 2 T 1 ] ,
c = ( u 1 + + u 1 ) / n , ( c e n t r o i d ) ,
a = ( u 1 c + + u 1 c ) / n , ( a v e r a g e d i s t a n c e ) ,
s = 2 / a , ( s t a n d a r d i s o t r o p i c s c a l i n g ) .
c = [ N + 1 , M + 1 ] T / 2 ,
s = 2 / ( N 1 ) .
ρ i , k r e d = H 1 [ G k b l u e H [ μ i , k r e d ] ] .
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.