Method and System for Detecting Spraying Defects of Electric Tricycle Body Based on Machine Vision

Through the machine vision system integrating panoramic and micro lenses, combined with image stitching and feature extraction, the problem of difficult to accurately position the body spraying defects of electric tricycles is solved, and high-precision defect detection is achieved.

CN119715554BActive Publication Date: 2025-07-04XUZHOU TIANYING AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411891995.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-07-04
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

The prior art is difficult to accurately locate tiny, complex or hidden defects in the body spraying of electric tricycles, resulting in poor detection accuracy.

Method used

The machine vision perception module that integrates panoramic lenses and micro lenses is used to conduct statistical evaluation and analysis through multi-angle image acquisition, panoramic stitching, defect area identification and micro feature extraction, combined with spray defect index sets.

Benefits of technology

The comprehensive inspection of the body spray defects of electric tricycles has been achieved, and the accuracy and accuracy of defect detection have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119715554B_ABST
    Figure CN119715554B_ABST
Patent Text Reader

Abstract

The present application provides a method and system for detecting spraying defects on the body of an electric tricycle based on machine vision, which relates to the technical field of defect detection and includes: obtaining a machine vision perception module; collecting multi-angle images through a panoramic lens; preprocessing and panoramic stitching of the multi-angle tricycle body image set; identifying defect areas and marking anchor frames on the panoramic tricycle body image; using a micro lens to extract and quantify features of the tricycle defect area anchor frame set; statistically evaluating and analyzing the tricycle defect feature quantification information according to the spraying defect index set to generate a detection result for the spraying defects on the body of the electric tricycle. Through the present application, the technical problem in the prior art that the defect detection accuracy is poor due to the difficulty in accurately positioning small defects can be solved. By integrating a panoramic lens and a micro lens, a comprehensive detection of the spraying defects on the body of the electric tricycle is realized, and the defect detection accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of defect detection, and particularly to a method and system for detecting spraying defects on the body of an electric tricycle based on machine vision. Background Art

[0002] The spraying of the body of an electric tricycle is a key link to ensure its appearance and quality. The spraying quality directly affects the appearance, durability and long-term use performance of the vehicle. Defects in the spraying process (such as uneven coating, bubbles, scratches, paint peeling, color difference, etc.) not only affect the aesthetic appearance, but may also lead to a reduction in surface protection performance, affecting the corrosion resistance and service life of the vehicle. Existing methods for detecting spraying defects on the body of an electric tricycle mainly include machine vision-based detection, multi-scale detection methods, etc. However, due to the wide variety and different forms of spraying defects, including scratches, bubbles, color differences, uneven coatings, etc., the characteristics and manifestations of each defect are different, and it is difficult for existing methods to adapt to multiple types of defects at the same time. Especially when dealing with multiple complex, tiny or variant defects, it may also be impossible to accurately locate them, resulting in missed or false detections.

[0003] In summary, there is a technical problem in the prior art that due to the wide variety and complexity of defect types, it is difficult to accurately locate tiny, complex or hidden defects, resulting in poor accuracy of defect detection. Summary of the Invention

[0004] The purpose of this application is to provide a method and system for detecting spraying defects on the body of an electric tricycle based on machine vision, so as to solve the technical problem in the prior art that due to the wide variety and complexity of defect types, it is difficult to accurately locate tiny, complex or hidden defects, resulting in poor accuracy of defect detection.

[0005] In view of the above problems, this application provides a method and system for detecting spraying defects on the body of an electric tricycle based on machine vision.

[0006] In a first aspect, the present application provides a method for detecting spraying defects on the body of an electric tricycle based on machine vision. The method for detecting spraying defects on the body of an electric tricycle based on machine vision is implemented through a system for detecting spraying defects on the body of an electric tricycle based on machine vision. Among them, the method for detecting spraying defects on the body of an electric tricycle based on machine vision includes: obtaining a machine vision perception module, where the machine vision perception module integrates a panoramic lens and a microscopic lens; performing multi-angle image acquisition on a target electric tricycle through the panoramic lens to obtain a multi-angle tricycle body image set; preprocessing and panoramically stitching the multi-angle tricycle body image set to obtain a panoramic tricycle body image; identifying defect areas and marking anchor frames on the panoramic tricycle body image to obtain a tricycle defect area anchor frame set; using the microscopic lens to perform feature extraction and quantization on the tricycle defect area anchor frame set to obtain tricycle defect feature quantization information; statistically evaluating and analyzing the tricycle defect feature quantization information according to a spraying defect index set to generate a detection result for spraying defects on the body of an electric tricycle.

[0007] In a second aspect, the present application further provides a system for detecting spraying defects on the body of an electric tricycle based on machine vision, which is used to execute the method for detecting spraying defects on the body of an electric tricycle based on machine vision as described in the first aspect. Among them, the system for detecting spraying defects on the body of an electric tricycle based on machine vision includes: a lens construction unit, which is used to obtain a machine vision perception module, where the machine vision perception module integrates a panoramic lens and a microscopic lens; an image acquisition unit, which is used to perform multi-angle image acquisition on a target electric tricycle through the panoramic lens to obtain a multi-angle tricycle body image set; an image stitching unit, which is used to preprocess and panoramically stitch the multi-angle tricycle body image set to obtain a panoramic tricycle body image; a defect identification unit, which is used to identify defect areas and mark anchor frames on the panoramic tricycle body image to obtain a tricycle defect area anchor frame set; a feature extraction unit, which is used to use the microscopic lens to perform feature extraction and quantization on the tricycle defect area anchor frame set to obtain tricycle defect feature quantization information; a statistical evaluation unit, which is used to statistically evaluate and analyze the tricycle defect feature quantization information according to a spraying defect index set to generate a detection result for spraying defects on the body of an electric tricycle.

[0008] One or more technical solutions provided in the present application have at least the following technical effects or advantages:

[0009] By obtaining a machine vision perception module, the machine vision perception module integrates a panoramic lens and a microscopic lens; by using the panoramic lens to collect multi-angle images of the target electric tricycle, a multi-angle tricycle body image set is obtained; preprocessing and panoramic stitching are performed on the multi-angle tricycle body image set to obtain a panoramic image of the tricycle body; defect area recognition and anchor box marking are performed on the panoramic image of the tricycle body to obtain a tricycle defect area anchor box set; the microscopic lens is used to extract and quantify features of the tricycle defect area anchor box set to obtain tricycle defect feature quantification information; statistical evaluation and analysis are performed on the tricycle defect feature quantification information according to a spray defect index set to generate a spray defect detection result for the electric tricycle body. That is to say, by integrating different types of lenses, combining panoramic image stitching and microscopic feature extraction, a comprehensive detection of the spray defects on the electric tricycle body is realized, and the accuracy of defect detection is improved.

[0010] The above description is only an overview of the technical solution of this application. In order to be able to understand the technical means of this application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of this application more obvious and understandable, the following specifically describes the embodiments of this application. It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of this application, nor is it used to limit the scope of this application. Other features of this application will become easily understood through the following description. Brief Description of the Drawings

