Processing surface quality detection system and method based on microscopic image

By acquiring multifocal image sequences and performing ultra-depth field image synthesis and depth feature encoding, the problem of depth of field limitation in traditional microscopic detection is solved, and efficient and accurate processing surface quality detection is achieved.

CN120013938AActive Publication Date: 2025-05-16SHANGHAI MAGIC PHOTOELECTRIC TECH CO LTD

Patent Information

Application Number
CN202510488975.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-05-16
Estimated Expiration
2045-04-18

AI Technical Summary

Technical Problem

Due to the shallow depth of field limitation of the high-numerical aperture objective lens, the traditional microscopic detection method cannot clearly present the three-dimensional complex structure of the machining surface at the same time, resulting in defect missed detection or miscalculation of morphology, and the mechanical scanning efficiency is inefficient, making it difficult to achieve high-precision three-dimensional morphology reconstruction.

Method used

By obtaining the multifocal image sequence of the target product sample, a fully clear image is generated using ultra-depth field image synthesis technology, combining depth feature coding and adversarial generation network, key details are strengthened and weighted fusion is carried out in the spatial domain and the semantic domain, a significant fusion coded image of the panoramic depth visual feature is generated, and image preprocessing and calibration are performed, standardized images are generated and surface feature analysis and measurement are performed.

Benefits of technology

It has achieved breakthroughs in depth of field limitations at high resolution, improved the comprehensiveness and accuracy of detection, and can systematically quantify surface defects and texture uniformity, and meet the efficient and accurate needs of industrial inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120013938A_ABST
    Figure CN120013938A_ABST
Patent Text Reader

Abstract

The invention relates to the field of intelligent detection, and provides a machined surface quality detection system and method based on microscopic image.The method comprises the steps that firstly, a multi-focal-plane image sequence of a target product sample is obtained, and a full-clear image of the target product sample is generated through super-depth-of-field image synthesis; then preprocessing and calibrating the full-clear image to obtain a standardized image of the sample, then analyzing and measuring the surface characteristics of the sample based on the standardized image to generate structured data of the product processing surface quality, and finally determining the quality of the product according to a preset quality standard. And processing the structured data to form a product processing surface quality evaluation report. In this way, the comprehensiveness and accuracy of quality detection of the machined surface can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent detection, and more specifically, to a system and method for detecting machining surface quality based on microscopic images. Background Art

[0002] With the rapid development of precision manufacturing technology, the detection of machining surface quality is crucial to product performance and reliability. Microscopic imaging technology has become the core means of surface morphology analysis due to its high-resolution observation capabilities.

[0003] However, traditional microscopic inspection methods face significant challenges in practical applications. In order to achieve high-resolution imaging, the optical system of the microscope usually needs to use a high numerical aperture (NA) objective lens, but its inherent characteristics cause the depth of focus (depth of field) to decrease sharply. At the same time, the processed surface (such as the surface after milling, grinding or etching) often has three-dimensional complex structures at the micrometer to nanometer level, such as undulations, gullies or microcracks, which are distributed on different height planes. In order to capture tiny details (such as processing marks or defects), a high-magnification objective lens is required, but its shallow depth of field can only ensure clear imaging within an extremely narrow focal depth range, resulting in a single image that cannot simultaneously present complete information of surface peaks and troughs. Structures in the out-of-focus area may be blurred or even lost, resulting in missed defects or misjudgment of morphology, which seriously limits the comprehensiveness and accuracy of the inspection. Traditional methods usually rely on multi-position repeated focusing or mechanical scanning, which is not only inefficient, but also difficult to achieve high-precision three-dimensional morphology reconstruction. However, the technology that relies solely on single-frame image analysis is difficult to meet the needs of industrial inspection for comprehensive surface quality assessment due to information loss. This contradiction highlights the inherent defects of existing technologies between the limitations of optical principles, complex surface characteristics and the need for high-precision detection.

[0004] Therefore, an optimized microscopic image-based machining surface quality inspection solution is expected to break through the focus depth limitation at high resolution and realize an innovative method of full-surface clear imaging and precise feature extraction to solve the systematic bottleneck problem in microscopic image inspection. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present application provides a system and method for detecting the quality of a processed surface based on microscopic images.

[0006] According to one aspect of the present application, a method for detecting the quality of a machined surface based on a microscopic image is provided, comprising: Acquire a sequence of multi-focal plane images of a target product sample; Performing super-depth-of-field image synthesis on the sequence of multi-focal plane images to obtain a fully clear image of a target product sample, including: extracting visual features of each multi-focal plane image in the sequence of multi-focal plane images to obtain a sequence of multi-focal plane image visual feature coding maps; performing multi-focal plane panoramic depth of field visual feature enhancement fusion based on feature-guided receptive field on the sequence of multi-focal plane image visual feature coding maps to obtain a multi-focal plane panoramic depth of field visual feature significant fusion coding map; based on the multi-focal plane panoramic depth of field visual feature significant fusion coding map, obtaining a fully clear image of the target product sample; Performing image preprocessing and calibration on the full-resolution image of the target product sample to obtain a standardized image of the target product sample; Performing surface feature analysis and measurement on the standardized image of the target product sample to obtain product processing surface quality measurement structured data; Based on a preset quality standard of the machined surface, the product machined surface quality measurement structured data is processed to obtain a machined surface quality assessment report.

[0007] According to another aspect of the present application, a system for detecting the quality of a machined surface based on a microscopic image is provided, comprising: An image data acquisition module, used to acquire a sequence of multi-focal plane images of a target product sample; An image synthesis module is used to perform super-depth-of-field image synthesis on the sequence of multi-focal plane images to obtain a full-definition image of a target product sample, wherein the image synthesis module is used to: extract visual features of each multi-focal plane image in the sequence of multi-focal plane images to obtain a sequence of multi-focal plane image visual feature coding maps; perform multi-focal plane panoramic depth of field visual feature enhancement fusion based on feature-guided receptive field on the sequence of multi-focal plane image visual feature coding maps to obtain a multi-focal plane panoramic depth of field visual feature significant fusion coding map; obtain a full-definition image of the target product sample based on the multi-focal plane panoramic depth of field visual feature significant fusion coding map; An image preprocessing and calibration module, used for performing image preprocessing and calibration on the full-resolution image of the target product sample to obtain a standardized image of the target product sample; A surface feature analysis and measurement module, used to analyze and measure the surface features of the target product sample standardized image to obtain product processing surface quality measurement structured data; The evaluation report generation module is used to process the product processing surface quality measurement structured data based on a preset processing surface quality standard to obtain a processing surface quality evaluation report.

[0008] This application has significant technical effects due to the adoption of the above technical solutions: The processing surface quality detection system and method based on microscopic images provided in the present application first obtains a multi-focal plane image sequence of a target product sample, and generates a full-definition image of the target product sample through super-depth of field image synthesis, then pre-processes and calibrates the full-definition image to obtain a standardized image of the sample, then analyzes and measures the characteristics of the sample surface based on the standardized image to generate structured data of the product processing surface quality, and finally processes the structured data according to the preset quality standards to form a product processing surface quality assessment report. In this way, the comprehensiveness and accuracy of processing surface quality detection can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0010] Figure 1 Flow chart of a method for detecting machining surface quality based on microscopic images according to an embodiment of the present application.

[0011] Figure 2 Flow chart of step S2 in the method for detecting machining surface quality based on microscopic images according to an embodiment of the present application.

[0012] Figure 3 Flow chart of step S22 in the method for detecting machining surface quality based on microscopic images according to an embodiment of the present application.

[0013] Figure 4 Flow chart of step S221 in the method for detecting machining surface quality based on microscopic images according to an embodiment of the present application.

[0014] Figure 5 Flow chart of step S221 - 3 in the method for detecting machining surface quality based on microscopic images according to an embodiment of the present application.

