Sapphire crystal boundary detection method

Through high-resolution shooting, image preprocessing, deep learning and morphological optimization methods, the problems of insufficient accuracy and noise interference in sapphire grain boundary detection are solved, and higher accuracy and complete grain boundary data acquisition are achieved.

CN120411059AInactive Publication Date: 2025-08-01XUZHOU DEKAI NEW MATERIALS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510571259.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-08-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems such as insufficient detection accuracy, serious noise interference and incomplete grain boundary identification in sapphire grain boundary detection, which is difficult to meet the needs of modern high-demand and high-speed industrial production.

Method used

Acquire the sapphire sample image set through high-resolution shooting, perform image preprocessing and deep learning, perform pixel-level annotation and morphological optimization, generate and merge grain boundary annotation pixel points, and perform morphological analysis to optimize grain boundary information.

Benefits of technology

It improves the recognition accuracy of sapphire grain boundary detection, improves grain boundary data, solves the problems of insufficient detection accuracy and noise interference, and achieves higher detection accuracy and data integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120411059A_ABST
    Figure CN120411059A_ABST
Patent Text Reader

Abstract

The invention discloses a sapphire crystal boundary detection method, and relates to the technical field of crystal boundary detection, and the method comprises the steps: obtaining a sapphire sample image set, carrying out the image preprocessing, generating a plurality of image processing data, carrying out the rough detection, and determining the initial crystal boundary information of a sapphire sample; segmenting the plurality of image processing data according to the initial grain boundary information to generate a plurality of image sub-data, and performing pixel-level labeling according to the plurality of image sub-data to obtain a plurality of grain boundary labeling pixel points; connecting and combining the plurality of grain boundary labeling pixel points, and detecting and positioning grain boundary information of the sapphire sample according to a combination result; and synchronizing the grain boundary information to a morphological analysis unit for optimization, updating the grain boundary information, and determining a grain boundary detection optimization result. According to the invention, the technical problems of insufficient detection precision, serious noise interference and incomplete crystal boundary identification in the crystal boundary detection process in the prior art are solved, and the technical effects of improving the identification precision of sapphire crystal boundary detection and perfecting crystal boundary data are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of grain boundary detection, and particularly to a method for detecting grain boundaries of sapphire. Background Art

[0002] With the continuous development of materials science and high-precision processing technology, the detection of sapphire grain boundaries has been widely applied in fields such as semiconductors, optical devices, and high-end manufacturing. However, with the continuous expansion of production scale and the complexity of crystal technology, the accuracy requirements and real-time monitoring in the process of sapphire grain boundary detection are also facing increasing challenges. Traditional grain boundary detection methods mostly rely on manual intervention or low-precision detection equipment, and often have problems such as insufficient accuracy in grain boundary recognition, serious noise interference, and incomplete grain boundary data, which makes it difficult to meet the requirements of modern precision manufacturing in high-demand and high-speed industrial production. Summary of the Invention

[0003] This application provides a method for detecting sapphire grain boundaries, which is used to solve the technical problems of insufficient detection accuracy, serious noise interference, and incomplete grain boundary recognition existing in the prior art during the process of grain boundary detection.

[0004] In view of the above problems, this application provides a method for detecting sapphire grain boundaries.

[0005] This application provides a method for detecting sapphire grain boundaries, and the method includes: Taking high-resolution pictures of a sapphire sample to obtain a set of sapphire sample images; performing image preprocessing based on the set of sapphire sample images to generate a plurality of image processing data, traversing the plurality of image processing data for rough detection to determine the initial grain boundary information of the sapphire sample; segmenting the plurality of image processing data according to the initial grain boundary information to generate a plurality of image sub-data, performing pixel-level annotation according to the plurality of image sub-data to obtain a plurality of grain boundary annotation pixel points; connecting and merging the plurality of grain boundary annotation pixel points, detecting and positioning the grain boundary information of the sapphire sample according to the merging result; synchronizing the grain boundary information to a morphological analysis unit for optimization, updating the grain boundary information, and determining the optimized result of grain boundary detection.

[0006] One or more technical solutions provided in this application have at least the following technical effects or advantages: In this application, a high-resolution photograph is taken of a sapphire sample to obtain an image set of the sapphire sample. Image preprocessing is performed based on the sapphire sample image set to generate a plurality of image processing data. The plurality of image processing data is traversed for rough detection to determine the initial grain boundary information of the sapphire sample. The plurality of image processing data is segmented according to the initial grain boundary information to generate a plurality of image sub-data. Pixel-level annotation is performed based on the plurality of image sub-data to obtain a plurality of grain boundary annotation pixel points. The plurality of grain boundary annotation pixel points are connected and merged, and the grain boundary information of the sapphire sample is detected and located according to the merging result. The grain boundary information is synchronized to a morphology analysis unit for optimization to update the grain boundary information and determine the optimized result of grain boundary detection. The present invention solves the technical problems of insufficient detection accuracy, serious noise interference, and incomplete grain boundary recognition in the prior art during grain boundary detection. Through high-resolution photographing, image preprocessing, pixel-level annotation, and morphological optimization, the technical effects of improving the recognition accuracy of sapphire grain boundary detection and perfecting grain boundary data are achieved. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0008] Figure 1 Schematic flow chart of a sapphire grain boundary detection method provided by an embodiment of the present application; Figure 2 Schematic flow chart of generating a plurality of image processing data in a sapphire grain boundary detection method provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0009] The present application provides a sapphire grain boundary detection method for solving the technical problems of insufficient accuracy, serious noise interference, and incomplete grain boundary recognition in the prior art during grain boundary detection. Through high-resolution photographing, image preprocessing, pixel-level annotation, and morphological optimization, the technical effects of improving the grain boundary recognition accuracy, removing noise interference, and perfecting grain boundary data are achieved.