[0011] In order to more clearly illustrate the technical solutions in this application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings described below are only exemplary. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.

[0012] Figure 1 It is a flowchart of the method for detecting spray defects on the electric tricycle body based on machine vision of this application.

[0013] Figure 2 It is a structural diagram of the system for detecting spray defects on the electric tricycle body based on machine vision of this application.

[0014] Description of the reference numerals: lens construction unit 11, image acquisition unit 12, image stitching unit 13, defect recognition unit 14, feature extraction unit 15, statistical evaluation unit 16. Detailed Description of the Embodiments

[0015] By providing a method and system for detecting spraying defects on the body of an electric tricycle based on machine vision, the present application solves the technical problem in the prior art that due to the wide variety and complexity of defect types, it is difficult to accurately locate tiny, complex or hidden defects, resulting in poor accuracy of defect detection. By integrating different types of lenses and combining panoramic image stitching and microscopic feature extraction, comprehensive detection of spraying defects on the body of an electric tricycle is achieved, improving the accuracy of defect detection.

[0016] Next, the technical solutions in the present application will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. It should be understood that the present application is not limited by the exemplary embodiments described herein. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts belong to the scope of protection of the present application. Additionally, it should be noted that for the sake of description, only parts related to the present application are shown in the drawings rather than all of them.

[0017] Embodiment 1. Please refer to the attached Figure 1 , the present application provides a method for detecting spraying defects on the body of an electric tricycle based on machine vision. Among them, the method for detecting spraying defects on the body of an electric tricycle based on machine vision is applied to a system for detecting spraying defects on the body of an electric tricycle based on machine vision. The method for detecting spraying defects on the body of an electric tricycle based on machine vision specifically includes the following steps:

[0018] Step 1: Obtain a machine vision perception module, and the machine vision perception module integrates a panoramic lens and a microscopic lens.

[0019] Specifically, in the detection of spraying defects on the body of an electric tricycle, the machine vision perception module combines two types of lenses: a panoramic lens and a microscopic lens to capture information on the body surface from different angles and scales. The machine vision perception module integrates multiple hardware devices and software algorithms for understanding objects or scenes through image or video capture, processing, and analysis. It usually includes cameras, sensors, an image processing unit (such as an image acquisition card), and software for image analysis.

[0020] A panoramic lens refers to a lens that can obtain images or videos with a large range and wide angle. Usually, it can capture a large range of scenes (such as multiple angles of the vehicle body) in a single shot, thus providing a comprehensive perspective and scene information. Panoramic lenses are often used in occasions where large-field-of-view images are required, such as photographing the various sides or panoramic images of the vehicle body. The advantage of a panoramic lens is that it can provide a macroscopic image covering the entire vehicle body, including multiple angles of the vehicle body, thus avoiding the omission of defects due to perspective problems.

[0021] A microscopic lens refers to a lens that can focus on and clearly capture very small objects or features, has a high magnification ratio, can reveal details that are difficult to detect with the naked eye, and is commonly used for detecting minute defects such as tiny scratches, air bubbles, or uneven spraying. This facilitates the precise positioning and identification of minute defects and serves as a supplement to panoramic images.

[0022] During the detection process, first, a multi - angle image acquisition of the vehicle body is carried out through a panoramic lens to obtain a large - range image set of the vehicle body, ensuring a comprehensive view of the vehicle body from multiple angles, such as front, rear, left, and right views, to ensure that all parts are included. Then, the defective areas in the panoramic image (such as areas where scratches, air bubbles, or uneven spraying may exist) are selected, and these areas are magnified and photographed through a microscopic lens to capture more subtle defects. Through the machine vision perception module integrating the panoramic lens and the microscopic lens, it is possible to accurately capture the minute defects on the vehicle body surface on the basis of ensuring wide - angle image acquisition. It can not only capture a large amount of vehicle body information but also accurately locate tiny defects, improving the comprehensiveness and accuracy of spray - painting defect detection.

[0023] Step 2: Perform multi - angle image acquisition of the target electric tricycle through the panoramic lens to obtain a multi - angle tricycle body image set.

[0024] Specifically, multi - angle image acquisition of the target electric tricycle is carried out through the panoramic lens. The target electric tricycle is photographed from different perspectives to ensure that all possible defective areas are covered, resulting in a multi - angle tricycle body image set. The multi - angle tricycle body image set refers to a set of image data obtained by photographing from different angles and contains views of various parts of the vehicle body surface. In spray - painting defect detection, a single perspective may miss defects at some angles, especially in areas such as vehicle body curves, corners, or areas that are difficult to directly observe. By acquiring images from multiple angles, all parts of the vehicle body can be comprehensively covered, improving the accuracy and integrity of defect detection. A panoramic lens with a relatively large field of view can be selected. Usually, its field of view can reach 90° to 180°, covering a large part of the vehicle body at one time and reducing the number of shootings. To ensure coverage of all parts of the vehicle body, shooting is usually carried out from multiple angles.

[0025] The surface of the vehicle body usually contains multiple different areas, such as the front and rear, left and right, and top. Each area has different spraying defects. Therefore, image acquisition is carried out from multiple angles (such as the front, side, rear, oblique side, etc.). Suppose there are 4 different directions for the shooting angle of the vehicle body. By adjusting the position of the panoramic lens or rotating the vehicle body, images at different angles are obtained. Start the panoramic lens and take images from each set angle. Each time an image is taken, the panoramic lens will capture a large-range image of the entire vehicle body surface. Usually, the image resolution should be high enough (such as 4000×3000 pixels) to ensure that sufficient details are captured. Through the panoramic lens, images at multiple angles are collected to ensure that every part of the vehicle body is fully covered, avoiding missing spraying defects due to angle problems and ensuring the integrity of the detection.

[0026] Step 3: Preprocess and panoramically stitch the multi-angle tricycle body image set to obtain a panoramic image of the tricycle body.

[0027] Specifically, preprocessing the multi-angle tricycle body image set includes noise removal, brightness adjustment, contrast enhancement, edge detection, etc., removing irrelevant information and highlighting the useful features in the images, thereby improving the accuracy and usability of the images. First, use a noise recognition algorithm to identify the types of noise in the images, such as Gaussian noise (which conforms to a normal distribution and is usually caused by uneven sensor brightness, self-noise of circuit components, or excessive temperature, manifested as random perturbations of gray values), salt-and-pepper noise (manifested as randomly appearing white or black dots in the image), etc. According to the determined noise characteristic information, select a suitable filtering algorithm, such as median filtering for removing salt-and-pepper noise and Gaussian filtering for removing Gaussian noise. Adaptively adjust the filter parameters, such as window size, filtering intensity, etc. Apply the determined noise filtering adaptive algorithm to filter the multi-angle tricycle body image set to obtain a preprocessed standard image set.