[0015] Figure 6 4 is a system block diagram of a microscopic image-based machining surface quality detection system according to an embodiment of the present application. DETAILED DESCRIPTION

[0016] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.

[0017] The development of precision manufacturing technology has made the inspection of machining surface quality crucial to product performance, and microscopic imaging technology has become the core means of surface morphology analysis due to its high resolution. However, traditional microscopic inspection methods face significant challenges: although high numerical aperture (NA) objectives can achieve high-resolution imaging, their shallow depth of field means that a single image cannot clearly present all the details of a three-dimensional complex surface (such as micron to nanometer-level undulations, grooves or microcracks), resulting in missed defects or misjudgment of morphology. Traditional methods rely on multi-position repeated focusing or mechanical scanning, which is inefficient and difficult to achieve high-precision three-dimensional reconstruction, while single-frame image analysis cannot meet comprehensive evaluation needs due to missing information. These problems reflect the technical bottlenecks between optical limitations, complex surface characteristics and high-precision inspection requirements.

[0018] Based on this, this application proposes a method for detecting machining surface quality based on microscopic images. Figure 1 FIG. 1 is a flow chart of a method for detecting surface quality of a machined product based on a microscopic image according to an embodiment of the present application. Figure 1 As shown, the processing surface quality detection method based on microscopic images according to the embodiment of the present application includes: S1, acquiring a sequence of multi-focal surface images of a target product sample; S2, performing super-depth-of-field image synthesis on the sequence of multi-focal surface images to obtain a full-definition image of the target product sample; S3, performing image preprocessing and calibration on the full-definition image of the target product sample to obtain a standardized image of the target product sample; S4, performing surface feature analysis and measurement on the standardized image of the target product sample to obtain product processing surface quality measurement structured data; S5, based on a pre-set processing surface quality standard, processing the product processing surface quality measurement structured data to obtain a processing surface quality assessment report.

[0019] That is to say, the scheme of the present application can directly break through the shallow depth of field limitation of high numerical aperture objective lens by acquiring multi-focal plane image sequence of target product sample and using super depth of field synthesis technology to generate clear image covering the whole surface morphology. This method fuses local clear features on different focal planes into a single full focal plane image, solves the problem of loss of information of peaks, troughs or microcracks caused by defocusing of single frame imaging, and thus fully presents the details of three-dimensional complex structure. Subsequently, through standardized preprocessing and calibration, image distortion and noise interference are eliminated to provide a high-precision data basis for subsequent feature analysis. Surface quality measurement and evaluation based on structured data can systematically quantify key indicators such as surface defects and texture uniformity, avoiding the subjectivity and one-sidedness of traditional manual interpretation or single-frame analysis. Compared with traditional means relying on mechanical scanning or multi-position focusing, this technical solution significantly improves detection efficiency and data integrity while maintaining high resolution, and finally realizes full process optimization from imaging, analysis to evaluation, meeting the industrial needs of precision manufacturing for comprehensive and accurate detection of surface quality.

[0020] In step S1, a sequence of multi-focal plane images of the target product sample is obtained. It should be understood that the sequence of multi-focal plane images of the target product sample is a set of two-dimensional images obtained by scanning layer by layer at different focal plane positions by a microscopic imaging device. The sequence contains microstructural information of the target sample surface at different heights in the vertical direction, such as texture features, geometric morphology, and possible local defects (such as scratches, pits, or particles) at different depths. Due to the physical depth of field limitation of microscopic imaging, a single image can only clearly present the surface features within a specific focal plane, while the details of other areas cannot be fully captured due to defocus blur. By collecting a multi-focal plane image sequence covering all key height layers of the target product sample surface, it can be ensured that the surface features of different height areas are fully recorded in different images, thereby providing a multi-view and multi-focus raw data basis for subsequent super-depth image synthesis.

[0021] In step S2, the sequence of multi-focal plane images is subjected to super-depth image synthesis to obtain a full-definition image of the target product sample. It should be understood that high-resolution imaging requires the microscope to use a high numerical aperture objective lens, which will sharply reduce the depth of focus. However, there are three-dimensional complex structures from micrometer to nanometer levels on the processed surface, distributed on planes at different heights. When using a high-magnification objective lens, the shallow depth of field can only ensure clear imaging within an extremely narrow depth of focus range, and a single image cannot simultaneously present the complete information of the surface peaks and troughs. After obtaining the multi-focal plane image sequence, super-depth image synthesis can solve the problem of incomplete image information caused by the shallow depth of field of the objective lens. Traditional methods collect multi-focal plane image sequences and rely on gradient or wavelet transform-based algorithms to select the clearest area pixel by pixel for fusion. Although they can extend the depth of field to a certain extent, their inherent defects are significant: for example, gradient-based algorithms are susceptible to noise interference and have weak focus discrimination capabilities in low-contrast areas, which may lead to misjudgment of key defect areas; although wavelet transforms can extract multi-scale features, it is difficult to effectively distinguish between real surface details and out-of-focus blur artifacts, especially under complex textures or non-uniform lighting conditions, which can easily introduce splicing traces or information distortion. In addition, traditional methods only mechanically superimpose the "clearest pixels" and ignore the spatial correlation and contextual semantics between features on different focal planes (such as the continuity of microcracks and the global consistency of texture orientation), resulting in structural fractures or morphological distortions in the synthetic image, making it difficult to support high-precision surface quality analysis.

[0022] Based on this, the technical concept of the present application is to first extract the visual features of each focal plane image through deep feature coding to capture the hierarchical information of the surface microstructure (such as texture, crack contour, etc.). Subsequently, the local response of key details (such as defect edges and gully morphology) in different focal planes is enhanced, while suppressing blur artifacts and noise interference in the out-of-focus area. After that, through the fusion mechanism, the enhanced feature coding map is weighted fused in the spatial domain and the semantic domain to retain the contextual relevance of the clear areas in each focal plane image (such as the cross-focal plane extension features of continuous microcracks). Finally, the fused features are reconstructed with high fidelity to generate a globally clear full-focal plane image. This process is optimized through adversarial training, so that the synthetic image retains high-resolution details while avoiding the texture fracture or morphology distortion problems caused by pixel-level splicing in traditional methods, thereby ensuring the continuity and integrity of the three-dimensional surface structure. Compared with traditional fusion algorithms based on gradient or wavelet transform, this solution significantly improves the ability to recognize low-contrast defects, effectively distinguishes real surface features from defocus blur interference, strengthens the semantic consistency of key areas across the focal plane (such as processing traces extending along the three-dimensional surface), avoids structural breaks caused by mechanical pixel fusion, and further optimizes the visual coherence of image reconstruction, making the synthetic image closer to the real surface morphology, providing a highly reliable full-focal plane data basis for subsequent quality assessment, thereby systematically solving the problems of information loss and misjudgment caused by depth of field limitations in traditional microscopic inspection.

[0023] Specifically, Figure 2 FIG. 1 is a flow chart of step S2 in the method for detecting the quality of a machined surface based on a microscopic image according to an embodiment of the present application. Figure 2 As shown, the step S2 includes: S21, extracting the visual features of each multi-focus surface image in the sequence of multi-focus surface images to obtain a sequence of multi-focus surface image visual feature coding maps; S22, performing multi-focus surface panoramic depth visual feature enhancement fusion based on feature-guided receptive field on the sequence of multi-focus surface image visual feature coding maps to obtain a multi-focus surface panoramic depth visual feature significant fusion coding map; S23, obtaining a full-clear image of the target product sample based on the multi-focus surface panoramic depth visual feature significant fusion coding map.

