Method and device for detecting periodic cell width, equipment and storage medium

By using correlation coefficient distribution information in the wafer array area to detect peak points and calculate the horizontal coordinate difference between adjacent peak points, the automatic detection of periodic cell width is achieved, which solves the problem of large fluctuations in the measurement results in the prior art, and improves the accuracy and efficiency of detection.

CN120047373APending Publication Date: 2025-05-27SKYVERSE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311532008.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-16
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In the prior art, the measurement of periodic cell width in the wafer array region mainly relies on manual measurement, resulting in large fluctuations in the measurement results and poor operational convenience, making it difficult to accurately detect defects in the array region.

Method used

By determining the reference area and detection window in the image to be tested, scanning and calculating the correlation coefficient between each pixel in the image width direction and the pixel in the reference area, obtaining correlation coefficient distribution information, detecting peak points, and calculating the horizontal coordinate difference between adjacent peak points to obtain the width of the periodic cell.

Benefits of technology

Automatic detection of periodic cell width is realized, which improves the accuracy and efficiency of measurement and reduces the error of manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120047373A_ABST
    Figure CN120047373A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for detecting the width of a periodic cell, equipment and a storage medium, and the method comprises the steps: determining a reference region in a to-be-detected image, and determining a detection window according to the reference region; the height of the reference area is the same as that of the to-be-detected image, the width of the reference area is smaller than that of the to-be-detected image, and the detection window and the reference area have the same size; scanning the to-be-detected image along the width direction of the to-be-detected image by using the detection window, and for each area scanned by the detection window, calculating correlation coefficients of pixels in the area and pixels in the reference area to obtain correlation coefficient distribution information of the to-be-detected image; the correlation coefficient distribution information represents the change rule of the correlation coefficient along with the abscissa of the to-be-detected image; detecting a peak point of the correlation coefficient distribution information; and obtaining the width of the periodic cells in the to-be-detected image according to horizontal coordinates corresponding to adjacent peak points in the correlation coefficient distribution information.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Technology Neighborhood

[0002] The present application belongs to the field of sample detection technology, and in particular, relates to a method, device, equipment and storage medium for detecting periodic cell width. Background Art

[0003] There is an array region in the wafer, in which images are distributed periodically. Each periodic unit cell can be called a cell, and multiple periodic units are generally distributed laterally in the array region.

[0004] Related technologies can detect defects in the array area by comparing adjacent cells. To do this, it is necessary to determine the width of each cell in the array area. Currently, the width of the cell is mainly determined by manual measurement. The measurement results obtained in this way have large fluctuations and poor operation convenience.

[0005] Therefore, how to accurately determine the width of the periodic cells in the array area image of the wafer becomes an urgent problem to be solved when detecting defects in the array area. Summary of the invention

[0006] To this end, the present application discloses the following technical solution to provide an automatic detection solution for periodic cell width.

[0007] The first aspect of the present application provides a method for detecting periodic cell width, comprising:

[0008] Determine a reference area in the image to be tested, and determine a detection window according to the reference area; wherein the height of the reference area is the same as the height of the image to be tested, the width of the reference area is smaller than the width of the image to be tested, and the detection window and the reference area have the same size;

[0009] The image to be tested is scanned along the width direction of the image to be tested with the detection window, and for each area scanned by the detection window, the correlation coefficients of the pixels in the area and the pixels in the reference area are calculated to obtain the correlation coefficient distribution information of the image to be tested; wherein the correlation coefficient distribution information represents the variation law of the correlation coefficient with the horizontal coordinate of the image to be tested, and when the pixels in the area scanned by the detection window coincide with the pixels in the reference area, the correlation coefficient obtains the maximum value;

[0010] Detecting a peak point of the correlation coefficient distribution information;

[0011] The width of the periodic unit cell in the image to be tested is obtained according to the horizontal coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information.

[0012] Optionally, the detecting a peak point of the correlation coefficient distribution information includes:

[0013] For each correlation coefficient in the correlation coefficient distribution information, calculating a first mean value of a plurality of correlation coefficients on the left side of the correlation coefficient and a second mean value of a plurality of correlation coefficients on the right side of the correlation coefficient;

[0014] For each correlation coefficient in the correlation coefficient distribution information, if the correlation coefficient is greater than the first mean value and the second mean value corresponding to the correlation coefficient, the correlation coefficient is determined to be a peak point of the correlation coefficient distribution information.

