Quartz stone surface defect detection method, system and equipment

By building a dual-polarization imaging optical path and combining deep learning technology to optimize polarization parameters and contrast enhancement treatment, the problem of insufficient polarization parameters in surface defect detection of quartz stone is solved, and high-precision defect identification and classification are achieved.

CN120404749AActive Publication Date: 2025-08-01LIAONING HANKING SEMICON MATERIALS CO LTD

Patent Information

Application Number
CN202510903023.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-08-01
Estimated Expiration
2045-07-01

AI Technical Summary

Technical Problem

In the existing quartz stone surface defect detection technology, the polarization parameter optimization is insufficient, the feature extraction is insufficient, and the classification accuracy is low, making it difficult to meet the quality control needs of industrial-grade products.

Method used

A dual-polarization imaging optical path is constructed, and the polarization parameters are optimized based on the optical anisotropy characteristics of quartz stone are optimized. Images are acquired simultaneously through the dual-polarization imaging optical path, polarization difference calculation and contrast enhancement processing are performed, and defect identification and classification are combined with deep learning technology.

Benefits of technology

It significantly improves the contrast and accuracy of defect detection, effectively identifys tiny defects, improves the stability and reliability of the detection system, enhances adaptability, and reduces the false detection rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120404749A_ABST
    Figure CN120404749A_ABST
Patent Text Reader

Abstract

The invention discloses a quartzite surface defect detection method, system and device, and relates to the technical field of image processing, and the method comprises the following steps: fixing a to-be-detected quartzite on a detection platform, and carrying out preprocessing; constructing a double-path polarization imaging light path; polarization parameter optimization is carried out based on the optical anisotropy characteristic of quartz stone, so that a polarization state difference is generated between a defect area and a normal area; under the condition of polarization parameter optimization, synchronously acquiring a first polarization image and a second polarization image through a double-path polarization imaging light path; performing polarization difference calculation on the first polarization image and the second polarization image to generate a polarization difference image; and carrying out contrast enhancement processing on the polarization difference image, identifying a defect area, carrying out defect classification, and outputting a quartz stone surface defect detection result. By optimizing polarization imaging parameter configuration and combining image processing, high-precision detection and intelligent classification of quartz stone surface defects are achieved, and the automation level and reliability of detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and particularly to a method, a system, and a device for detecting surface defects of quartz stone. Background Art

[0002] With the rapid development of industrial automation and intelligent manufacturing, surface defect detection technology based on machine vision plays an increasingly important role in the field of quality control. Quartz stone, as an important artificial stone, is widely used in fields such as architectural decoration and kitchen and bathroom countertops. During the production process of quartz stone, due to factors such as raw material ratio, forming process, and processing, its surface is prone to defects such as cracks, bubbles, impurities, and scratches. These defects not only affect the appearance quality of the product but may also cause structural damage during use. To ensure product quality, it is necessary to make full use of the optical properties of quartz stone and combine advanced image processing technology for detection.

[0003] Currently, the detection of quartz stone surface defects mainly uses single-light-source illumination and ordinary image acquisition methods, and fails to make full use of the optical anisotropy characteristics of quartz stone. Although some detection systems introduce polarization imaging technology, there is a lack of optimized configuration of polarization parameters, and the image processing algorithm is relatively simple, making it difficult to effectively process dual-channel polarization image information. At the same time, the existing detection methods still mainly rely on traditional algorithms in image feature extraction and defect classification, and fail to effectively integrate deep learning technology with polarization imaging characteristics, resulting in insufficient detection accuracy and classification reliability and being difficult to meet the requirements of industrial-grade quartz stone product quality control. Summary of the Invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides a method for detecting quartz stone surface defects to solve the technical problems such as insufficient optimization of polarization parameters, insufficient feature extraction, and low classification accuracy existing in the prior art.

[0006] To solve the above technical problems, the present invention provides the following technical solutions: In a first aspect, the present invention provides a method for detecting quartz stone surface defects, which includes: Fix the quartz stone to be detected on the detection platform and perform preprocessing on the surface of the quartz stone; Construct a dual-channel polarization imaging optical path; the dual-channel polarization imaging optical path includes an adjustable polarization light source, a beam splitter, a first imaging optical path, and a second imaging optical path; Optimize the polarization parameters based on the optical anisotropy characteristics of quartz stone, and by adjusting the angles of the polarizer and the polarization analyzer, make the polarization state difference between the defect area and the normal area; Under the optimized polarization parameters, the first polarization image and the second polarization image are synchronously acquired through a dual-channel polarization imaging optical path; Perform polarization difference calculation on the first polarization image and the second polarization image to generate a polarization difference image; Perform contrast enhancement processing on the polarization difference image, identify the defect area and classify the defects, and output the detection result of the quartz stone surface defects.

[0007] As a preferred solution of the quartz stone surface defect detection method of the present invention, wherein: the adjustable polarization light source includes a broadband light source and a polarizer; the beam splitter divides the beam reflected from the quartz stone surface into two paths, which respectively enter the first imaging optical path and the second imaging optical path; the first imaging optical path is configured with a first polarization analyzer and a first image sensor, and the second imaging optical path is configured with a second polarization analyzer and a second image sensor.

