Surface defect detection method and system based on curved surface coding and multi-view fusion

By using a detection method that combines curved surface coding illumination with multi-view fusion, the problems of blind spots and insufficient accuracy in detecting surface defects of complex workpieces are solved. This method enables high-precision detection of irregular reflective surfaces, has strong adaptability, and provides reliable detection results.

CN121027154AActive Publication Date: 2025-11-28RONGCHEER IND TECH (SUZHOU) CO LTD

Patent Information

Application Number
CN202511560808.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2025-11-28
Estimated Expiration
2045-10-29

AI Technical Summary

Technical Problem

Existing surface defect detection methods are ill-suited to the irregular curved surfaces of complex workpieces, resulting in blind spots, insufficient detection accuracy, inability to effectively distinguish between surface and subsurface defects, and lack of precise quantification of the three-dimensional geometric parameters of defects, thus failing to meet the detection requirements of high-precision manufacturing scenarios.

Method used

A detection method based on surface coding and multi-view fusion is adopted. By constructing a surface coding illumination system to generate a coded light field, multi-view imaging device is used to collect multi-dimensional view image data, light components are separated and defect features are extracted, and the defect detection results are output by combining multi-view information.

Benefits of technology

It achieves accurate detection of targets with high curvature and multiple reflection characteristics, improves detection accuracy and robustness, has strong adaptability, can dynamically adapt to irregular reflective surfaces, eliminate viewing angle differences and noise interference, and provide traceable detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121027154A_ABST
    Figure CN121027154A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of machine vision detection, in particular to a surface defect detection method and system based on curved surface coding and multi-view fusion, and the method comprises the steps: constructing a curved surface coding illumination system, generating a coding light field, and projecting the coding light field to a target surface; synchronously acquiring reflection images of the coded light field through a multi-view imaging device, and obtaining a multi-dimensional view image data set; separating light components from the multi-dimensional view image data set, and extracting a defect feature set; performing multi-view information integration on the defect feature set to obtain comprehensive defect features; and performing defect judgment and parameter calculation on the target surface based on the comprehensive defect characteristics, and outputting a defect detection result. By adopting curved surface coding illumination and multi-view fusion, gradient information carried by a coding light field and multi-view imaging to supplement space details, accurate detection of surface and subsurface defects is realized, the adaptability to high-curvature and multi-reflection characteristic targets is improved, and the problem of insufficient detection precision of irregular reflective surface defects is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of machine vision detection, in particular to a surface defect detection method and system based on curved surface coding and multi-view fusion. BACKGROUND

[0002] In the fields of precision manufacturing, aerospace, etc., the surface defects of workpieces are directly related to product performance and service safety. However, complex workpieces often have irregular curved surface shapes, and defects exist in multiple types on the surface and subsurface, with fine features, which brings great challenges to accurate surface defect detection.

[0003] In the existing surface defect detection methods, single-view imaging is easy to miss defects due to the visual angle blind area; traditional coded light field detection relies on fixed patterns and is difficult to dynamically adapt to curved surface shapes, resulting in coding information discontinuity or redundancy; detection based on a single light component cannot effectively distinguish the feature differences between surface and subsurface defects, and lacks accurate quantification of three-dimensional geometric parameters of defects, so the detection accuracy and robustness cannot meet the requirements when facing complex workpieces with high curvature and multiple defect types.

[0004] Moreover, these methods fail to dynamically modulate the coded light field in combination with the irregular shape of the surface to be detected, and cannot achieve full-type and three-dimensional accurate detection of surface and subsurface defects through multi-view fusion and light component separation. In the defect detection of complex curved surface workpieces, it is easy to miss detection and misjudge, and cannot adapt to the strict requirements of defect detection in high-precision manufacturing scenarios, so there is an urgent need for a detection method that can dynamically adapt to curved surfaces, multi-view fusion, and accurately extract the features of irregular reflective surface defects. SUMMARY

[0005] In order to solve the problems of traditional surface defect detection methods, the present application provides a surface defect detection method and system based on curved surface coding and multi-view fusion.

[0006] In a first aspect, the present application provides a surface defect detection method based on curved surface coding and multi-view fusion, comprising: constructing a curved surface coding lighting system to generate a coded light field and project it to a target surface; synchronously acquiring reflected images of the coded light field through a multi-view imaging device to obtain a multi-dimensional view image data set; separating light components from the multi-dimensional view image data set to extract a defect feature set; integrating multi-view information of the defect feature set to obtain comprehensive defect features; based on the comprehensive defect features, performing defect judgment and parameter calculation on the target surface, and outputting a defect detection result.

[0007] By adopting the technical scheme, the curved surface coded light and multi-view fusion are adopted to break through the limitation of traditional methods on irregular reflective surface detection. The coded light field carries gradient information, and multi-view imaging supplements spatial details to realize accurate detection of surface and subsurface defects, improve adaptability to targets with high curvature and multi-reflection characteristics, and solve the problem of insufficient defect detection precision of irregular reflective surfaces.

[0008] In a specific implementable scheme, the acquiring, by the multi-view imaging device, of a multi-dimensional view image dataset through synchronous acquisition of reflection images of the coded light field comprises: The internal and external parameters of the multi-view imaging device are calibrated by the calibration device to generate calibration parameters. Based on the calibration parameters, the synchronous triggering module is used to realize time sequence alignment of projection of the coded light field and acquisition of the reflection images.

[0009] By adopting the technical scheme, the calibration device and synchronous triggering are adopted to accurately calculate camera parameters and time sequence alignment to eliminate spatial and temporal deviations of multi-view imaging. The spatial and temporal consistency of reflection images is ensured to lay a data foundation for subsequent feature extraction and improve the reliability of defect detection in complex scenes.

[0010] In a specific implementable scheme, the method further comprises: Based on the calibration parameters, geometric registration is performed on the multi-dimensional view image dataset. The registered multi-dimensional view image dataset is subjected to gray calibration and noise filtering to eliminate differences between views.

[0011] By adopting the technical scheme, the geometric registration unifies the coordinate system, and the gray calibration and noise filtering eliminate view differences and interference. The comparability of different view images is ensured, errors caused by light and equipment differences are reduced, standardized data is provided for defect feature extraction, and the robustness of the detection algorithm is improved.

[0012] In a specific implementable scheme, the separating, from the multi-dimensional view image dataset, of light components and extracting a defect feature set comprises: High-order curved surface block planning is performed on the multi-dimensional view image dataset to determine sub-aperture detection regions. Three-dimensional geometric correction is performed on each of the sub-aperture detection regions, and multi-resolution defect features are extracted by fusing corrected sub-region images.

[0013] By adopting the technical scheme, high-order curved surface block planning and three-dimensional correction are adopted to divide detection regions according to curvature for targeted processing. Through sub-region geometric correction and fusion, the influence of curved surface deformation is overcome, multi-resolution defect feature extraction is realized, and the ability to capture small defects in high-curvature regions is particularly enhanced.

[0014] In one specific implementation, the constructing the curved surface encoding illumination system, generating the encoding light field and projecting to the target surface comprises: By controlling the phase shift step number to modulate the phase distribution of the encoding light field, the encoding light field carries the pre-encoding information of the target surface gradient, and the phase shift step number is adapted to the curvature of the target surface.

