## 2 Pinhole Camera Model  
A pinhole camera model refers to a model in which all the scenes that can be captured by the camera are displayed upside down on the camera imaging plane through the center point of the camera's optical axis [21]. The optical center of a camera refers to the axis of the  
Figure 1: Eye-to-hand diagram. camera coordinate system with the optical axis of the camera. Usually, this axis is called the optical center of the camera. As shown in Figure 2, O represents the center point of the optical axis in the camera; this is the projection center point of the camera. The image plane \(\mathcal{O}\)-\(\left[u,v\right]\) in Figure 2 is a virtual plane, and the true image plane is plane \(O\)-\(\left[u,v\right]\), which is symmetrical about the center of the projection. Only the image displayed on this plane is upside down. In order to facilitate the calculation, the orientation and size of the image must be transformed so that the transformed image is consistent with the orientation of the original object. In this way, the imaging plane is equivalently converted to the image plane \(\mathcal{O}\)-\(\left[u,v\right]\). When the projection center and optical axis of the camera are parallel to the \(Z\) axis, the distance from the projection center to the image plane \(\mathcal{O}\)-\(\left[u,v\right]\) is the focal length \(f\) of the camera. Assume that there is a point \(P(X_{B},Y_{B},Z_{B})\) on the real-world calibration plate whose projection on the image plane is \(P_{c}\left(u,v\right)\), according to the similar triangle theory:  
\[\frac{f}{Z_{B}}=\frac{u}{X_{B}}=\frac{v}{Y_{B}} \tag{1}\]  
Silicet:  
\[u=X_{B}\frac{f}{Z} \tag{2}\]  
When the origin of the two-dimensional image coordinate system and the intersection point \(\mathcal{O}\) of the optical axis and the imaging plane do not coincide, the origin of the two-dimensional image coordinate system needs to be translated to the \(\mathcal{O}\) position. Remember this transformation as \(\left(t_{u},t_{v}\right)\); therefore  
\[u=X_{B}\frac{f}{Z_{B}}+t_{u} \tag{3}\]  
\[v=Y_{B}\frac{f}{Z_{B}}+t_{v}\]  
It can be seen that in the standard pinhole camera model, the coordinate value of point \(\left(u,v\right)\) on the two-dimensional image coordinate system has a linear relationship with the coordinate value of point \(\left(X_{B},\ Y_{B}\right)\) in the world coordinate system. Rewritten into homogeneous coordinate form, it is expressed as  
\[\left( \begin{array}{c}u\\ v\\ 1\end{array} \right)=\left( \begin{array}{ccc}f&0&t_{u}\\ 0&f&t_{v}\\ 0&0&1\end{array} \right)\left( \begin{array}{c}X_{B}\\ Y_{B}\\ Z_{B}\end{array} \right)=M\left( \begin{array}{c}X_{B}\\ Y_{B}\\ Z_{B}\end{array} \right) \tag{4}\]  
Figure 2: Pinhole imaging model. The matrix \(M\) is called the camera's internal parameter matrix, and it determines how the points in the real world are projected onto the camera. The ideal perspective model is a pinhole imaging model, and the object and image will meet the relationship of similar triangles. However, in fact, due to the processing and assembly errors of the camera optical system, the lens cannot meet the relationship in which the object and image form a similar triangle, so there will be distortion between the actual image on the camera image plane and the ideal image. Distortion belongs to the geometric distortion of imaging, which is the phenomenon of picture distortion and deformation caused by different magnification of the image in different areas on the image plane. The degree of this deformation increases successively from the center of the picture to the edge of the picture, which is mainly reflected at the edge of the picture. The two main factors causing distortion are (1) lens shape (radial distortion) and (2) the lens is not parallel to the imaging plane (tangential distortion). The two distortions are shown in the Figures 3 and 4. In order to reduce distortion, try to avoid taking pictures with the widest angle end or the farthest end of the lens focal length.