Multi-scale visual calibration scheduling platform for exterior shell surface defects

By using a multi-scale visual calibration and scheduling platform, the scanning trajectory layout is dynamically adjusted and the fixture structure is transformed into spatial constraints, which solves the problem of fixture boundary interference and improves the detection efficiency and accuracy of surface defects on the outer shell.

CN123160474APending Publication Date: 2026-11-24SUZHOU DONG XIN METAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611317100.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing visual inspection technologies are easily affected by the fixture boundary and reflective features under fixture clamping conditions. Traditional fixed shielding methods will obscure the real defects at the edges, making it difficult to balance interference suppression and edge defect identification.

Method used

A multi-scale visual calibration and scheduling platform is adopted. Through multi-source data acquisition, boundary coverage scheduling, constraint injection multi-scale calibration, and decoupled judgment and write-back scheduling, a standardized detection state dataset is constructed, the scanning trajectory layout is dynamically adjusted, the fixture structure information is transformed into spatial constraints, the interference response is weakened, and the real defect texture is retained first.

Benefits of technology

It achieves coverage of the clamping edge area while reducing the influence of the fixture structure, improves the identifiability of weak defects, and triggers local resampling when necessary to improve detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160474A_ABST
    Figure CN123160474A_ABST
Patent Text Reader

Abstract

This invention discloses a multi-scale visual calibration scheduling platform for shell surface defects, relating to the field of shell image data processing technology. This multi-scale visual calibration scheduling platform for shell surface defects includes a multi-source data acquisition module, which collects and preprocesses structural geometric data, image observation data, and boundary feature data to construct a standardized detection state dataset; a boundary coverage scheduling module, which analyzes the visual disturbance diffusion range of the clamping boundary region and determines the coverage scanning range of the pressure plate boundary neighborhood; a constraint-injection multi-scale calibration module, which constructs a constraint-injection multi-scale calibration model and generates multi-scale feature results; and a decoupled judgment and write-back scheduling module, which evaluates the structural properties of candidate regions and processes and schedules candidate regions. This solves the problems of existing shell visual inspection being easily interfered with by fixture boundaries and reflective features under fixture clamping conditions, and the traditional fixed shielding method obscuring real edge defects, making it difficult to simultaneously achieve interference suppression and edge defect recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of shell image data processing technology, specifically a multi-scale visual calibration scheduling platform for shell surface defects. Background Technology

[0002] With the continuous development of industrial manufacturing automation and machine vision technology, vision-based surface defect detection technology has been widely applied in the quality inspection and defect identification stages of consumer electronics casings, precision structural components, and metal housing manufacturing processes. Current mainstream inspection methods typically construct a visual acquisition environment using industrial cameras, structured light sources, and multi-angle illumination devices to continuously acquire images of the casing surface. These images are then combined with image processing algorithms such as edge extraction, texture response analysis, and multi-scale feature calculation to identify surface scratches, dents, paint peeling, and burrs. To improve inspection stability, some inspection equipment also incorporates fixture clamping structures in the image acquisition stage to constrain the position and fix the orientation of the casing under test. A spatially continuous sequence of inspection images is acquired through trajectory scanning, forming a visual inspection data chain containing structural geometric information, pixel brightness information, and boundary contour information. This provides the image data foundation for subsequent defect identification and quality assessment.

[0003] For example, the invention patent with publication number CN119399189B relates to the field of image processing technology, and in particular to a method for detecting defects in an electric motor housing. The method includes the following steps: performing edge detection on an image of the housing surface to obtain each edge point of the housing surface image; obtaining the probability that each edge point of the housing surface image belongs to a defect edge and all pairs of pixels of each edge point in the housing surface image, thereby obtaining the corrected probability that each edge point of the housing surface image belongs to a defect edge; correcting the gradient value of each edge point according to the corrected probability that each edge point of the housing surface image belongs to a defect edge, obtaining the corrected gradient value of each edge point in the housing surface image, and thus obtaining a true edge detection image. This prior art can obtain accurate defect edges and avoids the influence of the inherent texture of the electric motor housing and the lighting edges.

[0004] For example, the invention patent with publication number CN116777916B relates to a defect detection method based on the metal casing of a pump, belonging to the field of image enhancement technology. It includes the following steps: acquiring a grayscale image of the pump's metal casing; acquiring the gradient saliency of each pixel block; acquiring the grayscale saliency of each pixel block; acquiring the comprehensive saliency of each pixel block based on its grayscale and gradient saliency; acquiring an enhanced image based on the enhanced grayscale value of each pixel; and determining whether the pump's metal casing has scratch defects based on the number of pixels detected in each enhanced edge line. This prior art combines the saliency of gradient and grayscale images to enhance the image, greatly increasing the efficiency of defect identification.

[0005] However, in actual production and inspection processes, the outer casing typically requires clamping and fixing via pressure plates, positioning blocks, and fastening structures. The boundaries of the fixture structure, the edges of the transparent pressure plates, and the reflective areas of the fasteners often create strong boundary responses and bright areas in the image, significantly interfering with multi-scale feature extraction. Existing visual inspection methods typically mask the fixture area by fixing a shielding region or cropping the image. However, while this method suppresses fixture interference, it easily obscures real defect areas near the clamping boundaries, making it difficult to effectively identify edge defects such as dents, paint chips, and burrs. Without shielding, the high-contrast boundary features generated by the fixture structure dominate gradient calculation and texture response, masking the true defect responses. Current visual inspection technology lacks a mechanism to transform the deterministic geometric information introduced by the fixture structure into spatial constraints during image feature extraction, making it difficult to achieve stable differentiation between fixture structure responses and outer casing defect responses while maintaining edge defect detection coverage.

[0006] To address the above issues, there is an urgent need for a multi-scale visual calibration and scheduling platform for surface defects in outer shells. Summary of the Invention

[0007] Technical problems to be solved

[0008] To address the shortcomings of existing technologies, this invention provides a multi-scale visual calibration and scheduling platform for shell surface defects. It solves the problems that existing shell visual inspection is easily interfered with by the fixture boundary and reflective features under fixture clamping conditions, and that traditional fixed shielding methods will obscure the real edge defects, making it difficult to balance interference suppression and edge defect identification.

[0009] Technical solution

[0010] To achieve the above objectives, this invention provides the following technical solution: a multi-scale visual calibration scheduling platform for shell surface defects, comprising a multi-source data acquisition module that acquires structural geometric data, image observation data, and boundary feature data during the visual inspection of the shell surface, preprocesses the structural geometric data, image observation data, and boundary feature data, and constructs a standardized inspection state dataset; a boundary coverage scheduling module that, based on the standardized inspection state dataset, performs width analysis on the visual disturbance diffusion range of the clamping boundary region from the brightness drift degree of the pressure plate boundary neighborhood and the stability of the boundary structure position, and determines the coverage scanning range of the pressure plate boundary neighborhood based on the width analysis results; a constraint-injected multi-scale calibration module that constructs a constraint-injected multi-scale calibration model using the width analysis results as input, transforms the fixture structure information into spatial constraints and applies them to the multi-scale feature extraction process, generating multi-scale feature results after constraint calibration from the sampled images; and a decoupling judgment and write-back scheduling module that, combined with the multi-scale feature results, performs response evaluation on the structural attributes of candidate regions, and executes the processing scheduling of candidate regions based on the response evaluation results.

[0011] Further, the specific steps for acquiring structural geometric data, image observation data, and boundary feature data during the visual inspection process of the outer shell surface are as follows: With the fixture unloaded, the visual acquisition device is activated to perform continuous image acquisition along the scanning trajectory of the detection area. A reference image of the fixture is formed by image stitching. The pressure plate contour is identified in the reference image, and the pressure plate boundary curve is extracted. The effective length of the pressure plate boundary is calculated by arc length integration on the pressure plate boundary curve. Structural geometric data is acquired, including extracting the contour point coordinates of the pressure plate contour boundary, extracting continuous boundary points on the contour boundary to form a contour layer, calculating the normal distance from the candidate position to the contour boundary of the pressure plate contour based on the contour layer boundary coordinates, and extracting the gradient direction distribution area of ​​the contour boundary neighborhood as a gradient band layer. Simultaneously, the reflective surface of the fastener is analyzed. The process involves: extracting the brightness center and brightness diffusion range of a region and generating a brightness kernel layer; acquiring image observation data, including a sequence of sampled images continuously acquired by a vision acquisition device along a scanning trajectory during production inspection, and recording the pixel brightness value of each frame; establishing a neighborhood window around a candidate position and averaging all pixel brightness values ​​within the neighborhood window to obtain the average brightness value of the neighboring pixels at the candidate position; acquiring boundary feature data, including identifying the positional change of the pressure plate contour in two adjacent frames of the sampled image sequence and calculating the boundary position change by calculating the difference in boundary coordinates of the pressure plate contour; simultaneously extracting the corresponding pixel brightness value in the neighborhood of the pressure plate contour and averaging the absolute values ​​of the difference in brightness between the neighboring pixels in two adjacent frames to obtain the brightness drift of the neighboring pixels.