[0024] In step S21, the visual features of each multi-focus surface image in the sequence of multi-focus surface images are extracted to obtain a sequence of multi-focus surface image visual feature coding maps. Specifically, in an embodiment of the present application, step S21 includes: using an Inception-based visual feature extractor to extract the visual features of each multi-focus surface image in the sequence of multi-focus surface images to obtain a sequence of multi-focus surface image visual feature coding maps. Accordingly, considering that the three-dimensional complex structure (such as microcracks, gullies, etc.) of the processing surface of the target product sample often has multi-level spatial distribution characteristics, and the blur artifacts of the out-of-focus area are highly mixed with the real surface details at the pixel level. If only relying on low-level features (such as edge gradients or brightness contrast), it is difficult to distinguish between effective information and noise interference, especially under low-contrast defects or non-uniform lighting conditions, it is easy to cause key feature misjudgment. In addition, the semantic relevance of the surface micro-morphology (such as the continuity of cracks and the topological structure of the texture orientation) cannot be captured by local pixel analysis, and such information is crucial to the comprehensiveness of subsequent quality assessment. Based on this, in the technical solution of the present application, the visual features of each multi-focal surface image in the sequence of multi-focal surface images are extracted to obtain a sequence of multi-focal surface image visual feature coding maps. In particular, in a specific example of the present application, a visual feature extractor based on Inception is used to extract the visual features of each multi-focal surface image in the sequence of multi-focal surface images to obtain a sequence of multi-focal surface image visual feature coding maps. It should be understood that the visual feature extractor based on Inception extracts multi-scale visual features from multi-focal surface images through a parallel multi-branch convolution structure (such as convolution kernels of different sizes). The Inception architecture can simultaneously capture the local fine details of the microscopic surface structure (such as the high-frequency information of the crack edge) and the contextual semantics of the macroscopic morphology (such as the global regularity of the texture orientation), and dynamically fuse these cross-scale features into a high-dimensional coding map. For example, the wide-domain features extracted by the larger convolution kernel can characterize the overall morphology of the gully, while the small convolution kernel focuses on the local sharpness changes of the microcracks. Through the adaptive weighted fusion of multi-scale features, the sequence of coding images can not only retain the details of the clear areas in each focal plane image, but also establish spatial correlations across focal planes and scales (such as the extension path of cracks on different height planes).

[0025] In step S22, the sequence of the multi-focal plane image visual feature coding maps is subjected to multi-focal plane panoramic depth visual feature enhancement fusion based on feature-guided receptive field to obtain a multi-focal plane panoramic depth visual feature significant fusion coding map. Specifically, Figure 3 FIG. 1 is a flow chart of step S22 in the method for detecting surface quality based on microscopic images according to an embodiment of the present application. Figure 3As shown, the step S22 includes: S221, performing visual feature saliency based on the feature-guided receptive field on each multi-focal surface image visual feature coding map in the sequence of multi-focal surface image visual feature coding maps to obtain a sequence of multi-focal surface image visual feature enhancement coding maps; S222, fusing the sequence of multi-focal surface image visual feature enhancement coding maps to obtain the multi-focal surface panoramic depth of field visual feature saliency fusion coding map.

[0026] In step S221, each of the multi-focal surface image visual feature coding maps in the sequence of multi-focal surface image visual feature coding maps is subjected to visual feature saliency based on the feature-guided receptive field to obtain a sequence of multi-focal surface image visual feature enhancement coding maps. Specifically, Figure 4 FIG. 2 is a flow chart of step S221 in the method for detecting the quality of a machined surface based on a microscopic image according to an embodiment of the present application. Figure 4 As shown, the step S221 includes: S221-1, performing feature decoupling on the multi-focus surface image visual feature coding map along the channel dimension to obtain a set of multi-focus surface image visual feature pixel-level initial vectors; S221-2, extracting the pixel-level initial feature vector at the (i, j)th pixel position from the set of multi-focus surface image visual feature pixel-level initial vectors as the multi-focus surface image visual feature pixel-level vector to be enhanced; S221-3, based on the set of multi-focus surface image visual feature pixel-level initial vectors, performing local significant fusion enhancement based on the receptive field on the multi-focus surface image visual feature pixel-level vector to be enhanced to obtain an enhanced multi-focus surface image visual feature pixel-level vector, wherein the enhanced multi-focus surface image visual feature pixel-level vector is the channel feature vector at the (i, j)th pixel position of the multi-focus surface image visual feature enhancement coding map.

[0027] It should be understood that although the feature encoding maps of different focal plane images already contain the semantic information of the surface structure, they are affected by defocus blur, material reflection and noise. However, the significant distribution of key features (such as microcracks and processing marks) in each focal plane image is different. Traditional feature enhancement methods with fixed receptive fields (such as global pooling or fixed-size convolution) are difficult to adapt to the local characteristics of three-dimensional surface structures: for example, the deep groove area of ​​the milling surface may be only partially clear in a certain focal plane, and its edge features are diffused in the adjacent focal plane due to defocus; if a receptive field of uniform size is used for feature enhancement, it may not be possible to accurately capture the continuous features across the focal plane, or the noise signal of the defocused area may be mistakenly enhanced as an effective feature. In addition, the local contrast of surface defects (such as nano-scale microcracks) is low, and it is easy to be ignored by conventional feature enhancement algorithms in the context of complex textures, resulting in the loss of key information in the subsequent fusion stage. Therefore, it is necessary to selectively enhance the effective surface details and suppress irrelevant interference based on the feature distribution characteristics of different regions through an adaptive enhancement mechanism that dynamically perceives the feature context. Based on this, the present application obtains a sequence of multi-focal surface image visual feature enhancement coding maps by performing visual feature saliency based on the feature-guided receptive field on each multi-focal surface image visual feature coding map in the sequence of multi-focal surface image visual feature coding maps.

[0028] Specifically, the feature vector of the pixel to be enhanced is first compressed and distilled to extract its core semantic information (such as edge direction and texture density). Then, according to the spatial distribution characteristics of the compressed features, the local receptive field size required for the pixel is dynamically predicted (for example, a small receptive field is required at the tip of a microcrack to focus on edge sharpness, while a large receptive field is used in a large polished area to capture texture consistency). Based on the dynamically determined receptive field range, the network aggregates the feature vectors of all pixels in the area, and through contextual relevance analysis (such as the continuity of the crack extension direction and the periodicity of the processed texture), the feature vector to be enhanced is weighted and enhanced to enhance the significant components related to surface quality (such as defect contours and gully morphology), while suppressing the response intensity of out-of-focus blur or reflective noise. In this way, the visual feature enhancement coding map of the multi-focal image obtained after the saliency processing can better retain the contextual relevance of the clear area in each focal image, and provide a high-quality feature coding map for the subsequent weighted fusion in the spatial domain and the semantic domain, so that the fusion process can more effectively utilize the information of each focal image and avoid poor fusion effect caused by unclear or disturbed features.

[0029] Specifically, in the embodiment of the present application, the step S221-1 includes: performing feature decoupling on the multi-focal plane image visual feature coding map along the channel dimension to obtain a set of multi-focal plane image visual feature pixel-level initial vectors, which can be expressed as follows:

[0030] in, is the visual feature encoding map of the multi-focal plane image, is the set of real numbers, and They are The height and width of each feature matrix along the channel dimension, yes The number of channels, It is feature decoupling. It is each multi-focal surface image visual feature pixel-level initial vector in the set of multi-focal surface image visual feature pixel-level initial vectors.

[0031] It should be understandable that since the feature coupling of different focal planes in multi-focal plane images may mask local key details (such as the faint edges of microcracks), the traditional feature expression with strong dependence between channels is prone to amplifying noise interference. By decoupling the features along the channel dimension and extracting the channel feature vector of each pixel independently, the redundant associations between channels can be broken and the interference of cross-channel coupling on local semantics can be reduced. This operation enables subsequent processing to focus on the multi-dimensional feature expression of a single pixel (such as texture density and edge sharpness), providing a basis for fine-grained analysis of the significant distribution of each pixel across focal planes. For example, for reflective areas, independent processing of pixel features can avoid the transmission of reflective noise from different focal planes between channels, thereby more accurately stripping off redundant information and creating conditions for subsequent dynamic receptive field adjustment.

