A mower steel handle coating image recognition detection method
By acquiring a group of labeled coating images and establishing a surface coordinate correspondence, extracting the cross-illumination retention component and the illumination-varying component, generating abnormal evidence and filtering out reflection anomalies, the problem of inconsistent viewing angles in the inspection of steel handle coatings for lawnmowers was solved, and stable identification and accurate detection of defects were achieved.
Patent Information
- Application Number
- CN202611351929.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-02
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies struggle to consistently distinguish between genuine coating defects and reflective bright spots caused by curvature when inspecting the coating of steel handles for lawnmowers. This results in test results that fluctuate with handle posture and lighting conditions, making it impossible to accurately identify defects such as missed coatings and scratches.
By acquiring a group of coating images with pose and illumination markers, the correspondence between image pixels and normalized surface coordinates is established. The cross-illumination retention component and the illumination-varying component are extracted to generate anomalous evidence and filter out reflection anomalous evidence, and then the images are fused to form a defect area.
It achieves stable identification of coating defects under different viewing angles and lighting conditions, reduces false detections and evidence cancellation caused by reflective bright spots, and ensures the accuracy of defect location and boundary.
Smart Images

Figure CN123160499A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial image processing and machine vision inspection technology, specifically to a method for image recognition and detection of the coating on the steel handle of a lawnmower. Background Technology
[0002] The steel handle of a lawnmower is typically made of steel pipe with straight sections, bent sections, and connecting transition sections. After the surface is sprayed or powder coated and cured, visible defects such as missed coating, exposed substrate, scratches, runs, particles, bubbles, and local color abnormalities need to be detected. Existing visual inspection equipment usually places the handle in a positioning fixture or conveyor station, and uses an area scan camera with a ring light source, strip light source, or diffuse reflection light source to acquire coating images. Imaging conditions are controlled by fixing the exposure time, white balance, shooting distance, and illumination angle. After lens distortion correction, brightness equalization, filtering and noise reduction, and handle area extraction, the acquired images are converted to grayscale color space, hue saturation and brightness color space, or perceived uniform color space. Abnormal pixels are then separated using fixed threshold, adaptive threshold, background difference, or qualified sample template difference. Subsequently, isolated noise is eliminated by using opening and closing operations, hole filling, and connected region screening. Image recognition judgment is performed based on the area, shape, color difference, and location of abnormal areas, and the overall qualified status of the part is output according to preset inspection rules.
[0003] For situations where the circumferential surface of a steel handle cannot be completely covered by a single image, existing implementations that are relatively close typically employ multi-camera partitioned shooting or acquisition methods where a fixture drives the workpiece to rotate in an indexing manner. This ensures that adjacent viewpoints retain a certain overlap area, and within each viewpoint, the region of interest of the tube body is extracted based on the handle contour. Some devices unfold the visible curved surface into strip images according to the tube body's centerline and side contours, and then perform color correction, local brightness compensation, and defect candidate region extraction. For high-brightness areas caused by metal coatings, polarizers, diffuse illumination, removal of overly bright pixels, or local threshold adjustment are typically used to reduce reflection interference. The candidate regions generated from each viewpoint are summarized according to camera number, rotation angle, or workpiece length position. Duplicate results in overlapping areas are discarded through region union, region intersection, or confidence order. The longitudinal length, circumferential width, boundary contour, and color deviation of the summarized connected regions are then calculated, and the defect location, defect level, and overall inspection conclusion are generated based on the judgment conditions corresponding to the defect category.
[0004] The existing implementation needs to address the inconsistency in observation of the curved surface of the steel handle under multi-view and multi-directional lighting. This makes it difficult to stably distinguish and uniformly locate the real coating defects and the reflective bright spots caused by curvature. The continuous change of the tube curvature will change the angle between the surface normal and the incident light and imaging optical axis. The same normal coating area may appear bright, dark, or color-shifted in different viewpoints. The abnormal response formed by missing coating, scratches, and local undulations may overlap with the above brightness changes. When relying on a single image threshold or a single normal template, the reflective area is easily segmented as a defect. The real defects located in the strong reflection neighborhood or at the edge of the viewpoint may also be weakened by the background compensation process. At the same time, the pixel scale, contour compression degree, and projection position of the same physical surface are not consistent in different images. Directly summarizing according to camera number or rotation angle can only form a viewpoint-level correlation, which cannot stably correspond the abnormal evidence in each image to the same surface sampling position. Therefore, duplicate counting, boundary misalignment, or mutual cancellation of evidence occur in the overlapping area, causing the detection results to fluctuate with the handle posture and lighting conditions. Summary of the Invention
[0005] The purpose of this invention is to provide an image recognition and detection method for the coating of steel handles of lawnmowers, which can solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for image recognition and detection of the coating of a lawnmower steel handle includes: acquiring a group of steel handle coating images with pose markers and lighting markers according to a preset imaging pose and lighting direction; Based on the handle outline, workstation reference, and pose identifier in the image group, establish the correspondence between image pixels and normalized surface coordinates of the handle; The color response of the same surface sampling unit is registered as a response sequence according to the lighting identifier, and the cross-lighting hold component and the lighting variation component are extracted from the response sequence. Based on the deviation of the cross-illumination retention component relative to the local normal coating reference, abnormal evidence is generated. The abnormal evidence that the illumination-varying component changes in the same direction as the adjacent surface sampling unit is marked as reflection abnormal evidence and filtered out. The retained abnormal evidence is projected onto the normalized surface coordinate domain, fused to form a defect region, and the detection results are output.
[0007] Preferably, the establishment of the correspondence includes: segmenting the handle outline in the coating image corresponding to each imaging pose, and extracting the continuous center trajectory along the extension direction of the tube body; A numbered transverse sampling line is set along the central trajectory, and the segment between the intersection of each transverse sampling line and the two side contours is normalized into circumferential local coordinates. The longitudinal coordinates are constructed based on the cumulative length of the central trajectory, and the origin and direction of the longitudinal coordinates are unified under different imaging poses using the work station reference. The longitudinal coordinates and the circumferential local coordinates are combined into a normalized surface coordinate grid, and the image pixel set corresponding to each grid cell is recorded.
[0008] Preferably, the extraction of the cross-illumination retention component and the illumination-varying component includes: performing exposure normalization on the color response of the same surface sampling unit under different illumination directions, and using the channel-by-channel median value of the color response of each surface sampling unit within the cross-sectional sampling band as the color baseline to correct the overall brightness shift. The median response of each illumination response is obtained according to the color channel, and the median responses of each color channel are combined into the cross-illumination holding component. Calculate the signed difference of each illumination response relative to the median response, and connect the signed differences in the order of illumination direction to form the illumination-varying component.
[0009] Preferably, the generation and screening of anomalous evidence includes: dividing the normalized surface coordinate grid into overlapping longitudinal local segments and circumferential local zones, and constructing a normal coating reference from surface sampling units with low amplitude of illumination variation in each local region; Calculate the color residual of the cross-illumination retention component relative to the normal coating reference, and combine the color residual with the cumulative values of the same sign in the longitudinal and circumferential adjacent surface sampling units to form the anomalous evidence; The abnormal evidence whose direction and sign of the change in the component with illumination variation are consistent with those of the adjacent surface sampling unit is marked as the reflection abnormal evidence and removed from the candidate evidence set.
[0010] Preferably, an observation reliability is established for each grid cell in the normalized surface coordinate grid. The normalized distance from the pixel set corresponding to the grid cell to the handle contour boundary is taken as the positive term, and the reprojection deviation of the same grid cell between adjacent imaging poses is taken as the negative term. The observation reliability is synthesized according to a preset weight. Mesh cells that are close to the handle outline boundary and whose corresponding pixel set is compressed along the circumferential direction are marked as non-primary observation cells; When there are multiple imaging pose observations in the same surface sampling unit, the observation with high observation reliability is selected as the main observation, and the remaining valid observations and their corresponding observation reliability are retained as the basis for overlap fusion.
[0011] Preferably, the construction of the normal coating reference includes: taking the circumferential local zone where the sampling unit of the surface to be detected is located as the center, and selecting a reference sampling set that spans adjacent longitudinal local sections; The color baseline is initialized with the channel median value of the cross-illumination hold-up component in the reference sampling set, and abnormal sampling units are excluded based on the degree of deviation of each sampling unit from the color baseline and the amplitude of illumination change. The color baseline is redefined using the retained sampling unit, and the exclusion process is repeated until two consecutive retained sampling sets are consistent. The final color baseline and the discrete distribution of the retained sample set are used together to determine the normal coating reference.
[0012] Preferably, for the high-brightness abnormal regions in the candidate evidence set, connected regions that deviate positively from the brightness baseline of the cross-sectional sampling band are extracted from the coating images corresponding to each illumination direction, and projected onto the normalized surface coordinate grid according to the correspondence. Connect the center positions of each connected area according to the order of the lighting direction to form a bright migration trajectory; The bright abnormal region whose center position continuously shifts with the direction of illumination and whose sign difference corresponds to a change in direction is incorporated into the evidence of reflection abnormality. Regions in which the projection positions under multiple illumination directions remain overlapping and the cross-illumination retention component continuously deviates from the normal coating reference are retained in the candidate evidence set.
[0013] Preferably, the fusion of the defect region includes: projecting the boundary and internal evidence values that retain the abnormal evidence under each imaging pose onto the normalized surface coordinate grid; Internal evidence values pointing to the same grid cell are synthesized according to the corresponding observation reliability, and the boundary corresponding to the main observation is selected when the boundary projections of different imaging poses are inconsistent. For adjacent anomalous mesh cells, connectivity merging is performed only if their deviation directions relative to the normal coating reference are consistent and the illumination-dependent components have a corresponding relationship. The defect region is generated based on the merged set of abnormal mesh cells, and an imaging pose identifier supporting the defect region is associated with it.
[0014] Preferably, in the overlapping area of adjacent imaging poses, the mesh cells that have formed defective areas are excluded, and the local color gradient maps corresponding to the remaining mesh cells are segmented and matched to obtain matching point pairs with the same normalized surface coordinates but offset projection positions. With the constraints of maintaining the order of the longitudinal coordinates and the continuity of the circumferential local coordinates, a local coordinate correction field is generated based on the matching point pairs; The normalized surface coordinate grid of adjacent imaging poses is updated using the local coordinate correction field, the anomalous evidence is reprojected, and the observation reliability and defect region boundary are updated based on the corrected reprojection deviation.
[0015] Preferably, a material color deviation map and a surface undulation response map are generated for the fused defect area, respectively. The material color deviation map is composed of the signed deviation of the cross-illumination retention component relative to the normal coating reference, and the surface undulation response map is composed of the sign reversal relationship of the illumination-varying components under different illumination directions. First, based on the distribution of the two types of responses in the defect area, the defect area is divided into material exposure type or surface undulation type. Then, based on the skeleton continuity and width variation of the material exposure type area, the missing coating area and the scratch area are distinguished. Finally, based on the closed boundary or directional extension boundary of the surface undulation type area, the particle bubbling area or the sagging area is determined.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. By acquiring a group of coating images with corresponding labels according to the imaging pose and illumination direction, and establishing the correspondence between image pixels and normalized surface coordinates based on handle contour, workstation reference, and pose information, the color response of the same physical surface unit in different images can be registered to a unified position. The cross-illumination retention component retains coating color deviations that do not migrate with the illumination direction, and the illumination change component records the signed brightness changes caused by the change in incident direction. By using local normal coating references to generate anomalous evidence and marking evidence with the change direction consistent with the neighborhood as a reflection response, bright spots that migrate with illumination and coating anomalies that maintain stable positions in surface coordinates can be separated during the evidence formation stage. After the retained evidence is projected onto surface coordinates and fused from multiple perspectives, the same defect no longer forms independent candidate regions due to changes in shooting perspective. Local evidence obtained at the edge of the perspective can also be merged with the main observation area, thereby reducing false detections caused by reflective bright spots and missed detections caused by evidence cancellation, and reducing the offset of defect position and boundary caused by changes in workpiece posture.
[0017] 2. The normalized surface coordinate grid uses the cumulative length of the center trajectory and the cross-sectional sampling segment to form the longitudinal and circumferential positions, ensuring that the detection results of straight segments, curved segments, and connecting transition segments are continuously arranged. Based on the observation reliability formed by the contour boundary distance and the reprojection deviation of the overlapping area, the edge image of the circumferential compression can be used as auxiliary evidence to participate in the fusion, and the defect boundary is determined by a more complete master observation, reducing the repeated and broken areas in the overlapping view. The normal coating reference is updated by eliminating sampling units with color deviation or abnormal lighting changes in round by round, which can avoid the weakening of its own color residual after the real defect enters the reference set. The highlight migration trajectory further identifies the reflection area with position movement and brightness sign reversal according to the change of lighting direction. The local coordinate correction field corrects the surface projection deviation according to the color gradient matching of the non-defect overlapping area, making the boundary connection of the multi-view defect area more consistent. The material color deviation map and the surface undulation response map can also separate the material exposure anomaly and the surface undulation anomaly, and form the corresponding defect category results according to the regional skeleton, width change and boundary morphology. Attached Figure Description
[0018] Figure 1 This is a flowchart of the overall process for coating image recognition and detection. Figure 2 The processed image; Figure 3 Flowchart for surface coordinate mapping and anomaly evidence generation; Figure 4 A flowchart for multi-perspective evidence fusion and defect classification; Figure 5 A comparison chart of observation reliability and reprojection bias; Figure 6 This is a reference diagram for a localized normal coating and a color residual distribution diagram. Detailed Implementation
[0019] In one embodiment, please refer to Figure 1A method for image recognition and detection of the coating of a lawnmower steel handle includes: acquiring a group of steel handle coating images with pose and lighting markers according to a preset imaging pose and lighting direction; establishing a correspondence between image pixels and normalized surface coordinates of the handle based on the handle outline, work station reference, and pose marker in the image group; registering the color response of the same surface sampling unit into a response sequence according to the marker, and extracting the cross-lighting retention component and the component that changes with lighting from the response sequence; generating abnormal evidence based on the deviation of the cross-lighting retention component from the local normal coating reference, and marking the abnormal evidence that changes with lighting in the same direction as the change of adjacent surface sampling units as reflection abnormal evidence and filtering it out; projecting the retained abnormal evidence onto the normalized surface coordinate domain, fusing it to form a defect area and outputting the detection result. The entire process associates the workpiece marker with the image, coordinate grid, response sequence, and defect area, so that each intermediate data can be traced back to the corresponding handle and acquisition state, and completes the regional expression of missed coating, exposed substrate, scratches, runs, particles, blistering, and local color abnormalities in the surface coordinate domain.
[0020] In this embodiment, after the steel handle enters the inspection station, the current inspection record is generated by the workpiece identification information. The acquisition control program reads the imaging pose set and illumination direction set corresponding to the current handle, and triggers image acquisition according to the combination relationship between pose and illumination. Each image is written with workpiece identifier, pose identifier, illumination identifier, acquisition order, image size and color channel status. Images belonging to the same pose but with different illumination identifiers are organized into pose-inclusive image groups. Images covering adjacent surface areas but belonging to different poses are organized into overlapping view groups. Before the image enters subsequent processing, the acquisition program checks whether the identifier combination is complete, and judges whether the workpiece has moved beyond the allowable registration range by the visibility status of the station reference in the image. Images with missing identifiers do not participate in response sequence construction. When the overlapping view is incomplete, only the image branch that can form continuous surface coverage is retained to avoid combining the color responses of different acquisition cycles or different workpieces into the same surface sampling unit.
[0021] Specifically, image preprocessing generates a computed image while retaining a copy of the original image. The computed image then undergoes lens distortion mapping correction, color channel linearization, dark background subtraction, and local brightness baseline correction in sequence. Lens distortion mapping is provided by the station calibration data. Color channel linearization is used to convert the nonlinear gray levels output by the camera into comparable response levels. Dark background subtraction uses color statistics of areas not covered by the handle contour to correct ambient stray light. Local brightness baseline correction uses the median response within the cross-sectional sampling band as a reference to process the overall offset of each illumination image. Subsequently, a handle mask is generated based on the color difference and contour continuity between the workpiece area and the background area. The mask is then subjected to hole filling, slit closure, and isolated area exclusion, while retaining the main body contour that conforms to the current handle clamping direction in relation to the station reference position. All color response readings are limited to within the main body contour, and pixels outside the contour are only used for background baseline estimation without generating defect evidence.
[0022] Please refer to Figure 2 , Figure 2 The image shows a computed image of the steel handle coating after preprocessing and subject region constraint. The differences in grayscale brightness correspond to the response differences after lens distortion mapping correction, color channel linearization, dark background subtraction, and local brightness baseline correction of the cross-sectional sampling band. Figure 2 The black longitudinal lines and transverse sampling marks are used to characterize the relative positions of the center trajectory, local tangential direction, and transverse sampling direction on the surface of the tubular handle.
[0023] from Figure 2 It can be seen that the processed main body area remains continuous along the handle tube direction. The background texture, the adjacent area of the clamp, and the scattered edges unrelated to the main body contour are significantly suppressed, while local narrow strip-shaped coating anomalies are still retained inside the main body mask. This result corresponds to the hole filling, narrow slit closure, isolated area exclusion, clamp additional contour culling, and main body outer boundary smoothing steps described in the paper, indicating that the subsequent color response readings only come from the internal available pixel set, and pixels outside the contour only participate in background baseline estimation and do not enter into anomaly evidence calculation.
[0024] Figure 2 It also reflects the preconditions for mapping image row and column coordinates to surface sampling units: the center trajectory determines the longitudinal cumulative path coordinates, and the relative position between the intersection of the transverse sampling line and the left and right contours determines the circumferential local coordinates. Only after the boundaries, center lines, and sampling bands in the computed image before surface coordinate mapping are stable can the same grid unit be back-projected to obtain the pixel set and record the available response state; if this step results in subject breakage, boundary misalignment, or background residue, subsequent local references, color residuals, and multi-view fusion will all be affected. Figure 2 It can serve as a visual checklist for preprocessing quality and coordinate mapping reliability.
[0025] Furthermore, the correspondence between image pixels and the normalized surface coordinates of the handle is described by both longitudinal position and circumferential local position. The longitudinal position is determined by the cumulative path on the handle's center trajectory, and the starting point of the center trajectory is determined by the workstation reference and the handle clamping direction. The circumferential local position is determined by the relative position of the transverse sampling line passing through the center trajectory in the visible contour segment. The intersection points of the transverse sampling line and the left and right contours correspond to the boundaries of the visible surface bands at the current viewpoint, respectively. The sampling positions between the boundaries are mapped to a normalized interval of 0 to 1. The sampling positions along the length direction of the center trajectory are also mapped to a normalized interval of 0 to 1. The local coordinates in different viewpoints are then mapped to a unified surface grid based on the overlapping area and pose identifier. In this way, the bending projection, near contour compression, and local scale changes in the image are converted into positional differences on the surface grid. Subsequent response comparisons do not directly use the row and column coordinates of the original image.
[0026] In this embodiment, the surface sampling unit corresponds to the grid unit in the normalized surface mesh. Each grid unit stores the longitudinal coordinate range, circumferential coordinate range, source pose, and corresponding pixel set. The corresponding pixel set is formed by back-projecting the grid boundary onto the image. When the set covers multiple pixels, it is weighted and sampled according to the distance from the pixel center to the grid back-projection center. When the set falls in the pixel gap, the color response is obtained by linear interpolation of the neighboring pixels. The color responses obtained by the same grid unit under multiple illumination directions are arranged according to the light indicator. Before the arrangement, exposure normalization and cross-sectional sampling band baseline correction are performed. The arrangement result includes the response value of each color channel, the deviation sign relative to the baseline, the illumination direction, and the response availability status. The response availability status is determined according to whether the pixel is located on the main contour, whether there is a channel truncation, and whether the corresponding area is occluded by the fixture. Unavailable responses retain an indicator but are not included in the median response calculation.
[0027] Specifically, the cross-illumination retention component is constructed from the median values of each available illumination response in the same surface sampling unit. The median values are independent of the order of illumination direction and can suppress high-brightness extremes that only appear in local directions. The illumination-varying component is constructed by connecting the signed differences of each illumination response relative to the median value in the order of illumination direction. Positive differences indicate that the response under the current illumination is higher than the cross-illumination baseline, and negative differences indicate that the response under the current illumination is lower than the cross-illumination baseline. The absolute value of the difference indicates the extent to which the color response is affected by the illumination direction. The processing program also records the consistency of the sign of the differences in each color channel. When the brightness-related channel shows a significant reversal with the change of illumination and the color ratio remains close, the change is attributed to the surface reflection response. When the cross-illumination retention component deviates from the local normal coating reference in multiple color channels, the deviation is used as input evidence of material color anomalies.
[0028] Furthermore, the local normal coating reference does not use a fixed color value covering the entire handle. Instead, a reference set is established in the normalized surface mesh according to the overlapping longitudinal local segments and circumferential local bands. The reference set excludes mesh cells near the main outline boundary, those with insufficient response availability, and those with high local distribution with varying illumination amplitude. The median value of the cross-illumination retention component of the remaining mesh cells is used as the color center. The median value of the absolute deviation of each channel relative to the color center describes the normal discrete range. The cross-illumination retention component of the mesh cell to be tested is compared with the color center channel by channel. Mesh cells with the same deviation direction and continuous occurrence in the longitudinal or circumferential direction form a cumulative color residual. Isolated deviations are weakened by the degree of neighborhood consistency. Deviations that span multiple adjacent meshes and maintain the same sign provide continuous evidence of anomalies, thus separating the coating gradient background from the anomalous areas with local boundaries.
[0029] In this embodiment, the screening of anomalous reflection evidence is based on the correspondence between the component that changes with illumination and the neighborhood change pattern. The processing program compares the illumination direction where the change peak is located, the reversal order with sign difference, and the proportional relationship of brightness-related channels in the longitudinal and circumferential neighborhood. If the grid cell to be detected and the neighboring grid cells have the same change direction and jointly form a bright band that moves with the illumination direction, the corresponding anomalous evidence is marked as the source of reflection. If the cross-illumination retention component continues to deviate from the normal coating reference and the projection position remains overlapping in different illumination images, the material anomalous evidence is retained. The retained evidence is projected onto a unified curved surface grid according to the longitudinal and circumferential coordinates. Adjacent grid cells with the same deviation direction are connected and merged. Evidence that is repeatedly covered from different viewpoints is synthesized according to the observation reliability. Finally, the defect area saves the surface coordinate boundary, internal evidence distribution, source image identification, and response records required for defect category determination.
[0030] In a preferred embodiment, please refer to Figure 3 The establishment of the correspondence includes: segmenting the handle contour in the coating image corresponding to each imaging pose and extracting the continuous center trajectory along the extension direction of the tube; setting sequentially numbered transverse sampling lines along the center trajectory and normalizing the segment between the intersection of each transverse sampling line and the left and right contours into circumferential local coordinates; constructing longitudinal coordinates with the cumulative length of the center trajectory and using the work station reference to unify the origin and direction of the longitudinal coordinates under different imaging poses; combining the longitudinal coordinates and circumferential local coordinates into a normalized surface coordinate grid and recording the image pixel set corresponding to each grid unit; establishing a correlation between the contour segmentation result, the center trajectory, the transverse sampling lines and the coordinate grid according to the same image identifier, so that any subsequent abnormal grid unit can be reverse-searched for the pixel range in the original image.
[0031] Specifically, the handle contour is obtained from the outer boundary of the main body mask. Short concave points and local convex points in the outer boundary are smoothed according to the direction of adjacent boundaries. The additional contour formed by the clamping part and the background is removed according to its relative position with the work station reference. The center trajectory uses the skeleton after the main body mask shrinks layer by layer as the initial result, and retains the branches that are continuous with the overall extension direction of the handle at the bifurcation of the skeleton. Short branches leading to local contour burrs are deleted. Then, the center point is corrected with the left and right contours near the initial skeleton at equal distances, so that the center trajectory is located in the middle of the tube in the straight section, and continuously transitions along the bending direction in the bending section. In the connecting transition section, it is avoided that it suddenly deviates from the contour boundary due to local width changes. The corrected center points are sorted according to the starting direction determined by the work station reference. When there is a local foldback, the cumulative path order is used instead of the image horizontal coordinate order to maintain the continuity of the vertical coordinate.
[0032] Preferably, the transverse sampling line is determined by the local tangent of the center trajectory at the current sampling position. The processing program selects center points with equal path distances before and after the sampling position to form a local tangent, and extends it in a direction perpendicular to the local tangent to the intersection of the left and right sides of the main contour. When the bending curvature is large and adjacent sampling lines intersect, the sampling interval is shortened and the intersection area is cut according to the order of the center trajectory, so that each image pixel belongs to only the vertically adjacent grid unit. The path position between the left and right intersection points of the transverse sampling line is normalized according to the cumulative distance from the starting boundary to the ending boundary of the visible surface. The sampling segment near the contour boundary still retains the coordinates but adds an edge compression mark. The cumulative length of the center trajectory is accumulated and normalized using the path length between adjacent center points, thereby forming a vertical coordinate sequence that does not depend on the image rotation direction and local bending shape.
[0033] Furthermore, the workstation reference is represented by a reference area in the detection workstation with a fixed relative position that can be identified in each imaging pose. The processing program determines the positive direction of the longitudinal coordinate of the handle based on the direction of the reference area, and determines the origin of the longitudinal coordinate based on the adjacency relationship between the reference area and the handle end or clamping area. After the center trajectories of different viewpoints are uniformly sorted in the positive direction, the tube width change sequence, the center trajectory curvature change sequence, and the stably identifiable color gradient position are compared in the overlapping area. The longitudinal corresponding segments between viewpoints are obtained through sequence matching. Then, the circumferential local coordinates in the corresponding segments are converted into a unified circumferential position according to the surface direction covered by the pose. If there are multiple candidate positions in the overlapping area matching, the candidate position with the same cumulative length of the center trajectory and a small boundary reprojection deviation is selected. Finally, the pixel set and overlapping relationship from each imaging pose are registered for each surface mesh unit.
[0034] In a preferred embodiment, the extraction of the cross-lighting hold component and the light-dependent component includes: performing exposure normalization on the color response of the same surface sampling unit under different lighting directions, and using the median value of the color response of each surface sampling unit within the cross-sectional sampling band as the color baseline to correct the overall brightness shift; obtaining the median response of each lighting response according to the color channel, and combining the median responses of each color channel into a cross-lighting hold component; calculating the band sign difference of each lighting response relative to the median response, and connecting the band sign differences according to the order of the lighting directions to form a light-dependent component. The component is stored together with the workpiece identifier, surface grid coordinates, and response availability status to avoid supplementing the current sequence with the response of a neighboring workpiece when a corresponding lighting image is missing.
[0035] In this embodiment, exposure normalization is based on the brightness distribution of normal candidate regions in each image. The processing program excludes channel-truncated pixels, contour edge pixels, and pixels with large initial color deviations within the main body contour, obtains the median position and absolute deviation median value of the brightness distribution of the remaining pixels, and adjusts the brightness distribution center of different lighting images to the common center of the image group within the pose, while maintaining the proportional relationship between each color channel. The cross-sectional sampling band color baseline is composed of the channel-by-channel median value of all available surface sampling units within the same sampling band. The color response of each sampling unit first deducts the overall offset relative to the baseline, and then enters the cross-illumination statistics. Since exposure normalization corrects the acquisition gain difference at the whole image level, and sampling band baseline correction corrects the gradual illumination at the local surface level, the response after the second-level correction can be compared at the same position between different lighting directions.
[0036] Specifically, the color channels are processed separately for each illumination-preserving component. When a highlight occurs in a certain illumination direction, the corresponding response is usually located at the high end of the response sequence at the same position. The median response is obtained from the middle position of the sequence and does not move synchronously with the extreme values of a single direction. When a shadow occurs in a certain illumination direction, the low-value response will not directly determine the median response either. The processing program merges the median responses of each channel into a stable color description of the current sampling unit and records the positive and negative relationships between each illumination response and the median response. The components that change with illumination are arranged with sign differences according to the spatial direction order defined in the acquisition configuration, so that the response changes corresponding to adjacent illumination directions maintain the order relationship. Then, the median position of the change amplitude, the direction of the maximum positive deviation, the direction of the maximum negative deviation, and the number of sign reversals are extracted and quantified to determine the highlight migration and surface undulation response. Defects are not directly determined by the absolute brightness of a single image.
[0037] Furthermore, when there are channel truncation, partial occlusion, or image missingness in the response sequence, the processing program does not perform numerical interpolation at the missing positions. Instead, it uses an available state mask to limit the statistical range of the median response and the difference sequence, and writes the illumination coverage integrity of the current sampling unit into the evidence record. When the available illumination response cannot cover the arrangement segment required for the change direction comparison, only the cross-illumination preservation component is generated, and no reflection migration judgment is generated. If the adjacent surface sampling unit has a complete response sequence, the neighborhood change mode is allowed to constrain the reflection evidence of the current sampling unit, but it does not replace its own color deviation. The response with truncation of the color channel is removed from the color ratio comparison, while the signed difference of the untruncation channel is retained, so that the stable color shift caused by material exposure and the truncation response caused by unidirectional overbrightness are kept in different states in the data structure.
[0038] In another preferred embodiment, the generation and removal of anomalous evidence includes: dividing the normalized surface coordinate grid into overlapping longitudinal local segments and circumferential local bands; constructing a normal coating reference from surface sampling units with low amplitude of illumination variation within each local region; calculating the color residual of the cross-illumination-preserving component relative to the normal coating reference; combining the color residual with the cumulative value of the same sign in adjacent longitudinal and circumferential surface sampling units to form anomalous evidence; marking anomalous evidence whose direction and sign of the illumination-varying component are consistent with those of adjacent surface sampling units as reflection anomalous evidence and removing it from the candidate evidence set, wherein the candidate evidence set retains the local reference source, color deviation direction, and illumination variation record of each anomalous grid unit to support the verification of evidence consistency during subsequent cross-view fusion.
[0039] Specifically, the longitudinal local segments are set by sliding along the cumulative length of the central trajectory, with adjacent segments maintaining overlap. The circumferential local bands are set by sliding along the normalized circumferential position and truncated at the left and right boundaries according to the viewing coverage. Each grid cell can belong to multiple local regions simultaneously. After the normal coating reference is generated in each local region, the reference weight is assigned according to the coordinate distance from the grid cell to be detected to the center of each local region. Bent sections and connecting transition sections do not share the color center with distant straight sections. The reference candidate cells in the local region are sorted according to the magnitude of change with illumination. Cells located in the high-value distribution area and whose change sign is consistent with the neighborhood are excluded as reflection candidates. Cells whose components deviate from the initial color center across illumination are also temporarily not included in the reference set. The median value of each channel and the median value of the absolute deviation of the remaining cells together describe the normal color range of the current local region.
[0040] In this embodiment, the color residual retains the channel direction instead of only recording the absolute distance. When the cross-illumination retention component is higher than the normal color center, a positive residual is recorded, and when it is lower than the normal color center, a negative residual is recorded. The residuals of each color channel are scaled uniformly according to the normal discrete range to avoid channels with large fluctuations occupying all the evidence. The processing program searches for grid cells with the same residual direction in the longitudinal and circumferential neighborhoods respectively, and accumulates them attenuated according to the coordinate distance between adjacent grids. The accumulated results that are continuous in the longitudinal direction and narrow in the circumferential direction form linear evidence, and the accumulated results that form closed adjacencies in both the longitudinal and circumferential directions form block evidence. Results that appear only in a single grid and have no corresponding relationship in the surrounding residual direction are retained as isolated candidates. Whether to incorporate them into the defect area is determined after the multi-view evidence is fused, so as to avoid prematurely deleting local anomalies that may be formed by tiny particles in the current view.
[0041] Furthermore, the evidence of reflective anomalies is determined based on the direction of change, the sign of difference, and the shape of the neighborhood coverage. The processing program compares the positive deviation peak direction of the current grid cell in the component of illumination change with the adjacent grid cells. When the peak directions of continuous neighborhoods are consistent and they move together with the change of illumination direction, the neighborhood is marked as a reflective band. When the positive and negative deviations reverse direction in a group under the relative illumination direction and the cross-illumination retention component is within the normal color range, the corresponding color residual is removed from the candidate evidence set. When the cross-illumination retention component continuously deviates from the normal color range, even if the component of illumination change has partial consistency with the neighborhood, the material color anomaly branch is retained, and a reflective superposition mark is added to the evidence record. In the subsequent fusion stage, the material anomaly evidence and the reflective superposition state are synthesized separately, without covering the actual coating color deviation with the reflective state.
[0042] In a preferred embodiment, please refer to Figure 4 An observation reliability is established for each grid cell in the normalized surface coordinate grid. The normalized distance from the pixel set corresponding to the grid cell to the handle contour boundary is used as the positive term, and the reprojection deviation of the same grid cell between adjacent imaging poses is used as the negative term. The observation reliability is synthesized according to the preset weights. Grid cells that are close to the handle contour boundary and whose corresponding pixel set is compressed along the circumferential direction are marked as non-master observation cells. When there are multiple imaging pose observations in the same surface sampling cell, the observation with higher observation reliability is selected as the master observation, and the remaining available observations and their corresponding observation reliability are retained as the basis for overlap fusion. Each observation record is also associated with its main contour state, illumination coverage integrity and pixel interpolation state, so that the observation selection can be completed before evidence synthesis without changing the original color response.
[0043] Specifically, the contour boundary distance is obtained from the pixel path from the center of the pixel set corresponding to the grid cell to the nearest boundary of the handle contour, and then divided by the length between the left and right boundaries of the current cross-section sampling line to form a normalized distance of 0 to 1. Observations located in the middle of the visible surface have a larger positive term, while observations close to the contour boundary have a smaller positive term. The reprojection bias is obtained from the distance between the current grid cell's surface coordinate position in the adjacent viewpoint and the local color gradient matching position after being projected back into the image. The distance is scaled according to the median position of the bias distribution and the median value of the absolute bias in the overlapping area to form a negative term. The weights of the positive and negative terms are selected according to the coverage type of the current viewpoint in the straight segment, curved segment, or connecting transition segment. The weights are saved with the station calibration record and cannot be temporarily changed based on defect evidence during the single-piece inspection process.
[0044] Please refer to Figure 5 , Figure 5 The horizontal axis represents the order of the surface grid cells, expanded according to the longitudinal cumulative path and circumferential local coordinates; the vertical axis represents the normalized observation reliability and reprojection bias. Figure 5 As can be seen, the observation reliability curve is generally located in the range of approximately 0.32 to 0.47, and maintains a steady upward trend or plateau distribution within several consecutive grid segments. This indicates that the pixel sets in these areas are relatively far from the main boundary and have weak circumferential compression, making them suitable for participating in the master-slave observation sequencing. The reprojection bias curve mostly remains at a low level, with some grid segments showing an increase. This corresponds to an increased offset between the local color gradient matching position of the overlapping viewpoint and the surface coordinate backprojection position; this offset will reduce the weight of the corresponding observation in boundary localization and internal evidence synthesis.
[0045] Furthermore, the compression of the pixel set along the circumferential direction is determined by the proportional relationship between the back projection widths of adjacent circumferential grids. When the back projection width of the current grid cell is continuously lower than the median width of the cross-sectional sampling band and close to the handle contour boundary, it is marked as a non-primary observation cell. Non-primary observation cells still calculate the cross-illumination preservation component and the illumination-varying component, but they are not used as a priority source when locating the boundary. When the same surface sampling cell has multiple viewpoint observations, the processing program sorts them according to the observation reliability, selects the observation with the highest ranking and complete illumination coverage as the primary observation, uses its color residual boundary to determine the defect contour, and the remaining observations are used as auxiliary observations to participate in the internal evidence synthesis. If the primary observation has channel truncation or local occlusion, the next observation that meets the usability condition is selected to replace it, and the reason for the unavailability of the original primary observation is retained.
[0046] In this embodiment, the observation reliability is also used to limit the handling of evidence conflicts in overlapping areas. When multiple observations give the same deviation direction to the same surface grid cell, the internal evidence is synthesized according to the weight after reliability normalization. When the deviation directions are opposite, it is first checked whether the components of each observation with illumination change show a reflection reversal relationship. Observations that belong to the source of reflection do not participate in the synthesis of material color evidence. If the remaining observations are still inconsistent, the conflict state is retained and delayed until the local coordinate correction is completed for verification. If a certain surface area is only covered by non-master observation cells, the area is not directly deleted. Instead, the master observation boundary of the adjacent vertical grid is used as a continuity constraint. Combined with the current area's own cross-illumination retention component, a defect boundary to be confirmed is formed to avoid the loss of detection data for the entire surface due to the viewpoint edge mark.
[0047] In another preferred embodiment, the construction of the normal coating reference includes: selecting a reference sampling set that spans adjacent longitudinal local segments, centered on the circumferential local zone where the sampling unit of the surface to be tested is located; initializing the color baseline with the channel median value of the illumination-preserving component in the reference sampling set; excluding abnormal sampling units based on the degree of deviation of each sampling unit from the color baseline and the amplitude of illumination variation; re-determining the color baseline using the retained sampling units and repeating the exclusion process until two consecutive retained sampling sets are consistent; and jointly determining the discrete distribution of the final color baseline and the retained sampling sets as the normal coating reference, binding the reference record to the local area coordinate range, and saving the grid unit identifiers and exclusion reasons involved in the reference construction.
[0048] Specifically, the reference sampling set takes the circumferential local zone where the grid cell to be detected is located as the main body, and simultaneously covers the current segment and its adjacent overlapping segments in the vertical direction. The set is selected without crossing the main contour breakpoint or the coordinate grid missing area. The sampling cells participating in the initialization need to have cross-illumination preservation components, complete surface coordinates and comparable color channels. The processing program calculates the median value of each color channel to form an initial color baseline, and then calculates the channel-by-channel absolute deviation of each sampling cell relative to the color baseline. After unifying the scale of each channel deviation according to the local discrete range, the comprehensive deviation order is obtained. At the same time, the median position of the absolute value of the component that changes with illumination is calculated. Sampling cells whose comprehensive deviation is located in the local high value area or whose illumination change amplitude is located in the local high value area are included in the exclusion set. The sampling cells that are not excluded constitute the next round of reference set.
[0049] In this embodiment, each update recalculates the channel-by-channel median and absolute deviation median using the currently retained sampling units. The exclusion boundary is determined by the upper quartile position and interquartile range of the current deviation distribution. Color deviation and illumination change form exclusion judgments respectively. When either judgment is satisfied, the corresponding reason is recorded. However, the excluded sampling units are not directly restored in subsequent rounds to prevent the color baseline from moving back and forth when the proportion of abnormal areas is high. The processing program compares the retained sampling unit identifier sets of two consecutive rounds. The update ends when the sets are completely consistent. If they are still inconsistent after reaching the configured iteration limit, the round with fewer changes in the retained set is selected as the result, and a non-converged state is added to the reference record. The non-converged reference is not used to directly delete abnormal evidence, but only to generate color residuals with lower confidence order.
[0050] Please refer to Figure 6 , Figure 6 The horizontal axis represents the sequence of surface mesh cells, derived from the sampling cell sequence expanded from the cumulative length of the handle's center trajectory and the circumferential local coordinates; the vertical axis represents the signed color residual and its neighborhood cumulative value, in normalized residual form. The solid black line represents the color residual contribution index, while the dashed gray line and the dotted gray line represent the first and second warning thresholds, respectively. Figure 6 It can be observed that the color residual contribution index of most grid cells is near or below the first cue threshold, indicating that the cross-illumination retention component in these areas is relatively close to the local normal coating reference, belonging to the coating color fluctuation within the normal discrete range. A spike exceeding the second cue threshold appears around grid cell sequence 52, followed by a higher continuous peak group around sequences 108 to 111, with a maximum reading of approximately 10.04. This indicates that there is a continuous material color deviation of the same sign in this section of the surface sampling cells, and it is not a single isolated noise point.
[0051] Furthermore, the final color baseline is used to describe the center response of the local normal coating, and the discrete distribution of the sample set is used to describe the local fluctuations allowed in each color channel. When the grid cell to be detected is located in multiple overlapping reference areas, the color baseline is synthesized according to its longitudinal and circumferential distances from the center of each reference area, and the discrete range is synthesized synchronously. References near the boundary of the local area will not undergo abrupt changes. If there are not enough available reference sampling cells in the current local band, adjacent reference areas with continuous coordinates and close coating color centers are selected along the longitudinal direction to supplement the references. The supplementation does not cross the formed defect area or the clamping and occlusion area. The supplementation source and distance weight are written into the reference record. When the local coordinate correction changes the grid correspondence, only the reference set of the affected area is recalculated, and the reference record that does not overlap with the correction area is not reconstructed.
[0052] In a preferred embodiment, for the high-brightness anomalous regions in the candidate evidence set, connected regions with positive deviations from the brightness baseline of the corresponding cross-sectional sampling band are extracted from the coating images corresponding to each illumination direction, and projected onto the normalized surface coordinate grid according to the correspondence; the center positions of each connected region are connected according to the arrangement order of the illumination directions to form a high-brightness migration trajectory; high-brightness anomalous regions whose center positions continuously migrate with the illumination direction and whose signs change accordingly are incorporated into the reflection anomalous evidence; regions whose projection positions under multiple illumination directions remain overlapping and whose cross-illumination retention components continuously deviate from the normal coating reference are retained in the candidate evidence set. The high-brightness regions, migration trajectories, and retained regions are all associated with the original illumination identifiers so that their illumination responses can be reverse-checked after fusion.
[0053] Specifically, the highlighted area of each illumination image is referenced to the brightness baseline of the cross-sampling band. The processing program calculates the positive deviation of each pixel within the main outline relative to the baseline, and uses the upper quantile position of the positive deviation distribution to form the highlight segmentation boundary of the current sampling band. Adjacent pixels that exceed the segmentation boundary and whose color channels are not completely truncated are merged into connected regions. After the connected regions are projected onto the curved coordinate grid, the longitudinal center, circumferential center, coverage area, and illumination direction are recorded. Connected regions that cross the outline boundary or the clamp occlusion area are clipped. The geometric center of the image before clipping is not directly used as the trajectory point, but the weighted center of the evidence in the clipped grid is used as the center position. Areas that are too small but abnormally overlap with the candidate color are still retained to prevent local bright spots of tiny bubbles or particles from being deleted before migration analysis.
[0054] In this embodiment, the high-brightness migration trajectory is connected to the center position according to the spatial arrangement of the illumination direction. The connected regions under adjacent illumination directions are matched by the degree of overlap of surface coordinates, longitudinal distance and circumferential distance. When there are multiple candidate connected regions, the matching branch with continuous coverage change and center displacement direction corresponding to the illumination switching direction is selected. The center position in the trajectory moves monotonically with the illumination direction or moves back and forth along the normal projection direction of the surface. When the sign difference of the same grid cell changes from positive to negative or from negative to positive, the trajectory is marked as a reflection migration trajectory. If the center position remains overlapping and only the brightness distribution inside the region changes under different illumination directions, the cross-illumination retention component is compared. When the retention component is within the normal color range, it is classified as reflection evidence. When the retention component continues to deviate, it is retained as coating anomaly.
[0055] Furthermore, for the wide and bright bands located in the bend section, multiple connected regions may be broken in the same illumination image due to curvature changes. The processing program connects the interval regions into composite bright regions based on the continuity of the circumferential coordinates and the direction of the difference in band sign, and then performs trajectory matching. In the case of real scratches superimposed with brightness, the reflection migration trajectory only removes the internal bright evidence that moves with the illumination, while the thin color deviation formed by the cross-illumination retention component is still retained. For local protrusions formed by surface bubbling or particles, the illumination switch will generate adjacent bright and dark areas. The processing program records the reversal order of the bright and dark areas under the relative illumination direction and writes it into the surface undulation response. It does not directly delete the entire candidate region because of the existence of bright trajectory, thus making the reflection screening act on the evidence component rather than eliminating the entire candidate region.
[0056] In another preferred embodiment, the fusion of defect regions includes: projecting the boundaries and internal evidence values that retain anomalous evidence under each imaging pose onto a normalized surface coordinate grid; synthesizing the internal evidence values pointing to the same grid cell according to the corresponding observation reliability, and selecting the boundary corresponding to the master observation when the boundary projections of different imaging poses are inconsistent; for adjacent anomalous grid cells, performing connectivity merging only when their deviation directions relative to the normal coating reference are consistent and their illumination-varying components have a corresponding relationship; generating defect regions based on the merged set of anomalous grid cells, and associating them with imaging pose identifiers that support the defect regions; the fusion record simultaneously saves the replaced boundaries and evidence conflict states for re-evaluation during the coordinate correction process.
[0057] Specifically, the boundary of anomalous evidence consists of the outer contour pixels of the candidate region from the current viewpoint. The processing program converts each boundary pixel into a grid boundary point according to the correspondence between pixel and surface coordinates. The color residual, cumulative value of the same sign, reflection superposition state, and illumination coverage integrity of the pixels inside the candidate region are converted into evidence inside the grid. When multiple pixels fall into the same grid cell from the same viewpoint, the median value of the color residual is used to represent material color evidence, and the median value of the sign difference sequence is used to represent illumination change evidence. When different viewpoints are projected onto the same grid cell, the source branch is retained to avoid directly taking the maximum value or average value before the observation reliability calculation is completed. The boundary points are sorted according to the vertical coordinate to form a directed boundary chain. The boundary chain that crosses the coordinate missing area remains disconnected.
[0058] In this embodiment, the internal evidence synthesis first normalizes the reliability of observations from each source to ensure that the sum of available observation weights in the same grid cell remains consistent. Then, the color residual and neighborhood cumulative value are synthesized according to the weights. The reflection superposition state is saved using the source union. Illumination change evidence is synthesized according to direction only when the direction identifiers correspond. Boundary projection consistency is determined by the nearest distance of the boundary chain in the longitudinal and circumferential coordinates. When the boundaries of different viewpoints are located in the same grid neighborhood, the reliability-weighted position is used to form the fusion boundary. When the boundary interval exceeds the current local grid scale, the main observation boundary is selected, and the internal evidence of auxiliary observations is restricted to the area enclosed by the main observation boundary. If the auxiliary observation shows continuous anomalies not covered by the main observation, they are retained as independent areas to be merged without forced pruning.
[0059] Furthermore, the connection merging of adjacent abnormal mesh cells simultaneously checks the correspondence between color deviation direction and illumination change. Material exposure candidates need to have consistent deviation signs in the main color channels, while surface undulation candidates need to have consistent light-dark reversal order under relative illumination direction. Mesh cells that meet the correspondence are connected according to longitudinal adjacency, circumferential adjacency, and oblique contact. Mesh cells with only oblique contact and lacking evidence in the middle mesh are not merged temporarily. When boundaries from different viewpoints form narrow gaps in the overlapping area, the connection graph can be added under the condition that the cross-illumination retention component of the gap mesh is consistent with the deviation direction of the two-sided region. After merging, the outer boundary and internal holes are extracted from the mesh set. If the internal holes correspond to reflection evidence, the hole state is retained. If they are only formed by the lack of viewpoint coverage, they are marked as areas to be corrected by coordinates.
[0060] In a preferred embodiment, grid cells that have formed defect regions are excluded from the overlapping regions of adjacent imaging poses, and the local color gradient maps corresponding to the remaining grid cells are segmented and matched to obtain matching point pairs with the same normalized surface coordinates but offset projection positions. With the longitudinal coordinates maintaining order and the circumferential local coordinates being continuous as constraints, a local coordinate correction field is generated based on the matching point pairs. The normalized surface coordinate grids of adjacent imaging poses are updated using the local coordinate correction field, the anomaly evidence is reprojected, and the observation reliability and defect region boundary are updated based on the corrected reprojection deviation. The correction process is limited to the overlapping regions that generate stable matching point pairs and does not change the original surface coordinate order of non-overlapping regions.
[0061] Specifically, the local color gradient map consists of color changes of the cross-illumination-preserving components in the longitudinal and circumferential neighborhoods. After excluding defect areas, reflection migration areas, contour compression areas, and response-deficient areas, the processor divides the remaining overlapping mesh into local blocks with overlapping edges. For local blocks with similar normalized surface coordinates in adjacent views, the gradient direction distribution, gradient intensity ranking, and local color center are compared to obtain candidate matching blocks. Then, matching point pairs are established within the candidate blocks according to the gradient inflection position. Matching point pairs need to satisfy the following conditions: consistent longitudinal order, continuous circumferential position change, and no excessive jump in the displacement direction of adjacent points. Point pairs that cannot meet the constraints are removed from the matching set. The projection offset of the remaining point pairs is recorded as the coordinate residual of the current overlapping area.
[0062] In this embodiment, the local coordinate correction field uses the coordinate residuals of the matching point pairs as control data. In the longitudinal direction, it performs segmented interpolation according to the cumulative length of the center trajectory. In the circumferential direction, it performs smooth propagation according to the continuity of local coordinates. Control points near the main contour boundary are given lower weights, while control points located in the middle of the visible surface and with high observation reliability are given higher weights. During the interpolation process, the corrected longitudinal coordinates are restricted to maintain their original order, and the boundaries of adjacent circumferential grids are restricted from intersecting. Local areas lacking matching point pairs use the smooth extension values of the surrounding control points. The extension range does not cross the position of curvature abrupt change in the center trajectory or the coordinate missing area. The generated correction field saves the longitudinal correction amount, circumferential correction amount, and control point support status of each grid cell.
[0063] Furthermore, the processing procedure updates the grid boundaries of adjacent viewpoints using the local coordinate correction field and re-executes pixel set backprojection, anomalous evidence projection, and boundary chain generation. Then, it calculates the corrected reprojection deviation. If the deviation distribution center decreases relative to the original state and the grid order constraint is satisfied, the current correction field is accepted and the observation reliability is updated. If the deviation does not decrease or grid boundary intersections occur, the correction of the corresponding local area is revoked and the original coordinates are retained. After accepting the correction, the internal evidence and holes to be corrected that were in conflict are rechecked, and the main observation boundary and auxiliary observation range are redefined. Coordinate correction only changes the viewpoint corresponding position of the same physical surface and does not change the cross-illumination preservation component, the illumination-varying component, or the original color response.
[0064] In a preferred embodiment, a material color deviation map and a surface undulation response map are generated for the fused defect area. The material color deviation map is composed of the signed deviation of the cross-illumination retention component relative to the normal coating reference, and the surface undulation response map is composed of the sign reversal relationship of the components with illumination change under different illumination directions. First, the defect area is divided into material exposure type or surface undulation type according to the distribution of the two types of responses in the defect area. Then, the uncoated area and scratch area are distinguished according to the skeleton continuity and width change of the material exposure area. The particle blistering area or sagging area is determined according to the closed boundary or directional extension boundary of the surface undulation area. The classification result, together with the surface coordinate boundary, the source image and the local reference record, are written into the detection result.
[0065] Specifically, the material color deviation map stores the signed residuals of each color channel relative to the normal coating reference within the defect area grid, and synthesizes the residuals from multiple perspectives according to the observation reliability. The processing program performs regional statistics on the residual direction to obtain the coverage of the continuous same-sign grid, the order of residual change from the boundary to the interior, and the continuity of the residual in the longitudinal and circumferential directions. The surface undulation response map stores the positive and negative differences and reversal order of each grid cell under the relative illumination direction, and forms local undulation response pairs with adjacent bright and dark areas, and records the arrangement direction, closure state, and extension state along the central trajectory direction of the response pairs. When the material color deviation covers the main body of the defect area and the undulation response only appears at the local edge, it enters the material exposure type branch. When the undulation response forms a group of bright and dark structures inside the area and the material color deviation is close to the local normal range, it enters the surface undulation type branch.
[0066] In this embodiment, the exposed material area is first refined by the mesh set to form a region skeleton. The skeleton nodes are connected according to the surface coordinates and short branches generated by the boundary jaggedness are removed. The processing program samples the region width perpendicular to the skeleton direction along the skeleton and records the median position, local changes and end contraction shape of the width sequence. When the skeleton is short and the region has continuous coverage in both the longitudinal and circumferential directions, or when the region shows a patchy color deviation with the same symbol, it is determined to be a missed coating area. When the skeleton extends continuously along the pipe direction or diagonally, the region width is relatively narrow and the ends gradually contract, it is determined to be a scratch area. The material color deviation direction is also checked against the color relationship between the qualified coating and the steel substrate. When the deviation direction cannot correspond to the substrate color, the material abnormality category is retained without forced subdivision.
[0067] Furthermore, the surface undulation region is processed based on the spatial structure of the light and dark response pairs. Candidate regions formed by particles or bubbles usually have closed or near-closed boundaries in the curved surface coordinates. When the lighting direction changes, the bright and dark areas undergo relative reversal within the closed boundary. The processing program determines the mesh set with the above structure as a particle-bubbling type region. The sag candidate forms a directional extension boundary along the local direction of the handle related to gravity. The region width changes continuously along the extension direction. The light and dark response pairs are repeated along the direction or form a gradient band. The processing program determines the mesh set that satisfies the correspondence between directional extension and response arrangement as a sag region. The undulation response that cannot satisfy the closed structure or directional extension structure is retained as an unclassified region. Its defect boundary and response record are still output without being deleted on the grounds of category uncertainty.
[0068] In another preferred embodiment, the detection process uses the workpiece record as a data container. After the pose-based image group is completed, the main body contour and initial surface mesh are generated. After the overlapping view group is completed, the cross-view correspondence is established. The response sequence of each surface sampling unit, normal coating reference, abnormal evidence, observation reliability, and fusion boundary are written to the same record layer by layer according to the processing status. When any layer finds image identifier conflict, coordinate order intersection, or reference set non-convergence, the status is registered in the corresponding local area and subsequent deletion operations are restricted. Unaffected surface areas are still allowed to continue to complete the detection. After local coordinate correction or auxiliary observation supplementation, the restricted area is reprocessed. The processing program only recalculates the data branches that have coordinate overlap with the status area, so that the original image, preprocessed image, and confirmed surface area remain unchanged.
[0069] In this embodiment, different handle shapes establish detection configurations through their respective workstation reference relationships, center trajectory coverage ranges, and viewpoint overlap configurations. The configuration only specifies the spatial correspondence order and surface coverage relationship between image identifiers, without pre-writing defect locations. At the start of processing, the center trajectory and cross-sectional sampling lines are recalculated based on the current main body contour. Local normal coating references are generated by the available surface sampling units of the current workpiece. When the entire handle has a large range of color deviations and it is difficult to obtain local references, the processing program reads the color center of the qualified reference record of the same batch as the initial baseline, but still uses the illumination change component of the current image to identify the reflection response and writes the batch reference source into the result. When the batch reference conflicts with the current local reference direction, abnormal evidence is retained, and the current observation is not covered by external references.
[0070] Specifically, the detection results consist of workpiece identification, surface coordinate defect boundary, evidence inside the defect area, defect category, source pose identification, source lighting identification, and processing status. The surface coordinate boundary can be back-projected onto each source image according to the correspondence, forming a verification mark consistent with the viewing angle in the original image. Only one surface area record is retained for the same defect in the overlapping area, and all supported observations are registered in the source list. Material color deviation map and surface undulation response map are retained for unclassified areas. Corresponding status is added for areas that have not converged or whose coordinate correction has been withdrawn. The whole piece judgment reads the surface area record according to the pre-configured defect category, area location, and boundary scale rules, without directly reading the number of candidates in a single image. It completes the closed-loop processing from multi-view multi-lighting image acquisition, unified surface expression, reflection evidence screening, defect fusion to result output.
Claims
1. A method for image recognition and detection of the coating on a lawnmower's steel handle, characterized in that, include: Acquire a group of images of the steel handle coating with pose and lighting markers according to the preset imaging pose and lighting direction; Based on the handle outline, workstation reference, and pose identifier in the image group, establish the correspondence between image pixels and normalized surface coordinates of the handle; The color response of the same surface sampling unit is registered as a response sequence according to the lighting identifier, and the cross-lighting hold component and the lighting variation component are extracted from the response sequence. Based on the deviation of the cross-illumination retention component relative to the local normal coating reference, abnormal evidence is generated. The abnormal evidence that the illumination-varying component changes in the same direction as the adjacent surface sampling unit is marked as reflection abnormal evidence and filtered out. The retained abnormal evidence is projected onto the normalized surface coordinate domain, fused to form a defect region, and the detection results are output.
2. The method for image recognition and detection of the coating of a lawnmower steel handle according to claim 1, characterized in that, The establishment of the correspondence includes: segmenting the handle outline in the coating image corresponding to each imaging pose, and extracting the continuous center trajectory along the extension direction of the tube body; A numbered transverse sampling line is set along the central trajectory, and the segment between the intersection of each transverse sampling line and the two side contours is normalized into circumferential local coordinates. The longitudinal coordinates are constructed based on the cumulative length of the central trajectory, and the origin and direction of the longitudinal coordinates are unified under different imaging poses using the work station reference. The longitudinal coordinates and the circumferential local coordinates are combined into a normalized surface coordinate grid, and the image pixel set corresponding to each grid cell is recorded.
3. The method for image recognition and detection of the coating of a lawnmower steel handle according to claim 1, characterized in that, The extraction of the cross-illumination retention component and the illumination-varying component includes: performing exposure normalization on the color response of the same surface sampling unit under different illumination directions, and using the channel-by-channel median value of the color response of each surface sampling unit within the cross-sectional sampling band as the color baseline to correct the overall brightness shift. The median response of each illumination response is obtained according to the color channel, and the median responses of each color channel are combined into the cross-illumination holding component. Calculate the signed difference of each illumination response relative to the median response, and connect the signed differences in the order of illumination direction to form the illumination-varying component.
4. The method for image recognition and detection of the coating of a lawnmower steel handle according to claim 2, characterized in that, The generation and screening of anomalous evidence includes: dividing the normalized surface coordinate grid into overlapping longitudinal local segments and circumferential local zones, and constructing a normal coating reference from surface sampling units with low amplitude of illumination variation in each local region; Calculate the color residual of the cross-illumination retention component relative to the normal coating reference, and combine the color residual with the cumulative values of the same sign in the longitudinal and circumferential adjacent surface sampling units to form the anomalous evidence; The abnormal evidence whose direction and sign of the change in the component with illumination variation are consistent with those of the adjacent surface sampling unit is marked as the reflection abnormal evidence and removed from the candidate evidence set.
5. The method for image recognition and detection of the coating of a lawnmower steel handle according to claim 2, characterized in that, An observation reliability is established for each grid cell in the normalized surface coordinate grid. The normalized distance from the pixel set corresponding to the grid cell to the handle contour boundary is taken as the positive term, and the reprojection deviation of the same grid cell between adjacent imaging poses is taken as the negative term. The observation reliability is synthesized according to the preset weights. Mesh cells that are close to the handle outline boundary and whose corresponding pixel set is compressed along the circumferential direction are marked as non-primary observation cells; When there are multiple imaging pose observations in the same surface sampling unit, the observation with high observation reliability is selected as the main observation, and the remaining valid observations and their corresponding observation reliability are retained as the basis for overlap fusion.
6. The method for image recognition and detection of the coating of a lawnmower steel handle according to claim 3, characterized in that, The construction of the normal coating reference includes: taking the circumferential local zone where the sampling unit of the surface to be detected is located as the center, and selecting a reference sampling set that spans adjacent longitudinal local sections; The color baseline is initialized with the channel median value of the cross-illumination hold-up component in the reference sampling set, and abnormal sampling units are excluded based on the degree of deviation of each sampling unit from the color baseline and the amplitude of illumination change. The color baseline is redefined using the retained sampling unit, and the exclusion process is repeated until two consecutive retained sampling sets are consistent. The final color baseline and the discrete distribution of the retained sample set are used together to determine the normal coating reference.
7. The method for image recognition and detection of the coating of a lawnmower steel handle according to claim 4, characterized in that, For the high-brightness abnormal regions in the candidate evidence set, the connected regions that deviate positively from the brightness baseline of the cross-sectional sampling band are extracted from the coating images corresponding to each illumination direction, and projected onto the normalized surface coordinate grid according to the correspondence. Connect the center positions of each connected area according to the order of the lighting direction to form a bright migration trajectory; The bright abnormal region whose center position continuously shifts with the direction of illumination and whose sign difference corresponds to a change in direction is incorporated into the evidence of reflection abnormality. Regions in which the projection positions under multiple illumination directions remain overlapping and the cross-illumination retention component continuously deviates from the normal coating reference are retained in the candidate evidence set.
8. The method for image recognition and detection of the coating of a lawnmower steel handle according to claim 7, characterized in that, The fusion of the defect region includes: projecting the boundary and internal evidence values of the retained abnormal evidence under each imaging pose onto the normalized surface coordinate grid. Internal evidence values pointing to the same grid cell are synthesized according to the corresponding observation reliability, and the boundary corresponding to the main observation is selected when the boundary projections of different imaging poses are inconsistent. For adjacent anomalous mesh cells, connectivity merging is performed only if their deviation directions relative to the normal coating reference are consistent and the illumination-dependent components have a corresponding relationship. The defect region is generated based on the merged set of abnormal mesh cells, and an imaging pose identifier supporting the defect region is associated with it.
9. A method for image recognition and detection of the coating of a lawnmower steel handle according to claim 5, characterized in that, In the overlapping region of adjacent imaging poses, the mesh cells that have formed defective regions are excluded, and the local color gradient maps corresponding to the remaining mesh cells are segmented and matched to obtain matching point pairs with the same normalized surface coordinates but offset projection positions. With the constraints of maintaining the order of the longitudinal coordinates and the continuity of the circumferential local coordinates, a local coordinate correction field is generated based on the matching point pairs; The normalized surface coordinate grid of adjacent imaging poses is updated using the local coordinate correction field, the anomalous evidence is reprojected, and the observation reliability and defect region boundary are updated based on the corrected reprojection deviation.
10. A method for image recognition and detection of the coating of a lawnmower steel handle according to claim 7, characterized in that, A material color deviation map and a surface undulation response map are generated for the fused defect area. The material color deviation map is composed of the signed deviation of the cross-illumination retention component relative to the normal coating reference, and the surface undulation response map is composed of the sign reversal relationship of the illumination-varying component under different illumination directions. First, based on the distribution of the two types of responses in the defect area, the defect area is divided into material exposure type or surface undulation type. Then, based on the skeleton continuity and width variation of the material exposure type area, the missing coating area and the scratch area are distinguished. Finally, based on the closed boundary or directional extension boundary of the surface undulation type area, the particle bubbling area or the sagging area is determined.
