Image enhancement method for VCSEL epitaxial wafer detection
By constructing a weighted histogram and determining the optimal segmentation threshold, the BBHE algorithm was improved, which solved the problem of insufficient contrast enhancement for small defects in VCSEL epitaxial wafer detection and improved detection accuracy.
Patent Information
- Application Number
- CN202511529533.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-10-24
AI Technical Summary
The existing dual histogram equalization (BBHE) algorithm has limited effect on improving the contrast of small defects in VCSEL epitaxial wafer inspection because it uses gray-level mean to segment the histogram. This results in missed defects.
By obtaining the local standard deviation, global standard deviation, local mean, and structural tensor feature values of pixels, a weighted histogram is constructed. Image enhancement is performed using the significant value of defects, and the optimal segmentation threshold is determined by finding the energy median point, thus improving the BBHE algorithm.
It significantly improves the contrast of minute defects, increases the accuracy of defect detection, and provides a high-quality image foundation for subsequent epitaxial wafer inspection.
Smart Images

Figure CN120997109B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image enhancement. More particularly, the present application relates to an image enhancement method for VCSEL epitaxial wafer detection. BACKGROUND
[0002] As the core component of optical communication, 3D sensing, laser radar and other frontier technologies, the performance and reliability of vertical cavity surface emitting laser (VCSEL) directly depend on the manufacturing quality of its basic material epitaxial wafer. During the growth and subsequent processing of the epitaxial wafer, various microscopic defects such as dislocations and black spots will inevitably be introduced. These defects are small in size and vary in shape, which seriously affect the yield and long-term stability of VCSEL chips. Therefore, it is crucial to accurately and efficiently detect the epitaxial wafer automatically.
[0003] Currently, the automatic optical inspection system based on machine vision is the mainstream technology for epitaxial wafer detection. The detection system acquires the surface image of the epitaxial wafer and then uses image processing algorithms to identify potential defects in the epitaxial wafer. As the first step of defect recognition, the effect of image enhancement directly determines the effect of subsequent detection. Bi-Histogram Equalization (BBHE) is a commonly used image contrast enhancement technique. This technique usually takes the mean value of the image gray scale as the segmentation point, divides the gray scale histogram into two parts, and then performs equalization processing on the two sub-histograms, thereby improving the overall visual effect of the image. Figure One
[0004] However, the defects in the VCSEL epitaxial wafer image are very small and occupy a very low proportion of pixels. The gray scale information of weak defects has little effect on the global gray scale mean value. Therefore, using the mean value as the segmentation point for the BBHE algorithm often divides these key defect pixels and background pixels into the same sub-histogram. When equalizing this sub-histogram mixed with a large amount of background information, the limited gray scale range is mainly allocated to the dominant background pixels, while the contrast enhancement effect of the defect pixels that need to be enhanced is limited, resulting in insufficiently prominent defects after enhancement, which further leads to missed detection of epitaxial wafer defects in the subsequent epitaxial wafer defect recognition step. SUMMARY
[0005] To address the technical problem that the BBHE algorithm, which uses the gray-level mean of the image for gray-level histogram segmentation, has limited effect on enhancing epitaxial wafer images, this invention provides an image enhancement method for VCSEL epitaxial wafer detection. The method includes: taking any pixel in the image to be enhanced as the target pixel, obtaining a first discrimination index of the target pixel based on its local standard deviation, global standard deviation, and the difference between the gray-level value of the target pixel and its local mean; the local standard deviation is the standard deviation of the gray-level values of the target pixel's neighboring pixels; the global standard deviation is the standard deviation of the gray-level values of all pixels in the image to be enhanced; the local mean is the mean of the gray-level values of the target pixel's neighboring pixels; and obtaining a first discrimination index of the target pixel based on its first standard deviation, global standard deviation, and the difference between the gray-level value of the target pixel and its local mean. The second discrimination of the target pixel is obtained by comparing the difference between the discrimination and the mean of the first discrimination of pixels in the row where the target pixel is located, and the first discrimination of the target pixel. The defect significance value of the target pixel is obtained based on the difference between two feature values obtained from the target pixel's structure tensor and the second discrimination. The weighted values of all pixels corresponding to each gray level in the image to be enhanced are accumulated, and a weighted histogram is obtained based on the accumulation result. The weighted values are positively correlated with the defect significance value. The cumulative sum of the column heights corresponding to all gray levels between each gray level and the first gray level in the weighted histogram is obtained, and a segmentation threshold is obtained based on the cumulative sum of the column heights corresponding to the gray levels. The BBHE algorithm is used to enhance the image to be enhanced based on the segmentation threshold.
[0006] This invention obtains defect saliency values that can effectively distinguish defects, background, and stripe interference by comprehensively analyzing the local and global grayscale information and structure tensor of pixels. A weighted histogram is then constructed based on these defect saliency values, allowing statistically minority defect pixels to receive higher weights in the histogram, thereby strengthening their impact on image enhancement. Finally, the optimal segmentation threshold is determined by finding the median energy point of the weighted histogram. This ensures that the segmentation threshold is based on the true defect saliency information in the image, rather than a simple pixel count, solving the problem of defect information being obscured by the background in traditional methods. This enables the image enhancement algorithm to significantly improve the contrast of minute defects, providing a high-quality image foundation for subsequent defect detection.
[0007] Preferably, the first discrimination index satisfies the following relationship: In the formula, For the first in the image to be enhanced The first distinguishing factor of each pixel For the first in the image to be enhanced The grayscale value of each pixel For the first in the image to be enhanced Local mean of each pixel For the first in the image to be enhanced Local standard deviation of each pixel The global standard deviation of the image to be enhanced. It is a linear normalization function.
[0008] This invention combines the grayscale difference between a pixel and its local mean and the ratio of the local standard deviation to the global standard deviation, which can more comprehensively quantify the degree of abnormality of a pixel in its neighborhood. It integrates the prominence of local details and the prominence of details in the global context, thus more accurately identifying potential defect areas than single feature judgment, making image enhancement more targeted.
[0009] Preferably, the second discrimination index satisfies the following relationship: In the formula, For the first in the image to be enhanced The second distinguishing factor of each pixel For the first in the image to be enhanced The first distinguishing factor of each pixel For the first in the image to be enhanced The mean of the first discrimination of all pixels in the row containing the given pixel. This is a correction factor.
[0010] This invention introduces the average first discrimination value of the row containing the pixel to correct the first discrimination value. Considering that VCSEL epitaxial film images generally have lateral stripe interference, these stripes can also produce high first discrimination values locally, which can be easily confused with defects. By comparing the first discrimination value of a single pixel with the average first discrimination value of its row, the interference of this regular stripe structure on the image enhancement process can be effectively suppressed, reducing stripe interference and improving the targeting of image enhancement.
[0011] Preferably, the significant value of the defect satisfies the following relationship: In the formula, For the first in the image to be enhanced The significant value of defects per pixel, For the first in the image to be enhanced The second distinguishing factor of each pixel For the first in the image to be enhanced The larger of the two feature values of a pixel. For the first in the image to be enhanced The smaller of the two feature values of a pixel To prevent division by zero parameters.
[0012] This invention integrates a second discrimination factor and two eigenvalues obtained through the structural tensor. It utilizes the difference in eigenvalues of the structural tensor to characterize the directional characteristics of grayscale changes. By combining this characteristic with the second discrimination factor, it is possible to further distinguish between irregularly shaped defects and stripe structures with obvious directions, making the enhancement of defect locations more targeted and resulting in better image enhancement effects.
[0013] Preferably, obtaining the weighted histogram based on the accumulated results includes: sorting the accumulated weighted values of all pixels corresponding to each gray level in ascending order of gray level to obtain the weighted histogram.
[0014] Preferably, the method for obtaining the weighted value includes: presetting a histogram weighting factor, and adding 1 to the result of multiplying the defect significance value by the histogram weighting factor to obtain the weighted value.
[0015] Preferably, the column height of each gray level in the weighted histogram satisfies the following relationship: In the formula, For the weighted histogram, the first A column height of one gray level, The grayscale value in the image to be enhanced is The The significant value of defects per pixel, The grayscale value in the image to be enhanced is The number of pixels, The weighting factor for the histogram.
[0016] Preferably, the step of obtaining the segmentation threshold based on the cumulative sum of the column heights corresponding to gray levels includes: obtaining the sum of the column heights of all gray levels in the weighted histogram, and taking half of the sum of the column heights of all gray levels as the median of significant energy; obtaining the cumulative sum of the column heights corresponding to all gray levels between each gray level and the first gray level in the weighted histogram, taking the difference between the cumulative sum and the median of significant energy as the energy difference, and taking the value corresponding to the gray level with the smallest energy difference as the segmentation threshold.
[0017] Preferably, the energy difference satisfies the following relationship: In the formula, For the weighted histogram, the first The energy difference of each gray level For the weighted histogram, the first A column height of one gray level, It represents a significant energy median.
[0018] The present application determines the segmentation threshold by a significant energy median, unlike the prior art method using the gray mean or median, by finding a gray level that can equally divide the total energy of the weighted histogram as the threshold, ensuring that the two sub-histograms after segmentation are balanced in defect saliency. Thus, the subsequent BBHE enhancement can more specifically enhance the contrast of defects and background.
[0019] Preferably, the image enhancement of the to-be-enhanced image based on the segmentation threshold using the BBHE algorithm comprises: segmenting the gray histogram of the to-be-enhanced image using the segmentation threshold, dividing the gray histogram into two parts, and then using the prior art implementation of the BBHE algorithm to perform image enhancement on the to-be-enhanced image.
[0020] The present application has the beneficial effect that: for the problem that the micro-defects in the VCSEL epitaxial wafer image are difficult to enhance, the method of segmenting the gray histogram using the gray mean of the traditional BBHE algorithm is improved. The defect saliency of each pixel is calculated by fusing the local, global and structure tensor features of the pixel, and the weighted histogram is constructed based on the defect saliency, which amplifies the weight of the defect information in the histogram; by finding the energy median point of the weighted histogram as the optimal segmentation threshold, it is ensured that the histogram segmentation is based on the real defect information, thereby improving the contrast of the micro-defects and improving the detection accuracy, providing a better image basis for the defect detection of the epitaxial wafer. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 is a flow chart schematically showing an image enhancement method for VCSEL epitaxial wafer detection in the present application;
[0022] Figure 2 is an epitaxial wafer image in the present application;
[0023] Figure 3 is an epitaxial wafer image after image enhancement in the present application. DETAILED DESCRIPTION
[0024] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0025] The specific embodiments of the present application will be described in detail below with reference to the drawings.
[0026] The embodiments of the present application disclose an image enhancement method for VCSEL epitaxial wafer detection, referring to Figure 1, comprising steps S1 to S7:
[0027] S1, collect an epitaxial wafer image and perform image preprocessing.
[0028] Since random noise is inevitably introduced during image acquisition, affecting subsequent enhancement of the epitaxial wafer image, the present application collects an epitaxial wafer image, performs grayscale processing on the epitaxial wafer image to obtain a grayscale image of the epitaxial wafer image, and pre-processes the grayscale image through a filtering algorithm, taking the pre-processed grayscale image as a to-be-enhanced image, and performing subsequent processing on the to-be-enhanced image.
[0029] Illustratively, the filtering algorithm is a bilateral filtering algorithm.
[0030] S2, obtain a first discriminant by the grayscale variation in the neighborhood range of the pixel points in the to-be-enhanced image.
[0031] It should be noted that there is a certain difference between the defect position and the non-defect position in the epitaxial wafer image in vision, so there is a certain grayscale difference between the defect position and the non-defect position in the epitaxial wafer image. In order to distinguish the defect part in the epitaxial wafer image and better enhance the epitaxial wafer image, the present application obtains a first discriminant by the grayscale variation in the neighborhood range of the pixel points in the to-be-enhanced image.
[0032] Specifically, taking any pixel point in the to-be-enhanced image as a target pixel point, taking the target pixel point as the center, the pixel range is the neighborhood range of the target pixel point, the pixel points in the neighborhood range are the neighborhood pixel points of the target pixel point, the mean and standard deviation of the neighborhood pixel point grayscale values of the target pixel point are obtained, the mean of the neighborhood pixel point grayscale values of the target pixel point is taken as a local mean, the standard deviation of the neighborhood pixel point grayscale values of the target pixel point is taken as a local standard deviation, the standard deviation of the grayscale values of all pixel points in the to-be-enhanced image is taken as a global standard deviation, and the first discriminant of the target pixel point is obtained according to the local standard deviation of the target pixel point, the global standard deviation, and the difference between the grayscale value of the target pixel point and the local mean.
[0033] Illustratively, 7.
[0034] Specifically, the first discriminant satisfies the relationship:
[0035] ;
[0036] In the formula, is the first discriminant of the i-th pixel point in the to-be-enhanced image, is the grayscale value of the i-th pixel point in the to-be-enhanced image, is the first discriminant of the i-th pixel point in the to-be-enhanced image, is the grayscale value of the i-th pixel point in the to-be-enhanced image, For the first in the image to be enhanced Local mean of each pixel For the first in the image to be enhanced Local standard deviation of each pixel The global standard deviation of the image to be enhanced. It is a linear normalization function.
[0037] in, Representing the The degree of dispersion of grayscale distribution within the neighborhood of a pixel. The larger the number, the more likely it is to be the first. The greater the grayscale difference between the neighboring pixels of the nth pixel, the greater the grayscale difference between the nth and nth pixels. The greater the first distinguishability of each pixel; The smaller the number, the more likely it is to be the first The smaller the grayscale difference between the neighboring pixels of the nth pixel, the better. The smaller the first distinguishability of each pixel.
[0038] Representing the Gray-level differences within the neighborhood of a pixel The larger the number, the more likely it is to be the first. The pixel and the The greater the difference between the neighboring pixels of the nth pixel, the greater the difference between the nth and nth pixels. The easier it is to distinguish the first pixel, the more distinguishable the second pixel becomes. The greater the first distinguishability of each pixel; The smaller the number, the more likely it is to be the first The pixel and the The smaller the difference between the neighboring pixels of the nth pixel, the better. The more difficult it is to distinguish a pixel, the more difficult it is to distinguish the first pixel. The smaller the first distinguishability of each pixel.
[0039] S3. Obtain the second discrimination based on the first discrimination of the pixel and the first discrimination of the pixels in the row where the pixel is located.
[0040] It should be noted that, as Figure 2 As shown, this is an epitaxial wafer image in the present invention. The epitaxial wafer image contains certain stripe structures. Therefore, not only will the pixels at the defect location have different gray values from the surrounding pixels, but there will also be certain gray value differences at the boundaries between stripe structures. In order to avoid the gray value differences at the stripe structures in the epitaxial wafer image from interfering with subsequent image enhancement, the present invention obtains a second discrimination degree based on the first discrimination degree of the pixel and the first discrimination degree of the pixels in the row where the pixel is located.
[0041] Specifically, the mean of the first discrimination of all pixels in the row containing the target pixel is obtained, and the second discrimination of the target pixel is obtained based on the difference between the first discrimination of the target pixel and the mean of the first discrimination of all pixels in the row containing the target pixel, and the first discrimination of the target pixel.
[0042] Specifically, the second discrimination degree satisfies the following relation:
[0043] ;
[0044] In the formula, For the first in the image to be enhanced The second distinguishing factor of each pixel For the first in the image to be enhanced The first distinguishing factor of each pixel For the first in the image to be enhanced The mean of the first discrimination of all pixels in the row containing the given pixel. To correct the coefficient, in this embodiment The value is 2, and implementers can choose a value greater than 1 as a correction coefficient based on the actual situation.
[0045] in, Representing the The pixel and the The difference in the first discriminant metric among all pixels in the same row of a given pixel is considered. Due to the horizontal stripe structure in the epitaxial image, the first discriminant metric of a pixel should generally be similar to that of the pixels in its row. To avoid the influence of the stripe structure of the epitaxial image on image enhancement, [further measures are taken]. right Perform downward correction to obtain the second discrimination; the difference between the first discrimination of a pixel and the first discrimination of the pixels in its row. The smaller, The larger, the more The difference between a pixel and its neighboring pixels is more likely to be due to the stripe structure of the epitaxial image, and should be addressed accordingly. The greater the downward correction force, the smaller the second distinction of the pixels at the stripe structure of the epitaxial film image; When it is larger, The smaller, the first The greater the difference between a pixel and its neighboring pixels, the more likely it is to be caused by defects in the epitaxial wafer. This should be addressed... The smaller the downward correction force, the less likely it is to overcorrect the first discrimination of pixels at epitaxial defects in the image, which would affect subsequent image enhancement.
[0046] It needs to be further explained that, The value range is from 0 to 1. is greater than 1, in the exponential function, when the base is greater than 0 and less than 1, and the index is greater than 1, the index plays a downward correction role to the base.
[0047] S4, the feature value of the pixel point is obtained, and the defect saliency value of the pixel point is obtained according to the second discriminant of the pixel point and the feature value.
[0048] It should be noted that the stripe structure in the epitaxial wafer image has a single direction in the horizontal direction, so the gray level change of the pixel point at the boundary between the stripe structures is usually only in a single direction (vertically downward or vertically upward), and the defect of the epitaxial wafer can be in any form, and the gray level change direction of the pixel point at the defect of the epitaxial wafer in the image is arbitrary. The feature value obtained by the pixel point structure tensor can reflect whether the gray level direction change of the pixel point is single, so the present application obtains the defect saliency value of the pixel point according to the second discriminant of the pixel point and the feature value.
[0049] Specifically, the gradient of each pixel point in the image is obtained by the Sobel operator, the structure tensor of the pixel point is obtained according to the gradient of each pixel point, the two feature values corresponding to the pixel point are obtained by performing feature decomposition on the structure tensor of the pixel point, and the defect saliency value of the pixel point is obtained according to the difference between the two feature values of the pixel point and the second discriminant.
[0050] It should be noted that the structure tensor is obtained by the gradient of the pixel point, and the two feature values of the pixel point are obtained by the structure tensor, which is prior art and will not be described here.
[0051] Specifically, the defect saliency value satisfies the relationship:
[0052] ;
[0053] In the formula, is the defect saliency value of the i-th pixel point in the image to be enhanced, is the second discriminant of the i-th pixel point in the image to be enhanced, is the larger value of the two feature values of the i-th pixel point in the image to be enhanced, is the smaller value of the two feature values of the i-th pixel point in the image to be enhanced, is a parameter to prevent division by zero, in the present embodiment , the value of can be adjusted by the implementer according to the actual situation. , the larger the , the larger the , the larger the
[0054] , the larger the , the larger the , the larger the The more likely the grayscale change of a pixel is to be oriented in only one direction, the more likely the grayscale change of the i-th pixel is to be oriented in only one direction. The more likely a pixel is to be located at the boundary between epitaxial stripe structures in the image, the more likely the 1st pixel should be... The smaller the defect significance value of each pixel, the more effective the reduction of the influence of the stripe structure in the epitaxial wafer image on subsequent image enhancement. The smaller the value, the higher the value of the first element in the image to be enhanced. The more likely the grayscale change of a pixel is to change in more than one direction, the more likely the grayscale change of the th pixel is to change in more than one direction. The more likely a pixel is not located at the boundary between epitaxial stripe structures in the image, the more likely the 1st pixel should be made to be... The larger the defect significance value of the first pixel, the better the improvement of the first pixel. The influence of each pixel on the subsequent image enhancement process is analyzed to achieve better enhancement of the epitaxial wafer image. For ease of calculation, this is done by... Divide by The way to Normalization was performed.
[0055] Second Discrimination This reflects the grayscale variation of a pixel within its row. The larger the value, the higher the value of the first element in the image to be enhanced. The more likely a pixel is to be located at a grayscale change point outside the boundary between stripe structures in the epitaxial image, the more likely it is to be a pixel at that point. The higher the probability that the nth pixel is located at an epitaxial wafer defect, the higher the probability that the nth pixel in the image to be enhanced will be. The larger the defect value of a pixel, the greater its significance. The smaller the value, the more likely it is that the first element in the image to be enhanced is... The more likely a pixel is to be at a defect-free location, such as the boundary between stripe structures in the epitaxial image, the better the image to be enhanced will be. The smaller the defect significance value of each pixel, the better.
[0056] S5. Construct a weighted histogram based on the defect significance values of the pixels.
[0057] It should be noted that in existing BBHE algorithms, the histogram statistics are applied equally to all pixels. Each pixel is represented by a bar with a cumulative gray level value of 1. For example, if there are 10 pixels with a gray level value of 100 in an image, the bar corresponding to gray level value 100 in the histogram will be 10. This means that the vast majority of non-defective pixels in the image dominate the shape of the histogram. Therefore, the existing BBHE algorithm has limited image enhancement effects. To better enhance epitaxial wafer images, this invention constructs a weighted histogram based on the defect significance value of each pixel.
[0058] Specifically, the weighted value of each pixel is obtained based on the defect significance value of each pixel in the image to be enhanced. The weighted values of all pixels corresponding to each gray level in the image to be enhanced are accumulated, and the accumulated results are arranged in ascending order of gray level to obtain a weighted histogram.
[0059] For example, there are 10 pixels with a gray value of 100 in the image to be enhanced. The weighted values of these 10 pixels are (1.2, 1.3, 1.2, 1.4, 1.1, 1.5, 1.2, 1.3, 1.2, 1.4). Then the height of the bar at gray level 100 in the weighted histogram is 1.2+1.3+1.2+1.4+1.1+1.5+1.2+1.3+1.2+1.4=12.8.
[0060] Specifically, the column height of each gray level in the weighted histogram satisfies the following relationship:
[0061] ;
[0062] In the formula, For the weighted histogram, the first A column height of one gray level, The grayscale value in the image to be enhanced is The The significant value of defects per pixel, The grayscale value in the image to be enhanced is The number of pixels, In this embodiment, the weighting factor is the histogram weighting factor. The weighting factor is set to 2, and the implementers can adjust the size of the weighting factor according to the actual situation.
[0063] Where 1 represents the basic weighting value of a pixel. Since the BBHE algorithm calculates the histogram by accumulating one unit of bar height for each pixel, 1 is used as the basic weighting value. For the first image to be enhanced The corresponding gray level is the th The weighted value of each pixel, The larger the value, the higher the value of the image. The corresponding gray level is the th The more likely a pixel is to correspond to a defect in the epitaxial wafer, the larger the weighting value of the pixel should be, so that the pixel corresponding to the defect in the epitaxial wafer has a greater influence on the weighted histogram, making it easier to enhance the image features of the defect in the epitaxial wafer when performing image enhancement. The smaller the value, the higher the value in the image. The corresponding gray level is the th The more likely a pixel is to correspond to a defect-free area of the epitaxial wafer, the smaller its weighting value should be. This would minimize the influence of defect-free pixels on the weighted histogram of the epitaxial wafer image, thereby reducing the impact of defect-free pixels on the enhancement of the epitaxial wafer image.
[0064] S6. Obtain the segmentation threshold based on the weighted histogram.
[0065] It should be noted that current techniques for the BBHE algorithm only use the mean gray level of the image as the segmentation point, and then calculate the gray level histogram. Figure One The image enhancement is divided into two parts, which lacks targeted enhancement of the epitaxial wafer image. In order to better enhance the epitaxial wafer image, this invention obtains the segmentation threshold based on the weighted histogram.
[0066] Specifically, the sum of the heights of all gray levels in the weighted histogram is obtained, and half of the sum of the heights of all gray levels is taken as the median of the significant energy. Any gray level in the weighted histogram is taken as the target gray level, and the cumulative sum of the heights of all gray levels corresponding to the target gray level and the first gray level (including the target gray level and the first gray level) is obtained. This cumulative sum is taken as the significant energy value of the target gray level, and the difference between the significant energy value of the target gray level and the median of the significant energy is taken as the energy difference of the target gray level. The value corresponding to the gray level with the smallest energy difference is taken as the segmentation threshold of the weighted histogram.
[0067] For example, the column height corresponding to gray level 0 is 10, the column height corresponding to gray level 1 is 15, the column height corresponding to gray level 2 is 20, and the median significant energy is 100. The difference between the sum of the column heights corresponding to gray level 0 and gray level 1 and the median significant energy is obtained to get the energy difference of gray level 1. This value is... The difference between the sum of the column heights corresponding to gray level 0, gray level 1, and gray level 2, and the median significant energy, is obtained to determine the energy difference for gray level 2. This value is... This process is repeated to obtain the energy difference for each gray level, and the value corresponding to the gray level with the smallest energy difference is used as the segmentation threshold. If the energy difference for gray level 150 is the smallest, then the segmentation threshold is 150.
[0068] Specifically, the energy difference satisfies the following relationship:
[0069] ;
[0070] In the formula, For the weighted histogram, the first The energy difference of each gray level For the weighted histogram, the first A column height of one gray level, It represents a significant energy median.
[0071] Wherein, the significant energy median representing half of the sum of the heights of all columns in the weighted histogram, is the sum of the heights of the columns corresponding to all the gray levels before the th gray level, The smaller the energy difference is, the more likely it is to divide the weighted histogram into two parts with equal sum of column heights by taking the value corresponding to the th gray level as the threshold, so that the energy of the defect region and the background region is balanced in the image enhancement process, and the defect part of the epitaxial wafer can be effectively enhanced regardless of which part the gray level corresponding to the epitaxial wafer defect corresponds to, thereby improving the pertinence of the enhancement effect. The larger the energy difference is, the more likely it is not to divide the weighted histogram into two parts with equal sum of column heights by taking the value corresponding to the th gray level as the threshold, so that the enhancement effect of the epitaxial wafer defect is limited if the epitaxial wafer defect corresponds to the part with smaller sum of column heights, thereby deteriorating the enhancement effect. Therefore, the energy difference is calculated, and the value corresponding to the gray level with the smallest energy difference is taken as the threshold.
[0072] S7, performing image enhancement on the to-be-enhanced image by the threshold, and performing epitaxial wafer defect detection by the enhanced image.
[0073] Specifically, the gray level histogram of the to-be-enhanced image is obtained, the gray level histogram of the to-be-enhanced image is divided by using the threshold through the BBHE algorithm, and the to-be-enhanced image is enhanced by using the existing technology of the BBHE algorithm; the epitaxial wafer image after image enhancement is taken as an input image for epitaxial wafer defect detection to perform epitaxial wafer defect detection.
[0074] Schematically, Figure 3 is the epitaxial wafer image after image enhancement in the present application, and the epitaxial wafer image after enhancement in the present application has higher contrast. Epitaxial wafer defect detection by the epitaxial wafer image after enhancement can more accurately identify the defects of the epitaxial wafer.
Claims
1. An image enhancement method for VCSEL epitaxial wafer detection, characterized in that, The method comprises the following steps: Taking any pixel point in the image to be enhanced as a target pixel point, a first discriminant of the target pixel point is obtained according to a local standard deviation of the target pixel point, a global standard deviation of the target pixel point, and a difference between a gray value of the target pixel point and a local mean value; the local standard deviation is a standard deviation of gray values of neighborhood pixel points of the target pixel point; the global standard deviation is a standard deviation of gray values of all pixel points in the image to be enhanced; and the local mean value is a mean value of gray values of the neighborhood pixel points of the target pixel point; A second discriminant of the target pixel point is obtained according to a difference between the first discriminant of the target pixel point and a mean value of first discriminants of pixel points in a row where the target pixel point is located, and the first discriminant of the target pixel point; and a defect saliency value of the target pixel point is obtained according to a difference between two eigenvalues obtained from a structure tensor of the target pixel point, and the second discriminant; Weighted values of all pixel points corresponding to each gray level in the image to be enhanced are accumulated, and a weighted histogram is obtained according to an accumulation result; the weighted values are positively correlated with the defect saliency value; a cumulative sum of column heights corresponding to all gray levels between each gray level and a first gray level in the weighted histogram is obtained, and a segmentation threshold is obtained according to the cumulative sum of the column heights corresponding to the gray levels; The image to be enhanced is subjected to image enhancement by using a BBHE algorithm based on the segmentation threshold.
2. The image enhancement method for VCSEL epitaxial wafer detection according to claim 1, characterized in that, The first discriminant satisfies a relationship formula: ; In the formula, is the first contrast of the first pixel point in the image to be enhanced, is the gray value of the first pixel point in the image to be enhanced, is the local mean value of the first pixel point in the image to be enhanced, is the local standard deviation of the first pixel point in the image to be enhanced, is the global standard deviation of the image to be enhanced, is a linear normalization function. 3. The image enhancement method for VCSEL epitaxial wafer detection according to claim 1, characterized in that, The second discriminant satisfies a relationship formula: ; In the formula, is the second discriminant of the pixel point at the th row and the th column in the image to be enhanced, is the first discriminant of the pixel point at the th row and the th column in the image to be enhanced, is the average of the first discriminants of all pixel points in the row where the pixel point at the th row and the th column in the image to be enhanced is located, and is the correction coefficient.
4. The image enhancement method for VCSEL epitaxial wafer detection according to claim 1, characterized in that, The defect saliency value satisfies a relationship formula: ; wherein, is a defect saliency value of a pixel point in the image to be enhanced, is a second discriminant of a pixel point in the image to be enhanced, is a first discriminant of a pixel point in the image to be enhanced, is a larger value of two feature values of a pixel point in the image to be enhanced, is a smaller value of two feature values of a pixel point in the image to be enhanced, is a larger value of two feature values of a pixel point in the image to be enhanced, is a smaller value of two feature values of a pixel point in the image to be enhanced, is a smaller value of two feature values of a pixel point in the image to be enhanced, is a parameter for preventing division by zero.
5. The image enhancement method for VCSEL epitaxial wafer detection according to claim 1, characterized in that, The weighted histogram obtained according to the accumulation result comprises the following steps: the accumulation result of the weighted values of all pixel points corresponding to each gray level is sorted according to the gray levels from small to large, and the weighted histogram is obtained.
6. The image enhancement method for VCSEL epitaxial wafer detection according to claim 1 or 5, characterized in that, The weighted values are obtained in the following manner: a histogram weighting factor is preset, a result of multiplying the defect saliency value by the histogram weighting factor is added by 1 to obtain the weighted values.
7. The image enhancement method for VCSEL epitaxial wafer detection according to claim 1, wherein, Column heights of the gray levels in the weighted histogram satisfy a relationship formula: ; In the formula, is the column height of the i-th gray level in the weighted histogram, is the defect saliency value of the i-th pixel point with a gray value of in the image to be enhanced, is the number of pixel points with a gray value of in the image to be enhanced, is the histogram weighting factor. 8. The image enhancement method for VCSEL epitaxial wafer detection according to claim 1, wherein, The segmentation threshold is obtained according to the cumulative sum of the column heights corresponding to the gray levels, comprising the following steps: a sum of column heights of all gray levels in the weighted histogram is obtained, a half of the sum of the column heights of all the gray levels is taken as a salient energy median value; a cumulative sum of column heights corresponding to all gray levels between each gray level and the first gray level in the weighted histogram is obtained, a difference between the cumulative sum and the salient energy median value is taken as an energy difference, and a value corresponding to a gray level with the minimum energy difference is taken as the segmentation threshold.
9. The image enhancement method for VCSEL epitaxial wafer detection according to claim 8, characterized in that, The energy difference satisfies a relationship formula: ; wherein is the energy difference of the gray level in the weighted histogram, is the column height of the gray level in the weighted histogram, is the median of the significant energy.
10. The image enhancement method for VCSEL epitaxial wafer detection according to claim 1, wherein, The image to be enhanced is subjected to image enhancement by using the BBHE algorithm based on the segmentation threshold, comprising the following steps: the gray histogram of the image to be enhanced is segmented by using the segmentation threshold, the gray histogram is divided into two parts, and the image to be enhanced is subjected to image enhancement by using an existing technology of the BBHE algorithm.
Citation Information
Patent Citations
Method and apparatus for image enhancement
CN109146826A
Image enhancement method based on image intensity threshold value and self-adaptive cutting
CN110852955A