A rapid detection system for the spatial distribution positions of internal parts of complex structural components
Through image acquisition, model training and CT inversion imaging technology, combined with gamma correction and eight-connection domain correction, the problem of spatial distribution position detection of internal parts of complex structural parts is solved, and a fast and accurate detection effect is achieved.
Patent Information
- Application Number
- CN202210249553.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-03-14
AI Technical Summary
The existing X-ray imaging technology cannot quickly and accurately detect the spatial distribution position of parts inside complex structural parts, and the CT imaging method requires a large amount of projection data, and the reconstruction algorithm is complex and cannot meet the real-time requirements.
The image acquisition module, model training module, database module and object detection module are adopted, and the Faster-RCNN network and CT inversion imaging technology are combined with gamma correction and eight-connection domain correction to achieve rapid detection of the spatial distribution position of the part.
It realizes rapid and accurate detection of the spatial distribution position of parts inside complex structural parts, reduces data acquisition time and calculation complexity, and meets the real-time detection requirements.
Smart Images

Figure CN114612435B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of X-ray non-destructive testing, and particularly to a rapid detection system for the spatial distribution position of internal parts of complex structural components. Background Art
[0002] In the fields of instrumentation, electronic assembly, etc., there are many complex structural components with large production batches and short cycles. These structural components contain many complex and precision parts, which block and overlap each other. The structure is complex but indispensable. In the current assembly process, whether it is manual assembly or robot automatic assembly, the internal parts of these structural components are prone to position assembly errors, which will not only cause failures of the parts themselves, reduce product performance or cause functional failures, but also may threaten the life and property safety during production, transportation, storage, and use, resulting in incalculable losses. Therefore, detecting the spatial distribution position of internal parts of complex structural components is an important link to ensure product quality and is still a difficult problem to be solved in the industry;
[0003] Since most complex structural components are encapsulated by opaque metal shells, the current detection of complex structural components mainly relies on X-ray imaging that can penetrate the metal shell to obtain information about the internal structural components. There are still some problems with the existing detection methods: First, with the development of X-ray imaging detection technology, the detection of internal parts of complex structural components combines with convolutional neural networks on the basis of DR imaging technology, directly extracts depth features from the projection map to replace traditional manually designed features for detection, which has the advantages of fast speed and high robustness. However, integral DR imaging cannot present the spatial distribution information of data features and cannot solve the problem of detecting the spatial distribution position of internal parts; Second, the existing X-ray CT imaging detection methods and systems require a sufficient amount of projection data, the reconstruction algorithm is complex, and the imaging efficiency is low, which cannot meet the real-time detection requirements of complex structural components.
[0004] Therefore, people need a rapid detection system for the spatial distribution position of internal parts of complex structural components to solve the above problems. Summary of the Invention
[0005] The purpose of the present invention is to provide a rapid detection system for the spatial distribution position of internal parts of complex structural components to solve the problems raised in the above background art.
[0006] To solve the above technical problems, the present invention provides the following technical solution: A rapid detection system for the spatial distribution position of internal parts of complex structural components, characterized in that: the system includes: an image acquisition module, a model training module, a database module, a target detection module, and a statistical analysis module;
[0007] The image acquisition module is used to acquire a training data set;
[0008] The model training module is used to establish a high-precision detection model for the projection data of complex structural parts;
[0009] The database module is used to establish a part coordinate database;
[0010] The target detection module is used to detect parts and output the part distribution information of the fault plane;
[0011] The statistical analysis module is used to statistically analyze the detection information and output the part detection results.
[0012] Furthermore, the image acquisition module is used to collect the training data set: set the sampling step size to 1 / 3°, collect the projection sequence of the standard qualified parts in the complex structural parts in the full circumferential direction according to the sampling step size, enhance the projection data through the preprocessing means of encoding correction, and map the projection data onto an image with a depth of 8 bits to obtain the enhanced projection data.
[0013] Furthermore, the model training module is used to train the data: after determining the parts to be detected inside the complex structural parts, mark them in the enhanced projection data, make the data set in the VOC2007 format, use the made data set as the training sample, input the training sample into the pre-trained detection network, and train and output a high-precision detection model through transfer learning.
[0014] Furthermore, the detection network is the Faster-RCNN network, and the data training process is as follows: extract the feature map from the input projection data through the Resnet5 feature extraction network and the FPN network to construct a feature pyramid;
[0015] Generate region candidate boxes through the FPN network, calculate the IoU value between the candidate box and the labeled ground truth, use the Softmax classifier to mark the candidate boxes with an IoU value greater than 0.7 as positive samples, mark the candidate boxes with an IoU value less than 0.3 as negative samples, select the candidate boxes with an IoU value greater than 0.5, calculate the translation and scaling coefficients with the labeled ground truth as the target, fine-tune all candidate boxes according to the calculation results, sort the candidate boxes according to the IoU value, and extract the first 300 position-corrected candidate boxes as the region proposal boxes for output. The IoU value refers to the result of dividing the overlapping area part between the candidate box and the labeled value by the set of the candidate box and the labeled value. The labeled value refers to the object target box manually marked on the image, representing the ground truth of the corresponding target;
[0016] Classify and refine the generated candidate boxes through the ROI region pooling and the fully connected layer. Since the parts inside the complex structural parts are densely assembled and there are a large number of small targets, using the Faster-RCNN network to detect the training samples effectively improves the detection accuracy and speed, and ensures the detection accuracy under the product assembly tolerance and tilt state.
[0017] Further, a part coordinate database is established by using the database module: a three-dimensional model of the structural member is reconstructed according to the full circumferential projection sequence of the standard qualified parts; a rotating three-dimensional model is established with a rotation step of 1 / 3°, the fault plane where the center point of the part is located at each angle is obtained, and the coordinates of the center point of the part in the fault plane coordinate system are extracted to establish a part distribution position coordinate database.
[0018] Further, the sampling step is estimated according to the following formula :
[0019] ;
[0020] where m0 represents the minimum distance between the center points of adjacent parts in the same fault plane in the projection direction, m2 represents the distance from the center point of the part to the center point of the fault plane, m1 is the number of parts to be analyzed on the same fault plane, is the rotation angle when the change in the projection coordinates of the part center point is m0 / 2. Based on the sampling step , the projection data is sampled at equal intervals within a semi-circle. The non-linear compensation gamma value is selected through experiments, a gamma mapping table is made according to the value range of the projection data pixel values, and the projection data is enhanced through gamma correction. The projection data is mapped onto an 8-bit depth image and input into the target detection module. The principles of equal interval and multi-angle sampling, as well as the sampling step calculation method, are proposed. Through a reasonable data acquisition mechanism, while ensuring the detection accuracy, the data acquisition cost is reduced, the detection time of complex structural members is effectively reduced, and fast detection is ensured.
[0021] Further, the classification and positioning information of the parts in all the projection data is output through the trained detection network, the central projection points of the parts are extracted, and a simplified discrete projection model is constructed. The position distribution information of the parts is solved through CT inversion: the projection data of the parts is equivalent to the central projection points, and the remaining projection pixels that do not affect the detection are set as the background with a pixel value of 0. One pixel is set as one unit to establish a simplified discrete projection model. The fault plane to be inverted is confirmed according to the following formula:
[0022] ;
[0023] where X represents the N pixel values of the image of the fault plane to be inverted, the matrix shown by X is the matrix of the fault plane to be inverted, p represents the projection data corresponding to M rays, R represents the projection matrix, and each element r in R ijIt represents the weight coefficient of the j-th pixel point for the projection value corresponding to the i-th ray. According to the sampling angle, the intersection points of the back-projection lines evenly distributed are screened, and the intersection points of the back-projection lines are used as the part position analysis points. The part position distribution is determined by CT inversion. Using CT inversion imaging, the detection problem of the two-dimensional projection data of complex structural parts is transformed into the detection of the tomographic plane, avoiding the influence of part occlusion, and solving the difficult problem of detecting the spatial distribution position of internal parts of complex structural parts.
[0024] Further, correct the part position analysis points: introduce the eight-connected domain as the correction value. If the number of back-projection lines within the eight-connected domain passing through any random point is not less than the sampling number, divide this point into candidate points, and screen the part position analysis points according to the following formula:
[0025] ;
[0026] Among them, x1 and y1 respectively represent the horizontal and vertical coordinates of the candidate point, x0 and y0 respectively represent the horizontal and vertical coordinates of the center point of the tomographic plane, and R represents the distance between the center point of the part in the standard qualified part and the center point of the tomographic plane. Screen the candidate points that meet the above formula as the part position analysis points, and output the coordinate information of the part position analysis points to the statistical analysis module. Due to errors such as the error of the equivalent part projection center point and data rounding, multiple back-projection lines always intersect in a region rather than at a single point. Introducing the eight-connected domain as the correction value avoids generating wrong solutions and improves the accuracy of detection.
[0027] Further, use the statistical analysis module to statistically analyze the detection information and output the part detection result: count the number of part position analysis points and compare it with the number of standard qualified parts: if the number of part position analysis points is less than the number of standard qualified parts, directly judge the corresponding structural part as a non-conforming product, and complete the detection by comparing the coordinates of the part position analysis points with the tomographic plane coordinate database.
[0028] Further, correct the detection result: judge whether the structural part is a qualified product according to the following formula:
[0029] ;
[0030] Among them, x j , y j respectively represent the horizontal and vertical coordinates of any random part position analysis point. If all the part position analysis points can find the coordinates (x i , y i ) that meet the above formula at any angle in the coordinate database, it means that (x j , y j ) and (x i , y iIf the coordinate difference of ( ) is within one pixel, the corresponding structural member is judged as a qualified product; otherwise, the corresponding structural member is judged as an unqualified product, and the detection result is output. Since the region setting during CT inversion causes a certain error between the detection result and the true value, a correction amount is introduced to correct the detection result, improving the accuracy of the detection result.
[0031] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0032] The present invention uses CT inversion imaging to transform the detection problem of two-dimensional projection data of complex structural members into the detection of tomographic planes, avoiding the influence of part occlusion and solving the difficult problem of detecting the spatial distribution position of internal parts of complex structural members;
[0033] According to the sampling principle of equal interval, multi-angle, and using prior information to calculate the maximum sampling step size, the amount of projection data obtained is effectively reduced, and the data acquisition time is reduced;
[0034] By adopting the method of equivalent center point of parts to simplify the projection data, the complexity of CT inversion calculation is effectively reduced on the premise of ensuring the detection accuracy, thereby improving the speed of on-line detection and realizing rapid detection. Description of the Drawings
[0035] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation to the present invention. In the drawings:
[0036] Figure 1 is a schematic diagram of the composition of a rapid detection system for the spatial distribution position of internal parts of a complex structural member according to the present invention;
[0037] Figure 2 is a structural diagram of the part recognition model of Faster-RCNN of the present invention;
[0038] Figure 3 is a schematic diagram of the projection model of the present invention;
[0039] Figure 4 is a schematic diagram of the simplified projection model of the present invention;
[0040] Figure 5 is a detection flow chart of the present invention;
[0041] Figure 6 is a schematic diagram of the part distribution tomographic plane of the present invention;
[0042] Figure 7 (a) is a schematic cross-sectional view of a qualified structural member in the first embodiment of the present invention;
[0043] Figure 7 (b) is a schematic diagram of the position distribution information of steel balls in the first embodiment of the present invention. DETAILED DESCRIPTION
[0044] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0045] See also Figure 1 - Figure 7, the present invention provides a technical solution: a system for rapid detection of the spatial distribution position of parts inside a complex structural part, characterized in that the system includes: an image acquisition module, a model training module, a database module, a target detection module, and a statistical analysis module;
[0046] The image acquisition module is used to collect training data sets;
[0047] The model training module is used to establish a high-precision detection model for projection data of complex structural parts;
[0048] The database module is used to establish a part coordinate database;
[0049] The target detection module is used to detect parts and output the part distribution information on the fault surface;
[0050] The statistical analysis module is used to statistically analyze the inspection information and output the part inspection results.
[0051] The training data set was collected using the image acquisition module. The sampling step was set to 1 / 3°, and the projection sequence of the standard qualified parts in the complex structural parts in all circumferential directions was collected according to the sampling step. The projection data was enhanced through the code correction preprocessing method, and the projection data was mapped onto an 8-bit depth image to obtain the enhanced projection data.
[0052] Use the model training module to train data: After determining the parts to be inspected inside the complex structure, annotate them in the enhanced projection data, create a dataset in the VOC2007 format, use the prepared dataset as training samples, input the training samples into the pre-trained detection network, and output a high-precision detection model through transfer learning training.
[0053] The detection network is the Faster-RCNN network. The data training process is as follows: the feature map is extracted from the input projection data through the Resnet5 feature extraction network and the FPN network, and the feature pyramid is constructed.
[0054] Generate region candidate boxes through the FPN network, calculate the IoU value between the candidate boxes and the labeled ground truth, use the Softmax classifier to label the candidate boxes with an IoU value greater than 0.7 as positive samples, label the candidate boxes with an IoU value less than 0.3 as negative samples, select the candidate boxes with an IoU value greater than 0.5, calculate the translation and scaling coefficients with the labeled ground truth as the target, fine-tune all candidate boxes according to the calculation results, sort the candidate boxes according to the IoU value, and extract the first 300 candidate boxes with corrected positions as the region proposal boxes for output;
[0055] Classify and refine the bounding boxes of the generated candidate boxes through the ROI pooling and fully connected layers.
[0056] Use the database module to establish a part coordinate database: reconstruct the 3D model of the structural part according to the full circumferential projection sequence of the standard qualified part; establish a rotating 3D model with a rotation step of 1 / 3°, obtain the tomographic plane where the center point of the part is located at each angle, and extract the coordinates of the center point of the part in the coordinate system of the tomographic plane to establish a part distribution position coordinate database.
[0057] Estimate the sampling step according to the following formula :
[0058] ;
[0059] where, m0 represents the minimum distance between the center points of adjacent parts in the same tomographic plane in the projection direction, m2 represents the distance from the center point of the part to the center point of the tomographic plane, m1 is the number of parts to be analyzed in the same tomographic plane, is the rotation angle when the change in the projection coordinates of the center point of the part is m0 / 2. According to the sampling step , sample the projection data at equal intervals within a semicircle, select the non-linear compensation gamma value through experiments, make a gamma mapping table according to the value range of the projection data pixel values, enhance the projection data through gamma correction, map the projection data onto an 8-bit depth image, and input it into the target detection module. In the prior art, in order to reconstruct each pixel, a sampling step of up to 1 degree is used for sampling, which takes a long time and cannot meet the real-time requirements in actual generation. The present invention conducts reconstruction for the purpose of restoring the internal part positions, proposes a corresponding sampling step estimation method, reduces the number of image acquisitions as much as possible while ensuring the reconstruction accuracy, reduces the data acquisition time on the one hand, and reduces the calculation amount during reconstruction on the other hand, realizes fast detection, meets the real-time requirements of factory applications, combines the Nyquist sampling theorem idea to detect the structural part, and ensures that the complete structure of the structural part can be restored from the sampling data.
[0060] Output the classification and positioning information of the parts in all projection data through the trained detection network, extract the central projection points of the parts, construct a simplified discrete projection model, and solve the position distribution information of the parts through CT inversion: Equivalent the projection data of the parts with the central projection points, set the remaining projection pixels that do not affect the detection as the background with a pixel value of 0, set one pixel as a unit, establish a simplified discrete projection model, and determine the tomographic plane to be inverted according to the following formula:
[0061] ;
[0062] where X represents the N pixel values of the tomographic plane image to be inverted, p represents the projection data corresponding to M rays, R represents the projection matrix, and each element r in R ij represents the weight coefficient of the j-th pixel point for the projection value corresponding to the i-th ray. Select the intersection points of the back-projection lines distributed at equal intervals according to the sampling angle, and use the intersection points of the back-projection lines as the part position analysis points.
[0063] Correct the part position analysis points: Introduce the eight-connected domain as the correction value. If the number of back-projection lines within the eight-connected domain passing through a random point is not less than the sampling number, divide this point into candidate points, and screen the part position analysis points according to the following formula:
[0064] ;
[0065] where x1 and y1 represent the horizontal and vertical coordinates of the candidate point respectively, x0 and y0 represent the horizontal and vertical coordinates of the center point of the tomographic plane respectively, and R represents the distance between the center point of the part in the standard qualified part and the center point of the tomographic plane. Screen the candidate points that meet the above formula as the part position analysis points. The correct analysis points should be located within the eight-connected circumference with the distance between the part and the center point of the tomographic plane as the radius and the center point of the tomographic plane as the center, and output the coordinate information of the part position analysis points to the statistical analysis module.
[0066] Use the statistical analysis module to statistically analyze the detection information and output the part detection result: Count the number of part position analysis points and compare it with the number of standard qualified parts. If the number of part position analysis points is less than the number of standard qualified parts, directly judge the corresponding structural part as a non-conforming product, and complete the detection by comparing the coordinate of the part position analysis point with the tomographic plane coordinate database.
[0067] Correct the detection result: Judge whether the structural part is a qualified product according to the following formula:
[0068] ;
[0069] where x j 、y jrespectively represent the abscissa and ordinate of a randomly selected part position analysis point. If the coordinates (x i , y i ) of any angle can be found in the coordinate database for all part position analysis points, it indicates that the coordinate difference between (x j , y j ) and (x i , y i ) is within one pixel. The corresponding structural part is judged as a qualified product; otherwise, it is judged as an unqualified product, and the detection result is output.
[0070] Example 1: For a part to be inspected of a certain complex structural part: five similar steel balls evenly distributed at equal intervals around the central axis are detected. The cross-sectional schematic diagram of the qualified structural part is shown in Figure 7(a). For this structural part, after completing image acquisition, model training, and coordinate database establishment in the offline learning part using a standard qualified part, the part to be inspected is selected for online detection: Estimate the sampling step according to the prior information of the product: in this model, m0 = 1.8 mm, m2 = 2.6 mm, m1 = 5. According to the formula Calculate to obtain = 49°, . To ensure the best detection speed, 36° is selected as the sampling step. Five projection data of the structural part to be inspected are collected at equal intervals according to the sampling step within a semi-circle, processed and input into the target detection module. On the basis of Faster-RCNN detection, the center points of each steel ball are extracted to invert the fault plane, and the inversion result is input into the statistical analysis module to obtain the information of the five steel balls and their position distributions: as shown in Figure 7(b), it is compared with the coordinate database established in the offline learning part, and the structural part is judged as a qualified product.
[0071] Finally, it should be noted that the above are only preferred examples of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A rapid detection system for the spatial distribution position of internal parts of a complex structural part, characterized in that: The system includes: an image acquisition module, a model training module, a database module, a target detection module and a statistical analysis module; The image acquisition module is used to acquire a training data set; The model training module is used to establish a high-precision detection model for projection data of complex structural parts; The database module is used to establish a parts coordinate database; The target detection module is used to detect parts and output part distribution information on the fault surface; The statistical analysis module is used to statistically analyze the detection information and output the parts detection results; Using the model training module to train data: After determining the parts to be inspected inside the complex structure, annotate them in the enhanced projection data, create a data set in the VOC2007 format, use the created data set as training samples, input the training samples into the pre-trained detection network, and output a high-precision detection model through transfer learning training; The trained detection network outputs the classification and positioning information of the parts in all projection data, extracts the center projection point of the part, constructs a simplified discrete projection model, and solves the part position distribution information through CT inversion: the projection data of the part is equivalent to the center projection point, and the remaining projection pixels that do not affect the detection are set to the background with a pixel value of 0. One pixel is set as a unit, and a simplified discrete projection model is established. The fault plane to be inverted is determined according to the following formula: ; Among them, X represents the N pixel values of the tomographic plane image to be inverted, p represents the projection data corresponding to M rays, R represents the projection matrix, and each element r in R ij represents the weight coefficient of the j-th pixel point for the projection value corresponding to the i-th ray. The intersection points of the back-projection lines evenly distributed are selected according to the sampling angle, and the intersection points of the back-projection lines are used as the part position analysis points; Correct the part position resolution point: introduce the eight-connected domain as the correction value. If the number of back-projected lines in the eight-connected domain passing through a random point is not less than the number of samples, the point is classified as a candidate point. The part position resolution point is selected according to the following formula: ; Among them, x1 and y1 respectively represent the horizontal and vertical coordinates of the candidate point, x0 and y0 respectively represent the horizontal and vertical coordinates of the center point of the fault plane, and R represents the distance between the center point of the part in the standard qualified part and the center point of the fault plane. The candidate points that meet the above formula are selected as the part position resolution points, and the coordinate information of the part position resolution points is output to the statistical analysis module.
2. A rapid detection system for the spatial distribution position of internal parts of a complex structural member according to claim 1, characterized in that: The image acquisition module is used to collect a training data set: the sampling step is set to 1 / 3°, and the projection sequence of the standard qualified parts in the complex structural parts in all circumferential directions is collected according to the sampling step. The projection data is enhanced by the code correction preprocessing method, and the projection data is mapped on an 8-bit depth image to obtain the enhanced projection data.
3. A rapid detection system for the spatial distribution position of internal parts of a complex structural member according to claim 1, characterized in that: The detection network is a Faster-RCNN network, and the data training process is as follows: extracting feature maps from the input projection data through the Resnet5 feature extraction network and the FPN network, and constructing a feature pyramid; Generate region proposals through the FPN network, calculate the IoU value between the proposal and the ground truth, use the Softmax classifier to mark the proposal with an IoU value greater than 0.7 as a positive sample, and mark the proposal with an IoU value less than 0.3 as a negative sample. Select the proposal with an IoU value greater than 0.5 to calculate the translation and scaling coefficients based on the ground truth. Fine-tune all proposals based on the calculation results, sort the proposals by IoU value, and extract the top 300 proposals after position correction as the output region proposals. Classify and refine the generated candidate bounding boxes through ROI pooling and fully connected layers.
4. A rapid detection system for the spatial distribution position of internal parts of a complex structural part according to claim 1, characterized in that: Use the database module to establish a part coordinate database: reconstruct the 3D model of the structural part according to the full circumferential projection sequence of the standard qualified part; establish a rotated 3D model with a rotation step of 1 / 3°, obtain the fault plane where the center point of the part is located at each angle, and extract the coordinates of the center point of the part in the fault plane coordinate system to establish a part distribution position coordinate database.
5. A rapid detection system for the spatial distribution position of internal parts of a complex structural part according to claim 2, characterized in that: Estimate the sampling step according to the following formula : ; Among them, m0 represents the minimum distance between the center points of adjacent parts in the same layer plane in the projection direction, m2 represents the distance from the center point of the part to the center point of the tomographic plane, and m1 is the number of parts to be analyzed on the same tomographic plane. It is the rotation angle when the change in the projection coordinate of the center point of the part is m0 / 2. According to the sampling step , the projection data is sampled at equal intervals within a semi-circle. The non-linear compensation gamma value is selected through experiments. A gamma mapping table is made according to the value range of the projection data pixel values, and the projection data is enhanced through gamma correction. The projection data is mapped onto an image with an 8-bit depth and input into the target detection module.
6. The rapid detection system for the spatial distribution position of internal parts of a complex structural member according to claim 1, wherein: Use the statistical analysis module to statistically analyze the detection information and output the part detection results: count the number of part position analysis points and compare it with the number of standard qualified parts. If the number of part position analysis points is less than that of the standard qualified parts, directly judge the corresponding structural part as a non-conforming product, and complete the detection by comparing the coordinates of the part position analysis points with the fault plane coordinate database.
7. A rapid detection system for the spatial distribution position of internal parts of a complex structural part according to claim 6, characterized in that: Correct the detection results: judge whether the structural part is a qualified product according to the following formula: ; Among them, x j , y j respectively represent the horizontal and vertical coordinates of a randomly selected part position analysis point. If the coordinates (x i , y i ) of all part position analysis points can be found in the coordinate database to satisfy the above formula, it indicates that the coordinate difference between (x j , y j ) and (x i , y i ) is within one pixel. The corresponding structural part is judged as a qualified product, otherwise the corresponding structural part is judged as an unqualified product, and the detection result is output.