[0008] As a preferred solution of the quartz stone surface defect detection method of the present invention, wherein: the polarization parameter optimization based on the optical anisotropy characteristics of the quartz stone includes: Test the optical anisotropy characteristics of the quartz stone sample, measure the principal optical axis direction, refractive index difference and optical path difference parameters, and establish an optical anisotropy characteristic distribution map; Based on the optical anisotropy characteristic distribution map, establish a mapping database between the defect type and the polarization response parameters; Determine the angle adjustment range of the polarizer and the polarization analyzer according to the principal optical axis direction; Based on the mapping database, determine the initial angles of the polarizer and the polarization analyzer, adjust the angle combination based on the initial angles within the angle adjustment range, and collect the corresponding light intensities in the orthogonal polarization directions; Calculate the polarization contrast based on the light intensities in the orthogonal polarization directions; Establish a polarization contrast matrix to evaluate the detection effects of different polarization parameter combinations on various types of defects; Taking the maximization of the weighted average of the polarization contrasts of various types of defects as the goal, determine the comprehensive optimal angle parameters of the polarizer and the polarization analyzer.

[0009] As a preferred solution of the quartz stone surface defect detection method of the present invention, wherein: the synchronous acquisition of the first polarization image and the second polarization image by the dual-channel polarization imaging optical path includes: Set the polarizer angle and the polarization analyzer angle according to the comprehensive optimal angle parameters; Based on the set polarization parameters, determine the acquisition parameters of the first image sensor and the second image sensor; Perform multi-point image acquisition on the quartz stone surface according to the preset scanning path, and each acquisition point sends a synchronous trigger signal to the first image sensor and the second image sensor through an external trigger signal generator to synchronously obtain the first polarization image and the second polarization image; Calculate the image quality parameters for the polarization images of each acquisition point; When the image quality parameter is lower than the preset quality threshold, execute the image re-acquisition process for the corresponding acquisition point.

[0010] As a preferred solution of the quartz stone surface defect detection method of the present invention, wherein: generating the polarization difference image includes: Perform image preprocessing on the first polarization image and the second polarization image; Establish a dual-branch convolutional neural network to extract features from the first polarization image and the second polarization image respectively, and enhance the feature expression ability through skip connections and channel attention mechanisms; Introduce a three-scale polarization difference calculation strategy to calculate the polarization difference values at three scales of pixel level, block level and region level, and obtain the initial polarization difference result through weighted fusion; Calculate the complexity index according to the local image gradient amplitude and gray variance, and adjust the sensitivity parameter of the polarization difference calculation according to the complexity index; Perform edge-preserving smoothing processing on the polarization difference result by using guided filtering, and splice and combine the processing results of each acquisition point according to the preset scanning path to generate the polarization difference image of the quartz stone surface.

[0011] As a preferred solution of the quartz stone surface defect detection method of the present invention, wherein: the contrast enhancement processing adopts the limited contrast adaptive histogram equalization algorithm.

[0012] As a preferred solution of the quartz stone surface defect detection method of the present invention, wherein: identifying the defect area and classifying the defects includes: Perform binary processing on the enhanced polarization difference image by using the adaptive threshold segmentation algorithm to separate the defect area from the background area and obtain the binary defect candidate image; Perform morphological operation processing on the binary defect candidate image to obtain the binary image of the effective defect area; Extract the multi-dimensional feature parameters of the effective defect area and construct a feature vector matrix; the multi-dimensional feature parameters include geometric feature parameters, gray feature parameters and polarization feature parameters; Use the feature vector matrix as the input and adopt a support vector machine classifier to identify the defect type; Generate a structured defect detection report.

[0013] In a second aspect, the present invention provides a quartz stone surface defect detection system, including: A preprocessing module for fixing the quartz stone to be detected on the detection platform and preprocessing the surface of the quartz stone; Dual-path polarization imaging module, used to construct a dual-path polarization imaging optical path, including a tunable polarization light source, a beam splitter, a first imaging optical path, and a second imaging optical path; Polarization parameter optimization module, used to optimize polarization parameters based on the optical anisotropy characteristics of quartz, and by adjusting the angles of the polarizer and the polarization analyzer, make the polarization state difference between the defect area and the normal area; Synchronous image acquisition module, used to synchronously acquire the first polarization image and the second polarization image through the dual-path polarization imaging optical path under the condition of optimized polarization parameters; Polarization difference calculation module, used to perform polarization difference calculation on the first polarization image and the second polarization image to generate a polarization difference image; Defect detection and analysis module, used to perform contrast enhancement processing on the polarization difference image, identify the defect area and classify the defects, and output the detection result of the quartz surface defects.

[0014] In a third aspect, the present invention provides a computer device, including a memory and a processor, and the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the quartz surface defect detection method in the first aspect of the present invention is implemented.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, wherein: when the computer program is executed by the processor, any step of the quartz surface defect detection method in the first aspect of the present invention is implemented.

[0016] The beneficial effects of the present invention are as follows: By constructing a dual-path polarization imaging optical path and optimizing polarization parameters based on the optical anisotropy characteristics of quartz, the contrast of defect detection is greatly improved, and it can effectively identify tiny defects that are difficult to detect. By adopting a six-degree-of-freedom detection platform, temperature stabilization preprocessing, and a synchronous trigger acquisition mechanism, the influence of environmental factors and system errors on the detection results is effectively eliminated, ensuring the stability of the detection process and the reproducibility of the results, and improving the reliability of the detection system. Through three-scale polarization difference calculation and adaptive parameter adjustment based on complexity indicators, the detection sensitivity can be intelligently adjusted according to the texture complexity of different regions on the quartz surface, effectively controlling the false detection rate while ensuring the detection accuracy, and significantly enhancing the adaptability. Through the organic combination of polarization imaging technology and intelligent image processing algorithms, improvements have been made in terms of detection accuracy, efficiency, stability, and automation degree compared with the prior art. Description of the Drawings

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0018] Figure 1 It is a flowchart of a method for detecting surface defects of quartz stone.

[0019] Figure 2 It is a flowchart of synchronous acquisition of dual-channel polarization images for the method of detecting surface defects of quartz stone.

[0020] Figure 3 It is a flowchart of generating polarization difference images for the method of detecting surface defects of quartz stone.

