Abstract
A machine-vision method was used to build a three-dimensional measurement system using a measurement algorithm and a perspective transformation. The image data from a double complementary metal oxide semiconductor were transmitted to a notebook personal computer to calculate the parameters. A three-dimensional measurement system for obtaining its feature points in the world coordinate system was used to calculate the measurement data. The experimental results were verified with a more precise measurement equipment, automatic transformer observation system. The three-dimensional measurement system introduced here was applied to two case studies. The first case considered the measurement of hole diameters, such as those found in the cylinder head of an internal combustion engine. By summarizing various experimental results based on studies of three kinds of hole designs, the maximum error was 0.373 mm and the minimum error was 0.053 mm, which is within the general range of manufacturing tolerances (±0.5 mm) used in engineering schematics. The second case examined the measurement of certain key dimensions of an aggregate truck bed, and the results showed that the measured difference between the three-dimensional method and automatic transformer observation system is less than 1.2%. The proposed three-dimensional measurement system is inexpensive, offers an easy set up, and provides a certain amount of accuracy and stability.
Introduction
With the rapidly growing demand for industrial automation in the manufacturing sector, machine vision now plays an important role in many fields. Machine-vision technology is quickly becoming a widely applied measurement method toward the quality inspection of a wide variety of products. Geometric and size measurements are among the essential quality control processes that are performed to ensure that manufactured parts conform to specified standards in mechanical engineering. This type of inspection is normally done through the use of specialized instruments, such as a steel rule, micrometer, inside micrometer, vernier caliper, coordinate measuring machine (CMM), which all require direct physical contact. The advantages of a contact measurement are found in the high measurement accuracy and the general suitability for basic quantitative geometries. However, most contact measurement methods are usually limited by the size of the analysis and the high cost involved with time-consuming skilled labor. These drawbacks may be overcome by implementing a non-contact measurement method, such as the use of laser measurement devices, ultrasonic measurement methods, machine-vision systems, automatic transformer observation system (ATOS) scanning measurement equipment.
The machine-vision method is based on the human visual system which can detect the dimensions of objects by means of light passing through an individual’s cornea, pupil, and lens and then projecting images onto the retina. Then, the visual signals received through the optic nerve can pass into the brain. The analysis and integration within the brain can ascertain depth perception of those objects. The stereoscopic vision system of the human body can thereby determine the relative and absolute distance of observed objects, and even the thickness of the objects, as well as other features. A machine-vision system is analogous to the function of the human eye in that the complementary metal oxide semiconductor (CMOS)/charge coupled devices (CCDs) inside the cameras are comparable to the human eye’s cornea, pupil, and lens. The lens aperture in a machine-vision camera is approximately the same as a human pupil, in that they both regulate the amount of light received, and the CMOS/CCD internal sensors (image sensors) are equivalent to the retina of the human eye. With the machine-vision method, the visual information is transmitted to a personal computer (PC) through the signal line of a mainframe computer, and then the spatial position of the object to be measured; it is calculated according to its location in the world coordinate system. 1 A machine-vision system generally consists of five basic components: a light source, an image capturing device, an image capturing board (frame grabber), and an appropriate computer hardware and software system.
In recent years, many authors have studied using machine vision in many fields, such as agriculture, manufacturing, and medical-related sciences. For instance, Chen et al.
2
showed that machine vision can provide a non-contact measurement inspection process for measuring a wide class of objects. Kumar et al.
3
used machine vision to evaluate the surface roughness in manufacturing. With this method, they obtained a good linear relationship between the average surface roughness (
Within machine-vision technology, the performance largely depends on calibration accuracy. Karaszewski et al. 7 presented a novel system for a three-dimensional (3D) digitization of cultural heritage objects, which allowed a completely automated shape measurement. The system was used for the digitization of a whole museum collection. An algorithm for the next best view calculation was presented, which contained an application that calculated the inverse kinematics and determined a collision-free path for the measurement probe to reach the next measurement position. Ivo et al. 8 proposed a robust 3D scanner based on structured light. Volumetric parameters of both an artificial object and a human body segment were obtained through 3D scanning. The analysis of large-scale scanning techniques using a laser scanner was investigated by Wang et al., 9 who performed both point measurements and surface measurements to minimize errors, and these values were used to calculate the uncertainty. The measurement deviation and the statistical values of variance were determined by Palousek et al. 10 for a 3D digitizing process of glossy surfaces coated with a titanium oxide coating or a chalk powder spray. A 3D optical scanner, ATOS III Triple Scan, was used for capturing and evaluating the data, which revealed a significant difference between the chalk and titanium matte coatings. C Lin et al. 11 proposed a novel 3D alignment method based on two-dimensional (2D) local feature matching. Their proposed method converted the point clouds into 2D bearing angle images and then used the 2D image-based matching method, SURF, to find the matching pixel pairs of the two images. Y Ji et al. 12 presented a novel design for an automatic and complete parameter calibration system, using information from a 3D texture map to construct an intelligent space data-acquisition method for camera sensor networks.
In this article, machine vision is used to establish a non-contact 3D measurement system using a measurement algorithm and a perspective transformation method. Double CMOS cameras are used to capture the images of the objects. A real pattern is used to calibrate the coordinates. After capturing the images of the objects and calibrating the camera, a linear transformation between the image coordinate system and the world coordinate system is performed, thereby determining the real-world dimensions of the objects. Two case studies are investigated as examples of this application process. The first case involves measuring the diameters of holes, such as those found in the cylinder head of an internal combustion engine, and the second case refers to measuring certain key dimensions of an aggregate truck bed, as is typical in construction and mining. The results are then compared with the results of other contact measuring methods and are further verified by more precise instruments, ATOS and CMM.
Research methodology
Stereo imaging
Two coordinates (
To solve the problem described above, stereo imaging is utilized. Stereo imaging involves obtaining two separate 2D image viewpoints of a 3D object in space, similar to how humans receive two slightly different images through two eyes. The goal of stereo imaging is to find the world coordinates (

The schematic diagram of a stereo-imaging system.

The specific perspective projection model. 13
The generalized perspective transformation
Whenever an image of a real 3D object is projected onto a 2D plane, the perspective transformation plays an important role in the machine vision. This work adopts a concept of optical projection known as the pinhole camera, or the pinhole projection method. Here, the camera is regarded as a pinhole, in the same way that light from an image is projected through a pinhole onto an image plane. The lens center is assumed to be a single point. The basic schematic model of the imaging process is shown in Figure 2. The

The generalized perspective projection model. 13
To begin with, a camera is mounted on a rotating shaft. The lens center is set at the coordinates (0, 0, and
The
The
To solve this problem, we take into account that two cameras are used, with each one contributing a set of data. With double cameras, we have two image planes: the left image plane and the right image plane. Six points on the sample are found on the left image plane, and six similar points on the right plane. When the camera calibration is completed, the spatial coordinates of the feature point will be obtained from two projections of the same scene taken from different perspectives, and the feature point can then be found in the world coordinate system. 14 In equation (4), superscript (1) represents the left image plane, and superscript (2) represents the right image plane
Experimental setup
The non-contact measurement system
The non-contact measurement system consists of a laptop with appropriate data processing software installed for the coordinate transformation, a calibration sample, and a double CMOS camera for the purpose of recording the images. The specifications of the CMOS cameras are described in Table 1. First, a double CMOS camera is mounted at two different positions. In order to measure the depth of a point, the point must be visible to both cameras, and the point must also be identifiable in both images according to the world coordinate system, as shown in Figure 4. In order to perform the conversion between the image coordinate system and the world coordinate system, the measurement system needs to determine six calibration points on each image plane of the sample, corresponding to the image coordinates. In measurement processing, the positions of the two cameras should not be changed. Therefore, the object to be measured should be interchanged with the calibration sample, in full view of the camera setup.
Specifications of the CMOS cameras.
CMOS: complementary metal oxide semiconductor; LED: light-emitting diode.

Basic components of the 3D measurement system.
Next, the coordinate values of the six calibration points in the world coordinate system are entered into the measurement system. Using the known world coordinates of the six calibration points, and the six calibration points projected onto each of the two image planes, the conversion between the world coordinate system and the image coordinate system may then be performed in the 3D measurement system, as shown in Figure 5.

Interface of the 3D measurement software.
Camera setup and calibration
The cameras used in this study were identical, and the locations of the cameras were tested in order to obtain a suitable position for both the height and angle in relation to the object. Although the location of each camera’s origin was different, the coordinate systems of the two cameras were perfectly aligned.
In order to achieve the stereoscopic measurement required, it was first necessary to calibrate the camera. The purpose of the camera calibration was to improve the transformation results, which were, in this case, based on the coordinate measurements, rather than using a known transformation to map the coordinates from one coordinate system to another.15,16 The calibration was also used to construct the projection model that relates the two coordinate systems, and to identify the relative camera parameters, which include both internal and external parameters.
The internal camera parameters describe the camera coordinate system containing the projected image, following the pinhole model. Here, the camera is considered to be an integral part of the image formation, and so the parameters are characterized by the geometrical optics unique to the camera. The internal camera parameters are usually unknown, so manufacturers are not able to provide the relevant information. Thus, only using camera image correction technology, the necessary internal parameters of the camera can be obtained.
The external camera parameters pertain to the camera position and the absolute spatial coordinates between the two cameras. The camera’s coordinate systems and the transformation parameters between the coordinate systems include a rotation matrix, along with a parallel displacement matrix (a translation matrix). Here, it should be noted that
Due to the effects of the focal length and light intensity factors, the two cameras must first be adjusted to the position and angle of the light source in order to obtain the appropriate brightness level. In doing so, a mobile or brightness adjustable light source apparatus may prove useful, in order to avoid moving the locations of the cameras later on. After the image of the pattern is clear, then the cameras should be calibrated before the image is captured. If the location of the workpiece should be moved, then both cameras will need to be recalibrated again.
Results and discussion
Case study 1: hole diameter measurements
The first case study dealt with measuring the diameter of a hole, such as those typically found in the cylinder head of an internal combustion engine, as shown in Figure 6. Of note, these holes are oriented with the central axis normal to the surface plane. In this section, four measurement methods were used, including CMM, ATOS, a manual measurement using an inside micrometer, and the machine-vision measurement system using the double CMOS cameras. Three types of holes were verified: a drilled hole, which has a 90° edge, a post or guide-pin hole, which has a chamfered edge with a conical surface, and a counter bored hole, which is commonly used to sink cap screws. The positions of the holes were located on three separate planes, with one plane being inclined at 20°, as shown in Figures 7 and 8. The measured diameters of nine holes, using the four methods mentioned, were compared together, along with the errors. For the chamfered and counter bored holes, the outer edge was measured, and not the internal diameter of the hole. Here, the test object is not considered to be reflective. It was painted with white paint on its surface, having an average thickness ranging between 0.022 and 0.05 mm.

The cylinder head of an engine, containing various holes.

The CAD schematic of an entity sample.

The entity sample of a cylinder head with various holes.
The whisker charts, displayed in Figures 9–11, show a comparison of the measured results for the drilled hole, the counter bored hole, and the chamfered hole, respectively, using the four measurement methods. The present machine-vision results are shown as CMOS-X and CMOS-Y, which are the measured diameters along the

The whisker chart showing the measured diameters for the drilled holes, using four measurement instruments.

The whisker chart showing the measured diameters for the counter bored holes, using four measurement instruments.

The whisker chart showing the measured diameters for the chamfered holes, using four measurement instruments.
The maximum error displayed by the ATOS scanning measurement system was 0.147 mm, and the minimum error was 0.057 mm. The maximum error of the machine-vision method using the dual-CMOS camera system was 0.373 mm, and the minimum error was 0.053 mm. The maximum positive deviation was 0.041 mm and the minimum positive deviation was 0.014 mm. The maximum negative deviation was 0.039 mm and the minimum negative deviation was 0.014 mm.
Concerning the drilled holes and the counter bored holes, the ATOS scanning measurement system had the greatest precision among all the methods. The CMM and the inside micrometer had the least deviation for these two types of holes, followed by the ATOS method. For the drilled holes, the CMM method was the most accurate.
For the chamfered hole, Figure 11 shows that the ATOS method had the least deviation, followed by the 3D measurement system. With normal surfaces, the CMM equipment and the inside micrometer are the easiest tools available to measure objects with great accuracy. However, when measuring the diameter of the holes with the conical chamfered surface, a technical difficulty arose when using either the CMM or the inside micrometer, leading to these methods having the greatest measurement error. For the CMM, the error occurred because the spherical electron probe could only move along the
Case study 2: aggregate truck bed measurements
The second case study investigates measuring the dimensions of an aggregate truck bed. In Figure 12,

The aggregate truck bed model, showing the key feature points.
The measured distances between two feature points within the
3D: three-dimensional; ATOS: automatic transformer observation system.
The relative error between the two methods is listed.
Conclusion
This study presented the development of a 3D measurement system, using a machine-vision method having a double CMOS camera setup, which could calibrate the coordinate values of various feature points on samples located within a world coordinate system. It was applied to measure the diameters of holes similar to those found in metallurgical castings, such as the cylinder head of an internal combustion engine, as well as certain key dimensions of an aggregate truck bed. The experimental results showed that this measurement system is simple, convenient, and fairly accurate. The required measuring equipment, such as the camera, is inexpensive, easy to obtain, and easy to implement. The respective conclusions for each of the case studies are described as follows:
In measuring the diameters of holes, such as those found in the cylinder head of an internal combustion engine: The holes in the test sample were verified using each of the four methods: CMM, ATOS, an inside micrometer, and the 3D measurement system. When measuring the drilled holes and the counter bored holes, CMM was the best method, primarily because CMM is a contact measurement method. When measuring all types of holes, ATOS is the most suitable choice. However, these measurement devices are expensive and skilled technicians are required for the measurement process, so the machine-vision method may prove to be a cost-effective alternative. The 3D measurement system is simple, easy to use, inexpensive, and suitable for measuring the three types of holes studied. It is suitable for applications where the general schematic manufacturing tolerances are within ±0.5 mm, or when the errors must be not greater than 2%. This non-contact measurement system is seen to be the basis of developing a more complex measurement system, suitable for future manufacturing applications.
In measuring the dimensions of the aggregate truck bed: This measurement system displays a certain degree of accuracy and possesses an inherent stability. The measured error among the different dimensions considered lies within a 2% tolerance. The size of the object can be measured with considerable range adaptability. This system can effectively be used by the Highway Administration to measure the size of vehicles within a 2% tolerance range. Its implementation should reduce the need for a manual-contact vehicle inspection, thereby improving both the working environment and the efficiency of the process.
In summary, the experimental results have shown that the 3D measurement system is suitable for measuring the dimensions of various objects having complex geometries and oriented at oblique angles.
Footnotes
Academic Editor: Stephen D Prior
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
