Device and method for automatically identifying micro-cracks on surface of quartz glass based on machine vision
By combining multi-dimensional image sensing and U-Net network with a fine crack attention mechanism, the accuracy and efficiency issues of microcrack identification on quartz glass surfaces are solved, achieving high-precision microcrack detection and geometric parameter measurement, adapting to various working conditions, and possessing high robustness and engineering applicability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU SIWANG ELECTRONIC MATERIALS CO LTD
- Filing Date
- 2026-02-04
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies struggle to efficiently and accurately identify micron-sized microcracks on quartz glass surfaces, and cannot precisely quantify defect geometric parameters. Traditional methods are limited by high reflectivity and weak contrast of microcrack features.
By employing a multi-dimensional image sensing module combined with polarization optics adjustment, and utilizing the U-Net network and fine crack attention mechanism for image preprocessing and semantic segmentation, combined with adaptive Gaussian filtering and contrast-limited histogram equalization algorithms, high-precision identification of microcracks and measurement of geometric parameters are achieved.
It achieves millimeter-level accurate identification of microcracks on the surface of quartz glass, reduces the rate of missed detection and false judgment, improves detection efficiency, provides full-process automation and intelligent decision-making functions, adapts to various working conditions, and has high robustness and engineering applicability.
Smart Images