[0012] Furthermore, the specific steps for preprocessing structural geometric data, image observation data, and boundary feature data to construct a standardized detection state dataset are as follows: All images are denoised using a Gaussian filtering algorithm, and the image brightness distribution is enhanced using a histogram equalization algorithm; outlier removal and boundary fitting are performed on the pressure plate contour boundary using a random sampling consistency algorithm, and curve smoothing is applied to the boundary point sequence. Simultaneously, the arc length accumulation is recalculated based on the boundary point sequence to update and correct the effective length of the pressure plate boundary, and direction consistency filtering is performed on the gradient direction distribution in the contour boundary neighborhood; the pressure plate contour is aligned between frames using an adjacent frame contour matching method in the detection sampling image sequence, and outlier removal is performed on the coordinate difference of the pressure plate contour boundary; all preprocessed data are normalized using a maximum / minimum value normalization algorithm to construct a standardized detection state dataset.

[0013] Furthermore, the specific steps for analyzing the width of the visual disturbance diffusion range of the clamping boundary region based on the standardized detection state dataset, considering the degree of brightness drift in the neighborhood of the pressure plate boundary and the stability of the boundary structure position, are as follows: multiply the effective length of the pressure plate boundary by the brightness drift in the neighborhood of the boundary to obtain the boundary disturbance expansion amount; add one to the boundary position change amount and use it as the denominator, and use the boundary disturbance expansion amount as the numerator to obtain the boundary diffusion base value; perform square root processing on the boundary diffusion base value to obtain the boundary coverage width value.

[0014] Further, the specific steps for determining the coverage scanning range of the pressure plate boundary neighborhood based on the width analysis results are as follows: Real-time comparison of the current boundary coverage width value with a coverage width threshold, where the coverage width threshold includes a first coverage threshold and a second coverage threshold; when the boundary coverage width value is less than or equal to the second coverage threshold, boundary coverage bands with a width equal to the boundary coverage width value are generated on both sides of the pressure plate contour, and a single continuous scanning trajectory is established along the pressure plate contour direction. Image acquisition is performed on the single continuous scanning trajectory at sampling intervals t, while simultaneously recording the corresponding image position coordinates and storing the acquired images. All acquired images are organized into a detection sampling image sequence according to the scanning trajectory order; when the boundary coverage width value is greater than the second coverage threshold and less than or equal to the first coverage threshold, boundary coverage bands with a width equal to the boundary coverage width value are generated on both sides of the pressure plate contour, and within the boundary coverage band... Two scanning trajectories parallel to the contour of the pressure plate are established, located in the inner and outer regions of the boundary coverage zone, respectively. Image acquisition is performed sequentially along the two scanning trajectories, and the images acquired by the two scanning trajectories are spatially stitched to generate boundary neighborhood image strips. The stitched image strips are organized into a detection sampling image sequence according to the scanning trajectory order. When the boundary coverage width value is greater than the first coverage threshold, boundary coverage zones with a width equal to the boundary coverage width value are generated on both sides of the pressure plate contour. Inside the boundary coverage zone, n scanning trajectories parallel to the pressure plate contour are established according to the boundary normal direction, with uniform spacing between each scanning trajectory. Image acquisition is performed sequentially along each scanning trajectory, and all acquired images are sequentially stitched to form a complete boundary coverage image region. All stitched images are organized into a detection sampling image sequence according to the image acquisition order.

[0015] Further, the specific steps for constructing the constraint-injected multi-scale calibration model using the width analysis results as input are as follows: A fixture suppression constraint field is established pixel-by-pixel in the detected sampled image sequence; the boundary normal direction is calculated using the pressure plate boundary curve provided by the contour layer; the arc length parameterization of the pressure plate boundary curve is performed to obtain the boundary tangential vector and the corresponding normal vector is calculated to generate the boundary normal direction field; the boundary neighborhood perturbation attenuation curve is calculated based on the gradient direction and gradient intensity distribution recorded in the gradient band layer; the normal distance from each pixel to the contour layer boundary is calculated in the boundary normal direction; a distance attenuation function is generated based on the gradient intensity change relationship in the gradient band layer; the brightness center position and brightness distribution range of the fastener reflective area are extracted in the brightness kernel layer; a mirror suppression kernel function is established at the brightness kernel center position; a brightness suppression distribution is generated by calculating the spatial distance from the pixel to the brightness kernel center position; the boundary normal direction field, perturbation attenuation function, and mirror suppression kernel function are combined pixel-by-pixel to obtain a fixture suppression constraint field covering the entire image space.

[0016] Further, the specific steps of converting the fixture structure information into spatial constraints and applying them to the multi-scale feature extraction process are as follows: In the detection sampling image sequence, a coarse-scale image, a medium-scale image, and a fine-scale image are generated using the Gaussian pyramid algorithm. Local texture gradient vectors are calculated on each scale image. The Sobel operator is used to calculate the gradient values ​​in the horizontal and vertical directions of the image, obtaining the gradient magnitude and gradient direction. The gradient magnitude obtained in the fine-scale image is recorded as the fine-scale gradient magnitude, and the gradient magnitude obtained in the coarse-scale image is recorded as the coarse-scale gradient magnitude. The angle between the gradient direction of each pixel and the boundary tangential direction is calculated using the boundary normal direction field. Texture responses with gradient directions consistent with the boundary tangential direction are retained. The edge responses with gradient directions consistent with the boundary normal direction are reduced according to the fixture suppression constraint field, generating a constrained multi-scale gradient response map. The gradient response maps corresponding to the coarse-scale image, the medium-scale image, and the fine-scale image are spatially aligned and combined to form a multi-scale feature body.

[0017] Further, the specific steps for generating constrained and calibrated multi-scale feature results from the sampled image are as follows: Read the gradient magnitude and corresponding gradient direction of each pixel at the coarse, medium, and fine scales in the multi-scale feature volume; perform a consistency comparison of the gradient magnitudes at different scales for the same pixel location; when the difference between the coarse-scale gradient magnitude and the fine-scale gradient magnitude is less than a scale threshold and the difference in gradient direction is less than a direction threshold, record the pixel location as a consistency response location; construct a candidate defect set based on the spatial connectivity of the consistency response locations, and mark and output each candidate region corresponding to the candidate defect set in the multi-scale feature volume.

[0018] Further, the specific steps for evaluating the structural attributes of candidate regions by combining multi-scale feature results are as follows: The fine-scale gradient energy value is obtained by squaring the fine-scale gradient magnitude of the candidate position in the fine-scale image; the coarse-scale gradient energy value is obtained by squaring the coarse-scale gradient magnitude of the candidate position in the coarse-scale image; the absolute value of the difference between the pixel brightness value of the candidate position in the current sampling frame and the pixel brightness value of the same position in the previous sampling frame is calculated to obtain the inter-frame brightness change; the absolute value of the difference between the pixel brightness value of the candidate position in the current sampling frame and the average brightness value of the neighboring pixels is calculated to obtain the neighborhood brightness deviation; the coarse-scale gradient energy value is added to the square of the contour boundary normal distance to obtain the spatial structure constraint; the neighborhood brightness deviation is added to one to obtain the brightness consistency constraint; the product of the fine-scale gradient energy value and the inter-frame brightness change is used as the numerator, and the product of the spatial structure constraint and the brightness consistency constraint is used as the denominator to obtain the response decoupling judgment value.

[0019] Further, the specific steps for processing and scheduling candidate regions based on the response evaluation results are as follows: Real-time comparison of the current response decoupling judgment value with the judgment threshold, where the judgment threshold includes a first judgment threshold and a second judgment threshold; when the response decoupling judgment value is less than or equal to the second judgment threshold, the corresponding candidate region is removed from the candidate defect set, and a fixture structure mark is recorded at the corresponding image location, while retaining the corresponding spatial coordinates; when the response decoupling judgment value is greater than the second judgment threshold and less than or equal to the first judgment threshold, the spatial coordinates of the corresponding candidate region are located within the boundary coverage band, a local resampling window is generated at the corresponding location based on the boundary coverage width value, and the resampling position, resampling scale, and resampling exposure group information are sent to the visual acquisition device, and appending is performed within the corresponding resampling window. Image acquisition is performed, and additional acquired images are added to the detection sampling image sequence. The updated detection sampling image sequence is used as input to re-execute the multi-scale image construction process, gradient response calculation process, and fixture constraint modulation process. The newly added image frames and the original image frames are uniformly calibrated, and the multi-scale gradient response results are regenerated. At the same time, the response decoupling judgment value is recalculated based on the regenerated multi-scale gradient response results, and the threshold judgment process is re-executed based on the new response decoupling judgment value. When the response decoupling judgment value is greater than the first judgment threshold, the corresponding candidate region is retained in the candidate defect set, and the image coordinate range and corresponding image frame number of the candidate region are recorded. At the same time, the candidate region image is cropped from the detection sampling image sequence and saved to the defect image record set.

