Vehicle surface damage classification detection method and device based on machine vision

By using machine vision technology to classify, detect, and repair surface damage on vehicles, the problems of low efficiency in manual inspection and complexity of existing equipment are solved, enabling the generation of efficient and accurate damage repair strategies.

CN121860906APending Publication Date: 2026-04-14CHENGDU TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-27
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies rely on manual visual inspection for vehicle surface damage detection, which is labor-intensive, inefficient, lacks real-time performance, and is susceptible to subjective factors. Furthermore, existing equipment is complex to install, cannot systematically statistically analyze damage results, and cannot directly confirm repair strategies.

Method used

A machine vision-based method for classifying and detecting vehicle surface damage is adopted, which includes collecting sample images, converting them into grayscale images, performing noise reduction processing, determining the defect threshold range, using a neural network model to analyze the damage type, and generating repair control signals.

Benefits of technology

It enables simple and efficient vehicle surface damage detection, generates accurate damage repair strategies, and improves detection efficiency and repair quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860906A_ABST
    Figure CN121860906A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle surface damage classification detection method and device based on machine vision, and the method comprises the steps: collecting a sample picture of vehicle surface damage, and converting the sample picture into a graying image; carrying out noise reduction processing on the grayed image; determining a defect threshold range of the surface damage of the vehicle according to the grayed image subjected to the noise reduction processing; and generating a repair control signal according to the defect threshold range of the vehicle surface damage, and repairing the vehicle surface damage according to the repair control signal. According to the invention, the detection result of the vehicle surface damage can be obtained by using a simple method, and the damage repair strategy can be directly confirmed according to the obtained detection result, so that the vehicle surface damage is repaired.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of damage classification and detection, and specifically to a method and apparatus for classifying and detecting vehicle surface damage based on machine vision. Background Technology

[0002] During daily use, vehicles often suffer scratches, abrasions, dents, and other surface damage. This damage not only affects the car's appearance but also impacts driving safety, making repair crucial. Currently, most vehicle surface damage inspections rely on manual visual inspection. This method, based on human observation and comparison, has many drawbacks: it's labor-intensive, inefficient, lacks real-time accuracy, and is susceptible to subjective biases, significantly limiting the improvement of repair efficiency and quality in the auto repair industry.

[0003] In recent years, many companies have adopted machines to replace manual labor in vehicle surface inspection. Existing technologies utilize 3D defect detection systems, employing JAI high-resolution area array cameras to acquire images and using different angles of light to inspect vehicle surface damage. However, these existing technologies are too limited and complex. The numerous data acquisition devices involved make equipment installation and inspection crucial beforehand, making the task cumbersome. Furthermore, they lack a systematic process for statistical analysis of the detected damage, hindering the direct identification of repair strategies. Summary of the Invention

[0004] In view of the above-mentioned shortcomings in the prior art, the present invention provides a vehicle surface damage classification and detection method and device based on machine vision, which can obtain the detection results of vehicle surface damage in a simple way, and can directly confirm the damage repair strategy based on the obtained detection results.

[0005] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows:

[0006] A machine vision-based method for classifying and detecting surface damage on vehicles includes the following steps:

[0007] S1. Collect sample images of vehicle surface damage and convert them into grayscale images;

[0008] S2. Perform noise reduction processing on the grayscale image in step S1;

[0009] S3. Based on the grayscale image after noise reduction in step S2, determine the defect threshold range of vehicle surface damage.

[0010] S4. Generate a repair control signal based on the defect threshold range of the vehicle surface damage in step S3, and repair the vehicle surface damage according to the repair control signal.

[0011] Furthermore, step S2 includes the following sub-steps:

[0012] S21. Convert the grayscale image in step S1 into a binary image that includes black and white parts;

[0013] S22. Compress the white portion of the binary image in sub-step S21 and eliminate white noise;

[0014] S23. Expand the white portion after eliminating white noise in step S22, fill the voids in the white portion, and eliminate the black holes.

[0015] Furthermore, step S3 includes the following sub-steps:

[0016] S31. Extract the defect edge contour map of the grayscale image after noise reduction in step S2.

