Method and system for inspecting residual film of IC (integrated circuit) support plate

By pre-processing, contour analysis and grayscale histogram analysis of the detection image of the IC carrier plate residual film, combined with pixel calculation and threshold judgment, the problem of the Canny algorithm being misjudged by ink when detecting the carrier plate residual film is solved, and the accuracy and reliability of the detection are improved.

CN119540205APending Publication Date: 2025-02-28SHENZHEN TECHSTAR PRECISION IND CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411679763.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the prior art, when the IC carrier plate residual film is detected by using the Canny algorithm, it is easy to be misjudged as the edge of the residual film by the ink position on the surface of the carrier plate, resulting in low detection accuracy or failure.

Method used

By obtaining the surface image of the IC carrier plate to be detected, performing pre-processing and contour analysis, using ellipse fitting and grayscale histogram analysis, combining pixel calculation and threshold judgment, we can distinguish residual film and ink, and improve detection accuracy.

Benefits of technology

The impact of the ink on the surface of the IC carrier plate and the color of the plastic seal on defect detection is effectively eliminated, which improves the accuracy of the detection and ensures the reliability of residual film detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540205A_ABST
    Figure CN119540205A_ABST
Patent Text Reader

Abstract

The invention discloses an IC carrier plate residual film inspection method and system. The method comprises the following steps: acquiring a surface image of a to-be-detected IC carrier plate; preprocessing the surface image of the IC carrier plate to be detected to obtain a first detection image; performing contour analysis according to the first detection image to obtain a residual film contour; performing ellipse fitting according to the plastic film residue contour to obtain an edge curve; performing graying processing on the edge curve to obtain a gray histogram; performing analysis according to the gray level histogram to obtain a second detection image; carrying out pixel calculation according to the second detection image to obtain a detection image pixel; judging according to the pixels of the detection image, and if the pixels of the detection image are greater than the first pixel threshold value and less than the second pixel threshold value, judging that defects exist; and if the pixel of the detected image is greater than the second pixel threshold value, judging that a defect exists and carrying out re-sticking prompt. According to the method, the influence of ink and the color of the plastic package body on detection can be effectively eliminated, and the detection accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip packaging technology, and in particular to a method and system for inspecting residual film on an IC substrate. Background Art

[0002] Chip packaging is an important part of improving chip yield and ensuring chip quality and reliability. At present, the industry generally uses lead frames as carriers to package chips. After chip packaging, the surface is covered with residual film (plastic package). After packaging, it is necessary to check whether the chip carrier is covered with residual film, the size and shape of the residual film, etc., to ensure that the residual film area meets the requirements and avoid affecting the secondary packaging and SMD welding of the chip. By using the differences in the properties of the carrier surface defects and the residual film, such as the color and shape of the residual film, the integrity and size of the residual film can be accurately detected through image processing methods.

[0003] The existing technology mainly uses visual inspection methods to detect residual film. By using the differences in the properties of the surface defects of the carrier board and the residual film, such as the color and shape of the residual film, the integrity and size of the residual film can be accurately detected through image processing methods. At present, edge detection algorithms such as the Canny algorithm are mainly used to detect residual film. The Canny algorithm is a multi-level gradient detection algorithm developed by John F. Canny in 1986. It uses the convolution of the Gaussian function as a spatial filter. It consists of the following processing steps: smoothing the image to remove noise; calculating the amplitude and direction of the gradient in the image; non-maximum suppression of the gradient amplitude; and detecting edges using a dual threshold algorithm. This method is more resistant to light than traditional operators, and a control algorithm can be designed to accurately extract edges and noise points at a suitable threshold.

[0004] However, in the prior art, since the Canny algorithm is used to perform edge detection on the residual film in the image defects, the ink position on the surface of the carrier will be detected, which will interfere with the residual film. Therefore, the Canny algorithm has low detection accuracy for the edge of the residual film remaining on the carrier, and may even lead to detection failure. Summary of the invention

[0005] The present invention provides an IC substrate residual film inspection method and system, so as to avoid the influence of ink and the color of plastic packaging body itself on defect detection and improve the accuracy of detection.

[0006] In a first aspect, in order to solve the above technical problems, the present invention provides a method for inspecting residual film on an IC substrate, comprising: Acquire a surface image of an IC substrate to be inspected; pre-process the surface image of the IC substrate to be inspected to obtain a first inspection image; perform contour analysis based on the first inspection image to obtain a residual film contour; perform ellipse fitting based on the residual film contour to obtain an edge curve; grayscale the edge curve to obtain a grayscale histogram; perform analysis based on the grayscale histogram to obtain a second inspection image; perform pixel calculation based on the second inspection image to obtain inspection image pixels; make a judgment based on the inspection image pixels, and if the inspection image pixels are greater than the first pixel threshold and less than the second pixel threshold, determine that there is a defect; if the inspection image pixels are greater than the second pixel threshold, determine that there is a defect and give a re-sticking prompt.

[0007] In a possible implementation of the first aspect, preprocessing the surface image of the IC substrate to be detected to obtain a first detection image includes: Calculating each pixel of the surface image of the IC substrate to be detected to obtain the image pixel grayscale value; Assign values ​​according to the grayscale values ​​of the image pixels to obtain a first detection image.