[0015] By adopting the above technical solution, the encoding light field accurately carries the surface gradient information, balances the detection accuracy and efficiency, and solves the information redundancy or deficiency problem of traditional fixed phase shift in irregular reflective surface detection.

[0016] In one specific implementation, the separating the light components from the multi-dimensional perspective image data set and extracting the defect feature set further comprises: Based on the phase characteristics of the encoding light field, separating the diffuse reflection and specular reflection light components; Based on the target surface gradient, calculating and deriving the target surface normal vector, and extracting the defect features containing three-dimensional geometric information.

[0017] By adopting the above technical solution, based on the phase characteristics, the diffuse reflection and specular reflection light components are separated, and the normal vector is derived in combination with the gradient. The surface and subsurface defect are distinguished, the defect parameters are quantified through three-dimensional geometric information, and the recognition accuracy is improved.

[0018] In one specific implementation, the multi-perspective information integration of the defect feature set to obtain the comprehensive defect feature comprises: Dimensionality reduction and splicing of the defect feature set to construct a unified feature vector; Establishing a multi-perspective feature correlation model, based on the unified feature vector, and outputting the comprehensive defect feature.

[0019] By adopting the above technical solution, the unified vector is constructed through feature dimensionality reduction and splicing, and the information is fused in combination with the multi-perspective correlation model. The high-dimensional feature redundancy is reduced, the complementary information is mined through cross-perspective feature correlation, the defect judgment robustness is improved, and the inconsistency problem of multi-perspective data fusion is solved.

[0020] In one specific implementation, the constructing the curved surface encoding illumination system, generating the encoding light field and projecting to the target surface comprises: Generating a one-dimensional pseudo-random sequence and constructing a two-dimensional pseudo-random matrix; Verifying the field of view coverage integrity of the two-dimensional pseudo-random matrix on the target surface, and converting the two-dimensional pseudo-random matrix that passes the verification into an encoding light field adapted to the target surface.

[0021] By adopting the above technical solution, employing a pseudo-random matrix generation and field-of-view verification mechanism, and ensuring full light field coverage through optical simulation, the surface shape is adjusted and adapted through partitioning and stitching to avoid detection blind spots, improve the adaptability of the coded light field to irregular reflective surfaces, and ensure the complete capture of defect features.

[0022] Secondly, this application also provides a surface defect detection system based on surface coding and multi-view fusion, comprising: A curved surface coded lighting system is used to generate and project coded light fields, carrying pre-coded information about the height gradient of the target surface through curvature adaptation and field of view adaptation. The multi-view imaging module includes an industrial camera, a calibration device, and a synchronization triggering unit. The calibration device is used to calculate the camera's intrinsic and extrinsic parameters, the synchronization triggering unit is used to achieve timing alignment, and the industrial camera is used to acquire reflected images to generate a multi-dimensional view dataset. The image preprocessing module is used to perform geometric registration, grayscale calibration, and noise filtering based on calibration parameters, and output a standardized image. The defect feature extraction module is used to extract and generate a set of defect features; The multi-view integration module is used to concatenate the defect feature set into a unified feature vector, and output comprehensive defect features through multi-view feature association and fusion. The result output module is used to filter valid defects based on the comprehensive defect features, convert pixel parameters into physical parameters, classify defect levels, and generate defect detection results.

[0023] By adopting the above technical solution, surface coding and multi-view imaging work together. The preprocessing module standardizes the image, and the multi-view integration module optimizes feature fusion, achieving precise control throughout the entire process from image acquisition to result output, significantly improving the efficiency and accuracy of detecting defects on irregular reflective surfaces.

[0024] In one specific implementation scheme, the curved surface coding lighting system includes: The phase-shifting encoding unit is used to adapt the number of phase-shifting steps according to the curvature of the target surface and generate a sinusoidal phase-shifted optical field carrying the height gradient information of the target surface. The pseudo-random coding unit is used to construct the pseudo-random coding matrix and verify whether the matrix meets the field of view requirements. The light field adaptation unit is used to perform partition splicing adjustment on the pseudo-random coding matrix, and then convert the adjusted matrix into the coded light field and project it onto the target surface; The field-of-view verification unit is used to simulate the projection effect of the coded light field on the target surface through optical simulation.

[0025] By adopting the above technical solutions, dynamic adjustment of field of view verification and light field adaptation is achieved. Phase shift steps are adapted to curvature, and matrix partitioning optimizes projection effects, enhancing the adaptability of the light field to curved surfaces and improving the contrast between defects and the background, thus providing a high-quality light field foundation for accurate detection.

[0026] In summary, this application includes at least one of the following beneficial effects: 1. This application achieves accurate full-field coverage of high and low curvature areas by combining dynamic adaptation of coded light field and multi-view imaging collaboration with light field projection angle optimization and field of view verification, avoiding coded blind spots and feature masking, and adapting to irregular reflective surface detection patterns.

[0027] 2. This application extracts three-dimensional geometric features by separating optical components and deriving normal vectors from gradients, and then fuses multi-view features to output a quantitative result with comprehensive confidence, thereby improving the accuracy of defect identification types and parameters.

[0028] 3. The proposed solution uses a modular design, combined with temporal alignment and image standardization processing, to eliminate differences in equipment and perspective, ensuring that the detection time for a single target is controllable. At the same time, the detection results include traceable parameters and visual annotations, taking into account both the efficiency and traceability requirements of industrial scenarios. Attached Figure Description

[0029] Figure 1 This is a schematic flowchart of a surface defect detection method based on surface coding and multi-view fusion provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a multi-view imaging device provided in an embodiment of this application; Figure 3 This is a schematic diagram of a surface defect detection system based on surface coding and multi-view fusion provided in an embodiment of this application. Detailed Implementation

[0030] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.

[0031] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0032] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0033] Please see Figure 1 , Figure 1 A flowchart illustrating a surface defect detection method based on surface coding and multi-view fusion according to an embodiment of this application is provided. This method can be implemented using a computer program, a microcontroller, or run on a surface defect detection system based on surface coding and multi-view fusion. The computer program can be integrated into a computer device or run as a standalone utility application. Specifically, the method includes steps S100 to S500, as follows: S100. Construct a curved surface coding lighting system, generate a coding light field, and project it onto the target surface; In some embodiments, the coding modes of the curved surface coding illumination system may include two core modes: phase-shift coding and pseudo-random coding. During the detection process, the curved surface coding illumination system applies these two coding modes through dynamic modulation.

[0034] Specifically, for phase-shift coding, the system dynamically modulates the phase distribution of the optical field, for example, by adjusting the number of phase shift steps and the phase change frequency; for pseudo-random coding, the system dynamically modulates the spatial pattern of the optical field, for example, by adjusting the period of the pseudo-random sequence and the matrix filling method.

[0035] The core objective of dynamic modulation is to enable the generated coded light field to adapt to the irregular shape of the target surface (such as curved protrusions, depressions, and irregular edges), thereby providing highly recognizable defect features for subsequent multi-view imaging devices and avoiding the defect features being masked or not effectively captured by light field interference due to the mismatch between the coded light field and the target shape.

[0036] In some embodiments, the method of adapting to the irregular shape of the surface of the target to be detected includes surface curvature adaptation, which refers to the targeted adjustment of the spatial shape of the encoded light field to follow the curvature change of the surface of the target to be detected.