[0021] Figure 4 It is a schematic diagram of a system for detecting surface defects of quartz stone. Specific Embodiments

[0022] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will provide a detailed description of the specific embodiments of the present invention with reference to the accompanying drawings of the specification.

[0023] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the spirit of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0024] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that can be included in at least one implementation manner of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it an individual or alternative embodiment that is mutually exclusive with other embodiments.

[0025] Refer to Figures 1 to 4 , which is an embodiment of the present invention. This embodiment provides a method for detecting surface defects of quartz stone. The flowchart is as shown in Figure 1 and includes the following steps: S1: Fix the quartz stone to be detected on the detection platform and preprocess the surface of the quartz stone.

[0026] Specifically, the detection platform has a six-degree-of-freedom adjustment function, and the positioning accuracy is not less than 0.1 μm.

[0027] Further, the preprocessing includes surface cleaning treatment and temperature stabilization treatment. Among them, the surface cleaning treatment is used to remove foreign pollutants such as dust, oil stains, and fingerprints on the surface of the quartz stone, avoid light scattering and reflection interference caused by surface contamination, and ensure that the detection system can accurately identify the defect characteristics of the quartz stone body rather than surface attachments; the temperature stabilization treatment is used to eliminate the influence of ambient temperature changes on the optical properties of the quartz stone, reduce the internal stress changes and optical parameter drift caused by thermal expansion and contraction, and ensure the stability and reproducibility of polarized optical measurement during the detection process.

[0028] S2: Construct a dual-path polarization imaging optical path.

[0029] Among them, the dual-path polarization imaging optical path includes an adjustable polarization light source, a beam splitter, a first imaging optical path, and a second imaging optical path; the adjustable polarization light source includes a broadband light source and a polarizer; the beam splitter divides the beam reflected from the surface of the quartz stone into two paths, which respectively enter the first imaging optical path and the second imaging optical path; the first imaging optical path is configured with a first polarization analyzer and a first image sensor, and the second imaging optical path is configured with a second polarization analyzer and a second image sensor; the polarization transmission axes of the first polarization analyzer and the second polarization analyzer are orthogonal to each other, and the angle can be independently adjusted.

[0030] Optionally, the adjustable polarization light source adopts a combination of an LED light source and a linear polarizer, with the wavelength covering the visible light range; the polarizer is installed on a rotatable bracket and can be adjusted at an angle of 360°, and the light source maintains an appropriate distance from the surface of the quartz stone to ensure uniform surface illumination; the beam splitter adopts a beam splitter or a polarization beam splitter, which is inclined relative to the surface of the quartz stone, preferably 45°, and divides the reflected beam into two paths; the first imaging optical path and the second imaging optical path respectively focus the beam onto the corresponding image sensor through imaging lenses, the polarization transmission axes of the two polarization analyzers are orthogonal to each other, and the orthogonal relationship is ensured through a precise angle adjustment mechanism, and the image sensor adopts a CCD or CMOS device and realizes synchronous acquisition through external triggering.

[0031] In a specific embodiment, the polarizer is set to 0°, and the two polarization analyzers are respectively set to 45° and 135°. By constructing a dual-path polarization imaging optical path, it is possible to simultaneously obtain the image information of the surface of the quartz stone in the orthogonal polarization states, providing a data basis for subsequent polarization difference calculation. This optical path design realizes the independent adjustment of polarization parameters and the synchronous acquisition of dual-path images, improving the stability and reliability of defect detection.

[0032] S3: Optimize the polarization parameters based on the optical anisotropy characteristics of the quartz stone, and adjust the angles of the polarizer and the polarization analyzer to make the polarization state difference between the defect area and the normal area.

[0033] Specifically, step S3 includes the following steps: S3.1: Conduct optical anisotropy property tests on the quartzite samples, measure the principal optical axis direction, refractive index difference, and optical path difference parameters, and establish an optical anisotropy property distribution map.

[0034] In this embodiment, place the quartzite sample on the stage of a polarizing microscope and set the orthogonal polarization state; collect polarized images at different angles by rotating the stage, analyze the brightness changes in the images, and determine the distribution of the principal optical axis direction of the quartzite crystal; use ellipsometry to measure the refractive index parameters of each region on the surface of the quartzite at multiple wavelengths, and calculate the difference between the ordinary light refractive index and the extraordinary light refractive index; combine the sample thickness measurement to calculate the optical path difference parameters at each measurement point; use a grid scanning method to perform point-by-point measurement on the surface of the quartzite to obtain two-dimensional distribution data of the principal optical axis direction, refractive index difference, and optical path difference parameters; perform interpolation processing and smoothing filtering on the two-dimensional distribution data to generate a continuous optical anisotropy property distribution map. The distribution map established through this optical property test can accurately characterize the anisotropic distribution law inside the quartzite, providing a reliable theoretical basis for subsequent polarization parameter optimization.

[0035] S3.2: Based on the optical anisotropy property distribution map, establish a mapping database between the defect type and the polarization response parameters.

[0036] Furthermore, based on the optical anisotropy property distribution map, identify and classify the defect types in the quartzite, including crack defects, bubble defects, impurity defects, and stress concentration defects; extract the principal optical axis direction, refractive index difference, and optical path difference parameters corresponding to each defect region to establish a defect characteristic parameter data set; based on the theory of the interaction between polarized light and anisotropic media, use the Jones matrix to calculate the theoretical values of the transmitted light intensity of each defect region and the normal region under different combinations of the polarizer and analyzer angles; taking the maximization of the light intensity contrast between the defect region and the normal region as the criterion, calculate the theoretical optimal polarizer angle and analyzer angle for each type of defect respectively, and comprehensively consider the optical property differences of various defects to determine the initial angles of the polarizer and the polarization analyzer; establish a mapping database containing the defect type, characteristic parameters, and corresponding theoretical optimal angles. The establishment of this mapping database realizes the precise association between the defect type and the polarization response, significantly improving the pertinence and accuracy of the polarization parameter setting.