[0020] Beneficial effects

[0021] The present invention has the following beneficial effects:

[0022] (1) The multi-scale visual calibration scheduling platform for shell surface defects forms an adaptive analysis result of the boundary coverage range by jointly analyzing the brightness drift degree of the neighborhood of the pressure plate boundary and the stability of the boundary structure position. Based on this, the scanning trajectory layout of the boundary area is dynamically adjusted, so that the visual acquisition process can reduce the influence of the fixture structure on the sampling path planning while ensuring the coverage of the clamping edge area.

[0023] (2) This multi-scale visual calibration scheduling platform for shell surface defects constructs a fixture constraint expression mechanism that includes boundary normal direction, disturbance attenuation relationship and mirror suppression relationship, and transforms fixture structure information into spatial constraints that participate in the image feature extraction process, so that the image processing process can weaken the interference response generated by the fixture structure while retaining the real defect texture information.

[0024] (3) This multi-scale visual calibration scheduling platform for shell surface defects filters the relationship between texture gradient direction and boundary direction in multi-scale image structure and adjusts the edge response in combination with fixture constraint relationship, so that the multi-scale feature extraction process can preferentially retain the texture response related to the workpiece structure, thereby improving the recognizability of the weak defect structure of the shell surface in the image.

[0025] (4) This multi-scale visual calibration scheduling platform for shell surface defects performs hierarchical processing scheduling on candidate regions based on response evaluation results, triggers local resampling and supplements image information when necessary, and clips and records stable defect regions, thereby improving the ability to identify potential defects in boundary regions while ensuring detection efficiency.

[0026] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0027] Figure 1 This is a structural diagram of the multi-scale visual calibration and scheduling platform for shell surface defects involved in this invention;

[0028] Figure 2 This is a schematic diagram of the multi-scale texture response coupling evolution under fixture constraint field modulation involved in this invention;

[0029] Figure 3 This is a distribution diagram of the response decoupling determination values ​​involved in this invention. Detailed Implementation

[0030] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0031] Please see Figures 1-3 This invention provides a technical solution: a multi-scale visual calibration scheduling platform for shell surface defects, such as... Figure 1The diagram shows the structure of the multi-scale visual calibration scheduling platform for shell surface defects provided in this application. It includes a multi-source data acquisition module, which acquires structural geometric data, image observation data, and boundary feature data during the visual inspection of the shell surface. The module preprocesses the structural geometric data, image observation data, and boundary feature data to construct a standardized inspection state dataset. A boundary coverage scheduling module, based on the standardized inspection state dataset, performs width analysis on the visual disturbance diffusion range of the clamping boundary region from the brightness drift degree of the pressure plate boundary neighborhood and the stability of the boundary structure position. Based on the width analysis results, it determines the coverage scanning range of the pressure plate boundary neighborhood. A constraint-injected multi-scale calibration module, using the width analysis results as input, constructs a constraint-injected multi-scale calibration model. It transforms the fixture structural information into spatial constraints and applies them to the multi-scale feature extraction process, generating multi-scale feature results from the sampled images after constraint calibration. A decoupling judgment and write-back scheduling module, combining the multi-scale feature results, performs response evaluation on the structural attributes of candidate regions and executes the processing scheduling of candidate regions based on the response evaluation results.

[0032] Specifically, the steps for collecting structural geometric data, image observation data, and boundary feature data during the visual inspection of the outer shell surface are as follows:

[0033] When the fixture is unloaded, the vision acquisition device is started to continuously acquire images of the detection area along the scanning trajectory. The images are stitched together to form a reference image of the fixture. The outline of the pressure plate is identified and the boundary curve of the pressure plate is extracted in the reference image of the fixture. After the vision acquisition device completes the camera calibration, a mapping relationship between the image pixel coordinate system and the actual spatial coordinate system is established. The pixel distance is converted into the actual spatial length through the pixel size calibration coefficient. Based on this coordinate relationship, the effective length of the pressure plate boundary is obtained by performing arc length integral calculation on the boundary curve. The arc length calculation process first completes the cumulative calculation of the arc length of discrete points of the boundary curve using pixel coordinates as the calculation unit, and then converts it into the corresponding actual length unit through the calibration coefficient. This ensures that the size of the scanning and resampling window generated based on the boundary width is consistent in spatial scale.

[0034] Structural geometric data is collected, including the extraction of contour point coordinates from the pressure plate contour boundary. Continuous boundary points are extracted from the contour boundary and arranged in arc length order to form a contour layer. This contour layer is a data set recording the geometric structure information of the pressure plate boundary. Each boundary point in the contour layer contains pixel coordinates, boundary tangential direction, boundary normal direction, and corresponding arc length index. Candidate position generation rules are established based on the contour layer boundary coordinates. Within the detection area, the image space is divided into grids according to a fixed grid spacing, and candidate positions are generated at the center of each grid. These candidate positions serve as the basis for subsequent texture observation and response determination. Based on the data recorded in the contour layer... The normal distance from the candidate position to the contour boundary of the pressure plate is calculated in the boundary normal direction. At the same time, the gradient distribution region of the boundary direction is extracted in the neighborhood of the pressure plate contour, and a gradient band layer is constructed according to the continuous distribution range of the gradient magnitude. The gradient band layer is used to record the gradient direction distribution structure of the neighborhood of the pressure plate boundary. Each pixel unit in the gradient band layer contains the gradient magnitude, gradient direction and corresponding spatial coordinates. In addition, the high-brightness reflection structure is identified in the reflective area of ​​the fastener. A bright kernel layer is constructed by extracting the brightness center position and the brightness attenuation range that spreads outward. The bright kernel layer is used to describe the spatial distribution characteristics of the specular reflection structure. The bright kernel layer records the brightness center coordinates, brightness peak and brightness diffusion radius.

[0035] Image observation data is collected, which includes the sequence of sampled images continuously acquired by the vision acquisition device according to the scanning trajectory during the production inspection process, and the pixel brightness value of each frame of the image is recorded; a neighborhood window is established around the candidate position, and the average brightness value of all pixels in the neighborhood window is calculated to obtain the average brightness value of the neighboring pixels of the candidate position, thereby forming observation data to characterize the local brightness distribution state of the candidate position.

[0036] Boundary feature data is collected, which includes identifying the positional change of the pressure plate contour in two adjacent frames in the detection sampling image sequence, and obtaining the boundary position change by calculating the boundary coordinate difference of the pressure plate contour. At the same time, the corresponding pixel brightness value is extracted in the neighborhood of the pressure plate contour, and the absolute value of the brightness difference of the boundary neighborhood pixels in two adjacent frames is calculated to obtain the brightness drift of the boundary neighborhood, thus forming boundary observation feature data to characterize the stability of the pressure plate boundary.

[0037] In this implementation scheme, a unified spatial reference relationship is established between the geometric information of the pressure plate structure and the image observation information before the detection begins. By establishing the geometric contour structure of the pressure plate boundary, the texture distribution characteristics of the boundary neighborhood, and the reflective structure distribution characteristics, and combining the calibration relationship between image pixel coordinates and actual spatial coordinates, basic structural data for describing the influence range of the fixture structure is formed. At the same time, continuous image observation data and boundary stability characteristics are obtained during the detection process, thereby providing a unified geometric reference and image observation data foundation for subsequent candidate position spatial relationship calculation, multi-scale texture response analysis, and response decoupling determination.

[0038] Specifically, the preprocessing of structural geometric data, image observation data, and boundary feature data to construct a standardized detection state dataset involves the following steps: denoising all images using a Gaussian filtering algorithm to reduce random noise interference during the acquisition process, and enhancing the image brightness distribution using a histogram equalization algorithm to expand the overall dynamic range of image brightness, thereby improving the recognizability of boundary structures and local texture changes in the image.

[0039] The random sampling consensus algorithm is used to perform outlier removal and boundary fitting on the pressure plate contour boundary to eliminate discrete error points that may occur during contour extraction. Curve smoothing is performed on the boundary point sequence to keep the boundary curve continuously changing in space. At the same time, the arc length accumulation calculation is re-performed based on the updated boundary point sequence to update and correct the effective length of the pressure plate boundary, thereby ensuring that the boundary geometric parameters are consistent with the actual contour structure. Furthermore, the gradient direction distribution in the contour boundary neighborhood is subjected to direction consistency screening to suppress abnormal gradient responses that are consistent with the boundary normal direction, thus keeping the gradient distribution structure in the boundary neighborhood stable.