[0010] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts belong to the scope of protection of the present application.

[0011] It should be noted that any variation of the terms "including" and "having" is intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that includes a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or modules not clearly listed or inherent to these processes, methods, products, or devices.

[0012] Examples, such as Figure 1 As shown, the present application provides a method for detecting sapphire grain boundaries, and the method includes: Step S100: Obtain a set of sapphire sample images by performing high-resolution shooting on a sapphire sample.

[0013] In an embodiment of the present application, a set of sapphire sample images is obtained by performing high-resolution shooting on a pre-prepared sapphire sample using precision equipment such as a high-resolution microscope or a scanning electron microscope (SEM).

[0014] Step S200: Perform image preprocessing based on the set of sapphire sample images to generate a plurality of image processing data, traverse the plurality of image processing data for rough detection, and determine the initial grain boundary information of the sapphire sample.

[0015] In an embodiment of the present application, based on the set of sapphire sample images, image preprocessing is first performed to generate a plurality of image processing data. Specifically, by reading the set of sapphire sample images and performing frame-by-frame analysis, the initial numerical values of the images are obtained. Then the images are enhanced to improve the image equalization value; noise analysis is performed to identify noise information and perform denoising filtering to generate denoised image data; finally, grayscale conversion is performed to obtain a plurality of image processing data.

[0016] Next, rough detection is performed by traversing these image processing data. Specifically, first, deep learning is used to identify the images to obtain data of the crystal region and the background region. Based on these region data, rough monitoring is performed, a plurality of edge gradient values are calculated, and edge analysis is performed on these edge gradient values to obtain the direction information and intensity information of the edges. Finally, combining the edge intensity and direction information, the initial grain boundary information of the sapphire sample is determined.

[0017] Furthermore, as Figure 2 shown, in the method provided by the embodiment of the application, image preprocessing is performed based on the set of sapphire sample images to generate a plurality of image processing data, and it further includes: Read the sapphire sample image set for frame-by-frame analysis to obtain multiple initial image values; enhance the sapphire sample image set according to the multiple initial image values to obtain multiple image equalization values; perform noise analysis on the sapphire sample image set according to the multiple image equalization values to determine multiple image noise information, and perform denoising filtering on the sapphire sample image set according to the multiple image noise information to obtain multiple image denoised data; perform grayscale conversion on the sapphire sample image set according to the multiple image denoised data to determine the multiple image processing data.

[0018] In the embodiment of the present application, first, use an image processing software (such as OpenCV or MATLAB) to perform frame-by-frame analysis on the sapphire sample image set, extract the pixel values of the images, and obtain multiple initial image values.

[0019] Next, enhance the sapphire sample image set according to the multiple initial image values obtained. Specifically, use the histogram equalization method to enhance the contrast of the image by adjusting the brightness distribution of the image. In the histogram of the image, the low-brightness region and the high-brightness region often lead to unclear image details. Through histogram equalization, the brightness values in the image will be redistributed, making the brightness range of the image wider, so that details such as grain boundaries are more prominent. For sapphire samples, image enhancement helps to provide higher contrast between tiny crystals and grain boundaries, making these details more visible. After this step, multiple image equalization values are obtained.

[0020] Subsequently, perform noise analysis on the sapphire sample image set according to the multiple image equalization values. Since the image may be affected by different types of noise during the shooting process, the purpose of noise analysis is to identify and confirm the types of noise existing in the image. Common types of noise include Gaussian noise, etc. To identify the noise, use frequency domain analysis methods such as Fourier transform to detect the frequency components in the image and find the irregular fluctuations in the image. In addition, local variance analysis can also be used to identify the noise in the image. Through these methods, the noise information in the image is determined, and multiple image noise information is determined.

[0021] After determining the noise information, the next step is denoising filtering. Commonly used denoising techniques include Gaussian filtering and median filtering. Gaussian filtering smooths the image by applying a Gaussian kernel function to remove high-frequency noise while trying to retain the detail information of the image, especially the edge information. Median filtering uses the median of the neighboring pixels of each pixel to replace the pixel value. Remove the noise in the image through the denoising filtering operation to generate multiple image denoised data.