[0015] Optionally, before calculating, for each correlation coefficient in the correlation coefficient distribution information, a first mean of a plurality of correlation coefficients on the left side of the correlation coefficient and a second mean of a plurality of correlation coefficients on the right side, the method further includes:

[0016] Local extreme value points are filtered out from the correlation coefficient distribution information.

[0017] Optionally, obtaining the width of the periodic cells in the image to be tested according to the horizontal coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information includes:

[0018] Generating a projection histogram according to the correlation coefficient distribution information;

[0019] Select the horizontal coordinate corresponding to the peak point in the projection histogram as the coordinate position with the maximum correlation coefficient value;

[0020] The absolute value of the difference between the adjacent coordinate positions with the largest correlation coefficient is determined as the width of the periodic cell in the image to be tested.

[0021] Optionally, obtaining the width of the periodic cells in the image to be tested according to the horizontal coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information includes:

[0022] For each of the peak points, a fitting algorithm is used to process the abscissa of the peak point and the abscissa corresponding to the correlation coefficient adjacent to the peak point to obtain the sub-pixel coordinate corresponding to the peak point;

[0023] The width of the periodic unit cell in the image to be tested is obtained according to the sub-pixel coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information.

[0024] Optionally, obtaining the width of the periodic cells in the image to be tested according to the sub-pixel coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information includes:

[0025] For every two adjacent peak points, calculate the absolute value of the difference between the sub-pixel coordinates corresponding to the two adjacent peak points to obtain the sub-pixel spacing between the two adjacent peak points;

[0026] The average value of the plurality of sub-pixel intervals is calculated to obtain the width of the periodic unit cell in the image to be tested.

[0027] Optionally, before calculating the average value of the plurality of sub-pixel intervals to obtain the width of the periodic unit cell in the image to be tested, the method further includes:

[0028] Outliers are removed from the plurality of sub-pixel intervals based on an outlier detection algorithm.

[0029] Optionally, determining a reference area in the image to be tested includes:

[0030] Divide the image to be tested into N equal areas along the width direction;

[0031] Any one of the N regions is determined as a reference region.

[0032] A second aspect of the present application provides a device for detecting periodic cell width, comprising:

[0033] A determination unit, used to determine a reference area in the image to be tested, and determine a detection window according to the reference area; wherein the height of the reference area is the same as the height of the image to be tested, the width of the reference area is smaller than the width of the image to be tested, and the detection window and the reference area have the same size;

[0034] A calculation unit, used to scan the image to be tested along the width direction of the image to be tested with the detection window, and for each area scanned by the detection window, calculate the correlation coefficients of the pixels in the area and the pixels in the reference area to obtain the correlation coefficient distribution information of the image to be tested; wherein the correlation coefficient distribution information represents the variation law of the correlation coefficient with the horizontal coordinate of the image to be tested, and when the pixels in the area scanned by the detection window coincide with the pixels in the reference area, the correlation coefficient obtains a maximum value;

[0035] A detection unit, used to detect a peak point of the correlation coefficient distribution information;

[0036] The obtaining unit is used to obtain the width of the periodic unit cell in the image to be tested according to the horizontal coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information.

[0037] The third aspect of the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the method for detecting periodic cell width provided in any one of the first aspects of the present application.

[0038] A fourth aspect of the present application provides an electronic device, including a memory and a processor;

[0039] The memory is used to store computer programs;

[0040] The processor is used to execute the computer program, specifically to implement the method for detecting periodic cell width provided in any one of the first aspects of the present application.

[0041] The beneficial effects of this application are:

[0042] This solution calculates the correlation coefficients between the reference area and each part of the image to be tested, obtains the distribution information of the correlation coefficients along the width direction of the image to be tested, and then determines the width of the periodic cells of the image to be tested based on the distribution information, thereby realizing automatic detection of the periodic cell width. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0044] Figure 1 is a flow chart of a method for detecting periodic cell width provided by an embodiment of the present application;

[0045] Figure 2 is a schematic diagram of an image to be tested and a reference area provided in an embodiment of the present application;

[0046] Figure 3 is a schematic diagram of a correlation coefficient distribution diagram provided in an embodiment of the present application;

[0047] Figure 4 is a schematic diagram of a correlation coefficient distribution curve provided in an embodiment of the present application;

[0048] Figure 5 is a schematic diagram of calculating a correlation coefficient distribution curve provided in an embodiment of the present application;

[0049] Figure 6 is a schematic structural diagram of a device for detecting periodic cell width provided in an embodiment of the present application;

[0050] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0052] This application embodiment provides a method for detecting the width of a periodic cell, see Figure 1 , is a flow chart of the method, and the method may include the following steps.