[0037] S3.3: Determine the angle adjustment range of the polarizer and the polarization analyzer according to the principal optical axis direction.

[0038] It should be noted that according to the double refraction optical theory of the quartzite crystal, when the angle between the polarized light and the principal optical axis changes, different intensities of anisotropic effects will be generated. Combining the distribution range of the principal optical axis direction of the quartzite sample and the angle sensitivity of the polarization detection, the polarizer and the polarization analyzer are set to adjust the angle within the range of ±45° based on the principal optical axis direction.

[0039] S3.4: Determine the initial angles of the polarizer and the polarization analyzer based on the mapping database, adjust the angle combination with the initial angles as the reference within the angle adjustment range, and collect the corresponding light intensities in the orthogonal polarization directions.

[0040] In this step, collecting the corresponding light intensities in the orthogonal polarization directions includes: at each angle combination, synchronously collecting the light intensity images in the first polarization direction and the second polarization direction through a dual-path polarization imaging optical path; preprocessing the collected light intensity images, including dark current correction and flat field correction, to obtain the corrected light intensity data in the orthogonal polarization directions; establishing a data storage structure for the angle combination and the corresponding orthogonal polarization light intensities, providing a data basis for subsequent polarization contrast calculation. Through systematic angle combination tests and collections, a complete polarization response dataset is obtained, laying a solid data foundation for polarization contrast optimization.

[0041] S3.5: Calculate the polarization contrast based on the light intensities in the orthogonal polarization directions.

[0042] It should be noted that by calculating the ratio of the difference between the light intensities in the orthogonal polarization directions to the total light intensity and combining image processing techniques to eliminate the influence of background noise, accurate polarization contrast parameters are obtained. These parameters can quantify the difference in polarization responses between the defective regions and the normal regions.

[0043] S3.6: Establish a polarization contrast matrix to evaluate the detection effects of different combinations of polarization parameters on various types of defects.

[0044] Furthermore, based on the angle combination and the corresponding polarization contrast data, construct a two-dimensional polarization contrast matrix indexed by the polarizer angle and the polarization analyzer angle; establish a multi-dimensional data structure for different defect types to realize unified management of the contrast data of various defects under different polarization parameters; perform statistical analysis on the polarization contrast matrices of various defects, calculate comprehensive performance indicators such as the contrast mean, peak value, and stability under each polarization parameter combination; establish defect detection effect evaluation criteria, including contrast threshold setting, signal-to-noise ratio requirements, and detection reliability standards; adopt an intelligent sampling optimization strategy to conduct key analysis in the high-performance parameter region, optimize and sort the polarization parameter combinations, and identify the polarization parameter intervals with the best detection effects on various types of defects; generate a comprehensive evaluation report on the polarization parameter combinations and the defect detection effects, providing a decision-making basis for subsequent determination of the optimal parameters.

[0045] S3.7: With the goal of maximizing the weighted average of the polarization contrasts of various types of defects, determine the comprehensive optimal angle parameters of the polarizer and the polarization analyzer to achieve simultaneous detection of multiple defect types.

[0046] It should be noted that the weight coefficients of various types of defects are determined according to the defect detection difficulty, accuracy requirements, and application importance. The multi-objective balance optimization method is used to comprehensively consider the detection performance of various types of defects and the system stability, and the comprehensive optimal polarizer angle parameter is determined, so as to take into account the detection performance of multiple defect types, and the applicability and reliability of the parameters are ensured through verification with multiple samples.

[0047] Preferably, the optimized polarization parameter configuration after comprehensive optimization can significantly improve the contrast of simultaneous detection of multiple types of defects on the premise of maintaining detection stability, effectively improving the overall accuracy and reliability of the detection of defects on the quartz stone surface.

[0048] S4: Under the optimized polarization parameter conditions, the first polarization image and the second polarization image are synchronously acquired through a dual-channel polarization imaging optical path.

[0049] Specifically, the flowchart of the synchronous acquisition of dual-channel polarization images is as Figure 2 shown, including the following steps: S4.1: Set the polarizer angle and the polarization analyzer angle according to the comprehensive optimal angle parameter.

[0050] S4.2: Based on the set polarization parameters, determine the acquisition parameters of the first image sensor and the second image sensor.

[0051] Among them, the acquisition parameters include exposure time, gain coefficient, resolution, and frame rate. It should be noted that different combinations of polarization parameters will affect the transmission intensity and distribution characteristics of polarized light. It is necessary to adjust parameters such as the exposure time and gain coefficient of the image sensor according to the actual light intensity distribution to ensure the best image quality and defect detection effect.

[0052] S4.3: Perform multi-point image acquisition on the surface of the quartz stone according to the preset scanning path. Each acquisition point sends a synchronous trigger signal to the first image sensor and the second image sensor through an external trigger signal generator, and synchronously obtains the first polarization image and the second polarization image.

[0053] In one embodiment, the preset scanning path adopts a serpentine scanning mode, starting from the upper left corner of the quartz stone surface, and performing alternating scans from left to right and from right to left row by row. The distance between adjacent acquisition points is set to 10% or less of the field of view width to ensure that there is no blind area in the image coverage. The timing control of the synchronous trigger signal includes setting the trigger delay time to 1.2 - 1.5 times the light source stabilization time, controlling the trigger time difference between the two image sensors within 1 ms, and controlling the positioning accuracy of each acquisition point within ±0.1 mm. When an abnormal trigger signal or image acquisition failure is detected, the repositioning and re-acquisition process of this acquisition point is automatically executed to ensure the continuity and integrity of the scanning process.