[0008] In a possible implementation manner of the first aspect, assigning values ​​according to the grayscale values ​​of the image pixels to obtain the first detection image includes: If the grayscale value of the image pixel satisfies the condition that it is less than the first grayscale threshold value and greater than 0, the grayscale value of the image pixel is modified to 255 to obtain a first foreground; If the grayscale value of the image pixel does not satisfy the condition that the grayscale value is less than the first grayscale threshold and greater than 0, the grayscale value of the image pixel is set to 0 to obtain a first background; Display is performed according to the first foreground and the first background to obtain a first detection image.

[0009] In a possible implementation manner of the first aspect, performing contour analysis according to the first detection image to obtain a residual film contour includes: Performing a Gaussian filter operation on the first detection image to obtain a denoised image; Calculating the denoised image to obtain a horizontal gradient value and a vertical gradient value; Calculating the denoised image to obtain a horizontal gradient value and a vertical gradient value; Calculating the horizontal gradient value and the vertical gradient value to obtain a gradient amplitude and a gradient direction; Performing non-maximum suppression processing according to the gradient amplitude and the gradient direction to obtain a gradient processed image; The gradient processed image is analyzed by a double threshold algorithm to obtain the residual film contour.

[0010] In a possible implementation manner of the first aspect, the horizontal gradient value, the vertical gradient value, the gradient amplitude, and the gradient direction are calculated by the following formula:

[0011]

[0012]

[0013]

[0014] in, Indicates the horizontal gradient value, Represents the Sobel template in the horizontal direction, and The index variable representing the sum of the Sobel template, Indicates that the image is at point The gray value at Indicates the vertical gradient value, Represents the Sobel template in the vertical direction; represents the gradient amplitude, Indicates the gradient direction.

[0015] In a possible implementation manner of the first aspect, before performing pixel calculation according to the second detection image to obtain detection image pixels, the method further includes: Get the effective area value of residual film; Calculate according to the residual film effective area value to obtain the maximum pixel point and the centroid pixel point; Calculating the distance between the maximum pixel point and the centroid pixel point to obtain a first distance, and making a judgment based on the first distance; If the first distance is less than a preset third pixel threshold, it is determined that the maximum pixel point does not belong to an area related to ink or plastic sealing body; If the first distance is greater than a preset third pixel threshold, the point corresponding to the maximum pixel is determined to be an edge point of ink or a plastic sealing body, and the grayscale value of the point corresponding to the maximum pixel is set to 0.

[0016] In a possible implementation manner of the first aspect, before obtaining the residual film effective area value, the method further includes: Obtain the pixel coordinates and number of pixels of the residual film contour; Perform mean calculation according to the residual film contour pixel coordinates and the number of residual film contour pixels to obtain the mean of the horizontal coordinate of the pixels on the contour and the mean of the vertical coordinate of the pixels on the contour; Judging whether the residual film area to be inspected meets the preset requirements is judged according to the mean value of the horizontal coordinates of the pixels on the contour, the mean value of the vertical coordinates of the pixels on the contour and the pre-stored data; When it is determined that the residual film area to be inspected meets the preset requirement, the residual film effective area value is obtained.

[0017] In a possible implementation manner of the first aspect, performing analysis according to the grayscale histogram to obtain a second detection image includes: Detect the grayscale histogram to obtain the maximum pixel grayscale value and the minimum pixel grayscale value; Subtracting the maximum pixel grayscale value from the minimum pixel grayscale value to obtain a first grayscale difference value; The first grayscale difference is calculated according to a preset proportional coefficient to obtain a second grayscale difference: Comparing the second grayscale difference with the grayscale value of the pixel in the grayscale histogram, if the grayscale value of the pixel in the grayscale histogram is greater than or equal to the second grayscale difference, setting the grayscale value of the pixel as the second foreground, otherwise setting it as the second background; The second foreground and the second background are displayed to obtain a second detection image.

[0018] In a second aspect, the present invention provides an IC substrate residual film inspection system, comprising: An image acquisition module is used to acquire the surface image of the IC substrate to be inspected; An image processing module, used for preprocessing the surface image of the IC substrate to be detected to obtain a first detection image; A data processing module, for performing contour analysis based on the first detection image to obtain a residual film contour; A data analysis module, used for performing ellipse fitting according to the residual film contour to obtain an edge curve; An image optimization module, used for graying the edge curve to obtain a grayscale histogram; An image generation module, used for analyzing the grayscale histogram to obtain a second detection image; A data calculation module, used for performing pixel calculation according to the second detection image to obtain detection image pixels; The result output module is used to make a judgment based on the detection image pixels. If the detection image pixels are greater than a first pixel threshold and less than a second pixel threshold, it is judged to be defective. If the detection image pixels are greater than the second pixel threshold, it is judged to be defective and a re-sticking prompt is given.

[0019] In a possible implementation of the second aspect, preprocessing the surface image of the IC substrate to be detected to obtain a first detection image includes: Calculating each pixel of the surface image of the IC substrate to be detected to obtain the image pixel grayscale value; Assign values ​​according to the grayscale values ​​of the image pixels to obtain a first detection image.

[0020] In a possible implementation manner of the second aspect, assigning values ​​according to the grayscale values ​​of the image pixels to obtain the first detection image includes: If the grayscale value of the image pixel satisfies the condition that it is less than the first grayscale threshold value and greater than 0, the grayscale value of the image pixel is modified to 255 to obtain a first foreground; If the grayscale value of the image pixel does not satisfy the condition that the grayscale value is less than the first grayscale threshold and greater than 0, the grayscale value of the image pixel is set to 0 to obtain a first background; Display is performed according to the first foreground and the first background to obtain a first detection image.