[0022] Finally, the sapphire sample image set is grayscale-converted according to multiple image denoising data. Grayscale conversion is to convert a color image into a grayscale image, only retaining the brightness information of the image and simplifying the subsequent image analysis process. This process obtains a single-channel grayscale image by converting the RGB (red, green, blue) channel values of each pixel into a brightness value. A common method is to calculate the brightness value based on the weighted average of the RGB three-color channels to generate the grayscale value of each pixel. After grayscale conversion, the color information of the image is removed, and only the brightness information remains, making the details in the image more prominent, especially the grain boundary part. Finally, multiple image processing data are obtained.

[0023] Further, in the method provided by the application embodiment, when traversing the multiple image processing data for rough detection to determine the initial grain boundary information of the sapphire sample, it further includes: Traverse the multiple image processing data for deep learning, perform image identification on the multiple image processing data according to the learning results to obtain multiple identification data, where the multiple identification data include multiple crystal region data and multiple background region data; perform rough monitoring based on the multiple crystal region data and the multiple background region data to determine multiple edge gradient values; perform edge analysis according to the multiple edge gradient values to determine multiple edge information, where the multiple edge information includes edge direction information and edge intensity information; define the initial grain boundary information of the sapphire sample according to the edge intensity information in combination with the edge direction information.

[0024] In the embodiment of the present application, first, traverse multiple image processing data and perform deep learning. In this stage, deep learning algorithms such as convolutional neural networks (CNNs) are used to train and infer the images. The CNN can automatically extract features from the images and classify the images according to the pre-annotated training data. The task of the model is to automatically identify and mark different regions in the image, such as crystal regions and background regions, by learning the microstructures on the sapphire surface. During this process, the deep learning model extracts local features of the image through convolutional layers and performs classification in fully connected layers. This step generates multiple identification data, which include crystal region data and background region data in the sapphire image.

[0025] Next, based on the obtained crystal region data and background region data, rough monitoring is performed. At this time, the Sobel operator is used to calculate the edge gradient values. The Sobel operator identifies the edges in the image by calculating the brightness changes of each pixel in the horizontal and vertical directions of the image. Places with larger edge gradient values usually correspond to possible grain boundaries in the image because grain boundaries usually exhibit large brightness changes. Through the processing of the Sobel operator, multiple edge gradient values are obtained.

[0026] Then, edge analysis is performed based on multiple edge gradient values. The goal of edge analysis is to deeply understand the edge features in the image, especially to determine the direction and intensity of the edges. The direction of the edge reflects the orientation of the grain boundary, while the intensity of the edge indicates the distinctness or clarity of the grain boundary. To extract this information, commonly used techniques include gradient direction analysis and non-maximum suppression. Gradient direction analysis identifies the orientation of the edges in the image by calculating the gradient direction of each pixel point, thereby inferring the direction of the grain boundary. Non-maximum suppression further enhances the clarity of the edges by suppressing non-edge regions and retaining the strongest edge information. The combination of these techniques can accurately calculate the edge direction information and edge intensity information of each edge.

[0027] Finally, based on the extracted edge intensity information and edge direction information, the two are combined to perform grain boundary definition. At this stage, by combining the intensity and direction information of the edges, the position of the grain boundary is accurately determined through the Hough transform. The Hough transform is a method of converting the edge information in the image into polar coordinate space to detect straight lines or boundaries in the image. In the grain boundary detection of sapphire samples, the Hough transform can help accurately calibrate the position of the grain boundary and depict the initial grain boundary information of the sapphire sample.

[0028] Step S300: Segment the multiple image processing data according to the initial grain boundary information to generate multiple image sub-data, and perform pixel-level annotation on the multiple image sub-data to obtain multiple grain boundary annotation pixel points.

[0029] In the embodiment of the present application, according to the initial grain boundary information, first, image analysis is performed on the multiple image processing data, and multiple pixel segmentation lines are determined based on the edge direction information and edge intensity information. These segmentation lines are used to delimit important regions in the image for subsequent processing. Then, by setting multiple sliding windows, the image data is segmented, and each image processing data is divided into multiple image sub-data, and each sub-data represents a local region in the image.

[0030] After the segmentation is completed, each image sub-data is traversed to perform edge detection. Edge detection finds the position of the grain boundary by identifying the regions where the pixel intensity changes in the image. According to the accuracy of the edge detection, fine-grained annotation is performed on each image sub-data, and the specific position of the grain boundary is calibrated pixel by pixel to generate grain boundary annotation information. Finally, these grain boundary annotation information are mapped onto the corresponding image sub-data, and through data alignment technology, it is ensured that all annotation information accurately corresponds to the original image, and finally multiple grain boundary annotation pixel points are obtained.

[0031] Further, in the method provided by the application embodiment, the multiple image processing data are segmented according to the initial grain boundary information to generate multiple image sub-data, and pixel-level annotation is performed on the multiple image sub-data to obtain multiple grain boundary annotation pixel points, further including: Performing image analysis on the multiple image processing data according to the edge direction information in accordance with the edge intensity information to determine multiple pixel segmentation lines; setting multiple sliding windows according to the multiple pixel segmentation lines, and performing image segmentation on the multiple image processing data through the multiple sliding windows to generate multiple image sub-data; traversing the multiple image sub-data for edge detection, and performing fine-grained annotation on the multiple image sub-data according to the detection accuracy to obtain multiple grain boundary annotation information; mapping the multiple grain boundary annotation information to the multiple image sub-data for data alignment to determine the multiple grain boundary annotation pixel points.