[0054] S4.4: Calculate the image quality parameters for the polarization images at each acquisition point.

[0055] Among them, the image quality parameters include sharpness, contrast, and signal-to-noise ratio values. Specifically, the sharpness is obtained by calculating the variance of the image gradient using the Laplacian operator, the contrast is obtained by calculating the ratio of the standard deviation to the average value of the gray values using the gray statistics method, and the signal-to-noise ratio is calculated using the peak signal-to-noise ratio method and is required to be not less than 40 dB.

[0056] S4.5: When the image quality parameters are lower than the preset quality threshold, execute the image re-acquisition process for the corresponding acquisition point.

[0057] Among them, the preset quality threshold includes sharpness threshold, contrast threshold, and signal-to-noise ratio threshold, which are determined by pre-calibration using a standard quartz sample. In addition, set the upper limit of the number of re-acquisitions (such as 3 times), and perform abnormal marking processing when the upper limit is exceeded to ensure the stability of the detection process. After completing the image quality evaluation of all acquisition points, output the first polarization image and the second polarization image sequence that meet the quality requirements.

[0058] Preferably, through the synchronous acquisition and quality control process, high-quality dual-channel polarization images can be obtained under optimized polarization parameters, ensuring the consistency and reliability of the image data. At the same time, through real-time quality monitoring and adaptive re-acquisition mechanism, the success rate of image acquisition and the stability of the overall detection system are effectively improved.

[0059] S5: Perform polarization difference calculation on the first polarization image and the second polarization image to generate a polarization difference image.

[0060] Specifically, the flow chart for generating the polarization difference image is as Figure 3 shown, including the following steps: S5.1: Perform image preprocessing on the first polarization image and the second polarization image.

[0061] Among them, the image preprocessing includes serpentine scan direction correction, spatial registration, and brightness compensation. Specifically, the serpentine scan direction correction is used to ensure the direction consistency of the stitched images, the spatial registration is used to correct the spatial position deviation of the two polarization images, and the brightness compensation is used to eliminate the brightness difference caused by inconsistent optical paths.

[0062] S5.2: Establish a dual-branch convolutional neural network to extract features from the first polarization image and the second polarization image respectively, and at the same time enhance the feature expression ability through skip connections and channel attention mechanisms.

[0063] Specifically, a first-branch convolutional neural network and a second-branch convolutional neural network are constructed. The two branch networks have the same structure, including an input layer, multiple convolutional layers, a pooling layer, and a feature fusion layer. The first polarization image and the second polarization image are respectively input into the corresponding branch networks for initial feature extraction, and the initial feature extraction includes edge features, texture features, and polarization response features. Skip connections are established between each convolutional layer, and the residual connection method is used to fuse shallow features and deep features to prevent gradient disappearance and retain feature information at different scales. At the same time, a channel attention mechanism is introduced to calculate the importance weights of each feature channel and adaptively weight the feature channels. The channel attention mechanism includes global average pooling, a fully connected layer, and an activation function.

[0064] Furthermore, the output features of the first-branch convolutional neural network and the second-branch convolutional neural network are fused through the feature fusion layer to generate an enhanced polarization feature representation. The feature fusion adopts a combination of channel concatenation and spatial attention. Feature normalization processing is performed on the enhanced polarization feature representation to ensure the numerical stability of the features and the accuracy of subsequent polarization difference calculations. Feature normalization includes batch normalization and layer normalization. The dual-branch network structure combined with the attention mechanism significantly enhances the expression ability of polarization features, effectively extracts the subtle difference features under different polarization states, and lays a solid foundation for accurate polarization difference calculations.

[0065] S5.3: Introduce a three-scale polarization difference calculation strategy to calculate the polarization difference values at the pixel level, block level, and region level, and obtain the initial polarization difference result through weighted fusion.

[0066] Specifically, based on the enhanced polarization feature representation extracted by the dual-branch convolutional neural network, a pixel-level polarization difference calculation module is established to perform point-by-point difference operations on the corresponding pixel positions of the first-branch features and the second-branch features. The difference operations include feature vector Euclidean distance, cosine similarity, and mutual information calculations. A block-level polarization difference calculation module is established to divide the feature map into several fixed-size feature blocks for difference calculations. The size of the feature blocks is adaptively adjusted according to the expected defect size and the network receptive field size. The feature block division adopts an overlapping sliding window method with an overlap rate of 50%. A region-level polarization difference calculation module is established to divide the feature map into several semantic regions for difference calculations based on the feature clustering results. The feature clustering adopts the K-means algorithm combined with spatial constraints, and the number of clusters is adaptively determined according to the complexity of the quartz stone surface texture.

[0067] Further, calculate the statistical characteristic parameters of the polarization difference results at each scale, including the mean value of feature differences, variance, skewness, and kurtosis, and establish a multi-scale difference feature vector; establish an adaptive weight calculation model based on three indicators: the proportion of defect area, feature discriminability, and network hierarchical response intensity, and use linear weighting to fuse the polarization difference results at three scales, where the weight coefficients at each scale satisfy the normalization constraint; perform adaptive threshold segmentation and morphological processing on the fused polarization difference results to generate the initial polarization difference results, where the adaptive threshold is determined based on feature distribution statistics, and the morphological processing includes denoising by opening operation and filling by closing operation based on the structural element. The three-scale difference calculation strategy can capture defect features at different scales simultaneously, and significantly improve the integrity and accuracy of the polarization difference results through multi-scale information fusion.

[0068] S5.4: Calculate the complexity index based on the local image gradient magnitude and gray variance, and adjust the sensitivity parameter of the polarization difference calculation according to the complexity index.