[0021] In a possible implementation manner of the second aspect, performing contour analysis according to the first detection image to obtain a residual film contour includes: Performing a Gaussian filter operation on the first detection image to obtain a denoised image; Calculating the denoised image to obtain a horizontal gradient value and a vertical gradient value; Calculating the denoised image to obtain a horizontal gradient value and a vertical gradient value; Calculating the horizontal gradient value and the vertical gradient value to obtain a gradient amplitude and a gradient direction; Performing non-maximum suppression processing according to the gradient amplitude and the gradient direction to obtain a gradient processed image; The gradient processed image is analyzed by a double threshold algorithm to obtain the residual film contour.

[0022] In a possible implementation manner of the second aspect, the horizontal gradient value, the vertical gradient value, the gradient amplitude, and the gradient direction are calculated by the following formula:

[0023]

[0024]

[0025]

[0026] in, Indicates the horizontal gradient value, Represents the Sobel template in the horizontal direction, and The index variable representing the sum of the Sobel template, Indicates that the image is at point The gray value at Indicates the vertical gradient value, Represents the Sobel template in the vertical direction; represents the gradient amplitude, Indicates the gradient direction.

[0027] In a possible implementation manner of the second aspect, before performing pixel calculation according to the second detection image to obtain detection image pixels, the method further includes: Get the effective area value of residual film; Calculate according to the residual film effective area value to obtain the maximum pixel point and the centroid pixel point; Calculating the distance between the maximum pixel point and the centroid pixel point to obtain a first distance, and making a judgment based on the first distance; If the first distance is less than a preset third pixel threshold, it is determined that the maximum pixel point does not belong to an area related to ink or plastic sealing body; If the first distance is greater than a preset third pixel threshold, the point corresponding to the maximum pixel is determined to be an edge point of ink or a plastic sealing body, and the grayscale value of the point corresponding to the maximum pixel is set to 0.

[0028] In a possible implementation manner of the second aspect, before obtaining the residual film effective area value, the method further includes: Obtain the pixel coordinates and number of pixels of the residual film contour; Perform mean calculation according to the residual film contour pixel coordinates and the number of residual film contour pixels to obtain the mean of the horizontal coordinate of the pixels on the contour and the mean of the vertical coordinate of the pixels on the contour; Judging whether the residual film area to be inspected meets the preset requirements is judged according to the mean value of the horizontal coordinates of the pixels on the contour, the mean value of the vertical coordinates of the pixels on the contour and the pre-stored data; When it is determined that the residual film area to be inspected meets the preset requirement, the residual film effective area value is obtained.

[0029] In a possible implementation manner of the second aspect, the performing analysis according to the grayscale histogram to obtain the second detection image includes: Detect the grayscale histogram to obtain the maximum pixel grayscale value and the minimum pixel grayscale value; Subtracting the maximum pixel grayscale value from the minimum pixel grayscale value to obtain a first grayscale difference value; The first grayscale difference is calculated according to a preset proportional coefficient to obtain a second grayscale difference: Comparing the second grayscale difference with the grayscale value of the pixel in the grayscale histogram, if the grayscale value of the pixel in the grayscale histogram is greater than or equal to the second grayscale difference, setting the grayscale value of the pixel as the second foreground, otherwise setting it as the second background; The second foreground and the second background are displayed to obtain a second detection image.

[0030] In a third aspect, the present invention further provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any one of the above-mentioned methods for inspecting residual film on an IC substrate when executing the computer program.

[0031] In a fourth aspect, the present invention further provides a computer-readable storage medium, the computer-readable storage medium comprising a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned methods for inspecting residual film on an IC substrate.

[0032] Compared with the prior art, the present invention has the following beneficial effects: The present invention starts with obtaining the surface image of the IC carrier to be detected, and then pre-processes the image by calculating the grayscale value of each pixel and assigning a value. The grayscale value of pixels that meet the requirements of being less than the first grayscale threshold and greater than 0 is modified to 255 as the first foreground, and those that do not meet the requirements are set to 0 as the first background, thereby obtaining a first detection image. Then, the first detection image is subjected to Gaussian filtering for noise reduction, and the horizontal gradient value and the vertical gradient value are calculated using a formula, and then the gradient amplitude and the gradient direction are further calculated. The residual film contour is obtained by non-maximum suppression processing and double threshold algorithm analysis. After that, the edge curve is obtained according to the residual film contour ellipse fitting, and the grayscale is processed to obtain a grayscale histogram. The maximum and minimum pixel grayscale values ​​are obtained by detecting the histogram and the first grayscale difference is obtained by difference, and the second grayscale difference is calculated. The second foreground and the second background are set by comparing the grayscale values ​​to obtain the second detection image. Before calculating the detection image pixels, first obtain the number of pixels of the residual film contour to calculate the mean value of the horizontal coordinate and the mean value of the vertical coordinate of the pixels on the contour, compare with the pre-stored data, and obtain the effective area value of the residual film after meeting the preset requirements. Calculate the distance between the maximum pixel and the centroid pixel based on this, and judge whether the maximum pixel belongs to the ink or plastic seal related area based on the distance, and then adjust the pixel gray value. Finally, calculate the detection image pixels based on the second detection image, and judge based on the pixel value. If it is greater than the first pixel threshold and less than the second pixel threshold, it is judged as defective, and if it is greater than the second pixel threshold, it is judged as defective and a re-sticking prompt is given. The present invention effectively eliminates the influence of the ink on the surface of the IC carrier and the color of the plastic seal itself on defect detection by judging the surrounding area of ​​the residual film, thereby improving the accuracy of detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a schematic flow chart of a residual film inspection method for an IC substrate provided by a first embodiment of the present invention; Figure 2 It is a schematic diagram of the structure of an IC substrate residual film inspection system provided by the second embodiment of the present invention. DETAILED DESCRIPTION

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

