A method for detecting engine parts missing or incorrect assembly based on visual inspection

Through the visual inspection method and the use of light source and shadow analysis algorithms, the problem of judging the installation position of engine parts is solved, all-round and high-precision inspection is achieved, and product quality and safety are improved.

CN118190959BActive Publication Date: 2024-09-24GUANGDONG JIUTONG INTELLIGENT EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410374859.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2024-09-24
Estimated Expiration
2044-03-29

AI Technical Summary

Technical Problem

Existing methods for detecting misinstallation of engine parts are difficult to determine whether the parts are accurately installed in place, and traditional methods rely on manual vision and are easily affected by subjective judgments. The detection efficiency and accuracy are limited, and it is difficult to meet the high-precision detection needs in a mass production environment. .

Method used

Using a method based on visual inspection, the engine image is obtained through the illumination of the first light source and the second light source. Combined with the trained part detection model and shadow analysis algorithm, the spatial position data of the part is calculated to determine whether the part is installed in place according to the design requirements, and Generate inspection report.

Benefits of technology

It achieves all-round, high-precision detection of incorrectly installed engine parts, makes up for the detection blind spots of existing methods, significantly reduces the rate of defective products, and improves product quality and safe equipment operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118190959B
    Figure CN118190959B
Patent Text Reader

Abstract

The present invention discloses a method for detecting the mis-assembly or missing assembly of engine parts based on visual inspection, comprising: a first light source is used to vertically illuminate an engine image, and a training model is input to identify the data of parts that are mis-assembled, missing, and need secondary inspection; a second light source is used to illuminate at a preset angle to generate a second image containing shadow information, and its first spatial position is calculated by combining the shadow analysis algorithm with the secondary inspection part data. At the same time, the second spatial position data of the normal reference at the preset angle is obtained, and the second spatial position data of the corresponding parts is obtained from the standard database. The first and second spatial position data are compared to determine the assembly defect part data, and a detection report is generated in combination with the initial recognition result. The present invention changes the traditional front parallel light source illumination method and adopts a specific angle light source illumination to reveal the hidden mis-assembly problem caused by the change of the installation position, realizes the all-round detection of the mis-assembly or missing assembly of parts, and makes up for the detection blind spot of the existing method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence image recognition, and in particular to a method for detecting engine parts mis-assembly or omission based on visual detection. Background Art

[0002] With the continuous advancement of industrial manufacturing technology, especially in the field of precision machinery manufacturing, the requirements for the assembly accuracy of parts are increasing day by day. As the core component of precision machinery, the correct installation and close cooperation of the internal parts of the engine directly determine the overall performance and operational reliability. However, in the actual production process, it is difficult to completely avoid the mis-installation and missing installation of parts, which may not only cause abnormal operation and performance degradation of the engine, but even cause safety accidents in serious cases. Therefore, effectively detecting and preventing the problem of mis-installation and missing installation of engine parts has become a key link in improving the level of product quality control and ensuring the safe operation of equipment.

[0003] At present, the detection of engine parts mis-installation and missing assembly mainly relies on one-time irradiation with a frontal parallel light source. Although it can identify some obvious problems, it has detection limitations and it is difficult to determine whether the parts are accurately installed. In addition, the traditional method relies on manual visual inspection, which is easily affected by subjective judgment, and the detection efficiency and accuracy are limited. It is difficult to meet the comprehensive and high-precision detection needs of mis-installation and missing parts in a large-scale production environment. Summary of the invention

[0004] In order to solve at least one of the technical problems mentioned above, the present invention provides an engine parts mis-installation or missing assembly detection method based on visual inspection to solve the problem that it is difficult to determine whether the components are accurately installed during the engine parts mis-installation or missing assembly detection process.

[0005] A method for detecting mis-assembly or missing assembly of engine parts based on visual inspection is provided, comprising:

[0006] Under the illumination of a first light source, a first image of the engine to be inspected is obtained, wherein the first light source is located directly above the engine to be inspected and illuminates the engine perpendicularly to the surface of the engine;

[0007] Inputting the first image into a trained part detection model to obtain mis-installed part data, missing part data, and secondary detection part data;

[0008] Using a second light source to illuminate the engine to be inspected at a preset incident angle to obtain a second image of the engine to be inspected, wherein the second image contains part shadow information;

[0009] Based on the second image and the secondary inspection part data, extracting and calculating the first spatial position data corresponding to the secondary inspection part through a preset shadow analysis algorithm;

[0010] Acquire the normal reference second spatial position data of the corresponding part under the preset incident angle;

[0011] In a pre-built standard reference database, obtaining second spatial position data of the corresponding part at the preset incident angle;

[0012] Obtaining assembly defective part data according to the first spatial position data and the second spatial position data;

[0013] A detection report is obtained based on the mis-installed parts data, the missing parts data and the assembly defect parts data.

[0014] Preferably, the step of inputting the first image into a trained part detection model to obtain mis-installed part data, missing part data and secondary detection part data includes:

[0015] Locate the area of ​​the part to be detected according to the first image and crop it to generate multiple images of the part to be detected;

[0016] Performing directional gradient histogram processing on the image of the part to be detected respectively to obtain multiple HOG feature vectors;