[0040] In the detection sampling image sequence, the pressure plate contour is aligned between frames by the adjacent frame contour matching method, so that the images acquired at different times are consistent in the boundary space position. The outlier removal process is performed on the boundary coordinate difference of the pressure plate contour, thereby eliminating abnormal displacement data caused by acquisition jitter or local recognition error.

[0041] All preprocessed data are normalized using a maximum-minimum-maximum normalization algorithm to construct a standardized detection state dataset. This transforms all data participating in subsequent calculations into a dimensionless representation, ensuring that different types of data have a consistent scale within the same computational framework.

[0042] In this implementation scheme, the acquired image data, boundary structure data, and inter-frame observation data are subjected to unified preprocessing and scale standardization. By eliminating image noise, correcting boundary geometric errors, and completing inter-frame position alignment, the pressure plate contour structure, boundary neighborhood texture distribution, and image brightness information are kept stable and consistent. At the same time, through normalization processing, data from different sources are converted into a dimensionless data form with a unified scale, thereby forming standardized detection state data with consistent structure that can be directly used in calculations, providing a stable data foundation for subsequent multi-scale feature calculations and response determination.

[0043] Specifically, based on a standardized detection state dataset, the width analysis of the visual disturbance diffusion range in the clamping boundary region is performed by considering the degree of brightness drift in the neighborhood of the pressure plate boundary and the stability of the boundary structure position. The specific steps are as follows:

[0044] Multiplying the effective length of the pressure plate boundary with the brightness drift of the boundary neighborhood yields the boundary perturbation extension. The effective length of the pressure plate boundary characterizes the geometric extension range of the pressure plate structure in the image space, while the brightness drift of the boundary neighborhood reflects the intensity of brightness change in the neighborhood of the pressure plate boundary during continuous image acquisition. By multiplying the two, structural scale information and temporal brightness change information can be introduced simultaneously, so that the obtained boundary perturbation extension can characterize the comprehensive perturbation extension degree of the pressure plate boundary in both spatial range and brightness change dimensions.

[0045] The boundary diffusion baseline value is obtained by adding one to the boundary position change and using it as the denominator, and the boundary perturbation expansion as the numerator. The boundary position change describes the spatial displacement amplitude of the pressure plate contour between adjacent image frames. By dividing the boundary perturbation expansion by the boundary position change, the degree of boundary perturbation expansion can be corrected by motion constraints. This ensures that the diffusion trend is appropriately suppressed when the boundary position change is more obvious, thereby avoiding misjudgment of perturbation expansion caused by instantaneous boundary movement. Adding a constant one to the denominator avoids the denominator from reaching zero and maintains computational stability, so that the boundary diffusion baseline value can stably reflect the diffusion trend of brightness perturbation in the boundary neighborhood.

[0046] The boundary coverage width is obtained by taking the square root of the boundary diffusion basis value. The boundary diffusion basis value describes the diffusion intensity of the boundary neighborhood disturbance energy in the two-dimensional image space. The diffusion of disturbance in the image space usually exhibits an area-type diffusion relationship, that is, there is a square relationship between the diffusion energy and the spatial diffusion radius. Therefore, by performing a square root transformation on the boundary diffusion basis value, the diffusion intensity can be converted into the corresponding spatial diffusion scale, so that the calculation result can be directly expressed as the coverage width range of the boundary neighborhood disturbance in space, thus obtaining the boundary coverage width value.

[0047] During the calculation process, the effective length of the boundary, the brightness drift, and the change in the boundary position involved in the calculation have all been normalized in the data preprocessing stage, so that all variables involved in the calculation are dimensionless data, thereby ensuring the scale consistency of data from different sources in the same calculation framework and improving the stability of the calculation results.

[0048] The formula for calculating the boundary coverage width is:

[0049] ;

[0050] In the formula, It represents the effective length of the pressure plate boundary, which is used to characterize the spatial scale of the pressure plate boundary in the current detection area. It is an important geometric quantity that reflects the distribution range of the fixture structure in the image. It represents the brightness shift in the boundary neighborhood, used to quantify the degree of brightness change in the neighborhood of the pressure plate boundary in two adjacent frames of images. It is an observation indicator that reflects the strength of optical disturbance in the boundary region. It represents the change in boundary position and is used to quantify the degree of spatial offset of the pressure plate contour in two adjacent frames of images. It is an important structural indicator reflecting the stability of the fixture structure.

[0051] In this implementation scheme, the coverage scanning width of the clamping boundary area is calculated based on the visual disturbance state of the pressure plate boundary neighborhood and the stability state of the fixture structure. By jointly calculating the boundary spatial scale, the brightness change of the boundary neighborhood, and the positional change of the boundary structure, a boundary coverage width value that reflects the current detection risk range of the boundary area is obtained. This allows the visual inspection process to form an adaptive scanning range near the clamping boundary, thereby avoiding the omission of edge defects caused by fixed shielding areas, while preventing excessive expansion of the scanning range from affecting detection efficiency. The boundary coverage width calculation formula allows the detection area near the pressure plate boundary to be dynamically generated based on real-time observation data. This ensures that paint peeling, burrs, and dent defects distributed close to the clamping boundary are fully covered during the scanning process, while ensuring that areas outside the boundary are still scanned at the normal pace. This achieves a balance between high coverage of the boundary neighborhood and overall detection efficiency.

[0052] Specifically, the steps for determining the coverage scanning range of the pressure plate boundary neighborhood based on the width analysis results are as follows:

[0053] Real-time comparison of the current boundary coverage width value with the coverage width threshold, which includes a first coverage threshold and a second coverage threshold:

[0054] When the boundary coverage width value is less than or equal to the second coverage threshold, a boundary coverage band with a width equal to the boundary coverage width value is generated on both sides of the pressure plate contour, and a single continuous scanning trajectory is established along the pressure plate contour direction. Image acquisition is performed on the single continuous scanning trajectory at sampling interval t, and the corresponding image position coordinates are recorded and the acquired images are stored. All acquired images are organized into a detection sampling image sequence according to the scanning trajectory order.

[0055] When the boundary coverage width value is greater than the second coverage threshold and less than or equal to the first coverage threshold, a boundary coverage band with a width equal to the boundary coverage width value is generated on both sides of the pressure plate contour. Two scanning trajectories parallel to the pressure plate contour are established within the boundary coverage band. The two scanning trajectories are located in the inner and outer regions of the boundary coverage band, respectively. Image acquisition is performed sequentially along the two scanning trajectories, and the images acquired by the two scanning trajectories are spatially stitched to generate boundary neighborhood image strips. The stitched image strips are organized into a detection sampling image sequence according to the scanning trajectory order.

[0056] When the boundary coverage width value is greater than the first coverage threshold, boundary coverage bands with a width equal to the boundary coverage width value are generated on both sides of the pressure plate contour. Inside the boundary coverage bands, n scanning trajectories parallel to the pressure plate contour are established in the boundary normal direction, with uniform spacing between each scanning trajectory. Here, n represents the number of scanning trajectories established inside the boundary coverage band, and n is determined by the relationship between the boundary coverage width value and the scanning trajectory spacing. The number of scanning trajectories is calculated by dividing the boundary coverage width value by the scanning trajectory spacing and rounding it down, so that all scanning trajectories are uniformly distributed in the boundary normal direction inside the boundary coverage band. Image acquisition is performed sequentially along each scanning trajectory, and all acquired images are sequentially stitched together to form a complete boundary coverage image region. All stitched images are organized into a detection sampling image sequence according to the image acquisition order.

[0057] In this implementation scheme, the boundary region image acquisition trajectory is adaptively generated according to the change of boundary coverage width. By adjusting the number and distribution density of scanning trajectories, the visual acquisition range can completely cover the neighborhood area of ​​the pressure plate outline. Under different coverage width conditions, an image acquisition method matching the boundary spatial structure is formed, thereby improving acquisition efficiency while ensuring the integrity of the boundary neighborhood image coverage, and providing a continuous and orderly sequence of detection sampling images for subsequent defect candidate region analysis.

[0058] Specifically, the steps for constructing a constraint-injected multi-scale calibration model using the width analysis results as input are as follows:

[0059] In the sampled image sequence, a fixture suppression constraint field is established pixel by pixel. First, the sequence of discrete points of the pressure plate boundary recorded in the contour layer is read, and the boundary points are continuously sorted according to the arc length. The boundary curve is parameterized by arc length so that the boundary curve can be continuously represented by the arc length parameter. The change of tangential direction between adjacent discrete points on the boundary curve is calculated. The boundary tangential vector corresponding to each boundary point is obtained by difference. The unit normal vector perpendicular to the tangential vector is calculated, thereby generating a boundary normal direction field distributed along the pressure plate boundary in the image space. Then, the direction mapping relationship corresponding to the boundary normal direction field is established in the image pixel grid so that each pixel position can obtain the corresponding boundary normal direction.