[0053] S101, determining a reference area in the image to be tested, and determining a detection window according to the reference area.

[0054] The height of the reference area is the same as the height of the image to be tested, the width of the reference area is smaller than the width of the image to be tested, and the detection window and the reference area have the same size.

[0055] The image to be tested may be an image of an array region of a wafer.

[0056] The reference area can be manually specified on the image to be tested, or it can be automatically determined as follows:

[0057] Divide the image to be tested into N equal areas along the width direction;

[0058] Any one of the N regions is determined as a reference region.

[0059] For example, the image to be tested and the reference area determined in the image to be tested can be found in Figure 2 .

[0060] The value of N can be determined according to the number of periodic cells that may be contained in the image to be tested, and can generally be set to a value less than or equal to the number. For example, the image to be tested can generally contain more than 5 periodic cells, so N can be set to 5, and the image to be tested can be equally divided into 5 areas along the width direction, and any one of the 5 areas can be selected as the reference area.

[0061] The value of N is set to be less than or equal to the value of the periodic cells in the image to be tested. The advantage is that after the image to be tested is divided into equal parts in this way, the number of divided areas is less than the number of periodic cells in the image to be tested, or is equal to the number of periodic cells in the image to be tested. This ensures that the reference area selected from the equally divided areas includes at least one complete periodic cell, thereby improving the accuracy of the width of the detected periodic cells.

[0062] In the case where the reference area includes complete periodic cells, since the periodic cells in the image to be tested have a high degree of similarity, the correlation coefficient between the reference area and the area scanned by the detection window can reach a maximum value each time the detection window scans a complete periodic cell. At this time, the position where the correlation coefficient reaches the maximum value in the correlation coefficient distribution information is consistent with the position of the periodic cell in the image to be tested, and the distance between adjacent maximum values ​​is naturally consistent with the width of the periodic cell. Therefore, when determining the reference area, ensuring that the reference area includes complete periodic cells can improve the accuracy of the width of the periodic cells detected by this scheme.

[0063] The reference area can be automatically determined in the above manner, which can improve the efficiency of the method of this embodiment compared to manually determining the reference area.

[0064] S102, using a detection window to scan the image to be tested along the width direction of the image to be tested, and for each area scanned by the detection window, calculating the correlation coefficients of the pixels in the area and the pixels in the reference area to obtain the correlation coefficient distribution information of the image to be tested.

[0065] The correlation coefficient distribution information represents the variation rule of the correlation coefficient along the horizontal coordinate of the image to be tested.

[0066] When the pixels in the area scanned by the detection window coincide with the pixels in the reference area, the correlation coefficient reaches its maximum value.

[0067] In this embodiment, the correlation coefficient distribution information can be represented in multiple forms.

[0068] As an example, the correlation coefficient distribution information can be used Figure 3 The grayscale image shown indicates that each column of pixels in the grayscale image has the same grayscale value, and the grayscale values ​​of pixels in different columns may be different. The grayscale value of each column of pixels reflects the correlation coefficient corresponding to the horizontal coordinate of the column of pixels.

[0069] As another example, correlation coefficient distribution information can also be used Figure 4 The curve graph shown indicates that the abscissa of the curve is consistent with the abscissa of the image to be measured, and the ordinate of the curve indicates the correlation coefficient corresponding to the abscissa.

[0070] The process of obtaining the correlation coefficient distribution information is described below.

[0071] by Figure 5For example, when obtaining the correlation coefficient distribution information, the detection window can be used to scan from the left side of the image to be tested to the right side. Initially, the detection window is placed at the left end of the image to be tested, and the left edge of the detection window coincides with the left edge of the image to be tested. At this time, the area scanned by the detection window includes the pixels of the 1st to Mth columns in the image to be tested, and M is the width of the detection window.

[0072] For example, if the width of the detection window is 30, then the area scanned by the detection window initially includes the 1st to 30th columns of pixels of the image to be detected.

[0073] Then, for the area currently scanned by the detection window, the following formula (1) is used to calculate the pixels in the area and the reference area to obtain the correlation coefficient Pxy corresponding to the coordinates (x, y) of the detection window at this time.

[0074]

[0075] The coordinates of the detection window may be regarded as a vertex of the detection window, such as the coordinates of the vertex at the lower left corner.