[0017] Input the HOG feature vector into the trained SVM classifier to obtain the corresponding part type;

[0018] Comparing the part types at different locations with preset reference part types;

[0019] If the part type is inconsistent with the reference part type, generating the mis-installed part data;

[0020] If the part type is empty, the missing part data is generated;

[0021] If the part type is consistent with the reference part type, the secondary inspection part data is generated.

[0022] Preferably, after inputting the HOG feature vector into a trained SVM classifier to obtain the corresponding part type, the method further includes:

[0023] If it is detected that the image of the part to be detected contains marking data, the marking data includes text data and pattern data;

[0024] Performing mark recognition on the image of the part to be detected to obtain mark recognition data;

[0025] Based on a preset similarity threshold, performing preset threshold matching on the marker recognition data in a reference marker recognition database;

[0026] If the match is successful, the part type is determined;

[0027] If the match fails, the corresponding parts are marked and manually reviewed.

[0028] Preferably, the step of using a second light source to illuminate the engine to be inspected at a preset angle to obtain a second image of the engine to be inspected includes:

[0029] The second light source illuminates the engine to be inspected at an incident angle between 30° and 80° to obtain the second image.

[0030] Preferably, based on the second image and the secondary inspection part data, extracting and calculating the first spatial position data corresponding to the secondary inspection part by a preset shadow analysis algorithm includes:

[0031] Locate and crop the secondary inspection part according to the second image to generate a plurality of secondary inspection part images;

[0032] Based on the secondary inspection part data, obtaining the size information of the secondary inspection part;

[0033] A calculation is performed based on the shadow information of the secondary inspection part image and the size information of the secondary inspection part to obtain the first spatial position data of the secondary inspection part.

[0034] Preferably, the calculation based on the shadow information of the secondary inspection part image and the size information of the secondary inspection part to obtain the first spatial position data of the secondary inspection part includes:

[0035] Based on the shadow information of the secondary detected part image, a maximum projection length is obtained;

[0036] Based on the size information of the secondary detected part, data correction is performed on the maximum projection length;

[0037] According to the maximum projection length after data correction and the incident angle of the second light source, the distance between the upper surface of the secondary detection part and the mounting plane is calculated. The calculation process is shown as follows:

[0038] ,

[0039] in, Indicates the distance between the upper surface of the secondary inspection part and the mounting plane. represents the maximum projection length, represents the incident angle of the second light source.

[0040] Preferably, obtaining assembly defective part data according to the first spatial position data and the second spatial position data includes:

[0041] Calculating a difference between the first spatial position data and the second spatial position data;

[0042] Comparing the difference with a preset error threshold;

[0043] If the difference is greater than a preset error threshold, the assembly defective part data is generated;

[0044] If the difference is smaller than a preset error threshold, qualified installation part data is generated.

[0045] Preferably, before obtaining the maximum projection length based on the shadow information of the secondary detected part image, the method further includes: performing binarization processing on the secondary detected part image.

[0046] Preferably, the mis-installed part data includes the mis-installed part number, mis-installed position and mis-installed type;

[0047] The missing parts data includes the missing parts number and the missing parts position;

[0048] The assembly defect part data includes the assembly defect part type, installation position, and position deviation value.

[0049] Preferably, when at least one of the wrongly installed part data, the missing part data or the assembly defective part data is detected, an alarm message is issued and the detection report is pushed to the management personnel.

[0050] The beneficial effects of the present invention are:

[0051] (1) The present invention changes the traditional frontal parallel light source irradiation mode and adopts a light source with a specific angle to irradiate, which can reveal the hidden mis-installation problem caused by the change of the installation position, realize the all-round detection of the wrong or missed installation of parts, and make up for the detection blind spot of the existing method;

[0052] (2) Based on shadow analysis technology, the present invention can accurately calculate the distance between the top of the component and the installation plane by calculating the relationship between the shadow size of the component and the incident angle at a specific incident angle, thereby accurately judging whether the component is accurately installed in place according to the design requirements, thus filling the gap in the prior art in judging whether the component is installed in place;

[0053] (3) The present invention helps to timely discover and correct assembly errors by conducting comprehensive, accurate and efficient detection of incorrect or missing parts, thereby preventing problematic parts from flowing into subsequent processes or the market, significantly reducing the defective product rate, improving product quality, and ensuring the safe operation of equipment, which has effectively promoted the improvement of the quality control level of the precision machinery manufacturing industry.

[0054] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.

[0056] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to illustrate the technical solutions disclosed in the present invention.

[0057] Figure 1 A schematic flow chart of a method for detecting mis-assembly or missing assembly of engine parts based on visual inspection provided by an embodiment of the present invention;

[0058] Figure 2 A schematic diagram of the workflow of a parts detection model provided by an embodiment of the present invention;

[0059] Figure 3 A cross-sectional view of a component to be inspected and its shadow at an incident angle of 30° provided by an embodiment of the present invention;

[0060] Figure 4 A reference component and shadow cross-section diagram of normal installation at an incident angle of 30° provided by an embodiment of the present invention;

[0061] Figure 5 A cross-sectional view and a top view of a component to be inspected and its shadow at an incident angle of 60° provided by an embodiment of the present invention;