[0032] Specifically, in the embodiment of the present application, the step S221-2 includes: extracting the pixel-level initial feature vector at the (i, j)th pixel position from the set of the multi-focus surface image visual feature pixel-level initial vectors as the multi-focus surface image visual feature pixel-level vector to be enhanced, which can be expressed as follows: in, yes The channel feature vector of the (i, j)th pixel position in , It is the pixel-level vector of visual features of the multi-focal image to be enhanced.

[0033] It should be understood that the local feature significance of multi-focal plane images has spatial heterogeneity (such as the significant contrast difference between the crack tip and the polished area), and it is necessary to anchor the central position pixel by pixel for targeted enhancement. By extracting the pixel-level initial feature vector at a specific position as the pixel-level vector of the visual feature of the multi-focal plane image to be enhanced, the model can adaptively analyze the association pattern of the surrounding contextual information with the current pixel as the core. For example, in the deep groove area of ​​the milling surface, the central pixel may be blurred due to defocus, but the pixel at the same spatial position in its adjacent focal plane may contain clear edge clues. In other words, the pixel-by-pixel processing mechanism ensures that the model dynamically fuses complementary information across focal planes, avoids the weakening of the sensitivity of local features by global unified operations, and thus improves the ability to locate nano-level defects.

[0034] Specifically, Figure 5 FIG. 2 is a flow chart of step S221-3 in the method for detecting surface quality based on microscopic images according to an embodiment of the present application. Figure 5 As shown, the step S221-3 includes: S221-31, compressing the information of the pixel-level vector of the visual feature of the multi-focus surface image to be enhanced to obtain the distilled vector of the visual feature of the multi-focus surface image to be enhanced; S221-32, determining the size of the multi-focus surface image visual feature receptive field of the distilled vector of the visual feature of the multi-focus surface image to be enhanced based on the feature distribution spatial structure characteristics of the distilled vector of the visual feature of the multi-focus surface image to be enhanced; S221-33, based on the size of the receptive field of the multi-focus surface image visual feature, screening out a set of pixel-level initial vectors within the local receptive field of the multi-focus surface image visual feature from the set of pixel-level initial vectors of the multi-focus surface image visual feature; S221-34, based on the set of pixel-level initial vectors within the local receptive field of the multi-focus surface image visual feature, performing significance enhancement on the pixel-level vector of the visual feature of the multi-focus surface image to be enhanced to obtain the enhanced pixel-level vector of the visual feature of the multi-focus surface image.

[0035] More specifically, in the embodiment of the present application, the step S221-31 includes: compressing the information of the pixel-level vector of the visual feature of the multi-focal plane image to be enhanced to obtain a distilled vector of the visual feature of the multi-focal plane image to be enhanced, which can be expressed as follows:

[0036] in, To calculate the Euclidean norm of a vector, It is the visual feature distillation vector of the multi-focal image to be enhanced.

[0037] It should be understandable that the original pixel-level vector of visual features of the multi-focal image to be enhanced may contain redundant noise (such as reflective artifacts or defocused dispersion signals), and direct use for receptive field prediction will introduce bias. By compressing information and retaining core semantic features (such as edge direction and texture consistency), the interference components in high-dimensional features can be significantly reduced. For example, for low-contrast areas of microcracks, the compression process can enhance their gradient direction features while suppressing random high-frequency noise in reflective areas. This operation not only improves the efficiency of feature representation, but also provides a more discriminative input for subsequent dynamic receptive field prediction - the compressed visual distillation features of the multi-focal image to be enhanced can more clearly reflect the spatial distribution characteristics of the local structure (such as the continuity of crack extension), thereby guiding the model to select an adaptive context aggregation range.

[0038] More specifically, in the embodiment of the present application, the step S221-32 includes: determining the size of the multi-focal plane image visual feature receptive field of the multi-focal plane image visual feature distillation vector to be enhanced based on the feature distribution spatial structure characteristics of the multi-focal plane image visual feature distillation vector to be enhanced, which can be expressed as the following formula:

[0039] in, is the logarithmic function value with base 2, yes The size of the receptive field of the visual features of multi-focal plane images.

[0040] It should be understandable that the traditional fixed receptive field is difficult to adapt to the scale diversity of multi-focal plane features (for example, deep grooves require a large receptive field to capture texture regularity, and microcracks require a small receptive field to retain edge details). By analyzing the spatial distribution characteristics of compressed features (such as gradient direction consistency and texture periodicity), the model can dynamically infer the optimal multi-focal plane image visual feature receptive field size. For example, when a high-intensity directional response (suggesting a potential crack edge) is detected in the visual feature distillation vector of the multi-focal plane image to be enhanced, the model automatically selects a small receptive field to focus on edge sharpening; in large polished areas with uniform texture, a large receptive field is used to aggregate the global context to enhance consistency judgment. This content-adaptive mechanism effectively solves the contradiction between continuous capture of cross-focal plane features and noise suppression.

[0041] More specifically, in the embodiment of the present application, the step S221-33 includes: based on the size of the receptive field of the multi-focal plane image visual feature, filtering out a set of pixel-level initial vectors within the local receptive field of the multi-focal plane image visual feature from the set of pixel-level initial vectors of the multi-focal plane image visual feature, which can be expressed as the following formula:

[0042] in, is the set of pixel-level initial vectors within the local receptive field of the multi-focal image visual features. They are Middle ) , ( ) , ( ) , ( ) and ( ) pixel-level initial vector within the local receptive field of the visual feature of the multi-focal image.

[0043] It should be understood that the dynamically determined receptive field range of the visual features of the multi-focal image needs to be efficiently converted into a specific set of contextual features to support saliency enhancement. By extracting local area features with the visual center pixel of the multi-focal image to be enhanced as the anchor point, the model can build a contextual information library related to the semantics of the current pixel. For example, the features of adjacent pixels in the direction of crack extension can provide continuity clues, while pixels perpendicular to the extension direction may contain background interference information. In other words, the screening process ensures that the aggregated features contain key contextual associations (such as the periodic regularity of the processed texture) while avoiding the introduction of noise in irrelevant areas through spatial range constraints. This step can provide a high-quality feature pool for subsequent weighted enhancement, enabling the model to distinguish between effective surface details and out-of-focus blur responses.

[0044] More specifically, in the embodiment of the present application, the step S221-34 includes: performing conformal commutativity-based feature processing on the set of pixel-level initial vectors in the local receptive field of the multi-focal surface image visual feature to obtain a first modulation weighting coefficient and a second modulation weighting coefficient; based on the first modulation weighting coefficient and the second modulation weighting coefficient, performing weighted fusion based on attention weights on the pixel-level vectors of the multi-focal surface image visual feature to be enhanced and the set of pixel-level initial vectors in the local receptive field of the multi-focal surface image visual feature to obtain the enhanced multi-focal surface image visual feature pixel-level vector. The above process can be expressed by the formula:

[0045]

[0046] in, yes Middle ) pixel-level initial vector in the local receptive field of the multi-focal image visual feature, is the visual feature scoring weight vector of multi-focal plane images, is matrix multiplication, yes function, yes The corresponding multi-focal image visual feature attention weights, and are the first modulation weighting coefficient and the second modulation weighting coefficient, respectively, yes The enhanced pixel-level vector of visual features of the multi-focal image after enhancement is the channel feature vector of the (i, j)th pixel position of the visual feature enhancement coding map of the multi-focal image.