[0035] Reference Figure 1 The first embodiment of the present invention provides a method for inspecting residual film on an IC substrate, comprising the following steps: S1, obtaining the surface image of the IC substrate to be inspected; S2, preprocessing the surface image of the IC substrate to be detected to obtain a first detection image; S3, performing contour analysis according to the first detection image to obtain a residual film contour; S4, performing ellipse fitting according to the residual film contour to obtain an edge curve; S5, graying the edge curve to obtain a grayscale histogram; S6, analyzing according to the grayscale histogram to obtain a second detection image; S7, performing pixel calculation according to the second detection image to obtain detection image pixels; S8, judging according to the detection image pixel, if the detection image pixel is greater than the first pixel threshold and less than the second pixel threshold, it is judged as defective; if the detection image pixel is greater than the second pixel threshold, it is judged as defective and a re-sticking prompt is given.

[0036] In step S1, a surface image of an IC substrate to be inspected is obtained.

[0037] It should be noted that the surface image of the IC carrier to be inspected refers to an image obtained by photographing or scanning the surface of the IC carrier through a specific device, and the image can clearly present various features of the surface of the IC carrier, including circuits, solder joints, gold dots, logos, scratches, cracks, bulges, depressions and other details, so as to detect and evaluate the quality and performance of the IC carrier. In a specific embodiment, the process of acquiring the surface image of the IC carrier to be inspected is to place the IC carrier on the stage of a microscope, adjust the focus, light source brightness and contrast and other parameters to obtain a clear image, and then use a camera or eyepiece to directly observe and record the image.

[0038] In step S2, the surface image of the IC substrate to be inspected is preprocessed to obtain a first inspection image.

[0039] In the above step S2, the preprocessing of the surface image of the IC substrate to be detected to obtain the first detection image specifically includes the following steps: S21, acquiring each pixel of the surface image of the IC substrate to be inspected.

[0040] It should be noted that each pixel of the surface image of the IC substrate to be tested is the smallest basic unit of the image, which carries specific color and brightness information and together constitutes a complete surface image of the IC substrate. The main acquisition process is to use an electron microscope to scan the sample surface with an electron beam. The electrons interact with the sample to generate secondary electrons, backscattered electrons and other signals. The detector collects these signals and converts them into electrical signals, which are then processed and amplified and finally converted into pixel values.

[0041] S22, calculating each pixel of the surface image of the IC substrate to be detected to obtain the grayscale value of the image pixel.

[0042] It should be noted that the grayscale value ranges from 0 to 255, where 0 represents black, that is, the pixel does not emit light or reflects the weakest light; 255 represents white, that is, the pixel emits the strongest light or reflects the strongest light; and the values ​​between 0 and 255 represent different degrees of gray, the larger the value, the lighter the gray and the higher the brightness. Using an image sensor in an optical microscope or an automatic optical inspection (AOI) system, when light passes through the optical system to the surface of the IC carrier and is reflected into the sensor, each photosensitive unit will generate a corresponding charge or current signal according to the received light intensity. After analog-to-digital conversion, the grayscale value or RGB value of the corresponding pixel is obtained.

[0043] S23, assigning values ​​according to the grayscale values ​​of the image pixels to obtain a first detection image.

[0044] In one implementation, assigning values ​​according to the grayscale values ​​of the image pixels to obtain the first detection image specifically includes: assigning values ​​according to the grayscale values ​​of the image pixels; if the grayscale value of the image pixels satisfies a condition that is less than a first grayscale threshold and greater than 0, modifying the grayscale value of the image pixels to 255 to obtain a first foreground; and displaying according to the first foreground and the first background to obtain a first detection image.

[0045] It is worth mentioning that the foreground is the core and focus of the picture, while the background is the auxiliary element. The two cooperate with each other to form a complete picture. In picture processing, it is necessary to highlight the subject of the foreground and reasonably process the background to achieve a clear distinction between the primary and the secondary. The color, contrast, clarity and other factors of the foreground and background affect each other. Reasonable adjustment of the relationship between the foreground and the background can enhance the overall effect of the picture, such as highlighting the clarity of the foreground by adjusting the degree of blurring of the background, or enhancing the contrast of the picture by adjusting the color of the background to contrast with the foreground.

[0046] In step S3, a contour analysis is performed based on the first detection image to obtain a residual film contour; In the above step S3, the contour analysis is performed according to the first detection image to obtain the residual film contour, which specifically includes the following steps: S31, performing a Gaussian filtering operation on the first detection image to obtain a denoised image.

[0047] S32, calculating the denoised image using a formula to obtain a horizontal gradient value and a vertical gradient value.

[0048] It should be noted that the horizontal gradient value and the vertical gradient value are obtained by calculating the denoised image using the following formula:

[0049]

[0050] in, Indicates the horizontal gradient value, Represents the Sobel template in the horizontal direction, and The index variable representing the sum of the Sobel template, Indicates that the image is at point The gray value at Indicates the vertical gradient value, Represents the Sobel mask in the vertical direction.

