Quartz crucible defect detection method and device, electronic equipment and storage medium

CN122223014APending Publication Date: 2026-06-16LANGFANG HERROTH SOLAR PHOTOVOLTAIC CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LANGFANG HERROTH SOLAR PHOTOVOLTAIC CO LTD
Filing Date
2026-05-13
Publication Date
2026-06-16

Smart Images

  • Figure CN122223014A_ABST
    Figure CN122223014A_ABST
Patent Text Reader

Abstract

The application provides a quartz crucible defect detection method and device, electronic equipment and storage medium, and belongs to the technical field of intelligent detection. The method comprises the following steps: performing feature extraction on defect feature enhanced image data of a quartz crucible to obtain feature data corresponding to various defects; performing matching calculation and processing on the feature data corresponding to various defects and standard feature thresholds of various defects to obtain feature matching scores corresponding to various defects; determining weight information corresponding to various defects respectively; determining defect comprehensive scores corresponding to various defects respectively based on the feature matching scores corresponding to various defects and the weight information corresponding to various defects respectively; performing normalization processing on the defect comprehensive scores corresponding to various defects respectively to obtain confidence degrees corresponding to various defects; and performing comparison processing on the confidence degrees corresponding to various defects and preset confidence degree ranges corresponding to various defects to determine whether the quartz crucible has the defect type. The application can improve the defect detection precision of the quartz crucible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of intelligent detection technology, and more specifically, relates to a method and device for detecting defects in quartz crucibles, electronic equipment, and storage medium. Background Technology

[0002] Quartz crucibles are core consumables in the crystal pulling process of the photovoltaic and semiconductor industries. They are mainly used to hold silicon materials and withstand the high-temperature crystal pulling environment. Surface and internal defects can directly lead to crucible cracking, silicon leakage, or silicon material contamination during the crystal pulling process, which seriously affects product quality and production efficiency. Therefore, quartz crucible defect detection is a key link in the industry's quality control.

[0003] Currently, defect detection in quartz crucibles mainly employs existing technologies such as manual visual inspection, fixed-threshold image segmentation, and single-defect recognition models. Manual visual inspection relies on the experience of the inspectors, resulting in low efficiency, high subjectivity, and a high rate of missed detection for minute defects. Fixed-threshold image segmentation uses a uniform threshold to process images, which cannot adapt to the localized reflections and uneven textures on the quartz crucible surface caused by material characteristics, leading to low accuracy in identifying minute defects. Therefore, a defect detection method for quartz crucibles that can overcome these shortcomings is needed to improve detection accuracy and ensure the stability of the crystal pulling process. Summary of the Invention

[0004] This application provides a method and apparatus for detecting defects in quartz crucibles, an electronic device, and a storage medium to address the problem of low accuracy in identifying minute defects in quartz crucibles, thereby improving the detection accuracy of quartz crucibles and ensuring the stability of the crystal pulling process.

[0005] To achieve the above objectives, the technical solutions provided in this application are as follows: Firstly, a method for detecting defects in quartz crucibles is provided, including: Surface reflection image data of a quartz crucible is acquired, and adaptive Gaussian weighted threshold segmentation processing is performed on the surface reflection image data to obtain preliminary defect separation image data; then, Gaussian edge enhancement processing is performed on the preliminary defect separation image data to obtain defect feature enhancement image data. Feature extraction is performed on the enhanced image data of defects to obtain feature data corresponding to various types of defects. The feature data corresponding to various types of defects are then matched and calculated with the standard feature thresholds of various types of defects to obtain the feature matching scores corresponding to various types of defects. The weight information corresponding to each type of defect is determined, and based on the feature matching score and the corresponding weight information of each type of defect, the comprehensive defect score corresponding to each type of defect is determined. The comprehensive defect score corresponding to each type of defect is then normalized to obtain the confidence level of each type of defect. The confidence levels corresponding to various defects are compared with the preset confidence ranges corresponding to various defects. For defect types with confidence levels within the corresponding preset confidence ranges, high-intensity light transmission image data of the quartz crucible is acquired. Based on the high-intensity light transmission image data, it is determined whether the quartz crucible has this type of defect. The high-intensity light transmission image data is transmission image data acquired using a high-intensity light transmission method.

[0006] Secondly, a quartz crucible defect detection device is provided, comprising: The image preprocessing module is used to acquire surface reflection image data of a quartz crucible, perform adaptive Gaussian weighted threshold segmentation on the surface reflection image data to obtain preliminary defect separation image data, and perform Gaussian edge enhancement on the preliminary defect separation image data to obtain defect feature enhancement image data. The feature extraction module is used to extract features from the defect feature enhancement image data to obtain feature data corresponding to various types of defects, and to perform matching calculations on the feature data corresponding to various types of defects with the standard feature thresholds of various types of defects to obtain feature matching scores corresponding to various types of defects. The confidence calculation module is used to determine the weight information corresponding to each type of defect, and based on the feature matching score and the corresponding weight information of each type of defect, to determine the comprehensive defect score corresponding to each type of defect, and to normalize the comprehensive defect score corresponding to each type of defect to obtain the confidence score corresponding to each type of defect. The defect detection module is used to compare the confidence level corresponding to various defects with the preset confidence level range corresponding to various defects; for defect types whose confidence level is within the corresponding preset confidence level range, the module acquires the strong light transmission image data of the quartz crucible, and determines whether the quartz crucible has the defect type based on the strong light transmission image data; the strong light transmission image data is a transmission image data acquired by strong light transmission method.

[0007] Thirdly, embodiments of this application also provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the quartz crucible defect detection method provided in any possible implementation of the first aspect.

[0008] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the quartz crucible defect detection method provided by any possible implementation of the first aspect.

[0009] The beneficial effects of the technical solution provided in this application are as follows: Compared with related technologies, the quartz crucible defect detection method, apparatus, electronic device, and storage medium provided in this application can dynamically suppress surface reflection interference and accurately separate defects from the background through adaptive Gaussian weighted threshold segmentation processing to obtain a preliminary defect separation image. Further Gaussian edge enhancement processing makes the edges of defects such as cracks and bubbles clearer, solving the problem of low defect recognition accuracy caused by local reflections and uneven textures on the quartz crucible surface due to material characteristics. By performing feature extraction and matching calculations on the enhanced defect image, combined with weight allocation and normalization processing to obtain confidence levels, the defect judgment is quantified into a specific value, replacing traditional subjective judgment, reducing reliance on professionals, and allowing ordinary operators to quickly master the process. Meanwhile, by comparing the confidence levels corresponding to various defects with the preset confidence range, the embodiments of this application can initially screen out the defect types that need further verification, avoid the bias of a single confidence level judgment, introduce strong light transmission images for secondary verification for the defect types that need further verification, and use the grayscale difference with the standard transmission image to judge the defect, further avoiding the risk of false detection and missed detection, improving the detection accuracy of minor defects, and ensuring the stability of the crystal pulling process. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.

[0011] Figure 1 A schematic flowchart illustrating the quartz crucible defect detection method provided in this application embodiment; Figure 2 This is a structural block diagram of the quartz crucible defect detection device provided in the embodiments of this application; Figure 3 A schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0012] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.

[0013] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.” When describing multiple (two or more) items, if the relationship between the multiple items is not explicitly defined, the multiple items can refer to one, several or all of the multiple items. For example, the description of "parameter A includes A1, A2, A3" can be implemented as parameter A includes A1 or A2 or A3, or it can be implemented as parameter A includes at least two of the three items A1, A2 and A3.

[0014] It is understood that in the embodiments of this application, data such as user information are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with relevant laws, regulations and standards.

[0015] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.

[0016] This application provides a method for detecting defects in quartz crucibles, which can be executed by electronic devices, such as... Figure 1 As shown, the method may include: S101: Acquire surface reflection image data of the quartz crucible, perform adaptive Gaussian weighted threshold segmentation on the surface reflection image data to obtain preliminary defect separation image data; perform Gaussian edge enhancement on the preliminary defect separation image data to obtain defect feature enhancement image data.

