Chip reference point positioning method, device, computer equipment and storage medium
Convolution verification is constructed by template images to convolutionize the test images, analyze the maximum pixel value and coordinates, and solve the problems of cumbersome positioning of chip reference points and the influence of noise in the existing technology, realize fast and accurate positioning of reference points, and improve positioning accuracy .
Patent Information
- Application Number
- CN202311035723.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2043-08-15
AI Technical Summary
In the prior art, the chip reference point positioning steps are cumbersome and are easily affected by noise, resulting in the problem of being unable to accurately locate the chip reference point.
Convolution kernel is constructed through template images, and the test images are convolutionized using convolution kernels, and the maximum pixel value and maximum pixel value coordinates are analyzed from the convolution result images to achieve rapid and accurate positioning of the reference point position.
In the case of noise interference or slight deformation of the chip reference point, the reference point position is quickly and accurately positioned, greatly improving the accuracy of the chip reference point positioning.
Smart Images

Figure CN117011369B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision and semiconductor detection technology, and more specifically, to a chip reference point positioning method, device, computer equipment and storage medium. Background Art
[0002] The reference point is a reference point for all components in the mounting process. The mark point on the IC chip (Integrated Circuit Chip) is also called the positioning point or reference point. The reference points on the IC chip have many shapes, such as circle, triangle, and straight line. The reference point is an important feature for identifying the direction of the chip, and in some cases it is even the only feature. Therefore, accurately identifying and locating the reference points on the chip and filtering out the reverse chips are of great significance to the quality inspection of the chip and the accuracy of the subsequent circuit board mounting (PCB Surface Mount).
[0003] There are currently two mainstream ways to locate the reference points on the chip. One is to use template matching for coarse positioning, and then use image feature analysis to calculate the position of the reference point; the other is to use template matching for coarse positioning, and then use gradient analysis at equal intervals along the vertical direction of the matching contour to determine the sub-pixel position of the edge of the reference point, and finally use fitting to accurately locate the position of the reference point. However, both methods are affected when the reference point is attached to other structures or noise, resulting in the inability to locate the chip reference point or the inaccurate positioning of the chip reference point.
[0004] After searching, the Chinese patent application, application number 201910799937.2, application date August 28, 2019, discloses a method for positioning the Mark point of an LCD screen based on line feature matching. The steps of the method are: 1) obtaining the target position of the template image and the LCD screen; 2) marking the coordinates of the Mark point of the template image and establishing a template coordinate system; 3) extracting and describing the line segments of the template image; 4) obtaining the target image and establishing the target image coordinate system; 5) extracting and describing the line segments of the target image; 6) matching the line features to obtain the line feature matching pairs of the corresponding line segments in the template image and the target image; 7) calculating the matching points of the template image and the target image respectively; 8) calculating the homography matrix, and obtaining the corresponding mapping points of each point on the template image on the target image through the homography matrix calculation; 9) locating the coordinates of the Mark point in the target image; 10) calculating the position deviation and angle deviation of the LCD screen to be detected. This method can achieve the Mark point matching between the target image and the template image through line feature matching, but this method does not take into account that if the Mark point is adhered to other structures or noise, the Mark point cannot be accurately positioned. Summary of the invention
[0005] 1. Technical issues to be solved
[0006] In view of the problem in the prior art that the chip reference point positioning steps are cumbersome and easily affected by noise, resulting in the inability to accurately position the chip reference point, the present invention provides a chip reference point positioning method, device, computer equipment and storage medium, which constructs a convolution kernel through template image reference points and uses the convolution kernel to convolve a test image, and analyzes the maximum pixel value and the coordinates of the maximum pixel value from the convolution result image, so as to quickly and accurately position the reference point in the test image.
[0007] 2. Technical solution
[0008] The purpose of the present invention is achieved through the following technical solutions.
[0009] A chip reference point positioning method comprises the following steps:
[0010] Input a chip image, process the chip image, and obtain a template image and a test image;
[0011] Establish a coordinate system, determine the contour and scale parameters of the template image reference points, and construct a convolution kernel based on the contour and scale parameters of the template image reference points;
[0012] Convolve the test image using the convolution kernel to obtain the convolution result image;
[0013] Find the maximum pixel value of the test image reference point in the convolution result image, calculate the maximum pixel value coordinates of the test image reference point, and obtain the position of the test image reference point.
[0014] Furthermore, the convolution kernel is constructed by the contour and scale parameters of the template image reference points, and the size of the convolution kernel is:
[0015] m=W C +2 o
[0016] n=H C +2 o
[0017] Among them, m represents the width of the convolution kernel, n represents the height of the convolution kernel, and W C Indicates the width of the outline of the reference point of the template image, H C represents the height of the contour of the reference point of the template image, and o represents the scale parameter.
[0018] Furthermore, the pixel value of any pixel on the convolution kernel is determined by the minimum distance between any pixel on the convolution kernel and the outline of the reference point of the template image and the positional relationship between any pixel on the convolution kernel and the outline of the reference point of the template image. The calculation formula is:
[0019]
[0020] Among them, SE represents the convolution kernel, SE (x0,y0) represents the pixel value of the convolution kernel at any pixel point (x0, y0), x0 represents the horizontal coordinate of any pixel point on the convolution kernel, y0 represents the vertical coordinate of any pixel point on the convolution kernel, d represents the minimum distance between any pixel point on the convolution kernel and the outline of the reference point of the template image, and k represents the positional relationship between any pixel point on the convolution kernel and the outline of the reference point of the template image.
[0021] Furthermore, the test image is convolved using the convolution kernel, and the convolution calculation formula is:
[0022]
[0023] Where R represents the convolution result, x2 represents the horizontal coordinate of any pixel in the convolution result, y2 represents the vertical coordinate of any pixel in the convolution result, a represents the value floor(m / 2), b represents the value floor(n / 2), floor() represents the value rounded down, SE (m,n) represents the size of the convolution kernel, G represents the test image, G (x2+m,y2+n) Represents the pixel value of the test image G at the pixel (x2+m,y2+n).
[0024] Furthermore, after finding the maximum pixel value of the test image reference point, the position of the test image reference point is obtained by calculating the maximum pixel value coordinates of the test image reference point. The calculation formula for the maximum pixel value of the test image reference point is:
[0025]
[0026] Among them, R (x3,y3) represents the maximum pixel value of the reference point of the test image, x3 represents the abscissa of the maximum pixel value of the reference point of the test image, y3 represents the ordinate of the maximum pixel value of the reference point of the test image, w represents the width of the convolution result, and h represents the height of the convolution result;
[0027] The calculation formula for the maximum pixel value coordinates of the test image reference point is:
[0028] T (x3,y3) =find(R (x2,y2) =R (x3,y3) ), x2∈[0, w), y2∈[0, h)
[0029] Among them, T (x3,y3) Represents the maximum pixel value coordinates of the benchmark point in the test image, find(R (x2,y2) =R (x3,y3) ) means finding the pixel value R in the convolution result (x3,y3) The coordinates of .
[0030] Furthermore, in the template image, it is determined whether the convolution kernel is inverted by calculating the mean pixel value of the reference point of the template image and the mean pixel value of the background of the template image.
[0031] Furthermore, the judgment formula for whether the convolution kernel is negated is:
[0032]
[0033] Among them, G mark Represents the mean pixel value of all pixels within the contour in the template image, G bg Represents the mean pixel value of all pixels outside the contour in the template image.
[0034] A chip reference point positioning device, comprising:
[0035] An input module inputs a chip image, processes the chip image, and obtains a template image and a test image;
[0036] The convolution module establishes a coordinate system, determines the contour and scale parameters of the reference points of the template image, constructs a convolution kernel based on the contour and scale parameters of the reference points of the template image, and uses the convolution kernel to convolve the test image to obtain a convolution result image;
[0037] The calculation module searches for the maximum pixel value of the reference point of the test image in the convolution result image, calculates the maximum pixel value coordinates of the reference point of the test image, and obtains the position of the reference point of the test image.
[0038] A computer device comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements the above-mentioned method when executing the computer program.
[0039] A computer-readable storage medium stores a computer program, and the computer program executes the above method when executed by a processor.
[0040] 3. Beneficial effects
[0041] Compared with the prior art, the advantages of the present invention are:
[0042] A chip reference point positioning method, device, computer equipment and storage medium of the present invention construct a convolution kernel through a template image reference point, use the convolution kernel to convolve a test image, find the maximum pixel value and the maximum pixel value coordinates of the test image reference point in the convolution result image, and obtain the position of the test image reference point. In the case of noise interference or slight deformation of the chip reference point, the position of the reference point can be quickly and accurately located, greatly improving the accuracy of chip reference point positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a flow chart of a chip reference point positioning method according to an embodiment of the present invention;
[0044] Figure 2 is the reference point template image in Example 1 of the present invention;
[0045] Figure 3 The reference point contour image in Embodiment 1 of the present invention;
[0046] Figure 4 Schematic diagram of parameters in Example 1 of the present invention;
[0047] Figure 5 Schematic diagram of the convolution kernel in Example 1 of the present invention;
[0048] Figure 6 The test image in Embodiment 1 of the present invention;
[0049] Figure 7 is the convolution result image in Example 1 of the present invention;
[0050] Figure 8 The image of the maximum pixel value position of the convolution result image in Embodiment 1 of the present invention;
[0051] Fig. 9 is the reference point template image in embodiment 2 of the present invention;
[0052] Fig.10 The reference point contour image in Embodiment 2 of the present invention;
[0053] Fig.11 Schematic diagram of parameters in Example 2 of the present invention;
[0054] Fig.12 is the convolution kernel image in Example 2 of the present invention;
[0055] Fig.13 The test image in Embodiment 2 of the present invention;
[0056] Fig.14 is the convolution result image in Example 2 of the present invention;
[0057] Fig.15 It is the image of the maximum pixel value position of the convolution result image in Example 2 of the present invention. DETAILED DESCRIPTION
[0058] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0059] like Figure 1As shown, a chip reference point positioning method provided by this embodiment. The chip reference point positioning method includes the following steps: inputting a chip image, processing the chip image, and obtaining a template image and a test image; establishing a coordinate system, determining the contour and scale parameters of the reference point of the template image, and constructing a convolution kernel through the contour and scale parameters of the reference point of the template image; convolving the test image with the convolution kernel to obtain a convolution result image; finding the maximum pixel value of the reference point of the test image in the convolution result image, calculating the maximum pixel value coordinates of the reference point of the test image, and obtaining the position of the reference point of the test image.
[0060] Example 1
[0061] Input a chip image, process the chip image, and obtain a template image and a test image. Specifically in this embodiment, firstly input multiple chip images, crop and process the multiple chip images. Figure 2 As shown in , a completely normal chip image without deformation or occlusion in the reference point area of the chip image is selected as the template image; Figure 6 As shown, a chip image in which the reference point area in the chip image is slightly deformed is selected as a test image.
[0062] Furthermore, a coordinate system is established to determine the contour and scale parameters of the reference points of the template image, and a convolution kernel is constructed by the contour and scale parameters of the reference points of the template image. Specifically, a coordinate system is established to set the template image. In this embodiment, a rectangular coordinate system is established. Figure 3 As shown, a closed contour C representing the edge of the reference point area is obtained by binarizing the template image and searching for edge contours. In this embodiment, the contour C of the template image reference point represents a set of coordinates of the edge points of the template image reference point. Then, the scale parameter o of the template image reference point is determined. The scale parameter o of the template image reference point is set to the distance between the transition pixels of the reference point and the template image background. It should be noted that in the prior art, the scale parameter o of the template image reference point is determined by the number of transition pixels at the edge of the template image reference point. The scale parameter o of the template image reference point can be determined by observing the number of transition pixels at the edge of the template image reference point. Figure 4 As shown, in this embodiment, the number of transition pixels between the template image background and the edge of the template image reference point is 3, that is, the scale parameter o of the template image reference point is set to 3.
[0063] Thus, the convolution kernel is constructed by the contour and scale parameters of the reference point of the template image. In this embodiment, the width and height of the contour C of the reference point of the template image are calculated by the circumscribed rectangle of the contour C of the reference point of the template image. The width and height of the convolution kernel can be calculated using the width and height of the contour C of the reference point of the template image, and the pixel value of any point in the convolution kernel is determined by traversing each pixel point in the convolution kernel through the coordinates of the pixel point and the relationship between the pixel point and the contour C of the reference point of the template image, and finally the convolution kernel is generated. Specifically, the size of the convolution kernel is:
[0064] m=W C +2 o
[0065] n=H C +2, o
[0066] Among them, m represents the width of the convolution kernel, n represents the height of the convolution kernel, and W C Indicates the width of the outline of the reference point of the template image, H C represents the height of the contour of the reference point of the template image, and o represents the scale parameter.
[0067] Then, traverse each pixel of the convolution kernel and set the coordinates of any pixel of the convolution kernel to P (x0,y0) , through the convolution kernel any pixel point P (x0,y0) Calculate the convolution kernel arbitrary pixel point P with the contour C of the template image reference point (x0,y0) The minimum distance from the contour C of the template image reference point is calculated as:
[0068]
[0069] Among them, d represents the convolution kernel of any pixel point P (x0,y0) The minimum distance from the contour C of the reference point of the template image, x0 represents the horizontal coordinate of any pixel point of the convolution kernel, y0 represents the vertical coordinate of any pixel point of the convolution kernel, x represents the horizontal coordinate of any pixel point in the contour C of the reference point of the template image, y represents the horizontal coordinate of any pixel point in the contour C of the reference point of the template image, and C represents the contour of the reference point of the template image.
[0070] Set a parameter k, k represents the convolution kernel of any pixel point P (x0,y0) The positional relationship with the contour C of the template image reference point, where:
[0071]
[0072] Therefore, through any pixel point P on the convolution kernel (x0,y0) The minimum distance d from the contour C of the template image reference point and the parameter k determine the convolution kernel of any pixel point P (x0,y0) The pixel value is calculated as:
[0073]
[0074] Among them, SE represents the convolution kernel, SE (x0,y0) Represents the convolution kernel at any pixel point P (x0,y0) The pixel value at the convolution kernel is x0, y0, and d represents the pixel value at any pixel point P in the convolution kernel. (x0,y0) The minimum distance from the contour C of the template image reference point, k represents any pixel point P on the convolution kernel (x0,y0) The positional relationship with the template image reference point contour C.
[0075] It is worth noting that in this embodiment, the convolution kernel is determined to be inverted by calculating the mean pixel value of the template image reference point and the mean pixel value of the template image background in the template image. Specifically, to determine whether to invert the convolution kernel SE, the pixel mean G of the template image reference point can be calculated by the contour C of the template image reference point and the template image. Mark and the pixel mean G of the template image background bg In this embodiment, the pixel mean value G of the reference point of the template image is Mark That is, the mean value of the pixel values of all pixels in the contour C in the template image, and the mean value of the pixel value of the background of the template image G bg That is, the mean value of the pixel values of all pixels outside the contour C in the template image. Furthermore, for the pixel mean value G of the reference point of the template image Mark and the pixel mean G of the template image background bg , then:
[0076]
[0077] I′ (x1,y1) =1-I (x1,y1)
[0078]
[0079]
[0080] Where I represents the use of the template image to find the mean pixel value G of the reference point of the template image Mark The weight image when I' represents the pixel value mean G of the template image background using the template image bg The weight image when Q (x1,y1) represents any pixel on the template image reference point weight image I, x1 represents the horizontal coordinate of any pixel on the template image reference point weight image I, y1 represents the vertical coordinate of any pixel on the template image reference point weight image I, I (x1,y1) Represents the template image reference point weight image I at any pixel Q(x1,y1) The pixel value at I' (x1,y1) Represents the template image background weight image I' at any pixel Q (x1,y1) The pixel value at, T represents the template image, T (x1,y1) Represents the template image T at any pixel Q (x1,y1) The pixel value at .
[0081] Furthermore, the judgment formula for whether the convolution kernel is negated is:
[0082]
[0083] Among them, G mark Represents the mean pixel value of all pixels within the contour in the template image, G bg Represents the mean pixel value of all pixels outside the contour in the template image.
[0084] In this embodiment, Figure 4 As shown, G Mark The value is greater than G bg , so the convolution kernel SE does not need to be negated. Therefore, Figure 5 As shown, the final convolution kernel SE is obtained.
[0085] It should be noted that, in this embodiment, judging whether the convolution kernel SE is inverted or not can make the convolution result image obtained after the convolution kernel convolves the test image have the same performance. In the positioning process of the chip reference point, the positioned reference point is at the maximum value position of the chip image, but it may be at the maximum pixel value position or the minimum pixel value position. Therefore, when the chip reference point is at the minimum pixel value position, the position of the test image reference point is located at the maximum pixel value position by inverting the convolution kernel SE and then convolving the test image with the convolution kernel SE, so that the position of the test image reference point is located at the maximum pixel value position, and then in the subsequent calculation process, there is no need to judge the position of the reference point, which effectively improves the calculation efficiency.
[0086] Furthermore, the test image is convolved using the convolution kernel, and the convolution calculation formula is:
[0087]
[0088] Where R represents the convolution result, x2 represents the horizontal coordinate of any pixel in the convolution result, y2 represents the vertical coordinate of any pixel in the convolution result, a represents the value floor(m / 2), b represents the value floor(n / 2), floor() represents the value rounded down, SE (m,n) represents the size of the convolution kernel, G represents the test image, G (x2+m,y2+n) represents the pixel value of the test image G at the pixel point (x2+m,y2+n). Figure 7As shown, the convolution result image is obtained.
[0089] Furthermore, the maximum pixel value of the test image reference point is found in the convolution result image, and the coordinates of the maximum pixel value of the test image reference point are calculated to obtain the position of the test image reference point. After finding the maximum pixel value of the test image reference point, the position of the test image reference point is obtained by calculating the coordinates of the maximum pixel value. The calculation formula for the maximum pixel value of the test image reference point is:
[0090]
[0091] Among them, R (x3,y3) represents the maximum pixel value of the reference point of the test image, x3 represents the abscissa of the maximum pixel value of the reference point of the test image, y3 represents the ordinate of the maximum pixel value of the reference point of the test image, w represents the width of the convolution result, and h represents the height of the convolution result;
[0092] The calculation formula for the maximum pixel value coordinates of the test image reference point is:
[0093] T (x3,y3) =find(R (x2,y2) =R (x3,y3) ), x2∈[0, w), y2∈[0, h)
[0094] Among them, T (x3,y3) Represents the maximum pixel value coordinates of the benchmark point in the test image, find(R (x2,y2) =R (x3,y3) ) means finding the pixel value R in the convolution result (x3,y3) The coordinates of .
[0095] It is worth noting that, in this embodiment, by analyzing the convolution result image, the sub-pixel accuracy coordinates of the reference points of the test image can also be obtained. Specifically, Figure 8 As shown, find the maximum pixel value R of the convolution result image (x3,y3) and the coordinate T of the maximum pixel value (x3,y3) , get the coordinate T of the maximum pixel value (x3,y3) The image pixel values of four adjacent pixels, that is, the coordinate T where the maximum pixel value is located (x3,y3) The pixel value R of the pixel to the left of the point (x3-1,y3) , the coordinate T of the maximum pixel value (x3,y3) The pixel value R of the pixel on the right side of the point (x3+1,y3) , the coordinate T of the maximum pixel value (x3,y3) The pixel value R of the pixel above the point (x3,y3-1) , the coordinate T of the maximum pixel value (x3,y3) The pixel value R of the pixel below the point (x3,y3+1) , and then calculate the sub-pixel accuracy coordinates of the reference points of the test image. The calculation formula is:
[0096]
[0097]
[0098]
[0099]
[0100] Among them, x offset Indicates the horizontal coordinate offset of calculating the sub-pixel accuracy of the test image reference point, y offset Indicates the vertical coordinate offset of the sub-pixel accuracy of the reference point in the test image. (x3-1, y3), (x3+1, y3), (x3, y3-1) and (x3, y3+1) represent the position T of the maximum pixel value in the convolution result image. (x3,y3) The coordinates of the four adjacent left, right, top and bottom points, R (x3-1,y3) , R (x3+1,y3) , R (x3,y3-1) and R (x3,y3+1) Respectively represent the pixel values of the convolution result image at points (x3-1, y3), (x3+1, y3), (x3, y3-1) and (x3, y3+1), T x3 The horizontal coordinate representing the maximum pixel value of the reference point in the test image, T y3 The ordinate representing the maximum pixel value of the reference point in the test image, x sp Indicates the horizontal coordinate of the sub-pixel of the reference point in the test image, y sp Indicates the sub-pixel vertical coordinate of the reference point in the test image.
[0101] Example 2
[0102] The difference between the chip reference point positioning method described in Example 2 and Example 1 is that: Fig. 9 As shown in FIG. 1 , for the template image, since the edge of the template image reference point is seriously affected by noise, it is impossible to extract the ideal contour C of the template image reference point. Therefore, in this embodiment, Fig.10 As shown, by measuring the radius r of the reference point of the template image, a standard circle with a radius r is used as the contour C of the reference point of the template image; Fig.13 As shown in FIG. , it is a test image. In addition, in this embodiment, as Fig.11 As shown, G Mark The value is less than G bg , so the convolution kernel SE needs to be negated, that is, SE = -SE. Therefore, if Fig.12As shown, the final convolution kernel SE is obtained. In this embodiment, after the convolution kernel SE is negated, the convolution result image obtained after the convolution kernel SE is convolved with the test image has the same performance, that is, when the reference point of the test image is at the minimum pixel value position, the position of the reference point of the test image is located at the maximum pixel value position by negating the convolution kernel SE and then convolving the test image with the convolution kernel SE, and then there is no need to judge the position of the reference point in the subsequent calculation process, which effectively improves the calculation efficiency.
[0103] In summary, this example provides a chip reference point positioning method, which constructs a convolution kernel through the contour and scale parameters of the reference point of the template image, uses the convolution kernel to convolve the test image to obtain a convolution result image, and finds the maximum pixel value of the reference point of the test image in the convolution result image and calculates the maximum pixel value coordinates to obtain the position of the reference point of the test image. In this way, when the chip reference point is subject to noise interference or slight deformation, the position of the reference point can be quickly and accurately located, thereby greatly improving the accuracy of chip reference point positioning.
[0104] Example 3
[0105] This embodiment also provides a chip reference point positioning device, including an input module, a convolution module and a calculation module. The input module inputs a chip image, processes the chip image, and obtains a template image and a test image. The convolution module establishes a coordinate system, determines the contour and scale parameters of the template image reference point, constructs a convolution kernel through the contour and scale parameters of the template image reference point, and convolves the test image using the convolution kernel to obtain a convolution result image. The calculation module searches for the maximum pixel value of the test image reference point in the convolution result image, calculates the maximum pixel value coordinates of the test image reference point, and obtains the position of the test image reference point. A chip reference point positioning device provided in this embodiment can implement any of the chip reference point positioning methods, and the specific working process of a chip reference point positioning device can refer to the corresponding process in the chip reference point positioning method embodiment. The method and device provided in this embodiment can be implemented in other ways. For example, the device embodiment described above is only schematic; for example, the division of a module is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual connection or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.
[0106] This embodiment also provides a computer device. A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the chip reference point positioning method when executing the computer program.
[0107] This embodiment also provides a computer-readable storage medium. A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, a chip reference point positioning method described in this embodiment is executed. Among them, the computer-readable storage medium can be any tangible medium containing or storing a program, and the program can be used by or in combination with an instruction execution system, device or device; the program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0108] The above schematically describes the invention and its implementation methods, which is not restrictive. Without departing from the spirit or basic features of the invention, the invention can be implemented in other specific forms. What is shown in the accompanying drawings is only one of the implementation methods of the invention. The actual structure is not limited to this, and any figure mark in the claims should not limit the claims involved. Therefore, if a person of ordinary skill in the art is inspired by it, without departing from the purpose of the invention, a structural method and an embodiment similar to the technical solution are designed without creativity, which should all fall within the scope of protection of this patent. In addition, the word "including" does not exclude other elements or steps, and the word "one" before the element does not exclude the inclusion of "multiple" elements. The multiple elements stated in the product claim can also be implemented by one element through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.
Claims
1. A chip reference point positioning method, comprising the following steps: Input a chip image, process the chip image, and obtain a template image and a test image; Establish a coordinate system, determine the contour and scale parameters of the template image reference points, and construct a convolution kernel based on the contour and scale parameters of the template image reference points. The size of the convolution kernel is: Among them, m represents the width of the convolution kernel, n represents the height of the convolution kernel, and W C Indicates the width of the outline of the reference point of the template image, H C represents the height of the outline of the reference point of the template image, and o represents the scale parameter; the pixel value of any pixel on the convolution kernel is determined by the minimum distance between any pixel on the convolution kernel and the outline of the reference point of the template image and the positional relationship between any pixel on the convolution kernel and the outline of the reference point of the template image. The calculation formula is: Among them, SE represents the convolution kernel, SE (x0,y0) represents the pixel value of the convolution kernel at any pixel point (x0, y0), x0 represents the horizontal coordinate of any pixel point on the convolution kernel, y0 represents the vertical coordinate of any pixel point on the convolution kernel, d represents the minimum distance between any pixel point on the convolution kernel and the outline of the reference point of the template image, and k represents the positional relationship between any pixel point on the convolution kernel and the outline of the reference point of the template image; The test image is convolved with the convolution kernel to obtain the convolution result image. The convolution calculation formula is: Where R represents the convolution result, x2 represents the horizontal coordinate of any pixel in the convolution result, y2 represents the vertical coordinate of any pixel in the convolution result, a represents the value floor(m / 2), b represents the value floor(n / 2), floor() represents the value rounded down, SE (m,n) represents the size of the convolution kernel, G represents the test image, G (x2+m,y2+n) Represents the pixel value of the test image G at the pixel point (x2+m,y2+n); Find the maximum pixel value of the test image reference point in the convolution result image, calculate the maximum pixel value coordinates of the test image reference point, and obtain the position of the test image reference point.
2. A chip reference point positioning method according to claim 1, characterized in that: After finding the maximum pixel value of the test image reference point, the position of the test image reference point is obtained by calculating the maximum pixel value coordinates of the test image reference point. The calculation formula for the maximum pixel value of the test image reference point is: Among them, R (x3,y3) represents the maximum pixel value of the reference point of the test image, x3 represents the abscissa of the maximum pixel value of the reference point of the test image, y3 represents the ordinate of the maximum pixel value of the reference point of the test image, w represents the width of the convolution result, and h represents the height of the convolution result; The calculation formula for the maximum pixel value coordinates of the test image reference point is: Among them, T (x3,y3) Represents the maximum pixel value coordinates of the benchmark point in the test image, find(R (x2,y2) =R (x3,y3) ) means finding the pixel value R in the convolution result (x3,y3) The coordinates of .
3. A chip reference point positioning method according to claim 1, characterized in that: In the template image, the mean pixel value of the template image reference point and the mean pixel value of the template image background are calculated to determine whether the convolution kernel is inverted.
4. A chip reference point positioning method according to claim 3, characterized in that: The judgment formula for whether the convolution kernel is negated is: Among them, G mark Represents the mean pixel value of all pixels within the contour in the template image, G bg Represents the mean pixel value of all pixels outside the contour in the template image.
5. A chip reference point positioning device, characterized in that: include: An input module inputs a chip image, processes the chip image, and obtains a template image and a test image; Convolution module, establishes a coordinate system, determines the contour and scale parameters of the template image reference points, and constructs a convolution kernel based on the contour and scale parameters of the template image reference points. The size of the convolution kernel is: Among them, m represents the width of the convolution kernel, n represents the height of the convolution kernel, and W C Indicates the width of the outline of the reference point of the template image, H C represents the height of the outline of the reference point of the template image, and o represents the scale parameter; the pixel value of any pixel on the convolution kernel is determined by the minimum distance between any pixel on the convolution kernel and the outline of the reference point of the template image and the positional relationship between any pixel on the convolution kernel and the outline of the reference point of the template image. The calculation formula is: Among them, SE represents the convolution kernel, SE (x0,y0) Represents the pixel value of the convolution kernel at any pixel point (x0, y0), x0 represents the horizontal coordinate of any pixel point on the convolution kernel, y0 represents the vertical coordinate of any pixel point on the convolution kernel, d represents the minimum distance between any pixel point on the convolution kernel and the outline of the reference point of the template image, and k represents the positional relationship between any pixel point on the convolution kernel and the outline of the reference point of the template image; the convolution kernel is used to convolve the test image to obtain the convolution result image. The convolution calculation formula is: Where R represents the convolution result, x2 represents the horizontal coordinate of any pixel in the convolution result, y2 represents the vertical coordinate of any pixel in the convolution result, a represents the value floor(m / 2), b represents the value floor(n / 2), floor() represents the value rounded down, SE (m,n) represents the size of the convolution kernel, G represents the test image, G (x2+m,y2+n) Represents the pixel value of the test image G at the pixel point (x2+m,y2+n); The calculation module searches for the maximum pixel value of the reference point of the test image in the convolution result image, calculates the maximum pixel value coordinates of the reference point of the test image, and obtains the position of the reference point of the test image.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is executed.