[0037] Specifically, for high-curvature regions of the target surface (such as protrusions and depressions with small radii of curvature), the system optimizes the light field projection angle and increases the light field coding density to ensure uniform coverage and complete coding information in curved areas. For low-curvature regions of the target surface (such as gently sloping, near-planar areas), the system maintains the basic coding parameters of the light field to avoid coding redundancy caused by over-modulation. Through surface curvature adaptation, information gaps in the coded light field in curved areas of the target surface can be effectively avoided, ensuring that defect features in regions with different curvatures can be accurately marked by the light field.

[0038] In some embodiments, the method of adapting to the irregular shape of the target surface to be inspected also includes field-of-view adaptation. Field-of-view adaptation includes ensuring that the projection range of the coded light field completely covers the entire area of ​​the target surface to be inspected, with no projection blind spots; and that the encoding resolution of the coded light field meets the defect detection requirements.

[0039] Specifically, the encoding resolution is reflected by the stripe density of the light field or the pixel density of the pseudo-random matrix, requiring that the number of encoded pixels corresponding to a single defect in the encoded light field is no less than 2 pixels. Through field-of-view adaptation, it is ensured that the multi-view imaging device acquires a full-area image of the target surface, guaranteeing the clarity of the details of defect features in the imaging results, and providing a reliable data foundation for subsequent defect feature extraction and recognition.

[0040] Based on the above embodiments, as another optional embodiment, constructing a curved surface coding lighting system, generating a coded light field and projecting it onto the target surface includes: S101. By controlling the phase shift step number to modulate the phase distribution of the coded light field, the coded light field carries the pre-coded information of the target surface gradient, and the phase shift step number is adapted to the curvature of the target surface.

[0041] In this embodiment of the application, the phase shift step number refers to the number of steps controlling the phase shift of the coded light field. The number of steps is adapted to the curvature of the target surface, and more steps are needed in high curvature regions.

[0042] Specifically, by analyzing the edge curvature of the preprocessed image, curvature distribution data of the target surface is collected. A first-step long phase shift is applied to high-curvature regions, and a second-step long phase shift is applied to low-curvature regions, so that the phase modulation density is adapted to the surface shape. Among them, the curvature radius corresponding to the high curvature region is ≤5mm, and the first-step length can be 6 steps; the curvature radius corresponding to the low curvature region is ≥50mm, and the second-step length can be 4 steps.

[0043] In some embodiments, the formula for the number of phase shift steps N may include:

[0044] Where N is the number of phase shift steps calculated for the current surface region; Nbase is the base number of phase shift steps, for example, for planar or low curvature regions, Nbase=4; α is the scaling factor, an empirical constant greater than 0, used to adjust the sensitivity of curvature to the number of steps; |k| is the absolute average curvature of the current region. The greater the curvature, the more phase shift steps are required to obtain higher phase measurement accuracy. It is the floor function, ensuring that the number of steps is an integer.

[0045] Based on the adapted phase-shift steps, a sinusoidal phase-shifted fringe light field is generated, enabling the light field to carry pre-coded information about the height gradient of the target surface. The core characteristic of this sinusoidal phase-shifted fringe light field is that its phase change is linearly positively correlated with the height difference of the target surface. Specifically, the pre-coded information manifests as a phase delay in the light field corresponding to concave regions of the target surface, and a phase lead in the light field corresponding to convex regions, achieving precise conversion of height gradient information into a light field phase signal.

[0046] In some embodiments, the direction of the light field is adjusted to ensure that the light field in the concave area is focused and the light field in the convex area is diffused and compensated, so as to achieve the matching of the coded light field with the geometric shape of the target surface.

[0047] Based on the above embodiments, as another optional embodiment, constructing a curved surface coding lighting system, generating a coded light field and projecting it onto the target surface includes: S102. Generate a one-dimensional pseudo-random sequence and construct a two-dimensional pseudo-random matrix; In this embodiment, a one-dimensional pseudo-random sequence refers to a coding primitive possessing both local randomness and global controllability. The sequence length and periodicity parameters of the one-dimensional pseudo-random sequence are adapted to the resolution of multi-view imaging and the detection window size of the target surface.

[0048] Specifically, the detection window size parameters of the target surface are obtained. These parameters must match the field of view and imaging resolution of the multi-view imaging device.

[0049] Based on the detection window size, the period of the one-dimensional pseudo-random sequence is determined. Within a single period, the number of pixels corresponding to the defect in the encoded pattern is greater than or equal to the defect pixel threshold.

[0050] In some embodiments, the defect pixel threshold can be 2 pixels.

[0051] The length of the one-dimensional pseudo-random sequence is determined based on the detection window size. The sequence length matches the imaging resolution of the multi-view camera. For example, when the multi-view camera resolution is 1024 pixels × 1024 pixels, the sequence length is set to 1024 pixels. The resulting one-dimensional pseudo-random sequence satisfies the characteristics of locally non-repeating patterns and globally recursive callability. This characteristic provides uniform and recognizable coded primitives for subsequent filling of the two-dimensional matrix.

[0052] Based on the generated one-dimensional pseudo-random sequence, a two-dimensional pseudo-random matrix is ​​constructed. Specifically, according to the field of view and resolution of multi-view imaging, a two-dimensional pseudo-random matrix is ​​constructed. The number of pixels in both the horizontal and vertical directions of the matrix is ​​consistent with the imaging resolution of the multi-view camera, ensuring that the coded light field generated by the matrix can completely cover the detection field of view of the target surface without any projection blind spots.

[0053] The two-dimensional matrix is ​​filled using a diagonal cyclic assignment method. Starting from the top left pixel of the matrix, the elements of a one-dimensional pseudo-random sequence are filled sequentially along the main diagonal. When the matrix reaches the row or column boundary, it automatically jumps to the starting column of the next row or the starting row of the next column and continues to fill along the diagonal until all pixels of the entire two-dimensional matrix have been assigned values.

[0054] In a two-dimensional pseudo-random matrix, the encoding patterns of any sub-window are not repeated, and the encoding resolution meets the requirements for defect detection, ensuring that the subsequently projected encoded light field can accurately capture the subtle defect features of the target surface.

[0055] S103. Verify the integrity of the field of view coverage of the two-dimensional pseudo-random matrix on the target surface, and convert the verified two-dimensional pseudo-random matrix into an coded light field adapted to the target surface.

[0056] In some embodiments, by transforming a two-dimensional pseudo-random matrix into an encoded light field that precisely matches the irregular shape of the target surface, it is ensured that subsequent multi-view imaging can acquire full-field, high-resolution defect features, avoiding defect omissions or feature blurring due to insufficient adaptability of the encoded light field.

[0057] In some embodiments, the projection effect of a coded light field generated by a two-dimensional pseudo-random matrix onto a target surface is simulated using an optical simulation tool. The simulation process of the optical simulation tool incorporates parameters such as the actual curvature distribution and size range of the target surface to reconstruct the projection state of the light field in irregular areas such as depressions, protrusions, and edges.

[0058] In some embodiments, the verification criteria include that the encoded light field has no encoding blind spots on the target surface and that the resolution of the encoded light field meets the standard.