[0017] In this embodiment, the surface reflection image data is the image data of a quartz crucible acquired using a conventional light source, serving as the initial input data for the quartz crucible inspection process. The conventional light source can be, for example, a white light source. White light sources are commonly used in quartz crucible surface defect detection scenarios, providing stable illumination of the quartz crucible surface and forming a uniform surface reflection image. This facilitates subsequent adaptive Gaussian weighted threshold segmentation and defect feature extraction processing of the surface reflection image data. The adaptive Gaussian weighted threshold segmentation process dynamically assigns weights and calculates a segmentation threshold based on local image reflection features to separate defects from the background. For example, for bright areas on the quartz crucible surface, the neighborhood weights are adaptively adjusted to avoid misjudgments of defects caused by reflection. The initial defect separation image data is the image data that initially highlights the difference between the defect area and the background after segmentation processing. The Gaussian edge enhancement processing is a step that enhances the contrast and sharpness of defect edges in the image through Gaussian filtering, for example, making the grayscale changes at the crack edges more obvious and improving feature extraction accuracy. The defect feature enhanced image data is the image data where defect features are more prominent after edge enhancement.

[0018] For example, acquiring surface reflection image data of a quartz crucible can be achieved using an industrial camera paired with a conventional white light source. The camera is used to vertically illuminate the surface of the quartz crucible to be inspected, and the reflected light image of the crucible surface is acquired simultaneously. For example, for a quartz crucible with a diameter of 500 mm, the camera resolution is set to 20 megapixels, and the shooting distance is adjusted to 800 mm to ensure complete coverage of the crucible surface. During the acquisition process, the brightness of the light source is kept stable to avoid interference from ambient light.

[0019] In this embodiment, adaptive Gaussian weighted threshold segmentation processing is performed on the surface reflection image data to obtain preliminary defect separation image data, including: The pixel neighborhood reflectance intensity of the surface reflectance image data is extracted and statistically processed to obtain the pixel neighborhood reflectance intensity distribution feature data of the surface reflectance image data. Based on the pixel neighborhood reflectance intensity distribution feature data, the Gaussian weighted weight data is determined; Gaussian weighted image data is obtained by performing Gaussian weighted convolution on the surface reflection image data based on the Gaussian weighted weight data. Based on Gaussian weighted image data, determine the neighborhood weighted statistical mean data of each pixel in the Gaussian weighted image data; Pixel segmentation threshold data is determined based on neighborhood weighted statistical mean data. Pixel-level threshold segmentation of surface reflection image data is performed based on pixel segmentation threshold data to obtain preliminary defect separation image data.

[0020] In this embodiment, pixel neighborhood reflectance intensity extraction and statistical processing involves extracting and statistically analyzing the reflectance intensity of the area surrounding each pixel in the surface reflection image data. For example, this includes extracting the grayscale values ​​of the area surrounding the pixel and statistically analyzing the maximum, minimum, and difference in grayscale values. Pixel neighborhood reflectance intensity distribution feature data is data obtained after statistical processing that reflects the reflectance distribution in the pixel neighborhood. Gaussian weighted weight data consists of weight parameters assigned based on the reflectance distribution features for Gaussian weighted convolution; for example, areas with strong reflectance are assigned lower weights. Gaussian weighted convolution processing is a step of smoothing and denoising the surface reflection image using these weights. Gaussian weighted image data is the smoothed image data obtained after this convolution processing. Neighborhood weighted statistical mean data is the weighted average of the grayscale values ​​of pixels in the neighborhood of each pixel in the Gaussian weighted image. Pixel segmentation threshold data is a grayscale threshold value used to distinguish defects from the background. Pixel-level threshold segmentation processing is a step of comparing the grayscale values ​​pixel by pixel with the threshold to separate defects. The initial defect separation image data is the image data that highlights the defect area after this segmentation process.

[0021] In this embodiment, the pixel segmentation threshold data is obtained by subtracting the preset threshold offset data from the neighborhood weighted statistical mean data. The preset threshold offset data is a fixed offset value determined statistically from a large number of quartz crucible surface reflection image samples. It is used to suppress background noise and highlight defect areas, and can be specifically set to 10. The neighborhood weighted statistical mean data reflects the local background grayscale of the current pixel. The pixel segmentation threshold data obtained after subtracting the fixed offset data is slightly lower than the local background grayscale. This allows for stable segmentation of defect areas from the background even under uneven lighting and complex reflection conditions, avoiding missegmentation caused by local brightness changes.

[0022] Considering the smooth surface of quartz crucibles is prone to reflection, leading to grayscale confusion between defect areas and the background in surface reflection image data, fixed threshold segmentation is susceptible to missegmentation or omissions. Therefore, the surface reflection image data is first processed by extracting and statistically analyzing the reflection intensity of pixel neighborhoods to accurately grasp the image's reflection distribution characteristics. Based on this feature, Gaussian weighted data is determined, allowing for targeted suppression of areas with strong reflection and reducing reflection interference. Gaussian weighted convolution processing is used to smooth and denoise the image, preventing noise from affecting segmentation accuracy. The neighborhood weighted statistical mean is calculated based on the Gaussian weighted image data, accurately reflecting local image grayscale characteristics and providing a basis for determining reasonable pixel segmentation threshold data. Pixel-level threshold segmentation based on this threshold enables accurate separation of defects from the background.

[0023] For example, the specific technical steps for performing adaptive Gaussian weighted threshold segmentation on surface reflection image data to obtain preliminary defect separation image data in this embodiment can be as follows: First, the pixel neighborhood reflectance intensity of the surface reflection image data is extracted and statistically processed. Each pixel in the surface reflection image is traversed, and a 3×3 neighborhood of each pixel is selected. The gray values ​​of all pixels within this neighborhood are extracted, and the maximum, minimum, and gray value differences within each neighborhood are statistically analyzed to obtain the pixel neighborhood reflectance intensity distribution feature data of the surface reflection image data. Then, neighborhoods with larger reflectance intensity differences are assigned lower weights, while neighborhoods with uniform reflectance intensity are assigned higher weights to ensure effective suppression of reflective area interference. Based on the Gaussian weighted weight data, Gaussian weighted convolution processing is performed on the surface reflection image data. A 5×5 convolution kernel is selected, and the gray values ​​of each pixel and its neighboring pixels are multiplied by their corresponding weights and then summed to obtain Gaussian weighted image data, achieving image smoothing and noise reduction.

[0024] Next, in this embodiment, a 5×5 neighborhood of each pixel is selected, and the grayscale values ​​of the pixels within the neighborhood are extracted. These grayscale values ​​are then weighted and summed using Gaussian weighted data, and finally divided by the number of pixels in the neighborhood to obtain the neighborhood weighted statistical mean for each pixel. Based on the neighborhood weighted statistical mean, the pixel segmentation threshold is determined by taking the average of the neighborhood weighted statistical means of all pixels and fine-tuning it in conjunction with the overall grayscale features of the image to obtain the pixel segmentation threshold.

[0025] Finally, in this embodiment, the grayscale value of each pixel is compared with the pixel segmentation threshold data. Pixels with grayscale values ​​greater than or equal to the threshold are marked as potential defect pixels, and pixels with grayscale values ​​less than the threshold are marked as background pixels. All potential defect pixels are integrated to obtain preliminary defect separation image data.

[0026] In this embodiment, based on Gaussian-weighted image data, the neighborhood weighted statistical mean data of each pixel in the Gaussian-weighted image data is determined, including: Based on Gaussian weighted image data, pixel gray-level gradient calculation is performed on the Gaussian weighted image data to obtain the gray-level gradient data of each pixel. The grayscale gradient data of each pixel is matched and verified to determine the neighborhood size data of the corresponding pixel. Based on the neighborhood size data of each pixel, pixel grayscale extraction is performed on the neighborhood region of the corresponding pixel in the Gaussian weighted image data to obtain the neighborhood pixel grayscale set data of that pixel. The neighborhood pixel grayscale set data is weighted and summed to obtain the neighborhood weighted sum data. Based on the neighborhood weighted sum data and the neighborhood size data of the corresponding pixel, the neighborhood weighted statistical mean data of the pixel is determined.