[0032] In the embodiment of the present application, first, image analysis is performed on the multiple image processing data according to the edge direction information in accordance with the edge intensity information. Specifically, the edge direction information provides the orientation of the edges in the image, while the edge intensity information reveals the distinctness of the edges. In this process, first, the calculated gradient values are combined with the edge direction information and the edge intensity information, and edge detection techniques, such as the Canny edge detection algorithm or the Sobel operator, are used to calculate the direction and intensity of the edges in the image. By combining these two, the boundaries in the image are delimited to generate multiple pixel segmentation lines.

[0033] Next, multiple sliding windows are set according to the multiple pixel segmentation lines. The sliding window method predefines a window of a fixed size by a technical expert and slides it step by step along the image to cover different regions of the image. The size and step length of each sliding window are adjusted according to the characteristics of the grain boundaries in the image to ensure that each window can cover the key information in the image. Inside each window, the image will be locally cropped to generate multiple image sub-data.

[0034] After the image segmentation is completed, each image sub-data is traversed and edge detection is performed. The goal of this step is to accurately identify the grain boundary regions in each sub-image. Edge detection usually uses the Sobel operator or the Canny edge detection algorithm to extract edge information by calculating the regions where the pixel intensities in the image change. For each image sub-data, the purpose of edge detection is to detect the regions where the intensity changes significantly in the image, and these regions correspond to the existence of grain boundaries. Through this process, the edges of the grain boundaries are identified and the necessary edge information is provided for subsequent fine-grained annotation.

[0035] Next, according to the accuracy of edge detection, fine-grained annotation is performed on each image sub-data. At this stage, each pixel is marked according to whether it belongs to the grain boundary. Through the accuracy of edge detection, the grain boundary pixels in the image are marked as 1, and the non-grain boundary regions are marked as 0. The process of fine-grained annotation needs to ensure the detection accuracy, that is, only the real grain boundary pixels are marked as 1, while the noise or non-grain boundary regions are accurately marked as 0. This process usually uses pixel-level annotation techniques, such as semantic segmentation or instance segmentation methods, and is accurately calibrated through deep learning models (such as U-Net, FCN, etc.). The model will infer which pixels belong to the grain boundary and which pixels do not belong to the grain boundary based on the known features in the image, so as to generate multiple grain boundary annotation information. Among them, the deep learning models (such as U-Net, FCN, etc.) are pre-trained. When training, a pre-prepared image data set with labels is used for training. The images in these data sets are manually annotated as grain boundary pixels (1) and non-grain boundary regions (0). After training, the deep learning model can annotate each pixel point.

[0036] Finally, map the multiple grain boundary annotation information to the multiple image sub-data for data alignment. Since the image has been segmented into multiple sub-data through a sliding window, and each sub-data contains the annotation information of a local area, therefore, during data alignment, the annotation results in each image sub-data are accurately aligned to the corresponding area of the original image. The process of data alignment ensures that the position of each annotated pixel is consistent with the original, so as to merge the annotation results in all sub-data. The purpose of data alignment is to merge all local annotation results to ensure the accuracy and integrity of grain boundary annotation. Through this step, multiple grain boundary annotation pixel points are finally obtained. Figure 1 Step S400: Connect and merge the multiple grain boundary annotation pixel points, and detect and locate the grain boundary information of the sapphire sample according to the merging result.

[0037] In the embodiment of the present application, the process of connecting and merging multiple grain boundary annotation pixel points includes performing contour extraction on the image based on the grain boundary annotation pixel points, determining the contour parameters of the grain boundary, and using these parameters for detection to identify the connected regions of the grain boundary. Subsequently, by connecting and merging the grain boundary annotation pixel points, a continuous grain boundary region is formed. Based on these continuous regions, calculate the contour area data of the grain boundary, and perform analysis to extract the grain boundary features, and finally determine the grain boundary information of the sapphire sample.

[0038] Further, in the method provided by the embodiment of the application, connecting and merging the multiple grain boundary annotation pixel points, and detecting and locating the grain boundary information of the sapphire sample according to the merging result further includes:

[0039] ​Extract the contours of the multiple image sub - data according to the multiple grain - boundary labeled pixel points, determine the grain - boundary contour parameters, perform detection based on the grain - boundary contour parameters to obtain the grain - boundary connected regions; connect and merge the multiple grain - boundary labeled pixel points according to the grain - boundary contour parameters to obtain the merging result, where the merging result includes continuous grain - boundary regions; calculate based on the continuous grain - boundary regions combined with the grain - boundary contour parameters to generate grain - boundary contour area data; analyze according to the grain - boundary contour area data to determine multiple grain - boundary features, and determine the grain - boundary information of the sapphire sample based on the multiple grain - boundary features.

