Profile measurement adopting binocular active vision with normalization object of vector orthogonality

Active-vision-based measurement plays an important role in the profile inspection study. The binocular vision, a passive vision, is employed in the active vision system to contribute the benefits of them. The laser plane is calibrated by two 2D targets without texture initially. Then, an L target with feature points is designed to construct the orthogonality object of two vectors. In order to accurately model the binocular-active-vision system, the feature points on the L target are built by two cameras and parameterized by the laser plane. Different from the optimization methods on the basis of the distance object, the laser plane is further refined by the distance-angle object. Thus, an optimization function is created considering both the norms and angles of the vectors. However, the scale of the distance is diverse from the scale of the angle. Therefore, the optimization function is enhanced by the normalization process to balance the different scales. The comparison experiments show that the binocular active vision with the normalization object of vector orthogonality achieves the decreasing distance errors of 25%, 22%, 13% and 4%, as well as the decreasing angle errors of 23%, 20%, 14% and 4%, which indicates an accurate measurement to reconstruct the object profile.


Methods
The measurement model is illustrated in Fig. 1. Two targets without texture are designed and positioned in the view-field of the binocular vision system. O α -X α Y α Z α and O β -X β Y β Z β are the camera coordinate systems of the left and right cameras. O W -X W Y W Z W is the world coordinate system. A laser plane is projected to the two targets. There are two intersection lines on the targets. Then the two cameras capture the laser intersection lines. The projections of the intersection lines are generated on the image planes of the two cameras.
The cameras are calibrated by the well-known direct linear transform (DLT) method 32 . The projection planes that are determined by the optical centers and projection laser lines are 33 , T ϕ = β Ι β β P a ( ) , , T where ϕ α,I , ϕ α,II , ϕ β,I , ϕ β,II are the projection planes.
, , T where A * , B * are the plane-based Plücker matrices of the intersection lines on the left and right targets, respectively. The plane-based Plücker matrices A * , B * are further transformed to the dual matrices A, B by the Graßmann-Plücker relation 32 . A laser plane can be determined by two laser lines A, B 34 . Thus, the laser plane satisfies T T T where ϕ is the laser plane of the binocular-active-vision system. The solution process of the initial value of the laser plane is interpreted in Fig. 2.
In order to refine the laser plane and reconstruct the 3D intersection points between the measured object and the laser plane, we design an L target with three feature points Q i,1 , Q i,2 , Q i,3 in the i-th position. i = 1, 2, …, n. In Fig. 3, the laser plane intersects the L target with the three points. The projections of the three points captured by two cameras obey to the pinhole model 17 . Therefore, we have where α Q i j , , β Q i j , are the 3D points derived from two cameras and related to Q i,1 , T are two projection points on the left and right cameras. s i,j is a scale factor. j = 1, 2, 3. The feature points on the laser plane satisfy 33 www.nature.com/scientificreports www.nature.com/scientificreports/     www.nature.com/scientificreports www.nature.com/scientificreports/ Stacking Eqs (8)- (11), the 3D points α Q i j , , β Q i j , are solved by the singular value decomposition (SVD) method 35 and parameterized by and parameterized by i j i j i j , , , As the three 3D points on the L target generated two orthogonal vectors and the norms of the vectors are known, the orthogonality and norms of the vectors can be considered as two objects to optimize the laser plane. The object is given by where ϕ ∼ is the optimized laser plane of Eq. (15). d 1 , d 2 are norms of the two vectors on the L target. θ is the angle between the two vectors.
As the orthogonality is scaled by degree and the norms of the vectors are scaled by millimeter, it is necessary to balance the two different objects. Consequently, the two objects in Eq.   www.nature.com/scientificreports www.nature.com/scientificreports/ where φ is the optimized laser plane of Eq. (16).
The optimization process of the laser plane in the binocular active vision is explained in Fig. 4. The benefits of the normalization object of vector orthogonality can be observed in experiment results.
In profile reconstruction, the laser plane intersects the measured object with 3D points Q. The epipolar geometry is employed to realize the matching task of the 2D points of the left image and the right image 36 . The corresponding point is considered as the nearest point to the epipolar line in the candidate set of laser points. The 3D points Q is located on the optimized laser plane φ and projected to the cameras 17,33 , then where = α α α x y q ( , ) T , = β β β x y q ( , ) T are the projection points on two cameras. Eqs (17)- (19) can be rewritten by     11  31  12  32  13  33  14  34   T   21  31  22  32  23  33  24  34   T   11  31  12  32  13  33  14  34   T   21  31  22  32  23  33  24  34 T The 3D point Q on the measured object is solved by the SVD method.