[0027] In this embodiment, the pixel grayscale gradient calculation process is a step of calculating the degree of grayscale change of each pixel in the Gaussian weighted image data. For example, by calculating the grayscale difference between a pixel and its neighboring pixels, the grayscale change index of that pixel is obtained. The grayscale gradient data is the data obtained after this calculation process, reflecting the strength of the grayscale change of each pixel. The matching and verification process is a verification step of matching the grayscale gradient data to the corresponding neighborhood size. For example, a pixel with a large grayscale gradient corresponds to a larger neighborhood size. The neighborhood size data is a parameter used to determine the neighborhood range of a pixel. The neighborhood region is the image region within a defined range around the pixel. The neighborhood pixel grayscale set data is the set of grayscale values ​​of all pixels extracted within the neighborhood region. The weighted summation process is a step of summing the grayscale values ​​in this set together with weights. The neighborhood weighted summation data is the value obtained after this summation process. The neighborhood weighted statistical mean data is the average value calculated from the neighborhood weighted summation data and the neighborhood size data.

[0028] Considering the differences in grayscale gradients among different pixels in Gaussian-weighted image data, using a fixed neighborhood size to calculate the neighborhood-weighted statistical mean would lead to inaccurate calculations of the mean in defective edge regions with large grayscale gradients, and redundant calculations in uniform grayscale regions. Therefore, we first calculate the pixel grayscale gradients of the Gaussian-weighted image data to accurately grasp the grayscale change characteristics of each pixel. By matching and verifying the grayscale gradient data, we assign appropriate neighborhood size data to pixels with different gradients; pixels with large gradients use larger neighborhoods, and pixels with small gradients use smaller neighborhoods. Finally, by extracting the grayscale sets of neighboring pixels and performing weighted summation, we determine the final neighborhood-weighted statistical mean data.

[0029] For example, this embodiment first iterates through each pixel, selects the four adjacent pixels above, below, left, and right of the pixel, calculates the grayscale difference between the pixel and each adjacent pixel, and takes the average of all differences as the grayscale gradient data of the pixel. Second, a gradient threshold is set. For pixels with grayscale gradient data higher than the threshold, their neighborhood size is determined to be 5×5, and for pixels with grayscale gradient data lower than the threshold, their neighborhood size is determined to be 3×3. Then, according to the determined neighborhood size, the grayscale values ​​of all pixels in the corresponding range around the pixel are extracted and integrated to form the neighborhood pixel grayscale set data of the pixel. Finally, combined with the previously determined Gaussian weighted weight data, each grayscale value in the set is multiplied by the corresponding weight and then summed to obtain the neighborhood weighted sum data. Then, the neighborhood weighted sum data is divided by the number of pixels included in the neighborhood size data to obtain the neighborhood weighted statistical mean data of the pixel.

[0030] In this embodiment, the grayscale gradient data of each pixel is matched and verified to determine the neighborhood size data of the corresponding pixel, including: The grayscale gradient data of each pixel is normalized to obtain normalized grayscale gradient value data. Based on the target requirements for defect detection in quartz crucibles, a mapping relationship table of gray-scale gradient and neighborhood size is determined; The normalized grayscale gradient data is subjected to precision calibration to obtain calibrated normalized grayscale gradient data. Based on the calibrated normalized grayscale gradient value data, matching processing is performed in the mapping relationship table between grayscale gradient and neighborhood size to obtain the initial neighborhood size data; The initial neighborhood size data is integerized to obtain integerized neighborhood size data; Boundary verification is performed on the integer neighborhood size data to obtain the neighborhood size data of the corresponding pixel.

[0031] In this embodiment, the normalized grayscale gradient value data is the data obtained after normalizing the grayscale gradient data of pixels. This is used to unify the numerical range of the grayscale gradient data, for example, mapping grayscale gradient data of different orders of magnitude to the same interval, facilitating subsequent matching processing. The grayscale gradient-neighborhood size mapping table data is a data table recording the correspondence between grayscale gradients and neighborhood sizes; for example, a normalized grayscale gradient value corresponds to a specific neighborhood size. Precision calibration processing is a step to correct deviations in the normalized grayscale gradient values. The calibrated normalized grayscale gradient value data is the accurate grayscale gradient data obtained after precision calibration. The initial neighborhood size data is the initial neighborhood size parameter matched from the mapping table. Integerization processing is a step to convert the initial neighborhood size data into integers. Integerized neighborhood size data is the neighborhood size data after integerization processing. Boundary verification processing is a step to verify whether the neighborhood size is within a reasonable range.

[0032] In this embodiment, the process of performing accuracy calibration on the normalized grayscale gradient value data to obtain calibrated normalized grayscale gradient value data can be as follows: Statistical analysis is performed on all normalized grayscale gradient value data to obtain global gradient mean data and global gradient variance data; The global gradient mean data and the global gradient variance data are weighted and summed to obtain the gradient calibration offset data. Subtracting the gradient calibration offset data from the normalized grayscale gradient data yields the corrected gradient data, eliminating system biases caused by acquisition noise and illumination fluctuations. Outlier restriction processing is performed on the corrected gradient values. Corrected gradient data with excessively large values ​​are adjusted to a preset upper limit value, and corrected gradient data with excessively small values ​​are adjusted to a preset lower limit value. Normal values ​​between the preset upper and lower limits remain unchanged, thereby obtaining stable and uniform calibrated normalized grayscale gradient value data. After the above processing, the calibrated normalized grayscale gradient value data is obtained.

[0033] In this method, the weighting coefficient of the global gradient mean data is smaller than that of the global gradient variance data to highlight the impact of gradient distribution fluctuations on the calibration offset and suppress systematic biases caused by gradient mean fluctuations. The global gradient mean data reflects the average level of the overall gray-level gradient of the image, while the global gradient variance data reflects the degree of discrete fluctuation in the image's gray-level gradient. The global gradient mean data and global gradient variance data are assigned corresponding weighting coefficients and then summed to obtain the gradient calibration offset data. This offset data comprehensively reflects the overall deviation and local fluctuations of the image gradient, and is used for subsequent precise correction of the normalized gray-level gradient values.

[0034] Considering that the grayscale gradient data values ​​of different pixels vary greatly, directly using them for matching would lead to inaccurate neighborhood size allocation. Therefore, the grayscale gradient data is normalized to unify the value range and improve matching consistency.

[0035] For example, this embodiment first normalizes the grayscale gradient data of each pixel, mapping all pixel grayscale gradient data to a numerical range of 0 to 1, obtaining normalized grayscale gradient value data, ensuring that different gradient data are at the same order of magnitude. Then, combining the adaptation rules of grayscale gradient and neighborhood size in quartz crucible defect detection, the neighborhood size corresponding to different normalized grayscale gradient values ​​is set, forming a complete mapping relationship table. Next, each normalized grayscale gradient value data is traversed and compared with preset gradient calibration benchmark data to correct deviations, obtaining calibrated normalized grayscale gradient value data. Then, matching processing is performed in the mapping relationship table between grayscale gradient and neighborhood size to find the gradient interval closest to the calibrated gradient value, corresponding to the initial neighborhood size data. Finally, the initial neighborhood size data is converted to integers using a rounding method, obtaining integer neighborhood size data. Finally, the preset reasonable range for neighborhood size is 3×3 to 7×7. If the integer neighborhood size data is within this range, it is directly used as the neighborhood size data of the corresponding pixel. If it exceeds the range, it is adjusted to the nearest reasonable boundary value to obtain the neighborhood size data of the corresponding pixel. The nearest reasonable boundary value refers to the endpoint value that is closest to the value that exceeds the range within the preset reasonable range. That is, if it is less than the lower limit of the reasonable range, the lower limit value of 3 is taken, and if it is greater than the upper limit of the reasonable range, the upper limit value of 7 is taken.