[0047] It should be understood that the salient features of the clear area in the multi-focal plane image may be scattered in different focal planes (such as the crack is partially clear in focus and partially diffuse), and the cross-focal plane consistency expression needs to be strengthened through context association. The weighted fusion of the set of pixel-level initial vectors within the local receptive field of the multi-focal plane image visual feature can highlight the components related to surface quality (such as the cross-focal plane continuity of the defect contour) while suppressing the response of isolated noise points. For example, in the groove area, the model enhances the edge features in the clear focal plane and reduces the weight of the diffuse signal in the out-of-focus focal plane by analyzing the gradient consistency of the local features of the multi-focal plane. The final generated enhanced multi-focal plane image visual feature pixel-level vector not only retains the uniqueness of each focal plane, but also strengthens the robust representation of defects through cross-focal plane context association, providing highly discriminative input features for the subsequent fusion stage.

[0048] In particular, for the visual feature pixel-level vector of the multi-focal plane image to be enhanced The corresponding pixel-level initial vector in the local receptive field of the multi-focal image visual feature For a set of multi-focal plane image visual features, in order to enhance the amplification effect of the characteristic components related to saliency and the suppression / weakening effect of the characteristic components related to non-saliency, it is expected that the set of pixel-level initial vectors within the local receptive field of the multi-focal plane image visual features can have conformal representation, that is, it is expected that the pixel-level volume space representation within the local receptive field of the multi-focal plane image visual features and the pixel-level boundary representation within the local receptive field of the multi-focal plane image visual features can have a high correspondence.

[0049] Therefore, first determine the pixel-level volume space representation vector within the local receptive field of the multi-focal image visual feature:

[0050] The pixel-level boundary representation vector within the local receptive field of the multi-focal image visual feature is:

[0051] Then, by modulating the weighting coefficient and , to make the boundary surface-volume space tensor have the regularity that satisfies the commutation relation, that is, to make the pixel-level volume space representation vector in the local receptive field of the multi-focal image visual feature and pixel-level boundary representation vector within the local receptive field of multi-focal image visual features The spatial binorm of the inter-difference vector tends to the product of coefficients α and β:

[0052] in is the scaling factor.

[0053] In this way, by appropriately selecting boundary surface conditions and utilizing volume space conformal commutativity, the regularity specification standard is met, thereby achieving a highly conformal representation fusion of the pixel-level initial vectors of the local receptive field of each multi-focal surface image visual feature, thereby improving the context-aware feature significance expression of the enhanced multi-focal surface image visual feature pixel-level vector.

[0054] In step S222, the sequence of the multi-focal plane image visual feature enhancement coding maps is fused to obtain the multi-focal plane panoramic depth visual feature significant fusion coding map. Accordingly, considering that the sequence of the multi-focal plane image visual feature enhancement coding maps has enhanced the expression ability of each focal plane key feature through saliency processing, each focal plane feature code still independently represents the local clear area information of its corresponding focal plane. If the original pixels or shallow features are directly linearly superimposed, the three-dimensional surface topological structure across the focal plane (such as the cross-layer extension path of microcracks and the depth gradient change of gullies) cannot be effectively associated, resulting in geometric discontinuity or semantic faults in the transition area of ​​different focal layer features in the synthetic image (such as the junction of the crest and the trough). For example, the periodic tool marks on the milling surface appear as clear edges on a certain focal plane, but may appear blurred and diffused due to defocus on the adjacent focal plane. If the features of each focal plane are only mechanically merged, the coherence of the three-dimensional direction of the tool marks will be destroyed. Therefore, in order to establish spatial correlation and semantic consistency between cross-focal plane features and achieve complete reconstruction of three-dimensional surface morphology, the present application fuses the sequence of multi-focal plane image visual feature enhancement coding maps to obtain the multi-focal plane panoramic depth visual feature significant fusion coding map.

[0055] In particular, in a specific example of the present application, firstly, for a sequence of multi-focal plane image visual feature enhancement coding maps, an initial weight matrix is ​​constructed for each coding map. Figure 1The initial value is set in a uniformly distributed manner, so that each coding map has a balanced basic contribution in the initial stage of fusion, ensuring that the feature fusion deviation will not be caused by the excessively high or low weight of a certain coding map. Secondly, the feature similarity between each coding map is calculated pixel by pixel. For any two coding maps in the sequence, the corresponding feature vectors are extracted at the same pixel position, and the similarity is measured by comparing the directional consistency of the feature vectors in space. Specifically, the calculation of feature similarity focuses on the feature vectors at each pixel position in the coding map, analyzes its distribution relationship in the multidimensional feature space, and determines whether the features of different focal planes at this position belong to the same type of surface structure (such as clear crack edges or defocused blurred areas). Then, the weight matrix is ​​dynamically adjusted according to the feature similarity results. In the pixel area with high feature similarity, it indicates that the feature consistency of different focal planes in this area is strong and belongs to the effective feature of the real surface structure. Therefore, the weight of the corresponding coding map in this area is increased to enhance the fusion effect of such features; in the pixel area with low feature similarity, it indicates that the feature differences of different focal planes in this area are large, and there may be defocus blur or noise interference, so the weight of the corresponding coding map in this area is reduced to suppress the influence of such irrelevant or interfering features. The weight adjustment process follows the preset rules to ensure that the weight value changes dynamically within a reasonable range, highlighting the dominant role of effective features while avoiding excessive concentration of weights in a single coding map. Finally, after completing the dynamic adjustment of the weight matrix, the sequence of visual feature enhancement coding maps of multi-focal plane images is weighted fused. Taking each pixel position as a unit, the feature vectors of that position in all coding maps are multiplied by the corresponding weight value, and then the weighted feature vectors are accumulated to generate the feature vector of that position in the fused coding map. Through this pixel-by-pixel weighted accumulation operation, the effective features of different focal planes are integrated according to their credibility and significance, and finally a multi-focal plane panoramic depth of vision feature salient fusion coding map is formed.

[0056] In step S23, a coding map is significantly fused based on the multi-focal plane panoramic depth of vision feature to obtain a full-definition image of the target product sample. Specifically, in an embodiment of the present application, step S23 includes: inputting the multi-focal plane panoramic depth of vision feature significantly fused coding map into a super depth of field image synthesizer based on a generative adversarial network to obtain a full-definition image of the target product sample. It should be understood that the multi-focal plane panoramic depth of vision feature significantly fused coding map contains rich product sample visual information, but this information may be highly complex and nonlinear. The super depth of field image synthesizer based on the generative adversarial network can effectively process these complex features and convert them into full-definition images with clear details and accurate colors. That is, the generative adversarial network (GAN) has a strong generation ability, can learn the distribution law of data and generate realistic images. It continuously optimizes the parameters of the generator through the adversarial game between the generator and the discriminator, so that the generated image is more natural and realistic visually, and can capture the subtle features and structures in the image. Specifically, during the mapping process, the generator needs to use the features in the multi-focal plane panoramic depth of field visual feature saliency fusion coding map to determine the clarity value of each pixel position (that is, select the clearest pixel information at the corresponding position from the multi-focal plane sequence). The discriminator learns the statistical characteristics of the real full-definition image (such as the distribution of high-frequency components, the spatial correlation of edge gradients, etc.), forcing the image output by the generator to meet the clarity standards of actual optical imaging in terms of depth of field synthesis effects, such as eliminating out-of-focus blur and maintaining the coherence of the structure across the focal plane. After multiple rounds of iterative training, the generator can convert the input multi-focal plane panoramic depth of field visual feature saliency fusion coding map into an image with panoramic depth of field clarity effect, so as to achieve complete and clear reconstruction of the complex three-dimensional structure of the target product surface.