[0040] In the embodiments of the present application, first, extract the contours of the multiple image sub - data according to the multiple grain - boundary labeled pixel points. In this step, starting from the aforementioned grain - boundary labeled pixel points, use edge - detection algorithms (such as Canny edge detection or Sobel operator) to extract the contours of the grain - boundary regions in the image. The regions where the grain - boundary labeled pixel points are marked as 1 represent grain boundaries. Through contour extraction, the boundaries of these regions are identified, generating the grain - boundary contours in the image. Next, based on the extracted grain - boundary contours, determine the grain - boundary contour parameters, which include geometric features such as the shape, area, and edge length of the grain boundaries.

[0041] Next, based on the extracted grain - boundary contour parameters, perform detection to identify the connected grain - boundary regions in the image. This step is mainly achieved through connected - component analysis, connecting those adjacent labeled pixel points to identify the complete grain - boundary connected regions. In this process, connected - component analysis utilizes the connectivity of pixel points to connect adjacent grain - boundary pixels into larger regions, ensuring the integrity of the grain boundaries.

[0042] Subsequently, according to the grain - boundary contour parameters, connect and merge the multiple grain - boundary labeled pixel points to form a continuous grain - boundary region. Through the merging process of these grain - boundary labeled pixel points, the merging result, that is, a complete and continuous grain - boundary region, is obtained.

[0043] After obtaining the continuous grain - boundary regions, calculate based on these regions and the aforementioned grain - boundary contour parameters to generate grain - boundary contour area data. This step quantifies the size and shape of the grain boundaries by calculating the area, perimeter, and other geometric features of the grain - boundary regions. The grain - boundary contour area data provides important numerical data for analyzing the spatial distribution and morphological characteristics of the grain boundaries.

[0044] After that, analysis is carried out according to the grain boundary contour area data, and multiple grain boundary shape characteristics are determined through geometric analysis, such as the size, shape, and distribution characteristics of the grain boundaries. Then, based on these grain boundary shape characteristics, grain boundary analysis is performed, and effective grain boundary constraint conditions are set to screen out the effective grain boundary regions that meet these conditions from the images. Next, multiple image sub-data are traversed, and multiple effective grain boundary position parameters are determined according to the set constraint conditions. Then, based on these position parameters and grain boundary shape characteristics, region division is carried out to determine multiple grain boundary regions. Finally, by associating and integrating these effective grain boundary regions, the grain boundary information of the sapphire sample is obtained.

[0045] Further, in the method provided by the application embodiment, analysis is carried out according to the grain boundary contour area data to determine multiple grain boundary characteristics, and based on the multiple grain boundary characteristics, the grain boundary information of the sapphire sample is determined, and it further includes: Perform geometric analysis according to the grain boundary contour area data to determine multiple grain boundary shape characteristics; perform grain boundary analysis based on the multiple grain boundary shape characteristics and set effective grain boundary constraint conditions; traverse the multiple image sub-data according to the effective grain boundary constraint conditions for screening to determine multiple effective grain boundary position parameters; perform division based on the multiple effective grain boundary position parameters in combination with the multiple grain boundary shape characteristics to determine multiple effective grain boundary regions; associate and integrate the multiple effective grain boundary regions to obtain the grain boundary information of the sapphire sample.

[0046] In the embodiment of the present application, first, geometric analysis is carried out according to the grain boundary contour area data, and multiple grain boundary shape characteristics are determined by calculating the geometric characteristics (such as area, perimeter, shape factor, etc.) of the grain boundary regions. These characteristics include not only two-dimensional area and perimeter but also three-dimensional geometric characteristics such as the shape, position, and direction of the grain boundaries.

[0047] Next, based on the multiple grain boundary shape characteristics obtained, grain boundary analysis is carried out, and effective grain boundary constraint conditions are set. At this stage, constraint conditions obtained according to the geometric characteristics of the grain boundaries (such as shape, size, smoothness, etc.) are set. First, size constraints are set, for example, stipulating the minimum area or maximum perimeter of the grain boundaries to eliminate the regions that do not meet the requirements. Secondly, by setting shape constraints, such as the shape factor must be within a specific range, those irregular or fragmented grain boundaries are removed. Direction constraints are also set according to application requirements, requiring certain grain boundaries to have specific directions. Through these constraint conditions, the grain boundary regions that meet the requirements are screened out to ensure the accuracy and consistency of the grain boundary data.

[0048] Then, according to the effective grain boundary constraint conditions, traverse multiple image sub-data for screening to determine multiple effective grain boundary position parameters. In this process, the sliding window or block technology is used to check each sub-data in the image one by one to evaluate whether it meets the effective grain boundary constraint conditions. By screening the grain boundary position parameters of each region and recording its spatial position (such as coordinates, directions, etc.), it is ensured that the position of each qualified grain boundary is accurately calibrated. This process can accurately locate and identify the specific position and distribution of grain boundaries in the image. Finally, multiple effective grain boundary position parameters are obtained through this process.

[0049] Next, based on the multiple effective grain boundary position parameters and the multiple grain boundary shape features extracted previously, perform partitioning to determine multiple effective grain boundary regions. To perform the regional partitioning, use clustering analysis (such as K-means), and group the grain boundaries into different regions according to the position and shape features of the grain boundaries. Through this method, we can divide the grain boundaries in the image into multiple different regions according to the spatial distribution and geometric morphology of the grain boundaries, and obtain multiple effective grain boundary regions.