[0036] In this embodiment, the pixel segmentation threshold data is determined based on the neighborhood weighted statistical mean data, including: The initial pixel segmentation threshold data is determined based on the neighborhood weighted statistical mean data. The pixel grayscale variance is calculated by processing the surface reflection image data to obtain the pixel grayscale variance data; The initial pixel segmentation threshold data is calibrated based on the pixel grayscale variance data to obtain calibrated pixel segmentation threshold data. Pixel segmentation threshold data is determined based on the calibrated pixel segmentation threshold data.

[0037] In this embodiment, the initial pixel segmentation threshold data is a gray-level critical value data used to distinguish defects from the background, initially determined based on neighborhood weighted statistical mean data. For example, the average of all neighborhood weighted statistical means is taken as the initial pixel segmentation threshold data. Pixel gray-level variance calculation is a processing step that calculates the dispersion of gray-level values ​​of all pixels in the surface reflection image data. The pixel gray-level variance data is the data obtained after this calculation process, reflecting the uniformity of gray-level distribution in the surface reflection image; for example, the more uneven the gray-level distribution of the image, the larger this data value. Calibration processing is a processing step that corrects the deviation of the initial pixel segmentation threshold based on the pixel gray-level variance data. The calibrated pixel segmentation threshold data is the accurate threshold data obtained after calibration processing. The pixel segmentation threshold data is the final gray-level critical value data used for pixel-level threshold segmentation and is the core parameter for separating defects from the background.

[0038] Considering that the initial pixel segmentation threshold data determined solely based on the neighborhood weighted statistical mean data does not take into account the overall grayscale distribution differences of the surface reflection image, segmentation deviations are prone to occur. Therefore, the initial threshold is first determined based on the neighborhood weighted statistical mean data to ensure the initial rationality of the threshold.

[0039] For example, this embodiment first iterates through the neighborhood weighted statistical mean of all pixels, calculates the arithmetic mean of all means, and uses this mean as the initial pixel segmentation threshold data to ensure that the initial threshold fits the local grayscale features of the image. Secondly, this embodiment iterates through the grayscale values ​​of all pixels in the surface reflection image, calculates the difference between the grayscale values ​​of all pixels and the overall grayscale average of the image, squares each difference, sums the results, and then divides by the total number of pixels to obtain the pixel grayscale variance data, reflecting the dispersion of the image's grayscale distribution. Then, a variance calibration coefficient is set; the larger the pixel grayscale variance data, the larger the calibration coefficient. The initial pixel segmentation threshold data is multiplied by the corresponding calibration coefficient to obtain the calibrated pixel segmentation threshold data, achieving adaptation of the threshold to image grayscale fluctuations. Finally, the calibrated threshold is checked for reasonableness. If the calibrated threshold is within a preset reasonable grayscale range, it is directly determined as the pixel segmentation threshold data; if it exceeds the reasonable range, it is adjusted to the range boundary value to obtain the final pixel segmentation threshold data. The preset reasonable grayscale range can be set empirically, for example, from 80 to 180.

[0040] In this embodiment, a Gaussian filter operator is used to filter the initial defect separation image data to suppress image noise. Then, an edge detection algorithm is used to extract edge information from the image and enhance the gray values ​​of edge pixels to obtain defect feature enhanced image data. For example, the gray values ​​of edge pixels are increased by 20% to make the edges of defects such as cracks and bubbles clearer and more prominent.

[0041] For example, this embodiment determines the size of the Gaussian filter operator based on the grayscale characteristics of the preliminary defect separation image data. Considering the balance between noise suppression and defect preservation in quartz crucible defect detection, a 3×3 or 5×5 square Gaussian filter operator is selected. The operator size can be flexibly adjusted according to the image noise intensity. Secondly, this embodiment determines the weight allocation of the Gaussian filter operator. Based on the distribution characteristics of the Gaussian function, corresponding weights are assigned to pixels at different positions within the filter operator. The central pixel of the operator has the highest weight, gradually decreasing towards the edge pixels, ensuring that the core image information is preserved while suppressing noise during the filtering process. The weight allocation must satisfy the condition that the sum of all weights is 1 to avoid distortion of the grayscale values ​​of the image after filtering. Then, this embodiment performs pixel-by-pixel traversal processing on the preliminary defect separation image data. For each pixel, a corresponding neighborhood region is selected, with the neighborhood size consistent with the Gaussian filter operator size. Each weight of the filter operator is multiplied by the corresponding pixel grayscale value within the neighborhood to obtain the weighted grayscale value for each position. Finally, all weighted gray values ​​are summed to obtain the weighted sum data for that pixel, which is then used as the filtered gray value for that pixel. This filtering calculation is performed on all pixels sequentially to obtain the filtered image data. This data effectively suppresses random noise in the initial defect separation image while preserving the contour information of the defect region to the greatest extent possible.

[0042] This embodiment acquires surface reflection image data using conventional light source surface reflection, adapting to typical on-site inspection scenarios and reducing implementation costs. Adaptive Gaussian weighted threshold segmentation effectively suppresses high reflectivity interference from the quartz crucible surface, accurately separating defects from the background. Gaussian edge enhancement further highlights defect edge features, compensating for the blurriness of small defect edges. This embodiment ensures the accuracy of defect segmentation and feature extraction while improving the operability of the inspection process, effectively solving the problems of reflectivity interference and difficulty in defect identification in quartz crucible defect inspection, and improving inspection efficiency and accuracy.

[0043] S102: Extract features from the enhanced image data of defects to obtain feature data corresponding to various types of defects, and perform matching calculations on the feature data corresponding to various types of defects with the standard feature thresholds of various types of defects to obtain feature matching scores corresponding to various types of defects.

[0044] In this embodiment, feature extraction is a processing step that extracts the core features of various defects from the defect feature enhancement image data. For example, edge gradient features are extracted for cracks, and grayscale features are extracted for bubbles. The feature data corresponding to each type of defect are data reflecting the core attributes of each type of defect after feature extraction, such as edge gradient data for cracks and average grayscale data for bubbles. The standard feature thresholds for each type of defect are preset critical values ​​used to determine whether a defect feature meets the defect standard, such as the standard critical value for the edge gradient of a crack. The matching calculation process is a step of comparing and calculating the defect feature data with the corresponding standard feature thresholds. The feature matching score corresponding to each type of defect is a numerical value that quantifies the degree of fit between the defect feature and the standard threshold after matching calculation; for example, the higher the fit, the higher the score.

[0045] For example, this embodiment first extracts features from the defect feature enhancement image data. For three types of defects in the quartz crucible—cracks, bubbles, and crystallization—corresponding core features are extracted: edge gradient features for cracks, average grayscale features for bubbles, and texture density features for crystallization, resulting in feature data corresponding to each type of defect. Then, the standard feature thresholds for each type of defect are determined through numerous experiments with both defect-free and defective quartz crucible samples. Feature data from various defect samples are collected, and statistical analysis is performed to obtain reasonable critical values ​​for each type of defect feature, which serve as the standard feature thresholds for each type of defect. Finally, the difference between the feature data of each type of defect and the corresponding standard feature threshold is calculated. The absolute value of the difference is processed and normalized to obtain a deviation coefficient. This deviation coefficient is then converted into a matching coefficient through reverse mapping. Finally, the matching coefficient is converted to a percentage to obtain the feature matching score corresponding to each type of defect. In this embodiment, the normalization can be max-min normalization, Z-score normalization, or linear normalization.

[0046] In this embodiment, the feature data corresponding to various defects are matched and calculated with the standard feature thresholds of various defects to obtain the feature matching scores corresponding to various defects, including: Based on the standard feature thresholds of various defects, determine the standard feature benchmark data of various defects; The feature data corresponding to each type of defect is processed by difference calculation with the corresponding standard feature benchmark data to obtain the feature difference value corresponding to each type of defect; The absolute values ​​of the feature differences corresponding to various defects are processed to obtain the absolute value data of the feature differences corresponding to various defects. The absolute value data of the feature differences corresponding to various defects are normalized to obtain the deviation coefficients corresponding to various defects. The deviation coefficients corresponding to various defects are reverse-mapped to obtain the matching coefficients corresponding to various defects. The matching coefficients corresponding to various defects are converted to a percentage system to obtain the feature matching scores corresponding to various defects.