[0017] S32. Calculate the defects in the defect edge contour map in sub-step S31 to obtain the initial defect result;

[0018] S33. Construct a neural network prediction model for vehicle surface damage, and use the neural network prediction model for vehicle surface damage to analyze the initial defect results in step S32 to obtain accurate defect results.

[0019] S34. Determine the four defect threshold ranges and determine the defect threshold range corresponding to the precise defect results in sub-step S33.

[0020] Furthermore, step S31 includes the following sub-steps:

[0021] S311. Determine whether the pixels of the grayscale image after noise reduction in step S2 are black; if yes, proceed to sub-step S312; otherwise, return to sub-step S311.

[0022] S312. Determine whether the 8 adjacent pixels of the pixel that was judged to be black in sub-step S311 are black; if so, set the pixel that was judged to be black in sub-step S311 to white and proceed to sub-step S313; otherwise, return to sub-step S311.

[0023] S313. Determine whether all defect edges of the grayscale image after noise reduction in step S2 have been completely whitened; if so, extract the defect edge contour map of the grayscale image after noise reduction in step S2; otherwise, return to sub-step S311.

[0024] Furthermore, step S32 includes the following sub-steps:

[0025] S321. Determine the edge detection operator;

[0026] S322. Determine the gradient threshold value based on the vehicle surface damage characteristics;

[0027] S323. Based on the edge detection operator in step S321 and the gradient threshold value in step S322, calculate the defect in the defect edge contour map in step S31 to obtain the initial defect result.

[0028] Furthermore, step S33 includes the following sub-steps:

[0029] S331. Construct and train a neural network prediction model for vehicle surface damage;

[0030] S332. Input the initial defect results from step S32 into the vehicle surface damage neural network prediction model trained in sub-step S331 to obtain accurate defect results.

[0031] Furthermore, in step S331, the vehicle surface damage neural network prediction model includes an input layer, a hidden layer, and an output layer;

[0032] The computation process from the input layer to the hidden layer can be represented as follows:

[0033]

[0034] Wherein: H j Let be the output of the j-th neuron in the hidden layer, where i is the index of the neuron in the input layer, n is the total number of neurons in the input layer, and ω is the output of the hidden layer. ij Let x be the weight of the i-th neuron in the input layer and the j-th neuron in the hidden layer. i Let a be the standard input data for the i-th input layer neuron node. j The threshold value is the value of the j-th neuron node in the hidden layer.

[0035] The computation process from the hidden layer to the output layer is represented as follows:

[0036]

[0037] Among them: O k This represents the prediction result for the k-th neuron node in the output layer, where j is the index of the hidden layer neuron node, m is the total number of hidden layer neurons, and ω... fk Let b be the weight of the j-th neuron node in the hidden layer and the k-th neuron node in the output layer. k This is the threshold value for the k-th neuron node in the output layer.

[0038] Furthermore, in step S4, the repair control signals include a gold plating and paint repair control signal, a paint surface repair control signal, and a dent repair control signal.

[0039] A machine vision-based vehicle surface damage classification and detection device applying the above method includes an image preprocessing module, an image processing module, an image surface defect detection module, a defect classification module, and a repair classification module.

[0040] The input end of the image preprocessing module is connected to the vehicle surface image acquisition module, and the output end of the image preprocessing module is connected to the image processing module. The image preprocessing module is used to receive sample images transmitted by the vehicle surface image acquisition module, convert the sample images into grayscale images, and transmit the grayscale images to the image processing module.

[0041] The input end of the image processing module is connected to the image preprocessing module, and the output end of the image processing module is connected to the image surface defect detection module. The image processing module is used to receive the grayscale image transmitted by the image preprocessing module, perform noise reduction processing on the grayscale image, and transmit the noise-reduced grayscale image to the image surface defect detection module.

[0042] The input end of the image surface defect detection module is connected to the image processing module, and the output end of the image surface defect detection module is connected to the defect classification module. The image surface defect detection module is used to receive the noise-reduced grayscale image transmitted by the image processing module, determine the defect threshold range based on the noise-reduced grayscale image, and transmit the defect threshold range to the defect classification module.