Results
The measured objects and a binocular-active-vision system, including a laser projector and two cameras, are shown in the first column of Fig. 5. 2048 × 1536 resolution is adopted in the experiments. The test codes are programmed by Matlab. The algorithms of the codes are based on the processes in Figs 2 and 4. Figure 2 describes the closed form solution of the laser plane. Figure 4 interprets the optimization process of the laser plane using the binocular active vision with normalization object of vector orthogonality. The profiles of four measured objects, a car model, a mechanical part, a cylinder and a tea pot, are sampled to show the validity of the method. The second and third columns in Fig. 5 provide the point-epipolar-line matching results of the left and right images. The profile measurement results are expressed in the last column of Fig. 5. Different from the traditional benchmark of the standard distance 25 , standard distances and standard angles are both chosen as the benchmarks to verify the proposed method. In the four groups of experiments, the normalization object of vector orthogonality is compared to other four reconstruction methods, which are the binocular vision, the monocular vision and a laser plane, the binocular vision and a laser plane without optimization, the binocular vision and a laser plane with the object of vector orthogonality. The standard lengths of this experiment are 25 mm, 30 mm, 35 mm and 40 mm while the standard angle is 90°. Figure 6 shows the errors of the reconstruction distances and standard distances. The measurement distances between the object and the line connecting two cameras are 950 mm, 1000 mm, 1050 mm and 1100 mm.  Table 3 shows the uncertainties under the measurements of the standard lengths, 25 mm, 30 mm, 35 mm, 40 mm and the right angle.
From Fig. 6(a-d), the average errors and the standard deviations increase when the distances between the object and the cameras change from 950 mm to 1100 mm. While the measurement distance is fixed, the average errors and the standard deviations drop down from method A to method E. Furthermore, the average errors and the standard deviations indicate an increasing trend when the standard length of the test grows up. Figure 7 describes the angle errors in the test. The reconstructed standard angle is a right angle. Then the angle errors are obtained by comparing the reconstructed angles with the standard angle of 90°. In addition, the distances between the object and two cameras are also 950 mm, 1000 mm, 1050 mm and 1100 mm.  Tables 1-3.
According to the results in Fig. 7(a-d), when the norm of the vector increases from 25 mm to 30 mm, 35 mm, 40 mm, the average angle errors and the standard deviations increase. The average errors and the standard deviations also grow up when the measurement distance varies from 950 mm to 1100 mm. Moreover, while the distance is fixed, the decreasing trend of the reconstruction angle errors is also observed from method A to method E. The errors of the binocular active vision with the normalization object of vector orthogonality are smaller than the ones of the binocular vision and a laser plane with the object of vector orthogonality. Therefore, the normalization object contributes more accurate results than other methods as it balances the length object and the angle object.
In order to further investigate the accuracy of the approach, the first-level square ruler and the 0.01 mm vernier caliper are chosen as the quasi-ground-truths of the angle and the length, respectively. Figure 8 shows the www.nature.com/scientificreports www.nature.com/scientificreports/ experimental setups of the verification method of the profile measurement using the binocular active vision with the normalization object of vector orthogonality. The marks are attached to the two right sides of the square ruler. In order to recognize the standard length on the vernier caliper, two semi-circular marks are attached to the two outside large jaws of the vernier caliper, respectively. The vernier caliper provides the absolute reference lengths of 25 mm, 30 mm, 35 mm, and 40 mm, respectively. Table 4 shows the verification results of the measurement method with the quasi-ground-truths of the length and the angle. The experiment results show that the average reconstruction errors of the absolute lengths of the A, B, C, D and E methods are 0.63 mm, 0.60 mm, 0.55 mm, 0.51 mm and 0.49 mm, respectively. The average reconstruction errors of the absolute standard angle of the A, B, C, D and E methods are 0.91°, 0.87°, 0.78°, 0.71°, and 0.68°, respectively. In view of other methods, the binocular-active-vision method with the normalization object of the vector orthogonality achieves the higher accuracy for the reconstruction and is available for the object profile measurement and motion analysis.

Summary
A profile measurement method adopting binocular active vision with the normalization object of vector orthogonality is presented in the paper. An L target is designed to construct two vectors in the view field of the cameras. The orthogonality of the vectors is achieved by the feature points on the target. Both length and angle of the vectors are considered in the optimization function. Furthermore, the length and angle of the vectors are normalized to balance the different optimization objects. Four methods are compared with the proposed method in the experiments. The experiments results show that the average errors of the reconstruction lengths using the five methods are 0.64 mm, 0.62 mm, 0.56 mm, 0.51 mm and 0.49 mm, respectively. The length errors of the method, compared with the other methods, are decreased by 23%, 20%, 14% and 4%, respectively. The average reconstruction errors of the five methods are 0.92°, 0.89°, 0.79°, 0.72° and 0.69°, respectively. The angle errors of the method, compared with the other methods, are reduced by 25%, 22%, 13% and 4%, respectively. Therefore, the binocular-active-vision method with normalization object of vector orthogonality balances the different objects of the angle and length and improves the accuracy of 3D objects reconstruction.

Data Availability
The datasets generated during the current study are available from the corresponding author on reasonable request.