[0057] In summary, the step S2 is explained clearly, which first extracts the visual features of each focal plane image through deep feature coding to capture the hierarchical information of the surface microstructure, then strengthens the local response of key details in different focal planes, and suppresses blur artifacts and noise interference in the out-of-focus area, and then uses a fusion mechanism to weightedly fuse the enhanced feature coding map in the spatial domain and the semantic domain to retain the contextual relevance of the clear area in each focal plane image, and finally reconstructs the fused features with high fidelity to generate a globally clear full-focus plane image. In this way, the synthesized image can avoid the texture breakage or morphology distortion caused by pixel-level splicing in traditional methods while retaining high-resolution details, and ensure the continuity and integrity of the three-dimensional surface structure. Compared with traditional fusion algorithms based on gradient or wavelet transform, it can significantly improve the recognition ability of low-contrast defects, effectively distinguish real surface features from defocus blur interference, strengthen the semantic consistency of key areas across the focal plane, avoid structural breaks caused by mechanical pixel fusion, and further optimize the visual coherence of image reconstruction, making the synthetic image closer to the real surface morphology, providing a highly reliable full-focal surface data basis for subsequent quality assessment, thereby systematically solving the problems of information loss and misjudgment caused by depth of field limitations in traditional microscopic inspection.

[0058] In step S3, the full-clear image of the target product sample is subjected to image preprocessing and calibration to obtain a standardized image of the target product sample. Specifically, in an embodiment of the present application, the step S3 includes: performing noise filtering, contrast enhancement, brightness balancing and calibration processing on the full-clear image of the target product sample to obtain a standardized image of the target product sample. It should be understood that although the multi-focal plane fusion process expands the depth of field range, it is still affected by factors such as the inherent noise of the microscopic imaging system, the slight vibration caused by mechanical movement during multi-focal plane acquisition, the brightness difference caused by light source fluctuations, and the optical distortion of the objective lens. The synthesized full-clear image of the target product sample may contain high-frequency noise (such as sensor thermal noise, circuit noise), insufficient local contrast (such as blurred details at the bottom of deep grooves due to insufficient light scattering), uneven brightness across regions (such as darkening of the edge area due to attenuation of illumination at the edge of the objective lens), and geometric deformation (such as barrel distortion that bends straight textures). These interferences will directly affect the quantification accuracy of surface features (such as microcrack width, roughness parameters), especially when detecting low-contrast defects or nano-scale morphology, uncalibrated images may lead to systematic deviations in measurement, reducing the comparability of cross-batch or cross-device test results. Therefore, the present application performs noise filtering, contrast enhancement, brightness balance and calibration on the full-clear image of the target product sample to make the standardized image of the target product sample visually clearer, thereby obtaining a standardized image of the target product sample. Specifically, non-local mean filtering combined with wavelet threshold denoising is first used to filter out random noise in the synthetic image while retaining the high-frequency details of the surface microstructure (such as grinding texture and etching pits); then, local contrast is enhanced based on adaptive gamma correction and limited contrast histogram equalization (CLAHE), highlighting the edge gradient of low-illuminance areas (such as microcracks on the polished surface) while suppressing the loss of details in the overexposed area; for uneven brightness, the global illumination distribution is estimated through the Gaussian difference model, and an illumination compensation map is generated to perform pixel-level brightness correction on the original image to eliminate the edge attenuation effect; finally, based on the pre-calibrated objective lens distortion parameters and micron-level reference marks, the image is geometrically calibrated using affine transformation and perspective projection models, and the pixel coordinates are mapped to the physical space coordinate system to ensure the absolute scale consistency of the measurement parameters.

[0059] In step S4, the standardized image of the target product sample is subjected to surface feature analysis and measurement to obtain product processing surface quality measurement structured data. Accordingly, in the product processing process, surface quality is one of the key indicators to measure whether the product is qualified. Various factors in the processing process, such as tool wear, improper processing parameter settings, material property differences, etc., will affect the surface quality of the product. The standardized image of the target product sample contains detailed information on the product surface. By analyzing and measuring its surface features, it is possible to deeply understand the impact of the processing process on the surface quality, so as to find out possible problems and make improvements. Although the standardized image of the target product sample has been preprocessed and calibrated, the image itself is only a collection of pixels and cannot be directly used to quantify and evaluate the physical properties of the surface morphology (such as roughness, defect density, texture uniformity, etc.), reflecting the quality status of the product surface. It is necessary to analyze and measure the surface features in the image through specific algorithms and methods, and convert the image information into quantifiable and meaningful structured data for subsequent evaluation and decision-making.

[0060] Specifically, the specific processing process of surface feature analysis and measurement of the standardized image of the target product sample to obtain the structured data of product processing surface quality measurement is as follows: first, defect detection and identification are carried out, and the edge detection algorithm is used to outline the potential defect contours in the standardized image, and the defect area is separated by the threshold segmentation algorithm to form a binary image to highlight the defect shape. For complex or fuzzy defects, the template matching algorithm is used to compare the pre-established defect template with the suspicious area of ​​the image to confirm the type. At the same time, a classifier based on machine learning is introduced to automatically identify surface anomalies such as pollutants and particulate matter by learning image texture, shape and other features, mark the defect location and record the type. After the defect identification is completed, the identified defects or areas of interest are accurately measured. Two-dimensional measurements such as length, width, area, diameter, angle, etc. are performed using image calibration parameters (the conversion relationship between pixels and actual physical dimensions); if the image is fused with three-dimensional information (such as height data inferred from multi-focal plane images), three-dimensional parameters such as depth and volume are further measured, and image interpolation and sub-pixel positioning technology are used to improve the accuracy during measurement. Then, the surface roughness analysis is carried out. Based on the image grayscale information or three-dimensional surface morphology data, in strict accordance with international standards such as ISO 4287 and ISO 25178, the arithmetic mean roughness (Ra), maximum profile height (Rz), surface roughness parameters (Sa, Sz), etc. are calculated, and the sampling length and evaluation length are clarified to ensure that the parameters meet the industrial inspection specifications. Then, the particles attached to the surface are counted, and the particles are separated from the background and other structures through image segmentation technology. The area, perimeter, equivalent diameter and other characteristics of each particle are measured, and the particles are classified according to the preset classification standards (such as size threshold, shape characteristics), and the number and proportion of each type are counted to form particle size distribution data. Finally, the results of each link are integrated to form structured data containing multi-dimensional information, specifically covering the defect list (recording defect type, location, two-dimensional / three-dimensional size), key dimension measurement values ​​(such as the length and width of a specific structure), surface roughness parameters (Ra, Rz, Sa, Sz, etc.), and particle statistics (total number of particles, number of classifications, and size distribution ratio). These data are stored and presented in a unified format, providing a clear and standardized quantitative basis for subsequent product processing surface quality assessment.

[0061] In step S5, based on the pre-set quality standard of the processed surface, the structured data of the product processing surface quality measurement is processed to obtain a processing surface quality assessment report. It should be understood that although the structured data has quantitatively characterized the surface morphology parameters (such as roughness, defect distribution, texture uniformity, etc.), the quality judgment in the industrial scenario needs to be based on clear standards, such as the tolerance threshold of the length of surface microcracks of aviation parts and the grade requirements of the polishing surface roughness of precision molds. The traditional manual interpretation method relies on the experience of engineers to compare standard documents, which has subjective bias and low efficiency. Especially when the detection parameter dimensions are complex (such as multi-region roughness joint judgment, cross-scale defect correlation analysis), it is easy to cause misjudgment due to human omissions or inconsistent understanding of standards. In addition, the differentiated requirements of different customers or industry standards (such as ISO, ASTM) require dynamic adaptation of the judgment logic, and the traditional fixed threshold method is difficult to meet flexible needs. Therefore, it is necessary to intelligently match the structured data with the preset quality standards to achieve objective and traceable quality evaluation.