[0069] Specifically, perform gradient calculation on the initial polarization difference results to obtain the distribution of the local difference image gradient magnitude. The gradient calculation uses the Sobel operator to calculate the gradients in the horizontal and vertical directions; calculate the gray variance of the polarization difference results within the local window to evaluate the texture complexity of the difference image, and the size of the local window is adaptively adjusted according to the defect feature scale. Establish an image complexity evaluation index based on the gradient magnitude and gray variance, and divide the image area into three complexity levels: simple, medium, and complex; establish a sensitivity parameter adjustment strategy for different complexity levels, reducing the sensitivity in complex areas to reduce false detections and increasing the sensitivity in simple areas to enhance the detection ability; dynamically adjust the threshold parameter and filtering parameter in the polarization difference calculation according to the complexity index, and output an adaptive parameter control signal for guiding filtering. The adaptive sensitivity adjustment mechanism based on the complexity index effectively balances the detection accuracy and false detection rate, and significantly improves the adaptability of defect detection in different surface texture areas.

[0070] S5.5: Use guided filtering to perform edge-preserving smoothing on the polarization difference results, and splice and combine the processing results of each acquisition point according to the preset scanning path to generate a complete polarization difference image of the quartz stone surface.

[0071] In the specific implementation, use the weighted average image of the first polarization image and the second polarization image as the guidance image, and perform guided filtering on the initial polarization difference results in combination with the adaptive parameter control signal. The guided filtering adopts a linear model assumption to smooth the noise while maintaining the edge structure within the local window; adaptively adjust the guided filtering parameters according to the complexity index and the quartz stone surface texture characteristics. The filtering parameters include the regularization parameter and the window radius. The regularization parameter is determined according to the complexity level and the image gradient intensity, and the window radius is determined according to the defect size range and the complexity level.

[0072] Furthermore, the quality of the guided filtering results at each acquisition point is evaluated, and the edge retention degree and smoothing effect index are calculated; according to the preset serpentine scanning path, the spatial position relationship of each acquisition point is determined, and a geometric transformation matrix for image stitching is established; image registration technology is used to accurately align the processing results of adjacent acquisition points, eliminating the inconsistencies in the stitching gaps and overlapping areas. The image registration is based on the combination of feature point matching and geometric transformation; global consistency processing is performed on the stitched complete polarization difference image, including brightness equalization and contrast adjustment, to generate the final polarization difference image of the quartz stone surface. The combined processing of guided filtering and image stitching effectively suppresses noise interference while maintaining the clarity of defect edges, and the generated complete polarization difference image has good spatial continuity and visual consistency.

[0073] Preferably, through the multi-scale polarization difference calculation and adaptive processing flow, the accurate differential extraction of different types of defects is realized, and the contrast between the defects and the normal regions is enhanced. At the same time, the guided filtering technology is used for edge-preserving smoothing processing, combined with the contrast-limited adaptive histogram equalization algorithm, to maintain the clarity of defect edges while enhancing the defect display effect, effectively suppressing background noise interference, and significantly improving the image quality.

[0074] S6: Perform contrast enhancement processing on the polarization difference image, identify the defect regions and classify the defects, and output the detection results of the quartz stone surface defects.

[0075] Specifically, step S6 includes the following steps: S6.1: Use the contrast-limited adaptive histogram equalization algorithm to perform contrast enhancement processing on the polarization difference image.

[0076] Specifically, the polarization difference image is divided into blocks according to the preset block size to form a uniformly distributed image sub-block matrix. The preset block size is determined according to the typical size range of the quartz stone surface defects; the local histogram is calculated for each image sub-block, and the pixel distribution of each gray level is counted; based on the preset contrast limit parameter, the histogram of each image sub-block is intercepted, the histogram peak exceeding the limit threshold is clipped and redistributed, and the contrast limit parameter is adaptively set according to the dynamic range of the polarization difference image.

[0077] Further, calculate the cumulative distribution function of each image sub-block based on the locally histogram after truncation processing, and perform histogram equalization transformation based on the cumulative distribution function; use the bilinear interpolation algorithm to fuse the equalization results of adjacent image sub-blocks to eliminate the discontinuity at the sub-block boundaries and obtain a smooth contrast-enhanced image. The bilinear interpolation algorithm takes into account the weight distribution of neighboring sub-blocks and boundary transition processing; perform global normalization processing on the enhanced image after fusion processing to output a contrast-enhanced polarization difference image. Through the block adaptive contrast enhancement algorithm, it is possible to effectively improve the visual contrast of the defect area while suppressing the over-enhancement effect, and significantly improve the defect display effect under different brightness conditions.

[0078] S6.2: Use the adaptive threshold segmentation algorithm to perform binary processing on the enhanced polarization difference image to separate the defect area from the background area and obtain a binary defect candidate image.

[0079] It should be noted that the adaptive threshold segmentation algorithm dynamically determines the segmentation threshold according to the local gray-scale statistical characteristics of the polarization difference image, can adapt to the influence of uneven illumination and material differences on the quartz stone surface, and improve the accuracy and robustness of defect area segmentation.

[0080] S6.3: Perform morphological operation processing on the binary defect candidate image to remove noise and optimize the defect area boundary to obtain a binary image of the effective defect area.

[0081] Among them, the morphological operation processing includes opening operation to eliminate isolated noise points, closing operation to connect broken boundaries, and connected component analysis to screen the effective defect area, and an elliptical kernel function with adjustable structure element size is used.

[0082] S6.4: Extract multi-dimensional feature parameters of the effective defect area and construct a feature vector matrix.

