Image recognition-based vehicle damage automatic detection method and system
Patent Information
- Application Number
- CN202611311095.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-10-16
AI Technical Summary
[0006]本申请提供一种基于图像识别的车辆损伤自动检测方法和系统,用以解决现有技术中现有车辆漆面损伤检测容易受到污渍和异常反光干扰的问题
[0016] This application utilizes specular reflection components to restore the geometric shape of the vehicle paint surface, so that damage detection is no longer based solely on two-dimensional brightness edges or color differences. By using the paint texture information preserved by the diffuse reflection components to verify the trajectory of normal abrupt changes, abnormal reflective trajectories lacking physical deformation basis can be filtered out.
Smart Images

Figure CN122928853A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle surface inspection technology, and in particular to an automatic vehicle damage detection method and system based on image recognition. Background Technology
[0002] Automatic vehicle paint damage detection uses optical imaging and image processing technology to identify dents, scratches, and paint layer damage on the vehicle surface. It can be applied to vehicle manufacturing quality inspection, used car evaluation, insurance damage assessment, and automated repair, and has a wide range of application prospects.
[0003] The existing solution employs a machine vision-based method for detecting defects on smooth painted surfaces. This method projects striped light onto the painted surface, acquires the reflected image, extracts the stripes through adaptive binarization, and detects paint defects based on the breaks, bends, and curvature changes of the stripes.
[0004] This method primarily relies on the apparent distortion of the stripe image to determine defects. When there are stains, water films, or abnormal environmental reflections on the paint surface, stripe bending or local breakage may also occur, making it difficult to reliably distinguish between actual physical deformation and apparent reflective anomalies.
[0005] Therefore, existing technologies suffer from the technical problem that vehicle paint damage location is easily interfered with by apparent abnormal reflection. Summary of the Invention
[0006] This application provides an automatic vehicle damage detection method and system based on image recognition, which solves the problem that existing vehicle paint damage detection is easily interfered with by stains and abnormal reflections.
[0007] In a first aspect, this application provides an automatic vehicle damage detection method based on image recognition, comprising: Acquire a full-gloss image of the paint surface of the vehicle under test; Extract the diffuse reflection component and specular reflection component of the pristine image of the paint surface; Based on the reflection distortion characteristics in the specular reflection component, a paint surface morphology image of the vehicle under test is constructed. The paint surface topography image is mapped to a preset curvature gradient space to generate a normal abrupt change trajectory indicating the physical deformation boundary of the vehicle under test. Extract the paint texture features from the diffuse reflection component, and filter out the normal abrupt trajectory based on the continuity of the paint texture features to obtain the true deformation trajectory; The location of paint damage on the vehicle under test is determined based on the intersection density of the actual deformation trajectories in the curvature gradient space.
[0008] Optionally, a full-gloss image of the paint surface of the vehicle under test is acquired, including: Acquire multi-view images of the paint surface of the vehicle under test; Extract the viewpoint light source parameters of the multi-view paint surface image; Based on the aforementioned viewpoint light source parameters, the paint surface light source color of the multi-view paint surface image is stripped. Obtain the inherent albedo of the paint surface after stripping away the color of the light source; Based on the inherent paint reflectivity, the total internal reflection beam of the paint surface of the vehicle under test is converged; By fusing the total internal reflection beams from the paint surface, a total internal reflection image of the paint surface of the vehicle under test is obtained.
[0009] Optionally, the diffuse reflection component and specular reflection component of the pristine image of the paint surface are extracted, including: Scan the full-gloss image of the paint surface to obtain the initial paint curvature of the vehicle under test; Analyze the light intensity distribution of the full-gloss image of the paint surface and extract the high-brightness reflectivity extremes; By combining the initial paint surface curvature and the high-brightness reflectivity, the light spot radiation boundary of the full-spectrum image of the paint surface is defined; Based on the light spot radiation boundary, the full-spectrum image of the paint surface is divided into a specular reflection area and a diffuse reflection area; The photon distribution of the mirror reflection area is extracted as the mirror reflection component; The photon distribution of the diffuse reflection region is extracted as the diffuse reflection component.
[0010] Optionally, based on the reflection distortion characteristics in the specular reflection component, a paint surface topography image of the vehicle under test is constructed, including: Tracing the actual deflection path of the light rays in the specular reflection component; Obtain the standard deflection path of the light rays from the vehicle under test; By comparing the actual deflection path of the light with the standard deflection path of the light, the deflection offset of the light is obtained; By collecting the light refraction offset, the reflection distortion characteristics of the specular reflection component are determined; Based on the aforementioned reflective distortion characteristics, the discrete surface depth of the vehicle under test is determined. The discrete surface depth is projected onto a preset reference plane grid to determine the grid depth nodes; Spatial fitting is performed based on the topological adjacency relationship of the mesh depth nodes to generate a continuous topographic surface; The deformation fluctuation amplitude of the continuous topographic surface is converted into pixel distribution to construct the paint surface topographic image of the vehicle under test.
[0011] Optionally, the paint surface topography image is mapped to a preset curvature gradient space to generate a normal abrupt change trajectory indicating the physical deformation boundary of the vehicle under test, including: The paint surface morphology image is analyzed to extract the three-dimensional paint surface normal vector of the vehicle under test; Map the three-dimensional paint surface normal vector to the curvature gradient space; Within the curvature gradient space, the lateral jump points of the three-dimensional paint surface normal vector are traced laterally, and the longitudinal jump points of the three-dimensional paint surface normal vector are traced longitudinally. Extract the intersection point of the horizontal jump point and the vertical jump point; Connect the intersection points to generate the normal abrupt change trajectory that indicates the physical deformation boundary.
[0012] Optionally, paint texture features are extracted from the diffuse reflection component, and the normal abrupt trajectory is filtered out based on the continuity of the paint texture features to obtain the true deformation trajectory, including: The diffuse reflection component is analyzed to extract the paint texture features of the vehicle under test; By tracing the spatial trend of the paint texture features, the continuity of the paint texture can be determined; Align the spatial coordinates of the paint texture continuity with the spatial coordinates of the normal abrupt change trajectory; The normal abrupt change trajectory corresponding to the area where the continuity of the paint texture is not interrupted is determined to be the stain pseudo-deformation trajectory. The normal abrupt change trajectory corresponding to the region where the continuity of the paint texture is interrupted is determined as the candidate true deformation trajectory; The false deformation trajectories of the stains are removed, and the candidate true deformation trajectories are output as the true deformation trajectories.
[0013] Optionally, the location of paint damage on the vehicle under test is determined based on the intersection density of the actual deformation trajectories in the curvature gradient space, including: Extract the deflection extreme points of the true deformation trajectory in the curvature gradient space; The curvature gradient space is meshed to obtain multiple unit space grids; Count the number of extreme values of the deflection extreme points within each unit spatial grid; Based on the number of extreme values and the grid area of the unit space grid, the intersection density of the true deformation trajectory is calculated. Filter out the damaged space grids whose intersection density exceeds a preset density threshold; The damage space mesh is reverse-mapped to the solid space to determine the location of paint damage on the vehicle under test.
[0014] Secondly, this application provides an automatic vehicle damage detection system based on image recognition, comprising: The acquisition module is used to acquire a full-gloss image of the paint surface of the vehicle under test; The extraction module is used to extract the diffuse reflection component and specular reflection component of the full-gloss image of the paint surface; A construction module is used to construct a paint surface morphology image of the vehicle under test based on the reflection distortion characteristics in the specular reflection component. The generation module is used to map the paint surface topography image to a preset curvature gradient space to generate a normal abrupt change trajectory indicating the physical deformation boundary of the vehicle under test. The filtering processing module is used to extract the paint texture features in the diffuse reflection component and filter the normal abrupt trajectory based on the continuity of the paint texture features to obtain the true deformation trajectory. A determination module is used to determine the location of paint damage on the vehicle under test based on the intersection density of the actual deformation trajectories in the curvature gradient space. Thirdly, this application provides a computing device including a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are to be invoked and executed by the processing component to implement an automatic vehicle damage detection method based on image recognition as described in the first aspect above.
[0015] Fourthly, this application provides a computer storage medium storing a computer program, which, when executed by a computer, implements an automatic vehicle damage detection method based on image recognition as described in the first aspect.
[0016] This application utilizes specular reflection components to restore the geometric shape of the vehicle paint surface, so that damage detection is no longer based solely on two-dimensional brightness edges or color differences. By using the paint texture information preserved by the diffuse reflection components to verify the trajectory of normal abrupt changes, abnormal reflective trajectories lacking physical deformation basis can be filtered out.
[0017] Furthermore, determining the damage location based on the degree of aggregation of the actual deformation trajectory in the local area can reduce the impact of individual noise points or isolated trajectories on the detection results.
[0018] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is the overall flowchart of the automatic vehicle damage detection method of this application.
[0021] Figure 2 This is a schematic diagram of the data composition of the full-gloss image of the paint surface in this application.
[0022] Figure 3 This is a schematic diagram illustrating the separation of the specular reflection component and the diffuse reflection component in this application.
[0023] Figure 4 This is a schematic diagram illustrating the construction principle of the paint surface morphology image in this application.
[0024] Figure 5 This is a schematic diagram of filtering out and locating damage in the normal mutation trajectory of this application.
[0025] Figure 6 This is a schematic diagram of the automatic vehicle damage detection system of this application. Detailed Implementation
[0026] like Figure 1 As shown, the automatic vehicle damage detection method of this application includes steps S100 to S600.
[0027] In this embodiment, specular reflection can be understood as the reflection or highlight formed by the paint surface, and its changes are mainly related to the orientation of the paint surface. Even if the paint color does not change, the reflection will be distorted after the paint surface becomes concave or convex. Diffuse reflection can be understood as the color and fine texture of the paint surface itself, and its influence from the viewing direction is less than that of specular reflection. This application uses both types of reflection information to first use specular reflection to find deformation, and then use diffuse reflection to eliminate misjudgments caused by stains and abnormal reflections.
[0028] Before testing, the image acquisition device 800 needs to be calibrated. The image acquisition device 800 includes a camera 810, an area array light source 820, an acquisition controller 830, and a calibration plate 840. The area array light source 820 can display uniform light patterns, lateral phase-shift fringes, longitudinal phase-shift fringes, and Gray code patterns. The camera 810 is equipped with a polarization analyzer that can switch the polarization direction.
[0029] By photographing the calibration plate 840, the focal length, principal point, lens distortion parameters, and position of the camera 810 in the inspection station can be obtained, as well as the position of the area array light source 820 relative to the camera 810. Since the calibration plate 840 has known physical dimensions, a conversion relationship with actual length units can be established between image coordinates and vehicle physical coordinates.
[0030] This embodiment also pre-establishes a standard vehicle surface model. The standard vehicle surface model can be derived from the vehicle's design surfaces or created non-destructively from vehicles of the same model. The standard vehicle surface model records the three-dimensional coordinates, surface normal vectors, and normal reflection paths of various locations on the normal vehicle's paint surface. After the vehicle under test enters the testing station, it is aligned with the standard vehicle surface model using positioning points on the vehicle body and the vehicle's contour.
[0031] The standard surface model of the vehicle only provides reference data under normal conditions. Whether the vehicle under test has damage is still determined by subsequently acquired images of the paint surface.
[0032] Step S100: Obtain a full-gloss image of the paint surface of the vehicle under test.
[0033] Camera 810 captures images of the vehicle under test from multiple observation directions. Uniform light images, lateral phase-shifted fringe images, longitudinal phase-shifted fringe images, and Gray code images are acquired for each observation direction. Uniform light images are also acquired under both parallel and cross-polarized states.
[0034] Lateral and longitudinal phase-shifted fringes are used to determine the position of the reflected light from the paint surface on the area array light source 820. Gray code is used to determine which fringe period the current fringe belongs to. Parallel polarization images and cross-polarization images are used to separate specular reflection from diffuse reflection.
[0035] The acquisition controller 830 saves the viewing direction, illumination pattern, exposure time, phase number, polarization state, and color channels for each image. These data constitute the viewpoint light source parameters.
[0036] When a camera takes photos at different exposure times or under different light source colors, the pixel value at the same location on the painted surface may vary. To eliminate this difference, the acquisition module 100 first subtracts the camera's black level from the pixel value, and then divides it by the product of the exposure time and the corresponding light source calibration response. The light source calibration response is obtained by photographing a standard diffuse reflector with known reflectivity.
[0037] After correction, the color differences in the image primarily originate from the vehicle's paint surface, rather than from the 820 area light source itself. This processing involves stripping the paint surface light source color based on the viewing angle light source parameters.
[0038] The acquisition module 100 calculates the intrinsic paint albedo using a cross-polarized uniform light image. Cross-polarization suppresses most specular highlights, making it suitable for observing the paint's own color. For the same paint location, the acquisition module 100 excludes saturated, occluded, and backlit views, corrects for surface orientation on the remaining views, and then takes the weighted median as the intrinsic paint albedo.
[0039] Inherent paint albedo can be understood as the inherent color of the paint surface after excluding the influence of light source color, exposure time, and surface orientation. The same paint surface location should have similar inherent paint albedo under different viewing angles.
[0040] The acquisition module 100 searches for pixels that may correspond to the same paint surface location from different viewpoints based on the intersection of the camera imaging ray and the standard surface model of the vehicle. When two candidate pixels correspond to entities that are close to each other and the difference in inherent paint surface albedo is less than the albedo matching threshold, they are classified into the same total internal reflection beam.
[0041] The total internal reflection beam from the paint surface is not a single, actually converging beam of light, but rather a collection of reflected rays formed at the same location on the paint surface from multiple viewing angles. Each reflected ray preserves the viewing direction, incident direction, light intensity, inherent paint surface albedo, and confidence level.
[0042] The confidence level is determined based on image sharpness, viewing angle, saturation state, and albedo consistency. The sharper the image and the smaller the albedo difference, the higher the confidence level; when occlusion or saturation occurs, the confidence level is zero.
[0043] like Figure 2 As shown, the phantom image of the paint surface uses the vehicle surface position as a common index, while preserving the viewing angle, illumination pattern, phase number, polarization state, and color channels. Fusion, in this context, means writing data from the same paint surface position into the same index, rather than directly adding different phase images. This unifies the coordinates of different viewing angles without disrupting the phase relationship between phase-shifted fringes.
[0044] The output of step S100 is a full-view image of the paint surface. This image still contains highlights, reflections, paint color, and paint texture, so the specular reflection component and diffuse reflection component need to be separated in step S200.
[0045] Step S200: Extract the diffuse reflection component and specular reflection component of the full-spectrum image of the paint surface.
[0046] The extraction module 200 first scans the initial surface mesh in the full-gloss image of the paint surface. For each mesh node, the extraction module 200 selects adjacent nodes around it and fits a local quadratic surface, and then obtains the initial paint surface curvature based on the curvature of the fitted surface.
[0047] Initial paint curvature represents the original curvature of the vehicle's normal body. For example, the normal curvature of a fender is usually greater than that of the center of a door. This data is obtained to avoid misinterpreting the vehicle's own curved surfaces as damage.
[0048] The extraction module 200 uses a uniform light image to search for high-brightness reflective extrema. To avoid phase-shifted fringes themselves forming brightness extrema, this process does not use a fringe image.
[0049] In specific processing, the extraction module 200 performs Gaussian filtering on the uniform light image and calculates the median luminance and median absolute luminance deviation for each local region. The median luminance is added to the result of multiplying the median luminance deviation by a preset coefficient to obtain the high-brightness detection threshold. Pixels exceeding this threshold and belonging to local brightness extrema are identified as high-brightness reflective extrema.
[0050] The preset coefficients are determined based on the non-destructive paint surface image. Multiple candidate coefficients are tested on the non-destructive paint surface image to control the proportion of misidentified bright anomalies within the preset range, and the smallest candidate coefficient that meets the conditions is saved.
[0051] After obtaining the high-brightness reflectivity extreme value, the extraction module 200 uses it as a seed to expand outwards. During the expansion process, the brightness, polarization response, and reflection direction of adjacent pixels are compared, and the expansion range is limited according to the initial paint surface curvature.
[0052] The normal specular highlight range was obtained through ray tracing when building the standard vehicle surface model. Locations with different curvatures have different normal specular highlight ranges. Therefore, this embodiment does not use the same spot radius for all vehicle parts.
[0053] When the brightness, polarization response, or reflection direction of adjacent pixels is no longer continuous, or when the extension distance exceeds the normal specular range at that location, the extension stops. The stopping position constitutes the radiation boundary of the spot. The area inside the radiation boundary is a specular reflection area, and the area outside the boundary is a diffuse reflection area.
[0054] To further separate the two types of reflection, this embodiment uses parallel polarization images and cross-polarization images. Before testing, standard diffuse reflection plates and standard specular reflection plates are photographed respectively to obtain polarization calibration matrices. For each color channel in the paint surface under test, the diffuse reflection intensity and specular reflection intensity are calculated according to the following formulas:
[0055] in, Represents pixels In color channels The intensity of diffuse reflection in the light, Indicates the intensity of light reflected from the specular surface; This is the polarization calibration matrix; and These represent the intensities of parallel polarized light and cross-polarized light, respectively. The non-negative constraint means that neither of the two reflected light intensities can be less than zero.
[0056] The extraction module 200 writes the specular reflection intensity in the specular reflection area and the boundary transition area into the specular reflection component, and retains the phase shift fringe image and Gray code image from each viewing angle.
[0057] The extraction module 200 writes the diffuse reflection intensity in the diffuse reflection area into the diffuse reflection component. The diffuse reflection information missing in the specular reflection area is supplemented by diffuse reflection data of the same paint surface location from other viewing angles.
[0058] Step S200 obtains two types of data from the same phantom image of the paint surface. The specular reflection component is used in step S300 to recover the paint surface morphology, while the diffuse reflection component is retained in step S500 to determine whether the deformation trajectory is real.
[0059] Step S300: Based on the reflection distortion characteristics in the specular reflection component, construct the paint surface morphology image of the vehicle under test.
[0060] The bending of fringes in the specular reflection component only indicates a change in the direction of reflection, not a direct representation of the depth of the depression. To obtain the surface morphology, it is necessary to first determine the difference between the actual reflected light and the normal reflected light, and then recover the surface normal vector and depth according to the specular reflection law.
[0061] An 820 area light source sequentially displays four horizontal phase-shifted fringes and four vertical phase-shifted fringes. The phase difference between adjacent fringe images is one-quarter of a fringe period. Let the correction light intensity of the same pixel in the four images be respectively... , , and Then its enclosing phase is:
[0062] Gray code images are used to determine the fringe period number. Module 300 combines the period number with the wrapping phase to obtain the absolute phase. Since the pixel size and fringe period of the area array light source 820 have been calibrated, the lateral absolute phase and the longitudinal absolute phase can jointly determine the actual landing point of the reflected light rays on the area array light source 820.
[0063] The actual deflection path of light is determined by the vehicle's surface position, the actual point of impact of the light source, and the camera's optical center. The vehicle's surface position is initially determined from a standard vehicle surface model and is subsequently updated based on the reconstruction depth.
[0064] Module 300 reads the standard surface normal vector at the same location from the vehicle's standard surface model and performs normal surface ray tracing under the same camera and light source positions to obtain the standard light source landing point. The standard surface position, the standard light source landing point, and the camera optical center together constitute the standard ray deflection path.
[0065] Subtracting the coordinates of the standard light source from the coordinates of the actual light source's point of impact yields the light deflection vector. The direction of this vector indicates the direction in which the reflected light is deflected, and its length indicates the degree of deflection.
[0066] The construction module 300 collects the light deflection offset vector, offset amount, lateral offset gradient, longitudinal offset gradient, and phase position confidence according to the vehicle surface coordinates to form the reflection distortion characteristics. When adjacent positions have offsets in the same direction, it indicates that there may be continuous surface deformation in that area; isolated offsets with low confidence are more likely to be caused by imaging noise.
[0067] Module 300 obtains the actual light source point by adding the standard light source landing point to the light deflection offset vector. For vehicle surface points... The unit direction from that point to the camera's optical center is the observation direction. The unit direction from that point to the actual point where the light source falls is the incident direction. According to the law of specular reflection, the normal vector of the three-dimensional paint surface is:
[0068] This formula indicates that the normal vector of the mirror surface lies in the direction that bisects the angle between the incident direction and the observation direction.
[0069] After obtaining the three-dimensional paint surface normal vector, the construction module 300 calculates the actual surface slope in the local tangent plane coordinate system of the vehicle's standard surface and subtracts the standard surface slope to obtain the deformation residual slope. Using the residual slope instead of the actual surface slope is to remove the original curvature of the vehicle body and only restore the depressions or protrusions relative to the normal vehicle body surface.
[0070] Module 300 uses weighted Poisson integral to calculate the deformation residual depth:
[0071] in, This represents the normalized deformation residual depth. and These are the slopes of the lateral and longitudinal deformation residuals, respectively; and Indicates horizontal and vertical differences; Represents the discrete Laplace operation; Node confidence; This is the smoothing coefficient.
[0072] The first part of the formula requires the slope of the reconstructed depth to be consistent with the slope of the observed deformation residual, while the second part is used to suppress sharp fluctuations caused by noise. Node confidence is determined by phase sharpness, specular reflection signal-to-noise ratio, and multi-view consistency.
[0073] The smoothing coefficient is determined using a calibration piece with a known indentation depth. Depth reconstruction is performed on multiple candidate smoothing coefficients, and the reconstructed depth is compared with the known depth of the calibration piece. The candidate value with the smallest error is selected.
[0074] After obtaining the deformation residual depth, the construction module 300 updates the vehicle surface position along the standard surface normal vector and recalculates the actual deflection path and the three-dimensional paint surface normal vector. The update stops when the maximum depth difference between two adjacent calculations is less than the depth convergence threshold; if the depth convergence threshold is not reached, a maximum of twenty updates are performed.
[0075] The depths obtained through iterations are still distributed across discrete surface nodes. Module 300 projects the discrete surface depths onto a local parametric mesh of the vehicle's standard surface, forming mesh depth nodes. Each mesh depth node stores entity coordinates, deformation residual depth, 3D paint surface normal vector, and confidence level.
[0076] Module 300 establishes the adjacency relationships of mesh depth nodes in the horizontal, vertical, and diagonal directions, and then uses a bicubic spline surface with smooth constraints for fitting. Both valid and missing nodes are represented by the same spline surface, thus obtaining a continuous topographic surface.
[0077] The deformation residual depth of the continuous topographic surface is stored in 32-bit floating-point pixels to form a paint surface topography image. Each pixel records the depth of indentation or protrusion of the corresponding vehicle surface position relative to the normal vehicle body surface, in millimeters.
[0078] The output of step S300 is a paint surface topography image. This image has eliminated the influence of the original design curved surfaces of the vehicle, so the physical deformation boundaries can be further extracted in step S400.
[0079] Step S400: Map the paint surface topography image to a preset curvature gradient space to generate a normal abrupt change trajectory.
[0080] The generation module 400 calculates two tangent vectors based on the transverse and longitudinal slopes of the continuous topographic surface, then calculates the cross product of the two tangent vectors and normalizes them to obtain the three-dimensional paint surface normal vector at each grid position.
[0081] The three-dimensional paint surface normal vector represents the paint surface orientation. In flat areas, the three-dimensional paint surface normal vectors of adjacent locations change little; near recessed edges, raised edges, or deeper scratches, the three-dimensional paint surface normal vectors of adjacent locations change significantly.
[0082] The curvature gradient space referred to in this embodiment uses a two-dimensional parametric grid of the standard vehicle surface as the location space, and stores curvature change data at each grid location. Because the curvature gradient space is a two-dimensional grid structure, it can be divided into unit space grids according to the actual area of the vehicle surface.
[0083] The generation module 400 calculates the rate of change of the 3D paint surface normal vector relative to the solid distance along the horizontal direction of the mesh to obtain the horizontal normal curvature; the same calculation is performed along the vertical direction of the mesh to obtain the vertical normal curvature. Subsequently, the rate of change of the two normal curvatures along the horizontal and vertical directions are calculated respectively to obtain the curvature gradient at that mesh location.
[0084] The generation module 400 compares the angle between the horizontally adjacent 3D paint surface normal vectors and divides the angle by the entity distance between the two sampling positions to obtain the horizontal normal jump variable. The vertical normal jump variable is obtained in the same way.
[0085] The location where the lateral normal jump variable exceeds the lateral jump threshold is determined as the lateral jump point; the location where the longitudinal normal jump variable exceeds the longitudinal jump threshold is determined as the longitudinal jump point. Both thresholds are set using the 99th percentile value of the corresponding jump variable from the non-destructive paint finish.
[0086] When the distance between a horizontal transition point and a vertical transition point is no greater than a grid diagonal, and their curvature change directions are similar, the generation module 400 merges them into an intersection point.
[0087] The generation module 400 uses intersection points as graph nodes. A candidate connection is established between two intersection points if the distance between them is no greater than three grid side lengths, the direction difference is no greater than the direction threshold, and there are no invalid grids between them.
[0088] The cost of candidate connections is determined by the intersection point distance, direction difference, and normal jump variable difference. Before detection, multiple sets of weights are tested using a calibration image with labeled physical deformation boundaries. The weight corresponding to the minimum average distance between the generated trajectory and the calibration boundary is saved as a preset weight.
[0089] The generation module 400 deletes candidate connections whose cost exceeds the edge cost threshold, then uses the minimum spanning forest algorithm to connect the remaining intersection points, and refines the connection results to obtain the normal mutation trajectory.
[0090] Normal abrupt change trajectories represent suspected physical deformation boundaries indicated by specular reflection. Since adhering stains, water films, or uneven wax layers can also cause abnormal reflection directions, these trajectories cannot be directly considered as final damage. Step S500 verifies them using diffuse texture.
[0091] Step S500: Extract the paint texture features from the diffuse reflection component, and filter out the normal abrupt trajectory based on the continuity of the paint texture features to obtain the true deformation trajectory.
[0092] The filtering module 500 first performs high-pass processing on the diffuse component. High-pass processing can reduce the slow color changes caused by stains while preserving the subtle texture of the paint surface.
[0093] The filtering processing module 500 extracts local binary pattern features at two scales and Gabor filter responses in multiple directions. The local binary pattern features are used to represent the brightness arrangement between adjacent pixels, and the Gabor filter responses are used to represent the extension direction of the texture.
[0094] In addition to the texture in a single image, the filtering processing module 500 also compares the same paint surface area in adjacent viewing angles and uses a local affine transformation to describe how the texture moves from one viewpoint to another. This local affine transformation is denoted as the texture transfer matrix.
[0095] The reason for using a texture transfer matrix is that stains that have not undergone deformation may change the color of the paint, but will not significantly change the surface projection relationship between different viewing angles; when the paint surface of a vehicle is dented or raised, even if the paint layer is not cracked, the projection relationship on both sides of its boundary will change.
[0096] The filtering processing module 500 sets sampling windows of the same size on both sides of the trajectory along the normal direction of the abrupt change trajectory, and calculates the continuity of the paint texture:
[0097] in, The Mahalanobis distance between the texture features on both sides of the trajectory; The normalized difference between the texture transfer matrices on both sides of the trajectory; The difference is in the principal direction of the texture. This represents the continuity of the paint texture, and its value ranges from 0 to 1.
[0098] When the texture features, texture transmission relationships, and texture directions on both sides of the trajectory are similar, the continuity of the paint texture is close to one; when one or more of these factors change significantly, the continuity of the paint texture decreases.
[0099] Both the diffuse component and the curvature gradient space store the standard surface node index of the vehicle. The filtering processing module 500 aligns the paint texture continuity with the normal abrupt change trajectory based on this node index.
[0100] For a trajectory with a sudden change in normal direction, the filtering processing module 500 calculates the median of continuity of all sampling points on the trajectory and counts the proportion of sampling points that are below the continuity threshold.
[0101] When the median of continuity is not less than the continuity threshold, and the proportion of low-continuity sampling points is not greater than the proportion threshold, it indicates that the paint texture can continue to extend across the trajectory. The filtering processing module 500 determines this trajectory as a stain pseudo-deformation trajectory.
[0102] When the median continuity is less than the continuity threshold, or the proportion of low-continuity sampling points is greater than the proportion threshold, it indicates that the paint texture or texture projection relationship is interrupted at that trajectory. The filtering processing module 500 determines this trajectory as a candidate true deformation trajectory.
[0103] The continuity threshold and the proportional threshold are determined through calibration samples. The calibration samples include confirmed trajectories without physical deformation and confirmed physical deformation boundaries. Candidate thresholds are tested sequentially, and the false positive rate and false negative rate are calculated separately. The candidate value corresponding to the minimum sum of the two is determined as the preset threshold.
[0104] The filtering module 500 removes false deformation trajectories of stains and outputs candidate true deformation trajectories as the true deformation trajectories. For a trajectory containing both continuous and interrupted segments, it is segmented by intersection points or points of minimum trajectory curvature, and then judged separately for each segment.
[0105] The output of step S500 is the actual deformation trajectory. To avoid a single short trajectory or local noise directly causing damage, step S600 further determines whether the actual deformation trajectory appears in a concentrated area.
[0106] Step S600: Determine the location of paint damage on the vehicle under test based on the intersection density of the actual deformation trajectory in the curvature gradient space.
[0107] The determination module 600 resamples the real deformation trajectory according to the fixed entity arc length and uses a five-point quadratic polynomial for local smoothing.
[0108] For three consecutive sampling points, module 600 calculates the radius of the circumcircle passing through the three sampling points and uses the reciprocal of the circumcircle radius to represent the trajectory curvature of the intermediate sampling point. When the absolute value of the trajectory curvature of the intermediate sampling point is not less than that of the adjacent sampling points and exceeds the deflection threshold, the sampling point is determined as the deflection extreme point.
[0109] The determination module 600 performs non-maximum suppression within two grid edge lengths, retaining only the deflection extrema with the largest absolute value of trajectory curvature. The deflection threshold is the 99th percentile of the absolute value of the curvature of the lossless paint trajectory.
[0110] The determination module 600 divides the curvature gradient space into multiple unit space grids according to the fixed solid side length. The side length of each unit space grid is no greater than half of the minimum damage width to be detected.
[0111] For a unit space mesh at the edge of the curved surface, the determination module 600 calculates the actual surface area based on the vehicle surface triangles covered by the mesh, without using the two-dimensional image projection area.
[0112] The module 600 counts the number of deflection extrema within each unit of spatial grid, and then divides the number of extrema by the actual surface area of that unit of spatial grid to obtain the intersection density. The unit of intersection density is points per square millimeter.
[0113] In this embodiment, the intersection density refers to the number of extreme points of actual deformation trajectory deflection within a unit vehicle surface area. The higher the intersection density, the more concentrated the multiple actual deformation trajectories are distributed in that area.
[0114] The preset density threshold is the 99th percentile of the density at the intersection of non-destructive paint surfaces. Preset density thresholds are saved separately for different vehicle models and different vehicle parts.
[0115] Unit space grids with an intersection density exceeding a preset density threshold are identified as damaged space grids. The determination module 600 merges adjacent damaged space grids and deletes isolated regions with an entity area smaller than one unit space grid area.
[0116] When establishing the curvature gradient space, each spatial node stores the vehicle's standard surface node index, vehicle entity coordinates, and image coordinates from each viewing angle. Based on this correspondence, the determination module 600 reverse-maps the damage space mesh to the vehicle entity space, obtaining the three-dimensional coordinates and entity boundaries of the paint damage location.
[0117] The determination module 600 can also output the maximum indentation depth, maximum protrusion height and solid area of the damaged area based on the paint surface morphology image, and project the damage boundary onto the multi-view paint surface image for display.
[0118] For example, if a unit spatial grid contains 14 deflection extrema and the actual surface area is 400 square millimeters, then the intersection density is 0.035 per square millimeter. If the preset density threshold for this vehicle part is 0.012 per square millimeter, then this unit spatial grid is determined to be a damaged spatial grid.
[0119] like Figure 6 As shown, the automatic vehicle damage detection system includes an acquisition module 100, an extraction module 200, a construction module 300, a generation module 400, a filtering processing module 500, and a determination module 600.
[0120] The acquisition module 100 performs step S100 to obtain a full-spectrum image of the paint surface. The extraction module 200 receives the full-spectrum image of the paint surface and performs step S200 to obtain the specular reflection component and the diffuse reflection component.
[0121] The construction module 300 receives the specular reflection component and executes step S300 to obtain a paint surface morphology image. The generation module 400 receives the paint surface morphology image and executes step S400 to obtain a normal abrupt change trajectory.
[0122] The filtering processing module 500 receives the diffuse reflection component and the normal abrupt change trajectory and executes step S500 to obtain the true deformation trajectory. The determination module 600 receives the true deformation trajectory and executes step S600 to obtain the location of paint damage.
[0123] The computing device 700 includes a processing component 710, a storage component 720, and a communication component 730. The storage component 720 stores a standard surface model of the vehicle, calibration parameters, detection thresholds, a full-gloss image of the paint surface, and computer instructions. When the processing component 710 invokes the computer instructions, it executes steps S100 to S600.
[0124] The computer storage medium 900 stores a computer program, which, when executed by the processing component 710, implements the above-mentioned automatic vehicle damage detection method.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. An automatic vehicle damage detection method based on image recognition, characterized in that, include: Acquire a full-gloss image of the paint surface of the vehicle under test; Extract the diffuse reflection component and specular reflection component of the pristine image of the paint surface; Based on the reflection distortion characteristics in the specular reflection component, a paint surface morphology image of the vehicle under test is constructed. The paint surface topography image is mapped to a preset curvature gradient space to generate a normal abrupt change trajectory indicating the physical deformation boundary of the vehicle under test. Extract the paint texture features from the diffuse reflection component, and filter out the normal abrupt trajectory based on the continuity of the paint texture features to obtain the true deformation trajectory; The location of paint damage on the vehicle under test is determined based on the intersection density of the actual deformation trajectories in the curvature gradient space.
2. The method according to claim 1, characterized in that, Obtain a full-gloss image of the paint surface of the vehicle under test, including: Acquire multi-view images of the paint surface of the vehicle under test; Extract the viewpoint light source parameters of the multi-view paint surface images; Based on the aforementioned viewpoint light source parameters, the paint surface light source color of the multi-view paint surface image is stripped. Obtain the inherent albedo of the paint surface after stripping away the color of the light source; Based on the inherent paint reflectivity, the total internal reflection beam of the paint surface of the vehicle under test is converged; By fusing the total internal reflection beams from the paint surface, a total internal reflection image of the paint surface of the vehicle under test is obtained.
3. The method according to claim 1, characterized in that, Extracting the diffuse reflection component and specular reflection component of the pristine image of the paint surface includes: Scan the full-gloss image of the paint surface to obtain the initial paint curvature of the vehicle under test; Analyze the light intensity distribution of the full-gloss image of the paint surface and extract the high-brightness reflectivity extremes; By combining the initial paint surface curvature and the high-brightness reflectivity, the light spot radiation boundary of the full-spectrum image of the paint surface is defined; Based on the light spot radiation boundary, the full-spectrum image of the paint surface is divided into a specular reflection area and a diffuse reflection area; The photon distribution of the mirror reflection area is extracted as the mirror reflection component; The photon distribution of the diffuse reflection region is extracted as the diffuse reflection component.
4. The method according to claim 1, characterized in that, Based on the reflective distortion characteristics in the specular reflection component, a paint surface morphology image of the vehicle under test is constructed, including: Tracing the actual deflection path of the light rays in the specular reflection component; Obtain the standard deflection path of the light rays from the vehicle under test; By comparing the actual deflection path of the light with the standard deflection path of the light, the deflection offset of the light is obtained; By collecting the light refraction offset, the reflection distortion characteristics of the specular reflection component are determined; Based on the aforementioned reflective distortion characteristics, the discrete surface depth of the vehicle under test is determined. The discrete surface depth is projected onto a preset reference plane grid to determine the grid depth nodes; Spatial fitting is performed based on the topological adjacency relationship of the mesh depth nodes to generate a continuous topographic surface; The deformation fluctuation amplitude of the continuous topographic surface is converted into pixel distribution to construct the paint surface topographic image of the vehicle under test.
5. The method according to claim 1, characterized in that, Mapping the paint surface topography image to a preset curvature gradient space to generate abrupt normal changes in trajectory indicating the physical deformation boundary of the vehicle under test includes: The paint surface morphology image is analyzed to extract the three-dimensional paint surface normal vector of the vehicle under test; Map the three-dimensional paint surface normal vector to the curvature gradient space; Within the curvature gradient space, the lateral jump points of the three-dimensional paint surface normal vector are traced laterally, and the longitudinal jump points of the three-dimensional paint surface normal vector are traced longitudinally. Extract the intersection point of the horizontal jump point and the vertical jump point; Connect the intersection points to generate the normal abrupt change trajectory that indicates the physical deformation boundary.
6. The method according to claim 1, characterized in that, Extract the paint texture features from the diffuse reflection component, and filter out the abrupt normal trajectory based on the continuity of the paint texture features to obtain the true deformation trajectory, including: The diffuse reflection component is analyzed to extract the paint texture features of the vehicle under test; By tracing the spatial trend of the paint texture features, the continuity of the paint texture can be determined; Align the spatial coordinates of the paint texture continuity with the spatial coordinates of the normal abrupt change trajectory; The normal abrupt change trajectory corresponding to the area where the continuity of the paint texture is not interrupted is determined to be the stain pseudo-deformation trajectory. The normal abrupt change trajectory corresponding to the region where the continuity of the paint texture is interrupted is determined as the candidate true deformation trajectory; The pseudo-deformation trajectory of the stain is removed, and the candidate true deformation trajectory is output as the true deformation trajectory.
7. The method according to claim 1, characterized in that, The location of paint damage on the vehicle under test is determined based on the intersection density of the actual deformation trajectories in the curvature gradient space, including: Extract the deflection extreme points of the true deformation trajectory in the curvature gradient space; The curvature gradient space is meshed to obtain multiple unit space grids; Count the number of extreme values of the deflection extreme points within each unit spatial grid; Based on the number of extreme values and the grid area of the unit space grid, the intersection density of the true deformation trajectory is calculated. Filter out the damaged space grids whose intersection density exceeds a preset density threshold; The damage space mesh is reverse-mapped to the solid space to determine the location of paint damage on the vehicle under test.
8. An automatic vehicle damage detection system based on image recognition, characterized in that, The system is used to implement the image recognition-based automatic vehicle damage detection method according to any one of claims 1-7; the system comprises: The acquisition module is used to acquire a full-gloss image of the paint surface of the vehicle under test; The extraction module is used to extract the diffuse reflection component and specular reflection component of the full-gloss image of the paint surface; A construction module is used to construct a paint surface morphology image of the vehicle under test based on the reflection distortion characteristics in the specular reflection component. The generation module is used to map the paint surface topography image to a preset curvature gradient space to generate a normal abrupt change trajectory indicating the physical deformation boundary of the vehicle under test. The filtering processing module is used to extract the paint texture features in the diffuse reflection component and filter the normal abrupt trajectory based on the continuity of the paint texture features to obtain the true deformation trajectory. The determination module is used to determine the location of paint damage on the vehicle under test based on the intersection density of the actual deformation trajectory in the curvature gradient space.
9. A computing device, characterized in that, It includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are invoked and executed by the processing component to implement an automatic vehicle damage detection method based on image recognition as described in any one of claims 1-7.
10. A computer storage medium, characterized in that, The device contains a computer program that, when executed by a computer, implements an automatic vehicle damage detection method based on image recognition as described in any one of claims 1-7.