[0062] Figure 6 A cross-sectional view and a top view of reference components and shadows normally installed at an incident angle of 60° provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0063] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0064] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0065] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0066] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0067] In addition, in order to better illustrate the present invention, numerous specific details are provided in the following specific embodiments. It should be understood by those skilled in the art that the present invention can be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.

[0068] At present, traditional methods rely on manual visual inspection, which is easily affected by subjective judgment, and has limited detection efficiency and accuracy. It is difficult to meet the comprehensive and high-precision detection needs for component misassembly and missing assembly problems in large-scale production environments.

[0069] A method for detecting engine parts missing or incorrect assembly based on visual inspection is provided. Figure 1 ,include:

[0070] S100, obtaining a first image of the engine to be inspected under illumination by a first light source, wherein the first light source is located directly above the engine to be inspected and illuminates the engine perpendicularly to the surface of the engine;

[0071] In this embodiment, a first light source is configured to image the engine to be inspected. The first light source is arranged directly above the engine to be inspected, and ensures that the light of the first light source is perpendicular to the surface of the engine. Under the illumination of the first light source, a first image of the engine to be inspected is captured by an image acquisition device, and the first image clearly shows the overall structure of the engine and the various parts installed on it.

[0072] S200, inputting the first image into a trained part detection model to obtain mis-installed part data, missing part data, and secondary detection part data;

[0073] In this embodiment, the first image is input into a pre-trained parts detection model, which uses deep learning or machine learning algorithms to train a large number of labeled engine parts images to identify the various parts and their states in the first image; the parts detection model outputs misinstalled parts data, missing parts data, and parts data that require secondary inspection, wherein the misinstalled parts data include the type, position, and possible misinstallation direction of the misinstalled parts, the missing parts data include a list of parts that should be installed but are not installed, and the secondary inspection parts data include part information whose assembly status needs further confirmation due to factors such as image complexity or occlusion.

[0074] S300, using a second light source to illuminate the engine to be inspected at a preset incident angle to obtain a second image of the engine to be inspected, where the second image contains part shadow information;

[0075] In this embodiment, a second light source is provided, and the second light source illuminates the engine to be inspected at a preset non-vertical angle of incidence, so that the light generated by the second light source generates a part shadow with position characteristics on the engine surface; a second image of the engine to be inspected is acquired by an image acquisition device under the illumination condition of the second light source, and the second image contains shadow information of each part formed by the non-vertical illumination, and the shadow information can reflect the height of the part relative to the engine surface and the angular relationship of the part relative to the light source.

[0076] S400, based on the second image and the secondary inspection part data, extracting and calculating the first spatial position data corresponding to the secondary inspection part by a preset shadow analysis algorithm;

[0077] For the parts listed in the secondary inspection part data, the second image is processed using a preset shadow analysis algorithm, which includes but is not limited to edge detection, grayscale gradient analysis, contour tracking and other technologies, and is used to accurately extract the shadow contour of the secondary inspection part from the second image; further based on the shadow contour, the first spatial position data of the secondary inspection part in the second image is calculated, and the first spatial position data includes at least the relative height, azimuth and pitch angle of the part in three-dimensional space.

[0078] S500, obtaining second spatial position data of a normal reference of a corresponding part under a preset incident angle;

[0079] For each secondary inspection part, the second spatial position data of the corresponding part in the normal assembly state under the preset incident angle is calculated according to the preset incident angle and the design parameters of the part during the engine assembly process. The second spatial position data reflects the theoretical position information of the part relative to the engine surface when there are no assembly defects.

[0080] S600, obtaining second spatial position data of a corresponding part at a preset incident angle from a pre-built standard reference database;

[0081] In this embodiment, a pre-constructed standard reference database is accessed, which stores standard spatial position data of various engine parts at different incident angles; the standard second spatial position data of the secondary inspection parts at a preset incident angle is queried and obtained, and the standard second spatial position data is used as a reference for evaluating the actual assembly state of the parts.

[0082] S700, obtaining assembly defective part data according to the first spatial position data and the second spatial position data;

[0083] The first spatial position data is compared with the second spatial position data and the standard second spatial position data, and whether the secondary inspection part has an assembly defect is determined based on the comparison result, and corresponding assembly defect part data is generated. The assembly defect part data includes the part identification with the assembly defect, the deviation value between the actual position and the theoretical position or the standard position, and the possible defect type.

[0084] S800, obtaining a test report based on the wrongly installed parts data, the missing parts data and the assembly defect parts data.

[0085] Based on the above-mentioned data of mis-installed parts, missing parts and assembly defective parts, a detailed inspection report is generated. The inspection report includes but is not limited to a list of mis-installed parts, a list of missing parts, a detailed description of assembly defective parts, a position deviation diagram and an overall assembly quality assessment conclusion, providing a basis for subsequent maintenance, correction or quality control.

[0086] Preferably, reference Figure 2 , input the first image into the trained part detection model to obtain the wrongly installed part data, the missing part data and the secondary detection part data, including:

[0087] S210, locating the area of ​​the part to be detected according to the first image and cropping it to generate a plurality of images of the part to be detected;

[0088] S220, performing directional gradient histogram processing on the images of the parts to be detected respectively to obtain multiple HOG feature vectors;