[0083] Among them, the multi-dimensional feature parameters include geometric feature parameters, gray-scale feature parameters, and polarization feature parameters. For example, the geometric feature parameters include area, perimeter, aspect ratio, circularity, convex hull area ratio, and shape irregularity; the gray-scale feature parameters include average gray value, gray standard deviation, skewness, and kurtosis; the polarization feature parameters include average polarization intensity, polarization intensity variance, polarization angle distribution, and polarization degree value.

[0084] S6.5: Use the support vector machine classifier to perform defect type recognition with the feature vector matrix as the input.

[0085] In one embodiment, data preprocessing is performed on the feature vector matrix. The Z-score normalization method is used to unify feature parameters with different dimensions into the same numerical range. A support vector machine classifier is constructed, and the radial basis function is used as the kernel function. The grid search method is used to optimize the penalty parameter C and the kernel function parameter γ, and the classification performance of different parameter combinations is evaluated through cross-validation. The support vector machine classifier is trained based on the optimized parameter configuration, and the feature vector composed of geometric feature parameters, gray feature parameters, and polarization feature parameters is used as the training input. The defect regions to be classified are classified and predicted, and the corresponding defect type labels and classification confidence levels are output. The defect types include crack defects, bubble defects, impurity defects, surface scratch defects, etc. Through the support vector machine classifier with multi-dimensional feature fusion, the complementary advantages of geometric, gray, and polarization features are effectively utilized, realizing accurate classification of various defects, and significantly improving the classification accuracy and reliability.

[0086] S6.6: Generate a structured defect detection report.

[0087] It should be noted that the defect detection report includes defect position coordinates, defect types, defect sizes, detection confidence levels, and defect statistical information. The defect statistical information includes the total number of defects, the proportion of various defects, etc.

[0088] Preferably, through contrast enhancement and intelligent classification processing, the complete conversion from the polarization difference image to the defect detection result is realized, significantly improving the detectability and classification accuracy of micro-defects. At the same time, the generated structured detection report provides reliable data support for the quality assessment of quartz stones and the optimization of the production process.

[0089] This embodiment also provides a quartz stone surface defect detection system. The schematic diagram is as Figure 4 shown. The detection system includes: A preprocessing module for fixing the quartz stone to be detected on the detection platform and preprocessing the surface of the quartz stone.

[0090] A dual-channel polarization imaging module for constructing a dual-channel polarization imaging optical path, including an adjustable polarization light source, a beam splitter, a first imaging optical path, and a second imaging optical path.

[0091] A polarization parameter optimization module for optimizing polarization parameters based on the optical anisotropy characteristics of quartz stones. By adjusting the angles of the polarizer and the polarization analyzer, the polarization state difference between the defect region and the normal region is generated.

[0092] A synchronous image acquisition module for synchronously acquiring the first polarization image and the second polarization image through the dual-channel polarization imaging optical path under the condition of optimized polarization parameters.

[0093] A polarization difference calculation module is used to perform polarization difference calculation on a first polarization image and a second polarization image to generate a polarization difference image.

[0094] A defect detection and analysis module is used to perform contrast enhancement processing on the polarization difference image, identify defect regions and classify the defects, and output the detection result of the defects on the quartz stone surface.

[0095] This embodiment also provides a computer device, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the method for detecting defects on the quartz stone surface as proposed in the above embodiment.

