Rectangular chip backside inspection method, system, device and medium
By improving the gray wolf optimization algorithm and combining the multi-armed slot machine mechanism and the Sigmoid function, the search performance is enhanced, solving the problems of slow convergence speed and easy getting trapped in local optima in chip detection, and realizing high-precision and fast chip reverse detection.
Patent Information
- Application Number
- CN202511344026.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-09-19
AI Technical Summary
Existing image matching methods based on optimization algorithms suffer from slow convergence speed and a tendency to get trapped in local optima in chip detection, which limits detection accuracy and efficiency.
An improved gray wolf optimization algorithm is adopted, which combines a multi-armed slot machine mechanism, a Sigmoid function, and a triangular optimization process. By introducing a random factor from the Cauchy inverse distribution, the search performance is optimized, and high-precision chip reverse detection is achieved.
It improves the accuracy and robustness of chip detection, enabling rapid and accurate identification of chip orientation in complex environments and avoiding local optima.
Smart Images

Figure CN120876452B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of integrated circuit detection, and particularly relates to chip direction detection. BACKGROUND
[0002] With the continuous improvement of the precision and size of integrated circuit chips, the detection requirements for the surface quality of the chips are increasingly strict. In the detection process, problems such as uncertain front and back directions of the chips and changes in the rotation angle of the chips need to be handled. In the detection process of the integrated circuit chips, due to the complex situations such as uncertain front and back directions of the chips and changes in the rotation angle of the chips, the existing image matching method based on an optimization algorithm has problems such as slow convergence speed and easy to fall into local optimum when accurately matching a template, which limits the detection accuracy and efficiency. SUMMARY
[0003] The present application is to solve the problem of slow convergence speed and easy to fall into local optimum in the existing detection method for the surface quality of the chips. In order to solve these problems, the present application provides a rectangular chip back detection method, system, device and medium, which can accurately locate the back direction of the chip in a complex environment.
[0004] The first aspect of the present application provides a rectangular chip back detection method, comprising:
[0005] Collecting an image of a measured chip as a target image and extracting an edge image of the target image;
[0006] Calculating the minimum circumscribed rectangle of the chip contour in the target image, and generating a plurality of candidate template images in a preset angle interval with the main axis direction angle of the minimum circumscribed rectangle as the center;
[0007] Using an improved grey wolf optimization algorithm to search for a candidate template image with the maximum similarity to the target image as an optimal template image;
[0008] Generating a marked image using the optimal template image, performing a bitwise AND operation on the marked image and the edge image to obtain an effective rectangular character edge region, and extracting an effective contour picture in the effective rectangular character edge region;
[0009] Screening the character contour in the effective contour picture, and if the number of the character contour is greater than a threshold value, the measured chip is a back.
[0010] In one possible design, the calculation of the minimum circumscribed rectangle of the chip contour in the target image and the generation of a plurality of candidate template images in a preset angle interval with the main axis direction angle of the minimum circumscribed rectangle as the center comprise:
[0011] Calculating the minimum circumscribed rectangle of the chip contour in the target image based on a rotation jamming algorithm;
[0012] construct a preset angle interval centered on the major axis direction angle of the minimum circumscribed rectangle, uniformly sample according to a preset step size, and generate a plurality of rotation angles;
[0013] draw a rectangular template at each rotation angle according to the specification size parameter of the measured chip, and obtain a plurality of candidate template images.
[0014] In one possible design, the use of the improved grey wolf optimization algorithm to search for a candidate template image with the greatest similarity to the target image as an optimal template image includes:
[0015] An initial grey wolf population is randomly generated for each candidate template image, and a multi-armed bandit algorithm is used to generate a search strategy for the optimal position of each wolf;
[0016] The similarity of each candidate template image to the target image is calculated based on a normalized cross-correlation method, and the candidate template image with the greatest similarity is taken as the optimal template image.
[0017] In one example, the multi-armed bandit algorithm includes: - a greedy strategy for selecting an arm, with a probability of randomly selecting an arm, with a probability of selecting the arm with the highest average reward at present;
[0018] The arms of the multi-armed bandit algorithm include one or more of a triangular walk strategy arm, an adaptive gravity coefficient arm, and a random factor arm;
[0019] The triangular walk strategy arm includes: randomly selecting three wolves and calculating the Euclidean distance between each two wolves, and updating the position of the wolf using a weighted combination of the average of the three obtained Euclidean distances and the side length;
[0020] The adaptive gravity coefficient arm includes: randomly selecting three wolves and taking the position of the wolf with the minimum fitness value as the optimal solution, calculating an adaptive gravity coefficient based on the smoothing property of a Sigmoid function, and updating the position of the wolf using the optimal solution and the adaptive gravity coefficient;
[0021] The random factor arm includes: introducing a random factor based on the inverse Cauchy distribution to update the position of the wolf.
[0022] In one possible design, the use of the optimal template image to generate a mark image includes:
[0023] The cutting length is calculated according to any pin width and length of the measured chip in the target image;
[0024] A rectangular region is generated using the cutting length, pin width, and measured chip length, with the best matching position of the optimal template image as the center, and the rectangular region is rotated by the rotation angle of the optimal template image to obtain a rotated rectangular region;
[0025] The rotated rectangular region is filled with a preset color to obtain a mark image.
[0026] In one example, the extracting an effective contour picture in the effective rectangular character edge region comprises:
[0027] An effective contour picture is obtained by screening contours that meet the condition in the effective rectangular character edge region.
[0028] The screening condition comprises: if the number of pixel points of a contour is greater than a preset number, the contour is considered as an effective contour.
[0029] In one example, the screening a character contour in the effective contour picture comprises:
[0030] Starting from the center row of pixels of the effective contour picture, each column of pixels in each row of pixels is scanned row by row in an up-down alternating manner, and when the luminance value of a pixel exceeds a preset luminance threshold, the pixel belongs to a character contour.
[0031] The second aspect of the application provides a rectangular chip reverse surface detection system, comprising:
[0032] An edge extraction module is configured to collect an image of a measured chip as a target image and extract an edge image of the target image.
[0033] A template generation module is configured to calculate a minimum circumscribed rectangle of a chip contour in the target image, and generate a plurality of candidate template images in a preset angle interval with the principal axis direction angle of the minimum circumscribed rectangle as the center.
[0034] A template optimization module is configured to search for a candidate template image with the highest similarity to the target image as an optimal template image using an improved grey wolf optimization algorithm.
[0035] A contour extraction module is configured to generate a mark image using the optimal template image, perform a bitwise AND operation on the mark image and the edge image to obtain an effective rectangular character edge region, and extract an effective contour picture in the effective rectangular character edge region.
[0036] A reverse surface detection module is configured to screen a character contour in the effective contour picture, and if the number of character contours is greater than a threshold value, the measured chip is a reverse surface.
[0037] The third aspect of the present application provides a rectangular chip reverse surface detection device, which comprises a processor and a memory, and the memory stores at least one instruction, which is loaded and executed by the processor to realize the above-mentioned rectangular chip reverse surface detection method.
[0038] The fourth aspect of the present application provides a computer storage medium, which stores at least one instruction, which is loaded and executed by the processor to realize the above-mentioned rectangular chip reverse surface detection method.
[0039] The beneficial effects of the present application are as follows:
[0040] By introducing the multi-armed bandit mechanism and the Sigmoid function to dynamically adjust the search direction and range, and combining the triangular optimization process and the random factor of the Cauchy inverse distribution to enhance the randomness and jumping of the search, the search performance is optimized, and the template matching process is more accurate and fast.
[0041] The technical solution has the advantages that a high-precision and fast template matching method based on an improved grey wolf optimization algorithm is provided, which can accurately identify the chip direction in a complex environment. The reason for this advantage is that the present application innovatively introduces the multi-armed bandit mechanism and the Sigmoid function to dynamically adjust the search strategy, improves the global search ability and convergence speed, and at the same time combines the triangular optimization strategy and the random factor of the Cauchy inverse distribution to enhance the randomness and jumping of the search, effectively avoiding the local optimal problem. In addition, the chip reverse surface detection method can adapt to the change of the chip direction, and combined with the optimized matching algorithm, high-precision and high-robustness chip detection is finally realized. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 It is a flowchart of the rectangular chip reverse surface detection method;
[0043] Figure 2(a) is a schematic diagram of the reverse surface of a chip;
[0044] Figure 2(b) is a schematic diagram of the front surface of a chip;
[0045] Figure 3 It is a schematic diagram of the chip main shaft direction angle;
[0046] Figure 4 It is a flowchart of the rectangular chip reverse surface detection method based on the improved grey wolf optimization algorithm according to the embodiment;
[0047] Figure 5 It is a schematic diagram of the rectangular chip reverse surface detection system;
[0048] Figure 6 It is a schematic diagram of the rectangular chip reverse surface detection device;
[0049] Figure 7 A schematic diagram of a computer storage medium is shown. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0051] The image matching method based on the optimization algorithm has made significant progress in target detection, and the global search ability of the grey wolf optimization algorithm performs well in image matching. However, the grey wolf optimization algorithm still has problems such as slow convergence speed and easy to fall into local optimum when accurately matching the template.
[0052] Therefore, the present application provides a rectangular chip reverse surface detection method, system, device and medium to solve the above problems. The solutions of the embodiments of the present application will be described in detail below.
[0053] Embodiment one: reference Figures 1 to 3 To specifically describe the present embodiment, the rectangular chip reverse surface detection method described in the present embodiment comprises:
[0054] Collecting an image of a chip to be tested as a target image, and extracting an edge image of the target image;
[0055] Calculating the minimum circumscribed rectangle of the chip contour in the target image, and generating a plurality of candidate template images in a preset angle interval with the main axis direction angle of the minimum circumscribed rectangle as the center;
[0056] Searching for a template image with the maximum similarity to the target image as an optimal template image using an improved grey wolf optimization algorithm;
[0057] Generating a mark image using the optimal template image, performing a bitwise AND operation on the mark image and the edge image to obtain an effective rectangular character edge region, and extracting an effective contour picture in the effective rectangular character edge region;
[0058] Screening the character contour in the effective contour picture, and if the number of the character contour is greater than a threshold value, the chip to be tested is a reverse surface.
[0059] In one embodiment, the calculating the minimum circumscribed rectangle of the chip contour in the target image and generating a plurality of candidate template images in a preset angle interval with the main axis direction angle of the minimum circumscribed rectangle as the center comprises:
[0060] calculating a minimum circumscribed rectangle of a chip contour in the target image based on a rotating jam algorithm;
[0061] constructing a preset angle interval with the major axis direction angle of the minimum circumscribed rectangle as the center, uniformly sampling according to a preset step size, and generating a plurality of rotation angles;
[0062] drawing a rectangular template under each rotation angle according to the specification size parameter of the measured chip to obtain a plurality of candidate template images.
[0063] In an embodiment, the use of the improved grey wolf optimization algorithm to search for a candidate template image with the greatest similarity to the target image as an optimal template image comprises:
[0064] For each candidate template image, an initial grey wolf population is randomly generated, and a search strategy for the optimal position of each wolf is generated using a multi-armed tiger machine algorithm;
[0065] Based on the normalized cross-correlation method, the similarity of each candidate template image to the target image is calculated, and the candidate template image with the greatest similarity is taken as the optimal template image.
[0066] In an embodiment, the multi-armed tiger machine algorithm comprises: - a greedy strategy for selecting an arm, with a probability of randomly selecting an arm, with a probability of selecting the arm with the highest average reward at present;
[0067] The arms of the multi-armed tiger machine algorithm include one or more of a triangular wandering strategy arm, an adaptive gravity coefficient arm, and a random factor arm;
[0068] The triangular wandering strategy arm comprises: randomly selecting three wolves and calculating the Euclidean distance between each two wolves, and updating the position of the wolf using the weighted combination of the average of the three obtained Euclidean distances and the side length;
[0069] The adaptive gravity coefficient arm comprises: randomly selecting three wolves and taking the position of the wolf with the minimum fitness value as the optimal solution, calculating an adaptive gravity coefficient based on the smoothing property of the Sigmoid function, and updating the position of the wolf using the optimal solution and the adaptive gravity coefficient;
[0070] The random factor arm comprises: introducing a random factor based on the inverse Cauchy distribution to update the position of the wolf.
[0071] In an embodiment, the use of the optimal template image to generate a marked image comprises:
[0072] Calculate a cutting length according to any pin width and length of the measured chip in the target image;
[0073] Generate a rectangular region by using the cutting length, the pin width and the measured chip length with the best matching position of the optimal template image as a center, and rotate the rectangular region by the rotation angle of the optimal template image to obtain a rotated rectangular region.
[0074] Fill the rotated rectangular region with a preset color to obtain a mark image, and the preset color is not black.
[0075] In an embodiment, the extracting an effective contour picture in the effective rectangular character edge region comprises:
[0076] Screening a contour meeting a condition in the effective rectangular character edge region to obtain an effective contour picture.
[0077] The screening condition comprises: if the number of pixel points of the contour is greater than a preset number, the contour is regarded as an effective contour, and the preset number is a pixel number greater than the length of the rotated rectangle.
[0078] In an embodiment, the screening a character contour in the effective contour picture comprises:
[0079] Starting from a center row pixel of the effective contour picture, scanning the luminance value of each column pixel in each row pixel in an up-down alternating manner, and when the luminance value exceeds a preset luminance threshold, the corresponding pixel belongs to a character contour.
[0080] To further introduce the scheme of the embodiments of the present application, Figure 4 A rectangular chip back surface detection method based on an improved grey wolf optimization algorithm is provided, which comprises steps one to five, and the numbering of each step does not necessarily limit the execution sequence. Each step will be described in detail as follows:
[0081] Step one: collect an image of a measured chip as a target image, wherein the target image contains a front surface and a back surface of the measured chip, as shown in FIG. 2(a) and FIG. 2(b). Then, an OSTU threshold segmentation algorithm (Otsu algorithm) is used to obtain a binary image.
[0082] Step two: pre-process the target image after binary processing to remove noise interference and reduce the matching region to obtain a coarse region containing all targets. Specifically as follows:
[0083] The connected domain algorithm of the image is used to generate a label map and an area of each connected region in the binary image, and a statistical feature matrix of each connected region is obtained. The connected regions are screened according to a preset area threshold, and the screening condition is that the length and width parameters of the rectangular measured chip satisfy the preset area threshold, and the regions meeting the condition are retained. The bounding boxes of all selected regions are merged to obtain a coarse region containing all targets.
[0084] Step three: calculating the minimum circumscribed rectangle of the measured chip contour based on the rotating block algorithm, taking the midline of the short side of the minimum circumscribed rectangle as the main shaft, and taking the offset angle of the main shaft in the image coordinate system as the main shaft direction angle As shown in Figure 3 .
[0085] To improve the matching accuracy, an angle discretization sampling strategy is adopted: taking the main shaft direction angle as the initial coarse positioning parameter, and uniformly sampling in the interval with a step of 1° to generate 11 rotation angles, and drawing a rectangular template under each rotation angle according to the specification size parameters of the measured chip to obtain 11 candidate template images. The 11 candidate template images are adjusted finely by changing the angle by angle, which can more accurately match the actual measured chip shape, laying a foundation for subsequent accurate positioning.
[0086] Step four: calculating the similarity of each candidate template image and the target image based on the normalized cross-correlation method, taking the similarity as the fitness function of the grey wolf optimization algorithm, introducing the multi-armed tiger mechanism and the Sigmoid function to dynamically adjust the search direction and range, and designing a triangular optimization process, and using the improved grey wolf optimization algorithm to find the best matching candidate template image in the search space to realize accurate positioning. Specifically as follows:
[0087] (1) Within the size range of the target image, an initial solution of a grey wolf population is randomly generated for each candidate template image, and the population size is set to 10, and each grey wolf individual represents a solution of the target image movement. Each grey wolf individual contains two movement parameters and , corresponding to the horizontal and vertical directions of the target image respectively.
[0088] (2) The fitness function is constructed by using the normalized cross-correlation method, and the minimum value of the fitness is taken as the best matching result.
[0089] Specifically, the same size position in the candidate template image is extracted from the target image :
[0090] ,
[0091] wherein, is the pixel value in the candidate template image at coordinate , is the pixel value in the target image at coordinate , is the offset of the candidate template image in the x-axis direction under the coordinate system of the target image, is the offset of the candidate template image in the y-axis direction in the target image, and has , ; and are the number of rows and columns of pixels in the candidate template image, respectively.
[0092] The similarity between the candidate template image and the target image is calculated based on a normalized cross correlation (NCC) method :
[0093] ,
[0094] wherein, and are the pixel mean values of the candidate template image and the target image, respectively, and are the pixel variances of the candidate template image and the target image, respectively.
[0095] (3) The grey wolf algorithm is improved to find the best position of each wolf.
[0096] First, the multi-armed bandit algorithm is introduced to "gamble" the fitness of each wolf, that is, to balance the exploration and utilization of the search strategy of each wolf, so as to dynamically adjust its search direction and range. The process of selecting an arm (an arm represents an exploration operation) uses - a greedy strategy, with a probability randomly selecting an arm, with a probability selecting the arm with the highest average reward at present.
[0097] ,
[0098] wherein, is the arm selected for the time; is a randomly selected arm with a probability ; is the total number of arms in the multi-armed bandit algorithm, which is taken as 3 in this embodiment; represents the selection probability; is the average reward estimate value of the arm at the time of selection, and its calculation formula is:
[0099] ,
[0100] denotes the number of times the arm is selected at the th selection; denotes the reward obtained when selecting the arm at the th selection. For each arm , the policy is improved by constantly updating . After each selection, the reward estimate value of the arm is updated as:
[0101] .
[0102] At the position update, the corresponding strategy is selected according to the selected arm:
[0103] For the position update of the first arm, the triangle walk strategy is combined to walk around while approaching the optimal position. In the initial situation, the randomly selected individuals are respectively called wolf, wolf and wolf. According to the current positions of the three, a triangle is constructed by calculating the Euclidean distance between the three.
[0104] The Euclidean distance calculation formula between the three is as follows:
[0105] ,
[0106] where, , , are the Euclidean distances between wolf , , are the positions of wolf , , , which are the solutions of the fitness function,
[0107] denotes the Euclidean norm of the vector, is a randomly generated value from the interval [0,1] to introduce randomness and make the walk process not completely determined. In order to achieve diversity in the solution space, a random angle The cosine operation is further introduced to further introduce the spatial directionality change, and finally a new solution is obtained:
[0108] .
[0109] The first arm selects the update formula to calculate the new solution by weighted average and directionality correction, so as to balance between global search and local refinement.
[0110] The second arm is obtained according to the adaptive gravity coefficient And the optimal solution in the population Through the sorting of the fitness function of the three wolves, the position of the wolf with the minimum fitness value is the optimal solution, and then the current position is updated at each iteration:
[0111] .
[0112] The sigmoid function has the characteristics of smoothness, which can provide a gradual decreasing or increasing trend, According to the Sigmoid function:
[0113] ,
[0114] Where, is the slope of the sigmoid function, and in the embodiment , used to control the change rate of the gravity coefficient. is the maximum number of iterations, is the current number of iterations, Gradually changes from a higher value to a smaller value during iteration, and the change is smooth.
[0115] The third arm introduces a random factor based on the inverse distribution of Cauchy in the position update process to enhance the randomness and jumping of the search. In each iteration, the position update formula of the individual combines the current local optimal solution of the individual and the global information, and the formula is:
[0116] ,
[0117] Where, is the compression multiple, so that the individual does not deviate too far from the range; is a random factor based on the inverse distribution of Cauchy:
[0118] .
[0119] Step five: according to the position obtained by positioning, extract the chip body part, and propose a chip front and back detection method based on contour.
[0120] First, search for the optimal solution according to the improved grey wolf optimization algorithm.
[0121] The optimal solution for the NCC index is searched using the improved gray wolf optimization algorithm, i.e., the minimum value is found. The fitness function is:
[0122] .
[0123] The optimal position for each wolf is determined through iterative updates, which is then the best matching position for the corresponding candidate template image in the population, and the current fitness value is recorded. Similarly, the optimal matching position and corresponding fitness value for each of the 11 candidate template images can be calculated. After sorting these fitness values, the candidate template image corresponding to the smallest fitness value is selected as the optimal template image, and the rotation angle of this optimal template is then determined. Best matching position .
[0124] Secondly, based on the width of any pin inside the rectangular chip in the target image and pin length Calculate the cutting length :
[0125] .
[0126] When a rectangular chip has no pins inside, the width of each pin is equal to the width of the rectangular chip. same.
[0127] Utilizing cutting length as well as (Length of rectangular chip) and Generate a rotated rectangular region, wherein the side length of the rotated rectangular region is... The center point is the optimal matching position. and rotate the angle Rotate the area to obtain a rotating rectangular region. Adjust the pixel value of this rotating rectangular region to 255, that is, fill the region with white to obtain the marked image.
[0128] The Canny algorithm is used to process the target image to obtain the edge image.
[0129] By performing a bitwise AND operation on the marked image and the edge image, valid rectangular character edge regions are obtained. Contours are then extracted from these valid rectangular character edge regions, and contours that meet certain criteria are selected. The selection criteria are: if the number of pixels in a contour is greater than 40, the contour is considered a valid contour, and a valid contour image is obtained.
[0130] The effective contour image is scanned in an alternating manner, that is, starting from the center row, gradually shifting upwards and downwards. This alternating scanning strategy is implemented using an offset formula:
[0131] ,
[0132] wherein, is the number of scans requested, is half of the chip width, is the number of steps of the parity transform, varies from 0 to 4, ensuring that the center of the image and its upper and lower regions are effectively covered in the different areas of the line-by-line scanned image.
[0133] In the scanning process of each line, each column of the line is traversed and the brightness value of each pixel is checked. If the brightness value of the pixel is greater than a set threshold value 1, it indicates that the pixel belongs to the character contour. According to the comparison of the final number of character contours and the preset threshold value, it can be determined whether the chip is placed as the reverse side. The threshold value is half of the area of the rotating rectangular region described above. If the character contour is greater than the threshold value, it is the reverse side, otherwise it is the front side.
[0134] In view of the problems of uncertain direction of chip front and back, change of rotation angle, slow convergence speed of existing image matching algorithm in accurate matching template, and easy to fall into local optimum in the process of chip surface quality detection, the following solutions are proposed: by introducing the multi-armed bandit mechanism and Sigmoid function to dynamically adjust the search direction and range, the global search ability and dynamic adaptability of the algorithm are enhanced, and falling into local optimum is avoided, and the randomness and jumping of the search are enhanced by combining the triangular optimization process and the random factor of Cauchy inverse distribution, the search performance is further optimized, and the template matching is more rapid and accurate. A new chip reverse detection method is proposed: in view of the problem of uncertain direction of chip, a method for accurately positioning the direction of rectangular chip reverse side in complex environment is designed, which improves the adaptability and detection accuracy of the detection system to complex environment.
[0135] Specific implementation method two: refer to Figure 5 The rectangular chip reverse detection system described in this implementation method comprises:
[0136] An edge extraction module is configured to acquire an image of the chip to be detected as a target image, and extract an edge image of the target image.
[0137] A template generation module is configured to calculate a minimum circumscribed rectangle of a chip contour in the target image, and generate a plurality of candidate template images in a preset angle interval with the main axis direction angle of the minimum circumscribed rectangle as the center.
[0138] A template optimization module is configured to search for a candidate template image with the highest similarity to the target image as an optimal template image using an improved grey wolf optimization algorithm.
[0139] The contour extraction module is configured to generate a mark image by using the optimal template image, perform a bitwise AND operation on the mark image and the edge image, obtain an effective rectangular character edge region, and extract an effective contour picture in the effective rectangular character edge region.
[0140] The back surface detection module is configured to screen character contours in the effective contour picture, and if the number of the character contours is greater than a threshold value, the chip under test is a back surface.
[0141] Specific embodiment three: refer to Figure 6 The specific embodiment is explained, and the rectangular chip back surface detection device in the embodiment includes a processor and a memory. The memory stores at least one instruction. The at least one instruction is loaded and executed by the processor to implement the rectangular chip back surface detection method in the specific embodiment one.
[0142] Specific embodiment four: refer to Figure 7 The specific embodiment is explained, and the computer storage medium in the embodiment stores at least one instruction. The at least one instruction is loaded and executed by the processor to implement the rectangular chip back surface detection method in the specific embodiment one.
[0143] Although the present application is described herein with reference to particular embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present application. Therefore, it should be understood that many modifications can be made to the exemplary embodiments, and that other arrangements can be devised without departing from the spirit and scope of the present application as defined by the appended claims. It should be understood that different dependent claims and features described herein can be combined with each other in ways not expressly described. It should also be understood that features described in relation to one embodiment can be used in other embodiments.
Claims
1. A rectangular chip backside inspection method, characterized by, The method comprises the following steps: collecting an image of a measured chip as a target image and extracting an edge image of the target image; calculating a minimum circumscribed rectangle of a chip contour in the target image, and generating a plurality of candidate template images in a preset angle interval with the minimum circumscribed rectangle as the center of the main shaft direction angle; searching for a candidate template image with the highest similarity to the target image as an optimal template image using an improved grey wolf optimization algorithm; generating a mark image using the optimal template image, performing a bitwise AND operation on the mark image and the edge image to obtain an effective rectangular character edge region, and extracting an effective contour picture in the effective rectangular character edge region; screening character contours in the effective contour picture, and determining that the measured chip is a reverse surface if the number of the character contours is greater than a threshold value.
2. The rectangular chip backside inspection method according to claim 1, characterized by, The method comprises the following steps: calculating a minimum circumscribed rectangle of a chip contour in the target image based on a rotation jamming algorithm; constructing a preset angle interval with the main shaft direction angle of the minimum circumscribed rectangle as the center, uniformly sampling according to a preset step length, and generating a plurality of rotation angles; drawing a rectangular template under each rotation angle according to the specification size parameters of the measured chip to obtain a plurality of candidate template images.
3. The rectangular chip backside inspection method of claim 1, wherein The method comprises the following steps: randomly generating an initial grey wolf population for each candidate template image, and generating a search strategy for the optimal position of each wolf using a multi-armed tiger machine algorithm; calculating the similarity of each candidate template image to the target image based on a normalized cross-correlation method, and taking the candidate template image with the highest similarity as the optimal template image.
4. The rectangular chip backside inspection method according to claim 3, characterized by, The multi-armed bandit algorithm, comprising: - selecting an arm using a greedy policy with a probability - selecting an arm at random with a probability - selecting the arm with the highest average reward so far; The arm of the multi-armed tiger machine algorithm comprises one or more of a triangular wandering strategy arm, an adaptive gravity coefficient arm, and a random factor arm; The triangular wandering strategy arm comprises the following steps: randomly selecting three wolves and calculating the Euclidean distance between each two wolves, and updating the position of the wolf using the weighted combination of the average value of the three obtained Euclidean distances and the side length; The adaptive gravity coefficient arm comprises the following steps:
5. The rectangular chip backside inspection method of claim 1, wherein randomly selecting three wolves and taking the position of the wolf with the minimum fitness value as the optimal solution, calculating an adaptive gravity coefficient based on the smoothing property of a Sigmoid function, and updating the position of the wolf using the optimal solution and the adaptive gravity coefficient; The random factor arm comprises the following step: introducing a random factor based on the inverse distribution of Cauchy to update the position of the wolf. The method comprises the following steps: calculating a cutting length according to the width and length of any pin of the measured chip in the target image; taking the best matching position of the optimal template image as the center, generating a rectangular region using the cutting length, pin width, and measured chip length, and rotating the rectangular region by the rotation angle of the optimal template image to obtain a rotated rectangular region; filling the rotated rectangular region with a preset color to obtain a mark image.
6. The rectangular chip backside inspection method according to claim 5, characterized by, The extracting the effective contour picture in the effective rectangular character edge region comprises: Screening the contour meeting the condition in the effective rectangular character edge region to obtain the effective contour picture; The screening condition comprises: if the number of pixel points of the contour is greater than a preset number, the contour is regarded as an effective contour.
7. The rectangular chip backside inspection method according to claim 6, characterized by, The screening the character contour in the effective contour picture comprises: Taking the center row of pixels of the effective contour picture as a starting point, scanning the luminance value of each column of pixels in each row of pixels in an up-down alternating manner, and when the luminance value exceeds a preset luminance threshold, the corresponding pixel belongs to the character contour.
8. A rectangular chip backside inspection system characterized by, Comprise: An edge extraction module configured to acquire an image of a chip under test as a target image and extract an edge image of the target image; A template generation module configured to calculate a minimum circumscribed rectangle of a chip contour in the target image, and generate a plurality of candidate template images in a preset angle interval with a major axis direction angle of the minimum circumscribed rectangle as a center; A template optimization module configured to search for a candidate template image with the highest similarity to the target image as an optimal template image using an improved grey wolf optimization algorithm; A contour extraction module configured to generate a mark image using the optimal template image, perform a bitwise AND operation on the mark image and the edge image, obtain an effective rectangular character edge region, and extract an effective contour picture in the effective rectangular character edge region; A reverse surface detection module configured to screen a character contour in the effective contour picture, and if the number of the character contours is greater than a threshold, the chip under test is a reverse surface.
9. A rectangular chip backside inspection apparatus, characterized by, The rectangular chip reverse surface detection device comprises a processor and a memory, and the memory stores at least one instruction, which is loaded and executed by the processor to implement the rectangular chip reverse surface detection method of any one of claims 1 to 7.
10. A computer storage medium, characterized in that, The computer storage medium stores at least one instruction, which is loaded and executed by the processor to implement the rectangular chip reverse surface detection method of any one of claims 1 to 7.
Citation Information
Patent Citations
MELF (Metal Electrode Leadless Face) component positioning and detecting method based on match template
CN105046271A
Chip apparent defect detection method
CN109785316A