[0028] Use feature point detection and matching algorithms (such as SIFT, SURF, or ORB) to detect key points in the image, which can be points on the vehicle body with high contrast and stability, such as areas like windows, headlights, wheels, etc. SIFT (Scale-Invariant Feature Transform) detects key points in different scale spaces and generates rotation-invariant descriptors for each key point. It is commonly used in scenarios that require high-precision matching, but has a relatively high computational complexity. SURF (Speeded-Up Robust Features) is an efficient improved version of SIFT. It accelerates the detection of feature points and the generation of descriptors by using box filters. Its calculation speed is faster than SIFT, but there is still a certain computational complexity. ORB combines the FAST corner detector and the BRIEF descriptor. It generates feature descriptors by detecting corners in the image and calculating their directions. The descriptor is defined using a binary string with a dimension of 32, occupying less storage space and having a fast calculation speed. For example, use the SIFT algorithm to extract key points from each image. Suppose the number of feature points in two vehicle body images are 500 and 600 respectively, and use the feature matching algorithm to find the corresponding key points between these images.

[0029] Calculate the transformation relationship between the images based on the matched feature points, exclude incorrect matches, obtain the accurate transformation relationship, and perform transformations such as rotation, translation, and scaling on the images to make them dock correctly. Fuse and stitch the transformed images to generate the final panoramic image. The goal of image fusion is to seamlessly connect the images and avoid the appearance of gaps or overlapping regions in the stitching. After image preprocessing and panoramic stitching, the finally obtained panoramic image of the three-wheeler vehicle body can present a complete view of the entire vehicle body, combining information from multiple-angle shootings, avoiding blind spots caused by any single perspective, and providing a comprehensive display of the vehicle body surface.

[0030] Step Four: Identify the defective areas and mark the anchor boxes on the panoramic image of the three-wheeler vehicle body to obtain the set of anchor boxes for the defective areas of the three-wheeler.

[0031] Specifically, to identify the defective areas in the panoramic image of the three-wheeler vehicle body, it is usually identified based on a standard spray painting image. The standard spray painting image is an image of the electric three-wheeler vehicle body without any spray painting defects taken under ideal conditions using a high-resolution camera under good lighting conditions. Extract the features of the standard spray painting image and the panoramic image of the three-wheeler vehicle body, and compare the differences between the two feature sets through a loss function to obtain the spray painting feature loss data set and find the areas that may have defects.

[0032] Feature extraction is achieved by inputting the standard spray image and the panoramic image of the tricycle body into two sub-networks of the spray feature siamese network. Each sub-network independently learns the feature representation of the input image. The spray feature siamese network compares the feature vectors output by the two sub-networks to identify and quantify the differences between the images, namely spray defects. The spray feature siamese network is a special deep learning network architecture that includes two symmetric sub-networks for comparing the differences between two input images. It is usually composed of multiple convolutional layers, each followed by a pooling layer and an activation function. These layers work together to extract features from the input image. The spray feature siamese network outputs two feature sets - the standard spray feature set and the global spray feature set, to identify and quantify the differences between the standard spray image and the actual body panoramic image.

[0033] The difference between the standard spray image and the actual body panoramic image is a potential image segment that may contain defects. For the identified differences, anchor boxes are generated and their positions and sizes are finely adjusted to accurately cover the defect areas. Anchor boxes are rectangular boxes used to mark the regions of interest (defect areas) in the image. The process of anchor box marking is to generate rectangular marks in the image according to the identified defect areas to clarify the positions and sizes of these areas. Each anchor box is assigned a defect category label (such as uneven spraying, bubbles, scratches, etc.) and a confidence score. The panoramic image of the tricycle body is marked with regional anchor boxes to obtain all defect area anchor boxes. The position information, category labels, confidence, etc. of each anchor box are integrated into the tricycle defect area anchor box set, which includes all possible defect areas in the tricycle panoramic image. Each anchor box includes position (coordinates) and size information, as well as possible defect categories. Through anchor box marking, the defect areas can be accurately marked in the panoramic image, improving the accuracy of defect detection.

[0034] Step Five: Use the described microscopic lens to perform feature extraction and quantification on the tricycle defect area anchor box set to obtain tricycle defect feature quantification information.

[0035] Specifically, a microscopic lens is used to perform fine image acquisition on the calibrated defect area anchor box set, that is, a lens with high resolution and the ability to capture object details is used to detect tiny defects or surface textures. The acquired high-resolution images are preprocessed, including denoising, enhancing contrast, and improving texture distinguishability. According to feature evaluation metrics, such as morphology, area, distribution, etc., a defect evaluation network is trained. The acquired high-resolution images are evaluated for defects to identify morphological features, area features, distribution features, etc. The shape of the defect is extracted through contour detection or shape recognition algorithms (such as the linear shape of a crack, the roundness of a bubble, etc.); the area of the defect region is calculated through region segmentation algorithms (such as threshold segmentation or deep learning-based semantic segmentation); the position distribution of the defects on the entire vehicle body is determined (such as whether they are concentrated in a certain area). The extracted features are converted into quantified information and represented by numerical metrics.

[0036] The extracted features such as morphology, area, and distribution are comprehensively evaluated to obtain the quantified information of each defect area. The influence of each feature is integrated through an algorithm (such as weighted average) to generate a final defect evaluation value or quality score. The quantified information of all defects is summarized to generate the overall defect feature quantified information of the tricycle body. By using a microscopic lens for feature extraction and quantification, high-precision identification and quantification of the defect areas of the tricycle are achieved, which not only improves the accuracy of defect detection but also provides detailed information about defect features.

[0037] Step Six: Statistically evaluate and analyze the tricycle defect feature quantified information according to the spray defect index set to generate the spray defect detection result of the electric tricycle body.

[0038] Specifically, according to the previous feature extraction of the spray defects on the tricycle body, it is quantified into a specific data set, including the morphology, area, distribution, etc. of each defect, and the defect morphology feature set, defect area feature set, and defect distribution feature set are respectively sorted out. For example, the defect morphology feature set includes data of metrics such as roundness and edge roughness; the defect area feature set includes data of the area sizes of different defects; the defect distribution feature set includes data of the positions of the defects on the vehicle body.

[0039] The spray painting defect index set is a set of key performance indicators used to evaluate the spray painting quality of the electric tricycle body, including the type, area, shape, distribution, quantity, influence degree, etc. of the defects. Different defect types are extracted from the spray painting defect index set to form the spray painting defect type set. According to the spray painting type, feature clustering is performed on the defect shape feature set, defect area feature set, and defect distribution feature set, and those with similar types are classified into the same category. Statistical evaluation and analysis are carried out on the feature sets corresponding to each type after clustering, that is, statistics are performed on the defect shape feature set, defect area feature set, and defect distribution feature set corresponding to each defect type to obtain comprehensive features.