[0076] Sxy(i, k) represents the pixel value of the i-th row and k-th column in the area Sxy currently scanned by the detection window, A(Sxy) represents the mean of all pixel values ​​in the area Sxy, g(i, k) represents the pixel value of the i-th row and k-th column in the reference area, A(g) represents the mean of all pixel values ​​in the reference area, m represents the number of rows of pixels in the reference area, and n represents the number of columns of pixels in the reference area.

[0077] After calculating the correlation coefficient corresponding to the current coordinates, the detection window is moved to the right once. The distance of a single movement can be 1 pixel, 2 pixels, or other values.

[0078] After the movement, the horizontal coordinate of the detection window increases by the moving distance, and the detection window scans a new area. For example, each time the moving distance is 1 pixel, the area initially scanned by the detection window includes pixels in columns 1 to M. Then, after moving once, the area scanned by the detection window includes pixels in columns 2 to M+1 in the image to be tested.

[0079] Therefore, after the movement, the above formula (1) is used again to calculate the new area scanned by the detection window and the reference area at this time to obtain the correlation coefficient of the coordinates of the detection window at this time.

[0080] The subsequent process is similar. Every time the detection window moves to a new position, the area scanned by the detection window and the reference area are calculated using formula (1) to obtain the correlation coefficient of the coordinates of the detection window at this time, and then the detection window continues to move to the right.

[0081] For example, Figure 5 In the example, the detection window moves to the P1, P2 and P3 regions in turn. Every time it moves to a region, the formula (1) is used to calculate the correlation coefficient corresponding to the horizontal coordinate of the left edge of the region.

[0082] Repeat the above process until the image to be tested is scanned, that is, until the right edge of the detection window coincides with the right edge of the image to be tested, thereby obtaining the correlation coefficients corresponding to multiple horizontal coordinates in the image to be tested, and then fit these horizontal coordinates and the corresponding correlation coefficients into a curve or grayscale image to obtain the correlation coefficient distribution information of the image to be tested.

[0083] S103, detecting the peak point of the correlation coefficient distribution information.

[0084] An alternative way to detect peak points is:

[0085] For each correlation coefficient in the correlation coefficient distribution information, calculating a first mean of multiple correlation coefficients on the left side of the correlation coefficient and a second mean of multiple correlation coefficients on the right side of the correlation coefficient;

[0086] For each correlation coefficient in the correlation coefficient distribution information, if the correlation coefficient is greater than the first mean and the second mean corresponding to the correlation coefficient, the correlation coefficient is determined to be a peak point of the correlation coefficient distribution information.

[0087] Among them, the number of correlation coefficients used to calculate the first mean and the second mean can be set as needed. For example, it can be set to 20, that is, for each correlation coefficient, the first mean is calculated using the 20 correlation coefficients on its left, and the second mean is calculated using the 20 correlation coefficients on its right.

[0088] by Figure 4 The correlation coefficient distribution curve shown is an example. Suppose you want to detect whether the point with a horizontal coordinate of 100 is a peak point, you can calculate the correlation coefficients of the 20 points on its left, that is, the average of the correlation coefficients of the points with horizontal coordinates from 80 to 99, to get the first mean, calculate the correlation coefficients of the 20 points on its right, that is, the average of the correlation coefficients of the points with horizontal coordinates from 101 to 120, to get the second mean, and then compare whether the correlation coefficient at the horizontal coordinate of 100 is greater than the first mean and the second mean at the same time. If the correlation coefficient is greater than the first mean and the second mean at the same time, it is determined that the correlation coefficient at the horizontal coordinate 100 is a peak point.

[0089] In some optional embodiments, the correlation coefficient distribution curve may be differentiated, and a value whose derivative is 0 and greater than the two previous and subsequent correlation coefficients may be determined as a peak point. Alternatively, a threshold may be set, and a value greater than the threshold may be determined as a peak point.

[0090] The advantage of detecting the peak point by calculating the mean as described above is that, on the one hand, the calculation process is simpler than the derivation method, which can save computing resources; on the other hand, compared with the threshold setting method, this detection method compares each correlation coefficient with multiple correlation coefficients before and after it, so this detection method is more accurate.

[0091] In some optional embodiments, before calculating the mean, the following steps may be performed:

[0092] Filter out local extreme points from the correlation coefficient distribution information.

[0093] The method of filtering local extreme value points may be to set a local threshold, detect whether each correlation coefficient in the correlation coefficient distribution information is greater than the local extreme value one by one, and if so, determine that the correlation coefficient is a local extreme value point and delete the correlation coefficient.

[0094] Optionally, after deleting a local extreme point, the point may be interpolated according to the correlation coefficients of other points before and after the local extreme point to obtain a new correlation coefficient for replacing the local extreme point.

