Automatic assembly of micro-miniature parts based on coaxial alignment and ORB feature matching

. Aiming at the problems of low manual assembly process efficiency and low yield of micro-miniature parts. A vision system based on ORB feature matching for fast coaxial alignment of micro-miniature parts automated assembly is proposed. The coaxial alignment module is the main hardware, the assembly part and the base part can be imaged in the industrial camera; the ORB features are extracted from the known part template image and the part image obtained by the vision imaging system, and the RANSAC algorithm is adopted to match the ORB features of the template image and the actual part image, the pose of parts is calculated by feature matching results. At the same time, the image coordinate system and the motion axis coordinate system are calibrated, and the motion control system is driven by the transformation matrix of the two coordinate systems to complete the assembly between the assembly part and the base part. The assembly experiment shows the system can complete the automated assembly of micro-miniature parts.


Introduction
In the automated assembly system of micro-miniature parts, the position and attitude deviation measurement of the parts is the key technology of automated assembly. Because machine vision technology has the characteristics of fast speed, high precision, and noncontact [1], it has become an important means to achieve high-quality manufacturing of micro-miniature systems in some fields [2]. Through the machine vision technology, the posture deviation between the assembly parts of the micro-miniature parts and the base parts can be obtained and fed back to the control system to complete the assembly action.
Machine vision technology generally uses image recognition methods, and the template matching method based on features (such as SIFT, SURF, LBP, ORB, etc.) is widely used [3][4][5]. Among them, although the matching method based on ORB features has a slightly lower accuracy than SIFT, the time is greatly shortened compared with SIFT, SURF, etc. [6], so it is the best choice for an automated assembly system that requires efficiency. A vision system based on ORB feature matching for fast coaxial alignment of microminiature parts automated assembly is proposed.

The hardware composition of the vision system for assembly of micro-miniature parts
The vision system for assembly of micro-miniature parts mainly includes two aspects: the vision imaging system and the part pose adjustment mechanism, as shown in Fig.1. The visual imaging system is mainly based on the coaxial alignment module, which is responsible for image acquisition, and the part pose adjustment mechanism is responsible for adjusting the pose deviation of the parts to be assembled and the base part to complete the assembly.  The optical principle of the coaxial alignment system is shown in Fig.2. A beam splitter prism is placed between the assembly parts and the base part. A 45° semi transparent and semi reflective film is placed in the prism, and the camera is placed on the side of the prism to collect the image of the two parts; the part image is collected by controlling the light source, and the position and pose deviation of the two parts are calculated, adjust the deviation of the part pose adjustment mechanism, and complete the assembly process [7].

Calibration of assembly vision system
The calibration of the assembly vision system is an important link to realize the automatic assembly of micro-miniature parts, which directly affects the success of the assembly and the accuracy of the assembly system. The calibration of the micro assembly system in this paper is mainly the calibration of the image coordinate system and the motion axis coordinate system. On the basis of measuring the deviation between the assembly part and the base part, the assembly system adjusts the position of the base part through the part position adjustment mechanism to realize the part assembly. Since the pose deviation obtained by the visual recognition system is the pixel value in the image coordinate system, and the movement of the part pose adjustment mechanism needs to be controlled by the motion controller to send a pulse command, the two coordinate systems are not unified, so the image needs to be calibrated the mapping relationship between the coordinate system and the motion axis coordinate system, including the scale factor (k1, k2, k3) between the image coordinate system and the motion axis coordinate system, and the angle deviation (α, β) between the image coordinate system and the motion axis coordinate system on the x-axis and y-axis. As shown in Fig.3, X-Y is the image coordinate system, and X'-Y' is the motion axis coordinate system. For any point, suppose its coordinates in the image coordinate system are (x, y), and the coordinates in the motion axis coordinate system are (x', y'), satisfy the formula (1): (1) Among them, x', y' are the coordinates of the motion axis coordinate system, x, y are the coordinates of the image coordinate system, θ and θ'are the angle of the image coordinate system and the number of pulses corresponding to the motion axis coordinate system, and α is the X axis and X' the angle between the axis, β is the angle between the Y axis and the Y' axis, and k1, k2, and k3 are the scale factors of the X axis, the Y axis, and the Z axis, respectively.