[0089] S230, inputting the HOG feature vector into the trained SVM classifier to obtain the corresponding part type;

[0090] S240, comparing the part types at different positions with preset reference part types;

[0091] S250, if the part type is inconsistent with the reference part type, generating wrongly installed part data;

[0092] S260, if the part type is empty, generating missing parts data;

[0093] S270: If the part type is consistent with the reference part type, secondary inspection part data is generated.

[0094] In this embodiment, the first image of the engine to be inspected is subjected to image analysis, and the regions where the parts to be inspected are located are accurately located by means of advanced edge detection, contour extraction, etc. Subsequently, a series of independent images of the parts to be inspected are cropped from the original image based on the boundaries of these regions, ensuring that each cropped image contains only a single part or a group of parts, which is convenient for subsequent feature extraction and classification.

[0095] For each cropped image of the part to be detected, the Histogram of Oriented Gradients (HOG) algorithm is applied for feature extraction. The HOG feature effectively captures the key information of the part shape and texture by counting the pixel gradient intensity and its directional distribution in the local area of ​​the image. After this operation, each image of the part to be detected will be converted into a high-dimensional HOG feature vector, which can quantify the visual characteristics of the part and has strong robustness and is not affected by factors such as lighting and color changes.

[0096] The multiple HOG feature vectors obtained above are used as input to the trained Support Vector Machine (SVM) classifier. The classifier is trained based on a large number of labeled part samples and has strong pattern recognition capabilities. For each HOG feature vector of the part image to be detected, the SVM classifier will output its corresponding part type, such as piston, connecting rod, crankshaft, etc.

[0097] Each part type identified by the SVM classifier is associated with its expected position in the preset reference structure, that is, it is compared one by one with the preset reference part type. The comparison rules are as follows:

[0098] If the recognition result of a part type is inconsistent with the preset reference part type at that position, it indicates that the part is mistakenly installed at a position where it should not belong. At this time, the system records the part and its position information and generates the wrongly installed part data; if no part type is detected at a preset position, that is, the part type output by the SVM classifier is empty, it means that the part that should be installed at that position is actually missing, and the system generates the missing part data accordingly; if the recognition result of a part type is consistent with the preset reference part type at that position, but considering the potential errors of visual inspection or the misjudgment that may be caused by complex assembly conditions, for such parts, the system marks them as requiring secondary inspection. Secondary inspection usually involves the use of other inspection methods (such as shadow analysis in steps S300 and S400) to further confirm their assembly status. The generated part information and position constitute the secondary inspection part data.

[0099] By combining advanced image analysis techniques (such as edge detection and contour extraction) and efficient feature extraction algorithms (such as HOG), the positions of the engine parts to be inspected can be accurately located and their types can be accurately identified. This precise positioning and identification capability significantly improves the accuracy of detection and reduces the false detection rate caused by human judgment. Furthermore, the entire detection process is highly automated, and no human intervention is required from image processing, feature extraction, part type classification to mis-assembly judgment, which greatly saves labor costs and improves detection efficiency. It is especially suitable for batch detection in large-scale production environments. The HOG feature vector used has good robustness to actual working conditions such as illumination changes, viewing angle differences, and partial occlusion, so that the system's detection performance remains stable under complex lighting conditions and multi-angle shooting. At the same time, as a mature machine learning model, support vector machine (SVM) has the characteristics of strong generalization ability and good anti-overfitting effect, and can effectively cope with various parts recognition tasks under unknown conditions.

[0100] Preferably, after the HOG feature vector is input into the trained SVM classifier to obtain the corresponding part type, the following steps are further included:

[0101] If it is detected that the image of the part to be detected contains marking data, the marking data includes text data and pattern data;

[0102] Perform mark recognition on the image of the part to be inspected to obtain mark recognition data;

[0103] Based on a preset similarity threshold, performing preset threshold matching on the marker recognition data in a reference marker recognition database;

[0104] If the match is successful, the part type is determined;

[0105] If the match fails, the corresponding parts are marked and manually reviewed.

[0106] In this embodiment, after obtaining the part type corresponding to the HOG feature vector, the system further checks whether the image of the part to be detected contains tag data. These tag data can be in text form (such as part number, model, etc.) or pattern form (such as barcode, QR code, special logo, etc.), which is used to assist or confirm the identity information of the part.

[0107] For the image of the part to be inspected that contains marking data, a special marking recognition algorithm (such as OCR optical character recognition, QR code recognition, etc.) is used to parse it and extract specific marking recognition data, such as part number, model or coding information.

[0108] The extracted mark recognition data is compared with a pre-built reference mark recognition database. The reference database stores all part mark data expected to appear on the engine and their corresponding correct part types. During the comparison process, a preset similarity threshold is set. Only when the similarity between the mark recognition data and the data recorded in the database exceeds the threshold, the match is considered successful.

[0109] If the mark identification data is successfully matched in the reference database, it means that the consistency between the mark data and the corresponding part type has been verified. At this time, the system directly adopts the matching result to determine the type of the part. If the mark identification data fails to find a match in the reference database with a similarity exceeding the preset threshold, there may be a mark identification error, abnormal mark data, or the part itself is an unexpected component. At this time, the system will mark the part as "requires manual review" and submit the image of the part to be tested and its mark identification data to the manual review link. Professionals will carefully check the image and mark to finally determine the part type.

