Microscopic Image-based Machined Surface Quality Detection System and Method
By acquiring multifocal image sequences for ultra-depth of field image synthesis and feature coding fusion, the problems of information loss and misjudgment caused by depth of field limitation in traditional microscopy detection are solved, and efficient and accurate processing surface quality detection is achieved.
Patent Information
- Application Number
- CN202510488975.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-04-18
AI Technical Summary
Due to the shallow depth of field limitation of the high-numerical aperture objective lens, the single image cannot clearly present the three-dimensional complex structure of the processed surface at the same time, resulting in defect miss detection or miscalculation of morphology. The traditional method is inefficient and difficult to achieve high-precision three-dimensional morphology reconstruction.
By obtaining the multifocal image sequence of the target product, super-depth image synthesis is performed, visual features are extracted and feature encoding and fusion is performed, a fully clear image is generated, and image preprocessing and calibration is performed, and a quality evaluation report is generated based on preset standards.
It has achieved breakthroughs in depth of field limitations at high resolution, improved the comprehensiveness and accuracy of detection, ensured the continuity and integrity of the three-dimensional surface structure, and improved the detection efficiency and data integrity.
Smart Images

Figure CN120013938B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent detection, and more specifically, to a processing surface quality detection system and method based on microscopic images. Background Art
[0002] With the rapid development of precision manufacturing technology, the detection of processing surface quality is crucial for product performance and reliability. Microscopic image technology has become the core means for surface topography analysis due to its high-resolution observation ability.
[0003] However, traditional microscopic detection methods face significant challenges in practical applications. To achieve high-resolution imaging, the optical system of a microscope usually uses an objective lens with a high numerical aperture (NA), but its inherent characteristics lead to a sharp reduction in the depth of focus (depth of field). At the same time, the processed surface (such as the surface after milling, grinding, or etching) often has three-dimensional complex structures at the micron to nanometer scale, such as undulations, grooves, or microcracks, and these features are distributed on different height planes. To capture minute 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 depth of focus range, resulting in a single image being unable to simultaneously present the complete information of the surface peaks and valleys. Structures in the defocused area may be blurred or even lost, causing missed detection of defects or misjudgment of topography, severely limiting the comprehensiveness and accuracy of detection. Traditional methods usually rely on repeated focusing at multiple positions or mechanical scanning, which is not only inefficient but also difficult to achieve high-precision three-dimensional topography reconstruction. And techniques that solely rely on single-frame image analysis cannot meet the requirements of industrial inspection for a comprehensive assessment of surface quality due to the lack of information. This contradiction highlights the inherent defects in the existing technology between the limitations of optical principles, complex surface characteristics, and the requirements for high-precision detection.
[0004] Therefore, an optimized processing surface quality detection solution based on microscopic images is desired, which can break through the depth-of-focus limitation at high resolution, achieve clear imaging of the entire surface, and an innovative method for accurate feature extraction to solve the systematic bottleneck problems in microscopic image detection. Summary of the Invention
[0005] This application aims at the deficiencies in the prior art and provides a processing surface quality detection system and method based on microscopic images.
[0006] According to one aspect of this application, a processing surface quality detection method based on microscopic images is provided, which includes:
[0007] Obtaining a sequence of multi-focus images of a target product sample;
[0008] Performing super-depth-of-field image synthesis on the sequence of multi-focal plane images to obtain a fully clear image of the target product sample, including: extracting the 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 encoding maps; performing multi-focal plane panoramic depth visual feature enhancement and fusion based on feature-guided receptive fields on the sequence of multi-focal plane image visual feature encoding maps to obtain a multi-focal plane panoramic depth visual feature significantly fused encoding map; and obtaining the fully clear image of the target product sample based on the multi-focal plane panoramic depth visual feature significantly fused encoding map;
[0009] Performing image preprocessing and calibration on the fully clear image of the target product sample to obtain a standardized image of the target product sample;
[0010] Performing surface feature analysis and measurement on the standardized image of the target product sample to obtain structured data for measuring the quality of the processed surface of the product;
[0011] Processing the structured data for measuring the quality of the processed surface of the product based on a preset quality standard for the processed surface to obtain a processing surface quality assessment report.
[0012] According to another aspect of the present application, there is provided a processing surface quality detection system based on microscopic images, which includes:
[0013] An image data acquisition module for acquiring a sequence of multi-focal plane images of a target product sample;
[0014] An image synthesis module for performing super-depth-of-field image synthesis on the sequence of multi-focal plane images to obtain a fully clear image of the target product sample, wherein the image synthesis module is configured to: extract the 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 encoding maps; perform multi-focal plane panoramic depth visual feature enhancement and fusion based on feature-guided receptive fields on the sequence of multi-focal plane image visual feature encoding maps to obtain a multi-focal plane panoramic depth visual feature significantly fused encoding map; and obtain the fully clear image of the target product sample based on the multi-focal plane panoramic depth visual feature significantly fused encoding map;
[0015] An image preprocessing and calibration module for performing image preprocessing and calibration on the fully clear image of the target product sample to obtain a standardized image of the target product sample;
[0016] A surface feature analysis and measurement module for performing surface feature analysis and measurement on the standardized image of the target product sample to obtain structured data for measuring the quality of the processed surface of the product;
[0017] An evaluation report generation module is configured to process the structured data of the measured quality of the product processing surface based on a preset quality standard of the processing surface to obtain a processing surface quality evaluation report.
[0018] Due to the adoption of the above technical solution, this application has remarkable technical effects:
[0019] The processing surface quality detection system and method based on microscopic images provided by this application first obtains a multi-focus image sequence of a target product sample, generates a fully clear image of the target product sample through super-depth-of-field image synthesis, then preprocesses and calibrates the fully clear image to obtain a standardized image of the sample, then analyzes and measures the features 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 processing surface quality evaluation report of the product. In this way, the comprehensiveness and accuracy of processing surface quality detection can be effectively improved. Description of the Drawings
[0020] By describing the embodiments of the present application in more detail in conjunction with the drawings, the above and other objects, features, and advantages of the present application will become more obvious. The 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 to the present application. In the drawings, the same reference numerals generally represent the same components or steps.
[0021] Figure 1 It is a flowchart of a processing surface quality detection method based on microscopic images according to an embodiment of the present application.
[0022] Figure 2 It is a flowchart of step S2 in the processing surface quality detection method based on microscopic images according to an embodiment of the present application.
[0023] Figure 3 It is a flowchart of step S22 in the processing surface quality detection method based on microscopic images according to an embodiment of the present application.
[0024] Figure 4 It is a flowchart of step S221 in the processing surface quality detection method based on microscopic images according to an embodiment of the present application.
[0025] Figure 5 It is a flowchart of step S221-3 in the processing surface quality detection method based on microscopic images according to an embodiment of the present application.
[0026] Figure 6 It is a system block diagram of a processing surface quality detection system based on microscopic images according to an embodiment of the present application. Detailed Description of the Embodiments
[0027] Next, exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all embodiments of the present application. It should be understood that the present application is not limited by the exemplary embodiments described herein.
[0028] The development of precision manufacturing technology has made the detection of machining surface quality crucial for product performance. Microscopic image technology has become the core means for surface topography analysis due to its high resolution. However, traditional microscopic detection methods face significant challenges: Although high numerical aperture (NA) objectives can achieve high-resolution imaging, their shallow depth of field results in single images being unable to clearly present all details of three-dimensional complex surfaces (such as micrometer- to nanometer-scale undulations, grooves, or microcracks), causing missed defect detections or misjudgments of topography. Traditional methods rely on repeated focusing at multiple positions or mechanical scanning, which is inefficient and difficult to achieve high-precision three-dimensional reconstruction. Single-frame image analysis cannot meet the comprehensive evaluation requirements due to missing information. These problems reflect the technical bottleneck between optical limitations, complex surface characteristics, and high-precision detection requirements.
[0029] Based on this, the present application proposes a method for detecting machining surface quality based on microscopic images. Figure 1 It is a flowchart of the method for detecting machining surface quality based on microscopic images according to an embodiment of the present application. As Figure 1 shown, the method for detecting machining surface quality based on microscopic images according to an embodiment of the present application includes: S1, obtaining a sequence of multi-focal plane images of a target product sample; S2, performing super-depth-of-field image synthesis on the sequence of multi-focal plane images to obtain a fully clear image of the target product sample; S3, performing image preprocessing and calibration on the fully clear 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 structured data for measuring the machining surface quality of the product; S5, based on a pre-set quality standard for the machining surface, processing the structured data for measuring the machining surface quality of the product to obtain a machining surface quality evaluation report.
[0030] That is to say, the solution of this application can directly break through the shallow depth of field limitation of high numerical aperture objective lenses by obtaining a multi-focal plane image sequence of the target product sample and using super-depth-of-field synthesis technology to generate a clear image covering the entire surface topography. This method fuses the local clear features on different focal planes into a single full-focal plane image, solves the problem of information loss of wave peaks, wave valleys or micro-cracks caused by defocusing in single-frame imaging, and thus completely presents the details of three-dimensional complex structures. Subsequently, through standardized preprocessing and calibration, image distortion and noise interference are eliminated, providing a high-precision data basis for subsequent feature analysis. Based on the surface quality measurement and evaluation of structured data, key indicators such as surface defects and texture uniformity can be systematically quantified, avoiding the subjectivity and one-sidedness of traditional manual interpretation or single-frame analysis. Compared with traditional methods that rely on mechanical scanning or multi-position focusing, this technical solution significantly improves the detection efficiency and data integrity while maintaining high resolution, and finally realizes the full-process optimization from imaging, analysis to evaluation, meeting the industrial requirements for comprehensive and accurate detection of surface quality in precision manufacturing.
[0031] 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 layer-by-layer scanning of a microscopic imaging device at different focal plane positions. This sequence contains microscopic structure information of the target sample surface at different heights in the vertical direction, such as texture features, geometric topography, 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, and the details of other areas are blurred due to defocusing and cannot be completely captured. By collecting a sequence of multi-focal plane images covering all key height layers of the target product sample surface, it can be ensured that the surface features in different height regions are completely recorded in different images, thus providing a multi-perspective and multi-focus raw data basis for subsequent super-depth-of-field image synthesis.
[0032] In step S2, the sequence of multi-focal plane images is subjected to super-depth-of-field image synthesis to obtain a fully clear image of the target product sample. It should be understood that high-resolution imaging requires the microscope to use an objective lens with a high numerical aperture, which will cause the depth of focus to decrease sharply. The processed surface has three-dimensional complex structures at the micron to nanometer level, distributed on different height planes. 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 valleys. After obtaining the multi-focal plane image sequence and performing super-depth-of-field image synthesis, the problem of incomplete image information caused by the too-shallow depth of field of the objective lens can be solved. Traditional methods collect a sequence of multi-focal plane images and rely on algorithms based on gradient or wavelet transform to select the clearest regions pixel by pixel for fusion. Although the depth of field can be extended to a certain extent, its inherent defects are significant: for example, gradient-based algorithms are vulnerable to noise interference and have weak focus discrimination ability for low-contrast regions, which may lead to misjudgment of key defect regions; although wavelet transform can extract multi-scale features, it is difficult to effectively distinguish real surface details from defocus blur artifacts, especially under complex texture or non-uniform illumination conditions, where stitching marks or information distortion are easily introduced. In addition, traditional methods only mechanically stack the "clearest pixels", ignoring the spatial correlation and context semantics between the features of different focal planes (such as the continuity of microcracks and the global consistency of texture orientation), resulting in structural breaks or morphological distortions in the synthesized image, which is difficult to support high-precision surface quality analysis.
[0033] Based on this, the technical concept of this application is to first extract the visual features of each focal plane image through depth feature encoding to capture the hierarchical information of the surface microstructure (such as texture, crack profile, etc.). Subsequently, the local responses of key details (such as defect edges, gully shapes) in different focal planes are enhanced, while the defocused area's blur artifacts and noise interference are suppressed. Then, through a fusion mechanism, the enhanced feature encoding maps are weighted and fused in the spatial domain and semantic domain, retaining the context relevance of the clear regions in each focal plane image (such as the cross-focal plane extension feature 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, enabling the synthesized image to avoid texture breaks or morphological distortions caused by pixel-level stitching in traditional methods while retaining high-resolution details, 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 identify low-contrast defects, effectively distinguishes real surface features from defocus blur interference, strengthens the semantic consistency of key cross-focal plane regions (such as machining marks extending along the three-dimensional surface), avoids structural breaks caused by mechanical pixel fusion, further optimizes the visual coherence of image reconstruction, makes the synthesized image closer to the real surface morphology, provides a high-confidence full-focal plane data basis for subsequent quality assessment, and thus systematically solves the problems of information loss and misjudgment caused by depth-of-field limitations in traditional microscopic detection.
[0034] Specifically, Figure 2 It is a flowchart of step S2 in the method for detecting the surface quality of a machined part based on a microscopic image according to an embodiment of the present application. As Figure 2 shown, the step S2 includes: S21, extracting the 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 encoding maps; S22, performing multi-focal plane panoramic depth visual feature enhancement fusion based on feature-guided receptive fields on the sequence of multi-focal plane image visual feature encoding maps to obtain a multi-focal plane panoramic depth visual feature significantly fused encoding map; S23, based on the multi-focal plane panoramic depth visual feature significantly fused encoding map, to obtain the full-clear image of the target product sample.
[0035] In step S21, visual features of each multi-focal plane image in the sequence of multi-focal plane images are extracted to obtain a sequence of multi-focal plane image visual feature encoded maps. Specifically, in the embodiment of the present application, step S21 includes: using an Inception-based visual feature extractor to extract visual features of each multi-focal plane image in the sequence of multi-focal plane images to obtain the sequence of multi-focal plane image visual feature encoded maps. Correspondingly, considering that the three-dimensional complex structure (such as micro-cracks, gullies, etc.) of the processed surface of the target product sample often has a multi-level spatial distribution characteristic, and the blurred artifacts in the defocused 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 luminance contrasts), it is difficult to distinguish effective information from noise interference. Especially under low-contrast defects or non-uniform illumination conditions, it is easy to cause misjudgment of key features. In addition, the semantic relevance of the surface micro-topography (such as the continuity of cracks, the topological structure of texture directions) cannot be captured by local pixel analysis, and such information is crucial for the comprehensiveness of subsequent quality assessment. Based on this, in the technical solution of the present application, visual features of each multi-focal plane image in the sequence of multi-focal plane images are extracted to obtain a sequence of multi-focal plane image visual feature encoded maps. In particular, in a specific example of the present application, an Inception-based visual feature extractor is used to extract visual features of each multi-focal plane image in the sequence of multi-focal plane images to obtain the sequence of multi-focal plane image visual feature encoded maps. It should be understood that the Inception-based visual feature extractor extracts multi-scale visual features from the multi-focal plane 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 micro-surface structure (such as the high-frequency information of the crack edge) and the context semantics of the macro-topography (such as the global law of texture direction), and dynamically fuse these cross-scale features into a high-dimensional encoded map. For example, the wide-domain features extracted by a larger convolution kernel can represent the overall shape of the gully, while the small convolution kernel focuses on the local sharpness change of the micro-crack. Through the adaptive weighted fusion of multi-scale features, the sequence of encoded maps can not only retain the details of the clear areas in each focal plane image, but also establish cross-focal plane and cross-scale spatial correlations (such as the extension path of cracks on different height planes).
[0036] In step S22, multi-focal plane panoramic depth visual feature enhanced fusion based on feature-guided receptive fields is performed on the sequence of multi-focal plane image visual feature encoded maps to obtain a multi-focal plane panoramic depth visual feature significantly fused encoded map. Specifically, Figure 3 is a flowchart of step S22 in the method for detecting the quality of a processed surface based on microscopic images according to an embodiment of the present application. As Figure 3As shown, step S22 includes: S221, performing visual feature saliency based on a feature-guided receptive field on each multi-focal plane image visual feature encoding map in the sequence of multi-focal plane image visual feature encoding maps to obtain a sequence of multi-focal plane image visual feature enhanced encoding maps; S222, fusing the sequence of multi-focal plane image visual feature enhanced encoding maps to obtain the multi-focal plane panoramic depth visual feature significantly fused encoding map.
[0037] In step S221, visual feature saliency based on a feature-guided receptive field is performed on each multi-focal plane image visual feature encoding map in the sequence of multi-focal plane image visual feature encoding maps to obtain a sequence of multi-focal plane image visual feature enhanced encoding maps. Specifically, Figure 4 FIG. is a flowchart 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. As Figure 4 shown, step S221 includes: S221-1, performing feature decoupling on the multi-focal plane image visual feature encoding map along the channel dimension to obtain a set of multi-focal plane image visual feature pixel-level initial vectors; S221-2, extracting the pixel-level initial feature vector at the (i, j) pixel position from the set of multi-focal plane image visual feature pixel-level initial vectors as the multi-focal plane image visual feature pixel-level vector to be enhanced; S221-3, based on the set of multi-focal plane image visual feature pixel-level initial vectors, performing local significant fusion enhancement based on the receptive field on the multi-focal plane image visual feature pixel-level vector to be enhanced to obtain an enhanced multi-focal plane image visual feature pixel-level vector, where the enhanced multi-focal plane image visual feature pixel-level vector is the channel feature vector at the (i, j) pixel position of the multi-focal plane image visual feature enhanced encoding map.
[0038] It should be understood that although the feature encoding maps of images with different focal planes already contain the semantic information of the surface structure, they are affected by defocus blur, material reflection, and noise interference. However, there are differences in the significance distribution of key features (such as microcracks and machining marks) in each focal plane image. Traditional feature enhancement methods with fixed receptive fields (such as global pooling or convolutional layers with fixed sizes) are difficult to adapt to the local characteristics of three-dimensional surface structures. For example, in a certain focal plane, only a part of the deep groove area on a milled surface may be clear, and its edge features are blurred due to defocus in adjacent focal planes. If a receptive field of a unified size is used for feature enhancement, it may not be able to accurately capture the continuous features across focal planes, or may mistakenly enhance the noise signals in the defocused area as effective features. In addition, the local contrast of surface defects (such as nano-scale microcracks) is low, and it is easily ignored by conventional feature enhancement algorithms in the complex texture background, resulting in the loss of key information in the subsequent fusion stage. Therefore, an adaptive enhancement mechanism that dynamically perceives the feature context is required to selectively enhance effective surface details and suppress irrelevant interferences according to the feature distribution characteristics of different regions. Based on this, in this application, visual feature saliency based on a feature-guided receptive field is performed on each multi-focal plane image visual feature encoding map in the sequence of multi-focal plane image visual feature encoding maps to obtain a sequence of multi-focal plane image visual feature enhanced encoding maps.
[0039] Specifically, first, information compression and distillation are performed on the feature vectors of the pixels to be enhanced to extract their core semantic information (such as edge direction and texture density). Subsequently, according to the spatial distribution characteristics of the compressed features, the local receptive field size required for this pixel is dynamically predicted (for example, a small receptive field is required at the tip of a microcrack to focus on the edge sharpness, while a large receptive field is used for 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 this area, and through context relevance analysis (such as the continuity of the crack extension direction and the periodic law of machining texture), the feature vectors to be enhanced are weighted and enhanced, strengthening the significant components related to surface quality (such as defect contours and gully shapes), while suppressing the response intensity of defocus blur or reflection noise. In this way, the multi-focal plane image visual feature enhanced encoding map obtained after the saliency processing can better retain the context relevance of the clear areas in each focal plane image, providing a high-quality feature encoding map for subsequent weighted fusion in the spatial domain and semantic domain, enabling the fusion process to more effectively utilize the information of each focal plane image and avoiding poor fusion effects caused by unclear or interfered features.
[0040] Specifically, in the embodiment of this application, the step S221-1 includes: decoupling the features of the multi-focal plane image visual feature encoding map along the channel dimension to obtain a set of multi-focal plane image visual feature pixel-level initial vectors, which can be expressed by the following formula:
[0041]
[0042]
[0043] Among them, is the visual feature encoding map of the multi-focal plane image, is the set of real numbers, and are respectively the height and width of each feature matrix along the channel dimension, is the number of channels of is feature decoupling, is each multi-focal plane image visual feature pixel-level initial vector in the set of multi-focal plane image visual feature pixel-level initial vectors.
[0044] It should be understood that since the feature coupling of different focal planes in the multi-focal plane image may mask local key details (such as the weak edges of micro-cracks), the traditional feature expression with strong inter-channel dependence is prone to amplify noise interference. By decoupling the features along the channel dimension and independently extracting the channel feature vectors of each pixel, the redundant association 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, edge sharpness), providing a basis for refined analysis of the significance distribution of each pixel across focal planes. For example, for the reflective area, independent processing of pixel features can avoid the transmission of reflective noise between different focal planes in channels, thereby more accurately stripping redundant information and creating conditions for subsequent dynamic receptive field adjustment.
[0045] Specifically, in the embodiment of the present application, the step S221-2 includes: extracting the pixel-level initial feature vector at the (i,j) pixel position from the set of multi-focal plane image visual feature pixel-level initial vectors as the multi-focal plane image visual feature pixel-level vector to be enhanced, which can be expressed by the following formula:
[0046] Among them, is the channel feature vector at the (i,j) pixel position in is the multi-focal plane image visual feature pixel-level vector to be enhanced.
[0047] It should be understood that the local feature saliency of the multi-focal plane image has spatial heterogeneity (e.g., the contrast between the crack tip and the polished area is significantly different), 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 take the current pixel as the core and adaptively analyze the association pattern of the surrounding context information. For example, in the deep groove area of the milling surface, the central pixel may be blurred due to defocus, but the pixels at the same spatial position in its adjacent focal planes may contain clear edge clues. That is, the pixel-by-pixel processing mechanism can ensure that the model dynamically fuses complementary information across focal planes, avoiding the weakening of the sensitivity of local features by global unified operations, thereby improving the positioning ability of nanoscale defects.
[0048] Specifically, Figure 5 It is a flowchart of step S221-3 in the machining surface quality detection method based on microscopic images according to an embodiment of the present application. As Figure 5 shown, the step S221-3 includes: S221-31, 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; S221-32, determining the size of the receptive field of the visual feature of the multi-focal plane image of the distilled vector of the visual feature of the multi-focal plane image to be enhanced based on the spatial structure characteristics of the feature distribution of the distilled vector of the visual feature of the multi-focal plane image to be enhanced; S221-33, screening out the set of pixel-level initial vectors within the local receptive field of the visual feature of the multi-focal plane image from the set of pixel-level initial vectors of the visual feature of the multi-focal plane image based on the size of the receptive field of the visual feature of the multi-focal plane image; S221-34, enhancing the saliency of the pixel-level vector of the visual feature of the multi-focal plane image to be enhanced based on the set of pixel-level initial vectors within the local receptive field of the visual feature of the multi-focal plane image to obtain the enhanced pixel-level vector of the visual feature of the multi-focal plane image.
[0049] 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 by the following formula:
[0050] Wherein, is the Euclidean norm of the vector, is the distilled vector of the visual feature of the multi-focal plane image to be enhanced.
[0051] It should be understood that the original visual feature pixel-level vectors of the multi-focal plane images to be enhanced may have redundant noise (such as specular artifacts or defocused diffusion signals), and directly using them for receptive field prediction will introduce biases. By information compression, core semantic features (such as edge directions and texture consistency) are retained, which can significantly reduce the interfering components in high-dimensional features. For example, for low-contrast regions of micro-cracks, the compression process can enhance their gradient direction features while suppressing random high-frequency noise in the specular regions. 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 distilled features of the multi-focal plane images to be enhanced can more clearly reflect the spatial distribution characteristics of local structures (such as the continuity of crack propagation), thereby guiding the model to select an appropriate context aggregation range.
[0052] 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 visual feature distilled vector of the multi-focal plane image to be enhanced based on the spatial structure characteristics of the feature distribution of the visual feature distilled vector of the multi-focal plane image to be enhanced, which can be expressed by the following formula:
[0053]
[0054] Wherein, is the logarithmic function value with base 2, is the size of the multi-focal plane image visual feature receptive field.
[0055] It should be understood that traditional fixed receptive fields are difficult to adapt to the scale diversity of multi-focal plane features (such as deep grooves requiring large receptive fields to capture texture patterns, and micro-cracks requiring small receptive fields to retain edge details). By analyzing the spatial distribution characteristics of the compressed features (such as gradient direction consistency and texture periodicity), the model can dynamically infer the optimal size of the multi-focal plane image visual feature receptive field. For example, when a high-intensity directional response (indicating a potential crack edge) is detected in the visual feature distilled vector of the multi-focal plane image to be enhanced, the model automatically selects a small-sized receptive field to focus on edge sharpening; while 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 capturing cross-focal plane feature continuity and noise suppression.
[0056] More specifically, in the embodiment of the present application, the step S221-33 includes: screening out the 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 based on the size of the multi-focal plane image visual feature receptive field, which can be expressed by the following formula:
[0057]
[0058] Among them, is a set of pixel-level initial vectors within the local receptive field of the multi-focal plane image visual feature, are respectively in the ( )-th, the ( )-th, the ( )-th, the ( )-th, and the ( )-th pixel-level initial vectors within the local receptive field of the multi-focal plane image visual feature at the pixel positions.
[0059] It should be understood that the dynamically determined receptive field range of the multi-focal plane image visual feature needs to be efficiently transformed into a specific context feature set to support saliency enhancement. By extracting local region features with the pixel at the visual center of the multi-focal plane image to be enhanced as the anchor point, the model can construct a context information library related to the semantics of the current pixel. For example, the features of adjacent pixels in the crack propagation direction can provide continuity clues, while the pixels perpendicular to the propagation direction may contain background interference information. That is, the screening process ensures through spatial range constraints that the aggregated features contain both key context associations (such as the periodic law of processing textures) and avoid introducing noise from irrelevant regions. This step can provide a high-quality feature pool for subsequent weighted enhancement, enabling the model to distinguish effective surface details from defocus blur responses.
[0060] More specifically, in the embodiment of the present application, the step S221-34 includes: performing feature processing based on conformal commutativity on the set of pixel-level initial vectors within the local receptive field of the multi-focal plane 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 vector of the multi-focal plane image visual feature to be enhanced and the set of pixel-level initial vectors within the local receptive field of the multi-focal plane image visual feature to obtain the enhanced pixel-level vector of the multi-focal plane image visual feature. The above process can be expressed by the formula:
[0061]
[0062]
[0063] Among them, is the pixel-level initial vector within the local receptive field of the multi-focal plane image visual feature at the ( )-th pixel position, is the scoring weight vector of the multi-focal plane image visual feature, is matrix multiplication, is function, is the corresponding visual feature attention weight of the multi - focal plane image, and are the first modulation weighting coefficient and the second modulation weighting coefficient respectively, is the enhanced pixel - level vector of the visual features of the enhanced multi - focal plane image, that is, the channel feature vector at the (i, j) pixel position of the visual feature enhanced coding map of the multi - focal plane image.
[0064] It should be understood that the significant features in the clear area of the multi - focal plane image may be scattered in different focal planes (such as the crack part is clear in some focal planes and diffused in others), and it is necessary to strengthen the cross - focal plane consistency expression through context association. By using the set of pixel - level initial vectors within the local receptive field of the visual features of the multi - focal plane image for weighted fusion, the components related to surface quality (such as the cross - focal plane continuity of defect contours) can be highlighted, 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 diffused signals in the defocused focal plane by analyzing the gradient consistency of the local features of the multi - focal plane. The finally generated enhanced pixel - level vector of the visual features of the multi - focal plane image 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.
[0065] Specifically, for the pixel - level vector of the visual features of the multi - focal plane image to be enhanced the set of pixel - level initial vectors within the local receptive field of the visual features of the corresponding multi - focal plane image in order to improve the amplification effect of the feature components related to saliency and the suppression / weakening effect of the feature components related to non - saliency, it is expected that the set of pixel - level initial vectors within the local receptive field of the visual features of the multi - focal plane image can have conformal representativeness, that is, it is expected that there can be a high correspondence between the pixel - level volume space representation within the local receptive field of the visual features of the multi - focal plane image and the pixel - level boundary representation within the local receptive field of the visual features of the multi - focal plane image.
[0066] Therefore, first, determine the pixel - level volume space representation vector within the local receptive field of the visual features of the multi - focal plane image as:
[0067]
[0068] The pixel - level boundary representation vector within the local receptive field of the visual features of the multi - focal plane image is:
[0069]
[0070] Then, through the modulation weighting coefficients and , to make the boundary surface type - volume space tensor have the regularity that satisfies the commutation relation, that is, to make the pixel - level volume space representation vector within the local receptive field of the multi - focal plane image visual feature and the pixel - level boundary representation vector within the local receptive field of the multi - focal plane image visual feature The spatial two - norm representation of the commutation difference vector between them tends to the product of coefficients α and β:
[0071] where is the equal - ratio scaling coefficient.
[0072] In this way, under the condition of appropriately selecting the boundary surface type condition and utilizing the conformal commutation property of the volume space, the regularity specification standard is satisfied, thereby realizing the highly conformal representation fusion of each pixel - level initial vector within the local receptive field of the multi - focal plane image visual feature, and enhancing the context - aware feature saliency expression of the enhanced multi - focal plane image visual feature pixel - level vector.
[0073] In step S222, fuse the sequence of the multi - focal plane image visual feature enhanced coding maps to obtain the multi - focal plane panoramic depth visual feature significantly fused coding map. Correspondingly, considering that although the sequence of the multi - focal plane image visual feature enhanced coding maps has enhanced the expression ability of the key features of each focal plane through saliency processing, the feature coding of each focal plane still independently represents the local clear region information of its corresponding focal plane. If directly linearly superimposing the original pixels or shallow features, it is impossible to effectively associate the three - dimensional surface topologies across focal planes (such as the cross - layer extension path of micro - cracks and the depth gradient change of gullies), resulting in geometric discontinuities or semantic faults in the transition regions of features from different focal layers in the synthesized image. For example, the periodic tool marks on the milling surface appear as clear edges in a certain focal plane, while in the adjacent focal plane, they may show a blurred and diffused form due to defocus. If only mechanically combining the features of each focal plane, the coherence of the three - dimensional trend of the tool marks will be destroyed. Therefore, in order to establish the spatial correlation and semantic consistency between cross - focal plane features and realize the complete reconstruction of the three - dimensional surface topography, this application fuses the sequence of the multi - focal plane image visual feature enhanced coding maps to obtain the multi - focal plane panoramic depth visual feature significantly fused coding map.
[0074] Specifically, in a specific example of this application, first, for the sequence of the multi - focal plane image visual feature enhanced coding maps, an initial weight matrix is constructed for each coding map. The spatial size of the weight matrix is the same as that of the coding Figure 1Its initial value is set in a uniform distribution manner so that each encoded image has an equal basic contribution degree in the initial stage of fusion, ensuring that feature fusion deviation will not be caused by the excessive or too low weight of a certain encoded image. Secondly, the feature similarity between each encoded image is calculated pixel by pixel. For any two encoded images in the sequence, the corresponding feature vectors are extracted at the same pixel position, and the similarity degree is measured by comparing the direction consistency of the feature vectors in space. Specifically, the calculation of feature similarity focuses on the feature vectors at each pixel position in the encoded image, analyzes their distribution relationship in the multi-dimensional feature space, and judges whether the features at 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 features of different focal planes in this area have strong consistency and belong to the effective features of the real surface structure. Therefore, the weight of the corresponding encoded image in this area is increased to strengthen the fusion effect of such features; in the pixel area with low feature similarity, it shows that the features of different focal planes in this area have large differences, and there may be defocus blur or noise interference. Therefore, the weight of the corresponding encoded image 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 values change dynamically within a reasonable range, highlighting the leading role of effective features and avoiding the over-concentration of the weight of a single encoded image. Finally, after the dynamic adjustment of the weight matrix is completed, the sequence of multi-focal plane image visual feature enhanced encoded images is weighted and fused. Taking each pixel position as a unit, the feature vectors of this position in all encoded images are multiplied by the corresponding weight values respectively, and then the weighted feature vectors are accumulated to generate the feature vector of this position in the fused encoded image. 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 visual feature significantly fused encoded image is formed.
[0075] In step S23, based on the multi-focal-plane panoramic depth-of-field visual feature significantly fused coding map, the full-clear image of the target product sample is obtained. Specifically, in the embodiment of the present application, step S23 includes: inputting the multi-focal-plane panoramic depth-of-field visual feature significantly fused coding map into a super-depth-of-field image synthesizer based on a generative adversarial network to obtain the full-clear image of the target product sample. It should be understood that the multi-focal-plane panoramic depth-of-field visual feature significantly fused coding map contains rich visual information of the product sample, but this information may be highly complex and non-linear. The super-depth-of-field image synthesizer based on the generative adversarial network can effectively process these complex features and convert them into full-clear images with clear details and accurate colors. That is, the generative adversarial network (GAN) has powerful generation ability and 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, making the generated images more natural and real visually and capable of capturing the subtle features and structures in the images. Specifically, during the mapping process, the generator needs to use the features in the multi-focal-plane panoramic depth-of-field visual feature significantly fused coding map to determine the clear value of each pixel position (i.e., select the clearest pixel information at the corresponding position from the multi-focal-plane sequence). The discriminator, by learning the statistical characteristics of the real full-clear images (such as the distribution of high-frequency components, the spatial correlation of edge gradients, etc.), forces the image output by the generator to meet the clear standard of actual optical imaging in terms of depth-of-field synthesis effect, such as eliminating defocus blur and maintaining the coherence of the cross-focal-plane structure. After multiple rounds of iterative training, the generator can convert the input multi-focal-plane panoramic depth-of-field visual feature significantly fused coding map into an image with a panoramic depth-of-field clear effect to achieve a complete and clear reconstruction of the complex three-dimensional structure on the surface of the target product.
[0076] In summary, the step S2 is clearly described. First, it extracts the visual features of each focal plane image through depth feature encoding to capture the hierarchical information of the surface microstructure. Subsequently, it enhances the local responses of the key details in different focal planes while suppressing the blurred artifacts and noise interference in the defocused areas. Then, through the fusion mechanism, the enhanced feature encoding maps are weighted and fused in the spatial domain and the semantic domain to retain the context relevance of the clear areas in each focal plane image. Finally, the fused features are reconstructed with high fidelity to generate a globally clear all-focal plane image. In this way, it is possible to make the synthesized image retain high-resolution details while avoiding the problems of texture breakage or morphological distortion caused by pixel-level stitching in traditional methods, ensuring the continuity and integrity of the three-dimensional surface structure. Moreover, 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 focal planes, avoid structural breaks caused by mechanical pixel fusion, further optimize the visual coherence of image reconstruction, make the synthesized image closer to the real surface topography, provide a high-confidence all-focal plane data basis for subsequent quality assessment, and thus systematically solve the problems of information loss and misjudgment caused by depth of field limitation in traditional microscopic detection.
[0077] In step S3, image preprocessing and calibration are performed on the full-clear image of the target product sample to obtain a standardized image of the target product sample. Specifically, in the embodiment of the present application, step S3 includes: performing noise filtering, contrast enhancement, brightness equalization, and calibration processing on the full-clear image of the target product sample to obtain the 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 tiny vibrations caused by mechanical movements during multi-focal plane acquisition, the brightness differences 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 the blurred details at the bottom of deep grooves due to insufficient light scattering), uneven brightness across regions (such as the darkening of the edge region due to the attenuation of the edge illumination of the objective lens), and geometric deformation (such as the bending of straight textures due to barrel distortion). These interferences will directly affect the quantization accuracy of surface features (such as microcrack width, roughness parameters). Especially when detecting low-contrast defects or nano-scale topography, uncalibrated images may lead to systematic measurement deviations and reduce the comparability of detection results across batches or devices. Therefore, in the present application, noise filtering, contrast enhancement, brightness equalization, and calibration processing are performed on the full-clear image of the target product sample to make the standardized image of the target product sample visually clearer and obtain the standardized image of the target product sample. Specifically, first, non-local means filtering is combined with wavelet threshold denoising to filter out the random noise in the synthesized image while retaining the high-frequency details of the surface microstructure (such as grinding textures, etching pits); subsequently, local contrast is enhanced based on adaptive gamma correction and contrast-limited adaptive histogram equalization (CLAHE) to highlight the edge gradients in low-illumination regions (such as microcracks on the polished surface) and suppress the detail loss in overexposed regions; for uneven brightness, the global illumination distribution is estimated through a 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, affine transformation and perspective projection models are used to perform geometric calibration on the image, mapping the pixel coordinates to the physical space coordinate system to ensure the absolute scale consistency of the measurement parameters.
[0078] In step S4, surface feature analysis and measurement are performed on the standardized image of the target product sample to obtain structured data for measuring the surface quality of the product during processing. Correspondingly, during the product processing, surface quality is one of the key indicators for measuring whether the product is qualified. Various factors during the processing, such as tool wear, improper setting of processing parameters, differences in material properties, etc., will affect the surface quality of the product. The standardized image of the target product sample contains detailed information about the product surface. By performing surface feature analysis and measurement on it, the impact of the processing on the surface quality can be deeply understood, so as to identify possible problems and make improvements. Although the standardized image of the target product sample has undergone preprocessing and calibration, the image itself is only a collection of pixels and cannot be directly used to quantitatively evaluate the physical properties of the surface topography (such as roughness, defect density, texture uniformity, etc.) to reflect the quality status of the product surface. Specific algorithms and methods are needed to analyze and measure the surface features in the image, and convert the image information into quantifiable and meaningful structured data for subsequent evaluation and decision-making.
[0079] Specifically, the specific processing process for surface feature analysis and measurement of the standardized image of the target product sample to obtain structured data on the surface quality of the product during processing is as follows: First, defect detection and identification are carried out. The edge detection algorithm is comprehensively used to outline the potential defect contours in the standardized image, and the threshold segmentation algorithm is used to separate the defect areas to form a binary image to highlight the defect morphology. For complex or blurred defects, the template matching algorithm is adopted to compare the pre-established defect templates with the suspicious areas of the image to confirm the type. At the same time, a classifier based on machine learning is introduced. By learning features such as image texture and shape, surface anomalies such as contaminants and particulate matter are automatically identified, the defect positions are marked, and the types are recorded. After defect identification, precise dimensional measurement is immediately carried out on the identified defects or regions of interest. Two-dimensional measurements such as length, width, area, diameter, and angle are carried out using image calibration parameters (the conversion relationship between pixels and actual physical dimensions); if the image incorporates 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 localization techniques are used to improve the accuracy during the measurement. Subsequently, surface roughness analysis is carried out. Based on the image gray information or three-dimensional surface topography data, in strict accordance with international standards such as ISO 4287 and ISO 25178, arithmetic mean roughness (Ra), maximum profile height (Rz), surface roughness parameters (Sa, Sz), etc. are calculated, and the sampling length and evaluation length are specified to ensure that the parameters comply with industrial inspection specifications. Then, the surface-attached particles are counted. The particles are separated from the background and other structures through image segmentation technology, and the characteristics of each particle such as area, perimeter, and equivalent diameter are measured. The particles are classified according to the preset classification criteria (such as size threshold, shape characteristics), and the quantity 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 a defect list (recording defect type, location, two-dimensional / three-dimensional dimensions), key dimensional measurement values (such as the length and width of specific structures), surface roughness parameters (Ra, Rz, Sa, Sz, etc.), and particle statistics results (total number of particles, classified quantity, size distribution ratio). These data are stored and presented in a unified format, providing a clear and standardized quantitative basis for subsequent evaluation of the surface quality of product processing.
[0080] In step S5, based on the pre-set quality standard of the machined surface, the structured data of the product machined surface quality measurement is processed to obtain a machined surface quality assessment report. It should be understood that although the structured data has quantitatively characterized the surface topography parameters (such as roughness, defect distribution, texture uniformity, etc.), the quality determination in the industrial scenario needs to be based on clear standards. For example, the tolerance threshold of the surface micro-crack length for aviation parts and the grade requirement of the polished surface roughness for precision molds. The traditional manual interpretation method relies on engineers' experience to compare with the standard documents, which has subjective biases and low efficiency. Especially when the detection parameter dimensions are complex (such as the combined determination of multi-region roughness and the cross-scale defect correlation analysis), it is easy to cause misjudgments due to human omissions or inconsistent standard understandings. In addition, due to the different requirements of different customers or industry standards (such as ISO, ASTM), the determination logic needs to be dynamically adapted, and the traditional fixed threshold method is difficult to meet the flexible needs. Therefore, it is necessary to intelligently match the structured data with the pre-set quality standards to achieve objective and traceable quality assessment.
[0081] Specifically, based on the pre-set quality standards for the processed surface, the specific processing process for processing the structured data of the product processed surface quality measurement to obtain a processed surface quality assessment report is as follows: First, import the structured data including the defect list, key dimension measurement values, surface roughness parameters, particle statistics results, etc. into the assessment report generation module together with the pre-set quality standards (such as the allowed defect types, size and quantity upper limits, roughness range, particle size and distribution standards, etc.), and analyze and compare each index in the structured data one by one. Carefully check whether the type of defect is a dangerous defect outside the standard allowed range, whether the size (length, depth, area, etc.) of the measured defect exceeds the specified threshold, and whether the number of counted defects is within the allowed 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 statistics results (quantity, size distribution, etc.) meet the standards. Then, make a comprehensive judgment based on the comparison results of each index. If all indexes meet the preset standards, the surface quality is judged as "qualified"; if some indexes exceed the standards but are within the acceptable grading range (such as the number of minor defects does not exceed the standard), grade division is carried out according to the preset rules (such as first grade, second grade, etc.); if the key indexes (such as the existence of dangerous defects, serious roughness exceeding the standard) do not meet the standards, it is judged as "unqualified". Finally, a comprehensive inspection report is automatically generated, and the report content covers multiple key parts. First is the basic information of the sample, recording the basic information such as the unique identifier (ID), name, and specification of the detected target product sample to ensure that the report corresponds accurately to the detected object. Secondly is the detection settings, indicating the objective lens magnification, lighting conditions, imaging device parameters, etc. used during the detection process to make the detection conditions traceable. The report will attach the synthesized full-clear microscopic image, visually showing the overall morphology of the product processed surface, and at the same time including key feature images, such as images marking the defect positions and morphologies, to facilitate quick positioning and identification of surface abnormalities. The detailed measurement data list is presented in tabular form, including the type, position, size (two-dimensional or three-dimensional) of the defect, the measured values of the key structure dimensions, the specific values of the surface roughness parameters, the quantity and classification results of particle statistics, etc., providing comprehensive quantitative data. The quality assessment result part clearly marks the quality judgment conclusion (qualified, unqualified) or grade. If unqualified, it points out the specific indexes that do not meet the standards (such as a certain defect size exceeding the standard, roughness parameter exceeding the range). In addition, the report supports export to standardized formats such as PDF, Excel, CSV, etc., facilitating archiving, retrieval, or interaction with other systems, and meeting the requirements for report standardization and generality in industrial detection.
[0082] In summary, the method for detecting the quality of a machined surface based on microscopic images according to the embodiments of the present application is elucidated. First, a sequence of multi-focus images of a target product sample is acquired, and a fully clear image of the target product sample is generated through super-depth-of-field image synthesis. Subsequently, the fully clear image is preprocessed and calibrated to obtain a standardized image of the sample. Then, the features of the sample surface are analyzed and measured based on the standardized image to generate structured data on the quality of the product machined surface. Finally, based on a preset quality standard, the structured data is processed to form an evaluation report on the quality of the product machined surface. In this way, the comprehensiveness and accuracy of the detection of the quality of the machined surface can be effectively improved.
[0083] Figure 6 FIG. is a system block diagram of a system for detecting the quality of a machined surface based on microscopic images according to an embodiment of the present application. As Figure 6 shown, the system 100 for detecting the quality of a machined surface based on microscopic images according to an embodiment of the present application includes: an image data acquisition module 110, configured to acquire a sequence of multi-focus images of a target product sample; an image synthesis module 120, configured to perform super-depth-of-field image synthesis on the sequence of multi-focus images to obtain a fully clear image of the target product sample; an image preprocessing and calibration module 130, configured to perform image preprocessing and calibration on the fully clear image of the target product sample to obtain a standardized image of the target product sample; a surface feature analysis and measurement module 140, configured to perform surface feature analysis and measurement on the standardized image of the target product sample to obtain structured data on the quality of the product machined surface; and an evaluation report generation module 150, configured to process the structured data on the quality of the product machined surface based on a preset quality standard of the machined surface to obtain an evaluation report on the quality of the machined surface.
[0084] Here, those skilled in the art can understand that the specific functions and operations of each unit and module in the above-mentioned system 100 for detecting the quality of a machined surface based on microscopic images have been described in detail above with reference to Figures 1 to 5 the description of the method for detecting the quality of a machined surface based on microscopic images, and therefore, the repeated description thereof will be omitted.
[0085] In summary, the system 100 for detecting the quality of a machined surface based on microscopic images according to the embodiments of the present application is elucidated. First, a sequence of multi-focus images of a target product sample is acquired, and a fully clear image of the target product sample is generated through super-depth-of-field image synthesis. Subsequently, the fully clear image is preprocessed and calibrated to obtain a standardized image of the sample. Then, the features of the sample surface are analyzed and measured based on the standardized image to generate structured data on the quality of the product machined surface. Finally, based on a preset quality standard, the structured data is processed to form an evaluation report on the quality of the product machined surface. In this way, the comprehensiveness and accuracy of the detection of the quality of the machined surface can be effectively improved.
[0086] 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, supporting multiple compressed or uncompressed formats such as JPEG, JPEG2000, TIFF, and BMP for saving; the standard optical head can implement observation methods such as skew, field, MIX, polarization, differential interference, etc. and can be easily switched, the infrared optical head can penetrate the silicon-based substrate to observe the internal semiconductor circuit, and fluorescence observation can excite organic materials and biological organic samples; the maximum field of view is 21 mm, facilitating the observation of the entire sample; it has the "super depth of field" function, which extends the standard focal depth of the objective lens by capturing images at different focal planes, and the extended exposure function of the EE EF module can combine different exposure images into a single perfectly exposed image; the field of view can be extended through the motorized XY stage. The user only needs to move the stage to two opposite corners of the area of interest, and the software can automatically complete the remaining operations to achieve automatic stitching. This function can be combined with extended depth of field, extended image dynamic range, and autofocus. In terms of measurement and analysis, images or real-time videos can be obtained. Using the measurement tools such as length, area, angle, diameter, etc. provided by the DeltaPix InSight 6.0 software, the captured objects can be accurately measured, and 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 achieve 2D measurements such as similar angles, distances, and areas. The combination of multiple light source options and the high resolution of the long working distance optical system can easily visualize the image surface. It is available in the 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 be switched to various imaging modes such as 2D images, 3D true color images, 3D black and white images, 3D height images, etc. with one key. The DeltaPix InSight equipped in the digital microscope provides non-contact line roughness and surface roughness measurements, which respectively conform to the ISO 4287:1997 line roughness standard and the ISO 25178-2:2012 surface roughness standard. The software-based system can be applied to various scenarios for analyzing surface texture; it can also classify and count particles according to the characteristics of the statistical objects, and the results are exported to an Excel spreadsheet for further processing.
Claims
1. A method for detecting the surface quality of a machined surface based on microscopic images, characterized in that, Including: Obtaining a sequence of multi-focus images of a target product sample; Performing super-depth-of-field image synthesis on the sequence of multi-focus images to obtain a fully clear image of the target product sample, including: extracting visual features of each multi-focus image in the sequence of multi-focus images to obtain a sequence of multi-focus image visual feature encoding maps; performing multi-focus panoramic depth visual feature enhancement and fusion based on feature-guided receptive fields on the sequence of multi-focus image visual feature encoding maps to obtain a multi-focus panoramic depth visual feature significantly fused encoding map, including: compressing and distilling the feature vectors of the pixels to be enhanced obtained, extracting their core semantic information, and then dynamically predicting the local receptive field size required for this pixel according to the spatial distribution characteristics of the compressed features, and performing weighted enhancement on the feature vectors to be enhanced through context relevance analysis; inputting the multi-focus panoramic depth visual feature significantly fused encoding map into a super-depth-of-field image synthesizer based on a generative adversarial network to obtain the fully clear image of the target product sample; Performing image preprocessing and calibration on the fully clear 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 structured data for measuring the quality of the processed surface of the product; Processing the structured data for measuring the quality of the processed surface of the product based on a preset quality standard for the processed surface to obtain a processed surface quality assessment report.
2. The method for detecting the machining surface quality based on microscopic images according to claim 1, wherein Extracting visual features of each multi-focus image in the sequence of multi-focus images to obtain a sequence of multi-focus image visual feature encoding maps, including: using an Inception-based visual feature extractor to extract visual features of each multi-focus image in the sequence of multi-focus images to obtain the sequence of multi-focus image visual feature encoding maps.
3. The method for detecting the quality of a machined surface based on a microscopic image according to claim 1, wherein Performing multi-focus panoramic depth visual feature enhancement and fusion based on feature-guided receptive fields on the sequence of multi-focus image visual feature encoding maps, including: Performing visual feature saliency based on feature-guided receptive fields on each multi-focus image visual feature encoding map in the sequence of multi-focus image visual feature encoding maps to obtain a sequence of multi-focus image visual feature enhanced encoding maps; Fusing the sequence of multi-focus image visual feature enhanced encoding maps to obtain the multi-focus panoramic depth visual feature significantly fused encoding map.
4. The method for detecting the machining surface quality based on microscopic images according to claim 3, wherein Performing visual feature saliency based on feature-guided receptive fields on each multi-focus image visual feature encoding map in the sequence of multi-focus image visual feature encoding maps to obtain a sequence of multi-focus image visual feature enhanced encoding maps, including: Performing feature decoupling on the multi-focus image visual feature encoding map along the channel dimension to obtain a set of multi-focus image visual feature pixel-level initial vectors; Extracting the pixel-level initial feature vector at the (i,j) pixel position from the set of multi-focus image visual feature pixel-level initial vectors as the multi-focus image visual feature pixel-level vector to be enhanced; Based on the set of pixel-level initial vectors of the multi-focal plane image visual features, perform local significant fusion enhancement based on the receptive field on the pixel-level vectors of the multi-focal plane image visual features to be enhanced to obtain enhanced pixel-level vectors of the multi-focal plane image visual features, where the enhanced pixel-level vectors of the multi-focal plane image visual features are the channel feature vectors at the (i, j) pixel position of the multi-focal plane image visual feature enhancement coding map.
5. The method for detecting the machining surface quality based on microscopic images according to claim 4, characterized in that, Based on the set of pixel-level initial vectors of the multi-focal plane image visual features, performing local significant fusion enhancement based on the receptive field on the pixel-level vectors of the multi-focal plane image visual features to be enhanced to obtain enhanced pixel-level vectors of the multi-focal plane image visual features, includes: Perform information compression on the pixel-level vectors of the multi-focal plane image visual features to be enhanced to obtain distilled vectors of the multi-focal plane image visual features to be enhanced; Based on the characteristic distribution space structure characteristics of the distilled vectors of the multi-focal plane image visual features to be enhanced, determine the size of the receptive field of the multi-focal plane image visual features of the distilled vectors of the multi-focal plane image visual features to be enhanced; Based on the size of the receptive field of the multi-focal plane image visual features, select a set of pixel-level initial vectors within the local receptive field of the multi-focal plane image visual features from the set of pixel-level initial vectors of the multi-focal plane image visual features; Based on the set of pixel-level initial vectors within the local receptive field of the multi-focal plane image visual features, perform saliency enhancement on the pixel-level vectors of the multi-focal plane image visual features to be enhanced to obtain the enhanced pixel-level vectors of the multi-focal plane image visual features.
6. The method for detecting the machining surface quality based on microscopic images according to claim 5, characterized in that, Based on the set of pixel-level initial vectors within the local receptive field of the multi-focal plane image visual features, performing saliency enhancement on the pixel-level vectors of the multi-focal plane image visual features to be enhanced to obtain the enhanced pixel-level vectors of the multi-focal plane image visual features, includes: Perform feature processing based on conformal commutativity on the set of pixel-level initial vectors within the local receptive field of the multi-focal plane image visual features 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, perform weighted fusion based on attention weights on the pixel-level vectors of the multi-focal plane image visual features to be enhanced and the set of pixel-level initial vectors within the local receptive field of the multi-focal plane image visual features to obtain the enhanced pixel-level vectors of the multi-focal plane image visual features.
7. The method for detecting the surface quality of a machined surface based on microscopic images according to claim 6, characterized in that, Perform image preprocessing and calibration on the fully clear image of the target product sample to obtain a standardized image of the target product sample, including: performing noise filtering, contrast enhancement, brightness equalization, and calibration processing on the fully clear image of the target product sample to obtain the standardized image of the target product sample.
8. A machining surface quality detection system based on microscopic images, which is used to execute the machining surface quality detection method based on microscopic images according to claim 1, and is characterized in that, Includes: An image data acquisition module, configured to acquire a sequence of multi-focal plane images of a target product sample; An image synthesis module, which is used to perform super-depth-of-field image synthesis on the sequence of multi-focal-plane images to obtain a fully clear image of the target product sample. Among them, the image synthesis module is used to: extract the 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 visual feature enhancement and fusion based on feature-guided receptive fields on the sequence of multi-focal-plane image visual feature coding maps to obtain a multi-focal-plane panoramic depth visual feature significantly fused coding map; based on the multi-focal-plane panoramic depth visual feature significantly fused coding map, obtain the fully clear image of the target product sample; An image preprocessing and calibration module, which is used to perform image preprocessing and calibration on the fully clear image of the target product sample to obtain a standardized image of the target product sample; A surface feature analysis and measurement module, which is used to perform surface feature analysis and measurement on the standardized image of the target product sample to obtain structured data for measuring the quality of the product processing surface; An evaluation report generation module, which is used to process the structured data for measuring the quality of the product processing surface based on the preset quality standard of the processing surface to obtain an evaluation report on the quality of the processing surface.
9. The machining surface quality detection system based on microscopic images according to claim 8, characterized in that, The image preprocessing and calibration module is used to: perform noise filtering, contrast enhancement, brightness equalization and calibration processing on the fully clear image of the target product sample to obtain the standardized image of the target product sample.
Citation Information
Patent Citations
Salient target detection method and device
CN116310394A
Image processing model training method, image processing method and related equipment
CN119478760A