[0062] Specifically, based on the pre-set quality standards for the processed surface, the specific processing process of processing the structured data of the product processing surface quality measurement to obtain the processing surface quality assessment report is as follows: First, the structured data including the defect list, key dimension measurement values, surface roughness parameters, particle statistical results, etc., together with the pre-set quality standards (such as the allowable defect type, size and number upper limit, roughness range, particle size and distribution standards, etc.) are imported into the assessment report generation module, and each indicator in the structured data is analyzed and compared one by one, carefully checking whether the type of defect is a dangerous defect outside the allowable range of the standard, whether the measured defect size (length, depth, area, etc.) exceeds the specified threshold, and whether the number of statistical defects is within the allowable range. At the same time, check whether the surface roughness parameters (such as Ra, Rz, etc.) meet the roughness range requirements, and confirm whether the particle statistical results (quantity, size distribution, etc.) meet the standards. Then, make a comprehensive judgment based on the comparison results of various indicators. If all indicators meet the preset standards, the surface quality is judged to be "qualified"; if some indicators exceed the standards but are within the acceptable grading range (such as the number of minor defects does not exceed the standard), they are graded according to the preset rules (such as level 1, level 2, etc.); if key indicators (such as the presence of dangerous defects, serious roughness exceeding the standard) do not meet the standards, they are judged to be "unqualified". Finally, a comprehensive test report is automatically generated, and the report content covers several key parts. The first is the basic information of the sample, recording the unique identification (ID), name, specifications and other basic information of the target product sample to ensure that the report accurately corresponds to the test object. The second is the test settings, indicating the objective lens magnification, lighting conditions, imaging equipment parameters, etc. used in the test process, so that the test conditions are traceable. The report will be attached with a synthesized full-definition microscopic image, which intuitively shows the overall morphology of the product processing surface, and also contains key feature images, such as images marking the location and morphology of defects, which is convenient for rapid positioning and identification of surface anomalies. The detailed measurement data list is presented in a table, including the type, location, size (two-dimensional or three-dimensional) of the defect, the dimensional measurement value of the key structure, the specific value of the surface roughness parameter, the number of particle statistics and classification results, etc., providing comprehensive quantitative data. The quality assessment results section clearly marks the quality judgment conclusion (qualified, unqualified) or grade. If unqualified, the specific indicators that do not meet the standards are pointed out (such as a defect size exceeding the standard, roughness parameters exceeding the range). In addition, the report can be exported to standardized formats such as PDF, Excel, CSV, etc., which is convenient for archiving, review or interaction with other systems, meeting the requirements for report standardization and universality in industrial inspection.

[0063] In summary, the microscopic image-based processing surface quality detection method based on the embodiment of the present application is explained, which first obtains a multi-focal plane image sequence of the target product sample, and generates a full-definition image of the target product sample through super-depth image synthesis, and then pre-processes and calibrates the full-definition image to obtain a standardized image of the sample, and then analyzes and measures the characteristics of the sample surface based on the standardized image to generate structured data of the product processing surface quality, and finally processes the structured data according to the preset quality standard to form a product processing surface quality assessment report. In this way, the comprehensiveness and accuracy of processing surface quality detection can be effectively improved.

[0064] Figure 6 FIG. 1 is a system block diagram of a microscopic image-based processing surface quality detection system according to an embodiment of the present application. Figure 6 As shown, according to the embodiment of the present application, the processing surface quality detection system 100 based on microscopic images includes: an image data acquisition module 110, which is used to acquire a sequence of multi-focal surface images of a target product sample; an image synthesis module 120, which is used to perform super-depth-of-field image synthesis on the sequence of multi-focal surface images to obtain a full-definition image of the target product sample; an image preprocessing and calibration module 130, which is used to perform image preprocessing and calibration on the full-definition image of the target product sample to obtain a standardized image of the target product sample; a surface feature analysis and measurement module 140, which is used to perform surface feature analysis and measurement on the standardized image of the target product sample to obtain product processing surface quality measurement structured data; an evaluation report generation module 150, which is used to process the product processing surface quality measurement structured data based on a preset processing surface quality standard to obtain a processing surface quality evaluation report.

[0065] Here, those skilled in the art will appreciate that the specific functions and operations of the various units and modules in the above-mentioned microscopic image-based surface quality detection system 100 have been described in detail above. Figures 1 to 5 The description of the microscopic image-based machining surface quality detection method has been introduced in detail, and therefore, its repeated description will be omitted.

[0066] In summary, the microscopic image-based processing surface quality detection system 100 according to the embodiment of the present application is explained, which first obtains a multi-focal plane image sequence of a target product sample, and generates a full-definition image of the target product sample through super-depth of field image synthesis, and then pre-processes and calibrates the full-definition image to obtain a standardized image of the sample, and then analyzes and measures the characteristics of the sample surface based on the standardized image to generate structured data of the product processing surface quality, and finally processes the structured data according to the preset quality standard to form a product processing surface quality assessment report. In this way, the comprehensiveness and accuracy of processing surface quality detection can be effectively improved.

[0067] In other embodiments of the present application, a digital microscope is provided. Specifically, in terms of imaging, high-definition images can be generated at full resolution, and multiple compressed or uncompressed formats such as JPEG, JPEG2000, TIFF and BMP can be saved; the standard optical head can realize observation methods such as deflection, field, MIX, polarization, differential interference and can be easily switched, the infrared optical head can penetrate the silicon base to observe the internal semiconductor circuit, and the fluorescence observation can excite organic materials and bio-organic samples; the single field of view is up to 21mm, which is convenient for observing the whole sample; it has a "super depth of field" function, which can expand the standard focal depth of the objective lens by capturing images of different focal planes, and the extended exposure function of the EE EF module can combine different exposure images into a single image with perfect exposure; the field of view can be expanded through the electric XY platform, and the user only needs to move the stage to two relative corners of the area of ​​interest, and the software can automatically complete the rest of the operations to achieve automatic puzzle, which can be combined with extended depth of field, extended image dynamics and automatic focus. In terms of measurement and analysis, images or real-time videos can be obtained. The length, area, angle, diameter and other measurement tools provided by DeltaPix InSight 6.0 software can accurately measure the captured objects. The actual size and measurement results can be saved on the image or exported to Excel, CSV or PDF files. The digital microscope is also equipped with a surface analysis and measurement system with 3D functions, which can realize 2D measurements such as angles, distances and areas. The combination of multiple light source options and the high resolution of the long working distance optical system can easily realize image surface visualization. It is available in XY scanning mode and can automatically capture detailed 3D images at pre-saved XYZ positions for later analysis. After a single imaging, the digital microscope can switch between multiple imaging modes such as 2D images, 3D true color images, 3D black and white images, 3D height maps, etc. with one click. The digital microscope is equipped with DeltaPix InSight, which provides non-contact line roughness and surface roughness measurements in accordance with ISO 4287:1997 line roughness standards and ISO 25178-2:2012 surface roughness standards. The software can be applied to various scenarios for analyzing surface textures. It can also perform particle classification and statistical counting based on statistical object features, and export the results to Excel spreadsheets for further processing.

Claims

1. A method for detecting the quality of a machined surface based on a microscopic image, characterized in that: include: Acquire a sequence of multi-focal plane images of a target product sample; Performing super-depth-of-field image synthesis on the sequence of multi-focal plane images to obtain a fully clear image of a target product sample, including: extracting visual features of each multi-focal plane image in the sequence of multi-focal plane images to obtain a sequence of multi-focal plane image visual feature coding maps; performing multi-focal plane panoramic depth of field visual feature enhancement fusion based on feature-guided receptive field on the sequence of multi-focal plane image visual feature coding maps to obtain a multi-focal plane panoramic depth of field visual feature significant fusion coding map; based on the multi-focal plane panoramic depth of field visual feature significant fusion coding map, obtaining a fully clear image of the target product sample; Performing image preprocessing and calibration on the full-resolution image of the target product sample to obtain a standardized image of the target product sample; Performing surface feature analysis and measurement on the standardized image of the target product sample to obtain product processing surface quality measurement structured data; Based on a preset quality standard of the machined surface, the product machined surface quality measurement structured data is processed to obtain a machined surface quality assessment report.