[0110] In this embodiment, on the basis of the original part type recognition based on HOG features and SVM classifier, the steps of recognition based on marked data and database matching are added to form a double verification mechanism. For parts with clear markings and accurate information, this method can effectively reduce the risk of misjudgment that may be caused by relying solely on visual feature recognition, and improve the accuracy of part type judgment.

[0111] Preferably, using a second light source to illuminate the engine to be inspected at a preset angle to obtain a second image of the engine to be inspected includes:

[0112] The second light source illuminates the engine to be inspected at an incident angle between 30° and 80° to obtain a second image.

[0113] In this embodiment, a second light source is set to illuminate the engine to be tested at a specific incident angle. The preferred incident angle range is 30° to 80°, that is, the angle of the second light source relative to the normal of the engine surface is selected within this range. The selection of this angle range is intended to ensure that the light projected onto the engine can produce a suitable shadow effect, so as to facilitate subsequent shadow analysis and spatial position calculation. After setting the incident angle of the second light source, the light source is started and the image acquisition device (such as a camera) is started synchronously. The second light source illuminates the engine at a selected angle. Due to the change in the angle of the light source, the shadow of the part on the surface of the engine will change accordingly. These shadow information is captured by the image acquisition device and converted into a digital image, which is the second image of the engine to be tested. In addition to the basic shape of the part, the second image also records the details of the shadow cast by the part at a specific incident angle. This information is crucial for the subsequent calculation of the three-dimensional spatial position of the part.

[0114] It should be noted that selecting an incident angle range of 30° to 80° can produce obvious part shadows, and the shadow morphology is relatively stable and easy to analyze. Such an angle range can not only ensure the clarity of the shadow, which is convenient for the shadow analysis algorithm to extract features, but also avoid the situation where the shadow is too light and the information is insufficient due to a small angle (close to vertical), or the shadow is too complex and difficult to analyze due to a large angle. Therefore, this preferred range helps to improve the accuracy of the calculation of the spatial position of parts based on shadow analysis. The incident angle range of 30° to 80° takes into account engine parts of different shapes, sizes and materials, and can generate effective shadow information in most cases, which is suitable for the detection of various types of engines and their components. The setting of this range enhances the versatility and adaptability of the method, enabling it to work stably and effectively in different engine models and assembly scenarios.

[0115] In one possible embodiment, reference Figure 3 and Figure 4 , Figure 3 The figure shows the shadow cross-section of a component when the second light source is illuminated at an incident angle of 30°. Figure 4 The figure below shows the shadow profile of the same component when it is correctly installed and projected at an incident angle of 30°. By comparing the two figures, it can be clearly observed that by accurately measuring the dimensional characteristics of the component's shadow at a specific incident angle and combining the incident angle value, the actual distance between the top of the component and the installation plane can theoretically be calculated using the principle of optical projection. Figure 3 The projection length of the component shadow in the image, combined with the preset 30° incident angle, can be used to calculate the vertical distance between the component and the mounting plane based on the trigonometric function relationship. Figure 4By comparing the theoretical distance between the component and the mounting plane in the normal installation state shown in the figure, it can be determined whether the component is installed in place. If the calculated actual distance is consistent with the theoretical distance or within the allowable tolerance range, it can be confirmed that the component is installed correctly; on the contrary, if the difference between the two is large and exceeds the specified tolerance, it indicates that the component has an installation position deviation, which may be a misinstallation or assembly defect.

[0116] In yet another possible embodiment, reference Figure 5 and Figure 6 , Figure 5 (a) with Figure 6 (a) shows the shadow profile of the same component in two different installation states when illuminated by a second light source at an incident angle of 60°. Specifically, Figure 5 (a) depicts the scene where the component is installed under the mounting plane, and the shadow shape produced under the 60° incident angle is recorded in detail. Figure 5 (b) shows a top view of the component under this installation state at the same incident angle, further demonstrating its spatial relationship with the installation plane and the surrounding environment. Figure 6 (a) shows the shadow profile of the same component in the correct installation position and under the same 60° incident angle lighting condition. This figure clearly shows the accurate distribution and shape characteristics of the shadow of the component in the ideal installation state. Figure 6 (b) is a top view of the component in the correct installation position and at an incident angle of 60°, which intuitively shows the ideal layout relationship between the component and the installation plane and the surrounding environment. This embodiment further illustrates that under the same incident angle condition, the different installation methods of the components will directly affect their shadow characteristics, and through careful observation and comparative analysis of these characteristics, it can provide a strong basis for judging whether the components are correctly installed, further highlighting the effectiveness and practicality of the engine parts mis-installation detection method based on shadow analysis.

[0117] Preferably, based on the second image and the secondary inspection part data, the first spatial position data corresponding to the secondary inspection part is extracted and calculated by a preset shadow analysis algorithm, including:

[0118] Locate and crop the secondary inspection part according to the second image to generate a plurality of secondary inspection part images;

[0119] Based on the secondary inspection part data, the dimension information of the secondary inspection part is obtained;