[0095] The benefit of filtering local extreme points is that local extreme points are usually caused by calculation errors when obtaining correlation coefficient distribution information. Filtering these points can improve the accuracy of subsequent detected peak points, thereby improving the accuracy of the width of the periodic cell finally determined.

[0096] S104, obtaining the width of the periodic unit cell in the image to be tested according to the horizontal coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information.

[0097] An alternative way to determine the periodic cell width is:

[0098] Generate a projection histogram according to the correlation coefficient distribution information;

[0099] Select the horizontal coordinate corresponding to the peak point in the projection histogram as the coordinate position with the maximum correlation coefficient value;

[0100] The absolute value of the difference between the adjacent coordinate positions with the largest correlation coefficient is determined as the width of the periodic cell in the image to be tested.

[0101] The resulting projection histogram can be used Figure 4 express.

[0102] For example, assuming that the horizontal coordinate of a peak point determined in S103 is 20, then 20 is used as the coordinate position with the largest correlation coefficient value, and the horizontal coordinate of its next peak point is 60, then 60 is used as the coordinate position with the next largest correlation coefficient value. Therefore, the absolute value 40 of the difference between the two can be determined as the width of the periodic cell of the image to be tested.

[0103] The advantage of determining the periodic cell width in the above manner is that after the peak points are detected according to the correlation coefficient distribution information, the periodic cell width can be directly determined using any two adjacent peak points in the above manner, and the calculation process is simple and has high detection efficiency.

[0104] Optionally, the difference between the horizontal coordinates corresponding to every two adjacent peak points may be calculated, and the average value of the multiple differences may be determined as the width of the periodic unit cell in the image to be tested.

[0105] Another alternative way to determine the periodic cell width is:

[0106] For each peak point, a fitting algorithm is used to process the abscissa of the peak point and the abscissa corresponding to the correlation coefficient adjacent to the peak point to obtain the sub-pixel coordinate corresponding to the peak point;

[0107] The width of the periodic unit cell in the image to be tested is obtained according to the sub-pixel coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information.

[0108] by Figure 4 As an example, for any two adjacent peak points, we can first determine the sub-pixel coordinates corresponding to the two peak points through a fitting algorithm, and then subtract the sub-pixel coordinates of the two peak points to obtain the sub-pixel spacing between the two adjacent peak points, and determine the width of the periodic unit cell based on the sub-pixel spacing.

[0109] For any peak point, the sub-pixel coordinates corresponding to the peak point can be obtained as follows:

[0110] Obtain several correlation coefficients on the left and right sides of the peak point and their corresponding horizontal coordinates to obtain several points for fitting. Then, use a fitting algorithm, such as a polynomial fitting algorithm, to process these points for fitting to obtain a function expression y=f(x) fitted by these points, where x is the horizontal coordinate and y is the correlation coefficient. Finally, use any algorithm for solving the extreme point of the function in the relevant technology to calculate the extreme point corresponding to the function expression. The horizontal coordinate of the extreme point is the sub-pixel coordinate of the peak point.

[0111] For example, assuming that the horizontal coordinate of a peak point is 100 and the correlation coefficient is 0.8, 3 points on the left and 3 points on the right of the peak point are obtained, and the following 7 points for fitting are obtained:

[0112] (97, 0.6), (98, 0.67), (99, 0.72), (100, 0.8), (101, 0.75), (102, 0.7), (103, 0.0.66).

[0113] These 7 are fitted to obtain the corresponding function expression y=f(x), and then the extreme points of the function expression are calculated. For example, the calculated extreme points may be (100.6, 0.81). Therefore, the peak point at the horizontal coordinate 100 and the correlation coefficient 0.8 can be determined, and its corresponding sub-pixel coordinate is 100.6.

[0114] The specific principles of the fitting algorithm and the algorithm for solving the function extreme points used in the above process can be found in relevant technical literature and will not be described in detail.

[0115] The advantage of determining the width of the periodic cell according to the sub-pixel coordinates is that the coordinate positions corresponding to the correlation coefficients obtained by scanning the reference area are all integers, while the coordinate positions corresponding to the actual peak values ​​of the correlation coefficients in the image to be tested may not be integers, so the accuracy of directly determining the width of the periodic cell using the coordinate positions of integers is low. This embodiment determines the actual peak point of the correlation coefficient in the image to be tested and the more accurate sub-pixel coordinate position corresponding to the peak point by fitting, thereby determining the width of the periodic cell more accurately using the sub-pixel coordinate position.