[0040] According to the influence degree of the defect shape index, defect area index, and defect distribution index, a weight is assigned to each index, and the score of the comprehensive feature set of the clustered spray painting defects corresponding to each type is calculated. Then, according to the influence degree of each defect type on the body, a corresponding weight coefficient is assigned to each defect type, and it is weighted and calculated with the score corresponding to each defect type to obtain the overall detection result, that is, the detection result of the spray painting defects of the electric tricycle body. The detection result of the spray painting defects of the electric tricycle body is a detection report obtained through statistical analysis, which contains detailed information about the spray painting defects of the body, such as the type, location, quantity, area size, influence degree, etc. of the defects. According to the results of the evaluation and analysis, a detailed defect detection report is generated, listing all defect types and their quantities, the locations where the defects are concentrated, the severity of the defects, etc., and finally a priority repair sequence is generated to ensure that the most serious and most influential defects can be repaired first. By statistically analyzing the various features of the spray painting defects, the influence degree of the defects is accurately evaluated, and more serious defect types are identified to avoid missed detections.

[0041] Furthermore, step three of this application includes:

[0042] Noise recognition and classification are sequentially performed on each body image in the multi-angle tricycle body image set to obtain image data noise characteristic information; a noise filtering adaptive algorithm is determined according to the image data noise characteristic information, and based on the noise filtering adaptive algorithm, the multi-angle tricycle body image set is respectively subjected to filtering preprocessing to obtain a standard multi-angle body image set; feature point detection is performed on each body image in the standard multi-angle body image set to obtain a multi-angle body feature point set; based on the multi-angle body feature point set, panoramic stitching is performed on the standard multi-angle body image set to obtain the tricycle body panoramic image.

[0043] Specifically, noise recognition is performed on each image in the multi-angle tricycle body image set once to identify and distinguish the noise and real image content in the image, and obtain the noise characteristic information of the image data, that is, the specific manifestation form of the noise in the image, such as the type of noise (such as Gaussian noise, salt-and-pepper noise, etc.), intensity, distribution, etc. Noise is usually irrelevant information introduced by factors such as camera equipment and environmental interference, and may be random pixel changes or irregular dot-like interferences. Noise recognition and classification distinguish noise from valid information by analyzing features such as the texture and color distribution of the image. Common types of noise include Gaussian noise (electronic noise generated by image sensors) and salt-and-pepper noise (errors generated during image transmission or storage). Through statistical analysis methods, the mean and standard deviation of the pixels in the image are calculated to identify the noise area. If the pixel fluctuations in certain areas exceed the normal range, they can be marked as noise areas.

[0044] According to the identified noise characteristic information of the image data, determine the noise filtering adaptive algorithm, that is, an algorithm that automatically selects and adjusts filter parameters according to the characteristics of the noise in the image for noise removal, such as noise filtering methods like mean filtering, median filtering, Gaussian filtering, Kalman filtering, etc. The adaptive algorithm will dynamically adjust the filtering strategy according to the changes in the noise type and image content to retain image details to the greatest extent. For example, when processing the multi-angle body image set, if the noise characteristic of the image is Gaussian noise, adjust the standard deviation of the Gaussian filter according to the intensity and distribution of the noise to optimize the clarity of the image.

[0045] Perform filtering preprocessing on the multi-angle tricycle body image set through the noise filtering adaptive algorithm, and dynamically adjust the filtering parameters according to the noise intensity of the local area of the image, so as to retain the details of the image while removing the noise, and obtain the standard multi-angle body image set, which is usually a clean and high-quality image set with noise removed or reduced.

[0046] Detect feature points for each image in the standard multi-angle tricycle body image set with noise removed, and extract feature points with high recognition and robustness to obtain the multi-angle body feature point set, which are usually points in the image that are easy to identify and insensitive to position changes, such as corner points, edges, or regions with significant texture changes, and have invariance in different perspectives of the image. For example, use SIFT (Scale-Invariant Feature Transform) or detect feature points, including relatively prominent features such as the edges of the vehicle body, windows, and headlights.

[0047] Based on the obtained set of multi-angle vehicle body feature points, a panoramic stitching of the standard multi-angle vehicle body image set is performed. By matching the feature points, the transformation matrix between each image is calculated, so as to seamlessly stitch the images from multiple angles into a complete vehicle body image. Panoramic stitching refers to synthesizing images from different perspectives or angles into a complete image through an algorithm to display a complete scene. That is to say, panoramic stitching integrates the vehicle body images from different angles into a complete vehicle body view. For example, assume that vehicle body images are taken from four angles. After feature point detection, each image contains 500 feature points. By matching these feature points, the transformation relationship between each pair of images (such as rotation matrix, translation matrix, etc.) is calculated. Using these matrices for image stitching, the images from each perspective are seamlessly fused, and finally a complete panoramic vehicle body image is obtained. Through noise recognition and filtering processing, the image quality is significantly improved. Noise filtering removes the interference caused by the camera or environmental factors and reduces errors; feature point detection extracts distinguishable points from the vehicle body image, which has good robustness and can be stably matched in images from different angles; precise feature point matching, seamless stitching of vehicle body images taken from multiple angles, generates a complete panoramic vehicle body image, improving the accuracy and comprehensiveness of defect detection and ensuring that the detection results cover the entire vehicle body.

[0048] Further, step four of the present application includes:

[0049] Collect and obtain the standard spraying image information of the target electric tricycle, build a spraying feature siamese network based on the standard spraying image information and the panoramic vehicle body image of the tricycle. The spraying feature siamese network includes a standard siamese sub-network and a defect siamese sub-network; perform feature extraction on the standard spraying image and the panoramic vehicle body image of the tricycle based on the spraying feature siamese network to obtain a standard spraying feature set and a global spraying feature set; introduce a feature loss function to perform loss analysis on the standard spraying feature set and the global spraying feature set to obtain a spraying feature loss data set; perform regional anchor box marking on the panoramic vehicle body image of the tricycle based on the spraying feature loss data set to obtain the tricycle defect area anchor box set.

[0050] Specifically, a high-resolution camera (such as a digital camera or an industrial camera) is used to collect the standard spraying image of the target electric tricycle as a defect-free reference image, and appropriate lighting and shooting conditions are adopted to ensure the image quality. The standard spraying image refers to an ideal or standard image of the surface spraying of the electric tricycle body, representing the normal and defect-free spraying effect during the spraying process. Build a spraying feature siamese network based on the standard spraying image information and the panoramic vehicle body image of the tricycle. The spraying feature siamese network contains two sub-networks, namely the standard siamese sub-network and the defect siamese sub-network, which receive different inputs and are compared in a certain way.

[0051] The standard twin network is used to process standard spray images and extract the characteristic information of normal spraying; while the defect twin network is used to extract the spraying characteristics in the actual body panoramic image, including spraying defects such as scratches, bubbles, uneven spraying, etc. The comparison between the two can help identify the differences or defects in the spraying process. The two sub-networks (standard twin network and defect twin network) of the spraying feature twin network share the same network structure and weights. By inputting standard images and body images, the characteristic information is extracted and compared.