[0059] Specifically, the light field projection area must cover the entire detection range of the target surface, and the overlap rate of the encoded stripes in any region must be greater than or equal to the stripe overlap threshold; the number of encoded pixels corresponding to a single smallest defect in the light field must be greater than or equal to the encoded pixel threshold. If a region with a stripe overlap rate less than the stripe overlap threshold is detected, it is determined to be a coding blind zone; if the number of encoded pixels corresponding to a single defect in a region is less than the encoded pixel threshold, it is determined to be insufficient resolution. In some embodiments, the stripe overlap threshold can be 30%, and the encoded pixel threshold can be 2 pixels.

[0060] If the verification fails to meet the standard, feedback is sent to the one-dimensional pseudo-random sequence generation stage to adjust the period parameter of the one-dimensional sequence. After adjustment, a two-dimensional pseudo-random matrix is ​​regenerated, and the above verification operation is performed again until the matrix passes the field of view coverage integrity verification.

[0061] In some embodiments, a dynamic adaptation operation of the encoding array is performed on a two-dimensional pseudo-random matrix that has passed the field of view coverage integrity check to match the irregular shape of the target surface.

[0062] Specifically, based on the curvature distribution data of the target surface, the two-dimensional pseudo-random matrix is ​​regionally spliced ​​and adjusted. For concave areas of the surface, multiple sets of local units of the two-dimensional pseudo-random matrix are superimposed using a top-bottom splicing method to achieve local encryption of the coding array in the concave area, ensuring that subtle defects inside the concave area can be marked by the coded light field. For convex areas of the surface, redundant units of the two-dimensional pseudo-random matrix are trimmed using a diagonal splicing method to achieve sparse compensation of the coding array in the convex area, avoiding feature interference caused by excessive coding density on the convex surface.

[0063] By splicing and adjusting, an adaptive coding array is generated that corresponds one-to-one with the shape of each region on the target surface. This array retains the window characteristics of a two-dimensional pseudo-random matrix and can fit the irregular geometric structure of the target surface.

[0064] In some embodiments, a curved surface coding illumination system converts the coding array into a coding light field. Specifically, the dynamically adapted coding array is input into the light field modulation module of the curved surface coding illumination system. Through micromirror flipping or liquid crystal molecule orientation adjustment within the module, the digital coding information of the coding array is converted into a physical coding light field with a corresponding spatial pattern.

[0065] In some embodiments, the physical coded light field is projected onto the target surface using the optical projection component of the curved surface coded illumination system. Specifically, during projection, the incident angle and focusing range of the light field need to be adjusted to ensure that the encrypted coded array is precisely focused in the concave region and the sparsed coded array is uniformly diffused in the convex region. Ultimately, this achieves precise full-field coverage of the irregular shape of the target surface by the pseudo-random coded light field, providing a light field basis for subsequent multi-view imaging devices to acquire high-resolution defect features.

[0066] S200: Through a multi-view imaging device, the reflection image of the encoded light field is acquired synchronously to obtain a multi-dimensional view image dataset; refer to Figure 2In this application embodiment, the multi-view imaging device refers to an imaging system consisting of at least two industrial cameras. The cameras need to be fixedly deployed at a preset angle. The core function is to synchronously acquire the reflection image of the coded light field on the target surface, obtain defect feature information from different perspectives, provide multi-dimensional data support for subsequent multi-view information integration, and avoid the detection blind spot of single-view imaging.

[0067] In some embodiments, a multi-view imaging device deployed at a preset angle acquires the reflection image of the coded light field on the target surface under the control of a synchronous triggering module, forming a multi-dimensional view image dataset containing multi-view and spatiotemporal alignment information.

[0068] Specifically, the deployment location of the multi-view imaging device is confirmed. Industrial cameras are arranged in a ring around the target surface to ensure full coverage of the target surface without blind spots. Then, the synchronization trigger module is activated, outputting a synchronization signal to the curved surface coded illumination system and each camera, so that the coded light field projection and camera exposure are started synchronously, and each camera synchronously acquires reflected images. Finally, the acquired images are classified according to the viewing angle, associated with the corresponding camera pose, imaging time and other parameters to generate a multi-dimensional viewing image dataset.

[0069] In this embodiment, the multi-dimensional viewpoint image dataset is a collection of reflection images of a target surface from different viewpoints. Each image in the dataset is associated with corresponding viewpoint parameters, and the image resolution and grayscale levels are adapted to defect detection requirements to provide spatially complementary defect feature data, supporting subsequent feature extraction and integration. The viewpoint parameters may include camera pose and imaging time.

[0070] In some embodiments, the multi-view imaging device may include four industrial cameras.

[0071] Based on the above embodiments, as another optional embodiment, a multi-view image dataset is obtained by simultaneously acquiring reflection images of the coded light field using a multi-view imaging device, including: S201. The internal and external parameters of the multi-view imaging device are calibrated using a calibration device to generate calibration parameters; In this embodiment, the calibration device refers to a dedicated device for determining the parameters of a multi-view imaging device. It includes a standard calibration plate, a coordinate measurement module, and parameter calculation software. By acquiring multi-view images from the calibration plate, it calculates the camera's intrinsic and extrinsic parameters, providing reference data for subsequent image geometric registration and temporal synchronization to ensure imaging accuracy. The calibration parameters, calculated by the calibration device, describe the characteristics of the multi-view imaging device, including intrinsic and extrinsic parameters, and are used to correct image distortion and unify the coordinate system of the multi-view images, ensuring the accuracy of subsequent geometric registration. The intrinsic parameters may include the camera focal length, principal point coordinates, and distortion coefficients, while the extrinsic parameters may include the relative pose relationships between cameras and the transformation matrix between the world coordinate system and the camera coordinate system.

[0072] In some embodiments, a calibration device containing a standard calibration plate is used to acquire multi-view images of the calibration plate, and the intrinsic and extrinsic parameters of the multi-view imaging device are obtained through parameter calculation software to generate calibration parameters for subsequent processing.

[0073] Specifically, a checkerboard calibration plate is selected as the calibration reference and fixed at a preset position on the target surface. A multi-view imaging device is controlled to acquire multi-view images of the calibration plate. The acquired calibration plate images are input into calibration parameter calculation software to calculate the intrinsic parameters, distortion coefficients, and extrinsic parameters of each camera. The calculated intrinsic and extrinsic parameters are integrated into a calibration parameter file and stored in the system database for subsequent geometric registration and temporal synchronization. The preset position on the target surface includes the center of the detection area.

[0074] S202. Based on the calibration parameters, the timing alignment of the projection of the coded light field and the acquisition of the reflected image is achieved through the synchronous triggering module.

[0075] In this embodiment of the application, the synchronous triggering module refers to a control unit that realizes the timing coordination of coded light field projection and image acquisition, including a signal generator, a timing control chip and a communication interface, for outputting synchronous triggering signals to the curved surface coded illumination system and the multi-view imaging device, reducing the time deviation between light field projection and image acquisition, and eliminating image distortion caused by motion blur or light field misalignment.

[0076] In some embodiments, based on the camera imaging delay and light field projection response time in the calibration parameters, a coordination signal is output through the synchronization trigger module to ensure that the timing deviation between the coded light field projection and the acquisition of the reflected image is less than or equal to a timing deviation threshold. The timing deviation threshold can be 1 μs.