[0060] Based on the gradient direction and gradient intensity distribution structure recorded in the gradient band layer, gradient perturbation analysis is performed on the neighborhood region of the pressure plate boundary. The shortest normal distance from each pixel to the contour layer boundary curve is calculated pixel by pixel in the boundary normal direction. Combined with the gradient intensity distribution relationship in the gradient band layer, the gradient change at different distance positions is statistically analyzed to generate a perturbation attenuation curve that changes along the boundary normal direction. In the image space, a distance attenuation function is constructed based on this perturbation attenuation curve, so that the pixel weight in the neighborhood region of the boundary exhibits a continuous attenuation distribution as the normal distance changes.

[0061] In the bright kernel layer, the brightness center coordinates and brightness diffusion range of the reflective area of ​​the fastener are read. A mirror suppression kernel function is established with the bright kernel center position as the center. The spatial distance from the pixel position to the bright kernel center position is calculated pixel by pixel in the image space. The distance relationship is normalized according to the brightness diffusion range to generate a brightness suppression distribution, so that the pixels near the reflective area obtain the corresponding suppression weights in the constraint calculation process.

[0062] Subsequently, the boundary normal direction field, distance attenuation function, and brightness suppression distribution are combined and calculated pixel by pixel in the image space, so that each pixel position corresponds to a comprehensive constraint weight value. By jointly calculating the direction constraint information, distance attenuation relationship, and reflection suppression relationship, a continuously distributed fixture suppression constraint field is formed in the entire detection image space, thereby providing spatial constraints for subsequent texture gradient response calculation, so as to suppress the interference of the pressure plate structure and fastener reflection on image features.

[0063] In this implementation scheme, a spatial constraint relationship describing the influence range of the fixture structure is established in the detection image space. By combining the geometric direction of the pressure plate boundary, the gradient perturbation change of the boundary neighborhood, and the reflective distribution characteristics of the fastener, a fixture suppression constraint distribution covering the entire image area is constructed. This allows the boundary structure and reflective area to obtain corresponding spatial suppression weights in the subsequent feature calculation process, thereby reducing the interference of the fixture structure on the image texture response and providing a stable spatial constraint basis for subsequent multi-scale feature extraction and defect response determination.

[0064] Specifically, the steps for transforming the fixture structure information into spatial constraints and applying them to the multi-scale feature extraction process are as follows: A multi-scale image structure is constructed in the sampled image sequence using the Gaussian pyramid algorithm. The original image is downsampled step-by-step according to a fixed scale ratio to generate coarse-scale, medium-scale, and fine-scale images. Gradient calculation is performed on the local pixel neighborhood in each scale image. The Sobel operator is used to calculate the gradient values ​​in the horizontal and vertical directions of the image, and the gradient magnitude and gradient direction of the corresponding pixel are calculated based on the horizontal and vertical gradient components. The gradient magnitude obtained in the fine-scale image is recorded as the fine-scale gradient magnitude, and the gradient magnitude obtained in the coarse-scale image is recorded as the coarse-scale gradient magnitude, thus obtaining the gradient distribution results describing the texture changes at different spatial scales.

[0065] After gradient calculation, the gradient direction of each pixel in the image space is calculated using the boundary normal direction field. The relationship between the texture structure and the boundary geometry is determined by calculating the angle between the pixel gradient direction and the tangential direction of the pressure plate boundary. When the gradient direction is consistent with the boundary tangential direction, the corresponding texture response is retained as a texture change extending along the boundary structure. When the gradient direction is consistent with the boundary normal direction, the corresponding response is regarded as an edge response that may be generated by the pressure plate boundary structure. In this case, a fixture suppression constraint field is introduced to suppress the gradient response. Each pixel position corresponds to a constraint field value C(x,y), and the gradient magnitude is adjusted according to the constraint field value, so that the gradient response is adjusted according to the weight function. For example, the edge response is attenuated by multiplying the original gradient magnitude by (1−C(x,y)), or the gradient magnitude is reweighted by constructing a weight function w(C(x,y)) based on the constraint field value. This reduces the edge response intensity consistent with the boundary normal direction in the boundary neighborhood while retaining the texture change structure consistent with the boundary tangential direction, thereby generating a constrained multi-scale gradient response map.

[0066] Subsequently, the gradient response maps corresponding to the coarse-scale, medium-scale, and fine-scale images are aligned according to the image space coordinates. The gradient responses at different scales are then combined within a unified coordinate framework to fuse the texture change information reflected at different scales. This results in a multi-scale feature body containing multi-scale texture response information in the image space, enabling fine-scale texture changes and coarse-scale structural changes to be expressed in a unified feature structure.

[0067] In this implementation scheme, gradient response features that reflect the relationship between local texture changes and structural boundaries are extracted in the multi-scale image space. A fixture suppression constraint mechanism is introduced during the gradient calculation process. By filtering the direction relationship and adjusting the constraint weight, the structural edge response consistent with the boundary normal direction is weakened, so that the structural interference generated by the pressure plate boundary is suppressed in the gradient features, while retaining the real texture change features extending along the boundary tangential direction. On this basis, the gradient responses in images of different scales are uniformly aligned and combined, so that the fine-scale texture change information and the coarse-scale structural change information are fused in the same feature expression, thereby forming a multi-scale feature body that can stably represent the texture structure features of the candidate region, providing a reliable feature basis for subsequent defect candidate region identification and response determination.

[0068] Specifically, the steps for generating constrained and calibrated multi-scale feature results from the sampled image are as follows: The gradient magnitude and corresponding gradient direction of each pixel in the coarse, medium, and fine scales are read in the multi-scale feature volume. A consistency comparison is performed on the gradient magnitudes of the same pixel at different scales. The difference between the coarse-scale and fine-scale gradient magnitudes, as well as the directional difference between the corresponding gradient directions, are calculated to determine whether the texture change remains stable at different scales. When the difference between the coarse-scale and fine-scale gradient magnitudes is less than the scale threshold and the gradient direction difference is less than the direction threshold, the pixel position is recorded as a consistent response position, thus forming a set of response pixels describing a stable texture change structure in the multi-scale feature volume.

[0069] After obtaining the set of consistent response locations, connectivity analysis is performed on the response pixels in the image space. The response pixels are aggregated into regions using neighborhood connectivity rules. The connectivity is established according to the eight-neighbor connectivity method, so that adjacent response pixels in the horizontal, vertical and diagonal directions can be classified into the same connected region. During the construction of connected regions, the pixel area and spatial extension length of each connected region are calculated, and minimum area constraints and minimum extension length constraints are set. When the area of ​​a connected region is less than the minimum area constraint or the extension length of a connected region is less than the minimum length constraint, the corresponding region is regarded as an isolated noise response and removed from the response set. Only stable connected regions that meet the area and length conditions are retained.

[0070] After completing the screening of connected regions, the remaining connected regions are defined as the candidate defect set. The spatial boundary range and center coordinates of each connected region in the candidate defect set are calculated. The corresponding regions are marked in the multi-scale feature volume, so that the candidate defect regions form clear spatial identifiers in the feature space, thereby providing a clear spatial location basis for subsequent candidate region response decoupling judgment and resampling scheduling.

[0071] like Figure 2 The diagram illustrates the coupled evolution of multi-scale texture response under fixture constraint field modulation, as provided in this application example. It employs a dual-graph linkage structure, combining three-dimensional surface representation with two-dimensional spatial projection to demonstrate the spatial distribution characteristics of multi-scale texture response and the formation process of the stable response region of defects under fixture structural constraints. The left side of the diagram shows the three-dimensional evolution of the multi-scale texture response, while the right side shows the distribution of the bottom projection region of the three-dimensional response surface. Both are used to illustrate the spatial mechanism by which the defect response and fixture structure response are separated through constraint modulation in a fixture structure interference environment. The left-hand diagram, representing the three-dimensional evolution of the multi-scale texture response, displays the spatial distribution of texture response intensity in image space in the form of a three-dimensional surface. The horizontal coordinate represents the spatial positional change along the tangential direction of the pressure plate boundary, the vertical coordinate represents the normal distance extending outward from the boundary, and the vertical coordinate represents the texture response intensity distribution formed under the action of multi-scale feature extraction and constraint modulation. A distinct response attenuation band can be observed near the zero normal position of the boundary in the image. This region corresponds to the suppression area of ​​the jig boundary on the image texture response. As the spatial position gradually moves away from the boundary direction, the texture response gradually recovers and forms a continuous response surface structure. Two obvious local peak structures can be observed in the middle of the surface. These peak structures correspond to the stable response region of the shell surface defects in the multi-scale texture response. Since the defect region produces consistent texture change characteristics at different scales, it still maintains a high response intensity after constraint modulation, thus appearing as a prominent response peak in the three-dimensional surface. The jig structure boundary is effectively weakened under constraint modulation, and its response decays rapidly along the normal direction, thus forming a smooth region on the surface. This surface structure can intuitively demonstrate the modulation effect of the jig constraint field on the multi-scale texture response distribution, that is, suppressing the jig structure response while preserving the stable response characteristics of the real defect.

