A Visual Inspection Method and System for the Entire Appearance of a Safety Button Combining 2.5D Imaging and AI
Through the full-appearance visual detection system of the safety buckle combined with 2.5D imaging and AI, the problem of blind spots of light exposure is solved, and comprehensive detection and efficient analysis of the safety buckle surface is achieved.
Patent Information
- Application Number
- CN202510220240.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-02-27
AI Technical Summary
When using 2.5D lighting technology to detect safety buckles, there may be blind spots that will affect the detection effect.
Through a safety clamp full-appearance visual detection system combined with 2.5D imaging and AI, semantic segmentation and deep learning algorithms are used to obtain the pre-detection results of the safety clamp surface, adjust the angle and parameters of the irradiation equipment, and perform multi-angle shooting to verify abnormal areas.
A comprehensive inspection of the safety buckle surface is achieved, the detection efficiency and accuracy are improved, and uniform lighting and detailed analysis of all areas are ensured.
Smart Images

Figure CN119715569B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of visual inspection, and more specifically, to a full-appearance visual inspection system for safety buckles that combines 2.5D imaging and AI. Background Art
[0002] The safety buckle is an important safety protection device, and its quality is directly related to the use safety. With the development of machine vision technology, automatic detection systems based on cameras have gradually been applied to the industrial inspection field. During the production process of safety buckles, the safety buckle is formed by splicing at least two groups of plate components, and there is an included angle between the two groups of plate components. During the process of using 2.5D lighting to detect the surface of the safety buckle, when detecting one group of plate components, there may be a dead angle of light irradiation for the other group of plate components, which affects the detection effect of the safety buckle. Summary of the Invention
[0003] To achieve the above object, the present invention provides the following technical solutions:
[0004] A full-appearance visual inspection method for safety buckles that combines 2.5D imaging and AI,
[0005] An image analysis step, which is used to obtain the surface image of the safety buckle captured by the vision camera based on the 2.5D lighting technology as a reference image, and obtain the reference plane on the safety buckle according to the reference image;
[0006] An abnormality acquisition step, where the abnormality acquisition step is used to obtain the edge line and the abnormal area in the reference image through semantic segmentation, and obtain the pre-detection result of the abnormal area through the safety buckle detection model. The pre-detection result includes the position, size, and type of the abnormal area;
[0007] A lighting shooting control step, which is used to obtain the pre-detection result and is provided with an irradiation database. According to the pre-detection result, the corresponding irradiation sequence is retrieved from the irradiation database. The irradiation sequence is preset with irradiation instructions. According to the irradiation instructions, the angle and parameters of the irradiation device are adjusted, and through the path planning strategy, the lighting angle and the shooting angle are adjusted to shoot the surface of the safety buckle, and obtain the safety buckle images under different irradiation angles and lighting angles as the images to be analyzed. The irradiation device includes a lighting device and a shooting device;
[0008] An abnormality detection step, where the images to be analyzed under different lighting irradiation directions are analyzed for the abnormal area on the surface of the safety buckle through the abnormal information analysis strategy to obtain the detection result.
[0009] Preferably, the abnormal information analysis strategy includes
[0010] A position determination step for converting the coordinates in the image to be analyzed into relative position coordinates, partitioning the reference plane, with each partition corresponding to the image to be analyzed under different irradiation angles, obtaining the abnormal area, calculating the coordinates of its center point, and determining the partition to which the point belongs;
[0011] A size calculation step for calculating the size of the abnormal area by performing equal-proportion scaling based on the relative sizes of the safety buckle reference image and the image to be analyzed;
[0012] A type recognition step for establishing a safety buckle defect type library, matching the features of the abnormal area with the features in the type library to obtain the defect type.
[0013] Preferably, it further includes a depth analysis step. Taking the partition to which the abnormal area belongs as the detection image, obtaining the abnormal area in the detection image, drawing several edge points to obtain an edge trajectory line, selecting any point within the edge trajectory line and the surrounding area as an abnormal item point, and points outside the edge trajectory line as non-defect item points, comparing the depths of the abnormal item points and non-defect item points to obtain the depth value of the abnormal item points.
[0014] Preferably, when the depth value is compared with a preset value, if the depth value is less than the preset value, it is a scratch, and if the depth value is greater than the preset value, it is output as a pit.
[0015] Preferably, it further includes a path planning strategy. At least two groups of reference planes are set on the safety buckle, and the two groups of reference planes are arranged continuously. Obtaining the angle and parameters of the irradiation device, defining the angle of the irradiation device as the detection angle, determining the safety buckle edge line and the reference plane, and adjusting the light angle so that the light sequentially shoots the reference plane, the inclined shooting plane, and the safety buckle edge line.
[0016] Preferably, the trajectory planning step further includes a trajectory priority step.
[0017] In the trajectory priority step, one of the reference planes is determined as the first reference plane. During the shooting process, the first reference plane is preferentially shot, and then the inclined shooting plane, the other reference plane, and the safety buckle edge line are sequentially shot, ensuring that the last group of shooting is on the safety buckle edge line where the first reference plane is located.
[0018] Preferably, it further includes a verification step. During the process of adjusting the lighting angle, a safety buckle reference plane image is obtained by using a vision camera as a comparison image, and the image to be analyzed under the same lighting angle is obtained. Converting both the image to be analyzed and the comparison image to a standard image, and determining whether the features in the image to be analyzed and the comparison image are consistent. If they are inconsistent, an abnormality is detected.
[0019] Preferably, it further includes a model construction step of constructing a safety buckle detection model using a deep learning algorithm. The model is iteratively trained using historical safety buckle abnormal images and historical abnormal information under different lighting conditions of the safety buckle to complete the construction of the safety buckle detection model.
[0020] A 2.5D imaging and AI combined full-appearance visual detection system for safety buckles
[0021] An image analysis module for obtaining the surface image of the safety buckle captured by the vision camera based on the 2.5D lighting technology as the reference image, and obtaining the reference plane on the safety buckle according to the reference image.
[0022] An abnormality acquisition module. The abnormality acquisition step is used to obtain the edge lines and abnormal areas in the reference image through semantic segmentation, and obtain the pre-detection results of the abnormal areas through the safety buckle detection model. The pre-detection results include the position, size, and type of the abnormal areas.
[0023] A lighting shooting control module for obtaining the pre-detection results and having an irradiation database. According to the pre-detection results, the corresponding irradiation sequence is retrieved from the irradiation database. The irradiation sequence is preset with irradiation instructions. According to the irradiation instructions, the angles and parameters of the irradiation device are adjusted, and through a path planning strategy, the lighting angle and shooting angle are adjusted to shoot the surface of the safety buckle, and obtain the safety buckle images under different irradiation angles and lighting angles as the images to be analyzed. The irradiation device includes a lighting device and a shooting device.
[0024] An abnormality detection module analyzes the abnormal areas on the surface of the safety buckle in the images to be analyzed under different lighting irradiation directions through an abnormal information analysis strategy to obtain the detection results.
[0025] The beneficial effects of the present invention: By using a 2.5D lighting device to shoot the surface of the safety buckle, the pre-detection results of the surface of the safety buckle are obtained. The pre-detection results include the position, size, and type of the abnormal areas. According to the pre-detection results, irradiation instructions are generated, and according to the irradiation instructions, the angles and parameters of the irradiation device are adjusted to shoot the surface of the safety buckle from multiple angles to further verify the abnormal areas, so as to output the defect information on the surface of the safety buckle. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is the overall flowchart of the present invention;
[0027] Figure 2 is the safety buckle processing image of the present invention;
[0028] Figure 3 is the processing diagram of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0029] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0030] It should be noted that when a component is referred to as being "fixed to" another component, it can be directly on the other component or there may also be an intermediate component. When a component is considered to be "connected to" another component, it can be directly connected to the other component or there may be an intermediate component at the same time. When a component is considered to be "disposed on" another component, it can be directly disposed on the other component or there may be an intermediate component at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0032] The following further details the embodiments of the present invention with reference to the accompanying drawings:
[0033] As Figures 1 - 3 shown, the present invention provides a full-appearance visual inspection method for a safety buckle combining 2.5D imaging and AI, including
[0034] an image analysis step, which is used to obtain the surface image of the safety buckle captured by a vision camera based on 2.5D lighting technology as a reference image, and obtain the reference plane on the safety buckle according to the reference image; by using 2.5D lighting technology, it is ensured that the surface of the safety buckle is evenly and sufficiently illuminated, so as to capture high-quality images, increase the image contrast, make the tiny defects on the surface of the safety buckle more prominent and obvious in the image, and thus significantly improve the detection efficiency;
[0035] Abnormal acquisition step, which is used to obtain the edge lines and abnormal areas in the reference image through semantic segmentation, and obtain the pre-detection results of the abnormal areas through the safety buckle detection model. The pre-detection results include the position, size and type of the abnormal areas. The safety buckle detection model is constructed based on AI algorithms. Through the semantic segmentation algorithm, using the depth defect model, the reference image is segmented at the pixel level to distinguish the background, the edge lines of the safety buckle and the abnormal areas. Through the fully convolutional network, multi-scale features are extracted to accurately locate the position and range of the abnormal areas. The reference image is divided into different areas, including the background, edge lines and abnormal areas. The accurate position and range of the abnormal areas are further extracted from the semantic segmentation results, and the safety buckle detection model is used to conduct a more in-depth detection of the abnormal areas to obtain the pre-detection results, including the position (center point coordinates) of the abnormal areas, size (area, perimeter) and type (such as scratches, pits, stains, etc.). More advanced semantic segmentation algorithms can be adopted, such as U-Net++. On the basis of U-Net, it enhances the information flow between different scale features through dense connections, and can more accurately segment the abnormal areas of the safety buckle. Especially for the defective areas with blurred boundaries, the segmentation effect will be better.
[0036] The lighting shooting control steps are used to obtain pre-detection results and are provided with an irradiation database. According to the pre-detection results, the corresponding irradiation sequence is retrieved from the irradiation database. There are preset irradiation instructions in the irradiation sequence. According to the irradiation instructions, the angles and parameters of the irradiation device are adjusted, and through the path planning strategy, the lighting angle and the shooting angle are adjusted to shoot the surface of the safety buckle, and the safety buckle images under different irradiation angles and lighting angles are obtained as the images to be analyzed. The irradiation device includes a lighting device and a shooting device; through the abnormal steps, the pre-detection results of the surface of the safety buckle are obtained. There are multiple irradiation sequences in the irradiation database. Each irradiation sequence is for the detection requirements of different types of abnormal areas. There are preset irradiation instructions in the irradiation sequence, including the angles and parameters of the irradiation device (brightness, color temperature) and the parameters of the shooting device (exposure time, ISO). According to the pre-detection results, the appropriate irradiation sequence is retrieved from the irradiation database, the types, positions and sizes of the abnormal feature areas in the pre-detection results are analyzed. According to the analysis results, the matching irradiation sequence is searched in the irradiation database. If there are multiple abnormal areas, the appropriate irradiation sequence is selected according to the size of the abnormal features. According to the irradiation instructions in the retrieved irradiation sequence, the angles and parameters of the irradiation device and the shooting device are adjusted. The angles and parameters of the irradiation device (such as the lighting device) are adjusted to ensure that the light can irradiate the surface of the safety buckle according to the preset irradiation sequence. The parameters of the shooting device are adjusted, such as the exposure time, ISO, etc., to ensure that clear and accurate images can be captured; through the path planning strategy, the lighting angle and the shooting angle are adjusted to obtain the safety buckle images under different irradiation angles and lighting angles. According to the instructions in the irradiation sequence and the positions of the abnormal areas in the pre-detection results, the moving paths of the lighting device and the shooting device are planned, the path planning is executed, the lighting angle and the shooting angle are adjusted to obtain the required images, and the safety buckle images are taken as the images to be analyzed under different irradiation angles and lighting angles;
[0037] The path analysis strategy includes a reference plane determination step and a lighting trajectory planning step,
[0038] Datum plane determination step: At least two groups of datum planes are set on the safety buckle. The two groups of datum planes are set continuously. Determine one group of datum planes as the first datum plane, obtain the angle and parameters of the irradiation device, and define the angle of the irradiation device as the detection angle; determine the edge line of the safety buckle and the datum plane, and adjust the light angle so that the light sequentially shoots the datum plane and the edge line of the safety buckle, and the light shooting angle where the edge line of the safety buckle is located is the detection angle; according to the datum plane and the inclined shooting plane, plan the moving path of the light, authorize and clarify the specific positions of the edge line and the datum plane of the safety buckle, and adjust the light angle so that the light can sequentially shoot the datum plane, the inclined shooting plane and the edge line of the safety buckle. When the light shoots the edge line of the safety buckle, the light shooting angle where it is located is the previously defined detection angle. This step ensures that the shooting perspective is consistent with the preset detection angle, thereby improving the accuracy and reliability of the measurement; ensure that the four sides of all datum planes of the safety buckle are illuminated at the same detection angle around the safety buckle, which is convenient for detecting the surface image of the safety buckle and improving the accuracy of judgment.
[0039] The light trajectory planning step also includes a trajectory priority step.
[0040] Trajectory priority step: Determine one group of datum planes as the first datum plane. During the shooting process, give priority to shooting with the first datum plane, and sequentially shoot the inclined shooting plane, the other datum plane and the edge line of the safety buckle, ensuring that the last group of shooting is on the edge line of the safety buckle where the first datum plane is located, ensuring that the light shooting angle returns to the edge line where the first datum plane is located again, which is convenient for realizing the correction of the light and shooting again.
[0041] Abnormal detection step: Analyze the abnormal area on the surface of the safety buckle through the abnormal information analysis strategy for the images to be analyzed under different light irradiation directions to obtain the detection result.
[0042] The abnormal information analysis strategy includes
[0043] Position determination step: Used to convert the coordinates in the image to be analyzed into relative position coordinates, and partition the datum plane. Each partition corresponds to the image to be analyzed under different irradiation angles, and obtain the abnormal area, and calculate its center point coordinates to determine the partition to which the point belongs; convert the absolute coordinates in the image to be analyzed into relative position coordinates, ensure that a unified reference coordinate system is established for all images to be analyzed, and perform partition processing according to the reference image. Each partition corresponds to the image to be analyzed under different light irradiation angles. In the converted relative position coordinates, identify and obtain the abnormal area, determine the center point of the abnormal area, and calculate its coordinates. According to the center point coordinates, determine the partition to which the point belongs, so as to understand the specific position of the abnormal area in the image;
[0044] Size calculation step: Through the relative sizes of the reference image of the safety buckle and the image to be analyzed, perform equal-proportion scaling and calculate the size of the abnormal area; Take the reference image of the safety buckle as a reference, perform equal-proportion scaling according to the relative sizes of the image to be analyzed and the reference image, and calculate the actual size of the abnormal area in the scaled image.
[0045] Type recognition step: Establish a database of safety buckle defect types, match the features of the abnormal area with the features in the type database to obtain the defect type; Establish a database containing various safety buckle defect types, where the defect types include scratches, cracks, depressions, protrusions, etc. Extract features from the abnormal area, and the features include shape, color, etc. Match the extracted features with the features in the defect type database. According to the matching results, determine the defect type of the defect area; Among them, the establishment method of the database needs to clarify the possible defect types of the safety buckle, such as scratches, cracks, depressions, protrusions, etc. At the same time, for each defect type, determine its key features, and the key features include shape, color, texture, size, etc. And obtain safety buckle defect data from historical records and the quality inspection process to ensure that the collected data covers various defect types and instances of different severity levels, improve the generalization ability of the defect type database, and after unifying the format of the collected data, preprocess the data, use deep learning modules such as convolutional neural networks to automatically extract image features, use the database to store information such as defect types, features, and data samples, pour the preprocessed data and the extracted features into the database to form a complete defect type database, and use a feature matching algorithm to match the features in the new data with the features in the type database, and the feature matching algorithm considers the similarity of features and feature weights, etc.; Input the extracted features of the abnormal area into these classification models for training and prediction. Compared with the traditional feature-matching-based method, the deep learning classification model can automatically learn more complex defect feature representations and improve the accuracy of defect type recognition.
[0046] The abnormal information includes the defect location, defect size, and defect type, and the defect type includes scratches and pits.
[0047] Deep analysis step: Take the partition to which the abnormal area belongs as the detection image, obtain the abnormal area in the detection image, draw several edge points to obtain an edge trajectory line, select any point within the edge trajectory line and the surrounding area as an abnormal item point, and select points outside the edge trajectory line as non-defective item points. Compare the depths of the abnormal item points and the non-defective item points to obtain the depth value of the abnormal item points; Extract the detection image from the partition to which the abnormal feature belongs for more refined analysis. According to the abnormal detection step, determine the partition to which the abnormal area belongs, and extract the image containing the abnormal area from this partition as the detection image. Identify and draw the edge points of the abnormal area to form an edge trajectory line. Select abnormal item points within the edge trajectory line and its surrounding area, and select non-defective item points outside the edge trajectory line. Randomly or according to certain rules, select several points within the edge trajectory line and its internal area as abnormal item points, and select several points outside the edge trajectory line as non-defective item points. These points should represent the normal state of the safety buckle surface. By comparing the depth values of the abnormal item points and the non-defective item points, evaluate the depth characteristics of the abnormal area; Use 2.5D imaging technology to obtain the depth information of each selected point, calculate the average depth value or the maximum depth value of the abnormal item points, and compare it with the depth values of the non-defective item points. Use depth estimation algorithms to perform three-dimensional evaluation of the abnormal area. Based on 2.5D imaging to obtain a depth map, use networks such as PSPNet to perform semantic segmentation on the depth information, combine point cloud data processing, calculate the actual depth of the pit or scratch, and quantify the severity and type of the defect.
[0048] When comparing the depth value with a preset value, if the depth value is less than the preset value, it is a scratch. When the depth value is greater than the preset value, it is output as a pit. Compare the depth value with the preset value. If the depth value is less than the preset value, it is judged as a scratch (because scratches are usually shallower, and when the depth value is negative, there is a protrusion on the safety buckle surface, which may be the edge of the scratch). When the depth values are all negative, it is a protrusion. If the depth value is greater than the preset value, it is judged as a pit (because pits are usually deeper).
[0049] It also includes a verification step. During the process of adjusting the lighting angle, a vision camera is used to obtain an image of the reference plane of the safety buckle as a comparison image, and an image to be analyzed under the same lighting angle is obtained. Both the image to be analyzed and the comparison image are transformed onto a standard image, and it is determined whether the features in the image to be analyzed and the comparison image are consistent. If they are inconsistent, an abnormality is detected; during the process of adjusting the lighting angle, an image of the reference plane of the safety buckle is obtained as a comparison image, and under the same lighting angle, an image to be analyzed is obtained. The image to be analyzed and the comparison image are both transformed onto a unified standard image for easy comparison and analysis. It is determined whether the features in the image to be analyzed and the comparison image are consistent, and the key features in the image to be analyzed and the comparison image are extracted. These features may include edges, textures, shapes, etc. Feature matching algorithms (such as SIFT, SURF, ORB, etc.) are used to compare the feature points in the image to be analyzed and the comparison image. According to the matching degree of the feature points, it is determined whether the features in the two images are consistent. If the features in the image to be analyzed and the comparison image are inconsistent, it is detected as an abnormality. If the feature consistency judgment result shows that there are significant differences in the features of the two images (such as non-matching feature points, shape changes, etc.), it is determined as an abnormality, the abnormal detection result is output, and further detection or processing procedures may be triggered.
[0050] It also includes a model construction step. The historical defective images and historical qualified images of the safety buckle are trained in a safety buckle detection model using an AI algorithm, and the number of iterations is preset. Iterative optimization is performed until the number of iterations is reached. After training is completed, a preliminary detection model is obtained, and a preliminary detection result is obtained. According to the abnormal detection step, the abnormal type of the safety buckle is obtained and it is judged whether there is an error. If there is an error, the detection error data is modified and training is continued until the detection result is correct. Otherwise, no modification is made; collect the historical defective images and historical qualified images of the safety buckle to ensure that the state of the safety buckle can be accurately reflected, label the images to clearly distinguish defective and qualified safety buckles; use a convolutional neural network to construct a safety buckle detection model, set the input layer, hidden layer, output layer and other structures of the model, input the labeled image data into the model for training, and preset the number of iterations. The model parameters are optimized through multiple iterations. In each iteration, the model adjusts its internal parameters according to the input data and can accurately identify the state of the safety buckle. After the preset number of iterations is completed, a preliminary detection model is obtained, and the preliminary detection model is used to predict the new safety buckle image information to obtain a preliminary detection result; according to the preliminary detection result, the abnormal type of the safety buckle is obtained, and it is judged whether the abnormal detection result is incorrect, that is, whether it conforms to the actual state of the safety buckle; if it is found that the abnormal detection result is incorrect, the detection error data is modified, the modified data is re-added to the training set, and the model is continued to be trained, repeating the above process until the detection result is correct.
[0051] Another implementation: During the model construction process, a more advanced deep learning architecture can be selected, such as a vision model based on Transformer (such as ViT); when dealing with image tasks, it can better capture long-range dependencies in images through the self-attention mechanism, which may have better effects on identifying complex defect features on the surface of safety buckles; during the training process, transfer learning technology can be introduced; a model pre-trained on a large-scale image dataset (such as ImageNet) can be used as a basis, and then fine-tuned for the safety buckle detection task; in this way, the general image features learned by the pre-trained model can be utilized to reduce the number of samples required for training and improve the training efficiency and generalization ability of the model.
[0052] A 2.5D imaging and AI combined full-appearance visual detection system for safety buckles
[0053] An image analysis module, which is used to obtain the surface image of the safety buckle captured by the vision camera based on the 2.5D lighting technology as a reference image, and obtain the reference plane on the safety buckle according to the reference image;
[0054] An abnormality acquisition module, the abnormality acquisition step is used to obtain the edge line and abnormal area in the reference image through semantic segmentation, and obtain the pre-detection result of the abnormal area through the safety buckle detection model, and the pre-detection result includes the position, size and type of the abnormal area;
[0055] A lighting shooting control module, which is used to obtain the pre-detection result and is provided with an irradiation database. According to the pre-detection result, the corresponding irradiation sequence is retrieved from the irradiation database. The irradiation sequence is preset with irradiation instructions. According to the irradiation instructions, the angle and parameters of the irradiation device are adjusted, and through the path planning strategy, the lighting angle and shooting angle are adjusted to shoot the surface of the safety buckle, and the safety buckle images under different irradiation angles and lighting angles are obtained as images to be analyzed. The irradiation device includes a lighting device and a shooting device;
[0056] An abnormality detection module analyzes the abnormal area on the surface of the safety buckle through the abnormal information analysis strategy for the images to be analyzed under different lighting irradiation directions to obtain the detection result.
[0057] The above are only the preferred implementation manners of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the idea of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and retouches should also be regarded as the protection scope of the present invention.
Claims
1. A safety buckle full appearance visual inspection method combining 2.5D imaging and AI, characterized in that: An image analysis step is used to obtain a safety buckle surface image captured by a visual camera based on a 2.5D lighting technology as a reference image, and obtain a reference surface on the safety buckle according to the reference image; An abnormality acquisition step, the abnormality acquisition step is used to obtain edge lines and abnormal areas in the reference image through semantic segmentation, and obtain pre-detection results of the abnormal area through a safety buckle detection model, the pre-detection results including the position, size and type of the abnormal area; The lighting shooting control step is used to obtain the pre-detection result, and is provided with an illumination database. According to the pre-detection result, the corresponding illumination sequence is retrieved from the illumination database, and the illumination sequence is preset with an illumination instruction. According to the illumination instruction, the angle and parameters of the illumination device are adjusted, and the lighting angle and the shooting angle are adjusted through the path planning strategy to shoot the surface of the safety buckle, and the safety buckle images under different illumination angles and lighting angles are obtained as the images to be analyzed, and the illumination device includes a lighting device and a shooting device; The path planning strategy includes setting at least two groups of reference surfaces on the safety buckle, the two groups of reference surfaces are set continuously, obtaining the angle and parameters of the irradiation device, defining the angle of the irradiation device as the detection angle, determining the edge line of the safety buckle and the reference surface, and adjusting the lighting angle so that the lighting sequentially shoots the reference surface, the inclined shooting surface and the edge line of the safety buckle; In the abnormality detection step, the image to be analyzed under different lighting directions is analyzed by using an abnormal information analysis strategy to analyze the abnormal area on the surface of the safety buckle to obtain the detection result; The abnormal information analysis strategy includes The position determination step is used to convert the coordinates in the image to be analyzed into relative position coordinates, and to partition the reference surface, each partition corresponding to the image to be analyzed under different illumination angles, and obtain the abnormal area, and calculate the coordinates of its center point to determine the partition to which the point belongs; The size calculation step is to calculate the size of the abnormal area by scaling the relative sizes of the safety buckle reference image and the image to be analyzed; In the type identification step, a safety buckle defect type library is established, and the features of the abnormal area are matched with the features in the type library to obtain the defect type.
2. According to claim 1, a method for visual inspection of the safety buckle appearance by combining 2.5D imaging and AI, characterized in that: The method also includes a depth analysis step, in which the partition to which the abnormal area belongs is used as a detection image, the abnormal area in the detection image is obtained, and a number of edge points are drawn to obtain an edge trajectory line, and any point in the edge trajectory line and the surrounding area is selected as an abnormal item point, and the point outside the edge trajectory line is selected as a non-defect item point, and the depth of the abnormal item point and the non-defect item point is compared to obtain the depth value of the abnormal item point.
3. The method for visual inspection of the safety buckle appearance by combining 2.5D imaging and AI according to claim 2 is characterized in that: When the depth value is compared with a preset value, if the depth value is less than the preset value, it is a scratch, and when the depth value is greater than the preset value, it is output as a pit.
4. The method for visual inspection of the safety buckle appearance by combining 2.5D imaging and AI according to claim 1 is characterized in that: The light trajectory planning step also includes a trajectory priority step. The trajectory priority step determines that one of the groups of reference planes is the first reference plane. During the shooting process, the first reference plane is given priority, and the inclined shooting plane, another reference plane and the safety buckle edge line are photographed in turn to ensure that the last group of shots are on the safety buckle edge line where the first reference plane is located.
5. The method for visual inspection of the safety buckle appearance by combining 2.5D imaging and AI according to claim 1 is characterized in that: The method also includes a verification step. During the lighting angle adjustment process, a visual camera is used to obtain an image of a reference surface of the safety buckle as a comparison image, and an image to be analyzed under the same lighting angle is obtained. Both the image to be analyzed and the comparison image are converted into a standard image to determine whether the features in the image to be analyzed and the comparison image are consistent. If they are inconsistent, an abnormality is detected.
6. The method for visual inspection of the safety buckle appearance by combining 2.5D imaging and AI according to claim 1 is characterized in that: It also includes a model building step, using a deep learning algorithm to build a safety buckle detection model, and iterative training using historical safety buckle abnormal images and historical abnormal information under different lighting conditions to complete the construction of the safety buckle detection model.
7. A safety buckle full appearance visual inspection system combining 2.5D imaging and AI, characterized in that: An image analysis module is used to obtain the safety buckle surface image captured by the visual camera based on the 2.5D lighting technology as a reference image, and obtain the safety buckle upper reference surface according to the reference image; An abnormality acquisition module, wherein the abnormality acquisition step is used to acquire edge lines and abnormal areas in the reference image through semantic segmentation, and to acquire pre-detection results of the abnormal areas through a safety buckle detection model, wherein the pre-detection results include the position, size and type of the abnormal areas; A lighting shooting control module is used to obtain the pre-detection result and is provided with an illumination database. According to the pre-detection result, a corresponding illumination sequence is retrieved from the illumination database. The illumination sequence is preset with an illumination instruction. According to the illumination instruction, the angle and parameters of the illumination device are adjusted. The lighting angle and the shooting angle are adjusted through a path planning strategy to shoot the surface of the safety buckle, and the safety buckle images under different illumination angles and lighting angles are obtained as images to be analyzed. The illumination device includes a lighting device and a shooting device. The path planning strategy includes setting at least two groups of reference surfaces on the safety buckle, the two groups of reference surfaces are set continuously, obtaining the angle and parameters of the irradiation device, defining the angle of the irradiation device as the detection angle, determining the edge line of the safety buckle and the reference surface, and adjusting the lighting angle so that the lighting sequentially shoots the reference surface, the inclined shooting surface and the edge line of the safety buckle; The anomaly detection module analyzes the abnormal area on the surface of the safety buckle using the abnormal information analysis strategy for the image to be analyzed under different lighting directions to obtain the detection result; The abnormal information analysis strategy includes The position determination step is used to convert the coordinates in the image to be analyzed into relative position coordinates, and to partition the reference surface, each partition corresponding to the image to be analyzed under different illumination angles, and obtain the abnormal area, and calculate the coordinates of its center point to determine the partition to which the point belongs; The size calculation step is to calculate the size of the abnormal area by scaling the relative sizes of the safety buckle reference image and the image to be analyzed; In the type identification step, a safety buckle defect type library is established, and the features of the abnormal area are matched with the features in the type library to obtain the defect type.
Citation Information
Patent Citations
Wiring terminal full-appearance visual inspection system based on AI algorithm
CN118671091A
Instrument surface quality detection system and method
CN119000695A