[0077] Specifically, based on the calibration parameters, the imaging characteristics of the multi-view imaging device are analyzed. The exposure delay of each camera (e.g., 20 μs) and the light field projection response time of the curved surface coded illumination system (e.g., 15 μs) are determined through calibration data. The above timing parameters are input into the synchronization trigger module, and the output logic of the trigger signal is set: after outputting the light field projection trigger signal, the camera exposure trigger signal is output to ensure that the camera starts exposure when the light field completely covers the target surface. The synchronization trigger module is started, and the trigger signals are sent to the curved surface coded illumination system and the multi-view imaging device respectively to monitor the timing deviation in real time.

[0078] Based on the above embodiments, as another optional embodiment, the surface defect detection method further includes: S203. Perform geometric registration on the multi-dimensional view image dataset based on calibration parameters; In this application embodiment, geometric registration refers to the process of correcting spatial deviations in multi-dimensional view image datasets based on calibration parameters. It is used to transform images from different viewpoints to a unified world coordinate system, correct image offsets caused by camera pose differences or lens distortion, and keep the spatial position of the same defect in multi-view images consistent, providing spatially aligned data for subsequent feature extraction.

[0079] In some embodiments, based on the intrinsic and extrinsic parameters in the calibration parameters, images from different perspectives in the multidimensional viewpoint image dataset are transformed to a unified world coordinate system through coordinate transformation and distortion correction to eliminate spatial bias.

[0080] Specifically, based on the distortion coefficients in the camera's intrinsic parameters, polynomial correction is used to eliminate radial and tangential distortion of the lens, restoring straight lines in the image to their true geometric shape. Based on the coordinate transformation matrix in the extrinsic parameters, the corrected images from each viewpoint are transformed to a preset world coordinate system (such as a coordinate system with the center of the target surface as the origin and the Z-axis perpendicular to the surface), and the world coordinates of pixels in each image are calculated. Finally, the image size is adjusted through image resampling to ensure that the resolution and coordinate system of the multi-view images are completely unified, ensuring that the spatial position deviation of the same defect in images from different viewpoints is less than or equal to the coded pixel threshold.

[0081] S204. Perform grayscale calibration and noise filtering on the registered multi-view image dataset to eliminate differences between viewpoints.

[0082] In this embodiment of the application, grayscale calibration is a processing operation used to eliminate grayscale differences in multi-dimensional viewpoint image datasets. By acquiring multi-view images from a standard grayscale plate, a grayscale mapping relationship is established for each viewpoint, and the image grayscale unevenness caused by differences in illumination angle and camera sensitivity is dynamically compensated, so that the grayscale features of the same defect in multi-view images remain consistent, and grayscale differences are avoided from interfering with defect identification.

[0083] In this embodiment, noise filtering is a processing operation used to suppress interference signals in a multi-dimensional viewpoint image dataset. The noise types targeted include speckle noise generated by the reflection of the coded light field and motion noise generated by slight target movement. By filtering and smoothing image noise while preserving defect edge features, the extracted defect features are ensured to be unaffected by noise, thus improving feature accuracy.

[0084] In some embodiments, grayscale differences in the registered images are corrected by establishing grayscale mapping relationships, and then image noise is suppressed by filtering to output standardized image data with no viewpoint differences and low noise.

[0085] Specifically, a standard grayscale plate is placed in the target surface detection area, and multi-view registered images of the grayscale plate are acquired. The grayscale response curve of each camera is calculated. Based on the grayscale response curve, a grayscale mapping matrix for each viewpoint is established. Grayscale correction is performed pixel-by-pixel on the registered multi-view image dataset to ensure that the grayscale value deviation of the same grayscale plate area in different viewpoint images is less than or equal to the grayscale deviation threshold. Gaussian filtering is used to smooth the speckle noise generated by the coded light field. Median filtering is used to preserve defect edges to prevent motion noise caused by slight target shaking. After filtering, edge detection is used to verify the integrity of the defect edges to ensure that noise filtering does not lead to the loss of defect features. Finally, a standardized multi-view image dataset is output as input for subsequent light component separation and defect feature extraction. The grayscale deviation threshold can be 3 gray levels.

[0086] S300: Separate light components from a multi-dimensional image dataset and extract a set of defect features; In this embodiment, optical component separation refers to the process of distinguishing and extracting diffuse reflection light components and specular reflection light components from a multi-dimensional viewpoint image dataset based on the phase characteristics of the coded light field. Optical component separation enables the accurate extraction of different types of defect features, avoiding the confusion of defect features caused by the superposition of light components.

[0087] The defect feature set in this embodiment is extracted from a multi-dimensional viewpoint image dataset and is a feature combination that includes multi-dimensional defect information. The multi-dimensional defect information may include spatial morphological features, such as defect outline and area; three-dimensional geometric features, such as depth, slope, and normal vector; and grayscale texture features, such as the grayscale difference between the defect and the background.

[0088] Based on the above embodiments, as another optional embodiment, separating the light components from the multi-dimensional viewpoint image dataset and extracting the defect feature set includes: S301. Perform high-order surface block planning on the multi-dimensional viewpoint image dataset to determine the sub-aperture detection region; In this embodiment, high-order surface block planning refers to dividing the target surface into multiple sub-regions based on the curvature distribution data of the target surface (such as the curvature distribution data collected in S101). By using high-order polynomial fitting of the target surface morphology, sub-blocks are divided according to curvature similarity to ensure that the surface morphology within each sub-block is approximately uniform, avoiding deviations in defect feature extraction caused by abrupt changes in surface curvature. The sub-aperture detection region is obtained through high-order surface block planning and is used for local defect detection, including multiple sub-regions. The aperture size of each sub-region is adapted to the local curvature; high-curvature regions have small sub-apertures, low-curvature regions have large sub-apertures, and the sub-regions do not overlap. The sub-aperture detection region is used to transform the defect detection of large-area, irregular surfaces into the detection of small-range, approximately regular surfaces, reducing the difficulty of three-dimensional geometric correction and improving the extraction accuracy of local defect features.

[0089] In some embodiments, based on curvature distribution data, a high-order polynomial is used to fit the target surface morphology, and the target surface is divided into multiple non-overlapping sub-aperture detection regions according to curvature similarity.

[0090] Specifically, the curvature distribution data of the target surface is retrieved, and a quadratic surface equation is used to fit the overall shape of the target surface. A segmentation rule is set: high-curvature regions are divided into sub-aperture detection areas according to a first size to ensure approximately uniform local curvature; low-curvature regions are divided according to a second size to improve detection efficiency. The segmentation rule is then mapped to a standardized multi-dimensional viewpoint image dataset. The first size can be 5mm × 5mm; the second size can be 20mm × 20mm.

[0091] S302. Perform three-dimensional geometric correction on each sub-aperture detection area, and fuse the corrected sub-region images to extract multi-resolution defect features.

[0092] In this embodiment, three-dimensional geometric correction refers to restoring the image of each sub-aperture detection area to an approximate planar image through coordinate transformation and shape correction, based on the surface morphology of the sub-aperture detection area. By using curvature step data and calibration parameters, image stretching and compression distortion caused by surface concavities or convexities are eliminated, ensuring that the geometric morphology of defects in the corrected sub-aperture image is consistent with the actual size.