[0050] Finally, associate and integrate multiple effective grain boundary regions to generate the grain boundary information of the complete sapphire sample. In this process, first, through connected component analysis or region merging algorithm, merge adjacent grain boundary regions with similar features into a whole region. Next, through overlap analysis, ensure that there are no duplicate or mis-overlapped parts in the merged region, and ensure the coherence of the grain boundary regions. Finally, integrate all the information of the merged grain boundary regions (including position, shape, area, etc.) to form the final grain boundary information.

[0051] Step S500: Synchronize the grain boundary information to the morphology analysis unit for optimization, update the grain boundary information, and determine the optimized result of grain boundary detection.

[0052] In the embodiment of the present application, during the process of synchronizing the grain boundary information to the morphology analysis unit for optimization, first, identify and remove the pseudo regions in the image through morphological processing, and then generate an update instruction according to the screening result to perform smoothing processing on the grain boundary information to eliminate irregular edges and noise. Then, use the grain boundary smoothing value to enhance the edges of the grain boundary information to make the edges of the grain boundary clearer and more obvious. Finally, through this series of optimization steps, the optimized result of grain boundary detection is obtained.

[0053] Furthermore, in the method provided by the embodiment of the application, synchronizing the grain boundary information to the morphology analysis unit for optimization, updating the grain boundary information, and determining the optimized result of grain boundary detection further includes: Synchronize the grain boundary information to the morphology analysis unit for morphological processing to determine multiple pseudo-regions; screen the grain boundary information according to the multiple pseudo-regions to generate an update instruction, and smooth the grain boundary information through the update instruction to generate a grain boundary smooth value; enhance the edge of the grain boundary information according to the grain boundary smooth value to determine the optimized result of grain boundary detection.

[0054] In the embodiment of the present application, when synchronizing the grain boundary information to the morphology analysis unit for morphological processing, the grain boundary information is first optimized through morphological operations. The morphology analysis unit uses the morphological methods of images and applies common techniques such as erosion, dilation, opening operation, and closing operation to repair and optimize the grain boundaries in the image. Specifically, the dilation operation is used to expand the grain boundary region and repair the gaps in the grain boundary; while the erosion operation is used to remove small noises in the image and repair the irregular regions around the grain boundaries. These morphological processes help to clarify the structure of the grain boundaries and identify the pseudo-regions in the image. Pseudo-regions usually refer to those false grain boundary regions caused by noises, misidentifications, or image defects, and these regions do not represent real grain boundaries. By applying these morphological operations, it is clearly defined which regions are real grain boundaries and which are pseudo-regions caused by noises or misdetections. At this time, the result output by the morphology analysis unit is multiple pseudo-regions, which are the regions in the image that do not conform to the actual grain boundary characteristics.

[0055] Next, screen the grain boundary information according to the multiple pseudo-regions and generate an update instruction. Specifically, by analyzing the pseudo-regions in the image, false positive regions (i.e., regions misdetected as grain boundaries) and false negative regions (i.e., real grain boundary regions missed) are identified. Based on the false positive regions, the image is traversed and matched to generate redundant grain boundary information, and the grain boundary parts that do not meet the requirements are screened out according to this information to obtain the grain boundary screening result. At the same time, based on the false negative regions, the same operation is performed to generate missing grain boundary information, and the grain boundaries in the image are complemented according to this information to obtain the grain boundary complementing result. Finally, the grain boundary screening result and the grain boundary complementing result are integrated to generate a comprehensive update instruction.

[0056] Subsequently, based on the generated update instruction, smooth the grain boundary information. This process mainly uses the mean filtering technique. By calculating the average value of the pixels in the grain boundary region, the fluctuations at the edges are reduced, noises and irregular changes are eliminated, and the grain boundary edges become smoother and more continuous. After smoothing, a grain boundary smooth value is generated, which is used to quantify the smoothness of the grain boundary. The higher the smooth value of the grain boundary, the smoother the edge of the grain boundary and the more coherent the contour; on the contrary, it indicates that there are more irregularities in the grain boundary.

[0057] On this basis, based on the obtained grain boundary smoothing value, edge enhancement is performed. The purpose of edge enhancement is to highlight the grain boundary edges, making them clearer and more prominent for subsequent analysis and positioning. To this end, a gradient enhancement method is adopted, and the edges of the grain boundaries are enhanced by calculating the gradient value of each pixel point. The gradient enhancement method magnifies the brightness change at the grain boundaries by calculating the brightness change rate of each pixel point in the image, improves the contrast of the edges, and makes the grain boundaries more obvious. Based on the grain boundary smoothing value, the edge enhancement process further highlights the already smoothed edges, thus avoiding the problem of edge blurring caused by over-smoothing. Finally, through the edge enhancement based on the grain boundary smoothing value, the grain boundaries are clearer and more prominent in the image, thereby obtaining an optimized result for grain boundary detection.