[0043] The input end of the defect classification module is connected to the image surface defect detection module, and the output end of the defect classification module is connected to the repair classification module. The defect classification module is used to receive the defect threshold range transmitted by the image surface defect detection module, generate a repair control signal according to the defect threshold range, and transmit the repair control signal to the repair classification module.

[0044] The input end of the repair classification module is connected to the defect classification module; the repair classification module is used to receive the repair control signal transmitted by the defect classification module and repair the vehicle surface according to the repair control signal.

[0045] The beneficial effects of this invention are as follows:

[0046] (1) This invention makes it easier to detect defects in vehicle surface damage images by converting the collected vehicle surface damage sample images into grayscale images.

[0047] (2) By performing noise reduction processing on grayscale images, the present invention can remove the redundant parts of grayscale images through filtering, so that the processed image can remove the image interference while containing defect features.

[0048] (3) This invention generates a defect edge contour map, calculates the defects in the defect edge contour map, and uses the constructed vehicle surface damage neural network model for further calculation to generate accurate defect results, making the obtained defect detection results more accurate; and by setting four defect threshold ranges in advance, the defect threshold range corresponding to the accurate defect results can be determined, which can effectively perform statistical analysis on the detected damage results.

[0049] (4) The present invention can generate a repair control signal based on the defect threshold range through the defect classification module, and repair the surface damage of the vehicle based on the repair control signal. Attached Figure Description

[0050] Figure 1 This is a schematic diagram of a machine vision-based method for classifying and detecting surface damage on vehicles.

[0051] Figure 2 This is a schematic diagram of a machine vision-based vehicle surface damage classification and detection device. Detailed Implementation

[0052] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0053] like Figure 1 As shown, a machine vision-based method for classifying and detecting vehicle surface damage includes steps S1-S4, as detailed below:

[0054] S1. Collect sample images of vehicle surface damage and convert them into grayscale images.

[0055] In an optional embodiment of the present invention, the present invention utilizes a vehicle surface image acquisition module to acquire sample images of vehicle surface damage. The vehicle surface image acquisition module employs an MV-CA060-10GC industrial camera, lens, and coaxial light source, which are mounted on a sliding plate bracket with telescopic rods that can be adjusted vertically and horizontally. Before acquiring sample images, the present invention adjusts three telescopic rods to position the industrial camera and coaxial light source relative to each other, ensuring that the acquired image is complete and clear before taking the picture. During sample image acquisition, the present invention adjusts the positions of the three telescopic rods to photograph the damaged area of ​​the vehicle surface, ensuring that the entire damaged area is captured.

[0056] This invention utilizes an image preprocessing module to convert sample images of vehicle surface damage into grayscale images. The image preprocessing module receives sample images transmitted from the vehicle surface image acquisition module, converts the sample images into grayscale images, and then transmits the grayscale images to the image processing module.

[0057] S2. Perform noise reduction processing on the grayscale image from step S1.

[0058] In an optional embodiment of the present invention, the present invention utilizes an image processing module to perform noise reduction processing on the grayscale image. The image processing module receives the grayscale image transmitted by the image preprocessing module, performs noise reduction processing on the grayscale image, and transmits the noise-reduced grayscale image to the image surface defect detection module.

[0059] Step S2 includes the following sub-steps:

[0060] S21. Convert the grayscale image in step S1 into a binary image that includes black and white parts.

[0061] S22. Compress the white portion of the binary image in step S21 and eliminate white noise.

[0062] S23. Expand the white portion after eliminating white noise in step S22, fill the voids in the white portion, and eliminate the black holes.

[0063] S3. Based on the grayscale image after noise reduction in step S2, determine the defect threshold range of vehicle surface damage.

[0064] In an optional embodiment of the present invention, the image surface defect detection module determines the defect threshold range of vehicle surface damage based on the denoised grayscale image. The image surface defect detection module receives the denoised grayscale image transmitted by the image processing module, determines the defect threshold range based on the denoised grayscale image, and transmits the defect threshold range to the defect classification module.

[0065] Step S3 includes the following sub-steps:

[0066] S31. Extract the defect edge contour map of the grayscale image after noise reduction in step S2.

[0067] Step S31 includes the following sub-steps:

[0068] S311. Determine whether the pixels of the grayscale image after noise reduction in step S2 are black; if yes, proceed to sub-step S312, otherwise return to sub-step S311.

[0069] S312. Determine whether the 8 adjacent pixels of the pixel identified as black in step S311 are also black. If so, set the pixel identified as black in step S311 to white and proceed to step S313; otherwise, return to step S311.

[0070] S313. Determine whether all defect edges of the grayscale image after noise reduction in step S2 have been completely whitened; if so, extract the defect edge contour map of the grayscale image after noise reduction in step S2; otherwise, return to sub-step S311.

[0071] S32. Calculate the defects in the defect edge contour map in step S31 to obtain the initial defect result.

[0072] Step S32 includes the following sub-steps:

[0073] S321. Determine the edge detection operator.

[0074] S322. Determine the gradient threshold value based on the vehicle surface damage characteristics.

[0075] S323. Based on the edge detection operator in step S321 and the gradient threshold value in step S322, calculate the defect in the defect edge contour map in step S31 to obtain the initial defect result.

[0076] Specifically, this invention utilizes functions in MATLAB and calculates the defects in the defect edge contour map based on the edge detection operator and gradient threshold value to obtain the initial defect result.

[0077] S33. Construct a neural network prediction model for vehicle surface damage, and use the neural network prediction model for vehicle surface damage to analyze the initial defect results in step S32 to obtain accurate defect results.

[0078] Step S33 includes the following sub-steps:

[0079] S331. Construct and train a neural network prediction model for vehicle surface damage.

[0080] The neural network prediction model for vehicle surface damage includes an input layer, a hidden layer, and an output layer.

[0081] The computation process from the input layer to the hidden layer can be represented as follows:

[0082]

[0083] Wherein: H j Let be the output of the j-th neuron in the hidden layer, where i is the index of the neuron in the input layer, n is the total number of neurons in the input layer, and ω is the output of the hidden layer. ij Let x be the weight of the i-th neuron in the input layer and the j-th neuron in the hidden layer.i Let a be the standard input data for the i-th input layer neuron node. j is the threshold value for the j-th neuron node in the hidden layer.

[0084] The computation process from the hidden layer to the output layer is represented as follows:

[0085]

[0086] Among them: O k This represents the prediction result for the k-th neuron node in the output layer, where j is the index of the hidden layer neuron node, m is the total number of hidden layer neurons, and ω... fk Let b be the weight of the j-th neuron node in the hidden layer and the k-th neuron node in the output layer. k This is the threshold value for the k-th neuron node in the output layer.

[0087] This invention trains a neural network prediction model for vehicle surface damage using historical initial defect data. It then updates the internal parameters of the model using the obtained historical accurate defect data and measured defect data. Specifically, this invention updates the weights between the hidden and output layers, the weights between the input and hidden layers, the threshold between the hidden and output layers, and the threshold between the input and hidden layers. Through these steps, this invention completes the training of the neural network prediction model for vehicle surface damage.

[0088] S332. Input the initial defect results from step S32 into the vehicle surface damage neural network prediction model trained in sub-step S331 to obtain accurate defect results.

[0089] S34. Determine the four defect threshold ranges and determine the defect threshold range corresponding to the precise defect results in sub-step S33.

[0090] Different types of vehicle surface damage have different characteristics and morphologies, specifically including scratches, dents, and paint damage. Each type of damage exhibits different shapes, textures, and edge features in images. To accurately classify these different types of damage, this invention sets corresponding threshold ranges based on their characteristics. By setting four threshold ranges, each corresponding to a type of damage, this invention can more finely distinguish different types of vehicle surface damage, improving classification accuracy. Furthermore, the threshold ranges can also be determined based on the data distribution of the training samples (historical precise defect result data obtained using historical initial defect result data). By analyzing the feature distribution of the training samples, this invention can understand the performance of different types of damage in the dataset. Based on the above analysis results, this invention determines four defect threshold ranges.