[0096] This computer device can be a terminal. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0097] This embodiment also provides a storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the method for detecting defects on the quartz stone surface as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (Static Random Access Memory, abbreviated as SRAM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), an erasable programmable read-only memory (Erasable Programmable Read Only Memory, abbreviated as EPROM), a programmable read-only memory (Programmable Red-Only Memory, abbreviated as PROM), a read-only memory (Read-Only Memory, abbreviated as ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disc.

[0098] In summary, by constructing a dual-path polarization imaging optical path and optimizing polarization parameters based on the optical anisotropy characteristics of quartz, the contrast of defect detection is greatly improved, and it is possible to effectively identify tiny defects that are difficult to detect. By adopting a six-degree-of-freedom detection platform, temperature stabilization preprocessing, and a synchronous trigger acquisition mechanism, the influence of environmental factors and system errors on the detection results is effectively eliminated, ensuring the stability of the detection process and the reproducibility of the results, and improving the reliability of the detection system. Through three-scale polarization difference calculation and adaptive parameter adjustment based on complexity metrics, the detection sensitivity can be intelligently adjusted according to the texture complexity of different regions on the quartz surface, effectively controlling the false detection rate while ensuring the detection accuracy, and significantly enhancing the adaptability. Through the organic combination of polarization imaging technology and intelligent image processing algorithms, improvements have been made in terms of detection accuracy, efficiency, stability, and automation compared to the prior art.

[0099] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

Claims

1. A method for detecting surface defects of quartz stone, characterized in that: Including: Fix the quartz stone to be detected on the detection platform and preprocess the surface of the quartz stone; Construct a dual-path polarization imaging optical path; The dual-path polarization imaging optical path includes an adjustable polarization light source, a beam splitter, a first imaging optical path, and a second imaging optical path; Optimize the polarization parameters based on the optical anisotropy characteristics of the quartz stone, and adjust the angles of the polarizer and the polarization analyzer to make the polarization state difference between the defect area and the normal area; Under the optimized polarization parameter conditions, synchronously collect the first polarization image and the second polarization image through the dual-path polarization imaging optical path; Perform polarization difference calculation on the first polarization image and the second polarization image to generate a polarization difference image; Perform contrast enhancement processing on the polarization difference image, identify the defect area and classify the defects, and output the detection result of the surface defects of the quartz stone.

2. The quartz stone surface defect detection method according to claim 1, characterized in that: The adjustable polarization light source includes a broadband light source and a polarizer; the beam splitter divides the beam reflected from the surface of the quartz stone into two paths, which respectively enter the first imaging optical path and the second imaging optical path; the first imaging optical path is configured with a first polarization analyzer and a first image sensor, and the second imaging optical path is configured with a second polarization analyzer and a second image sensor.

3. The quartz stone surface defect detection method according to claim 1, wherein: The polarization parameter optimization based on the optical anisotropy characteristics of the quartz stone includes: Test the optical anisotropy characteristics of the quartz stone sample, measure the main optical axis direction, refractive index difference, and optical path difference parameters, and establish an optical anisotropy characteristic distribution map; Based on the optical anisotropy characteristic distribution map, establish a mapping database of defect types and polarization response parameters; Determine the angle adjustment range of the polarizer and the polarization analyzer according to the main optical axis direction; Based on the mapping database, determine the initial angles of the polarizer and the polarization analyzer, and adjust the angle combination based on the initial angles within the angle adjustment range, and collect the corresponding orthogonal polarization direction light intensities; Calculate the polarization contrast based on the orthogonal polarization direction light intensities; Establish a polarization contrast matrix to evaluate the detection effects of different polarization parameter combinations on various defects; Aim at maximizing the weighted average of the polarization contrasts of various defects, and determine the comprehensive optimal angle parameters of the polarizer and the polarization analyzer.

4. The quartz stone surface defect detection method according to claim 1, characterized in that: The synchronously collecting the first polarization image and the second polarization image through the dual-path polarization imaging optical path includes: Set the polarizer angle and the polarization analyzer angle according to the comprehensive optimal angle parameters; Based on the set polarization parameters, determine the acquisition parameters of the first image sensor and the second image sensor; Perform multi-point image acquisition on the surface of the quartz stone according to the preset scanning path. Each acquisition point sends a synchronous trigger signal to the first image sensor and the second image sensor through an external trigger signal generator, and synchronously obtain the first polarization image and the second polarization image; Calculate the image quality parameters for the polarization images of each acquisition point; When the image quality parameter is lower than the preset quality threshold, execute the image re-acquisition process for the corresponding acquisition point.

5. The quartz stone surface defect detection method according to claim 1, wherein: The generating the polarization difference image includes: Perform image preprocessing on the first polarization image and the second polarization image; A dual-branch convolutional neural network is established to extract features from the first polarization image and the second polarization image respectively, and the feature expression ability is enhanced through skip connections and channel attention mechanisms; A three-scale polarization difference calculation strategy is introduced to calculate polarization difference values at three scales of pixel level, block level and region level, and an initial polarization difference result is obtained through weighted fusion; A complexity index is calculated according to the local image gradient magnitude and gray variance, and the sensitivity parameter of polarization difference calculation is adjusted according to the complexity index; Guided filtering is used to perform edge-preserving smoothing on the polarization difference result, and the processing results of each acquisition point are stitched and combined according to a preset scanning path to generate a polarization difference image on the quartz stone surface.

6. The quartz stone surface defect detection method according to claim 1, characterized in that: The contrast enhancement processing uses the contrast-limited adaptive histogram equalization algorithm.

7. The quartz stone surface defect detection method according to claim 1, characterized in that: The identifying defective areas and classifying the defects includes: An adaptive threshold segmentation algorithm is used to binarize the enhanced polarization difference image, separating the defective areas from the background areas to obtain a binary defective candidate image; Morphological operations are performed on the binary defective candidate image to obtain a binary image of effective defective areas; Multidimensional feature parameters of the effective defective areas are extracted to construct a feature vector matrix; the multidimensional feature parameters include geometric feature parameters, gray feature parameters and polarization feature parameters; Using the feature vector matrix as the input, a support vector machine classifier is used to identify the defect types; Generate a structured defect detection report.

8. A quartz stone surface defect detection system, based on the quartz stone surface defect detection method according to any one of claims 1 to 7, characterized in that: Including: A preprocessing module for fixing the quartz stone to be detected on the detection platform and preprocessing the surface of the quartz stone; A dual-path polarization imaging module for constructing a dual-path polarization imaging optical path, including an adjustable polarization light source, a beam splitter, a first imaging optical path and a second imaging optical path; A polarization parameter optimization module for optimizing polarization parameters based on the optical anisotropy characteristics of the quartz stone, and adjusting the angles of the polarizer and the polarization analyzer to make the polarization state difference between the defective areas and the normal areas; A synchronous image acquisition module for synchronously acquiring the first polarization image and the second polarization image through the dual-path polarization imaging optical path under the condition of optimized polarization parameters; A polarization difference calculation module for performing polarization difference calculation on the first polarization image and the second polarization image to generate a polarization difference image; A defect detection and analysis module for performing contrast enhancement processing on the polarization difference image, identifying defective areas and classifying the defects, and outputting the quartz stone surface defect detection result.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that: When the processor executes the computer program, the steps of the quartz stone surface defect detection method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the steps of the quartz stone surface defect detection method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Metal surface defect detection method based on polarized light

    CN116908193A

  • Quartz stone surface defect detection method, system and equipment based on machine vision

    CN118279283A

  • Liquid crystal display screen defect detection method

    CN119827522A

  • Surface defect detection system and method

    WO2020215199A1

  • Surface defect detection device, surface defect detection method and program, and surface defect detection system

    WO2021131508A1

Cited By

  • Visual field definition strengthening system in gynecological clinical examination, diagnosis and treatment process and implementation method thereof

    CN120884232A

  • Wafer surface defect detection system and detection method

    CN121049259A

  • Wafer surface defect detection system and detection method

    CN121049259B

  • Physical and chemical enhancement control method and system for multi-source low-quality hazardous waste-based artificial stone

    CN121052809A

  • Multi-source low-quality hazardous waste-based artificial stone physical and chemical enhancement control method and system

    CN121052809B