[0120] Calculation is performed based on the shadow information of the secondary inspection part image and the size information of the secondary inspection part to obtain the first spatial position data of the secondary inspection part.

[0121] In this embodiment, the acquired second image is processed, and the position of the secondary inspection part in the image is accurately located using image recognition technology. After the positioning is completed, the portion containing the secondary inspection part is cropped to generate an independent image corresponding to each secondary inspection part, namely, a "secondary inspection part image". These images only contain a single part and its related shadows, which facilitates the subsequent accurate spatial position analysis of the single part.

[0122] Based on the existing secondary inspection part data (such as CAD model data or design drawings), the dimensional information of the secondary inspection parts is extracted, including but not limited to key geometric parameters such as length, width, height, curvature, etc. This dimensional information is an important reference for calculating the spatial position of the parts, and combined with the shadow analysis results, it can improve the accuracy of position calculation.

[0123] Use the preset shadow analysis algorithm to deeply analyze the shadow information in each secondary inspection part image. The algorithm may involve steps such as shadow contour extraction, edge detection, and shadow depth estimation. Combined with the size information obtained in step 2, the first spatial position data of the secondary inspection part in three-dimensional space is calculated through the optical projection principle, triangulation method or other appropriate mathematical models, including but not limited to the X, Y, and Z coordinates of the part in the engine coordinate system, as well as possible rotation angles, etc.

[0124] This embodiment achieves accurate extraction and calculation of the first spatial position data of the secondary inspection parts by accurately locating and cropping the secondary inspection part images, combining the secondary inspection part size information for shadow analysis, and using a preset efficient shadow analysis algorithm. This significantly improves the accuracy and efficiency of engine parts mis-assembly and missing assembly detection, and provides strong technical support for realizing automated, high-precision production line quality control.

[0125] Preferably, the calculation is performed based on the shadow information of the secondary inspection part image and the size information of the secondary inspection part to obtain the first spatial position data of the secondary inspection part, including:

[0126] Based on the shadow information of the secondary inspection part image, the maximum projection length is obtained;

[0127] Based on the size information of the secondary inspection parts, the maximum projection length is corrected;

[0128] According to the maximum projection length after data correction and the incident angle of the second light source, the distance between the upper surface of the secondary inspection part and the mounting plane is calculated. The calculation process is as follows:

[0129] ,

[0130] in, Indicates the distance between the upper surface of the secondary inspection part and the mounting plane. represents the maximum projection length, represents the incident angle of the second light source.

[0131] In this embodiment, the shadow information of the secondary inspection part image is processed, and the boundary of the part shadow is accurately identified through image processing techniques such as edge detection and contour extraction. Then, based on the shadow contour, the maximum projection length of the shadow in a specified direction is calculated (usually the direction parallel to the installation plane). The maximum projection length reflects the degree of occlusion of the part in this direction, which is closely related to the position of the part relative to the light source.

[0132] Considering that actual parts may have certain deformation or processing errors, resulting in deviations between their actual dimensions and theoretical dimensions, it is necessary to correct the data of the maximum projection length. Specifically, based on the dimensional information of the secondary inspection parts (such as CAD model data or measured dimensions), combined with factors such as part material properties and manufacturing tolerances, the maximum projection length is appropriately adjusted to more realistically reflect the current actual state of the parts. The corrected maximum projection length provides more accurate basic data for subsequent distance calculations.

[0133] According to the corrected maximum projection length (denoted as ) and the known incident angle of the second light source , applying trigonometric relationships, according to the formula Calculate the distance between the upper surface of the secondary inspection part and the mounting plane This formula is based on the principle of optical projection and uses the proportional relationship between the shadow length and the sine value of the incident angle of the light source to directly deduce the height of the part perpendicular to the light source direction, that is, the distance between the part and the mounting plane.

[0134] This embodiment successfully realizes the accurate extraction of the first spatial position data of the secondary inspection parts by making full use of the shadow information of the secondary inspection part image, combining the size information of the secondary inspection parts for data correction, and using a scientific trigonometric function model to calculate the distance between the parts and the installation plane, thereby significantly improving the accuracy and reliability of the engine parts mis-installation detection.

[0135] Preferably, obtaining assembly defective part data according to the first spatial position data and the second spatial position data includes:

[0136] Calculate the difference between the first spatial position data and the second spatial position data;

[0137] Compare the difference with a preset error threshold;

[0138] If the difference is greater than the preset error threshold, assembly defect part data is generated;

[0139] If the difference is less than the preset error threshold, qualified installation part data is generated.

[0140] In this embodiment, the first spatial position data (denoted as ) and the second spatial position data (denoted as ) to calculate the difference. It reflects the deviation between the actual detected position and the expected ideal position.

[0141] Preset an error threshold The threshold is determined based on the allowable installation tolerance of engine parts, the accuracy of detection equipment, and the stability of production process. The error threshold is Compare and determine the relative size relationship between the two.

