Study on the Camera Calibration Method in Three-Dimensional (3-D) Space for Machine Vision Systems

Study on the Camera Calibration Method in Three-Dimensional (3-D) Space for Machine Vision Systems

Ngoc-Vu Ngo

Faculty of Mechanical Engineering, Thai Nguyen University of Technology (TNUT), Thai Nguyen 250000, Vietnam

Corresponding Author Email: 
ngocvu@tnut.edu.vn
Page: 
343-350
|
DOI: 
https://doi.org/10.18280/i2m.240601
Received: 
5 November 2025
|
Revised: 
7 December 2025
|
Accepted: 
14 December 2025
|
Available online: 
31 December 2025
| Citation

© 2025 The author. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

OPEN ACCESS

Abstract: 

In this study, an experimental model for the camera calibration process in a machine vision system was developed. A calibration pattern was designed to acquire the world coordinates of the calibration points. The corresponding image coordinates were obtained using double cameras positioned on opposite sides of the calibration pattern. After getting the world coordinates and the corresponding image coordinates, the six-point method was applied to determine the total calibration matrix. Subsequently, stereo image techniques were used to establish the relationship between the image coordinates and the world coordinates. The accuracy of the proposed model was evaluated through the reprojection error between the original image coordinates and the reprojected coordinates obtained from the estimated total calibration matrix. Experimental results indicated that the average reprojection errors of the six calibration points were approximately 1.226 pixels for the left camera and 1.057 pixels for the right camera. In addition, to further verify the system performance, the calibration points were reconstructed using the total calibration matrix, and the proposed method was also applied to measure the dimensions of a real object.

Keywords: 

machine vision, camera calibration, camera model, reprojection error

1. Introduction

Nowadays, with the rapid advancement of science and technology, machine vision has been widely applied across various domains of daily life and industrial production. It is utilized in non-contact measurement of industrial components [1-3], product quality inspection on production lines [4, 5], medical image analysis [6, 7], and robotics applications [8-10]. In machine vision systems, camera calibration plays a vital role, as it directly affects the accuracy, reliability, and overall performance of the system.

Camera calibration is the process of establishing the relationship between image coordinates in the two-dimensional (2-D) space and world coordinates in both two-dimensional (2-D) and three-dimensional (3-D) spaces. Up to now, numerous studies have been conducted on camera calibration to improve the accuracy and efficiency of machine vision systems. For example, in a study by Lee et al. [11], the authors proposed a method for single-image camera calibration based on an end-to-end neural network. This method directly estimates parameters of the camera from an image and a set of line segments. They also introduced an auxiliary task of line classification to train the network to effectively extract global geometric information from the lines. Experimental results demonstrated that the proposed method outperformed previous state-of-the-art approaches. In a study by Hao et al. [12], the authors optimized the camera calibration process by identifying the optimal distance and angle to capture checker-board images for improving calibration efficiency. The authors explored the effects of distance and orientation factors as well as the feasibility of independently manipulating these factors. Three calibration methods including calibration based on distance factors (D, H, V), orientation factors (R, P, Y), and a combination of the two sets of influential factors were proposed using three different stereo cameras. Experimental results showed that D was the most influential factor, while H and V had nearly equal influence in method A; P and R were the two most influential orientation factors in Method B. Method C required approximately 10% more calibration images than methods A and B combined. Therefore, method C was recommended. The proposed methods can be applied to improve the calibration accuracy of stereo cameras for object detection and ranging applications. In another study, Zhao et al. [13] proposed a calibration method that combines bundle adjustment with diagonal constraints of the calibration target. In this study, first, the Canny edge detection algorithm was performed to obtain the sub-pixel centroid of each ellipse. Then, Zhang’s calibration method was applied to obtain the initial values of the calibration parameters. Finally, the diagonal constraints were used to optimize the camera’s extrinsic parameters. Experimental results showed that the proposed method can significantly improve calibration accuracy. In the study by Ma et al. [14], a minimal-parameter depth-dependent distortion model (MDM) was proposed to improve the accuracy of stereo vision systems by accounting for radial and decentering lens distortions. The authors also presented a calibration method for the MDM using a commonly employed planar calibration pattern. Experimental results demonstrated that the MDM significantly improved calibration accuracy compared with traditional distortion models. In another study, Schreuder and Theart [15] also proposed an optimized stereo calibration framework designed for conventional RGB cameras and standard calibration targets. They analyzed the influence of key calibration parameters, including a 45° camera pair angle and an A2 sized calibration board. They also presented a better evaluation method that produced a more accurate metric by implementing 3-D point projection and 2-D back-projection. Experimental results demonstrated a substantial reduction in 3-D projection and 2-D back-projection errors, significantly enhancing the accuracy of 3-D pose estimation dataset generation. Adil et al. [16] developed a Python-based algorithm to estimate the parameters of each camera, rectify the images, create the disparity maps and finally use these maps for distance measurements of a stereo vision system. Experiments demonstrated the effectiveness of the proposed method and showed that the calculated distance to the obstacle was relatively accurate. Zhao et al. [17] proposed a multi-camera-based method for six-degree-of-freedom (6-DOF) measurement. Their method employs at least two ordinary cameras calibrated based on Zhang’s calibration method [18]. The 6-DOF calculation model was analyzed by the matrix analysis method. The experiment results indicated that the average rotational DOF measurement error was less than 1.1 deg, and the average error of the movement DOF measurement was less than 0.007 m. Real-Moreno et al. [19] proposed a camera calibration method to improve depth estimation accuracy in stereo vision systems. In their study, lens distortion problem was addressed by adjusting the image coordinates of surface points before the triangulation process. The corrected image coordinates are calculated using calibration coefficients. In addition, the authors corrected the relative orientation of the cameras and computed a compensation angle. Experiment results demonstrated that the proposed method significantly improved depth estimation accuracy in stereo vision systems. Khrouch et al. [20] presented an elitist genetic algorithm for camera calibration to determine the intrinsic and extrinsic parameters of cameras and compared with standard genetic algorithm. This study showed that the proposed method was robust and gave good results. In the study by Han et al. [21], a binocular stereo-vision mapping model was used as the learning model to explore the ability of artificial neural networks (ANNs) to perform image object mapping. The researchers constructed a sample dataset using the image coordinates and world coordinates of checkerboard corners, built the ANN, and verified the learning performance of the network using training and testing samples. Experimental results showed that the ANN model could learn the image object mapping relationship more effectively, minimize the influence of lens distortion, and achieve more accurate nonlinear mapping along the image contours. The proposed method demonstrated the ability to learn the image object mapping relationship from a limited number of sample points without considering too many uncertain intermediate factors.