[0116] After obtaining the sub-pixel spacing between adjacent peak points, the sub-pixel spacing between any two adjacent peak points can be rounded to an integer and used as the width of the periodic unit cell in the image to be tested.

[0117] Alternatively, the width of the periodic cells in the image to be tested may be determined according to the sub-pixel spacing in the following manner:

[0118] For every two adjacent peak points, the absolute value of the difference between the sub-pixel coordinates corresponding to the two adjacent peak points is calculated to obtain the sub-pixel spacing between the two adjacent peak points;

[0119] The average value of multiple sub-pixel spacings is calculated to obtain the width of the periodic unit cell in the image to be tested.

[0120] The advantage of using the average value of multiple sub-pixel spacings as the width of the periodic unit cell is that it can eliminate to a certain extent the interference introduced by factors such as calculation errors and noise in the image to be measured in the process of obtaining the correlation coefficient distribution information, thereby improving the accuracy of the obtained periodic unit cell width.

[0121] Optionally, before calculating the average value of multiple sub-pixel intervals to obtain the width of the periodic unit cell in the image to be tested, the method further includes:

[0122] Outliers are removed from multiple sub-pixel intervals based on an outlier detection algorithm.

[0123] The outlier detection algorithm used in this embodiment may be any outlier detection algorithm in the related art. Exemplarily, the algorithm may be an absolute median deviation algorithm.

[0124] When deleting outliers based on the absolute median deviation algorithm, the absolute median deviation MAD can be calculated using formula (2) first.

[0125] MAD=median(|x i -X median |) (2)

[0126] Then determine the upper limit value according to formulas (3) and (4) xmax and lower limit xmin .

[0127] x max =x median +1.5MAD (3)

[0128] X min =x median *1.5MAD (4)

[0129] In formula (2), median() means taking the median of multiple values ​​in brackets, X median represents the median of all sub-pixel spacings obtained in S104, x i represents the i-th sub-pixel spacing.

[0130] Finally, values ​​greater than an upper limit value and less than a lower limit value in a plurality of sub-pixel intervals may be determined as outliers and deleted.

[0131] The advantage of deleting outliers before calculating the width of the periodic unit cell is that by deleting outliers, obviously too large or too small sub-pixel spacing caused by errors in the calculation process or other factors can be filtered out, further improving the accuracy of the obtained width of the periodic unit cell.

[0132] Figure 1 The detection method provided by the corresponding embodiment has the beneficial effects of:

[0133] In a periodically distributed image, the distribution of pixel values ​​of pixels whose intervals reach integer multiples of the periodic size is often highly similar. For an image to be tested composed of a number of periodic cells, the width of the periodic cell is the periodic size of the image. Therefore, for an image to be tested composed of a number of periodic cells, if the correlation coefficient between an area where the detection window is located and the reference area reaches a peak value, then the correlation coefficients between other areas whose distances from this area reach integer multiples of the cell width and the reference area are theoretically also peak values. Based on this feature, this embodiment calculates the correlation coefficients between areas at different horizontal coordinates in the image to be tested and the reference area, and obtains the distance between the peak points of the correlation coefficients, so as to accurately obtain the width of a single cell in the image to be tested, thereby realizing automatic detection of the cell width of the array area.

[0134] The present application also provides a device for detecting the width of a periodic cell, see Figure 6 , is a schematic diagram of the structure of the device, and the device may include the following units.

[0135] A determination unit 601 is used to determine a reference area in the image to be tested, and determine a detection window according to the reference area; wherein the height of the reference area is the same as the height of the image to be tested, the width of the reference area is smaller than the width of the image to be tested, and the detection window and the reference area have the same size;

[0136] The calculation unit 602 is used to scan the image to be tested along the width direction of the image to be tested with the detection window, and for each area scanned by the detection window, calculate the correlation coefficient between the pixels in the area and the pixels in the reference area to obtain the correlation coefficient distribution information of the image to be tested; wherein the correlation coefficient distribution information represents the variation law of the correlation coefficient with the horizontal coordinate of the image to be tested, and when the pixels in the area scanned by the detection window coincide with the pixels in the reference area, the correlation coefficient obtains the maximum value;

[0137] A detection unit 603, used to detect a peak point of correlation coefficient distribution information;

[0138] The obtaining unit 604 is used to obtain the width of the periodic unit cell in the image to be tested according to the horizontal coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information.

[0139] Optionally, when the detection unit 603 detects the peak point of the correlation coefficient distribution information, it is specifically used to:

[0140] For each correlation coefficient in the correlation coefficient distribution information, calculating a first mean of multiple correlation coefficients on the left side of the correlation coefficient and a second mean of multiple correlation coefficients on the right side of the correlation coefficient;

[0141] For each correlation coefficient in the correlation coefficient distribution information, if the correlation coefficient is greater than the first mean and the second mean corresponding to the correlation coefficient, the correlation coefficient is determined to be a peak point of the correlation coefficient distribution information.

[0142] Optionally, before the detection unit 603 calculates the first mean of multiple correlation coefficients on the left side of the correlation coefficient and the second mean of multiple correlation coefficients on the right side for each correlation coefficient in the correlation coefficient distribution information, it is further used to:

[0143] Filter out local extreme points from the correlation coefficient distribution information.

[0144] Optionally, when the obtaining unit 604 obtains the width of the periodic unit cell in the image to be tested according to the horizontal coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information, it is specifically used to:

[0145] Generate a projection histogram according to the correlation coefficient distribution information;

[0146] Select the horizontal coordinate corresponding to the peak point in the projection histogram as the coordinate position with the maximum correlation coefficient value;

[0147] The absolute value of the difference between the adjacent coordinate positions with the largest correlation coefficient is determined as the width of the periodic cell in the image to be tested.

[0148] Optionally, when the obtaining unit 604 obtains the width of the periodic unit cell in the image to be tested according to the horizontal coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information, it is specifically used to:

[0149] For each peak point, a fitting algorithm is used to process the abscissa of the peak point and the abscissa corresponding to the correlation coefficient adjacent to the peak point to obtain the sub-pixel coordinate corresponding to the peak point;

[0150] The width of the periodic unit cell in the image to be tested is obtained according to the sub-pixel coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information.

[0151] Optionally, when the obtaining unit 604 obtains the width of the periodic unit cell in the image to be tested according to the sub-pixel coordinates corresponding to the adjacent peak points in the correlation coefficient distribution information, it is specifically used to:

[0152] For every two adjacent peak points, the absolute value of the difference between the sub-pixel coordinates corresponding to the two adjacent peak points is calculated to obtain the sub-pixel spacing between the two adjacent peak points;

[0153] The average value of multiple sub-pixel spacings is calculated to obtain the width of the periodic unit cell in the image to be tested.

[0154] Optionally, before the obtaining unit 604 calculates the average value of the plurality of sub-pixel intervals to obtain the width of the periodic unit cell in the image to be tested, it is further configured to:

[0155] Outliers are removed from multiple sub-pixel intervals based on an outlier detection algorithm.

[0156] Optionally, when the determination unit 601 determines the reference area in the image to be tested, it is specifically used to:

[0157] Divide the image to be tested into N equal areas along the width direction;

[0158] Determine any one of the N regions as a reference region

[0159] The specific working principle and beneficial effects of the device for detecting the periodic cell width provided in the embodiment of the present application can be found in the method for detecting the periodic cell width provided in the embodiment of the present application, and will not be repeated here.

[0160] An embodiment of the present application also provides a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the method for detecting the periodic cell width provided in any embodiment of the present application.

[0161] The present application also provides an electronic device. Figure 7 , is a schematic diagram of the structure of the electronic device, and the electronic device may include a memory 701 and a processor 702;

[0162] The memory 701 is used to store computer programs;

[0163] The processor 702 is used to execute a computer program, specifically to implement the method for detecting the periodic cell width provided in any embodiment of the present application.

[0164] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0165] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0166] As can be seen from the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of this application, in essence, or the part that makes contributions to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0167] Finally, it should also be noted that in this text, relational terms such as first, second, third, and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such a process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.

[0168] The above are only the preferred embodiments of this application. It should be pointed out that for those of ordinary skill in the art of this technology, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of this application.

Claims

1. A method for detecting the width of periodic cells, characterized in that, it includes: Determine a reference region in the image to be measured, and determine a detection window according to the reference region; wherein, the height of the reference region is the same as the height of the image to be measured, the width of the reference region is less than the width of the image to be measured, and the detection window has the same size as the reference region; Use the detection window to scan the image to be measured along the width direction of the image to be measured, and for each region swept by the detection window, calculate the correlation coefficient between the pixels in this region and the pixels in the reference region to obtain the correlation coefficient distribution information of the image to be measured; wherein, the correlation coefficient distribution information characterizes the variation law of the correlation coefficient with the abscissa of the image to be measured, and when the pixels in the region swept by the detection window coincide with the pixels in the reference region, the correlation coefficient reaches the maximum value; Detect the peak points of the correlation coefficient distribution information; According to the abscissas corresponding to adjacent peak points in the correlation coefficient distribution information, obtain the width of the periodic cells in the image to be measured.