[0051] It is worth noting that the horizontal gradient value of a certain pixel in the image indicates the grayscale change degree of the pixel in the horizontal direction. It reflects the characteristics of the image such as light and dark changes and edge information in the horizontal direction. The vertical gradient value refers to the grayscale change degree of a certain pixel in the image in the vertical direction, reflecting the characteristics of the image such as light and dark transition, edge and texture in the vertical direction. The horizontal gradient value and the vertical gradient value together constitute the gradient information of the image. The two complement each other and fully describe the changes of the pixel grayscale in the horizontal and vertical directions in the image. Through the comprehensive analysis of the horizontal gradient value and the vertical gradient value, we can have a more comprehensive understanding of the structure and characteristics of the image.

[0052] The calculation formula used in this embodiment is a mathematical description based on the change of image brightness or color, which can accurately capture the change direction and speed in the image. The Sobel operator is a commonly used method for calculating image gradients, and the horizontal gradient value and the vertical gradient value can be obtained by weighted difference.

[0053] S33, calculating the horizontal gradient value and the vertical gradient value by a formula to obtain a gradient amplitude and a gradient direction.

[0054] It should be noted that the horizontal gradient value and the vertical gradient value are calculated by the following formula to obtain the gradient amplitude and the gradient direction:

[0055]

[0056] in, represents the gradient amplitude, represents the gradient direction, Indicates the horizontal gradient value, Indicates the vertical gradient value.

[0057] It is worth noting that the gradient amplitude refers to the size of the gradient at a certain point in the image, reflecting the intensity of the grayscale change at that point. The larger the gradient amplitude, the more obvious the grayscale change at that point, corresponding to the edge, texture and other feature areas in the image; while the area with a smaller gradient amplitude indicates that the grayscale change is relatively gentle, which is the smooth area or background area in the image. The gradient amplitude can be used for image enhancement and sharpening operations. By enhancing the area with a larger gradient amplitude, the details and edge information of the image can be highlighted, making the image clearer.

[0058] The gradient direction refers to the direction in which the grayscale changes fastest at a certain point in the image, that is, the direction of the gradient vector. It indicates the trend of grayscale changes in the image and is closely related to the direction of image features such as edges and textures. In edge detection, the gradient direction can help determine the direction of the edge, and thus better connect and describe the edge. In image texture analysis, the gradient direction can reflect the direction and distribution of the texture, providing a basis for the extraction and analysis of texture features.

[0059] In the calculation formula used in this embodiment, the former is based on the Pythagorean theorem, which is essentially the calculation of the distance between two points in Euclidean space, and the latter is based on the inverse tangent function, which calculates the angle of the gradient vector according to the x component and y component of the gradient.

[0060] S34, performing non-maximum suppression processing according to the gradient amplitude and the gradient direction to obtain a gradient processed image.

[0061] In one implementation, performing non-maximum suppression processing according to the gradient amplitude and the gradient direction to obtain a gradient-processed image includes: discretizing the gradient direction to obtain a horizontal direction (0° or 180°), a vertical direction (90° or 270°), a positive diagonal direction (45° or 225°), and a negative diagonal direction (135° or 315°); traversing each pixel point in the image and comparing each pixel point according to its discretized gradient direction; if the gradient amplitude of the pixel point is greater than the gradient amplitudes of its two adjacent pixel points in the gradient direction, retaining the gradient amplitude of the pixel point; otherwise, setting the gradient amplitude of the pixel point to 0; the gradient amplitudes of all pixel points constitute the gradient-processed image.

[0062] S35, analyzing the gradient processed image by a dual threshold algorithm to obtain a residual film contour.

[0063] In one implementation, analyzing the gradient processed image through a dual threshold algorithm to obtain the residual film contour includes: determining a high threshold value according to the gradient processed image. and a low threshold , traverse each pixel in the image, according to the gradient amplitude and the high threshold and the lower threshold Compare; if the gradient amplitude of the pixel point is greater than the high threshold , then the pixel is marked as a strong edge point; if the gradient amplitude of the pixel is less than the high threshold But greater than the lower threshold , then the pixel is marked as a weak edge point; if the gradient amplitude of the pixel is less than the low threshold , then mark the pixel point as a non-edge point; and determine the residual film contour according to the pixels of the strong edge point, the weak edge point and the non-edge point.

[0064] In step S4, an ellipse fitting is performed according to the residual film contour to obtain an edge curve; In one implementation, performing ellipse fitting according to the residual film contour to obtain an edge curve includes: judging the residual film contour against preset conditions; performing ellipse fitting on the residual film contour that meets the preset conditions using the least squares method to obtain fitting ellipse equation parameters; and eliminating flying edge point pixels according to the fitting ellipse equation parameters to obtain an edge curve.

[0065] In step S5, the edge curve is grayed to obtain a grayscale histogram; Exemplarily, during the grayscale processing, a weighted average method or the like is used to calculate the corresponding grayscale value according to the red (R), green (G), and blue (B) channel values ​​of each pixel in the edge curve, thereby obtaining a grayscale histogram.

[0066] In step S6, analyzing is performed according to the grayscale histogram to obtain a second detection image; In the above step S6, the step of analyzing the grayscale histogram to obtain the second detection image specifically includes the following steps: S61, detecting the grayscale histogram to obtain the maximum pixel grayscale value and the minimum pixel grayscale value.

[0067] S62, subtract the maximum pixel grayscale value from the minimum pixel grayscale value to obtain a first grayscale difference value.

[0068] S63, calculating the first grayscale difference according to a preset proportionality coefficient to obtain a second grayscale difference.

[0069] It should be noted that the second grayscale difference is obtained by calculating the first grayscale difference using the following formula:

[0070] in, Represents the second grayscale difference, Represents the first grayscale difference.