It can be observed that numerous studies have focused on camera calibration in three-dimensional (3-D) space for machine vision systems applied in various scenarios, yielding significant benefits. Therefore, it is necessary to conduct further research and develop experimental models to determine the total calibration matrix using the six-point method and the stereo image techniques for 3-D camera calibration, as well as to evaluate the reprojection accuracy of machine vision systems.

2. Research Methodology

2.1 Camera model

In the camera model illustrated in Figure 1, the world coordinate system (OXYZ) is used to define the position of the camera and the real point wₕ in 3-D space. The camera coordinate system is denoted as OXYZ, and the projection of wₕ onto the image plane is cₕ. It is assumed that the camera is mounted on a rotating stand, which can rotate by an angle θ around the OZ axis and by an angle α around the OX axis. The translation vector between the center of the rotating stand and the origin of the world coordinate system OXYZ is represented by G, while the translation vector between the image plane center and the rotation center is denoted as r = (r₁, r₂, r₃).

Figure 1. Camera model

To translate the origin of the world coordinate system to the rotation center of the camera, the translation matrix G is defined as follows:

$G=\left[\begin{array}{cccc}1 & 0 & 0 & -X_0 \\ 0 & 1 & 0 & -Y_0 \\ 0 & 0 & 1 & -Z_0 \\ 0 & 0 & 0 & 1\end{array}\right]$

To align the ox axis with the OX axis and the oz axis with the OZ axis, the rotation matrices $R_\alpha$ and $R_\theta$ are applied. The general rotation matrix R is then expressed as follows:

$R=R_\alpha \cdot R_\theta$

Then,

$R=\left[\begin{array}{cccc}\cos \theta & \sin \theta & 0 & 0 \\ -\sin \theta \cos \alpha & \cos \theta \cos \alpha & \sin \alpha & 0 \\ \sin \theta \sin \alpha & -\cos \theta \sin \alpha & \cos \alpha & 0 \\ 0 & 0 & 0 & 1\end{array}\right]$

To shift the center of the image plane so that it coincides with the camera’s rotation center, a transformation matrix C is applied, which has the following form:

$C=\left[\begin{array}{cccc}1 & 0 & 0 & -r_1 \\ 0 & 1 & 0 & -r_2 \\ 0 & 0 & 1 & -r_3 \\ 0 & 0 & 0 & 1\end{array}\right]$

Then, the equation that describes the relationship between the camera coordinate system and the world coordinate system is expressed as follows:

$c_h=P C R G w_h$                  (1)

2.2 Stereo image

In this method, a point in 3-D space is projected onto two separate image planes corresponding to two cameras. The distance between the centers of the two lenses is referred to as the baseline. These two image planes generate two corresponding image coordinates, denoted as p(1)(x, y) and p(2)(x, y). It is assumed that both cameras are fixed and precisely aligned, as illustrated in Figure 2. This method enables the determination of the depth (Z coordinate) of a point in real space from its 2-D image coordinates.

Figure 2. Stereo image

2.3 Determining the total calibration matrix

In the camera model, the parameters X0, Y0, Z0, $\lambda, \theta$ and $\alpha$ can be measured directly; however, it is often difficult to accurately determine one or more of these parameters using the camera itself as a measuring device. Therefore, a set of pixels corresponding to the known world coordinates is required. The process of determining the camera parameters based on these known points is called camera calibration.

From the camera model, the relationship between the real point (X, Y, Z) in the world coordinate system and the corresponding image point (x, y) on the image plane can be expressed as:

$c_h=P C R G w_h$                (2)

Denote,

$A=P C R G$

Then,

$c_h=A w_h$               (3)

Then, Eq. (3) is expressed in the following homogeneous form:

$\left[\begin{array}{c}s x \\ s y \\ s z \\ s\end{array}\right]=\left[\begin{array}{llll}a_{11} & a_{12} & a_{13} & a_{14} \\ a_{21} & a_{22} & a_{23} & a_{24} \\ a_{31} & a_{32} & a_{33} & a_{34} \\ a_{41} & a_{42} & a_{43} & a_{44}\end{array}\right]\left[\begin{array}{c}X \\ Y \\ Z \\ 1\end{array}\right]$                  (4)

Because in the ch matrix, the value sz in the third row is usually equal to zero, the third row of the total calibration matrix A can be omitted during the calculation process without affecting the accuracy of the transformation. By substituting sx = x.s and sy = y.s into the above equation, we obtain:

$\left\{\begin{array}{l}X a_{11}+Y a_{12}+Z a_{13}+1 a_{14}+0 a_{21}+0 a_{22}+0 a_{23}+0 a_{24}-x X a_{41}-x Y a_{42}-x Z a_{43}-x a_{14}=0 \\ 0 a_{11}+0 a_{12}+0 a_{13}+0 a_{14}+X a_{21}+Y a_{22}+Z a_{23}+1 a_{24}-y X a_{41}-y Y a_{42}-y Z a_{43}-y a_{14}=0\end{array}\right.$                  (5)

To determine the parameters in the matrix A, the world coordinates (Xi, Yi, Zi) of six points in space and the corresponding image coordinates (xi, yi) are used to substitute into the Eq. (5). This process establishes a set of linear equations that can be solved to find the unknown coefficients of the matrix A. We have:

$\left[\begin{array}{cccccccccccc}X_1 & Y_1 & Z_1 & 1 & 0 & 0 & 0 & 0 & -x_1 X_1 & -x_1 Y_1 & -x_1 Z_1 & -x_1 \\ 0 & 0 & 0 & 0 & X_1 & Y_1 & Z_1 & 1 & -y_1 X_1 & -y_1 Y_1 & -y_1 Z_1 & -y_1 \\ X_2 & Y_2 & Z_2 & 1 & 0 & 0 & 0 & 0 & -x_2 X_2 & -x_2 Y_2 & -x_2 Z_2 & -x_2 \\ 0 & 0 & 0 & 0 & X_2 & Y_2 & Z_2 & 1 & -y_2 X_2 & -y_2 Y_2 & -y_2 Z_2 & -y_2 \\ X_3 & Y_3 & Z_3 & 1 & 0 & 0 & 0 & 0 & -x_3 X_3 & -x_3 Y_3 & -x_3 Z_3 & -x_3 \\ 0 & 0 & 0 & 0 & X_3 & Y_3 & Z_3 & 1 & -y_3 X_3 & -y_3 Y_3 & -y_3 Z_3 & -y_3 \\ X_4 & Y_4 & Z_4 & 1 & 0 & 0 & 0 & 0 & -x_4 X_4 & -x_4 Y_4 & -x_4 Z_4 & -x_4 \\ 0 & 0 & 0 & 0 & X_4 & Y_4 & Z_4 & 1 & -y_4 X_4 & -y_4 Y_4 & -y_4 Z_4 & -y_4 \\ X_5 & Y_5 & Z_5 & 1 & 0 & 0 & 0 & 0 & -x_5 X_5 & -x_5 Y_5 & -x_5 Z_5 & -x_5 \\ 0 & 0 & 0 & 0 & X_5 & Y_5 & Z_5 & 1 & -y_5 X_5 & -y_5 Y_5 & -y_5 Z_5 & -y_5 \\ X_6 & Y_6 & Z_6 & 1 & 0 & 0 & 0 & 0 & -x_6 X_6 & -x_6 Y_6 & -x_6 Z_6 & -x_6 \\ 0 & 0 & 0 & 0 & X_6 & Y_6 & Z_6 & 1 & -y_6 X_6 & -y_6 Y_6 & -y_6 Z_6 & -y_6\end{array}\right]\left[\begin{array}{l}a_{11} \\ a_{12} \\ a_{13} \\ a_{14} \\ a_{21} \\ a_{22} \\ a_{23} \\ a_{24} \\ a_{41} \\ a_{42} \\ a_{43} \\ a_{44}\end{array}\right]=\left[\begin{array}{l}0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0\end{array}\right]$              (6)

The image coordinates in Eq. (6) are obtained separately from the left and right cameras. By substituting these data into the equations, the corresponding total calibration matrices A1 and A2 are determined for the left and right cameras, respectively.

2.4 Relationship between image coordinate and the world coordinate

From Eq. (6), the total calibration matrix A has been determined, meaning that the transformation coefficients aij are known. Then, Eq. (5) can be rewritten in the form of Eq. (7). In the Eq. (7), it is assumed that image coordinates (x, y) are known.

$\left\{\begin{array}{l}\left(a_{11}-a_{41} x\right) X+\left(a_{12}-a_{42} x\right) Y+\left(a_{13}-a_{43} x\right) Z+\left(a_{14}-a_{44} x\right)=0 \\ \left(a_{21}-a_{41} y\right) X+\left(a_{22}-a_{42} y\right) Y+\left(a_{23}-a_{43} y\right) Z+\left(a_{24}-a_{44} y\right)=0\end{array}\right.$                    (7)

The Eq. (7) contains three unknowns (X, Y, Z). With only two equations and three unknowns, it is not yet possible to obtain a unique solution. Therefore, by applying the stereo image techniques using double cameras, Eq. (7) can be rewritten into two separate Eqs. (8) and (9), as follows:

$\left\{\begin{array}{l}\left(a_{11}^{(1)}-a_{41}^{(1)} x\right) X+\left(a_{12}^{(1)}-a_{42}^{(1)} x\right) Y+\left(a_{13}^{(1)}-a_{43}^{(1)} x\right) Z+\left(a_{14}^{(1)}-a_{44}^{(1)} x\right)=0 \\ \left(a_{21}^{(1)}-a_{41}^{(1)} y\right) X+\left(a_{22}^{(1)}-a_{42}^{(1)} y\right) Y+\left(a_{23}^{(1)}-a_{43}^{(1)} y\right) Z+\left(a_{24}^{(1)}-a_{44}^{(1)} y\right)=0\end{array}\right.$                (8)

And,

$\left\{\begin{array}{l}\left(a_{11}^{(2)}-a_{41}^{(2)} x\right) X+\left(a_{12}^{(2)}-a_{42}^{(2)} x\right) Y+\left(a_{13}^{(2)}-a_{43}^{(2)} x\right) Z+\left(a_{14}^{(2)}-a_{44}^{(2)} x\right)=0 \\ \left(a_{21}^{(2)}-a_{41}^{(2)} y\right) X+\left(a_{22}^{(2)}-a_{42}^{(2)} y\right) Y+\left(a_{23}^{(2)}-a_{43}^{(2)} y\right) Z+\left(a_{24}^{(2)}-a_{44}^{(2)} y\right)=0\end{array}\right.$                  (9)

In the two Eqs. (8) and (9), the superscripts (1) and (2) correspond to the total calibration matrices A1 and A2, respectively. For convenience in solving the problem, Eqs. (8) and (9) can be rewritten in the form of matrix equations as follows:

$\left[\begin{array}{ccc}\left(a_{11}^{(1)}-x^{(1)} a_{41}^{(1)}\right) & \left(a_{12}^{(1)}-x^{(1)} a_{42}^{(1)}\right) & \left(a_{13}^{(1)}-x^{(1)} a_{43}^{(1)}\right) \\ \left(a_{21}^{(1)}-y^{(1)} a_{41}^{(1)}\right) & \left(a_{22}^{(1)}-y^{(1)} a_{42}^{(1)}\right) & \left(a_{23}^{(1)}-y^{(1)} a_{43}^{(1)}\right) \\ \left(a_{12}^{(2)}-x^{(2)} a_{43}^{(2)}\right) & \left(a_{12}^{(2)}-x^{(2)} a_{42}^{(2)}\right) & \left(a_{13}^{(2)}-x^{(2)} a_{43}^{(2)}\right) \\ \left(a_{21}^{(2)}-y^{(2)} a_{41}^{(2)}\right) & \left(a_{22}^{(2)}-y^{(2)} a_{42}^{(2)}\right) & \left(a_{23}^{(2)}-y^{(2)} a_{43}^{(2)}\right)\end{array}\right]\left[\begin{array}{l}X \\ Y \\ Z\end{array}\right]=\left[\begin{array}{l}-\left(a_{14}^{(1)}-x^{(1)} a_{44}^{(1)}\right) \\ -\left(a_{24}^{(1)}-y^{(1)} a_{44}^{(1)}\right) \\ -\left(a_{14}^{(2)}-x^{(2)} a_{44}^{(2)}\right) \\ -\left(a_{24}^{(2)}-y^{(2)} a_{44}^{(2)}\right)\end{array}\right]$               (10)

By solving Eq. (10), the world coordinates (X, Y, Z) can be determined.

3. Experimental Model

3.1 Experimental system

In this study, double Logitech C525 cameras were employed for image acquisition. The specifications of these cameras are presented in Table 1. The experimental system is shown as Figure 3.

Table 1. Specifications of cameras

No.

Specifications

1

HD video calling (1280 × 720 pixels)

2

HD video recording: Up to 1280 × 720 pixels

3

Logitech Fluid Crystal™ technology

4

Autofocus

5

Photo: Up to 8 Megapixels

6

High-speed USB 2.0 port

7

Lens and sensor type: Plastic

Figure 3. Experimental system

3.2 Calibration pattern

To obtain the world coordinates for the calibration process, a 3-D calibration pattern was designed, as illustrated in Figure 4. The coordinate values of the calibration points are listed in Table 2.

Table 2. The world coordinates of calibration points (mm)

Data

X

Y

Z

1

100

0

10

2

0

0

10

3

0

100

10

4

100

0

110

5

0

0

110

6

0

100

110

Figure 4. Calibration pattern

4. Results and Discussion

4.1 Determining corresponding image coordinates

To obtain the corresponding image coordinates, the double cameras sequentially captured images of the calibration pattern, as shown in Figures 5 and 6. As illustrated, the calibration points on the two image planes of the cameras correspond to the points on the calibration pattern shown in Figure 4. The image coordinates obtained from both cameras are presented in Table 3.

Figure 5. Center recognition results of the left camera

Figure 6. Center recognition results of the right camera

Table 3. Image coordinates corresponding from two cameras

Data

Image Coordinates of the Left Camera (Pixel)

Image Coordinates of the Right Camera (Pixel)

x

y

x

y

1

173

352

156

327

2

343

283

368

286

3

549

351

523

377

4

173

81

155

71

5

355

49

381

53

6

578

92

552

107

4.2 Total calibration matrix

After obtaining the world coordinates and the corresponding image coordinates from the left and right cameras, the coefficients of the total calibration matrix are determined using Eq. (10). Accordingly, the total calibration matrices A₁ and A₂ are obtained as follows. The matrix A₁, obtained from the left camera, is expressed as follows:

$A_1=\left[\begin{array}{cccc}-1.9387 & 1.4613 & -0.1085 & 342.0275 \\ 0.1818 & 0.3022 & -2.3564 & 304.7735 \\ -0.0014 & -0.0011 & -0.0006 & 1.0\end{array}\right]$

The matrix A2, obtained from the right camera, is expressed as follows:

$A_2=\left[\begin{array}{cccc}-2.2549 & 0.7636 & -0.1097 & 366.5374 \\ 0.0900 & 0.3423 & -2.3487 & 307.6497 \\ -0.0010 & -0.0015 & -0.0006 & 1.0\end{array}\right]$

4.3 Analyzing reprojection error

4.3.1 Calculation of the reprojection image coordinates

The reprojection image coordinates can be calculated as follows:

$\left[\begin{array}{c}x_c \\ y_c \\ 1\end{array}\right]=A\left[\begin{array}{l}X \\ Y \\ Z\end{array}\right]$                (11)

where, A is the total calibration matrix determined in the previous section.

4.3.2 Reprojection error of each point

Reprojection error is a metric used in camera calibration process, 3-D reconstruction to measure how accurately a camera model represents the observed image data. The reprojection error for each point is calculated as follows:

$e_i=\sqrt{\left(x_i-x_{c i}\right)^2+\left(y_i-y_{c i}\right)^2}$               (12)

In which, eiis the reprojection error of each point; xi, yi are the original image coordinates; $x_{c i}, y_{c i}$ are the reprojected image coordinates along the ox and oy axes, respectively; i is the number of the calibration points. Accordingly, the reprojection errors are presented in Tables 4 and 5 for the left and right cameras, respectively.

Table 4. Reprojection error of the left camera (Pixel)

Data

Original Image Coordinates

Reprojection Image Coordinates

Reprojection Error

x

y

xc

yc

e

1

173

352

172.216

350.573

1.628

2

343

283

343.001

282.907

0.093

3

549

351

550.987

352.296

2.372

4

173

81

171.565

80.289

1.602

5

355

49

353.418

48.789

1.596

6

578

92

577.939

91.977

0.064

Table 5. Reprojection error of the right camera (Pixel)

Data

Original Image Coordinates

Reprojection Image Coordinates

Reprojection Error

 

x

y

xc

yc

e

1

156

327

156.544

327.922

1.071

2

368

286

367.646

285.878

0.374

3

523

377

523.460

377.242

0.520

4

155

71

154.653

69.895

0.363

5

381

53

379.518

52.776

1.498

6

552

107

549.528

106.534

2.515

The average reprojection error of the calibration points is calculated using the following Eq. (13):

$\Delta=\frac{1}{N} \sum_{i=1}^N e_i$                 (13)

In which, Δ represents the average reprojection error of the points, and N is the total number of calibration points. Accordingly, the average errors of the left (Δ₁) and right (Δ₂) cameras are calculated as follows:

$\Delta_1=\frac{1.628+0.093+2.372+1.602+1.596+0.064}{6}=1.226( { Pixels })$

$\Delta_2=\frac{1.071+0.374+0.520+0.363+1.498+2.515}{6}=1.057({ Pixels })$

The obtained errors are within an acceptable range for a vision system and can be effectively applied to non-contact measurement of parts requiring medium accuracy.

4.4 Reconstruction determination

After determining the two total calibration matrices A1 and A2, the world coordinates of any point in space corresponding to the six calibration points can be obtained using Eq. (10). To verify the accuracy of the system, the world coordinate values of the six calibration points were recalculated. The results are presented in Table 6.

Table 6 shows that the maximum error along the OX axis occurs at point 6 with a value of -2.283 mm, while the maximum error along the OY axis occurs at point 3 with -1.440 mm, and the maximum error along the OZ axis occurs at point 1 with 0.609 mm. The minimum error along the OX axis occurs at point 4 with 0.360 mm, along the OY axis at point 2 with -0.328 mm, and along the OZ axis at point 5 with -0.035 mm. The results also indicate that the error along the OZ axis is the most stable and smallest overall.

4.5 Application for measuring sizes of a part

In this section, to verify the accuracy of the proposed method, a real object was used as a measuring sample, as shown in Figure 7. The object was placed within the calibrated 3-D workspace, as illustrated in Figure 8. The image coordinates of the measuring points A and B were extracted from the image planes of the left and right cameras. Using these image coordinates, the corresponding the world coordinates were determined according to Eq. (7). The results of the reconstruction are presented in Table 7.

Table 6. Results of reconstruction determination

Data

Original World Coordinate (mm)

Reconstruction of the Calibration Points (mm)

Deviation (mm)

X

Y

Z

X

Y

Z

ΔX

ΔY

ΔZ

1

100

0

10

100.908

1.327

10.609

0.908

1.327

0.609

2

0

0

10

-0.429

-0.328

9.753

-0.429

-0.328

-0.247

3

0

100

10

-1.154

98.560

9.470

-1.154

-1.44

-0.53

4

100

0

110

100.360

1.058

109.906

0.360

1.058

-0.094

5

0

0

110

0.381

0.504

109.965

0.381

0.504

-0.035

6

0

100

110

-2.283

98.856

109.438

-2.283

-1.144

0.562

Table 7. Results of determining the world coordinates of A and B

Data

Image Coordinates of the Left Camera (Pixel)

Image Coordinates of the Right Camera (Pixel)

The World Coordinate (mm)

x

y

x

y

X

Y

Z

A

482

167

463

178

10.172

69.667

77.961

B

266

163

247

157

71.133

17.866

79.343

Figure 7. Size of the measuring part

Figure 8. Position of measuring points A and B of the left camera (a) and right camera (b)

From the coordinate data presented in Table 7, the distance between the two points A and B in real space is determined using the following equation:

$d_{A B}=\sqrt{\left(X_A-X_B\right)^2+\left(Y_A-Y_B\right)^2+\left(Z_A-Z_B\right)^2}=80.01(\mathrm{~mm})$                (14)

where, (XA, YA, ZA) and (XB, YB, ZB) are the world coordinates of points A and B, respectively.

$d_{A B}=80.01(\mathrm{mm})$

The distance measurement results show that the measurement deviation, when compared to the actual size of the part shown in Figure 7, is calculated as follows:

$\delta=80.01-80=0.01(\mathrm{mm})$

This deviation level is considered quite good. However, it strongly depends on the position of the object, the location of the measurement points, and the image processing algorithm used to determine the corresponding point positions on the image planes of the two cameras.

5. Conclusions

In this study, an experimental model for performing camera calibration within a 3-D space for machine vision systems was developed successfully. Both image coordinates and the world coordinates were utilized to determine the total calibration matrix in camera model using the six-point method. The obtained results were verified by evaluating the reprojection error between the original and image coordinates obtaining from total calibration matrices. Moreover, the study employed a 3-D imaging approach to establish the relationship between 2-D image coordinates and 3-D coordinates in the world coordinate system using stereo image techniques. The experimental results demonstrate that the proposed method is effective for camera calibration in machine vision systems applied to non-contact measurement, product surface quality inspection, and robot navigation and positioning. To further enhance system accuracy and reduce measurement errors, the use of high-resolution cameras and an increased number of calibration points are recommended. In addition, integrating machine learning or deep learning techniques may significantly improve the efficiency and precision of the camera calibration process.

Acknowledgment

The work described in this paper was supported by Thai Nguyen University of Technology (TNUT), Thai Nguyen, Vietnam.

  References

[1] Setyawan, R.A., Soenoko, R., Mudjirahardjo, P., Choiron, M.A. (2018). Measurement accuracy analysis of distance between cameras in stereo vision. In 2018 Electrical Power, Electronics, Communications, Controls and Informatics Seminar (EECCIS), Batu, Indonesia, pp. 169-172. https://doi.org/10.1109/EECCIS.2018.8692999

[2] Ngo, N.V., Hsu, Q.C., Hsiao, W.L., Yang, C.J. (2017). Development of a simple three-dimensional machine vision measurement system for in-process mechanical parts. Advances in Mechanical Engineering, 9(10). https://doi.org/10.1177/1687814017717183

[3] Zaarane, A., Slimani, I., Al Okaishi, W., Atouf, I., Hamdoun, A. (2020). Distance measurement system for autonomous vehicles using stereo camera. Array, 5: 100016. https://doi.org/10.1016/j.array.2020.100016

[4] Profili, A., Magherini, R., Servi, M., Spezia, F., Gemmiti, D., Volpe, Y. (2024). Machine vision system for automatic defect detection of ultrasound probes. The International Journal of Advanced Manufacturing Technology, 135: 3421-3435. https://doi.org/10.1007/s00170-024-14701-6

[5] Kim, B., Shin, M., Hwang, S. (2024). Design and development of a precision defect detection system based on a line scan camera using deep learning. Applied Sciences, 14(24): 12054. https://doi.org/10.3390/app142412054

[6] Tan, H., Xu, H., Yu, N., Yu, Y., Duan, H.F., Fan, Q.J., Tian, Z.Y. (2023). The value of deep learning-based computer aided diagnostic system in improving diagnostic performance of rib fractures in acute blunt trauma. BMC Medical Imaging, 23: 55. https://doi.org/10.1186/s12880-023-01012-7

[7] Zuo, L. (2024). Application of deep learning-based computer vision in medical image analysis. Applied and Computational Engineering, 41: 259-262. https://doi.org/10.54254/2755-2721/41/20230761

[8] Ngo, N.V., Duong, V.C. (2024). Development of an automatic measurement and classification system for a robotic arm using machine vision. International Journal of Mechanical Engineering and Robotics Research, 13(4): 489-494. https://doi.org/10.18178/ijmerr.13.4.489-494

[9] Ngo, N.V., Porter, G.A., Hsu, Q.C. (2019). Development of a color object classification and measurement system using machine vision. Sensors and Materials, 31(12): 4135-4154. https://doi.org/10.18494/SAM.2019.2412

[10] Robinson, N., Tidd, B., Campbell, D., Kulić, D., Corke, P. (2023). Robotic vision for human-robot interaction and collaboration: A survey and systematic review. ACM Transactions on Human-Robot Interaction, 12(1): 1-66. https://doi.org/10.1145/3570731

[11] Lee, J., Go, H., Lee, H., Cho, S., Sung, M., Kim, J. (2021). CTRL-C: Camera calibration transformer with line-classification. In 2021 IEEE/CVF International Conference on Computer Vision (ICCV), pp 16228-16237. https://doi.org/10.1109/ICCV48922.2021.01592

[12] Hao, Y.N., Tai, V.C., Tan, Y.C. (2023). A systematic stereo camera calibration strategy: Leveraging Latin hypercube sampling and 2k full factorial design of experiment methods. Sensors, 23(19): 8240. https://doi.org/10.3390/s23198240

[13] Zhao, C.L., Fan, C.Y., Zhao, Z.Y. (2024). A binocular camera calibration method based on circle detection. Heliyon, 10(19): e38347. https://doi.org/10.1016/j.heliyon.2024.e38347

[14] Ma, X., Zhu, P.C., Li, X., Zheng, X.Y., Zhou, J.S., Wang, X.C. (2024). A minimal set of parameters-based depth-dependent distortion model and its calibration method for stereo vision systems. IEEE Transactions on Instrumentation and Measurement, 73: 1-11. https://doi.org/10.1109/TIM.2024.3406802

[15] Schreuder, C.M., Theart, R.P. (2025). Robust stereo calibration for improved 2D-3D projection in real world pose estimation. Multimedia Tools and Applications, 84: 43901-43928. https://doi.org/10.1007/s11042-025-20846-7

[16] Adil, E., Mikou, M., Mouhsen, A. (2022). A novel algorithm for distance measurement using stereo camera. CAAI Transactions on Intelligence Technology, 7(2):177-186. https://doi.org/10.1049/cit2.12098

[17] Zhao, Z., Zhu, Y., Li, Y., Qiu, Z., Luo, Y., Xie, C., Zhang, Z. (2020). Multi-camera-based universal measurement method for 6-DOF of rigid bodies in world coordinate system. Sensors, 20(19), 5547. https://doi.org/10.3390/s20195547

[18] Zhang, Z. (2002). A flexible new technique for camera calibration. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11): 1330-1334. https://doi.org/10.1109/34.888718

[19] Real-Moreno, O., Rodríguez-Quiñonez, J.C., Flores-Fuentes, W., Sergiyenko, O., Miranda-Vega, J.E., Trujillo-Hernández, G., Hernández-Balbuena, D. (2024). Camera calibration method through multivariate quadratic regression for depth estimation on a stereo vision system. Optics and Lasers in Engineering, 174: 107932. https://doi.org/10.1016/j.optlaseng.2023.107932

[20] Khrouch, H., Mahdaoui, A., Tantaoui, M., Chana, I., Bouazi, A. (2024). Camera calibration based on elitist genetic algorithm. In 2024 4th International Conference on Innovative Research in Applied Science, Engineering and Technology (IRASET), FEZ, Morocco, pp. 1-7. https://doi.org/10.1109/IRASET60544.2024.10549372

[21] Han, F., Bian, Y., Liu, B., Zeng, Q., Tian, Y. (2023). Research on calibration of a binocular stereo-vision imaging system based on the artificial neural network. Journal of the optical society of America A, 40(2): 337-354. https://doi.org/10.1364/JOSAA.469332