2. The method for detecting surface quality of a machined product based on a microscopic image according to claim 1, characterized in that: Extracting visual features of each multi-focus surface image in the sequence of multi-focus surface images to obtain a sequence of multi-focus surface image visual feature coding maps, including: using an Inception-based visual feature extractor to extract visual features of each multi-focus surface image in the sequence of multi-focus surface images to obtain a sequence of multi-focus surface image visual feature coding maps.

3. The method for detecting surface quality of a machined product based on a microscopic image according to claim 1, characterized in that: Performing multi-focal plane panoramic depth visual feature enhancement fusion based on feature-guided receptive field on the sequence of multi-focal plane image visual feature coding maps to obtain a multi-focal plane panoramic depth visual feature significant fusion coding map, including: Performing visual feature saliency based on feature-guided receptive field on each of the multi-focal surface image visual feature coding maps in the sequence of multi-focal surface image visual feature coding maps to obtain a sequence of multi-focal surface image visual feature enhancement coding maps; The sequence of the multi-focal plane image visual feature enhancement coding maps is fused to obtain the multi-focal plane panoramic depth visual feature significant fusion coding map.

4. The method for detecting the quality of a machined surface based on a microscopic image according to claim 3, characterized in that: Performing visual feature saliency based on feature-guided receptive field on each of the multi-focal surface image visual feature coding maps in the sequence of multi-focal surface image visual feature coding maps to obtain a sequence of multi-focal surface image visual feature enhancement coding maps, comprising: Performing feature decoupling on the multi-focal plane image visual feature coding map along the channel dimension to obtain a set of multi-focal plane image visual feature pixel-level initial vectors; Extracting the pixel-level initial feature vector at the (i, j)th pixel position from the set of the multi-focal surface image visual feature pixel-level initial vectors as the multi-focal surface image visual feature pixel-level vector to be enhanced; Based on the set of initial pixel-level vectors of the multi-focal surface image visual features, the pixel-level vectors of the multi-focal surface image visual features to be enhanced are subjected to local significant fusion enhancement based on the receptive field to obtain enhanced pixel-level vectors of the multi-focal surface image visual features, wherein the enhanced pixel-level vector of the multi-focal surface image visual features is the channel feature vector of the (i, j)th pixel position of the multi-focal surface image visual feature enhancement coding map.

5. The method for detecting the quality of a machined surface based on a microscopic image according to claim 4, characterized in that: Based on the set of the multi-focal surface image visual feature pixel-level initial vectors, the multi-focal surface image visual feature pixel-level vectors to be enhanced are subjected to local significant fusion enhancement based on the receptive field to obtain enhanced multi-focal surface image visual feature pixel-level vectors, including: Performing information compression on the pixel-level vector of visual features of the multi-focal plane image to be enhanced to obtain a distilled vector of visual features of the multi-focal plane image to be enhanced; Determining the size of the multi-focal plane image visual feature receptive field of the multi-focal plane image visual feature distillation vector to be enhanced based on the feature distribution spatial structure characteristics of the multi-focal plane image visual feature distillation vector to be enhanced; Based on the size of the receptive field of the multi-focal plane image visual feature, a set of pixel-level initial vectors within the local receptive field of the multi-focal plane image visual feature is screened out from the set of pixel-level initial vectors of the multi-focal plane image visual feature; Based on a set of pixel-level initial vectors within the local receptive field of the multi-focal surface image visual feature, the pixel-level vector of the multi-focal surface image visual feature to be enhanced is significantly enhanced to obtain the enhanced multi-focal surface image visual feature pixel-level vector.

6. The method for detecting the quality of a machined surface based on a microscopic image according to claim 5, characterized in that: Based on a set of pixel-level initial vectors in a local receptive field of the multi-focal surface image visual feature, the pixel-level vector of the multi-focal surface image visual feature to be enhanced is significantly enhanced to obtain the enhanced multi-focal surface image visual feature pixel-level vector, including: Performing conformal commutativity-based feature processing on a set of pixel-level initial vectors within a local receptive field of visual features of the multi-focal plane image to obtain a first modulation weighting coefficient and a second modulation weighting coefficient; Based on the first modulation weighting coefficient and the second modulation weighting coefficient, the pixel-level vector of the visual feature of the multi-focal surface image to be enhanced and the set of pixel-level initial vectors within the local receptive field of the visual feature of the multi-focal surface image are weighted fused based on the attention weight to obtain the pixel-level vector of the enhanced multi-focal surface image visual feature.

7. The method for detecting the quality of a machined surface based on a microscopic image according to claim 6, characterized in that: Based on the multi-focal plane panoramic depth of field visual feature significant fusion coding map, a full-definition image of the target product sample is obtained, including: inputting the multi-focal plane panoramic depth of field visual feature significant fusion coding map into a super depth of field image synthesizer based on a generative adversarial network to obtain a full-definition image of the target product sample.

8. The method for detecting the quality of a machined surface based on a microscopic image according to claim 7, characterized in that: The full-clear image of the target product sample is subjected to image preprocessing and calibration to obtain a standardized image of the target product sample, including: performing noise filtering, contrast enhancement, brightness equalization and calibration processing on the full-clear image of the target product sample to obtain a standardized image of the target product sample.

9. A processing surface quality detection system based on microscopic images, characterized in that: include: An image data acquisition module, used to acquire a sequence of multi-focal plane images of a target product sample; An image synthesis module is used to perform super-depth-of-field image synthesis on the sequence of multi-focal plane images to obtain a full-definition image of a target product sample, wherein the image synthesis module is used to: extract visual features of each multi-focal plane image in the sequence of multi-focal plane images to obtain a sequence of multi-focal plane image visual feature coding maps; perform multi-focal plane panoramic depth of field visual feature enhancement fusion based on feature-guided receptive field on the sequence of multi-focal plane image visual feature coding maps to obtain a multi-focal plane panoramic depth of field visual feature significant fusion coding map; obtain a full-definition image of the target product sample based on the multi-focal plane panoramic depth of field visual feature significant fusion coding map; An image preprocessing and calibration module, used for performing image preprocessing and calibration on the full-resolution image of the target product sample to obtain a standardized image of the target product sample; A surface feature analysis and measurement module, used to analyze and measure the surface features of the target product sample standardized image to obtain product processing surface quality measurement structured data; The evaluation report generation module is used to process the product processing surface quality measurement structured data based on a preset processing surface quality standard to obtain a processing surface quality evaluation report.

10. The microscopic image-based processing surface quality detection system according to claim 9, characterized in that: The image preprocessing and calibration module is used to perform noise filtering, contrast enhancement, brightness balance and calibration processing on the full-resolution image of the target product sample to obtain a standardized image of the target product sample.

Citation Information

Patent Citations

  • Super-resolution image reconstruction method and system based on pixel-level attention mechanism

    CN114372918A

  • Single-channel image-oriented high-performance deep learning model and training method

    CN116206182A

  • Salient target detection method and device

    CN116310394A

  • Image processing model training method, image processing method and related equipment

    CN119478760A

  • Multi-focal-plane image fusion method and system for three-dimensional workpiece detection

    CN119693252A

Cited By

  • Image data processing method and system of visual laryngoscope projection system

    CN120186314A

  • Chip packaging condition nondestructive analysis system and method based on microscopic detection

    CN120259279A

  • BIM-based airport runway pavement intelligent management method and system, and medium

    CN120564028A

  • Image preprocessing data processing method and system for small defects on surface of semiconductor equipment component

    CN121599983A

  • Data processing method and system for pre-processing image of micro-defects on surface of semiconductor device component

    CN121599983B