[0072] The right-hand figure shows the distribution of the bottom projection area of ​​the three-dimensional response surface. By projecting the three-dimensional surface on the left along the direction of response intensity, the texture response distribution characteristics of different regions are displayed in a two-dimensional plane. In the figure, the horizontal axis still represents the spatial position along the tangential direction of the boundary, and the vertical axis represents the distance from the boundary normal. The base map uses a combination of contour lines and color distribution to represent the spatial variation trend of texture response. Darker areas represent areas with weaker texture response, and lighter areas represent areas with stronger texture response. There are two obvious high-response ring-shaped areas in the figure. These areas correspond to the peak position of the defect response in the three-dimensional surface and are marked as the defect stable response area. Since the defect produces continuous and stable texture changes in multi-scale feature analysis, this area appears as a local high-response cluster in the two-dimensional projection. The area located in the upper part of the image is marked as the ordinary texture transition area. The texture response change in this area is relatively gentle. It does not have obvious defect features and is not within the influence range of the fixture structure. Therefore, it presents a continuous transition distribution in space. The area near the boundary at the bottom of the image is marked as the fixture structure response area. This area corresponds to the position near the pressure plate boundary. Since the strong boundary features formed by the fixture structure are weakened during the constraint modulation process, its response intensity appears as a low-response area in the two-dimensional projection.

[0073] By combining the three-dimensional surface on the left and the two-dimensional projection on the right, the evolution of multi-scale texture response in space and the formation mechanism of defect response regions can be clearly demonstrated in the presence of a fixture structure. The three-dimensional surface is used to illustrate the overall trend of texture response in space after constraint modulation, while the two-dimensional projection is used to visually present the distribution relationship of different regions in space, thus reflecting the differences in space between fixture structure response, ordinary texture response, and stable defect response. The schematic diagram of the coupled evolution of multi-scale texture response under fixture constraint field modulation not only reflects the continuous change process of image texture response in space, but also visually demonstrates the stable response characteristics of defect regions in complex boundary environments, thus providing a direct basis for illustrating the technical effectiveness of the multi-scale visual calibration scheduling method in distinguishing between fixture structure response and shell defect response.

[0074] In this implementation example, spatial regions with stable texture change structures are identified in a multi-scale feature space. Stable response pixels are selected by comparing the consistency of gradient magnitude and gradient direction at different scales. The response pixels are then aggregated in the image space according to connectivity. Meanwhile, isolated noise responses are eliminated using area and extension length constraints, so that the final region can reflect the real local structural changes. This forms a candidate defect set with a clear spatial range, providing a reliable candidate region basis for subsequent response decoupling judgment and region resampling.

[0075] Specifically, the steps for evaluating the structural attributes of candidate regions by combining multi-scale feature results are as follows:

[0076] The fine-scale gradient energy value is obtained by squaring the fine-scale gradient magnitude of the candidate location in the fine-scale image. The fine-scale gradient magnitude is used to describe the intensity of edge changes produced by local texture structure at high resolution. Squaring the gradient magnitude can unify the direction-independent gradient changes into an energy expression form, so that the texture change location has a higher numerical response, thereby highlighting the contribution of the local structural change region in the calculation process.

[0077] The coarse-scale gradient energy value is obtained by squaring the coarse-scale gradient magnitude of the candidate position in the coarse-scale image. The coarse-scale gradient magnitude is used to describe the intensity of boundary changes at a larger structural scale. The gradient change is also converted into a structural energy expression through squaring, so that the coarse-scale structural boundary forms a stable structural strength representation in numerical terms, thereby providing a structural energy basis for subsequent spatial structural constraint calculation.

[0078] The absolute value of the difference between the pixel brightness value at the candidate position in the current sampling frame and the pixel brightness value at the same position in the previous sampling frame is calculated to obtain the inter-frame brightness change. The inter-frame brightness change is used to describe the degree of brightness change of the candidate position in the time dimension. The real defect area is usually accompanied by a stable texture structure and slight brightness change during continuous sampling, while the area caused by illumination disturbance or reflection change often shows a large brightness fluctuation. Therefore, by calculating the inter-frame brightness change, time dimension information can be introduced to distinguish between structural changes and illumination changes.

[0079] The absolute value of the difference between the pixel brightness value of the candidate position in the current sampling frame and the average brightness value of the neighboring pixels is calculated to obtain the neighborhood brightness deviation. The neighborhood brightness deviation is used to describe the degree of brightness deviation of the candidate position relative to the surrounding area. The reflective area is usually characterized by a brightness center that is significantly higher than the average brightness of the neighborhood. Therefore, by calculating the difference between the candidate position and the average brightness value of the neighboring pixels, the degree of brightness anomaly of the reflective structure in space can be characterized.

[0080] The spatial structure constraint is obtained by adding the coarse-scale gradient energy value to the square of the contour boundary normal distance. The coarse-scale gradient energy value is used to characterize the structural strength of the pressure plate boundary structure in the image, and the contour boundary normal distance is used to describe the spatial distance from the candidate position to the pressure plate boundary. By adding the two, structural strength information and spatial distance information can be introduced at the same time, so that the position close to the pressure plate boundary and with a strong structural gradient can obtain a larger value in the spatial structure constraint, thereby suppressing the edge response generated by the fixture structure in the subsequent calculation process.

[0081] The neighborhood brightness deviation is added to one to obtain the brightness consistency constraint. The neighborhood brightness deviation is used to characterize the degree of brightness difference between the candidate position and the surrounding area. By adding it to the constant one, a brightness consistency constraint can be formed while maintaining numerical stability. This makes the area with the larger brightness deviation stronger in subsequent calculations, thereby reducing the abnormal response caused by specular reflection or local illumination changes.

[0082] The product of the fine-scale gradient energy value and the inter-frame brightness change is used as the numerator, and the product of the spatial structure constraint and the brightness consistency constraint is used as the denominator to obtain the response decoupling judgment value. The numerator is used to highlight the joint characteristics of the real defect region in the two dimensions of texture abrupt change and temporal change through the product of the fine-scale gradient energy and the inter-frame brightness change, so that the region with obvious structural changes and accompanied by stable brightness changes obtains a higher numerical response. The denominator is used to introduce the influence of the fixture boundary structure and the influence of reflective brightness anomaly through the product of the spatial structure constraint and the brightness consistency constraint, so that the response near the pressure plate boundary or in the reflective area is suppressed in the calculation. Thus, a decoupling relationship is formed between the structural boundary influence, reflective brightness perturbation and real texture change in the overall calculation structure, so that the response decoupling judgment value can distinguish the texture change caused by the real defect and the interference response caused by the fixture structure or lighting change.

[0083] ;

[0084] In the formula, The response decoupling judgment value is used to quantify the degree of separation between the boundary gradient response and the brightness interference response in the candidate region. It is a judgment index characterizing the stability of the boundary response of the target region. It represents the gradient magnitude at a fine scale, used to quantify the intensity of local texture changes at candidate locations in fine-scale images, and is an important observation indicator reflecting subtle defect structures; It represents the magnitude of the coarse-scale gradient, which is used to quantify the structural edge strength of candidate locations in coarse-scale images and is an important observation indicator reflecting the boundary of stable structures. It represents the normal distance from the candidate position to the contour boundary of the pressure plate. It is used to quantify the spatial positional relationship between the candidate region and the fixture boundary and is an important spatial indicator for evaluating the degree of influence of the boundary structure. It represents the pixel brightness value of the candidate position in the current sampling frame, which is used to reflect the optical response intensity of the candidate region at the current moment and is an important observation for measuring changes in the time dimension; It represents the pixel brightness value at the same spatial location in the previous sampling frame. It is used to quantify the brightness change of the candidate region in consecutive sampling frames and is an important observation for measuring changes in the time dimension. It represents the average brightness of pixels in the neighborhood of a candidate location, used to describe the overall brightness distribution level within the local spatial range of the candidate region, and is an important observation indicator reflecting the consistency of local brightness.

[0085] In this implementation scheme, candidate region A... It is 2.85. It is 1.10. It is 0.55. It is 182. It is 165. It is 170;