[0058] Furthermore, in the method provided by the application embodiment, screening the grain boundary information according to the multiple pseudo regions to generate an update instruction further includes: Parsing according to the multiple pseudo regions to generate a false positive region and a false negative region; traversing and matching the grain boundary information based on the false positive region to generate redundant grain boundary information, and screening the grain boundary information according to the redundant grain boundary information to generate a grain boundary screening result; traversing and matching the grain boundary information based on the false negative region to generate missing grain boundary information, and complementing the grain boundary information according to the missing grain boundary information to generate a grain boundary complementing result; integrating the grain boundary screening result and the grain boundary complementing result to construct the update instruction.

[0059] In the embodiment of the present application, first, parsing is performed according to multiple pseudo regions. These pseudo regions refer to false grain boundary regions caused by noise, algorithm errors, or imperfect images. In the image processing process, methods such as threshold segmentation or morphological filtering are used to identify these pseudo regions. Through local analysis of the image, using edge detection algorithms (such as Sobel operator or Canny edge detection) or connected component analysis, the pseudo regions can be effectively distinguished, and these regions are further divided into false positive regions and false negative regions. False positive regions refer to regions misjudged as grain boundaries, usually caused by noise or over-detection in the image, while false negative regions are real grain boundary regions that fail to be detected, usually caused by image blurring or missing information.

[0060] Next, based on the false positive regions, the grain boundary information is traversed and matched, that is, each region in the image is checked one by one, and the false positive regions are removed from the grain boundary information. This process usually uses template matching or region growing algorithms to gradually detect whether there is over-detected grain boundary information in the image. After identifying the redundant grain boundary information, redundant grain boundary information is generated, that is, those parts mislabeled as grain boundaries. Then, morphological denoising operations (such as erosion and dilation) are used to remove the redundant grain boundary regions and obtain the grain boundary screening result.

[0061] Next, based on the false negative regions, the grain boundary information is traversed and matched. This step involves comparing the false negative regions with other parts of the image to find the missing true grain boundaries. The positions of the grain boundaries are speculated using edge detection algorithms (such as Canny edge detection), and the missing regions are filled in using image inpainting techniques (such as interpolation methods or morphological dilation). In this way, the missing grain boundary information, that is, the parts of the grain boundaries that were not correctly detected, is generated. Then, the missing grain boundary data is restored through interpolation completion or morphological filling to obtain the grain boundary completion result.

[0062] Finally, after integrating the grain boundary screening result and the grain boundary completion result, an update instruction is generated. This process integrates the screened and completed grain boundary information through an image merging algorithm (such as image stitching technology). Ultimately, the generated update instruction can guide subsequent processing steps to ensure the accuracy and integrity of the grain boundary information.

[0063] In the embodiments of the present application, in summary, the embodiments of the present application have at least the following technical effects: In the present application, by taking high-resolution photographs of sapphire samples, an image set of sapphire samples is obtained; image preprocessing is performed based on the sapphire sample image set to generate multiple image processing data, the multiple image processing data is traversed for rough detection to determine the initial grain boundary information of the sapphire sample; the multiple image processing data is segmented according to the initial grain boundary information to generate multiple image sub-data, pixel-level annotation is performed based on the multiple image sub-data to obtain multiple grain boundary annotation pixel points; the multiple grain boundary annotation pixel points are connected and merged, and the grain boundary information of the sapphire sample is detected and located according to the merging result; the grain boundary information is synchronized to the morphological analysis unit for optimization to update the grain boundary information and determine the optimized result of grain boundary detection. The present invention solves the technical problems of insufficient detection accuracy, serious noise interference, and incomplete grain boundary recognition in the prior art during the grain boundary detection process. Through high-resolution photography, image preprocessing, pixel-level annotation, and morphological optimization, the technical effects of improving the recognition accuracy of sapphire grain boundary detection and perfecting the grain boundary data are achieved.

[0064] It should be noted that the above sequence of the embodiments of the present application is only for description and does not represent the superiority or inferiority of the embodiments. And the above description of specific embodiments of this specification has been made. The processes depicted in the drawings do not necessarily require the specific order and continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0065] The above are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included within the protection scope of the present application.

[0066] This specification and the accompanying drawings are merely exemplary descriptions of the present application and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalent technologies, the present application is intended to include these changes and modifications.

Claims

1. A method for detecting sapphire grain boundaries, characterized in that, The method includes: Obtaining a sapphire sample image set by performing high-resolution shooting on a sapphire sample; Based on the sapphire sample image set, performing image preprocessing to generate a plurality of image processing data, traversing the plurality of image processing data for rough detection, and determining initial grain boundary information of the sapphire sample; Segmenting the plurality of image processing data according to the initial grain boundary information to generate a plurality of image sub-data, and performing pixel-level annotation according to the plurality of image sub-data to obtain a plurality of grain boundary annotation pixel points; Connecting and merging the plurality of grain boundary annotation pixel points, and detecting and positioning the grain boundary information of the sapphire sample according to the merging result; Synchronizing the grain boundary information to a morphology analysis unit for optimization, updating the grain boundary information, and determining an optimized result of grain boundary detection.