[0142] If the difference is greater than the preset error threshold ,Right now , then the part is judged to have assembly defects. At this time, the system generates assembly defect part data, including but not limited to: part number, actual detection position , Expected ideal location , Difference And the threshold These data will be recorded and transmitted to the subsequent quality management system, triggering the corresponding exception handling process, such as notifying the operator to re-inspect or adjust, or automatically entering it into the quality report as a non-conforming record. If the difference is less than or equal to the preset error threshold ,Right now , then the part is judged to be installed properly. The system generates the data of the installed qualified parts, which also includes the part number, actual detection position , Expected ideal location and Difference , but it is marked as qualified at this time, and may be accompanied by qualified certification information. The qualified data will be used to update production progress monitoring, statistical pass rate, etc. to ensure the normal operation of the production line.

[0143] This embodiment achieves accurate quantification of the deviation of the assembly position of the parts by calculating the difference between the first spatial position data and the second spatial position data, providing an objective and quantitative basis for the subsequent assembly quality assessment. This quantification method abandons subjective judgment and improves the objectivity and consistency of the assessment. The introduction of a preset error threshold and comparison with the actual difference ensures that the judgment of assembly defects has clear standards and boundaries. The setting of the threshold takes into account the reasonable tolerance allowed by the production process and the accuracy of the detection system, ensures the accuracy of the judgment, and avoids overly sensitive or overly loose misjudgments. Assembly defective parts data or installation qualified parts data are generated according to the comparison results, realizing the instant classification and management of the test results. This instant feedback mechanism helps to quickly identify and isolate problem parts, promote rapid response and adjustment of the production line, and at the same time ensure the smooth flow of qualified parts and improve production efficiency.

[0144] Preferably, based on the shadow information of the secondary detected part image, before obtaining the maximum projection length, the method further includes: performing binarization processing on the secondary detected part image.

[0145] In this embodiment, the collected original image of the secondary inspection part is preprocessed, and the key step is binarization. Binarization refers to the process of converting the gray value of each pixel in the image into only two discrete values ​​(usually black and white), with the purpose of simplifying image information, highlighting target features, and reducing the complexity of subsequent processing. In specific implementation, an appropriate threshold value (such as a global threshold value, an adaptive threshold value, etc.) can be selected so that the pixel gray value above the threshold is assigned to white (background), and the pixel gray value below the threshold is assigned to black (foreground), thereby converting the part image into a binary image with clear black and white.

[0146] After the binarization process is completed, the shadow area in the image (usually represented by continuous black pixel blocks) is clearly visible. Then, an edge detection algorithm (such as Canny, Sobel, etc.) is used to extract the shadow edge, and then the maximum projection length of the shadow in a specific direction is calculated. Specifically, the binary image is scanned along a straight line perpendicular to the light source direction, and the cumulative length of continuous black pixels is counted, and the maximum value is taken as the maximum projection length.

[0147] By binarizing the secondary inspection part image, the background noise and grayscale changes caused by uneven lighting in the image are effectively removed, making the shadow area contrast sharply with the non-shadow area. This process enhances the recognizability of shadow information, reduces the impact of factors such as changes in lighting conditions or reflections on the surface of parts on shadow recognition, and improves the accuracy of subsequent shadow edge extraction and projection length calculation. Furthermore, the binary image contains only two colors, which greatly simplifies the complexity of the image processing algorithm. In the subsequent shadow edge detection and projection length calculation process, the algorithm no longer needs to consider the complex grayscale distribution and lighting effects, and can directly operate on the binary image, which significantly improves the processing speed and reduces the demand for computing resources.

[0148] Preferably, the mis-installed part data includes the mis-installed part number, mis-installed position and mis-installed type;

[0149] The missing parts data includes the missing part number and the missing position;

[0150] The assembly defect part data includes the assembly defect part type, installation position, and position deviation value.

[0151] In this embodiment, the mis-installed parts data details the unique number of the wrongly installed parts, their actual mis-installed positions on the engine, and the specific mis-installed types (such as reverse installation, wrong installation, etc.), ensuring the accurate identification and tracing of the problem parts, and facilitating subsequent targeted processing. The missing parts data records the numbers of the parts that should be installed but are not installed and their predetermined installation positions, providing clear guidance for re-installation. The assembly defect parts data covers the defective part types, actual installation positions, and deviation values ​​from the standard positions, which is not only conducive to quickly locating defects, but also quantifies the degree of deviation, which is of great value for evaluating the impact of defects and optimizing assembly processes. Detailed parts data make all kinds of defects have clear traceability. Whether it is mis-installation, missing installation or assembly defects, the source of the problem can be quickly locked through the part number. Combined with the specific location information, the operator can quickly and accurately find the problem part, significantly improving the troubleshooting and maintenance efficiency. Furthermore, the clear identification of the type of mis-installation and the type of assembly defect parts helps to quickly identify the nature of the defect, directly guide the adoption of corresponding corrective measures, such as part repositioning, direction adjustment or process correction, and effectively prevent invalid operations caused by misjudgment. At the same time, this information helps to deeply analyze the causes of defects and prevent similar problems from happening again.

[0152] Preferably, when at least one piece of mis-installed part data, missing part data or assembly defective part data is detected, an alarm message is issued and a detection report is pushed to the management personnel.