[0047] In this embodiment, the standard feature reference data is a reference parameter used for matching calculation, determined based on the standard feature thresholds of various defects. For example, the standard feature threshold of the crack edge gradient is calibrated and used as the standard feature reference data of the crack. The feature difference is the data obtained by calculating the difference between the feature data corresponding to each type of defect and their respective standard feature reference data, such as the difference between the crack feature data and the crack standard feature reference data. The absolute value data of the feature difference is the data obtained after processing the absolute value of the feature difference, used to eliminate the influence of positive and negative deviations. The deviation coefficient is the data obtained after normalizing the absolute value data of the feature difference, used to unify the deviation range. The matching coefficient is the data obtained after performing reverse mapping processing on the deviation coefficient, reflecting the degree of fit between the feature and the reference. The percentage conversion processing is a processing step that converts the matching coefficient into a score from 0 to 100. The feature matching score is the numerical value obtained after this processing, which quantifies the degree of fit.

[0048] For example, this embodiment denoises and calibrates the standard feature thresholds of a large number of quartz crucible defect samples to eliminate threshold anomalies and obtain standard feature benchmark data for various defects. Then, for cracks, bubbles, and crystallization defects, the feature data of each defect type is subtracted from its corresponding standard feature benchmark data to obtain feature differences for each type of defect. The signs of all feature differences are then removed to obtain the absolute values ​​of the feature differences for each type of defect. Next, all absolute values ​​of feature differences are mapped to a numerical range of 0 to 1 to obtain the deviation coefficients for each type of defect. A linear inverse mapping method is then used to convert the deviation coefficients into matching coefficients between 0 and 1; the smaller the deviation coefficient, the larger the matching coefficient. Finally, the matching coefficients are multiplied by 100 to obtain the feature matching scores for each type of defect. The deviation coefficient is obtained by normalizing the absolute value of the feature difference data. The larger the value, the greater the deviation between the defect feature and the standard feature benchmark data and the lower the degree of fit. The core logic of the reverse mapping process is that the larger the deviation, the smaller the matching coefficient. Through the preset mapping relationship, the deviation coefficient in the interval of 0 to 1 is converted into the matching coefficient in the same interval, so that the matching coefficient can intuitively reflect the degree of fit between the defect feature and the standard benchmark.

[0049] S103: Determine the weight information corresponding to each type of defect, and based on the feature matching score and the corresponding weight information of each type of defect, determine the comprehensive defect score corresponding to each type of defect, and normalize the comprehensive defect score corresponding to each type of defect to obtain the confidence level of each type of defect.

[0050] In this embodiment, the weight information corresponding to each type of defect is a parameter set according to the degree of influence of each type of defect on the quality of the quartz crucible, used to weigh the importance of each type of defect. For example, cracks have the greatest impact on crucible safety, and their weight information value is higher than that of bubbles and crystallization. The comprehensive defect score is a value that quantifies the severity of each type of defect, calculated based on the feature matching score corresponding to each type of defect and its respective weight information. For example, the comprehensive defect score of a crack is obtained by multiplying its feature matching score by its weight. Normalization is a processing step that maps the comprehensive defect scores corresponding to each type of defect to a unified numerical range. The confidence level corresponding to each type of defect is a value that quantifies the probability of the existence of each type of defect after normalization. For example, the closer the confidence level is to 1, the higher the probability of the existence of that type of defect.

[0051] Considering that different types of defects have different degrees of impact on the quality and safety of quartz crucibles, treating the feature matching scores of all types of defects equally would lead to defect judgments deviating from actual needs. Therefore, weight information corresponding to each type of defect is determined.

[0052] For example, this embodiment uses numerous quartz crucible defect detection experiments, combining the probability of various defects causing crucible scrap and their impact on quality, setting the weight of cracks at 0.5, bubbles at 0.3, crystallization at 0.2, and the sum of all defect weights at 1, to obtain the weight information corresponding to each type of defect. Then, for each type of defect, its corresponding feature matching score is multiplied by the corresponding weight information to obtain the comprehensive defect score for that type of defect, and this process is repeated for all defects. Finally, the maximum and minimum values ​​of the comprehensive scores for all defects are first calculated, the minimum value is subtracted from the comprehensive score for each type of defect, and then divided by the difference between the maximum and minimum values, mapping the comprehensive score to a numerical range of 0 to 1 to obtain the confidence level corresponding to each type of defect.

[0053] This embodiment determines the weight information corresponding to each type of defect, fully considering the different impacts of various defects on the quality of the quartz crucible, avoiding the neglect of critical defects, and improving the rationality of defect judgment. A comprehensive defect score is calculated by combining feature matching scores and weight information, accurately quantifying the severity of each type of defect and overcoming the limitations of a single feature matching score. The comprehensive score is normalized to obtain a confidence level, unifying the judgment criteria for each type of defect, making the quantification of the probability of defect existence more intuitive and comparable.

[0054] The specific process of this embodiment can be as follows: Based on the hazard level data of various defects in quartz crucibles, the initial weight information corresponding to each type of defect is determined; The initial weight information corresponding to each type of defect is subjected to consistency verification to obtain the verified weight information. The verified weight information is normalized to obtain the weight information corresponding to each type of defect. The feature matching score and weight information corresponding to a single defect are repeated sequentially to obtain the comprehensive defect score for that defect. The comprehensive defect score calculation is completed for all defects to obtain the comprehensive defect score for each type of defect. The comprehensive defect scores corresponding to each type of defect are calibrated to obtain the calibrated comprehensive defect scores. The normalization process is repeated sequentially on the comprehensive defect score after calibration to obtain the confidence level corresponding to a single defect. The confidence level calculation for all defects is completed to obtain the confidence level corresponding to each type of defect.

[0055] For example, firstly, initial weight parameters are set based on the degree of impact of defects on product quality. Consistency verification is performed on the initial weight information corresponding to each type of defect to identify and eliminate abnormal weights, resulting in verified weight information. The verified weight information is then normalized to unify the numerical range, yielding weight information for each type of defect. A multiplication operation is performed between the feature matching score corresponding to a single defect and its corresponding weight information to obtain the comprehensive defect score. This operation is repeated sequentially to calculate the comprehensive score for all defects, resulting in the comprehensive defect score for each type of defect. The comprehensive defect scores for each type of defect are then calibrated to correct deviations, yielding the calibrated comprehensive defect score. Finally, the calibrated comprehensive defect score is normalized to obtain the confidence level for each type of defect.

[0056] S104: Compare the confidence levels corresponding to various defects with the preset confidence ranges corresponding to various defects; for defect types with confidence levels within the corresponding preset confidence ranges, acquire strong light transmission image data of the quartz crucible, and determine whether the quartz crucible has the defect type based on the strong light transmission image data; the strong light transmission image data is transmission image data acquired using the strong light transmission method.

[0057] In this embodiment, the confidence scores for various defects are numerical values ​​reflecting the probability of defect existence, calculated based on feature matching and weighting. The preset confidence range is a pre-defined confidence interval used to determine the presence or absence of defects; it can be set based on experience or preference, specifically between 0.3 and 0.7. The strong light transmission image data is image data acquired using a strong light transmission method that reflects the internal structure of the quartz crucible. Strong light transmission acquisition refers to image acquisition through strong light penetrating the quartz crucible. Transmission image data is image data obtained after strong light transmission acquisition that reflects the internal condition of the crucible. Strong light refers to a high-intensity illumination source capable of penetrating the quartz crucible body.