Figure CN122049367A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of precision optical inspection technology, specifically to an automatic identification device and method for microcracks on the surface of quartz glass based on machine vision. Background Technology
[0002] Quartz glass, as a crucial basic material, is widely used in high-precision fields such as precision optics, semiconductor lithography, and aerospace due to its excellent optical properties and thermal stability. However, as a typical hard and brittle material, quartz glass is highly susceptible to developing micron-sized microcracks on its surface and subsurface during grinding, polishing, and transportation. These microcracks not only cause scattering losses in optical systems and reduce image quality, but also easily induce thermal damage under high-energy laser irradiation, leading to catastrophic component fracture. Therefore, high-precision and high-efficiency detection of microcracks on the surface of quartz glass is a critical step in ensuring product quality.
[0003] Currently, the detection of surface defects in such transparent, highly reflective materials still faces significant challenges. Although manual visual inspection is used to some extent, it relies excessively on the subjective experience of the inspectors and is prone to visual fatigue under prolonged, high-intensity work, resulting in low inspection efficiency and poor consistency, making it difficult to meet the needs of modern large-scale industrial production.
[0004] In existing machine vision automated inspection technologies, solutions specifically addressing the characteristics of quartz glass are still insufficient. Firstly, due to the high light transmittance and high surface reflectivity of quartz glass, conventional bright-field or dark-field illumination easily creates strong specular reflections on its smooth surface. This high-brightness noise severely masks the weak crack-scattered light signal, resulting in an extremely low signal-to-noise ratio at the imaging end. Secondly, microcracks are typically extremely narrow, irregularly shaped, and have weak contrast with the background. Traditional image processing algorithms based on edge gradients or threshold segmentation struggle to distinguish cracks from surface dust, water stains, and other interference noise, leading to a high false detection rate. Furthermore, although deep learning technology performs excellently in general object detection, standard convolutional neural network models often suffer from the loss of subtle spatial texture features due to continuous pooling downsampling operations when processing extremely small targets with large fields of view. This makes it difficult for the network to capture the details at the ends of microcracks, hindering precise quantitative measurement of crack geometric parameters. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an automatic identification device and method for microcracks on the surface of quartz glass based on machine vision. This solves the problem that existing technologies struggle to accurately extract low-contrast microcrack features from the surface of high-transmittance quartz glass under strong specular reflection interference, resulting in low detection accuracy and the inability to precisely quantify defect geometric parameters.
[0006] To achieve the above objectives, the present invention provides the following technical solution: In its first aspect, the present invention provides a method for automatic identification of microcracks on the surface of quartz glass based on machine vision. This method includes the following steps: Step S1: Image acquisition, using a multi-dimensional image sensing module to acquire the original image of the quartz glass surface; Step S2: Image preprocessing, the original image is subjected to denoising and enhancement processing to obtain a preprocessed image; Step S3: Microcrack feature extraction. The preprocessed image is used to extract features through the encoder of the semantic segmentation model to obtain a multi-scale feature map. Step S4: Semantic segmentation and identification of microcracks. The multi-scale feature map is upsampled and classified by the decoder of the semantic segmentation model to output the microcrack segmentation result. The microcrack region is identified based on the microcrack segmentation result. Step S5: Crack parameter measurement. Based on the microcrack segmentation results, calculate the geometric parameters of the microcrack. Step S6: Output and store the results. Output the recognition results and the geometric parameters, and store the relevant data in the database.
[0007] Furthermore, considering the high reflectivity of quartz glass, in step S1, the acquisition of the original image of the quartz glass surface using the multi-dimensional image sensing module employs a specific optical adjustment strategy. Specifically, the detection distance between the industrial camera and the quartz glass surface is adjusted by controlling the displacement adjustment unit, and the polarization angle and brightness of the annular polarized light source are adjusted to suppress reflection and scattering from the quartz glass surface. Finally, the image of the quartz glass surface acquired by the industrial camera at the specified polarization angle and brightness is used as the original image. Utilizing the principle of light polarization, specular reflection light from the surface is filtered out, while diffuse reflection components are retained, thereby improving the contrast of crack imaging.
[0008] Furthermore, to highlight subtle crack features, the image preprocessing in step S2 employs a hybrid image preprocessing algorithm. First, the original image is converted to a grayscale image, and then an adaptive Gaussian filter is used to denoise the grayscale image. Unlike traditional fixed-parameter filtering, the filter standard deviation in this invention is dynamically adjusted based on the local noise intensity of the image. Assume a point in the image... The standard deviation of local noise at point is Then the standard deviation of the adaptive Gaussian filter kernel function The calculation formula is as follows:
[0009] in, For adjustment coefficients, To prevent the use of tiny constants with a denominator of zero, a Gaussian filter function is used. The expression is:
[0010] Subsequently, the denoised image is enhanced using a contrast-limited histogram equalization algorithm to strengthen the grayscale difference between the microcrack area and the background. Finally, the pixel values of the enhanced image are normalized, and the preprocessed image is output.
[0011] Furthermore, as one of the core improvements of this invention, in steps S3 to S4, the semantic segmentation model adopts a U-Net network structure. The encoder and the decoder respectively constitute the contraction path and expansion path of the U-Net network structure, and the U-Net network structure also includes skip connections connecting the contraction path and the expansion path. The skip connections are used to transmit the feature maps output by each layer of the encoder to the corresponding layer of the decoder to preserve high-frequency detail information.
[0012] Specifically, to address the issue of feature loss due to fine cracks in deep networks, a fine crack attention mechanism is introduced into the U-Net network structure. This mechanism integrates channel attention and spatial attention to perform weighted processing on the feature map. Specifically, assuming the input feature map is... First, generate a channel attention map. Spatial attention map Among them, spatial attention map The generation process utilizes the feature fusion of max pooling and average pooling, and the calculation formula is as follows:
[0013] in, This represents the Sigmoid activation function. Indicates the kernel size as The convolution operation generates a spatial weight map (i.e., a spatial attention map). In the first weight, the weight corresponding to the microcrack edge feature region is assigned to the first weight. The weights corresponding to the background feature regions are assigned a second weight. And satisfy:
[0014] Final weighted feature map Generate and transmit to the skip connection using the following formula:
[0015] in This indicates element-wise multiplication. Through this mechanism, the network can automatically focus on the pixels at the crack edge, suppressing background noise interference.
[0016] Furthermore, in step S5, the crack parameter measurement achieves high-precision quantitative analysis. First, edge detection is performed on the binary image corresponding to the microcrack segmentation result to extract the edge contour of the microcrack; then, the centerline of the microcrack is fitted using Hough transform and least squares method. Assume the set of points on the crack centerline is... The least squares method is used to fit the linear equation. Its goal is to minimize the sum of squared errors. :
[0017] By solving and To obtain the fitting parameters and Furthermore, the area of the microcrack is calculated based on the edge contour and pre-calibrated camera calibration parameters; the length and width of the microcrack are calculated based on the fitting result of the edge contour and the centerline, and the camera calibration parameters. The microcrack width is calculated based on the Euclidean distance from the edge contour point to the fitted centerline. Let the edge contour point be... Its distance to the center line distance for:
[0018] The crack width is taken as the statistical value of the distance to all edge points (such as twice the average value), thus ensuring the robustness of irregular crack measurement.
[0019] Furthermore, in step S6 and subsequent steps, detection records containing feature vectors and geometric parameters are constructed and stored in the detection database. Subsequently, similar defect images are retrieved using a feature vector matching algorithm, and the microcrack images are clustered using a K-means clustering algorithm to statistically analyze the distribution of different types of microcracks, providing data support for production process optimization.
[0020] In a second aspect, the present invention provides an automatic identification device for microcracks on the surface of quartz glass based on machine vision.
[0021] The apparatus is used to implement the method described in the first aspect above, the apparatus comprising: A multi-dimensional image sensing module is used to acquire images of the quartz glass surface. This module is preferably equipped with an industrial camera, a ring-polarized light source, and a displacement adjustment unit. The ring-polarized LED light source is configured with an adjustable polarization angle LED array and a diffuse reflector. The polarization angle can be adjusted from 0° to 90°, eliminating high reflectivity interference by adjusting the polarization angle.
[0022] The image preprocessing module is used to enhance and denoise the acquired images; The AI visual recognition module incorporates a micro-crack semantic segmentation model for feature extraction and segmentation recognition of preprocessed images. This module includes a GPU acceleration unit on which the micro-crack semantic segmentation model runs. The micro-crack semantic segmentation model employs a U-Net network structure and integrates the aforementioned fine crack attention mechanism, configured to perform feature map weighting, transmission, and fusion steps.
[0023] The parameter measurement module is used to calculate the geometric parameters of the microcracks based on the identification results; The results output and storage module is used to display detection results, alarms, and store data. The main control module is connected to each of the above modules and is used to coordinate the operation of each module.
[0024] This invention provides a machine vision-based automatic identification device and method for microcracks on the surface of quartz glass. It has the following beneficial effects: 1. Multi-dimensional fusion achieves micrometer-level accurate recognition. This invention breaks through the limitations of traditional single-vision detection. Through the deep fusion of multi-dimensional sensing imaging, adaptive image enhancement, and attention-based semantic segmentation models, a full-link optimization system from the optical physical layer to the algorithm logic layer is constructed. This deep fusion effectively overcomes complex background noise, significantly reduces the false negative and false positive rates of micro-cracks, and enables the system to maintain extremely high recognition confidence even when facing extremely minute defects, improving detection accuracy to the micrometer level, far exceeding existing technical standards.
[0025] 2. Significantly improved inspection efficiency through full-process automation. Thanks to the GPU acceleration unit and efficient pipeline architecture, this device achieves millisecond-level response from image acquisition and processing to result output. This fully automated parallel processing mode completely solves the pain points of slow speed and fatigue in manual visual inspection, seamlessly adapts to the pace of high-speed production lines, and achieves a multiple increase in inspection capacity, ensuring the real-time and continuous quality control in large-scale mass production environments.
[0026] 3. Standardization and multi-scale mechanisms ensure generalization ability. Addressing the diverse working conditions in industrial environments, this method utilizes a standardized hybrid preprocessing algorithm and the multi-scale feature extraction capabilities of the U-Net network, endowing the model with extremely strong robustness. The system can not only adapt to the surface characteristics of quartz glass of different specifications but also maintain stable detection performance under varying illumination or texture differences. This eliminates the need for frequent algorithm redevelopment for specific products, greatly expanding the applicability and reusability of the technology.
[0027] 4. A closed-loop function from single-factor judgment to intelligent decision-making. This invention transcends the basic function of traditional equipment, which can only determine the presence or absence of defects. It integrates multiple functions such as microcrack semantic segmentation, precise measurement of geometric parameters, and cluster analysis. By constructing a digital archive containing feature vectors, the system not only outputs accurate quantitative data but also provides production managers with a traceable quality map, directly assisting in process optimization and decision-making, and significantly reducing the hidden costs of quality control for enterprises.
[0028] 5. Modular design balances ease of installation and stable operation. In its design, this invention fully considers the actual needs of industrial sites, adopting a compact modular layout. The multi-dimensional sensing modules and main control unit are easily integrated into existing production line conveyor mechanisms, eliminating the need for large-scale modifications to existing production lines. Simultaneously, industrial-grade hardware selection and anti-interference algorithms ensure long-term reliable operation of the device under complex environments such as temperature and humidity variations, demonstrating extremely high practicality for engineering applications. Attached Figure Description
[0029] Figure 1 This is a block diagram of the overall structure of the device of the present invention; Figure 2 This is a schematic diagram of the optical imaging structure and polarization principle of the multi-dimensional image sensing module of the present invention. Figure 3 This is the main flowchart of the method of the present invention; Figure 4 This is a detailed flowchart illustrating the hybrid image preprocessing algorithm of the present invention; Figure 5 This is a diagram of the improved U-Net network architecture with integrated attention mechanism of the present invention; Figure 6 This is an internal principle block diagram of the fine crack attention mechanism module of the present invention; Figure 7 This is a schematic diagram of the mathematical model for measuring the geometric parameters of microcracks according to the present invention. Detailed Implementation
[0030] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0031] Please see the appendix Figures 1-7This invention provides a machine vision-based automatic identification device and method for microcracks on quartz glass surfaces, including a multi-dimensional image sensing module, an image preprocessing module, an AI visual recognition module, a parameter measurement module, a result output and storage module, and a main control module. The modules are interconnected via a high-speed data bus, forming a closed-loop system from optical imaging to intelligent decision-making under the coordinated scheduling of the main control module.
[0032] This multi-dimensional image sensing module is the core component for acquiring high-quality raw images. Its physical layout adopts a coaxial design architecture for vertical illumination and imaging. The multi-dimensional image sensing module includes a high-resolution industrial camera, a ring-polarized light source, and a displacement adjustment unit. The industrial camera is vertically mounted directly above the quartz glass to be inspected, with its lens optical axis coinciding with the normal to the quartz glass surface to ensure minimal distortion of the imaging field of view. The displacement adjustment unit is rigidly connected to the industrial camera and configured to drive the industrial camera to perform precise movement along the optical axis (i.e., the Z-axis). In the initial stage of the inspection process, the main control module sends control commands to the displacement adjustment unit to adjust the physical distance between the industrial camera and the quartz glass surface according to preset focal length parameters, ensuring that the imaging plane accurately falls on the upper surface of the quartz glass, thereby obtaining clear texture details.
[0033] To address the specular reflection issue caused by the smooth and dense surface of quartz glass, the light source system in this embodiment features a specialized optical design. A ring-polarized light source is positioned around the lens of the industrial camera, arranged in a ring array to provide a uniform illumination field for the imaging area. This light source is equipped with a high-brightness LED array, a diffuser, and a polarizer assembly with adjustable polarization angles. The diffuser is located in the light path of the LED array, used to convert the point light source into a soft surface light source, eliminating the "hot spot" glare generated by direct illumination from the LED beads.
[0034] More importantly, the ring-shaped polarization light source integrates a polarization optical modulation mechanism. In the image acquisition step S1, utilizing the polarization characteristics of light to suppress reflection and scattering from the quartz glass surface is a crucial step. This invention utilizes the Fresnel reflection principle and Malus's law. When unpolarized light passes through the polarizer at the light source, it becomes linearly polarized light and illuminates the quartz glass surface. For a smooth quartz glass surface, the specularly reflected light largely retains the polarization state of the incident light; however, the light illuminating the rough surface with microcracks undergoes diffuse reflection, and its polarization state is "disrupted," i.e., a depolarization effect occurs.
[0035] Industrial cameras typically have a polarizer at the front of the lens, or the camera itself may possess polarization sensing capabilities, with its polarization direction set as a reference direction. The intensity of light entering the camera can be controlled by adjusting the polarization angle of the polarizer in the ring-polarized light source. Let the intensity of light incident on the camera sensor be... According to Malus's law, the intensity of the specular reflection component... polarization angle of the light source and camera offset angle The relationship between them approximately satisfies the following formula:
[0036] in: This represents the initial intensity of the incident light after it passes through the diffuse reflector. This represents the specular reflectance coefficient of the quartz glass surface; Indicates the polarization angle of a ring-polarized light source; This represents the fixed polarization angle of the analyzer in an industrial camera (usually set as a constant).
[0037] To minimize reflections, the adjustment mechanism in this embodiment aims to find the optimal polarization angle. , making .at this time, Approaching 0, specular reflection light Effectively blocked, it cannot enter the industrial camera. Instead, diffuse light generated by the microcracks... Containing polarization components in all directions, and not strictly limited by the analyzer angle, it can pass through the lens smoothly for imaging. Therefore, in the final acquired raw image, the bright reflections of the background are filtered out, while the microcracks appear as high gray values or specific texture features relative to the background, thus significantly improving the signal-to-noise ratio of the image.
[0038] In actual operation, the image acquisition step S1 executes the following logic: The main control module first activates the displacement adjustment unit to complete focusing; then it activates the ring polarized light source and continuously adjusts the polarization angle of the light source within the range of 0° to 90° through the servo mechanism, while monitoring the average gray value or highlight overflow area of the image; when the monitored indicators reach the preset light suppression threshold, the current polarization angle and brightness parameters are locked; finally, under the control of the trigger signal, the industrial camera exposes and acquires the image of the quartz glass surface after the above optical modulation, and transmits it as the original image to the image preprocessing module.
[0039] Furthermore, the AI visual recognition module in this embodiment does not rely on conventional general-purpose processors, but instead incorporates a dedicated GPU acceleration unit. This unit features a massively parallel computing architecture, communicates with the main control module via a high-speed PCI-E interface, and is specifically designed to handle deep learning model inference tasks in subsequent steps. This hardware architecture design ensures that even with high-resolution image input and complex network structure operations, the system can maintain millisecond-level processing response, meeting the stringent timeliness requirements of real-time online inspection in industrial production lines. All image data, recognition results, and intermediate variables are ultimately integrated into the enterprise's quality management database through the result output and storage module, achieving persistent data management.
[0040] In this embodiment, the image preprocessing module receives the original image acquired by the multi-dimensional image sensing module and executes a series of algorithmic operations aimed at improving the image signal-to-noise ratio and normalizing the data distribution. Although the original image has undergone optical polarization suppression processing, weak random speckle noise may still remain on the quartz glass surface, and the grayscale contrast between microcracks and the background is usually low. Directly inputting the image into the neural network may lead to insufficient feature extraction. Therefore, this embodiment employs a hybrid image preprocessing algorithm, which sequentially performs grayscale conversion, adaptive Gaussian denoising, contrast-limited adaptive histogram equalization, and pixel normalization.
[0041] In the first stage of image preprocessing, to reduce the data dimensionality of subsequent calculations and focus on brightness information, the system first converts the acquired original color image (usually in RGB format) into a single-channel grayscale image. This process is not a simple channel discarding, but rather a weighted average conversion based on the differences in human eye sensitivity to different color light waves or the response characteristics of image sensors to specific spectra. Assuming the coordinates in the original image... The pixel value at that location is , including red ,green ,blue Three components, the converted grayscale value The calculation formula is as follows:
[0042] Subsequently, to address the random noise present in the grayscale image, this invention does not employ traditional fixed-parameter Gaussian filtering, because globally uniform smoothing often blurs the edge details of cracks while removing noise. This embodiment uses an adaptive Gaussian filtering strategy, the core of which lies in the dynamic change of the filter kernel shape according to local image features. The system first uses a sliding window to traverse the grayscale image, calculating the local noise intensity in the neighborhood of each pixel. Let... () represents the current pixel coordinates. The noise standard deviation estimate within a local neighborhood window centered at this point. The standard deviation used to modulate the Gaussian filter.
[0043] To achieve differentiated processing for different noise levels, the standard deviation of the adaptive filter... A linear positive correlation is established with local noise intensity; that is, the stronger the noise in a region, the greater the smoothing effect, and vice versa, the original details are preserved. The calculation model is expressed as follows:
[0044] in, It is a preset adjustment coefficient used to control the gain of the filter strength due to noise; It is a very small positive number used to prevent the standard deviation from approaching zero and causing calculation anomalies. It is based on dynamic calculation. Construct a two-dimensional Gaussian filter kernel function at this location. :
[0045] in, , This represents the relative position in the filter kernel coordinate system. The final denoised image. This is the result of convolving the original grayscale image with this dynamic Gaussian kernel:
[0046] After the above denoising process, to address the issue of insufficient contrast between the micro-crack area and the background, this embodiment introduces a contrast-limited adaptive histogram equalization algorithm. This algorithm abandons the traditional approach of performing histogram equalization on the entire image, instead dividing the image into several continuous and non-overlapping rectangular sub-blocks. For each sub-block, its gray-level histogram is calculated independently. To prevent the amplification of residual noise due to over-enhancement in uniform background areas, the algorithm sets a contrast clipping threshold. When the frequency of a certain gray level exceeds When the excess portion is cropped out, it is evenly distributed to the other gray levels of the histogram, thereby limiting the slope of the local histogram, which in turn limits the maximum enhancement of local contrast.
[0047] After completing the histogram equalization mapping of each sub-block, the algorithm employs bilinear interpolation to reconstruct the final pixel values in order to eliminate potential block artifacts at sub-block boundaries. For any point in the image, its final grayscale value is obtained by interpolation using the transformation functions of its four surrounding sub-blocks based on distance weights, thereby generating a smooth and detailed enhanced image. .
[0048] Finally, to accelerate the convergence speed of the neural network in the subsequent AI visual recognition module and eliminate the influence of changes in the absolute value of illumination intensity, the system performs normalization processing on the enhanced image. This step linearly maps the dynamic range of pixel values from [0,255] to the interval [0,1]. Let the bit depth of the image be... (Typically 8 bits, or 255), the normalized preprocessed image The calculation is as follows:
[0049] Through this series of rigorous preprocessing steps, the output preprocessed image preserves the microcrack topology of the quartz glass surface while suppressing the interference of environmental noise and uneven illumination to the greatest extent, providing high-quality standard input data for subsequent semantic segmentation models.
[0050] In this embodiment, the AI visual recognition module, as the core processing unit, receives the normalized image from the image preprocessing module and performs pixel-level semantic segmentation using deep learning technology. The micro-crack semantic segmentation model built into this module is based on an improved U-Net network architecture, which consists of an encoder forming a contraction path, a decoder forming an expansion path, and skip connections connecting the two. The encoder gradually reduces the spatial resolution of the feature map and increases the number of channels through successive convolutional and pooling layers, thereby extracting high-level semantic features from the image. The decoder gradually restores the spatial size of the feature map through deconvolutional and convolutional layers until it outputs a micro-crack segmentation result with the same resolution as the original image.
[0051] To address the issue of feature loss in deep networks due to the extremely fine lines and low contrast of microcracks in quartz glass, this invention introduces a fine crack attention mechanism at the skip connections of U-Net. This mechanism does not simply copy the encoder's feature map directly to the decoder; instead, it first performs weighted modulation to enhance the response values of the crack region and suppress background noise. This fine crack attention mechanism achieves adaptive feature refinement by fusing channel attention and spatial attention.
[0052] In the specific feature processing flow, suppose the feature map output by a certain layer of the encoder is... ,in For the number of channels, and These represent the height and width of the feature map, respectively. The fine crack attention mechanism first generates channel attention maps separately. Spatial attention map The channel attention module focuses on "what" are important features (i.e., which channels respond to crack features), while the spatial attention module focuses on "where" are important regions (i.e., the location of the crack in the image).
[0053] For spatial attention maps In this embodiment, the generation of the feature map employs a parallel strategy of max pooling and average pooling to aggregate information along the channel dimension. First, the input feature map is processed along the channel axis. Perform average pooling operation and max pooling operation Generate two two-dimensional descriptors and Then, the two descriptors are concatenated along the channel dimension and passed through a convolutional kernel of size [size missing]. The convolutional layers perform feature fusion, and finally, a spatial weight map with values ranging from [0,1] is generated by the Sigmoid activation function. The calculation formula for this process is as follows:
[0054] in: This represents the Sigmoid activation function; Indicates the kernel size as Convolution operations; This indicates a splicing operation along the channel dimension; and These are the average pooling and max pooling results of the feature maps along the channel dimension, respectively.
[0055] Generated Spatial Weight Map It can accurately reflect the importance of each pixel in the image. In this weighted map, pixels corresponding to the microcrack edge feature region are assigned the first weight. Meanwhile, pixels in the corresponding background feature regions are assigned a second weight. Due to the monotonically increasing nature of the sigmoid function and the network's learning of crack features, the trained model must satisfy... The numerical relationship is used to highlight the crack outline in space.
[0056] Ultimately, the fine crack attention mechanism generates a spatial attention map. Channel attention map Compared with the original input feature map Perform element-wise multiplication to generate a weighted feature map. This fusion process not only filters key features in the channel dimension but also locates the crack region in the spatial dimension. Its mathematical expression is as follows:
[0057] in, This indicates element-wise multiplication. In this formula, the input feature map FF is first multiplied by the channel attention map. Modulation yields channel-weighted features, which are then further processed by a spatial attention map. Modulation. Feature map after double weighting. Containing rich details and clear semantic information, the features are then transmitted to the corresponding layer of the decoder via skip connections, where they are concatenated and fused with the upsampled features from the decoder. This mechanism ensures that even microcracks occupying only a few pixels in width can have their features accurately reconstructed by the decoder after being transmitted through the deep network, ultimately outputting a high-precision binarized segmentation map.
[0058] In this embodiment, the parameter measurement module performs precise geometric morphological analysis and quantization calculations based on the binary microcrack segmentation results output by the AI visual recognition module. Since microcracks typically appear as irregular strip-like structures with a certain width and curvature in images, simple pixel statistics cannot accurately reflect their physical size. Therefore, this module first performs morphological thinning and edge detection processing on the binary image, extracting the external contour point set and skeleton centerline of the microcrack, and then constructs a mathematical model based on this to calculate the length, width, and area parameters of the crack.
[0059] For fitting the microcrack centerline, this invention employs the least squares method to perform regression analysis on the skeletonized pixels. Assume the set of crack centerline pixels obtained through the skeleton extraction algorithm is... ,in Let be the total number of pixels. To eliminate quantization errors during the digitization sampling process, the system constructs a linear or polynomial fitting model. Taking linear fitting as an example, let the equation of the fitted line be... The parameter measurement module determines the optimal slope by minimizing the sum of squared perpendicular distances from all sampling points to the line. and intercept .
[0060] Define the error objective function as follows:
[0061] in: This represents the total mean square error of the fit; Indicates the first Image coordinates of the centerline skeleton points; This represents the slope of the fitted line; This represents the intercept of the fitted line.
[0062] By considering the objective function with respect to... and By taking the partial derivative and setting it to zero, the system of equations can be solved to obtain the centerline parameters that characterize the overall crack orientation. For long cracks with complex bending characteristics, the system divides them into several micro-segments, and applies the above algorithm to each micro-segment for piecewise fitting, thereby ensuring high fidelity of the fitted curve to the true crack morphology.
[0063] After determining the equation of the crack centerline, measuring the microcrack width is transformed into calculating the geometric distance from the edge contour points to the centerline. The system iterates through the set of crack outer contour points extracted by edge detection operators (such as the Canny operator). Let any edge contour point be... Its distance to the fitting center line Euclidean distance The calculation formula is:
[0064] in: Indicates the first The vertical distance from each edge point to the center line; Represents the pixel coordinates of the edge points; This represents absolute value operations.
[0065] To obtain a statistically significant width metric, the system calculates the distance to all edge points. The statistical characteristic values. Usually, all... Twice the average value as the average pixel width of the microcrack , or take The maximum pixel width is twice the maximum value, which is used to characterize the degree of crack opening at different locations.
[0066] Finally, to convert the pixel parameters in the image domain into the actual dimensions in the physical domain, the parameter measurement module calls the pre-stored camera calibration parameters. Let the spatial resolution calibration coefficients of the system be... (unit: This coefficient is determined by both the pixel size of the industrial camera and the magnification of the optical lens. The actual physical length of the microcrack. Actual physical width and actual physical area They are obtained through the following transformations respectively:
[0067]
[0068]
[0069] in: The pixel arc length is calculated along the fitted center line; This represents the total number of pixels within the microcrack area.
[0070] Through the above calculation process, the device not only outputs visual images of the cracks, but also directly outputs precise geometric data that conforms to industrial metrological standards, providing an objective basis for subsequent quality grading.
[0071] In this embodiment, the result output and storage module not only undertakes the responsibility of data archiving but also serves as the entry point for intelligent analysis, realizing the transformation and mining of high-dimensional feature information from single image data. To support subsequent image retrieval and clustering analysis, in addition to storing conventional geometric parameters (such as length, width, and area), the system also simultaneously constructs and stores high-dimensional feature vectors characterizing the morphological and textural properties of microcracks. These feature vectors are directly extracted from the end output of the U-Net network encoder in the AI visual recognition module and, after global average pooling processing, form a compact mathematical descriptor with high semantic discriminative power.
[0072] Specifically, for each detected microcrack sample, the system constructs a standardized detection record containing a unique identifier, timestamp, physical geometric parameters, and feature vector, and stores it in the detection database. When image retrieval is required, i.e., searching for historical cases similar to the current defect to assist in source tracing analysis, the system uses a cosine similarity algorithm to measure the degree of matching between the current sample and historical samples in the database.
[0073] Assume the microcrack feature vector to be retrieved is the query vector. The first one stored in the database The feature vector of each historical sample is Both have the same dimension. Cosine similarity The similarity between two vectors is evaluated by calculating the cosine of the angle between them in a multidimensional feature space. The formula is as follows:
[0074] in: Represents the query vector In the Component values in each dimension; Representing the history vector In the Component values in each dimension; The Euclidean norm (modulus) of a vector.
[0075] The algorithm's output value ranges from [−1, 1]. The closer the value is to 1, the more similar the two microcracks are in terms of deep semantic features such as texture and morphology. The system sorts the samples in the database in descending order based on the calculation results and outputs the samples with the highest similarity. One image was used as a reference.
[0076] After accumulating a large amount of detection data, this embodiment further utilizes an unsupervised learning algorithm to automatically summarize the defect types on the quartz glass surface. The system employs the K-means clustering algorithm to group all microcrack feature vectors in the detection database to identify potential typical defect patterns in the production process (such as specific scratches or stress cracks). The K-means algorithm aims to divide the dataset into... The samples are arranged in non-overlapping clusters, such that samples within each cluster are as close together as possible, while samples between clusters are as far apart as possible.
[0077] The core optimization objective of this clustering process is to minimize the sum of squared distances from all sample points to the center of their respective clusters, i.e., to minimize the objective function. Assume there are a total of The sample vectors are divided into: The cluster, the first The center (centroid) of each cluster is Then the objective function Defined as:
[0078] in: This represents the sum of squared clustering errors, used to measure the tightness of clusters; Indicates the first A sample set of each cluster; Indicates belonging to a set The Feature vectors of each sample; Indicates the first The geometric center vector of a cluster is the arithmetic mean of all vectors in that cluster.
[0079] The algorithm iteratively performs the "assignment" and "update" steps alternately: first, it calculates each sample vector... To each cluster center The Euclidean distance is used to assign the centroid to the nearest cluster; then the new centroid of each cluster is recalculated. This iterative process continues until the objective function is achieved. The clustering process converges or reaches the preset number of iterations. The final clustering results are output in the form of statistical charts, which intuitively show the distribution ratio of different types of microcracks during the production cycle, thereby helping process engineers to identify abnormal trends and adjust production parameters accordingly.
[0080] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for automatic identification of microcracks on the surface of quartz glass based on machine vision, characterized in that, Includes the following steps: Step S1: Image acquisition, using a multi-dimensional image sensing module to acquire the original image of the quartz glass surface; Step S2: Image preprocessing, the original image is subjected to denoising and enhancement processing to obtain a preprocessed image; Step S3: Microcrack feature extraction. The preprocessed image is used to extract features through the encoder of the semantic segmentation model to obtain a multi-scale feature map. Step S4: Semantic segmentation and identification of microcracks. The multi-scale feature map is upsampled and classified by the decoder of the semantic segmentation model to output the microcrack segmentation result. The microcrack region is identified based on the microcrack segmentation result. Step S5: Crack parameter measurement. Based on the microcrack segmentation results, calculate the geometric parameters of the microcrack. Step S6: Output and store the results. Output the recognition results and the geometric parameters, and store the relevant data in the database.
2. The automatic identification method for microcracks on the surface of quartz glass based on machine vision according to claim 1, characterized in that, In step S1, the multi-dimensional image sensing module includes an industrial camera, a ring-polarized light source, and a displacement adjustment unit; the acquisition of the original image of the quartz glass surface using the multi-dimensional image sensing module specifically includes: The displacement adjustment unit is controlled to adjust the detection distance between the industrial camera and the quartz glass surface; Adjust the polarization angle and brightness of the annular polarized light source to suppress reflection and scattering on the quartz glass surface; The industrial camera captures images of the quartz glass surface at the specified polarization angle and brightness, which are then used as the original images.
3. The automatic identification method for microcracks on the surface of quartz glass based on machine vision according to claim 1, characterized in that, In step S2, the image preprocessing employs a hybrid image preprocessing algorithm, specifically including: Convert the original image to a grayscale image; The grayscale image is denoised using an adaptive Gaussian filter, wherein the filter standard deviation is dynamically adjusted according to the local noise intensity of the image. The denoised image is enhanced by using a contrast-limited histogram equalization algorithm to strengthen the grayscale difference between the microcrack area and the background. The enhanced image pixel values are normalized, and the preprocessed image is output.
4. The automatic identification method for microcracks on the surface of quartz glass based on machine vision according to claim 1, characterized in that, In steps S3 to S4, the semantic segmentation model adopts a U-Net network structure, the encoder and the decoder constitute the contraction path and expansion path of the U-Net network structure, respectively, and the U-Net network structure also includes skip connections connecting the contraction path and the expansion path; The encoder consists of multiple convolutional layers and pooling layers for feature extraction; The decoder consists of multiple deconvolutional and convolutional layers, used to restore image resolution and output pixel-level microcrack segmentation results; The skip connection is used to transmit the feature maps output by each layer of the encoder to the corresponding layer of the decoder.
5. The automatic identification method for microcracks on the surface of quartz glass based on machine vision according to claim 1, characterized in that, The U-Net network structure introduces a fine crack attention mechanism, which specifically includes the following steps: The fine crack attention mechanism is used to fuse channel attention and spatial attention, and the feature map output by the encoder is weighted. A spatial weight map is generated, wherein the weight corresponding to the microcrack edge feature region is the first weight, and the weight corresponding to the background feature region is the second weight. The value of the first weight is greater than the value of the second weight. A weighted feature map is generated based on the spatial weight map. The weighted feature map is transmitted to the corresponding layer of the decoder through the skip connection for feature fusion.
6. The automatic identification method for microcracks on the surface of quartz glass based on machine vision according to claim 1, characterized in that, In step S5, the crack parameter measurement specifically includes: Edge detection is performed on the binary image corresponding to the microcrack segmentation result to extract the edge contour of the microcrack; The centerline of the microcrack was fitted using the Hough transform and the least squares method; The area of the microcrack is calculated based on the edge profile and the pre-calibrated camera calibration parameters. The length and width of the microcrack are calculated based on the fitting results of the edge profile, the center line, and the camera calibration parameters.
7. The automatic identification method for microcracks on the surface of quartz glass based on machine vision according to claim 1, characterized in that, The database mentioned in step S6 is a detection database; step S6 specifically includes: Feature extraction is performed on the microcrack region to generate a feature vector, a detection record containing the feature vector and the geometric parameters is constructed, and the detection record is stored in the detection database; Following step S6, the method further includes step S7, image retrieval and clustering: Using a feature vector matching algorithm, defect images similar to the currently identified microcracks are retrieved from the detection database. The K-means clustering algorithm was used to perform cluster analysis on the microcrack images in the detection database to statistically analyze the distribution of different types of microcracks.
8. An automatic identification device for microcracks on the surface of quartz glass based on machine vision, characterized in that, The apparatus for implementing the method of any one of claims 1 to 7 comprises: A multi-dimensional image sensing module is used to acquire images of the quartz glass surface; The image preprocessing module is used to enhance and denoise the acquired images; The AI visual recognition module has a built-in micro-crack semantic segmentation model, which is used for feature extraction and segmentation recognition of preprocessed images. The parameter measurement module is used to calculate the geometric parameters of the microcracks based on the identification results; The results output and storage module is used to display detection results, alarms, and store data. The main control module is connected to each of the above modules and is used to coordinate the operation of each module.
9. The automatic identification device for microcracks on the surface of quartz glass based on machine vision according to claim 8, characterized in that, The light source in the multi-dimensional image sensing module is a ring-polarized LED light source, which is equipped with an LED array with adjustable polarization angle and a diffuse reflector. The polarization angle can be adjusted from 0° to 90°.
10. The automatic identification device for microcracks on the surface of quartz glass based on machine vision according to claim 8, characterized in that, The AI visual recognition module includes a GPU acceleration unit, and the microcrack semantic segmentation model runs on the GPU acceleration unit; The microcrack semantic segmentation model adopts the U-Net network structure described in claim 4 and integrates a fine crack attention mechanism, which is configured to perform the feature map weighting, transmission and fusion steps described in claim 5.