2. The sapphire grain boundary detection method according to claim 1, characterized in that, Based on the sapphire sample image set, performing image preprocessing to generate a plurality of image processing data. The method includes: Reading the sapphire sample image set for frame-by-frame analysis to obtain a plurality of initial image values; Performing image enhancement on the sapphire sample image set according to the plurality of initial image values to obtain a plurality of image equalization values; Performing noise analysis on the sapphire sample image set according to the plurality of image equalization values to determine a plurality of image noise information, and performing denoising filtering on the sapphire sample image set according to the plurality of image noise information to obtain a plurality of image denoising data; Performing grayscale conversion on the sapphire sample image set according to the plurality of image denoising data to determine the plurality of image processing data.

3. The sapphire grain boundary detection method according to claim 1, characterized in that: Traversing the plurality of image processing data for rough detection to determine initial grain boundary information of the sapphire sample. The method includes: Traversing the plurality of image processing data for deep learning, performing image identification on the plurality of image processing data according to the learning result to obtain a plurality of identification data, and the plurality of identification data includes a plurality of crystal region data and a plurality of background region data; Performing rough monitoring based on the plurality of crystal region data and the plurality of background region data to determine a plurality of edge gradient values; Performing edge analysis according to the plurality of edge gradient values to determine a plurality of edge information, and the plurality of edge information includes edge direction information and edge intensity information; Defining the initial grain boundary information of the sapphire sample according to the edge intensity information in combination with the edge direction information.

4. The method for detecting sapphire grain boundaries according to claim 3, wherein Segmenting the plurality of image processing data according to the initial grain boundary information to generate a plurality of image sub-data, and performing pixel-level annotation according to the plurality of image sub-data to obtain a plurality of grain boundary annotation pixel points. The method includes: Performing image analysis on the plurality of image processing data according to the edge direction information according to the edge intensity information to determine a plurality of pixel segmentation lines; Setting a plurality of sliding windows according to the plurality of pixel segmentation lines, and performing image segmentation on the plurality of image processing data through the plurality of sliding windows to generate a plurality of image sub-data; Traversing the plurality of image sub-data for edge detection, and performing fine-grained annotation on the plurality of image sub-data according to the detection accuracy to obtain a plurality of grain boundary annotation information; Mapping the plurality of grain boundary annotation information to the plurality of image sub-data for data alignment to determine the plurality of grain boundary annotation pixel points.

5. The method for detecting the grain boundaries of sapphire according to claim 1, wherein, Connect and merge the multiple grain boundary marked pixel points, and detect and locate the grain boundary information of the sapphire sample according to the merging result. The method includes: Extract the contours of the multiple image sub-data according to the multiple grain boundary marked pixel points, determine the grain boundary contour parameters, and perform detection based on the grain boundary contour parameters to obtain the grain boundary connected region; Connect and merge the multiple grain boundary marked pixel points according to the grain boundary contour parameters to obtain the merging result, and the merging result includes the continuous grain boundary region; Calculate based on the continuous grain boundary region in combination with the grain boundary contour parameters to generate grain boundary contour area data; Analyze according to the grain boundary contour area data to determine multiple grain boundary features, and determine the grain boundary information of the sapphire sample based on the multiple grain boundary features.

6. The method for detecting grain boundaries of sapphire according to claim 5, wherein Analyze according to the grain boundary contour area data to determine multiple grain boundary features, and determine the grain boundary information of the sapphire sample based on the multiple grain boundary features. The method includes: Perform geometric analysis according to the grain boundary contour area data to determine multiple grain boundary shape features; Perform grain boundary analysis based on the multiple grain boundary shape features and set effective grain boundary constraint conditions; Traverse and screen the multiple image sub-data according to the effective grain boundary constraint conditions to determine multiple effective grain boundary position parameters; Divide based on the multiple effective grain boundary position parameters in combination with the multiple grain boundary shape features to determine multiple effective grain boundary regions; Associate and integrate the multiple effective grain boundary regions to obtain the grain boundary information of the sapphire sample.

7. The sapphire grain boundary detection method according to claim 1, wherein Synchronize the grain boundary information to the morphology analysis unit for optimization, update the grain boundary information, and determine the optimized result of grain boundary detection. The method includes: Synchronize the grain boundary information to the morphology analysis unit for morphological processing to determine multiple pseudo regions; Screen the grain boundary information according to the multiple pseudo regions to generate an update instruction, and perform smoothing processing on the grain boundary information through the update instruction to generate a grain boundary smoothing value; Perform edge enhancement on the grain boundary information according to the grain boundary smoothing value to determine the optimized result of grain boundary detection.

8. The method for detecting sapphire grain boundaries according to claim 7, wherein Screen the grain boundary information according to the multiple pseudo regions to generate an update instruction. The method includes: Analyze according to the multiple pseudo regions to generate false positive regions and false negative regions; Traverse and match the grain boundary information based on the false positive regions to generate redundant grain boundary information, and screen the grain boundary information according to the redundant grain boundary information to generate a grain boundary screening result; Traverse and match the grain boundary information based on the false negative regions to generate missing grain boundary information, and complete the grain boundary information according to the missing grain boundary information to generate a grain boundary completion result; Integrate the grain boundary screening result and the grain boundary completion result to construct the update instruction.