[0093] In this embodiment, multi-resolution defect features refer to defect features extracted from images of different sub-aperture detection areas after correction, using both low-resolution and high-resolution methods. Low-resolution features (such as the general outline and location of the defect) are used to quickly locate the defect area, while high-resolution features (such as the details of the defect edges and the height of micro-protrusions) are used to accurately describe the defect morphology. The combination of the two ensures both detection efficiency and that subtle defect features are not lost, adapting to the detection needs of defects of different sizes.

[0094] In some embodiments, based on curvature step data and calibration parameters, three-dimensional geometric correction is performed on the images of each sub-region to eliminate surface distortion and fuse the images. Multi-resolution defect features are then extracted at low and high resolutions, respectively.

[0095] Specifically, for each sub-aperture detection area, a transformation model between surface image coordinates and world coordinates is established based on calibration parameters and curvature step data. The surface image of the sub-region is restored to an approximate planar image through inverse mapping. All corrected sub-region images are fused, and the sub-region images are stitched together according to the actual position of the target surface to form a complete and distortion-free panoramic image of the target surface. Multi-resolution defect features are extracted, and the panoramic image is decomposed at multiple scales to extract the contour and position features of the defects, as well as the edge details and gray-scale gradient features of the defects. Features at different scales are correlated and integrated to form multi-resolution defect features, which are then incorporated into the defect feature set.

[0096] Based on the above embodiments, as another optional embodiment, separating the light components from the multi-dimensional viewpoint image dataset and extracting the defect feature set further includes: S303. Based on the phase characteristics of the coded light field, the diffuse reflection and specular reflection light components are separated. In this embodiment, diffuse reflection light component refers to the light signal formed by scattering of the coded light field after it is projected onto the target surface through rough areas or subsurface structures. The diffuse reflection light component has a uniform intensity distribution and a gentle phase change, corresponding to the characteristic information of subsurface defects (such as internal cracks and impurities) on the target surface. Specular reflection light component refers to the light signal formed by direct reflection of the coded light field through smooth areas of the target surface. The specular reflection light component has a concentrated intensity and a significant phase change, corresponding to the characteristic information of surface defects (such as scratches and pits).

[0097] In some embodiments, based on the phase change law of the encoded light field, the diffuse reflection light component corresponding to the subsurface defect and the specular reflection light component corresponding to the surface defect are separated from the standardized multidimensional view image dataset by phase threshold judgment and light intensity distribution analysis.

[0098] Specifically, based on the phase characteristic parameters of the encoded light field, the phase value of each pixel in each image of the standardized multi-dimensional viewpoint image dataset is extracted. Based on the characteristics of the diffuse reflection light component having a gentle phase change and the specular reflection light component having a significant phase change, regions with a pixel phase difference less than or equal to a phase difference threshold are identified as diffuse reflection regions, and the light intensity signal of these regions is extracted as the diffuse reflection light component. Regions with a pixel phase difference greater than the phase difference threshold are identified as specular reflection regions, and the light intensity signal of these regions is extracted as the specular reflection light component. Gray-level normalization is performed on the two separated light components to eliminate light intensity fluctuation interference. The processed light component data is associated with the corresponding viewpoint and sub-aperture region and stored in the defect feature set. The phase difference threshold can be 0.1 rad.

[0099] S304. Based on the target surface gradient, calculate and derive the target surface normal vector, and extract defect features containing three-dimensional geometric information.

[0100] In this embodiment, the target surface normal vector refers to a vector perpendicular to the tangent plane at a point on the target surface, which is calculated and derived from the target surface gradient data (such as the height gradient pre-encoded information carried by the encoded light field in S101). The change in the direction of the normal vector identifies regions of abrupt changes in surface morphology, and the magnitude of the normal vector is combined to quantify the slope and steepness of the defect, providing key parameters for extracting the three-dimensional geometric features of the defect.

[0101] In some embodiments, based on the target surface gradient pre-encoded information carried by the encoded light field, the normal vector of each point on the target surface is calculated by the gradient vector cross product. Combining the changes in the direction and magnitude of the normal vector, three-dimensional geometric features such as the depth and slope of the defect are extracted to supplement the three-dimensional information dimension of the defect feature set.

[0102] Specifically, the gradient information of the target surface is parsed from the encoded light field data; the normal vector of the target surface is calculated, and for each pixel on the target surface, a gradient vector (Gx, Gy, -1) is constructed. The unit normal vector of that point is obtained through vector normalization, and the changes in the direction parameter and magnitude of the normal vector are recorded; abnormal normal vectors in defect areas are identified, and areas with abnormal normal vectors are determined as defect areas; the three-dimensional geometric features of the defect are quantified, the slope of the defect is calculated based on the direction difference of the normal vector, and the depth of the defect is derived by combining the calibration parameters (depth = gradient value × pixel spacing). The information such as defect depth, slope, and normal vector direction is integrated into defect features containing three-dimensional geometric information, associated with the corresponding defect area and viewpoint, and incorporated into the defect feature set.

[0103] S400. Integrate multi-perspective information into the defect feature set to obtain comprehensive defect features; In this embodiment of the application, multi-perspective information integration refers to integrating different defect features into a unified comprehensive defect feature based on the defect feature set and corresponding perspective parameters. By eliminating spatial redundancy and perspective bias of multi-perspective features, complementary correlations between cross-perspective features are explored, thereby improving the robustness and recognizability of defect features.

[0104] Based on the above embodiments, as another optional embodiment, the defect feature set is integrated from multiple perspectives to obtain comprehensive defect features including: S401. Reduce the dimensionality of the defect feature set and concatenate them to construct a unified feature vector; In this embodiment, a unified feature vector refers to a standardized feature vector formed by compressing a set of defect features and then concatenating them according to preset rules. The unified feature vector includes multi-dimensional information about the defects, such as spatial morphological features, three-dimensional geometric features, and grayscale texture features, and the vector dimensions must be adapted to the input requirements of the subsequent correlation model. By transforming multi-view, multi-type discrete defect features into vector data with a unified format and controllable dimensions, interference with model input caused by differences in data format is eliminated.

[0105] In some embodiments, the defect features from each perspective in the defect feature set are compressed to eliminate data redundancy, and then the dimensionality-reduced features from each perspective are spliced ​​together according to preset rules to generate a unified feature vector with uniform format and dimension adaptation.

[0106] Specifically, the defect features from each perspective are uniformly transformed into multi-dimensional original feature vectors (such as 307-dimensional spatial morphology features, 410-dimensional three-dimensional geometric features, and 307-dimensional grayscale texture features) to ensure that the feature dimensions of different perspectives are consistent. The multi-dimensional original features are then reduced in dimensionality by selecting principal components from high to low contribution rates, reducing them to a preset minimum dimension (such as 256 dimensions). According to the deployment order of the multi-view imaging device, the preset minimum dimension feature vectors after dimensionality reduction from each perspective are sequentially concatenated to form a unified feature vector, and perspective parameter identifiers, such as the number of perspectives and the camera pose index of each perspective, are added to the head of the vector.

[0107] S402. Establish a multi-perspective feature association model and output comprehensive defect features based on a unified feature vector.

[0108] In this embodiment, the multi-view feature association model is used to mine cross-view feature associations in a unified feature vector and output comprehensive defect features. It can employ a two-layer architecture of feature-level fusion and decision-level fusion. Feature-level fusion learns the spatial mapping relationships between features from different perspectives, while decision-level fusion probabilistically synthesizes the defect judgment results from each perspective. Training with labeled defect samples ensures that the output comprehensive defect features possess spatial consistency and judgment reliability.