[0071] S64, comparing the second grayscale difference with the pixel grayscale value in the grayscale histogram, if the pixel grayscale value in the grayscale histogram is greater than or equal to the second grayscale difference, setting the pixel grayscale value as the second foreground, otherwise, setting it as the second background.

[0072] S65: Display the second foreground and the second background to obtain a second detection image.

[0073] Exemplarily, the grayscale histogram is analyzed, and the range or threshold of the grayscale value is determined according to the image brightness distribution and contrast reflected by it. For example, if a specific target in the image is to be highlighted, the threshold can be set according to the grayscale distribution corresponding to the target area in the histogram. The original grayscale image is processed using the information obtained from the analysis, such as binarization (dividing pixels into two categories, target and background, according to the threshold) or grayscale adjustment operation, to obtain a second detection image.

[0074] In step S7, pixel calculation is performed according to the second detection image to obtain detection image pixels; In a specific embodiment, the width of the image is known. (in pixels) and height (in pixels), then the total number of pixels in the image You can use the formula For example, if the width of an image is 80 pixels and the height is 60 pixels, then the total number of pixels is Pixel.

[0075] It should be noted that, in the above step S7, before performing pixel calculation according to the second detection image to obtain the detection image pixels, the following steps are also included: S71, obtaining the residual film effective area value.

[0076] In the above step S71, before obtaining the residual film effective area value, the following steps are also included: S711, obtaining the number of pixels of the residual film contour.

[0077] S712, calculating the number of pixels of the residual film contour by a formula to obtain the mean value of the horizontal coordinates of the pixels on the contour and the mean value of the vertical coordinates of the pixels on the contour.

[0078] It should be noted that the number of pixels of the residual film contour is calculated by the following formula to obtain the mean value of the horizontal coordinate of the pixels on the contour and the mean value of the vertical coordinate of the pixels on the contour:

[0079]

[0080] in, Represents the mean value of the horizontal coordinate of the pixels on the contour, Represents the mean vertical coordinate of pixels on the contour, Indicates the pixel coordinates of the residual film contour, Indicates the number of pixels of the residual film outline.

[0081] S713, judging whether the residual film area to be inspected meets preset requirements according to the mean value of the horizontal coordinates of the pixels on the contour, the mean value of the vertical coordinates of the pixels on the contour and pre-stored data.

[0082] It should be noted that the preset requirement means that for each pixel point, the mean value of the horizontal coordinate of the pixels on the contour, the mean value of the vertical coordinate of the pixels on the contour, and the second distance are calculated. If the mean value of the horizontal coordinate of the pixels on the contour, the mean value of the vertical coordinate of the pixels on the contour, and the second distance meet , it is determined that the preset requirements are met, otherwise the preset requirements are not met.

[0083] in It is pre-stored data, indicating the distance between the mean value of the horizontal coordinate and the mean value of the vertical coordinate of the contour pixels.

[0084] S714, when it is determined that the residual film area to be inspected meets the preset requirement, obtaining the residual film effective area value.

[0085] S72, calculating according to the residual film effective area value to obtain the maximum pixel point and the centroid pixel point.

[0086] It should be noted that the maximum pixel refers to the point with the highest pixel value (brightness, intensity or color) in a specific area of ​​the image. In grayscale images, it refers to the point with the highest brightness; in color images, it refers to the brightest or most saturated point. The centroid pixel (also called the centroid or geometric center) is the average value of the coordinates of all pixels in an area. It represents the geometric center of the area, similar to the center of gravity of an object.

[0087] S73, calculating the maximum pixel point and the centroid pixel point using a formula to obtain a first distance.

[0088] It should be noted that the first distance is obtained by calculating the maximum pixel point and the centroid pixel point using the following formula:

[0089] in, represents the first distance, Indicates the maximum pixel coordinates, Represents the centroid pixel coordinates.

[0090] S74, making a judgment according to the first distance; S75: If the first distance is less than a preset third pixel threshold, it is determined that the maximum pixel point does not belong to an area related to ink or plastic sealing body.

[0091] S76, if the first distance is greater than a preset third pixel threshold, determine that the point corresponding to the maximum pixel is an edge point of ink or plastic sealing body, and set the gray value of the point corresponding to the maximum pixel to 0.

[0092] It should be noted that the third pixel threshold refers to a value between 130 and 150 set according to detection requirements.

[0093] In step S8, a judgment is made based on the detection image pixels. If the detection image pixels are greater than the first pixel threshold and less than the second pixel threshold, it is determined to be defective; if the detection image pixels are greater than the second pixel threshold, it is determined to be defective and a re-sticking prompt is given. The following describes the working process of the present invention using a more common scenario as an example. Please also refer to Figure 2 , which is Figure 1 Schematic diagram of the working scenario of the method.

[0094] In a specific embodiment, the working process of the present invention includes: the computer first obtains the surface image of the IC carrier to be detected, calculates the grayscale value of each pixel, sets the grayscale value that is less than the first grayscale threshold and greater than 0 to 255, obtains the first foreground, and sets the others to 0, obtains the first background, and forms the first detection image. After Gaussian filtering of the first detection image, the horizontal and vertical gradient values, gradient amplitude and direction are calculated, and the residual film contour is obtained through non-maximum suppression and double threshold algorithm analysis. The residual film contour ellipse is fitted to obtain the edge curve, and then the edge curve is grayed to obtain a grayscale histogram. According to the grayscale histogram, the maximum pixel grayscale value and the minimum pixel grayscale value are detected, and the first grayscale difference is obtained after the difference. The second grayscale difference is calculated based on the first grayscale difference, and the grayscale histogram is used accordingly. Figure 2 The second detection image is obtained by quantization. The second distance is used for judgment, and after eliminating the influence of the ink and the color pixels of the plastic package itself, the second detection image pixels are calculated. According to the pixel value, if it is greater than the first pixel threshold and less than the second pixel threshold, it is judged as defective. If it is greater than the second pixel threshold, it is judged as defective and a re-sticking prompt is given.