[0086] Candidate region B It is 2.40. It is 1.45. It is 0.90. It is 176. It is 168. It is 171;

[0087] Candidate region C It is 3.10. It is 0.95. It is 0.48. It is 188. It is 160. It is 173;

[0088] Candidate region D It is 1.95. It is 1.70. It is 1.25. It is 172. It is 169. It is 170;

[0089] Candidate region E It is 2.65. It is 1.20. It is 0.72. It is 180. It is 166. It is 174;

[0090] Candidate region F It is 3.25. It is 1.05. It is 0.40. It is 191. It is 158. It is 176;

[0091] Candidate region G It is 2.15. It is 1.55. It is 1.10. It is 174. It is 170. It is 172;

[0092] Candidate region H It is 2.95. It is 1.00. It is 0.52. It is 186. It is 162. It is 175;

[0093] Candidate region I It is 2.30. It is 1.35. It is 0.88. It is 178. The values ​​are 167 for I and 172 for the candidate region J; Gs is 3.05, Gm is 0.92, D is 0.46, It is 189, and It−1 is 159. The value is 174. Calculate the response decoupling decision value for each subsequent region, as shown in Table 1, the response decoupling decision value data table.

[0094] Table 1 Response Decoupling Judgment Value Data Table

[0095]

[0096] like Figure 3 As shown in Table 1, this is a distribution diagram of the response decoupling decision values ​​provided in this application example. Figure 3It can be seen that the response decoupling judgment value of candidate region F is 2.9045, the highest among all candidate regions. This indicates that this region has a relatively obvious structural response in terms of fine-scale gradient changes and continuous frame brightness changes, while the influence of coarse-scale structural boundaries is weak, thus forming relatively stable defect response features. The response decoupling judgment value of candidate region D is 0.6174, the lowest among all candidate regions. This indicates that this region is relatively smooth in terms of fine-scale texture changes and temporal brightness changes, while the constraint effect of coarse-scale structural boundaries is relatively obvious, thus not forming a significant independent response structure. The distribution map of response decoupling judgment values ​​provides a more intuitive observation of the overall distribution of response decoupling judgment values ​​for each candidate region. The distribution map uses candidate regions as the vertical classification dimension and response decoupling judgment values ​​as the horizontal numerical dimension, reflecting the magnitude relationship of the judgment results for each region through the changes in the length of the bars. As shown in the figure, the bar lengths of candidate regions F and J are significantly longer than those of other candidate regions, forming the most significant response peak regions. Candidate regions C and H follow closely behind, forming the second-level response regions. Candidate regions A and E are in the medium response range, with moderate bar lengths. Candidate regions B, I, and G gradually decrease in response length. Candidate region D has the shortest bar length, forming the lowest response position in the overall distribution. The distribution of response decoupling judgment values ​​shows a gradually decreasing trend from high to low. The differences in response decoupling judgment values ​​between different candidate regions are significant. The changes in bar length clearly reflect the relationship between the response strength of each candidate region under the conditions of multi-scale structural changes and temporal brightness changes, thus providing intuitive data for subsequent candidate region screening and defect response judgment.

[0097] Specifically, the steps for processing and scheduling candidate regions based on the response evaluation results are as follows: Real-time comparison of the current response decoupling judgment value with the judgment threshold, whereby the judgment threshold includes a first judgment threshold and a second judgment threshold.

[0098] When the response decoupling judgment value is less than or equal to the second judgment threshold, the corresponding candidate region is removed from the candidate defect set, and the jig structure mark is recorded at the corresponding image position. At the same time, the corresponding spatial coordinates are retained so that the position can be used as a constraint reference for the jig structure region in the subsequent image analysis process.

[0099] When the response decoupling judgment value is greater than the second judgment threshold and less than or equal to the first judgment threshold, the spatial coordinates of the corresponding candidate region are located within the boundary coverage band. A local resampling window is generated at the corresponding position based on the boundary coverage width value, and the resampling position is determined based on the center coordinates of the candidate region. The resampling scale is determined based on the scale level of the candidate region in the multi-scale feature volume and the spatial range of the candidate region. The resampling scale corresponds to the region size of the image acquisition window, i.e., the size of the resampling ROI or the sampling range corresponding to the image pyramid level. At the same time, resampling exposure group information is generated. The resampling exposure group consists of multiple sets of exposure parameters. Each set of exposure parameters includes different combinations of exposure time and image gain, which are used to obtain complete texture information under different brightness conditions, thereby forming a multi-exposure image acquisition combination. Subsequently, the resampling position, resampling scale, and resampling exposure group information are sent to the visual acquisition device. Additional image acquisition is performed within the corresponding resampling window, enabling the candidate region to obtain higher-density image observation data within a local spatial range. Simultaneously, the additional acquired image is added to the detection sampling image sequence. Using the updated detection sampling image sequence as input, the multi-scale image construction process, gradient response calculation process, and fixture constraint modulation process are re-executed. The newly added image frames and the original image frames are uniformly calibrated, and the multi-scale gradient response results are regenerated. At the same time, the response decoupling judgment value is recalculated based on the regenerated multi-scale gradient response results, and the threshold judgment process is re-executed based on the new response decoupling judgment value, so that the candidate region is re-evaluated after additional sampling.

[0100] When the response decoupling judgment value is greater than the first judgment threshold, the corresponding candidate region is retained in the candidate defect set, and the image coordinate range and corresponding image frame number of the candidate region are recorded. At the same time, the candidate region image is cropped from the detection sampling image sequence and saved to the defect image record set for subsequent defect identification recording and result output.

[0101] In this implementation scheme, candidate regions are processed and scheduled in a hierarchical manner based on the response decoupling determination results. By dividing the candidate regions into structural interference regions, regions to be verified, and stable defect regions, the detection process can take corresponding processing methods according to different response states. When the response level is low, the region is structurally marked to reduce the interference effect. When the response is in the middle range, local resampling is triggered to obtain higher quality image information and the feature calculation and determination process is re-executed. When the response level is high, the region is directly retained and the defect image is output, thereby forming a closed-loop evaluation mechanism that includes resampling verification and re-determination process, making the candidate region determination results more stable and reliable.

[0102] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0103] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A multi-scale visual calibration and scheduling platform for shell surface defects, characterized in that: include: The multi-source data acquisition module collects structural geometric data, image observation data, and boundary feature data during the visual inspection of the outer shell surface. It preprocesses the structural geometric data, image observation data, and boundary feature data to construct a standardized inspection status dataset. The boundary coverage scheduling module, based on a standardized detection state dataset, performs width analysis on the visual disturbance diffusion range of the clamping boundary region from the degree of brightness drift in the neighborhood of the pressure plate boundary and the stability of the boundary structure position, and determines the coverage scanning range of the neighborhood of the pressure plate boundary based on the width analysis results. The constraint-injected multi-scale calibration module uses the width analysis results as input to construct a constraint-injected multi-scale calibration model, transforms the fixture structure information into spatial constraints and applies them to the multi-scale feature extraction process, and generates multi-scale feature results that have undergone constraint calibration from the sampled image; The decoupled decision and write-back scheduling module combines multi-scale feature results to evaluate the structural attributes of candidate regions and executes the processing scheduling of candidate regions based on the evaluation results.

2. The multi-scale visual calibration scheduling platform for shell surface defects according to claim 1, characterized in that: The specific steps for acquiring structural geometric data, image observation data, and boundary feature data during the visual inspection process of the outer shell surface are as follows: Continuous image acquisition is performed on the detection area along the scanning trajectory. The reference image of the fixture is formed by image stitching, the contour of the pressure plate is identified, and the boundary curve of the pressure plate is extracted. The effective length of the pressure plate boundary is obtained by performing arc length integral on the boundary curve of the pressure plate. Structural geometric data is collected, including extracting the coordinates of contour points on the contour boundary of the pressure plate, extracting continuous boundary points on the contour boundary to form a contour layer, calculating the normal distance from the candidate position to the contour boundary of the pressure plate based on the boundary coordinates of the contour layer, extracting the gradient direction distribution area in the neighborhood of the contour boundary as a gradient band layer, and extracting the brightness center and brightness diffusion range in the reflective area of ​​the fastener to generate a bright core layer. Image observation data is collected, including the sequence of sampled images and the pixel brightness value of each frame of the image is recorded. A neighborhood window is established around the candidate position, and the average brightness value of all pixels within the neighborhood window is calculated to obtain the average brightness value of the neighboring pixels of the candidate position. Boundary feature data is collected, including the positional change of the pressure plate contour in two adjacent frames. The difference in boundary coordinates of the pressure plate contour is calculated to obtain the change in boundary position. At the same time, the brightness value of the corresponding pixel is extracted in the neighborhood of the pressure plate contour. The absolute value of the brightness difference of the pixels in the neighborhood of the boundary is calculated to obtain the brightness drift of the boundary neighborhood.