[0052] Feature extraction is performed on the standard spray image and the tricycle body panoramic image through the spraying feature twin network to obtain the standard spray feature set and the global spray feature set. The standard spray feature set and the global spray feature set contain the same number of feature vectors. The standard spray feature set represents various attributes of normal spraying, such as spraying uniformity, color consistency, surface flatness, etc. The global spray feature set represents all the information of the actual spraying on the body surface, including defect areas, unevenly sprayed parts, etc. For example, for the standard spray image, the standard twin network may extract smooth and uniform surface texture features; while the defect twin network may extract the feature of the defective area on the body surface, such as local uneven spraying or bubbles.

[0053] The difference between the standard spray feature set and the global spray feature set is analyzed through the feature loss function, that is, the difference between the standard spray feature and the body image feature is analyzed. The feature loss function is used to measure the magnitude of the feature difference between two images (standard spray image and actual body image). The weights in the twin network are optimized through the loss function, so that the standard spray feature set and the feature set of the actual body image can be closer, thereby helping to better identify defects. The loss function calculates the difference between the two feature sets and generates a spray feature loss data set. The greater the loss, the greater the gap between the two, indicating that there may be defects in the body image. If there are obvious differences in color and texture between the standard spray feature set and the global spray feature set, the loss function will output a large loss value, indicating that there are defects in the body spraying. The feature loss data set calculated through the feature loss function records the difference between the standard spray image feature and the actual body image feature, and identifies the defects that occur in the spraying process, such as uneven coating or bubbles.

[0054] Based on the spray painting feature loss dataset, perform regional anchor box marking on the panoramic image of the three-wheeler body. By analyzing the loss data, determine the areas where defects may exist, automatically generate anchor boxes in the image, and mark the specific positions of the defective areas. Regional anchor box marking divides the image into multiple small areas and identifies potential defects in these areas, which are called anchor boxes and represent the possible locations of defects. By marking anchor boxes in the panoramic image of the body, the defective areas can be further analyzed and located. Finally, an anchor box set of defective areas of the electric three-wheeler is obtained, marking all the areas where spray painting defects may exist. The anchor box set of defective areas of the three-wheeler is the areas where defects may exist marked in the panoramic image after feature loss analysis. Each anchor box represents a region of interest in the image and contains defects such as uneven spraying, bubbles, or scratches. By effectively extracting the features of the standard spray painting image and the actual body panoramic image using the spray painting feature twin network and analyzing the differences between the two through the feature loss function, the areas that may contain spray painting defects can be accurately identified and marked.

[0055] Further, step five of this application includes:

[0056] Based on the anchor box set of defective areas of the three-wheeler, determine a set of defective attention areas; use the micro lens to collect defective images of the set of defective attention areas to obtain a set of microscopic images of defective areas; obtain the spray painting defect feature evaluation target, and train and construct a spray painting defect evaluation network based on the spray painting defect feature evaluation target; based on the spray painting defect evaluation network, perform defect quantification evaluation on the set of microscopic images of defective areas to obtain the quantified information of the defective features of the three-wheeler.

[0057] Specifically, according to the anchor box set of defective areas of the three-wheeler, use the attention mechanism to weight features such as the confidence of the box and the defect category, and screen out the areas with high priority. Assign an attention score to each anchor box, and place the areas with higher scores at the front, that is, the areas that need more attention, to form a set of defective attention areas. Use the micro lens to collect defective images of the set of defective attention areas, collect high-resolution images of each defective attention area, and adjust the light source to eliminate light and shadow interference to obtain a set of microscopic images of defective areas. The set of microscopic images of defective areas is a set of images collected from the set of defective attention areas using the micro lens, which shows the details of the defective areas.

[0058] Define the evaluation objectives for spray painting defects and design three sub-modules, including the morphology evaluation module, the area evaluation module, and the distribution evaluation module. Use annotation tools to annotate the collected microscopic images in detail, including shape (such as ellipse, crack), area (unit: mm²), and position (relative coordinates). Use a multi-task learning framework to integrate the three evaluation modules into a unified network to obtain a spray painting defect evaluation network. Input the microscopic image set of the defect area into the spray painting defect evaluation network to perform precise numerical analysis on the characteristics of the defects (such as shape, size, position, etc.), obtain the quantitative information of the tricycle defect characteristics, and output the defect shape category, area, distribution heat map, etc. Based on the microscopic images of the defect area, the network can accurately extract features such as morphology, area, and distribution, narrow the detection range through the attention mechanism, and combine the microscopic lens collection and the evaluation network to achieve the accurate identification and quantification of spray painting defects, not only improving the accuracy of defect detection, but also providing detailed information about the defect characteristics.

[0059] Furthermore, the present application further includes the following steps:

[0060] Collect and obtain the spray painting defect image set of the target electric tricycle; disassemble the defect feature evaluation objectives into indicators to obtain defect morphology indicators, defect area indicators, and defect distribution indicators; based on the defect morphology indicators, defect area indicators, and defect distribution indicators, perform defect annotation training on the spray painting defect image set to generate a defect morphology recognition network, a defect area recognition network, and a defect distribution recognition network; perform parallel weighted fusion on the defect morphology recognition network, the defect area recognition network, and the defect distribution recognition network to construct the spray painting defect evaluation network.

[0061] Specifically, use a high-resolution camera or a microscopic lens to take spray painting images of different parts of the vehicle body to ensure that the defect characteristics are clearly visible. Obtain the spray painting defect image set of the target electric tricycle containing different types of spray painting defects, which records various defects existing in the spray painting process of the electric tricycle body, including irregular shapes, abnormal areas, uneven distributions, etc. Disassemble the defect feature evaluation objectives into multiple indicators, such as morphology (the shape and type of the defect), area (the size of the defect), and distribution (the spatial distribution of the defect on the vehicle body). The defect morphology indicator refers to the appearance characteristics of the defect, such as the shape category (round, ellipse, strip, etc.); the defect area indicator is used to measure the size of the defect area, with the unit of mm²; the defect distribution indicator is used to count the distribution of the defects in each area of the vehicle body surface, such as concentrated on the edge, local, etc. Establish specific evaluation criteria for each indicator. For example, an area deviation exceeding 5 mm² is regarded as a serious defect.

[0062] Annotate the spray defect image set, and provide detailed label information (such as morphological category, area range, position) for the defect areas of each image through defect morphological indicators, defect area indicators, and defect distribution indicators. Use the annotated data set to train the defect morphology recognition network, defect area recognition network, and defect distribution recognition network respectively, which are used to identify defect shapes, quantify defect areas, and analyze the spatial distribution of defects. Construct a defect morphology recognition network using a convolutional neural network architecture, and use its classification performance to recognize defect morphologies. Add a fully connected layer, with the number of output nodes equal to the defect categories (such as three categories: scratches, bubbles, and spots), input the preprocessed defect images, and output the defect categories. Iteratively train the defect morphology recognition network, use the cross-entropy loss function to optimize the classification accuracy, and adjust the model parameters until the accuracy reaches the preset accuracy, then stop training to obtain the defect morphology recognition network.