[0095] In summary, the present invention discloses a method for inspecting residual film on an IC carrier, comprising obtaining a surface image of an IC carrier to be inspected; preprocessing the surface image of the IC carrier to be inspected to obtain a first inspection image; performing contour analysis based on the first inspection image to obtain a residual film contour; performing ellipse fitting based on the residual film contour to obtain an edge curve; graying the edge curve to obtain a grayscale histogram; analyzing based on the grayscale histogram to obtain a second inspection image; performing pixel calculation based on the second inspection image to obtain inspection image pixels; judging based on the inspection image pixels, if the inspection image pixels are greater than the first pixel threshold and less than the second pixel threshold, it is determined to be defective; if the inspection image pixels are greater than the second pixel threshold, it is determined to be defective and a re-sticking prompt is given. The present invention starts with obtaining a surface image of an IC carrier to be inspected, and then preprocesses the image by calculating the grayscale value of each pixel and assigning a value, and the grayscale value of the pixel that satisfies the condition that the pixel is less than the first grayscale threshold and greater than 0 is modified to 255 as the first foreground, and the pixel that does not meet the condition is set to 0 as the first background, thereby obtaining the first inspection image. Then, the first detection image is subjected to Gaussian filtering for noise reduction, and the horizontal gradient value and vertical gradient value are calculated using a specific formula, and then the gradient amplitude and gradient direction are further calculated. The residual film contour is obtained through non-maximum suppression processing and double threshold algorithm analysis. After that, the edge curve is obtained according to the residual film contour ellipse fitting, and the grayscale is processed to obtain a grayscale histogram. The maximum and minimum pixel grayscale values ​​are obtained from the detection histogram, and the first grayscale difference is obtained by difference, and the second grayscale difference is calculated. The second foreground and the second background are set by comparing the grayscale values ​​to obtain the second detection image. Before calculating the pixels of the detection image, the number of pixels of the residual film contour is first obtained to calculate the mean horizontal and vertical coordinates of the pixels on the contour, and compared with the pre-stored data. After meeting the preset requirements, the effective area value of the residual film is obtained, and the distance between the maximum pixel point and the centroid pixel point is calculated based on this. According to the distance, it is judged whether the maximum pixel point belongs to the ink or plastic sealing body related area, and then the pixel grayscale value is adjusted. Finally, the detection image pixels are calculated based on the second detection image, and the pixel value is judged according to the pixel value. If it is greater than the first pixel threshold and less than the second pixel threshold, it is judged to be defective, and if it is greater than the second pixel threshold, it is judged to be defective and a re-sticking prompt is given. The present invention effectively eliminates the influence of the ink on the surface of the IC carrier and the color of the plastic package itself on defect detection by judging the surrounding area of ​​the residual film, thereby improving the accuracy of detection.

[0096] Reference Figure 2 The second embodiment of the present invention provides an IC substrate residual film inspection system, comprising: An image acquisition module 101 is used to acquire a surface image of an IC substrate to be inspected; An image processing module 102 is used to pre-process the surface image of the IC substrate to be detected to obtain a first detection image; Data processing module 103, for performing contour analysis based on the first detection image to obtain a residual film contour; A data analysis module 104 is used to perform ellipse fitting according to the residual film contour to obtain an edge curve; An image optimization module 105 is used to grayscale the edge curve to obtain a grayscale histogram; An image generation module 106, configured to perform analysis based on the grayscale histogram to obtain a second detection image; A data calculation module 107, configured to perform pixel calculation according to the second detection image to obtain detection image pixels; The result output module 108 is used to make a judgment based on the detection image pixels. If the detection image pixels are greater than the first pixel threshold and less than the second pixel threshold, it is judged to be defective. If the detection image pixels are greater than the second pixel threshold, it is judged to be defective and a re-sticking prompt is given.

[0097] It should be noted that an IC substrate residual film inspection system provided in an embodiment of the present invention is used to execute all process steps of an IC substrate residual film inspection method in the above embodiment, and the working principles and beneficial effects of the two correspond one to one, so they will not be repeated.

[0098] The embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as an IC substrate residual film inspection program. When the processor executes the computer program, the steps in the above-mentioned IC substrate residual film inspection method embodiments are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are realized, such as the image processing module.

[0099] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.

[0100] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0101] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

[0102] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0103] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0104] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0105] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for inspecting residual film on an IC substrate, characterized in that: Executed by a computer, including: Acquire the surface image of the IC substrate to be inspected; Preprocessing the surface image of the IC substrate to be inspected to obtain a first inspection image; Performing contour analysis according to the first detection image to obtain a residual film contour; Performing ellipse fitting according to the residual film contour to obtain an edge curve; Graying the edge curve to obtain a grayscale histogram; Analyze according to the grayscale histogram to obtain a second detection image; Perform pixel calculation according to the second detection image to obtain detection image pixels; A judgment is made based on the detection image pixels. If the detection image pixels are greater than the first pixel threshold and less than the second pixel threshold, it is determined to be defective. If the detection image pixels are greater than the second pixel threshold, it is determined to be defective and a re-sticking prompt is given.