2. The method according to claim 1, characterized in that, The detecting the peak points of the correlation coefficient distribution information includes: For each correlation coefficient in the correlation coefficient distribution information, calculate the first mean value of multiple correlation coefficients on the left side of the correlation coefficient and the second mean value of multiple correlation coefficients on the right side of the correlation coefficient; For each correlation coefficient in the correlation coefficient distribution information, if the correlation coefficient is greater than the first mean value and the second mean value corresponding to the correlation coefficient, determine the correlation coefficient as a peak point of the correlation coefficient distribution information.

3. The method according to claim 2, characterized in that, Before calculating the first mean value of multiple correlation coefficients on the left side of each correlation coefficient and the second mean value of multiple correlation coefficients on the right side of each correlation coefficient in the correlation coefficient distribution information, it further includes: Filter out local extreme points from the correlation coefficient distribution information.

4. The method according to claim 1, characterized in that, The obtaining the width of the periodic cells in the image to be measured according to the abscissas corresponding to adjacent peak points in the correlation coefficient distribution information includes: Generate a projection histogram according to the correlation coefficient distribution information; Select the abscissa corresponding to the peak point in the projection histogram as the coordinate position with the largest correlation coefficient value; Determine the absolute value of the difference between adjacent coordinate positions with the largest correlation coefficient as the width of the periodic cells in the image to be measured.

5. The method according to claim 1, characterized in that, The obtaining the width of the periodic cells in the image to be measured according to the abscissas corresponding to adjacent peak points in the correlation coefficient distribution information includes: For each peak point, use a fitting algorithm to process the abscissa of the peak point and the abscissas corresponding to the correlation coefficients adjacent to the peak point to obtain the sub-pixel level coordinates corresponding to the peak point; According to the sub-pixel level coordinates corresponding to adjacent peak points in the correlation coefficient distribution information, obtain the width of the periodic cells in the image to be measured.

6. The method according to claim 5, wherein, obtaining the width of the periodic cells in the image to be measured according to the sub-pixel coordinates corresponding to adjacent peak points in the correlation coefficient distribution information includes: for each two adjacent peak points, calculating the absolute value of the difference between the sub-pixel coordinates corresponding to the two adjacent peak points to obtain the sub-pixel spacing between the two adjacent peak points; calculating the average value of a plurality of the sub-pixel spacings to obtain the width of the periodic cells in the image to be measured.

7. The method according to claim 6, wherein, before calculating the average value of a plurality of the sub-pixel spacings to obtain the width of the periodic cells in the image to be measured, further includes: removing outliers from a plurality of the sub-pixel spacings based on an outlier detection algorithm.

8. The method according to claim 1, wherein, determining a reference region in the image to be measured includes: equally dividing the image to be measured into N regions along the width direction; determining any one of the N regions as the reference region.

9. A device for detecting the width of periodic cells, wherein, comprises: a determination unit, configured to determine a reference region in the image to be measured and determine a detection window according to the reference region; wherein, the height of the reference region is the same as the height of the image to be measured, the width of the reference region is less than the width of the image to be measured, and the detection window has the same size as the reference region; a calculation unit, configured to scan the image to be measured along the width direction of the image to be measured with the detection window, and for each region scanned by the detection window, calculate the correlation coefficient between the pixels in the region and the pixels in the reference region to obtain the correlation coefficient distribution information of the image to be measured; wherein, the correlation coefficient distribution information characterizes the variation law of the correlation coefficient with the abscissa of the image to be measured, and when the pixels in the region scanned by the detection window coincide with the pixels in the reference region, the correlation coefficient reaches the maximum value; a detection unit, configured to detect peak points of the correlation coefficient distribution information; an obtaining unit, configured to obtain the width of the periodic cells in the image to be measured according to the abscissas corresponding to adjacent peak points in the correlation coefficient distribution information.

10. A computer storage medium, wherein, used for storing a computer program, which when executed, is specifically configured to implement the method for detecting the width of periodic cells according to any one of claims 1 to 8.

11. An electronic device, wherein, comprises a memory and a processor; the memory is used for storing a computer program; the processor is used for executing the computer program, which is specifically configured to implement the method for detecting the width of periodic cells according to any one of claims 1 to 8.