[0109] In some embodiments, a two-layer multi-view feature association model with feature-level fusion and decision-level fusion is constructed. With a unified feature vector as input, the model learns cross-view feature association relationships and synthesizes defect judgment results, outputting comprehensive defect features including defect type, three-dimensional parameters, and comprehensive confidence.

[0110] Specifically, based on a unified feature vector, the vector is split into multiple single-view feature streams by perspective partitioning. Each single-view feature stream extracts core features through independent convolutional branches. Then, the cross-stream attention mechanism is used to explore the correlation between different feature streams and output feature-level fusion features. The feature-level fusion features are then fused at the decision level and mapped to the determination probability of each defect type through a fully connected layer. The probabilities are weighted and synthesized by combining the weight coefficients of each perspective (e.g., 0.3 for high-resolution perspective and 0.2 for low-resolution perspective) to output comprehensive defect features.

[0111] S500: Based on comprehensive defect characteristics, it performs defect judgment and parameter calculation on the target surface and outputs defect detection results.

[0112] In this embodiment of the application, the defect detection results may include defect identifiers, detection time, type level, precise physical parameters, and associated multi-view image indexes, and the defect location can be marked through a visual interface.

[0113] Specifically, based on comprehensive defect features, valid defects are screened by setting a defect judgment threshold and falsely judged features with insufficient confidence are eliminated; calibration parameters are called to convert the pixel parameters of valid defects into actual physical parameters; defect levels are classified according to defect type and physical parameters, and defect detection results are generated.

[0114] The preset defect judgment threshold may include: overall confidence level ≥ 0.8; actual physical parameters include actual depth and actual area; and defect level includes minor, moderate and severe.

[0115] refer to Figure 3 This application also provides a surface defect detection system based on surface coding and multi-view fusion. Based on the surface defect detection method based on surface coding and multi-view fusion provided in this embodiment, the system includes: A curved surface coded lighting system is used to generate and project coded light fields, carrying pre-coded information about the height gradient of the target surface through curvature adaptation and field of view adaptation. The multi-view imaging module includes an industrial camera, a calibration device, and a synchronization triggering unit. The calibration device is used to calculate the camera's intrinsic and extrinsic parameters, the synchronization triggering unit is used to achieve time alignment, and the industrial camera is used to acquire reflected images to generate a multi-dimensional view dataset. The image preprocessing module is used to perform geometric registration, grayscale calibration, and noise filtering based on calibration parameters, and output a standardized image. The defect feature extraction module is used to extract and generate a set of defect features; The multi-view integration module is used to concatenate the defect feature set into a unified feature vector, and output comprehensive defect features through multi-view feature association and fusion. The results output module is used to filter valid defects based on comprehensive defect features, convert pixel parameters into physical parameters, classify defect levels, and generate defect detection results.

[0116] In some embodiments, the image preprocessing module includes a geometric registration unit, a grayscale calibration unit, and a noise filtering unit.

[0117] In some embodiments, the defect feature extraction module includes a block planning unit, a three-dimensional correction unit, an optical component separation unit, and a three-dimensional feature calculation unit.

[0118] In some embodiments, the multi-view integration module includes a dimension reduction stitching unit and a feature association unit.

[0119] Based on the above embodiments, as another optional embodiment, the curved surface coding lighting system includes: The phase-shifting encoding unit is used to adapt the number of phase-shifting steps according to the curvature of the target surface and generate a sinusoidal phase-shifted optical field carrying the height gradient information of the target surface. The pseudo-random coding unit is used to construct the pseudo-random coding matrix and verify whether the matrix meets the field of view requirements. The light field adaptation unit is used to perform partitioning and splicing adjustment on the pseudo-random coding matrix, and then convert the adjusted matrix into a coded light field and project it onto the target surface; The field-of-view verification unit is used to simulate the projection effect of the coded light field on the target surface through optical simulation.

[0120] Specifically, the curvature distribution data of the target surface to be detected is collected through edge curvature analysis of the preprocessed image and transmitted synchronously to each unit of the surface coding illumination system.

[0121] In the curved surface coded lighting system, the phase-shift coding unit adapts to the phase-shift step number and generates a sinusoidal phase-shift fringe light field carrying pre-coded height gradient information. The light field direction is adjusted to match the target shape. The pseudo-random coding unit generates a one-dimensional sequence adapted to the camera resolution and defect resolution, and constructs a two-dimensional pseudo-random matrix through a diagonal cyclic assignment method. The field-of-view verification unit verifies the matrix through optical simulation. If the verification fails, the sequence period is adjusted until the verification passes. The light field adaptation unit performs regional splicing on the verified matrix and converts it into a physical pseudo-random coded light field. The phase-shift and pseudo-random coded light fields are projected onto the target surface through an optical projection component.

[0122] In the multi-view imaging module, the calibration device fixes the checkerboard calibration plate at the center of the target detection area, controls the circularly deployed industrial camera to acquire calibration images, calculates and stores the camera's internal and external parameters; the synchronous triggering unit sets the timing deviation according to the camera exposure delay and light field projection response time in the calibration parameters, triggers the light field projection and the camera to synchronously acquire reflected images, and generates a multi-dimensional view image dataset by associating the camera pose and imaging time with the viewpoint.

[0123] The image preprocessing module receives a multi-dimensional viewpoint image dataset. Specifically, the geometric registration unit corrects lens distortion based on calibration parameters, unifies the image to the world coordinate system, and reduces spatial deviation of defects through resampling; the grayscale calibration unit establishes grayscale mapping matrices for each viewpoint using a standard grayscale plate, correcting and reducing grayscale deviation pixel-by-pixel; and the noise filtering unit uses Gaussian filtering to suppress speckle noise and median filtering to eliminate motion noise, outputting a standardized image.

[0124] In the defect feature extraction module, the block planning unit divides the detection area into sub-apertures; the three-dimensional correction unit establishes a coordinate transformation model for each sub-region, restores the planar image and merges it into a panoramic image; the light component separation unit separates the diffuse reflection light component and the specular reflection light component according to the phase difference threshold and performs grayscale normalization; the three-dimensional feature calculation unit parses the gradient information to construct the gradient vector (Gx, Gy, -1), derives the unit normal vector and identifies abnormal areas of the normal vector, quantifies the defect slope and the actual depth, and generates a defect feature set.

[0125] The multi-view integration module receives a set of defect features. The dimensionality reduction and stitching unit reduces the dimensionality of the high-dimensional features of each view, stitches them together according to the camera deployment order, and adds viewpoint identifiers to form a unified feature vector. The feature association unit outputs a comprehensive defect feature containing defect type, three-dimensional parameters, and comprehensive confidence level through a pre-trained model, feature-level fusion and decision-level fusion.

[0126] The results output module filters valid defects based on comprehensive confidence, converts pixel parameters into actual physical parameters based on calibration parameters, classifies defect levels, generates defect detection results, and simultaneously marks the defect locations in the panoramic image and stores them in the database.

[0127] It should be noted that the system provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0128] This application also provides a computer storage medium that can store multiple instructions. The instructions are adapted to be loaded and executed by a processor. The surface defect detection method based on surface coding and multi-view fusion described in the above embodiments is described in detail below. The specific execution process can be found in the detailed description of the above embodiments, which will not be repeated here.