[0153] In this embodiment, the real-time alarm mechanism ensures that relevant personnel are notified as soon as defects are detected, shortens the time interval between problem discovery and response, helps to intervene as early as possible, prevents defective parts from entering subsequent production links or flowing into the market, effectively controls the defective rate, and reduces quality risks. Furthermore, detailed test reports are pushed directly to management personnel, providing comprehensive information on defects (such as part number, location, type, deviation value, etc.), so that they can quickly understand the essence of the problem, accurately judge the severity of the problem, and then make scientific decisions, such as suspending the production line, adjusting process parameters, arranging repairs or changing suppliers, etc., to improve the efficiency and effectiveness of quality management. The system automatically sends alarm information and test reports, which realizes the transparency of the quality management process and strengthens the monitoring of the production site. At the same time, detailed defect data helps to trace the source of the problem, implement accountability, motivate all employees to pay attention to quality, and create a good quality management atmosphere.

[0154] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for detecting engine parts mis-assembly or omission based on visual inspection, characterized in that: include: Under the illumination of a first light source, a first image of the engine to be inspected is obtained, wherein the first light source is located directly above the engine to be inspected and illuminates the engine perpendicularly to the surface of the engine; Inputting the first image into a trained part detection model to obtain mis-installed part data, missing part data, and secondary detection part data; Using a second light source to illuminate the engine to be inspected at a preset incident angle to obtain a second image of the engine to be inspected, wherein the second image contains part shadow information; Based on the second image and the secondary inspection part data, extracting and calculating the first spatial position data of the corresponding secondary inspection part in the second image by a preset shadow analysis algorithm; Acquire the normal reference second spatial position data of the corresponding part under the preset incident angle; In a pre-built standard reference database, obtaining second spatial position data of the corresponding part at the preset incident angle; Obtaining assembly defective part data according to the first spatial position data and the second spatial position data; Obtaining a test report based on the mis-installed parts data, the missing parts data and the assembly defect parts data; Wherein, the preset incident angle is an incident angle between 30° and 80°; The first image is input into the trained part detection model to obtain the mis-installed part data, the missing part data and the secondary detection part data, specifically: Locate the area of ​​the part to be detected according to the first image and crop it to generate multiple images of the part to be detected; Performing directional gradient histogram processing on the image of the part to be detected respectively to obtain multiple HOG feature vectors; Input the HOG feature vector into the trained SVM classifier to obtain the corresponding part type; Comparing the part types at different locations with preset reference part types; If the part type is inconsistent with the reference part type, generating the mis-installed part data; If the part type is empty, the missing part data is generated; If the part type is consistent with the reference part type, generating the secondary inspection part data; Wherein, based on the second image and the secondary detection part data, the first spatial position data of the corresponding secondary detection part in the second image is extracted and calculated by a preset shadow analysis algorithm; specifically: Locate and crop the secondary inspection part according to the second image to generate a plurality of secondary inspection part images; Based on the secondary inspection part data, the dimension information of the secondary inspection part is obtained; Calculating based on the shadow information of the secondary inspection part image and the size information of the secondary inspection part to obtain the first spatial position data of the secondary inspection part; including Based on the shadow information of the secondary inspection part image, the maximum projection length is obtained; Based on the size information of the secondary inspection parts, the maximum projection length is corrected; According to the maximum projection length after data correction and the incident angle of the second light source, the distance between the upper surface of the secondary inspection part and the mounting plane is calculated. The calculation process is as follows: , in, Indicates the distance between the upper surface of the secondary inspection part and the mounting plane. represents the maximum projection length, represents the incident angle of the second light source.

2. The method for detecting engine parts mis-assembly or missing assembly based on visual inspection according to claim 1, characterized in that: After inputting the HOG feature vector into the trained SVM classifier to obtain the corresponding part type, the method further includes: If it is detected that the image of the part to be detected contains marking data, the marking data includes text data and pattern data; Performing mark recognition on the image of the part to be detected to obtain mark recognition data; Based on a preset similarity threshold, performing preset threshold matching on the marker recognition data in a reference marker recognition database; If the match is successful, the part type is determined; If the match fails, the corresponding parts are marked and manually reviewed.

3. The method for detecting engine parts mis-assembly or missing assembly based on visual inspection according to claim 1, characterized in that: The step of obtaining assembly defective part data according to the first spatial position data and the second spatial position data includes: Calculating a difference between the first spatial position data and the second spatial position data; Comparing the difference with a preset error threshold; If the difference is greater than a preset error threshold, the assembly defective part data is generated; If the difference is smaller than a preset error threshold, qualified installation part data is generated.

4. The method for detecting engine parts mis-assembly or missing assembly based on visual inspection according to claim 1, characterized in that: Before obtaining the maximum projection length based on the shadow information of the secondary detected part image, the method further includes: performing binarization processing on the secondary detected part image.

5. The method for detecting engine parts mis-assembly or missing assembly based on visual inspection according to claim 1, characterized in that: include: The mis-installed parts data includes mis-installed parts number, mis-installed position and mis-installed type; The missing parts data includes the missing parts number and the missing parts position; The assembly defect part data includes the assembly defect part type, installation position, and position deviation value.

6. The method for detecting engine parts mis-assembly or missing assembly based on visual inspection according to claim 1, characterized in that: When it is detected that there is at least one of the wrongly installed part data, the missing part data or the assembly defective part data, an alarm message is issued and the detection report is pushed to the management personnel.