[0058] Considering that confidence levels derived solely through feature matching may be biased and cannot fully guarantee the accuracy of defect identification, it is necessary to compare the confidence levels corresponding to various defects with preset confidence ranges to filter out defect types with confidence levels within a reasonable range that require further verification. Simultaneously, strong light transmission can more clearly reveal the internal structure of the quartz crucible, avoiding misjudgments caused by surface reflections or visual interference. Therefore, acquiring strong light transmission image data and determining the judgment result based on this data ensures more accurate defect identification and guarantees the reliability of the detection results.

[0059] For example, this embodiment iterates through the confidence data corresponding to various defects, comparing the confidence of each individual defect with a preset confidence range to determine whether the confidence is within a preset reasonable range. If the confidence is within the preset confidence range, strong light transmission image acquisition is initiated. Strong light transmission is used to acquire images of the quartz crucible, ensuring that the acquired images clearly show the internal structure of the crucible, resulting in strong light transmission image data, i.e., transmission image data. Simple noise reduction processing is performed on the transmission image data to remove image interference. Then, the transmission image data is compared with a preset standard transmission image. Combining the grayscale changes in the defect area in the image, it is determined whether this type of defect exists, forming a judgment result.

[0060] This embodiment compares the confidence levels corresponding to various defects with preset confidence ranges to initially screen out defect types that require further verification, avoiding the bias of judging based on a single confidence level. Combining this with penetration image data acquired through strong light transmission for judgment compensates for the shortcomings of relying solely on confidence levels, effectively reducing the probability of misjudgment.

[0061] In this embodiment, the confidence levels corresponding to various defects are compared with the preset confidence ranges corresponding to various defects, and then the process further includes: For defect types whose confidence level is outside the corresponding preset confidence level range, if the confidence level is less than the lower limit of the preset confidence level range, it is determined that the quartz crucible does not have defects of that type; if the confidence level is greater than the upper limit of the preset confidence level range, it is determined that the quartz crucible has defects of that type.

[0062] In this embodiment, the lower limit of the preset confidence range is a pre-set confidence threshold value used to determine the absence of a defect. For example, the lower limit of the preset confidence range for crack defects is set to 0.3; values ​​below this value indicate the absence of a crack. The upper limit of the preset confidence range is a pre-set confidence threshold value used to determine the presence of a defect. For example, the upper limit of the preset confidence range for bubble defects is set to 0.7; values ​​above this value indicate the presence of a bubble. A confidence level below the lower limit of the preset confidence range indicates an extremely low probability of the defect's existence, while a confidence level above the upper limit indicates an extremely high probability of the defect's existence.

[0063] Considering that a confidence level below the lower limit indicates an extremely low probability of defect presence, no additional verification is needed to determine the absence of defects, thus improving detection efficiency; and a confidence level above the upper limit indicates an extremely high probability of defect presence, requiring no additional verification to determine the presence of defects, reducing redundant operations. At the same time, clearly defining the judgment result for each case avoids ambiguity due to confidence levels exceeding the range, ensuring that all defect types can be clearly identified, balancing detection efficiency and accuracy.

[0064] For example, this embodiment, based on the accuracy requirements of quartz crucible defect detection, determines the preset confidence range corresponding to various types of defects through a large number of sample experiments, clarifying the lower and upper limits of the preset confidence range for each type of defect. Then, the confidence levels corresponding to various types of defects are compared with the preset confidence ranges for each type of defect. The confidence levels for each type of defect are iterated through and compared one by one with the preset confidence range to determine whether the confidence level falls within the range. Next, for defect types whose confidence levels are not within the corresponding preset confidence range, the relationship between the confidence level and the upper and lower limits of the preset confidence range is further determined: if the confidence level is less than the lower limit of the preset confidence range, it is directly determined that the quartz crucible does not have this type of defect; if the confidence level is greater than the upper limit of the preset confidence range, it is directly determined that the quartz crucible has this type of defect. Finally, defect types whose confidence levels are within the corresponding preset confidence range are retained for further verification, and subsequent determination is completed using strong light transmission image data.

[0065] In this embodiment, determining whether the quartz crucible has this type of defect based on strong light transmission image data includes: The grayscale difference data is obtained by calculating the grayscale difference between the strong light transmission image data and the standard strong light transmission image data. The grayscale difference data is compared with a preset grayscale difference threshold. If the grayscale difference data is greater than the preset grayscale difference threshold, it is determined that the quartz crucible has a defect of this type. If the grayscale difference data is less than or equal to the preset grayscale difference threshold, it is determined that the quartz crucible does not have a defect of this type. Among them, the standard high-intensity light transmission image data is the high-intensity light transmission image data obtained by a defect-free quartz crucible under the same shooting conditions.

[0066] In this embodiment, the standard high-intensity light transmission image data is the transmission image data of a defect-free quartz crucible acquired under completely identical shooting conditions to the crucible under test, using high-intensity light transmission as a benchmark reference for defect determination. The grayscale difference calculation process involves calculating the grayscale difference between the high-intensity light transmission image data to be tested and the standard high-intensity light transmission image data pixel by pixel, and then summing and statistically analyzing the results to obtain grayscale difference data reflecting the overall grayscale variation of the image. The preset grayscale difference threshold is a critical value determined in advance through a large number of sample experiments to distinguish the presence or absence of defects; for example, the preset grayscale difference threshold can be 1200.

[0067] Considering that strong light transmission image data can penetrate the surface of the quartz crucible and directly reflect its internal structural state, while the standard image data without defects serves as a unified judgment benchmark, the difference between the sample to be tested and the standard sample needs to be quantified through grayscale difference calculation. When defects exist, the light transmittance of its internal structure differs significantly from that of the defect-free area, leading to a significant change in grayscale value. Therefore, a preset grayscale difference threshold is set as the judgment boundary.

[0068] For example, this embodiment acquires standard high-intensity light transmission image data. A batch of qualified quartz crucibles without any defects are selected, and images are acquired using the same shooting parameters as the crucible to be tested via high-intensity light transmission. These images are then integrated to obtain unified standard high-intensity light transmission image data, which serves as the benchmark data for subsequent comparison. Next, grayscale difference calculation processing is performed on the high-intensity light transmission image data and the standard high-intensity light transmission image data. Each pixel in the high-intensity light transmission image data to be tested is traversed, and its grayscale value is extracted pixel by pixel. The difference is calculated by comparing this value with the grayscale value of the corresponding pixel in the standard high-intensity light transmission image data. The absolute values ​​of all pixel differences are then summed to obtain the overall grayscale difference data. The larger this value, the more significant the difference in internal light transmission between the crucible to be tested and the standard crucible. Then, the grayscale difference data is compared with a preset grayscale difference threshold. Based on the accuracy requirements for quartz crucible defect detection, the preset grayscale difference threshold is determined through numerous sample experiments containing different degrees of defects. The grayscale difference data of each crucible to be tested is traversed, and its value is compared with the preset grayscale difference threshold corresponding to this type of defect. Finally, if the grayscale difference data is greater than the preset grayscale difference threshold, it is determined that the quartz crucible has a defect of this type; if the grayscale difference data is less than or equal to the preset grayscale difference threshold, it is determined that the quartz crucible does not have a defect of this type.

[0069] This embodiment introduces standard, defect-free, high-intensity light transmission image data as a benchmark, achieving quantitative comparison for defect determination and solving the problem of insufficient evidence for subjective image judgment alone. Gray-scale difference calculation accurately captures the internal structural differences between the crucible under test and the standard crucible, providing objective data support for defect determination. Based on a preset gray-scale difference threshold, a clear magnitude determination is made; the logic is clear, the calculation is simple, and conclusions can be drawn quickly, effectively improving the efficiency and accuracy of defect determination.