[0063] Use an object detection model to detect and calculate the area of the defect area, and identify the defect boundary and area value according to the defect image. Annotate the bounding box and area information of each defect to construct a training data set. Use the IoU (Intersection over Union) loss function as an evaluation index to optimize the prediction accuracy of the bounding box. Through iterative training with the defect area indicator and the spray defect image set, obtain the defect area recognition network. Use a segmentation model to construct a defect distribution recognition network, and identify the distribution characteristics of defects on the panoramic image according to the panoramic defect image. Use the segmentation model to perform pixel-level segmentation on the defects, add a Softmax layer, and output the probability that each pixel belongs to the defect area. Annotate the defect area pixels (that is, whether each pixel belongs to the defect), and use pixel-level cross-entropy as the loss function to optimize the model. Use pixel-level segmentation cross-entropy to optimize the network parameters to obtain the defect distribution recognition network. The defect morphology recognition network, defect area recognition network, and defect distribution recognition network generate targeted models by training their respective data sets. Each model focuses on one evaluation target, ensuring the accuracy and professionalism of the recognition results.

[0064] Parallelize the output results of the defect morphology recognition network, defect area recognition network, and defect distribution recognition network, and extract the intermediate features of each network. Through a weighted fusion mechanism, combine the prediction results of the three networks to generate a comprehensive evaluation result. The weight of each network is optimized and determined according to the performance on the validation set to construct the final spray defect evaluation network. Through the weighted fusion of the three independent networks, the comprehensive evaluation ability for complex defects is improved, and the false detection rate and missed detection rate are significantly reduced.

[0065] Furthermore, step six of this application includes:

[0066] Based on the quantified information of the tricycle defect features, determine the defect morphological feature set, defect area feature set, and defect distribution feature set; extract defect types from the spray painting defect index set to obtain the spray painting defect type set; perform feature clustering on the defect morphological feature set, defect area feature set, and defect distribution feature set according to the spray painting defect type set to obtain the spray painting defect clustering feature set; respectively perform statistical evaluation and analysis on the spray painting defect clustering feature set to obtain the detection results of the spray painting defects on the electric tricycle body.

[0067] Specifically, based on the quantified information of the tricycle defect features, determine the morphological, area, and distribution features of the defects respectively, and determine the defect morphological feature set, defect area feature set, and defect distribution feature set. The defect morphological feature set refers to the set of features about the appearance shape of the defects extracted from the image, usually including the edge contour, size, symmetry, etc. of the defects, which helps to distinguish different types of defects; the defect area feature set refers to the set of features describing the area of the defect region, usually mainly the size of the area, including the actual covered area of the defect, the proportion of the body surface occupied, etc.; the defect distribution feature set refers to the distribution situation features of the defects on the body surface, including the frequency of defect occurrence, position distribution, regional concentration, etc.

[0068] The spray painting defect index set is the parameters or criteria used to evaluate the spray painting defects. Different defect types are extracted from the spray painting defect index set to obtain the spray painting defect type set, including scratches, bubbles, cracks, uneven coatings, etc. According to the spray painting defect type set, perform feature clustering on the defect morphological feature set, defect area feature set, and defect distribution feature set. Use clustering algorithms (such as K-means clustering, DBSCAN) to perform clustering analysis on the spray painting defects, and classify the defects with similar features into the same category to form the spray painting defect clustering feature set. Feature clustering is the process of classifying defects with similar features into the same category. Through the clustering algorithm, the similar defect types in the defect morphological feature set, defect area feature set, and defect distribution feature set are classified into one category. The K-means clustering algorithm usually has a pre-specified number of categories (such as 4 types), divides the defects into 4 categories according to their features, optimizes the center of each cluster through an iterative process, and ensures that each defect is assigned to the cluster most similar to its features. Different from K-means, DBSCAN (density clustering algorithm) does not require specifying the number of clusters in advance, but automatically discovers defect clusters according to the density distribution and identifies the defect clusters in the dense regions.

[0069] The clustering feature set of spraying defects is analyzed in detail by statistical methods, including calculating statistics such as mean, variance, maximum value, and minimum value, with the aim of evaluating the severity, distribution, and overall quality of the defects. According to the clustering spraying defect feature set, relevant features of each cluster are extracted, including the morphological features of the defects (such as shape, contour), area (such as the area size of the defects), and distribution (such as defect distribution density, regional distribution, etc.). Calculate the mean, standard deviation, etc. of each cluster feature to measure the distribution of the defects. According to the influence weights of the defect morphology index, defect area index, and defect distribution index, the relevant features of each extracted cluster are weighted and evaluated to obtain the influence score of the clustering spraying defect feature set after each cluster. Then, according to the influence degree of each defect type, an influence score is assigned to each defect type, and corresponding weights are assigned to each defect type.

[0070] According to the clustering analysis results, the priority order of defect types is carried out. Usually, larger, denser, and abnormally shaped defects are regarded as the objects to be repaired first. The statistical data and severity scores of all defect types are weighted and combined to obtain the final spraying defect detection result, which is a comprehensive score or report listing the quantity, location, severity, etc. of each defect type. By statistically analyzing the clustering features, the severity, area, and distribution of each defect type can be evaluated more accurately, and the defects can be repaired targeted, especially those that have a greater impact on the body quality, improving production efficiency and product quality.

[0071] Furthermore, the present application further includes the following steps:

[0072] Analyze the influence degree of each defect type in the spraying defect type set to obtain the spraying defect type influence coefficient set; respectively perform feature information statistics on the spraying defect clustering feature set to obtain the clustering spraying defect comprehensive feature set; assign influence weights to the defect morphology index, defect area index, and defect distribution index to obtain the defect index influence factor set; use the defect index influence factor set to perform weighted integral evaluation on the clustering spraying defect comprehensive feature set respectively to obtain the clustering spraying defect influence degree set; based on the spraying defect type influence coefficient set, perform defect weighted analysis on the clustering spraying defect influence degree set to obtain the electric tricycle body spraying defect detection result.

[0073] Specifically, the influence degree of each defect type with concentrated spraying defect types is analyzed, an influence coefficient is assigned to each defect type, and a set of influence coefficients of spraying defect types is obtained. The influence coefficient of spraying defect types is evaluated according to the different influences of defect types on the vehicle body, and is usually determined by experience and actual application results. The set of influence coefficients of spraying defect types represents the influence degree of different spraying defect types on the overall quality. For example, bubbles may have a greater impact on the spraying appearance, while scratches may have a greater impact on the structure, and the influence coefficient will be assigned according to the importance and severity of the defect type.

[0074] Statistical analysis of the feature information of the clustering feature set of spraying defects is carried out, the defect morphology feature set, defect area feature set and defect distribution feature set corresponding to each defect type are extracted, and statistical information such as the mean and variance of each defect type is calculated to obtain a comprehensive feature set. According to the different characteristics of spraying defects, influence weight factors are assigned to each defect index (morphology, area, distribution), usually through research based on experimental data or industry standards, and the weights of each index are adjusted by comparing the influence degrees of different defect types on the vehicle body quality. The set of defect index influence factors is a factor set obtained after weight assignment to the defect morphology index, defect area index and defect distribution index.