[0129] This application also discloses an electronic device that may include: at least one processor, at least one communication bus, a user interface, at least one network interface, and a memory.

[0130] The communication bus is used to enable communication between these components.

[0131] The user interface may include a display screen and a camera. Optional user interfaces may also include standard wired interfaces and wireless interfaces.

[0132] The network interface may include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0133] The processor may include one or more processing cores. It connects to various parts of the server via various interfaces and lines, executing instructions, programs, code sets, or instruction sets stored in memory, and accessing data stored in memory to perform various server functions and process data. Optionally, the processor may be implemented using at least one of the following hardware forms: Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor.

[0134] The memory may include random access memory (RAM) or read-only memory. Optionally, the memory may include a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor. As a computer storage medium, the memory may include an operating system, a network communication module, a user interface module, and an application program for surface defect detection based on surface coding and multi-view fusion.

[0135] In electronic devices, the user interface is primarily used to provide an input interface for users and acquire user input data. The processor can be used to call an application program stored in memory that describes a surface defect detection method based on surface coding and multi-view fusion. When executed by one or more processors, this causes the electronic device to perform one or more methods as described in the above embodiments. It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps can be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0136] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0137] In the various embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.

[0138] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0139] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0140] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0141] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will readily conceive of those skilled in the art upon consideration of the specification and the disclosure of practical truths.

[0142] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

Claims

1. A surface defect detection method based on curved surface coding and multi-view fusion, characterized in that, The method comprises the following steps: Constructing a curved surface encoding light system to generate an encoding light field and projecting it to a target surface; Synchronously collecting reflection images of the encoding light field by a multi-view imaging device to obtain a multi-dimensional view image data set; Separating light components from the multi-dimensional view image data set to extract a defect feature set; Integrating multi-view information of the defect feature set to obtain a comprehensive defect feature; Based on the comprehensive defect feature, defect determination and parameter calculation are performed on the target surface to output a defect detection result.

2. The surface defect detection method based on curved surface coding and multi-view fusion according to claim 1, characterized in that, The step of sychronously collecting reflection images of the encoding light field by a multi-view imaging device to obtain a multi-dimensional view image data set comprises: Calibrating internal and external parameters of the multi-view imaging device by a calibration device to generate calibration parameters; Based on the calibration parameters, a time sequence alignment of the projection of the encoding light field and the collection of the reflection images is realized by a synchronous triggering module. 3.The surface defect detection method based on curved surface coding and multi-view fusion according to claim 2, characterized in that, The method further comprises the following steps: Based on the calibration parameters, geometric registration is performed on the multi-dimensional view image data set; Gray calibration and noise filtering are performed on the registered multi-dimensional view image data set to eliminate differences between views.

4. The surface defect detection method based on curved surface coding and multi-view fusion according to claim 3, characterized in that, The step of separating light components from the multi-dimensional view image data set to extract a defect feature set comprises: High-order curved surface block planning is performed on the multi-dimensional view image data set to determine sub-aperture detection regions; Three-dimensional geometric correction is performed on each of the sub-aperture detection regions, and multi-resolution defect features are extracted by fusing corrected sub-region images.

5. The surface defect detection method based on curved surface coding and multi-view fusion according to claim 1, characterized in that, The step of constructing a curved surface encoding light system to generate an encoding light field and projecting it to a target surface comprises: The phase distribution of the encoding light field is modulated by controlling the number of phase shift steps, so that the encoding light field carries pre-encoding information of the gradient of the target surface, and the number of phase shift steps is adapted to the curvature of the target surface.

6. The surface defect detection method based on curved surface coding and multi-view fusion according to claim 5, characterized in that, The step of separating light components from the multi-dimensional view image data set to extract a defect feature set further comprises: Based on the phase characteristics of the encoding light field, diffuse reflection and specular reflection light components are separated; Based on the gradient of the target surface, the normal vector of the target surface is calculated and deduced, and defect features containing three-dimensional geometric information are extracted.

7. The surface defect detection method based on curved surface coding and multi-view fusion according to claim 1, characterized in that, The step of integrating multi-view information of the defect feature set to obtain a comprehensive defect feature comprises: Dimension reduction and splicing are performed on the defect feature set to construct a unified feature vector; A multi-view feature correlation model is established, and based on the unified feature vector, a comprehensive defect feature is output. 8.The surface defect detection method based on curved surface coding and multi-view fusion according to claim 1, characterized in that, The step of constructing a curved surface encoding light system to generate an encoding light field and projecting it to a target surface comprises: A one-dimensional pseudo-random sequence is generated, and a two-dimensional pseudo-random matrix is constructed; The field of view coverage integrity of the two-dimensional pseudo-random matrix on the target surface is verified, and the two-dimensional pseudo-random matrix that passes the verification is converted into an encoding light field that is adapted to the target surface.

9. A surface defect detection system based on curved surface coding and multi-view fusion, based on the surface defect detection method based on curved surface coding and multi-view fusion according to any one of claims 1-8, characterized in that, The method comprises the following steps: A curved surface encoding light system is used to generate and project an encoding light field, which carries pre-encoding information of the height gradient of a target surface through curvature adaptation and field of view adaptation; A multi-view imaging module comprises an industrial camera, a calibration device, and a synchronous triggering unit, the calibration device is used to solve camera internal and external parameters, the synchronous triggering unit is used to realize time sequence alignment, and the industrial camera is used to collect reflection images to generate a multi-dimensional view data set; An image preprocessing module is configured to perform geometric registration, grayscale calibration, and noise filtering based on calibration parameters, and output a standardized image; A defect feature extraction module is configured to extract and generate a defect feature set; A multi-view integration module is configured to splice the defect feature set into a unified feature vector, and output comprehensive defect features through multi-view feature correlation fusion; A result output module is configured to filter effective defects based on the comprehensive defect features, convert pixel parameters into physical parameters, divide defect levels, and generate a defect detection result.

10. The surface defect detection system based on curved surface coding and multi-view fusion according to claim 9, characterized in that, The curved surface encoding light system comprises: A phase shift encoding unit is configured to adapt the number of phase shift steps to the curvature of a target surface, and generate a sinusoidal phase shift light field carrying height gradient information of the target surface; A pseudo-random encoding unit is configured to construct a pseudo-random encoding matrix, and check whether the matrix meets the field of view requirement; A light field adaptation unit is configured to perform partition splicing adjustment on the pseudo-random encoding matrix, and convert the adjusted matrix into the encoding light field and project it onto the target surface; A field of view checking unit is configured to simulate the projection effect of the encoding light field on the target surface through optical simulation.

Citation Information

Patent Citations

  • Parameter mapping-based measurement planning method for complex curved surface

    CN108682043A

  • Detection method for curved glass surface defects by spatial encoding optical field

    CN110044927A

  • Wind power blade detection system

    CN110082355A

  • Three-dimensional measurement method, system and equipment based on polarization fringe projection and medium

    CN115979178A

  • Method and device for detecting defects on inner wall of cylinder of long barrel and storage medium

    CN117214172A

Cited By

  • Surface defect detection method and device based on multi-view synthetic imaging

    CN121599989A

  • Weld defect optical detection method and system based on multi-scale feature fusion

    CN121955029A

  • A welding seam defect optical detection method and system based on multi-scale feature fusion

    CN121955029B