[0070] As can be seen from the above, the embodiments of this application, through adaptive Gaussian weighted threshold segmentation, can dynamically suppress surface reflection interference, accurately separate defects from the background, and obtain a preliminary defect separation image. Further Gaussian edge enhancement processing makes the edges of defects such as cracks and bubbles clearer, solving problems such as localized reflection and uneven texture on the surface of quartz crucibles caused by material characteristics. By extracting and matching features from the enhanced defect image, combined with weight allocation and normalization processing, a confidence level is obtained, quantifying the defect judgment into a specific value, replacing traditional subjective judgment, reducing reliance on professionals, and allowing ordinary operators to quickly master the process. Simultaneously, by comparing the confidence levels corresponding to various defects with a preset confidence range, the embodiments of this application can initially screen out defect types requiring further verification, avoiding the bias of single confidence level judgments. For defect types requiring further verification, a strong light transmission image is introduced for secondary verification, using the grayscale difference with the standard transmission image to judge the defect, further avoiding the risk of false detection and missed detection, improving the detection accuracy of subtle defects, and ensuring the stability of the crystal pulling process.

[0071] Based on the same principle as the quartz crucible defect detection method provided in the embodiments of this application, the embodiments of this application also provide a quartz crucible defect detection device, such as... Figure 2 As shown, the quartz crucible defect detection device 20 may specifically include: an image preprocessing module 21, a feature extraction module 22, a confidence calculation module 23, and a defect detection module 24.

[0072] The image preprocessing module 21 is used to acquire surface reflection image data of the quartz crucible, perform adaptive Gaussian weighted threshold segmentation on the surface reflection image data to obtain preliminary defect separation image data, and perform Gaussian edge enhancement on the preliminary defect separation image data to obtain defect feature enhancement image data. The feature extraction module 22 is used to extract features from the defect feature enhancement image data, obtain feature data corresponding to various types of defects, and perform matching calculation processing on the feature data corresponding to various types of defects and the standard feature thresholds of various types of defects to obtain feature matching scores corresponding to various types of defects. The confidence calculation module 23 is used to determine the weight information corresponding to each type of defect, and based on the feature matching score and the corresponding weight information of each type of defect, to determine the comprehensive defect score corresponding to each type of defect, and to normalize the comprehensive defect score corresponding to each type of defect to obtain the confidence level of each type of defect. The defect detection module 24 is used to compare the confidence level of various defects with the preset confidence level range of various defects; for the defect type whose confidence level is within the corresponding preset confidence level range, it acquires the strong light transmission image data of the quartz crucible, and determines whether the quartz crucible has the defect type based on the strong light transmission image data; the strong light transmission image data is the transmission image data acquired by strong light transmission method.

[0073] In one embodiment of this application, the image preprocessing module 21 is specifically used for: The pixel neighborhood reflectance intensity of the surface reflectance image data is extracted and statistically processed to obtain the pixel neighborhood reflectance intensity distribution feature data of the surface reflectance image data. Based on the pixel neighborhood reflectance intensity distribution feature data, the Gaussian weighted weight data is determined; Gaussian weighted image data is obtained by performing Gaussian weighted convolution on the surface reflection image data based on the Gaussian weighted weight data. Based on Gaussian weighted image data, determine the neighborhood weighted statistical mean data of each pixel in the Gaussian weighted image data; Pixel segmentation threshold data is determined based on neighborhood weighted statistical mean data. Pixel-level threshold segmentation of surface reflection image data is performed based on pixel segmentation threshold data to obtain preliminary defect separation image data.

[0074] In one embodiment of this application, the image preprocessing module 21 is further configured to: Based on Gaussian weighted image data, pixel gray-level gradient calculation is performed on the Gaussian weighted image data to obtain the gray-level gradient data of each pixel. The grayscale gradient data of each pixel is matched and verified to determine the neighborhood size data of the corresponding pixel. Based on the neighborhood size data of each pixel, pixel grayscale extraction is performed on the neighborhood region of the corresponding pixel in the Gaussian weighted image data to obtain the neighborhood pixel grayscale set data of that pixel. The neighborhood pixel grayscale set data is weighted and summed to obtain the neighborhood weighted sum data. Based on the neighborhood weighted sum data and the neighborhood size data of the corresponding pixel, the neighborhood weighted statistical mean data of the pixel is determined.

[0075] In one embodiment of this application, the image preprocessing module 21 is further configured to: The initial pixel segmentation threshold data is determined based on the neighborhood weighted statistical mean data. The pixel grayscale variance is calculated by processing the surface reflection image data to obtain the pixel grayscale variance data; The initial pixel segmentation threshold data is calibrated based on the pixel grayscale variance data to obtain calibrated pixel segmentation threshold data. Pixel segmentation threshold data is determined based on the calibrated pixel segmentation threshold data.

[0076] In one embodiment of this application, the feature extraction module 22 is specifically used for: Based on the standard feature thresholds of various defects, determine the standard feature benchmark data of various defects; The feature data corresponding to each type of defect is processed by difference calculation with the corresponding standard feature benchmark data to obtain the feature difference value corresponding to each type of defect; The absolute values ​​of the feature differences corresponding to various defects are processed to obtain the absolute value data of the feature differences corresponding to various defects. The absolute value data of the feature differences corresponding to various defects are normalized to obtain the deviation coefficients corresponding to various defects. The deviation coefficients corresponding to various defects are reverse-mapped to obtain the matching coefficients corresponding to various defects. The matching coefficients corresponding to various defects are converted to a percentage system to obtain the feature matching scores corresponding to various defects.

[0077] In one embodiment of this application, the quartz crucible defect detection device 20 further includes: a defect type determination module, used for determining that the quartz crucible does not have a defect of that type if the confidence level is less than the lower limit of the preset confidence range for a defect type, and if the confidence level is greater than the upper limit of the preset confidence range, the quartz crucible has a defect of that type.

[0078] In one embodiment of this application, the defect detection module 24 is specifically used for: The grayscale difference data is obtained by calculating the grayscale difference between the strong light transmission image data and the standard strong light transmission image data. The grayscale difference data is compared with a preset grayscale difference threshold. If the grayscale difference data is greater than the preset grayscale difference threshold, it is determined that the quartz crucible has a defect of this type. If the grayscale difference data is less than or equal to the preset grayscale difference threshold, it is determined that the quartz crucible does not have a defect of this type. Among them, the standard high-intensity light transmission image data is the high-intensity light transmission image data obtained by a defect-free quartz crucible under the same shooting conditions.

[0079] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.

[0080] Figure 3 A schematic diagram of the structure of an electronic device to which this application embodiment applies is shown, such as... Figure 3 As shown, the electronic device can be used to implement the methods provided in any embodiment of this application.

[0081] like Figure 3 As shown, the electronic device 300 may primarily include at least one processor 301. Figure 3 The diagram shows components such as a memory 302, a communication module 303, and an input / output interface 304. Optionally, these components can be connected and communicate with each other via a bus 305. It should be noted that... Figure 3 The structure of the electronic device 300 shown is merely illustrative and does not constitute a limitation on the electronic devices to which the methods provided in the embodiments of this application are applicable.

[0082] The memory 302 can be used to store operating systems and applications, etc. The applications can include computer programs that implement the methods shown in the embodiments of this application when invoked by the processor 301, and can also include programs for implementing other functions or services. The memory 302 can be ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices that can store information and computer programs, or it can be EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.

[0083] Processor 301 is connected to memory 302 via bus 305 and implements corresponding functions by calling the application programs stored in memory 302. Processor 301 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 301 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0084] Electronic device 300 can connect to a network via communication module 303 (which may include, but is not limited to, components such as a network interface) to communicate with other devices (such as user terminals or servers) through the network and achieve data interaction, such as sending data to or receiving data from other devices. Communication module 303 may include wired network interfaces and / or wireless network interfaces, meaning the communication module may include at least one of wired or wireless communication modules.

[0085] The electronic device 300 can connect to necessary input / output devices, such as a keyboard and display device, via the input / output interface 304. The electronic device 300 itself may have a display device, and other display devices can also be connected externally via the interface 304. Optionally, a storage device, such as a hard drive, can also be connected via the interface 304 to store data from the electronic device 300, retrieve data from the storage device, or store data from the storage device in the memory 302. It is understood that the input / output interface 304 can be a wired interface or a wireless interface. Depending on the actual application scenario, the device connected to the input / output interface 304 can be a component of the electronic device 300 or an external device connected to the electronic device 300 when needed.