[0075] The clustering spraying defect comprehensive feature set is weighted according to the set of defect index influence factors. By performing weighted calculations on the defect morphology index, defect area index and defect distribution index of each defect type after clustering and their corresponding weights, an overall evaluation score is obtained, and a set of influence degrees of clustering spraying defects is obtained, which represents the influence degree of each defect type on the vehicle body quality.

[0076] According to the set of influence coefficients of spraying defect types, that is, the influence degree of each defect type, defect weighted analysis is carried out on the set of influence degrees of clustering spraying defects, that is, the evaluation scores of each defect type are weighted according to their influence degrees, and the influence of different defect types is comprehensively considered to obtain the final detection result of the spraying defects of the electric tricycle body. By performing influence degree analysis and feature information statistics, combining weighted integral evaluation and defect weighted analysis, a comprehensive evaluation and accurate detection of the spraying defects of the electric tricycle body can be realized, improving the accuracy and comprehensiveness of defect detection.

[0077] In summary, the method for detecting spraying defects of the electric tricycle body based on machine vision provided by this application has the following technical effects:

[0078] By obtaining a machine vision perception module, the machine vision perception module integrates a panoramic lens and a microscopic lens; by using the panoramic lens to collect multi-angle images of the target electric tricycle, a multi-angle tricycle body image set is obtained; preprocessing and panoramic stitching are performed on the multi-angle tricycle body image set to obtain a panoramic image of the tricycle body; defect area recognition and anchor box marking are performed on the panoramic image of the tricycle body to obtain a tricycle defect area anchor box set; the microscopic lens is used to perform feature extraction and quantization on the tricycle defect area anchor box set to obtain tricycle defect feature quantization information; statistical evaluation and analysis are performed on the tricycle defect feature quantization information according to a spraying defect index set to generate a spraying defect detection result for the electric tricycle body. That is to say, by integrating different types of lenses, combining panoramic image stitching and microscopic feature extraction, comprehensive detection of the spraying defects of the electric tricycle body is achieved, and the accuracy of defect detection is improved.

[0079] Embodiment 2. Based on the same inventive concept as the method for detecting spraying defects of an electric tricycle body based on machine vision in the foregoing Embodiment 1, the present application also provides a system for detecting spraying defects of an electric tricycle body based on machine vision. Please refer to the attached Figure 2 , the system for detecting spraying defects of an electric tricycle body based on machine vision includes:

[0080] A lens construction unit 11, which is used to obtain a machine vision perception module, and the machine vision perception module integrates a panoramic lens and a microscopic lens; an image acquisition unit 12, which is used to collect multi-angle images of the target electric tricycle through the panoramic lens to obtain a multi-angle tricycle body image set; an image stitching unit 13, which is used to preprocess and panoramically stitch the multi-angle tricycle body image set to obtain a panoramic image of the tricycle body; a defect recognition unit 14, which is used to perform defect area recognition and anchor box marking on the panoramic image of the tricycle body to obtain a tricycle defect area anchor box set; a feature extraction unit 15, which is used to perform feature extraction and quantization on the tricycle defect area anchor box set by using the microscopic lens to obtain tricycle defect feature quantization information; a statistical evaluation unit 16, which is used to perform statistical evaluation and analysis on the tricycle defect feature quantization information according to a spraying defect index set to generate a spraying defect detection result for the electric tricycle body.

[0081] Further, the image stitching unit 13 in the system for detecting spraying defects of an electric tricycle body based on machine vision is further used for:

[0082] Perform noise recognition and classification on each body image in the multi-angle tricycle body image set in sequence to obtain noise characteristic information of the image data; determine a noise filtering adaptive algorithm according to the noise characteristic information of the image data, and perform filtering preprocessing on the multi-angle tricycle body image set respectively based on the noise filtering adaptive algorithm to obtain a standard multi-angle body image set; perform feature point detection on each body image in the standard multi-angle body image set to obtain a multi-angle body feature point set; perform matching panoramic stitching on the standard multi-angle body image set based on the multi-angle body feature point set to obtain the tricycle body panoramic image.

[0083] Further, the defect recognition unit 14 in the electric tricycle body spraying defect detection system based on machine vision is further configured to:

[0084] Collect and obtain standard spraying image information of the target electric tricycle, build a spraying feature siamese network based on the standard spraying image information and the tricycle body panoramic image, and the spraying feature siamese network includes a standard siamese sub-network and a defect siamese sub-network; perform feature extraction on the standard spraying image and the tricycle body panoramic image based on the spraying feature siamese network to obtain a standard spraying feature set and a global spraying feature set; introduce a feature loss function to perform loss analysis on the standard spraying feature set and the global spraying feature set to obtain a spraying feature loss data set; perform regional anchor box marking on the tricycle body panoramic image based on the spraying feature loss data set to obtain the tricycle defect area anchor box set.

[0085] Further, the feature extraction unit 15 in the electric tricycle body spraying defect detection system based on machine vision is further configured to:

[0086] Based on the tricycle defect area anchor box set, determine a defect attention area set; use the micro lens to collect defect images of the defect attention area set to obtain a defect area micro image set; obtain a spraying defect feature evaluation target, and train and construct a spraying defect evaluation network based on the spraying defect feature evaluation target; perform defect quantization evaluation on the defect area micro image set based on the spraying defect evaluation network to obtain tricycle defect feature quantization information.

[0087] Further, the feature extraction unit 15 in the electric tricycle body spraying defect detection system based on machine vision is further configured to:

[0088] Collect and obtain the spray defect image set of the target electric tricycle; disassemble the defect feature evaluation target into indicators to obtain defect morphology indicators, defect area indicators, and defect distribution indicators; based on the defect morphology indicators, defect area indicators, and defect distribution indicators, perform defect annotation training on the spray defect image set to generate a defect morphology recognition network, a defect area recognition network, and a defect distribution recognition network; parallelly weight and fuse the defect morphology recognition network, the defect area recognition network, and the defect distribution recognition network to construct the spray defect evaluation network.

[0089] Further, the statistical evaluation unit 16 in the electric tricycle body spray defect detection system based on machine vision is further configured to:

[0090] According to the tricycle defect feature quantization information, determine a defect morphology feature set, a defect area feature set, and a defect distribution feature set; extract defect types from the spray defect index set to obtain a spray defect type set; perform feature clustering on the defect morphology feature set, the defect area feature set, and the defect distribution feature set according to the spray defect type set to obtain a spray defect clustering feature set; respectively perform statistical evaluation analysis on the spray defect clustering feature set to obtain the electric tricycle body spray defect detection result.

[0091] Further, the statistical evaluation unit 16 in the electric tricycle body spray defect detection system based on machine vision is further configured to:

[0092] Analyze the influence degree of each defect type in the spray defect type set to obtain a spray defect type influence coefficient set; respectively perform feature information statistics on the spray defect clustering feature set to obtain a clustering spray defect comprehensive feature set; perform influence weight allocation on the defect morphology indicators, defect area indicators, and defect distribution indicators to obtain a defect index influence factor set; use the defect index influence factor set to perform weighted integral evaluation on the clustering spray defect comprehensive feature set respectively to obtain a clustering spray defect influence degree set; based on the spray defect type influence coefficient set, perform defect weighted analysis on the clustering spray defect influence degree set to obtain the electric tricycle body spray defect detection result.

[0093] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The foregoing Figure 1The method and specific example of detecting defects in the body spraying of electric tricycles based on machine vision in Embodiment 1 are equally applicable to the system for detecting defects in the body spraying of electric tricycles based on machine vision in this embodiment. Through the detailed description of the method for detecting defects in the body spraying of electric tricycles based on machine vision above, those skilled in the art can clearly know the system for detecting defects in the body spraying of electric tricycles based on machine vision in this embodiment. Therefore, for the sake of brevity of the specification, it will not be described in detail here. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0094] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0095] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalent technologies, the present application also intends to include these changes and modifications.

Claims

1. A method for detecting defects in the body spraying of electric tricycles based on machine vision, characterized in that, Including: Obtain a machine vision perception module, where the machine vision perception module integrates a panoramic lens and a micro lens; Collect multi-angle images of the target electric tricycle through the panoramic lens to obtain a multi-angle tricycle body image set; Preprocess and panoramically stitch the multi-angle tricycle body image set to obtain a panoramic image of the tricycle body; Identify the defective area and mark the anchor boxes on the panoramic image of the tricycle body to obtain a tricycle defective area anchor box set; Use the micro lens to extract and quantify the features of the tricycle defective area anchor box set to obtain tricycle defect feature quantification information; Statistically evaluate and analyze the tricycle defect feature quantification information according to the spray painting defect index set to generate a spray painting defect detection result for the electric tricycle body; The obtaining of the tricycle defective area anchor box set includes: Collect and obtain the standard spray painting image information of the target electric tricycle, and build a spray painting feature siamese network based on the standard spray painting image information and the panoramic image of the tricycle body. The spray painting feature siamese network includes a standard siamese sub-network and a defect siamese sub-network; Extract features from the standard spray painting image and the panoramic image of the tricycle body based on the spray painting feature siamese network to obtain a standard spray painting feature set and a global spray painting feature set; Introduce a feature loss function to perform loss analysis on the standard spray painting feature set and the global spray painting feature set to obtain a spray painting feature loss data set; Perform regional anchor box marking on the panoramic image of the tricycle body based on the spray painting feature loss data set to obtain the tricycle defective area anchor box set; The obtaining of the tricycle defect feature quantification information includes: Based on the tricycle defective area anchor box set, determine a defective attention area set; Use the micro lens to collect defective images of the defective attention area set to obtain a defective area micro image set; Obtain a spray painting defect feature evaluation target, and train and construct a spray painting defect evaluation network based on the spray painting defect feature evaluation target; Perform defective quantification evaluation on the defective area micro image set based on the spray painting defect evaluation network to obtain tricycle defect feature quantification information; The training and construction of the spray painting defect evaluation network based on the spray painting defect feature evaluation target includes: Collect and obtain a spray painting defect image set of the target electric tricycle; Decompose the defect feature evaluation target into indicators to obtain a defect morphology indicator, a defect area indicator, and a defect distribution indicator; Perform defective annotation training on the spray painting defect image set based on the defect morphology indicator, the defect area indicator, and the defect distribution indicator to generate a defect morphology recognition network, a defect area recognition network, and a defect distribution recognition network; Parallelly weight and fuse the defect morphology recognition network, the defect area recognition network, and the defect distribution recognition network to construct the spray painting defect evaluation network; The generation of the spray painting defect detection result for the electric tricycle body includes: According to the tricycle defect feature quantification information, determine a defect morphology feature set, a defect area feature set, and a defect distribution feature set; Extract the defect types from the spray painting defect index set to obtain a spray painting defect type set; Feature clustering is performed on the defect morphological feature set, defect area feature set, and defect distribution feature set according to the spray defect type set to obtain a spray defect clustering feature set; Statistical evaluation and analysis are respectively performed on the spray defect clustering feature set to obtain the detection result of the spray defects on the electric tricycle body; The obtaining of the detection result of the spray defects on the electric tricycle body includes: Analyze the influence degree of each defect type in the spray defect type set to obtain a spray defect type influence coefficient set; Statistically analyze the feature information of the spray defect clustering feature set respectively to obtain a comprehensive feature set of clustered spray defects; Allocate influence weights to the defect morphology index, defect area index, and defect distribution index to obtain a defect index influence factor set; Use the defect index influence factor set to perform weighted integral evaluation on the comprehensive feature set of clustered spray defects respectively to obtain a set of influence degrees of clustered spray defects; Based on the spray defect type influence coefficient set, perform defect weighted analysis on the set of influence degrees of clustered spray defects to obtain the detection result of the spray defects on the electric tricycle body.

2. The method for detecting defects in the body spraying of an electric tricycle based on machine vision according to claim 1, characterized in that, The obtaining of the panoramic image of the tricycle body includes: Perform noise recognition and classification on each body image in the multi-angle tricycle body image set in sequence to obtain the noise characteristic information of the image data; Determine a noise filtering adaptive algorithm according to the noise characteristic information of the image data, and perform filtering preprocessing on the multi-angle tricycle body image set respectively based on the noise filtering adaptive algorithm to obtain a standard multi-angle body image set; Detect feature points of each body image in the standard multi-angle body image set to obtain a set of multi-angle body feature points; Perform matching panoramic stitching on the standard multi-angle body image set based on the set of multi-angle body feature points to obtain the panoramic image of the tricycle body.

3. The electric tricycle body spraying defect detection system based on machine vision is characterized in that For implementing the steps of the machine vision-based spray defect detection method for the electric tricycle body according to any one of claims 1 to 2, the machine vision-based spray defect detection system for the electric tricycle body includes: A lens construction unit, which is used to obtain a machine vision perception module, and the machine vision perception module integrates a panoramic lens and a microscopic lens; An image acquisition unit, which is used to collect multi-angle images of the target electric tricycle through the panoramic lens to obtain a multi-angle tricycle body image set; An image stitching unit, which is used to perform preprocessing and panoramic stitching on the multi-angle tricycle body image set to obtain a panoramic image of the tricycle body; A defect recognition unit, which is used to identify the defect area and mark the anchor box of the panoramic image of the tricycle body to obtain a set of tricycle defect area anchor boxes; A feature extraction unit, which is used to extract and quantify the features of the set of tricycle defect area anchor boxes by using the microscopic lens to obtain the tricycle defect feature quantification information; A statistical evaluation unit, which is used to perform statistical evaluation and analysis on the quantified information of the tricycle defect features according to the spray painting defect index set, and generate the detection result of the electric tricycle body spray painting defect.

Citation Information

Patent Citations

  • Unmanned aerial vehicle spraying defect image detection method

    CN117670834A

  • Powder spraying detection system based on intelligent contour scanning

    CN118212209A