[0091] S4. Generate a repair control signal based on the defect threshold range of the vehicle surface damage in step S3, and repair the vehicle surface damage according to the repair control signal.

[0092] In an optional embodiment of the present invention, the defect classification module generates a repair control signal based on the defect threshold range of the vehicle surface damage. The defect classification module receives the defect threshold range transmitted by the image surface defect detection module, generates the repair control signal based on the defect threshold range, and transmits the repair control signal to the repair classification module. The repair control signal includes a gold plating and paint repair control signal, a paint surface repair control signal, and a dent repair control signal. The repair classification module repairs the vehicle surface damage according to the repair control signal. The repair classification module receives the repair control signal transmitted by the defect classification module and repairs the vehicle surface according to the repair control signal.

[0093] like Figure 2 As shown, a machine vision-based vehicle surface damage classification and detection device applying the above method includes an image preprocessing module, an image processing module, an image surface defect detection module, a defect classification module, and a repair classification module.

[0094] In an optional embodiment of the present invention, the present invention further includes a startup module. The output terminal of the startup module is connected to the input terminal of the vehicle surface image acquisition module. The present invention can generate a startup command or a shutdown command according to task requirements through the startup module, and control the vehicle surface image acquisition module to start or stop the acquisition operation through the startup command or shutdown command.

[0095] In an optional embodiment of the present invention, the invention further includes a vehicle surface image acquisition module. The input end of the vehicle surface image acquisition module is connected to the startup module, and the output end is connected to the image preprocessing module. In this invention, the vehicle surface image acquisition module uses an MV-CA060-10GC industrial camera, lens, and coaxial light source, and the MV-CA060-10GC industrial camera, lens, and coaxial light source are mounted on a sliding plate bracket with telescopic rods that can be adjusted vertically and horizontally. Before acquiring sample images, the present invention needs to adjust three telescopic rods to position the industrial camera and coaxial light source relative to each other to ensure that the acquired image is complete and clear before taking pictures. When acquiring sample images, the present invention adjusts the positions of the three telescopic rods to photograph the damaged area of ​​the vehicle surface, ensuring that the entire damaged area is captured.

[0096] In an optional embodiment of the present invention, the input end of the image preprocessing module is connected to the vehicle surface image acquisition module, and the output end of the image preprocessing module is connected to the image processing module; the image preprocessing module is used to receive the sample image transmitted by the vehicle surface image acquisition module, convert the sample image into a grayscale image, and transmit the grayscale image to the image processing module.

[0097] Specifically, this invention uses MATLAB software to convert sample images to grayscale. It uses the imread function in MATLAB to read sample images, the imshow function to display sample images, and the figure function to retain the first image and output the second image for programming. This can convert sample images from color images to grayscale images, thus completing image preprocessing.

[0098] In an optional embodiment of the present invention, the input end of the image processing module is connected to the image preprocessing module, and the output end of the image processing module is connected to the image surface defect detection module; the image processing module is used to receive the grayscale image transmitted by the image preprocessing module, perform noise reduction processing on the grayscale image, and transmit the noise-reduced grayscale image to the image surface defect detection module.

[0099] Specifically, the image processing module converts the grayscale image into a binary image that includes black and white parts, compresses the white part of the binary image, eliminates white noise, expands the white part after the white noise is eliminated, fills the holes in the white part, and eliminates black holes.

[0100] In an optional embodiment of the present invention, the input end of the image surface defect detection module is connected to the image processing module, and the output end of the image surface defect detection module is connected to the defect classification module; the image surface defect detection module is used to receive the noise-reduced grayscale image transmitted by the image processing module, determine the defect threshold range based on the noise-reduced grayscale image, and transmit the defect threshold range to the defect classification module.

[0101] The image surface defect detection module extracts the defect edge contour map of the denoised grayscale image and determines whether a pixel in the denoised grayscale image is black and whether the eight adjacent pixels of a black pixel are black. If so, the black pixel is set to white to confirm that all defect edges in the denoised grayscale image are set to white, and the defect edge contour map of the denoised grayscale image is extracted. Otherwise, it continues to determine whether a pixel in the denoised grayscale image is black and whether the eight adjacent pixels of a black pixel are black.