[0086] The bus 305 used to connect the components may include a path for transmitting information between the components. The bus 305 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Depending on its function, the bus 305 may be divided into an address bus, a data bus, a control bus, etc.

[0087] Optionally, for the solution provided in the embodiments of this application, the memory 302 can be used to store a computer program that executes the solution of this application, and the processor 301 runs the computer program. When the processor 301 runs the computer program, it implements the operation of the method or apparatus provided in the embodiments of this application.

[0088] Based on the same principle as the method provided in the embodiments of this application, the embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the corresponding content of the aforementioned method embodiments.

[0089] It should be noted that the terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the figures or text.

[0090] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0091] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.

[0092] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.

Claims

1. A method for detecting defects in a quartz crucible, characterized in that, include: Surface reflection image data of a quartz crucible is acquired, and adaptive Gaussian weighted threshold segmentation is performed on the surface reflection image data to obtain preliminary defect separation image data. Gaussian edge enhancement processing is performed on the preliminary defect separation image data to obtain defect feature enhanced image data; Feature extraction is performed on the enhanced image data of defects to obtain feature data corresponding to various types of defects. The feature data corresponding to various types of defects are then matched and calculated with the standard feature thresholds of various types of defects to obtain the feature matching scores corresponding to various types of defects. The weight information corresponding to each type of defect is determined, and based on the feature matching score and the corresponding weight information of each type of defect, the comprehensive defect score corresponding to each type of defect is determined. The comprehensive defect score corresponding to each type of defect is then normalized to obtain the confidence level of each type of defect. The confidence levels corresponding to various defects are compared with the preset confidence ranges corresponding to various defects. For defect types with confidence levels within the corresponding preset confidence range, high-intensity light transmission image data of the quartz crucible is acquired, and the presence of the defect type in the quartz crucible is determined based on the high-intensity light transmission image data; the high-intensity light transmission image data is transmission image data acquired using a high-intensity light transmission method.

2. The method for detecting defects in a quartz crucible as described in claim 1, characterized in that, The adaptive Gaussian weighted threshold segmentation process performed on the surface reflection image data to obtain preliminary defect separation image data includes: The pixel neighborhood reflectance intensity of the surface reflectance image data is extracted and statistically processed to obtain the pixel neighborhood reflectance intensity distribution feature data of the surface reflectance image data. Based on the pixel neighborhood reflectance intensity distribution feature data, Gaussian weighted weight data is determined; Gaussian weighted image data is obtained by performing Gaussian weighted convolution on the surface reflection image data based on the Gaussian weighted weight data. Based on the Gaussian weighted image data, determine the neighborhood weighted statistical mean data of each pixel in the Gaussian weighted image data; Based on the neighborhood weighted statistical mean data, determine the pixel segmentation threshold data; The surface reflection image data is segmented at the pixel level based on the pixel segmentation threshold data to obtain preliminary defect separation image data.

3. The method for detecting defects in a quartz crucible as described in claim 2, characterized in that, The step of determining the neighborhood weighted statistical mean data of each pixel in the Gaussian weighted image data includes: Based on the Gaussian weighted image data, pixel gray-level gradient calculation is performed on the Gaussian weighted image data to obtain the gray-level gradient data of each pixel. The grayscale gradient data of each pixel is matched and verified to determine the neighborhood size data of the corresponding pixel. Based on the neighborhood size data of each pixel, pixel grayscale extraction processing is performed on the neighborhood region of the corresponding pixel in the Gaussian weighted image data to obtain the neighborhood pixel grayscale set data of the pixel. The neighborhood pixel grayscale set data is weighted and summed to obtain the neighborhood weighted sum data; Based on the neighborhood weighted sum data and the neighborhood size data of the corresponding pixel, the neighborhood weighted statistical mean data of the pixel is determined.

4. The method for detecting defects in a quartz crucible as described in claim 2, characterized in that, The step of determining the pixel segmentation threshold data based on the neighborhood weighted statistical mean data includes: Based on the neighborhood weighted statistical mean data, the initial pixel segmentation threshold data is determined; The pixel grayscale variance is calculated by performing pixel grayscale variance processing on the surface reflection image data to obtain pixel grayscale variance data; The initial pixel segmentation threshold data is calibrated based on the pixel grayscale variance data to obtain calibrated pixel segmentation threshold data. The pixel segmentation threshold data is determined based on the calibrated pixel segmentation threshold data.

5. The method for detecting defects in a quartz crucible as described in claim 1, characterized in that, The process of matching and calculating the feature data corresponding to various defects with the standard feature thresholds of various defects to obtain the feature matching scores corresponding to various defects includes: Based on the standard feature thresholds of various defects, determine the standard feature benchmark data of various defects; The feature data corresponding to each type of defect is processed by difference calculation with the corresponding standard feature benchmark data to obtain the feature difference value corresponding to each type of defect; The absolute values ​​of the feature differences corresponding to various defects are processed to obtain the absolute value data of the feature differences corresponding to various defects. The absolute value data of the feature differences corresponding to various defects are normalized to obtain the deviation coefficients corresponding to various defects. The deviation coefficients corresponding to various defects are reverse-mapped to obtain the matching coefficients corresponding to various defects. The matching coefficients corresponding to various defects are converted to a percentage system to obtain the feature matching scores corresponding to various defects.

6. The method for detecting defects in a quartz crucible as described in claim 1, characterized in that, The process of comparing the confidence levels corresponding to various defects with the preset confidence ranges corresponding to various defects further includes: For defect types whose confidence level is not within the corresponding preset confidence level range, if the confidence level is less than the lower limit of the preset confidence level range, it is determined that the quartz crucible does not have a defect of that type; if the confidence level is greater than the upper limit of the preset confidence level range, it is determined that the quartz crucible has a defect of that type.

7. The method for detecting defects in a quartz crucible as described in claim 1, characterized in that, The process of determining whether the quartz crucible has this type of defect based on the strong light transmission image data includes: The grayscale difference data is obtained by calculating the grayscale difference between the strong light transmission image data and the standard strong light transmission image data. The grayscale difference data is compared with a preset grayscale difference threshold. If the grayscale difference data is greater than the preset grayscale difference threshold, it is determined that the quartz crucible has a defect of this type. If the grayscale difference data is less than or equal to the preset grayscale difference threshold, it is determined that the quartz crucible does not have a defect of this type. The standard high-intensity light transmission image data refers to the high-intensity light transmission image data obtained from a defect-free quartz crucible under the same shooting conditions.

8. A quartz crucible defect detection device, characterized in that, include: The image preprocessing module is used to acquire surface reflection image data of a quartz crucible, perform adaptive Gaussian weighted threshold segmentation on the surface reflection image data to obtain preliminary defect separation image data, and perform Gaussian edge enhancement on the preliminary defect separation image data to obtain defect feature enhancement image data. The feature extraction module is used to extract features from the defect feature enhancement image data to obtain feature data corresponding to various types of defects, and to perform matching calculations on the feature data corresponding to various types of defects with the standard feature thresholds of various types of defects to obtain feature matching scores corresponding to various types of defects. The confidence calculation module is used to determine the weight information corresponding to each type of defect, and based on the feature matching score and the corresponding weight information of each type of defect, to determine the comprehensive defect score corresponding to each type of defect, and to normalize the comprehensive defect score corresponding to each type of defect to obtain the confidence score corresponding to each type of defect. The defect detection module is used to compare the confidence level corresponding to various defects with the preset confidence level range corresponding to various defects. For defect types with confidence levels within the corresponding preset confidence range, high-intensity light transmission image data of the quartz crucible is acquired, and the presence of the defect type in the quartz crucible is determined based on the high-intensity light transmission image data; the high-intensity light transmission image data is transmission image data acquired using a high-intensity light transmission method.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the quartz crucible defect detection method according to any one of claims 1 to 7 when running the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the quartz crucible defect detection method according to any one of claims 1 to 7.