3. The multi-scale visual calibration scheduling platform for shell surface defects according to claim 1, characterized in that: The specific steps for preprocessing structural geometric data, image observation data, and boundary feature data to construct a standardized detection state dataset are as follows: The entire image is denoised and the brightness distribution is enhanced. The pressure plate contour boundary is subjected to outlier removal and boundary fitting, and the boundary point sequence is smoothed. At the same time, the arc length accumulation is recalculated based on the boundary point sequence to update and correct the effective length of the pressure plate boundary. The gradient direction distribution in the neighborhood of the contour boundary is screened for direction consistency. In the detected sampled image sequence, the pressure plate contour is aligned between frames, and outlier removal is performed on the coordinate difference of the pressure plate contour boundary. Normalization is performed on all preprocessed data to construct a standardized detection status dataset.

4. The multi-scale visual calibration scheduling platform for shell surface defects according to claim 2, characterized in that: The specific steps for analyzing the width of the visual disturbance diffusion range in the clamping boundary region based on the standardized detection state dataset, considering the brightness drift degree in the neighborhood of the pressure plate boundary and the stability of the boundary structure position, are as follows: Multiply the effective length of the pressure plate boundary by the brightness drift of the boundary neighborhood to obtain the boundary perturbation expansion amount; Add one to the change in boundary position and use it as the denominator, and use the expansion of boundary perturbation as the numerator to obtain the boundary diffusion base value. The boundary coverage width is obtained by taking the square root of the boundary diffusion base value.

5. The multi-scale visual calibration scheduling platform for shell surface defects according to claim 1, characterized in that: The specific steps for determining the neighborhood coverage scanning range of the pressure plate boundary based on the width analysis results are as follows: Real-time comparison of the current boundary coverage width value with the coverage width threshold, which includes a first coverage threshold and a second coverage threshold; Boundary coverage bands are generated on both sides of the pressure plate contour. When the boundary coverage width value is less than or equal to the second coverage threshold, a single continuous scanning trajectory is established within the boundary coverage band and image acquisition is performed according to the sampling interval t. At the same time, the corresponding image position coordinates are recorded and the acquired images are stored. All acquired images are organized into a detection sampling image sequence according to the scanning trajectory order. When the boundary coverage width value is greater than the second coverage threshold and less than or equal to the first coverage threshold, two scanning trajectories are established within the boundary coverage band. Image acquisition is performed sequentially along the two scanning trajectories, and the images acquired by the two scanning trajectories are spatially stitched to generate boundary neighborhood image strips. The stitched image strips are organized into a detection sampling image sequence according to the scanning trajectory order. When the boundary coverage width is greater than the first coverage threshold, n scanning trajectories are established within the boundary coverage band. Image acquisition is performed sequentially along each scanning trajectory, and all acquired images are sequentially stitched together to form a complete boundary coverage image region. All stitched images are organized into a detection sampling image sequence according to the image acquisition order.

6. The multi-scale visual calibration scheduling platform for shell surface defects according to claim 1, characterized in that: The specific steps for constructing a constraint-injected multi-scale calibration model using the width analysis results as input are as follows: In the sampled image sequence, a jig suppression constraint field is established pixel by pixel. The boundary normal direction is calculated using the pressure plate boundary curve provided by the contour layer. The arc length of the pressure plate boundary curve is parameterized to obtain the boundary tangential vector and the corresponding normal vector, generating the boundary normal direction field. The boundary neighborhood perturbation attenuation curve is calculated based on the gradient direction and gradient intensity distribution recorded in the gradient band layer. The normal distance from each pixel to the boundary of the contour layer is calculated in the boundary normal direction. The distance attenuation function is generated based on the gradient intensity change relationship in the gradient band layer. The brightness center position and brightness distribution range of the fastener reflective area are extracted in the brightness kernel layer. A specular suppression kernel function is established at the brightness kernel center position. The brightness suppression distribution is generated by calculating the spatial distance from the pixel to the brightness kernel center position. The boundary normal direction field, perturbation attenuation function and specular suppression kernel function are combined pixel by pixel to obtain the jig suppression constraint field covering the entire image space.

7. The multi-scale visual calibration scheduling platform for shell surface defects according to claim 1, characterized in that: The specific steps for converting the fixture structural information into spatial constraints and applying them to the multi-scale feature extraction process are as follows: In the detected sampled image sequence, coarse-scale, medium-scale, and fine-scale images are generated using the Gaussian pyramid algorithm. Local texture gradient vectors are calculated on each scale image, and the gradient values ​​in the horizontal and vertical directions are calculated using the Sobel operator to obtain the gradient magnitude and gradient direction. The gradient magnitude obtained in the fine-scale image is recorded as the fine-scale gradient magnitude, and the gradient magnitude obtained in the coarse-scale image is recorded as the coarse-scale gradient magnitude. The angle between the gradient direction of each pixel and the boundary tangential direction is calculated using the boundary normal direction field. Texture responses with gradient directions consistent with boundary tangential directions are preserved, and edge responses with gradient directions consistent with boundary normal directions are reduced according to the fixture suppression constraint field, generating constrained multi-scale gradient response maps. The gradient response maps corresponding to the coarse-scale, medium-scale, and fine-scale images are spatially aligned and combined to form a multi-scale feature body.

8. The multi-scale visual calibration scheduling platform for shell surface defects according to claim 7, characterized in that: The specific steps for generating constrained and calibrated multi-scale feature results from the sampled image are as follows: In the multi-scale feature volume, the gradient magnitude and corresponding gradient direction of each pixel in the coarse, medium and fine scales are read. The gradient magnitude of the same pixel position at different scales is compared for consistency. When the difference between the gradient magnitude of the coarse scale and the gradient magnitude of the fine scale is less than the scale threshold and the difference in gradient direction is less than the direction threshold, the pixel position is recorded as the consistency response position. A candidate defect set is constructed based on the spatial connectivity of the consistent response locations, and each candidate region corresponding to the candidate defect set is labeled and output in a multi-scale feature volume.

9. The multi-scale visual calibration scheduling platform for shell surface defects according to claim 1, characterized in that: The specific steps for evaluating the structural attributes of candidate regions by combining multi-scale feature results are as follows: The fine-scale gradient energy value is obtained by squaring the fine-scale gradient magnitude of the candidate location in the fine-scale image. The coarse-scale gradient energy value is obtained by squaring the coarse-scale gradient magnitude of the candidate location in the coarse-scale image. Calculate the absolute value of the difference between the pixel brightness value at the candidate position in the current sampling frame and the pixel brightness value at the same position in the previous sampling frame to obtain the inter-frame brightness change. Calculate the absolute value of the difference between the pixel brightness value at the candidate position in the current sampling frame and the average brightness value of the neighboring pixels to obtain the neighborhood brightness deviation. The spatial structure constraint is obtained by adding the coarse-scale gradient energy value to the square of the normal distance of the contour boundary. Add the neighborhood brightness deviation to one to obtain the brightness consistency constraint. The product of the fine-scale gradient energy value and the inter-frame brightness change is used as the numerator, and the product of the spatial structure constraint and the brightness consistency constraint is used as the denominator to obtain the response decoupling judgment value.

10. The multi-scale visual calibration scheduling platform for shell surface defects according to claim 1, characterized in that: The specific steps for processing and scheduling candidate regions based on response evaluation results are as follows: The current response decoupling judgment value is compared with the judgment threshold in real time. The judgment threshold includes a first judgment threshold and a second judgment threshold. When the response decoupling judgment value is less than or equal to the second judgment threshold, the corresponding candidate region is removed from the candidate defect set and the fixture structure mark is recorded. When the response decoupling judgment value is greater than the second judgment threshold and less than or equal to the first judgment threshold, the spatial coordinates of the corresponding candidate region are located within the boundary coverage zone and a local resampling window is generated. The resampling parameters are sent to the visual acquisition device and additional image acquisition is performed. The additional acquired image is added to the detection sampling image sequence. Based on the updated detection sampling image sequence, multi-scale image construction, gradient response calculation and fixture constraint modulation processing are re-executed. The newly added image frame and the original image frame are uniformly calibrated and multi-scale gradient response results are regenerated. Based on the regenerated multi-scale gradient response results, the response decoupling judgment value is calculated again and the threshold judgment process is re-executed. When the response decoupling judgment value is greater than the first judgment threshold, the corresponding candidate region is retained in the candidate defect set, and the image coordinate range and corresponding image frame number are recorded. At the same time, the candidate region image is cropped from the detection sampling image sequence and saved to the defect image record set.

Citation Information

Patent Citations

  • Defect Detection Method Based on Pump Metal Casing

    CN116777916B

  • A method for detecting defects in motor housing

    CN119399189B