[0102] The image surface defect detection module determines the edge detection operator, determines the gradient threshold value based on the vehicle surface damage characteristics, and calculates the defect edge contour map based on the edge detection operator and the gradient threshold value to obtain the initial defect result.

[0103] Specifically, this invention utilizes functions in MATLAB and calculates the defects in the defect edge contour map based on the edge detection operator and gradient threshold value to obtain the initial defect result.

[0104] The image surface defect detection module constructs a neural network prediction model for vehicle surface damage, and uses the vehicle surface damage neural network prediction model to analyze the initial defect results to obtain accurate defect results. Furthermore, it uses four defect threshold ranges to determine the defect threshold range corresponding to the accurate defect results.

[0105] In an optional embodiment of the present invention, the input end of the defect classification module is connected to the image surface defect detection module, and the output end of the defect classification module is connected to the repair classification module; the defect classification module is used to receive the defect threshold range transmitted by the image surface defect detection module, generate a repair control signal according to the defect threshold range, and transmit the repair control signal to the repair classification module.

[0106] Specifically, the defect classification module receives the defect threshold range transmitted by the image surface defect detection module and generates a repair control signal based on the defect threshold range. The defect classification module generates a gold plating / painting repair control signal based on the received first and second defect threshold ranges. The defect classification module generates a paint repair control signal based on the received third defect threshold range. The defect classification module generates a dent repair control signal based on the received fourth defect threshold range.

[0107] In an optional embodiment of the present invention, the input end of the repair classification module is connected to the defect classification module; the repair classification module is used to receive the repair control signal transmitted by the defect classification module and repair the vehicle surface according to the repair control signal.

[0108] Specifically, the repair classification module includes a gold-plating paint repair submodule, a paint surface repair submodule, and a dent repair submodule. The gold-plating paint repair submodule's input is connected to the defect classification module; it receives gold-plating paint repair control signals transmitted from the defect classification module and performs gold-plating paint repair on the vehicle surface according to these signals. The paint surface repair submodule's input is also connected to the defect classification module; it receives paint surface repair control signals transmitted from the defect classification module and performs paint surface repair on the vehicle surface according to these signals. The dent repair submodule's input is connected to the defect classification module; it receives dent repair control signals transmitted from the defect classification module and performs dent repair on the vehicle surface according to these signals.

[0109] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.

Claims

1. A machine vision-based method for classifying and detecting surface damage on vehicles, characterized in that, Includes the following steps: S1. Collect sample images of vehicle surface damage and convert them into grayscale images; S2. Perform noise reduction processing on the grayscale image in step S1; S3. Based on the grayscale image after noise reduction in step S2, determine the defect threshold range of vehicle surface damage. S4. Generate a repair control signal based on the defect threshold range of the vehicle surface damage in step S3, and repair the vehicle surface damage according to the repair control signal.

2. The vehicle surface damage classification and detection method based on machine vision according to claim 1, characterized in that, Step S2 includes the following sub-steps: S21. Convert the grayscale image in step S1 into a binary image that includes black and white parts; S22. Compress the white portion of the binary image in sub-step S21 and eliminate white noise; S23. Expand the white portion after eliminating white noise in step S22, fill the voids in the white portion, and eliminate the black holes.

3. The method for classifying and detecting vehicle surface damage based on machine vision according to claim 1, characterized in that, Step S3 includes the following sub-steps: S31. Extract the defect edge contour map of the grayscale image after noise reduction in step S2. S32. Calculate the defects in the defect edge contour map in sub-step S31 to obtain the initial defect result; S33. Construct a neural network prediction model for vehicle surface damage, and use the neural network prediction model for vehicle surface damage to analyze the initial defect results in step S32 to obtain accurate defect results. S34. Determine the four defect threshold ranges and determine the defect threshold range corresponding to the precise defect results in sub-step S33.