Image preprocessing
Various noises often exist in the process of acquiring the original image, so it is necessary to preprocess the image to eliminate the noise in the image. Common image preprocessing methods include spatial domain filtering, contrast enhancement, frequency domain filtering, and morphological processing [8].
In this paper, the vision system for assembly of micro-miniature parts selects a flat light source to meet the size requirements of the light source. The light source will generate a large number of noise points, as shown in Fig.4. In order to eliminate noise as much as possible, image preprocessing methods such as gaussian filtering, open operation and close operation process the original image, and the result is shown in Fig.5.   Fig. 4. The original image. Fig. 5. Preprocessed image.

ORB (Oriented Fast and Rotated Brief) is a fast feature point extraction and description algorithm, mainly divided into two parts, based on FAST (Features from Accelerated Segments Test) feature point detection method and BRIEF (Binary Robust Independent
Elementary Features) feature descriptor. The method used to detect FAST feature points in the ORB algorithm is to solve the difference between the four pixels (as shown in Figure 3.3) and the gray level of the center point with the pixel as the center. If the difference is greater than a certain threshold, it is determined it is a characteristic point. The FAST feature points are described by the BRIEF algorithm, and 256 point pairs around the feature points are taken, and the 0-1 sequence is generated by judging the size relationship between the point pairs for description [9].
The extremely short search time of FAST feature points and the simple binary descriptor of BRIEF greatly improve the calculation speed and reduce the calculation time. Therefore, the assembly efficiency requirements for micro assembly systems can be fully met, Fig.7 shows the extraction of the ORB feature points of the gear shaft part picture (red dot in the figure).

RANSAC algorithm to eliminate feature mismatching
The description of ORB features is a binary sequence, which can be quickly matched by KNN. But in the matching process, under-matching, mismatching, etc. are prone to occur, the RANSAC algorithm is adopted to eliminate mismatching [10].
The RANSAC algorithm calculates the transformation matrix by randomly extracting a certain number of sample data, inputs other data into the model, and then continuously updates the interior point set and transformation matrix according to the mean square error cost function, achieve the optimal transformation matrix. As shown in Fig.7 and Fig.8, match results without RANSAC algorithm and match results using RANSAC algorithm are shown respectively. The false matching points are greatly eliminated by RANSAC algorithm, and good matching effect is obtained.
In this paper, the proposed method is verified by the automated assembly of four groups of micro-miniature parts. The four groups of parts are gears and shafts assembly, "B" type parts and base assembly, "I" type parts and base assembly, "T" type parts and base assembly. For each group of parts, a template for the parts to be assembled and a template for the base body with known pose are established, and the assembly is completed by calculating the pose relationship between the template image and the target image.
As shown in Fig.10-Fig.13, they are respectively the results of assembly and matching of gears and shafts, the results of assembly and matching of "B" parts, the results of assembly and matching of "I" parts, and the results of assembly and matching of "T" parts.    Through the transformation matrix between the calibrated image coordinate system and the motion axis coordinate system, the part pose adjustment is calculated, and the part pose adjustment mechanism is used to adjust the base part pose to complete the assembly, the assembly result of parts are shown in Fig.14.  Fig. 14. the assembly results of parts.

Conclusion
The assembly experiment proves the automated assembly system for micro-miniature parts in this paper can realize the ORB feature matching the actual image and the template image in any pose, and the RANSAC algorithm is adopted to eliminate mismatching can get a better matching result. According to the calibration relationship between the image coordinate system and the motion axis and the deviation value between the template image and the target image, the automated assembly process can be completed.