2. The method for inspecting residual film on an IC substrate according to claim 1, characterized in that: The preprocessing of the surface image of the IC substrate to be detected to obtain a first detection image includes: Calculating each pixel of the surface image of the IC substrate to be detected to obtain the image pixel grayscale value; Assign values ​​according to the grayscale values ​​of the image pixels to obtain a first detection image.

3. The method for inspecting residual film on an IC substrate according to claim 2, characterized in that: The step of assigning values ​​according to the grayscale values ​​of the pixels of the image to obtain a first detection image includes: If the grayscale value of the image pixel satisfies the condition that it is less than the first grayscale threshold value and greater than 0, the grayscale value of the image pixel is modified to 255 to obtain a first foreground; If the grayscale value of the image pixel does not satisfy the condition that the grayscale value is less than the first grayscale threshold and greater than 0, the grayscale value of the image pixel is set to 0 to obtain a first background; Display is performed according to the first foreground and the first background to obtain a first detection image.

4. The method for inspecting residual film on an IC substrate according to claim 1, characterized in that: The performing contour analysis according to the first detection image to obtain the residual film contour includes: Performing a Gaussian filter operation on the first detection image to obtain a denoised image; Calculating the denoised image to obtain a horizontal gradient value and a vertical gradient value; Calculating the denoised image to obtain a horizontal gradient value and a vertical gradient value; Calculating the horizontal gradient value and the vertical gradient value to obtain a gradient amplitude and a gradient direction; Performing non-maximum suppression processing according to the gradient amplitude and the gradient direction to obtain a gradient processed image; The gradient processed image is analyzed by a double threshold algorithm to obtain the residual film contour.

5. The method for inspecting residual film on an IC substrate according to claim 4, characterized in that: The horizontal gradient value, vertical gradient value, gradient amplitude and gradient direction are calculated by the following formula: in, Indicates the horizontal gradient value, Represents the Sobel template in the horizontal direction, and The index variable representing the sum of the Sobel template, Indicates that the image is at point The gray value at Indicates the vertical gradient value, Represents the Sobel template in the vertical direction; represents the gradient amplitude, Indicates the gradient direction.

6. The method for inspecting residual film on an IC substrate according to claim 1, characterized in that: Before performing pixel calculation according to the second detection image to obtain detection image pixels, the method further includes: Get the effective area value of residual film; Calculate according to the residual film effective area value to obtain the maximum pixel point and the centroid pixel point; Calculating the distance between the maximum pixel point and the centroid pixel point to obtain a first distance, and making a judgment based on the first distance; If the first distance is less than a preset third pixel threshold, it is determined that the maximum pixel point does not belong to an area related to ink or plastic sealing body; If the first distance is greater than a preset third pixel threshold, the point corresponding to the maximum pixel is determined to be an edge point of ink or a plastic sealing body, and the grayscale value of the point corresponding to the maximum pixel is set to 0.

7. The method for inspecting residual film on an IC substrate according to claim 5, characterized in that: Before obtaining the residual film effective area value, the method further includes: Obtain the pixel coordinates and number of pixels of the residual film contour; Perform mean calculation according to the residual film contour pixel coordinates and the number of residual film contour pixels to obtain the mean of the horizontal coordinate of the pixels on the contour and the mean of the vertical coordinate of the pixels on the contour; Judging whether the residual film area to be inspected meets the preset requirements is judged according to the mean value of the horizontal coordinates of the pixels on the contour, the mean value of the vertical coordinates of the pixels on the contour and the pre-stored data; When it is determined that the residual film area to be inspected meets the preset requirement, the residual film effective area value is obtained.

8. The method for inspecting residual film on an IC substrate according to claim 1, characterized in that: The step of analyzing the grayscale histogram to obtain a second detection image includes: Detect the grayscale histogram to obtain the maximum pixel grayscale value and the minimum pixel grayscale value; Subtracting the maximum pixel grayscale value from the minimum pixel grayscale value to obtain a first grayscale difference value; The first grayscale difference is calculated according to a preset proportional coefficient to obtain a second grayscale difference: Comparing the second grayscale difference with the grayscale value of the pixel in the grayscale histogram, if the grayscale value of the pixel in the grayscale histogram is greater than or equal to the second grayscale difference, setting the grayscale value of the pixel as the second foreground, otherwise setting it as the second background; The second foreground and the second background are displayed to obtain a second detection image.

9. An IC substrate residual film inspection system, characterized in that: include: An image acquisition module is used to acquire the surface image of the IC substrate to be inspected; An image processing module, used for preprocessing the surface image of the IC substrate to be detected to obtain a first detection image; A data processing module, for performing contour analysis based on the first detection image to obtain a residual film contour; A data analysis module, used for performing ellipse fitting according to the residual film contour to obtain an edge curve; An image optimization module, used for graying the edge curve to obtain a grayscale histogram; An image generation module, used for analyzing the grayscale histogram to obtain a second detection image; A data calculation module, used for performing pixel calculation according to the second detection image to obtain detection image pixels; The result output module is used to make a judgment based on the detection image pixels. If the detection image pixels are greater than a first pixel threshold and less than a second pixel threshold, it is judged to be defective. If the detection image pixels are greater than the second pixel threshold, it is judged to be defective and a re-sticking prompt is given.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for inspecting residual film on an IC substrate as claimed in any one of claims 1 to 8.

Citation Information

Cited By

  • Double-cavity catheter positioning system based on image registration

    CN120053842A