4. The vehicle surface damage classification and detection method based on machine vision according to claim 3, characterized in that, Step S31 includes the following sub-steps: S311. Determine whether the pixels of the grayscale image after noise reduction in step S2 are black; if yes, proceed to sub-step S312; otherwise, return to sub-step S311. S312. Determine whether the 8 adjacent pixels of the pixel that was judged to be black in sub-step S311 are black; if so, set the pixel that was judged to be black in sub-step S311 to white and proceed to sub-step S313; otherwise, return to sub-step S311. S313. Determine whether all defect edges of the grayscale image after noise reduction in step S2 have been completely whitened; if so, extract the defect edge contour map of the grayscale image after noise reduction in step S2; otherwise, return to sub-step S311.

5. The vehicle surface damage classification and detection method based on machine vision according to claim 3, characterized in that, Step S32 includes the following sub-steps: S321. Determine the edge detection operator; S322. Determine the gradient threshold value based on the vehicle surface damage characteristics; S323. Based on the edge detection operator in step S321 and the gradient threshold value in step S322, calculate the defect in the defect edge contour map in step S31 to obtain the initial defect result.

6. The method for classifying and detecting vehicle surface damage based on machine vision according to claim 3, characterized in that, Step S33 includes the following sub-steps: S331. Construct and train a neural network prediction model for vehicle surface damage; S332. Input the initial defect results from step S32 into the vehicle surface damage neural network prediction model trained in sub-step S331 to obtain accurate defect results.

7. The method for classifying and detecting vehicle surface damage based on machine vision according to claim 6, characterized in that, In step S331, the vehicle surface damage neural network prediction model includes an input layer, a hidden layer, and an output layer. The computation process from the input layer to the hidden layer can be represented as follows: Wherein: H j Let be the output of the j-th neuron in the hidden layer, where i is the index of the neuron in the input layer, n is the total number of neurons in the input layer, and ω is the output of the hidden layer. ij Let x be the weight of the i-th neuron in the input layer and the j-th neuron in the hidden layer. i Let a be the standard input data for the i-th input layer neuron node. j The threshold value is the value of the j-th neuron node in the hidden layer. The computation process from the hidden layer to the output layer is represented as follows: Among them: O k This represents the prediction result for the k-th neuron node in the output layer, where j is the index of the hidden layer neuron node, m is the total number of hidden layer neurons, and ω... jk Let b be the weight of the j-th neuron node in the hidden layer and the k-th neuron node in the output layer. k This is the threshold value for the k-th neuron node in the output layer.

8. The method for classifying and detecting vehicle surface damage based on machine vision according to claim 1, characterized in that, In step S4, the repair control signals include gold plating and paint repair control signals, paint surface repair control signals, and dent repair control signals.

9. A machine vision-based vehicle surface damage classification and detection device applying the method of any one of claims 1-8, characterized in that, It includes an image preprocessing module, an image processing module, an image surface defect detection module, a defect classification module, and a repair classification module; The input end of the image preprocessing module is connected to the vehicle surface image acquisition module, and the output end of the image preprocessing module is connected to the image processing module. The image preprocessing module is used to receive sample images transmitted by the vehicle surface image acquisition module, convert the sample images into grayscale images, and transmit the grayscale images to the image processing module. The input end of the image processing module is connected to the image preprocessing module, and the output end of the image processing module is connected to the image surface defect detection module. The image processing module is used to receive the grayscale image transmitted by the image preprocessing module, perform noise reduction processing on the grayscale image, and transmit the noise-reduced grayscale image to the image surface defect detection module. The input of the image surface defect detection module is connected to the image processing module, and the output of the image surface defect detection module is connected to the defect classification module. The image surface defect detection module is used to receive the denoised grayscale image transmitted by the image processing module, determine the defect threshold range based on the denoised grayscale image, and transmit the defect threshold range to the defect classification module. The input end of the defect classification module is connected to the image surface defect detection module, and the output end of the defect classification module is connected to the repair classification module. The defect classification module is used to receive the defect threshold range transmitted by the image surface defect detection module, generate a repair control signal according to the defect threshold range, and transmit the repair control signal to the repair classification module. The input of the repair classification module is connected to the defect classification module; The repair classification module is used to receive the repair control signal transmitted by the defect classification module and repair the vehicle surface according to the repair control signal.