CN117437238B - Visual inspection method for surface defects of packaged IC - Google Patents

Visual inspection method for surface defects of packaged IC Download PDF

Info

Publication number
CN117437238B
CN117437238B CN202311773843.0A CN202311773843A CN117437238B CN 117437238 B CN117437238 B CN 117437238B CN 202311773843 A CN202311773843 A CN 202311773843A CN 117437238 B CN117437238 B CN 117437238B
Authority
CN
China
Prior art keywords
gray
gray level
packaged
image
histogram
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311773843.0A
Other languages
Chinese (zh)
Other versions
CN117437238A (en
Inventor
程伟
杨丽丹
杨顺作
杨丽香
杨金燕
杨丽霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Baoming Microelectronic Co ltd
Original Assignee
Shenzhen Baoming Microelectronic Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Baoming Microelectronic Co ltd filed Critical Shenzhen Baoming Microelectronic Co ltd
Priority to CN202311773843.0A priority Critical patent/CN117437238B/en
Publication of CN117437238A publication Critical patent/CN117437238A/en
Application granted granted Critical
Publication of CN117437238B publication Critical patent/CN117437238B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30148Semiconductor; IC; Wafer
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a visual detection method for surface defects of a packaged IC, which comprises the following steps: obtaining a gradient histogram of the packaged IC gray level image and a gray level histogram of the packaged IC gray level image, obtaining derivatives of all gray levels in continuous gray level intervals according to the gray level histogram, obtaining a first influence factor and a second influence factor, obtaining corresponding gray levels after gray level equalization according to the first influence factor and the second influence factor, and performing defect detection on the reinforced packaged IC gray level image. According to the invention, through carrying out self-adaptive enhancement on the image and carrying out subsequent rapid segmentation detection on the image, compared with the existing rapid segmentation detection method, the defect detection rate of the pins and the false detection rate of the pins bending upwards are reduced, and the defect detection efficiency is improved.

Description

Visual inspection method for surface defects of packaged IC
Technical Field
The invention relates to the technical field of image processing, in particular to a visual detection method for surface defects of a packaged IC.
Background
Packaged ICs refer to a technology for packaging integrated circuits, commonly used in electronic devices and circuit boards. The packaging is mainly used for realizing connection and protection between the internal circuit and the external circuit of the chip, and protecting, connecting and radiating circuit elements on the bare chip through packaging materials and structures so as to realize high performance and high reliability of the electronic product. During the packaging process, problems such as pin defects, package printing defects and the like may be caused. Currently, the surface defect detection of the packaged IC is mainly performed through manual low-power magnifier, and in recent years, successful application of a machine vision technology in the defect detection field provides a new direction for the surface defect detection of the packaged IC, and an automatic detection technology represented by the new direction gradually replaces the manual detection.
The main problems of the current manual detection are low efficiency, low precision, high cost, high labor intensity, non-uniform standard and the like. In most of the existing automatic machine vision detection methods, an image matching algorithm based on statistical modeling is used, and a standard template is established through statistical learning of qualified samples. The algorithm has the problems that the relevance between the model establishment and the actually produced products is too strong, if the product model or batch is changed, the model needs to be retrained and learned, a new template is established, the maintenance is inconvenient, and the use cost for other production scenes is high besides long-term mass production. The existing rapid segmentation detection method has certain false detection conditions for partial defects, such as missing pins in the pin defects, upward edge tilting of pins and other defect types. Thus, there remains a need for other methods of detecting surface defects in packaged ICs by machine vision that are more suitable for the present scenario.
Disclosure of Invention
In order to solve the above problems, the present invention provides a visual inspection method for surface defects of a packaged IC.
The visual detection method for the surface defects of the packaged IC adopts the following technical scheme:
one embodiment of the invention provides a visual inspection method for surface defects of a packaged IC, which comprises the following steps:
acquiring a packaged IC gray level image; obtaining a gradient histogram of the packaged IC gray level image and a gray level histogram of the packaged IC gray level image according to the packaged IC gray level image; obtaining pixel points to be enhanced according to the packaged IC gray level image and the gray level histogram of the packaged IC gray level image;
obtaining a plurality of continuous gray level intervals according to the pixel points to be enhanced and the gray level histograms of the packaged IC gray level images, obtaining derivatives of all gray levels in all the continuous gray level intervals according to the plurality of continuous gray level intervals, obtaining gradient histograms of the pixel points to be enhanced according to the gradient histograms of the packaged IC gray level images, obtaining a first influence factor according to the derivatives of all the gray levels in all the continuous gray level intervals, obtaining a second influence factor according to the gradient histograms of the pixel points to be enhanced and the continuous gray level intervals, and obtaining the probability to be enhanced of any one gray level corresponding to the pixel points according to the first influence factor and the second influence factor;
and obtaining equalized corresponding gray levels according to the probability to be enhanced of any one gray level corresponding pixel point, obtaining an enhanced package IC gray level image according to the equalized corresponding gray levels, and carrying out segmentation defect detection on the enhanced package IC gray level image to complete identification of pin defects.
Further, the steps of obtaining the gradient histogram of the packaged IC gray level image and the gray level histogram of the packaged IC gray level image according to the packaged IC gray level image include the following specific steps:
and acquiring gradients of all pixel points in the packaged IC gray level image by utilizing a Sobel operator, and acquiring a gradient histogram of the packaged IC gray level image according to the gradients of all pixel points to acquire a gray level histogram of the packaged IC gray level image.
Further, the obtaining the pixel to be enhanced according to the packaged IC gray level image and the gray level histogram of the packaged IC gray level image includes the following specific steps:
in a gray histogram of the packaged IC gray image, the gray histogram of the packaged IC gray image comprises two peaks, the two peaks are relatively compared, the gray value corresponding to one peak is low, the gray value corresponding to the other peak is high, and for the peak with the low gray value, the right side endpoint of the peak with the low gray value is obtained by symmetrically regarding the left side valley of the peak with the low gray value in the gray histogram of the packaged IC gray image as a first endpoint; and for the peak with high gray value, symmetrically obtaining a left end point of the peak with high gray value by using a right side valley of the peak with high gray value in a gray histogram of the packaged IC gray image about the peak, marking the left end point as a second end point, taking a gray range from a first end point to a second end point in the gray histogram of the packaged IC gray image as a target gray range, acquiring all pixels with the pixel gray value in the target gray range in the packaged IC gray image, acquiring gradients of all pixels in the target gray range, removing pixels with the gradient of 0, and marking the rest pixels as pixels to be reinforced.
Further, the steps of obtaining a plurality of continuous gray level intervals according to the pixel points to be enhanced and the gray level histogram of the packaged IC gray level image, and obtaining derivatives of all gray levels in all continuous gray level intervals according to the plurality of continuous gray level intervals include the following specific steps:
acquiring the gray level of a pixel point to be enhanced in a gray level histogram of an encapsulated IC gray level image, acquiring a gray level continuous gray level interval of the gray level of the pixel point to be enhanced in the gray level histogram of the encapsulated IC gray level image, obtaining a plurality of continuous gray level intervals, fitting the gray level histogram corresponding to the continuous gray level interval into a continuous curve for any one continuous gray level interval, acquiring the derivative corresponding to each gray level of the continuous curve, obtaining the derivatives of all gray levels in any one continuous gray level interval, and acquiring the derivatives of all gray levels in all continuous gray level intervals.
Further, the first influencing factor is obtained according to the derivative of all gray levels in all continuous gray level intervals, and the specific steps are as follows:
in the method, in the process of the invention,for the i-th gray level in the j-th consecutive gray level interval +.>Derivative of>For all gray levels +.>Is the mean value of the derivatives of J, J is the total number of successive gray level intervals, +.>For the total number of gray levels in the j-th consecutive gray level interval +.>Is the first influencing factor.
Further, the second influencing factor is obtained according to the gradient histogram of the pixel point to be enhanced and the continuous gray level interval, and the specific steps are as follows:
in the method, in the process of the invention,for the maximum gray level in the j-th consecutive gray level interval,/and->For the number of all different gradient values, +.>For the number of corresponding pixels in the j-th consecutive gray level interval, +.>For the number of pixels corresponding to the p-th gradient value in the number of all the different gradient values on the gradient histogram of the pixel to be enhanced, < ->As a logarithmic function with base 2 +.>Is the second influencing factor.
Further, the specific acquisition method for the number of all the different gradient values is as follows:
acquiring a pixel point corresponding to a j-th continuous gray level interval, marking the pixel point as a first pixel point, acquiring different gradient values corresponding to the first pixel point on a gradient histogram of the pixel point to be enhanced, and marking the number of all the different gradient values as
Further, the obtaining the probability to be enhanced of the pixel point corresponding to any gray level according to the first influence factor and the second influence factor includes the following specific steps:
in the method, in the process of the invention,for the first influencing factor, ++>For the second influencing factor->An exponential function with a natural constant as a base, +.>The probability to be enhanced for the pixel point corresponding to the ith gray level.
Further, the method for obtaining the equalized corresponding gray level according to the probability to be enhanced of the pixel point corresponding to any gray level comprises the following specific steps:
in the method, in the process of the invention,for the probability to be enhanced of the pixel point corresponding to the ith gray level, < >>For packaging the total number of gray levels in the gray histogram of the IC gray image, < >>For packaging the number of pixel points corresponding to the ith gray level in the gray level histogram of the IC gray level image,/>For packaging the total number of the pixel points corresponding to all gray levels in the gray level histogram of the IC gray level image,/L>The corresponding gray level after the i-th gray level equalization.
Further, the enhanced packaged IC gray image obtained according to the equalized corresponding gray level includes the following specific steps:
and acquiring corresponding gray levels after equalization of all gray levels, and replacing the gray levels corresponding to the pixel points in the packaged IC gray image by utilizing the corresponding gray levels after equalization of all gray levels to obtain the enhanced packaged IC gray image.
The technical scheme of the invention has the beneficial effects that: according to the embodiment, an optimized histogram equalization algorithm is utilized to enhance a packaged IC gray level image, texture features on the packaged IC gray level image are analyzed through combining a gray level histogram and a gradient histogram, a first influence factor is obtained according to derivatives of all gray levels in all continuous gray level intervals, a second influence factor is obtained according to the gradient histogram of a pixel point to be enhanced and the continuous gray level intervals, probability of enhancing of any gray level corresponding pixel point is obtained according to the first influence factor and the second influence factor, probability of enhancing of each gray level corresponding pixel point is judged, gray level corresponding to gray level after gray level equalization is obtained according to probability of enhancing of any gray level corresponding pixel point, and the packaged IC gray level image is subjected to optimized histogram equalization enhancement to obtain the enhanced packaged IC gray level image. The traditional histogram equalization enhancement defines a mapping relation according to the number of gray level pixel points, so that finer defect parts are easy to eliminate. By adaptively enhancing the image and carrying out subsequent rapid segmentation detection on the image, compared with the existing rapid segmentation detection method, the false detection rate of defective pins and upward bending pins is reduced, and the defect detection efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart illustrating a method for visually inspecting surface defects of a packaged IC according to an embodiment of the present invention;
FIG. 2 is a diagram showing an example of defects of pins of a packaged IC according to a visual inspection method of surface defects of the packaged IC according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a lead frame of a visual inspection method for surface defects of a packaged IC according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention to achieve the predetermined purpose, the following detailed description refers to specific embodiments, structures, features and effects of a visual inspection method for surface defects of a packaged IC according to the present invention, with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of a visual inspection method for surface defects of a packaged IC according to the present invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of steps of a visual inspection method for surface defects of a packaged IC according to an embodiment of the invention is shown, the method includes the steps of:
and S001, acquiring a packaged IC gray level image.
It should be noted that, during the process of packaging ICs, some unavoidable surface defects often occur. Printing defects, pin defects and other appearance defects often exist in actual production, wherein the pin defects have a larger influence on the use of an actual IC package. Therefore, after the IC chip is packaged, the defect of the package body needs to be detected.
Specifically, the color of the detection background is similar to that of a plastic cover plate of the packaged IC to be detected, and a camera is used for shooting and collecting the image of the packaged IC right above the packaged IC to be detected. Because the surrounding background part of the packaged IC image can be distinguished higher, the image is grayed to reduce the calculation cost, bilateral filtering noise reduction treatment is carried out on the image, the gray image after the filtering treatment is output, and the gray image after the filtering treatment is recorded as the packaged IC gray image.
Thus, the packaged IC gray scale image is obtained.
Step S002, obtaining the gradient histogram of the packaged IC gray level image and the gray level histogram of the packaged IC gray level image according to the packaged IC gray level image.
It should be noted that, when the IC package utilizes the rapid segmentation defect detection algorithm, since the pins are arranged relatively neatly, the image representation distinction between the upward bending of the pins and the defect of the pins is low, and only the slight texture representation can be used to distinguish, the upward bending of the pins is that the pins are bent to be approximately perpendicular to the surface of the plastic base cover of the packaged IC, please refer to fig. 2, fig. 2 is an exemplary diagram of the defect of the packaged IC of the present embodiment, wherein the defect of the pins is disappeared near the lower right corner, the black rectangular area in the middle of the image is the surface of the plastic base cover of the packaged IC, and the existing algorithm has a certain false detection rate when detecting the defect. Therefore, in order to improve the accuracy and efficiency of detection, the detail texture in the image needs to be adaptively enhanced, so that the problem that the accuracy of distinguishing is affected by the two types is solved. Because the pin images have certain regularity, the difference between upward bending and defective images is mainly represented by the gray value difference, and the gray values of all parts of the images have certain difference, in order to realize quick enhancement, the images can be processed by using a histogram equalization method.
For the gray level image of the IC package, the area with a larger gradient is the connection part between the metal pins and the plastic shell and the peripheral area of the metal pins, and the normal gradient exists in the pins due to bending, while the gradient of the pins with upward bending defects is larger than that of the pins with upward bending defects, and the pins at the defect part judge whether the normal gradient exists in the pins according to the defect positions. Thus, the differentiation of the two defects can be enhanced by enhancing the texture characteristics of the bent and defective portions.
Specifically, the gradient of all pixel points in the packaged IC gray level image is obtained by utilizing a Sobel operator, and a gradient histogram of the packaged IC gray level image is obtained according to the gradient of all pixel points. The horizontal axis of the gradient histogram is the gradient values with different sizes, the vertical axis is the number of pixels corresponding to the gradient values, the image reflects the number relation of the pixels of each gradient value in the image, and the gradient interval where the gradient histogram is located can be determined by analyzing the image characteristics of different defects. The gray level histogram of the packaged IC gray level image is obtained, and the gray level range in the gray level histogram of the packaged IC gray level image isI.e. 256 grey levels.
Thus, a gradient histogram of the packaged IC gray scale image and a gray scale histogram of the packaged IC gray scale image are obtained.
And step S003, obtaining the pixel points to be enhanced according to the packaged IC gray level image and the gray level histogram of the packaged IC gray level image.
It should be noted that, in the above step, the gradient histogram is obtained, and in this step, the image is enhanced by analyzing the texture relationship of different regions in the image and by the gradient histogram. In the image of the packaged IC, when the leads are bent upwards, the differences from the defects of the leads are mainly that: the gray level transition of the defect area is that the gray level of the pin is directly changed to the background area, and the pin is bent upwards to the side edge of the pin bent upwards to the background area, namely, a smaller other gray level interval exists between the pin and the background area, so that a certain difference exists between the pixel point gradient of the area and the defect area. The difference is adaptively enhanced through the enhancement coefficient obtained through calculation, so that the detection success rate of defect detection is improved.
It should be noted that, in a normal package IC lead, since the normal lead itself has a certain bending (as shown in the lead frame portion of fig. 3), during the inspection, due to the reflection angle problem, it appears as a shadow similar to a crease on the image. The bending angles of the pins which are bent upwards are different, so that the bending whole which is easy to cause false detection is vertical upwards, but a certain angle deviation still exists, and therefore, compared with the edge gradient of the normal pins or the edge gradient of the defective pins, a small difference which is similar to the crease of the normal bending part is present. For defective pins, there are defect traces on the edges, and the defect traces have smaller differences compared with normal pin edge gradients, which can be regarded as the same as normal pin edge image texture features.
Because the gray scale difference of the packaged IC image is relatively obvious, the image composition is relatively simple, and the gradient mainly exists at the edge of the pin, the crease in the middle of the pin, the printed character and the like. The gradient of the fine part of the pin bending upwards should be similar to that of the crease in the middle of the pin, and the gradient should be higher than that of the shadow of the crease in the middle of the normal pin due to the problem of bending angle. In addition, the difference of bending degrees at different positions of the same bending part can also cause a certain variation trend of gray level expression.
The gray histogram of the gray image of the packaged IC has two peaks, wherein the peak with the lower gray value is the plastic base cover of the packaged IC, the peak with the higher gray value is the pin part of the packaged IC, and the pixel points in the middle part of the two peaks are the texture area in the pin image and the printed character area on the plastic base cover. The gray value of the pixel points between the two wave peaks is between the gray values of the plastic cover plate and the metal pin main body, then the gradient values of the pixel points are judged, the pixel points with the gradient of 0 are removed, the rest pixel points are marked as the pixel points to be reinforced, and the pixel points are the pixel points of the texture parts of the plastic plate and the metal pin.
Specifically, in the gray histogram of the packaged IC gray image, the gray histogram of the packaged IC gray image mainly includes two peaks, the two peaks are relatively compared, the gray value corresponding to one peak is low, the gray value corresponding to the other peak is high, and for the peak with the low gray value, the right end point of the peak with the low gray value is obtained by symmetrically regarding the left side valley of the peak with the low gray value in the gray histogram of the packaged IC gray image as the right end point of the peak with the low gray value, and the right end point is recorded as the first end point; and for the peak with high gray value, symmetrically obtaining a left end point of the peak with high gray value by using a right side valley of the peak with high gray value in a gray histogram of the packaged IC gray image about the peak, marking the left end point as a second end point, taking a gray range from a first end point to a second end point in the gray histogram of the packaged IC gray image as a target gray range, acquiring all pixels with the pixel gray value in the target gray range in the packaged IC gray image, acquiring gradients of all pixels in the target gray range, removing pixels with the gradient of 0, and marking the rest pixels as pixels to be reinforced. It should be noted that, the peak and the peak can be calculated by fitting a continuous curve to obtain an extreme point, and the method is a known technique, which is not described in detail in this embodiment.
Thus, the pixel point to be enhanced is obtained.
Step S004, obtaining a plurality of continuous gray level intervals according to the pixel points to be enhanced and the gray level histograms of the packaged IC gray level images, obtaining derivatives of all gray levels in all the continuous gray level intervals according to the continuous gray level intervals, obtaining gradient histograms of the pixel points to be enhanced according to the gradient histograms of the packaged IC gray level images, obtaining first influence factors according to the derivatives of all the gray levels in all the continuous gray level intervals, obtaining second influence factors according to the gradient histograms of the pixel points to be enhanced and the continuous gray level intervals, and obtaining the probability to be enhanced of any one gray level corresponding to the pixel points according to the first influence factors and the second influence factors.
It should be noted that, in the case of bending the lead upward, since there is a certain difference in the bending angle of the same bending edge, the reflection amount of the metal light in the lens is also inconsistent, so that there is a difference in the gray scale of the final image, and since the gray scale difference is caused by the difference in the bending angle, the difference value is also a linear change. One side of the bending edge is a metal pin part, the other side is a detection background, and the gray values are relatively uniform, so that the gradient values of the bending edge are different while the gray values of the bending edge are different; although the textures such as normal plastic cover printing and crease lines of metal pins have certain gray level differences, the whole textures have no regular gray level change condition, and the performances of the textures in the gradient histogram are relatively concentrated. The probability of being enhanced of the pixel point to be enhanced can be calculated according to the characteristics.
Specifically, a plurality of continuous gray level intervals are obtained according to the pixel points to be enhanced and the gray level histogram of the packaged IC gray level image, and the derivative of all gray levels in all continuous gray level intervals is obtained according to the plurality of continuous gray level intervals, specifically as follows:
and acquiring the gray level of the pixel point to be enhanced in the gray histogram of the packaged IC gray image. The gray level range in the gray level histogram of the packaged IC gray level image isPackaged IC gray scaleThe gray value range of the pixel point in the image is also +.>The gray level to which the gray histogram belongs can thus be derived from the gray value of the pixel to be enhanced. The method comprises the steps of obtaining continuous gray level intervals of gray levels of pixel points to be enhanced in a gray level histogram of an encapsulation IC gray level image, obtaining a plurality of continuous gray level intervals, fitting the gray level histogram corresponding to the continuous gray level intervals into a continuous curve for any one continuous gray level interval, obtaining derivatives corresponding to each gray level of the continuous curve, obtaining derivatives of all gray levels in any one continuous gray level interval, and obtaining derivatives of all gray levels in all continuous gray level intervals.
It should be noted that, because there is a certain difference in gray value between the texture of the plastic cover plate, the character information and the texture of the metal pins, the pixel points of the parts after the 0 gradient is removed have a low possibility of continuity about the abscissa. In addition, the gray level of the normal texture area is relatively uniform, the curve change on the gray level histogram is stable, and the derivative value fluctuation is small; the region formed by the pixel points to be enhanced is affected by different bending angles, and the number of the pixel points of adjacent gray levels is different to a certain extent, so that the probability that the part with larger derivative value fluctuation is the pixel point to be enhanced is larger.
Further, a gradient histogram of the pixel points to be enhanced is obtained according to the gradient histogram of the packaged IC gray level image.
It should be noted that, for the pixel points that are continuous on the gray histogram, the representative texture gray levels are different, so the gradients are also different, and for the normal texture region, although the gray levels will change to some extent, the interference such as printing and noise will cause a certain change in the vertical floating compared with the normal gray levels, i.e. the gradient values are relatively concentrated; the pixel points to be enhanced have a certain gray level change on the image, when the pixel points are interfered by the outside, the gradients are changed, the values of the gradients are relatively discrete, and the number of the pixel points corresponding to each gradient is also dispersed. Therefore, a probability model about the pixel points to be enhanced can be established by combining the distribution rules of the gray level histogram and the gradient histogram.
Specifically, the first influencing factor is obtained according to the derivatives of all gray levels in all continuous gray level intervals, and is specifically as follows:
in the method, in the process of the invention,for the i-th gray level in the j-th consecutive gray level interval +.>Derivative of>For all gray levels +.>Is the mean value of the derivatives of J, J is the total number of successive gray level intervals, +.>For the total number of gray levels in the j-th consecutive gray level interval +.>Is the first influencing factor.
It should be noted that the number of the substrates,calculating the difference between the change rate of the gray level in the fitted curve of the current continuous part and the average change rate, squaring and averaging to represent the fluctuation stability of the curve change of the current continuous part, wherein when the value is larger, the fluctuation of the curve change is larger>Is a probabilistic judgment about gray level continuous fluctuation.
It should be noted that, the fluctuation of the gray-scale curve is caused by the different bending angles of the bending portions, but the problem of the fluctuation of the gray-scale curve may also occur in the histogram due to the differences of the printing process, the printing fonts, and the like for the printed character region, so that another parameter of the probability model needs to be calculated in combination with the gradient analysis on the region prone to false detection.
Specifically, a second influencing factor is obtained according to the gradient histogram of the pixel point to be enhanced and the continuous gray level interval, and the second influencing factor is specifically as follows:
in the method, in the process of the invention,for the maximum gray level in the j-th consecutive gray level interval,/and->The specific acquisition method of (1) is as follows: the method comprises the steps of obtaining a pixel point corresponding to a j-th continuous gray level interval, marking the pixel point as a first pixel point, obtaining different gradient values corresponding to the first pixel point on a gradient histogram of the pixel point to be enhanced, and marking the number of all the different gradient values as->,/>For the number of corresponding pixels in the j-th consecutive gray level interval, +.>For the number of pixels corresponding to the p-th gradient value in the number of all the different gradient values on the gradient histogram of the pixel to be enhanced, < ->As a logarithmic function with base 2 +.>Is the second influencing factor.
It should be noted that the number of the substrates,judging the probability of dispersing the pixel point in different gradient levels>Representing the degree of dispersion of the gradient values in successive gray level intervals, the larger the value, the more discrete the gradient value distribution, +.>Represents the probability of occurrence of the j-th consecutive gray level interval,/for the gray level interval>The uncertainty of the gradient values in the gradient distribution of the current continuous interval is calculated in an information entropy mode, and the smaller the uncertainty is, the more similar the occurrence probability of each gradient value is, namely the larger the probability to be enhanced is corresponding to the situation that the number of pixel points in the gradient histogram is dispersed.
It should be noted that, when the first influencing factor and the second influencing factor are obtained, a probability model of the pixel to be enhanced is established by combining parameters related to gray scale and gradient.
Further, according to the first influence factor and the second influence factor, the probability to be enhanced of the pixel point corresponding to any one gray level is obtained, and it is to be noted that any one gray level is one gray level in the continuous gray level interval, specifically as follows:
in the method, in the process of the invention,for the first influencing factor, ++>For the second influencing factor->As an exponential function with a natural constant as a base, the present embodiment uses +.>The model of (2) realizes normalization processing, y is the input of the model, and an implementer can set a normalization function according to actual conditions,/or%>The probability to be enhanced for the pixel point corresponding to the ith gray level.
It should be noted that the number of the substrates,are different influencing factors of the probability model. Both parameters are obtained as parallel factors by the image-wise relationship of the fitted curve or discrete values on the gray-level histogram or gradient histogram, if the currently calculated gray-level is obtained + ->When the values are larger, the probability of enhancing the corresponding pixel points is larger, and the obtained characteristic parameters are amplified; and if the current gray level is available +.>When only one value is larger, the obtained characteristic parameters should be relatively uniform in consideration of possible errors; similarly, when->If they are smaller, the obtained characteristic parameters should be reduced. To sum up, will be->The two parameters are multiplied to obtain a more accurate false detection-prone region probability. After multiplying the influencing factors, normalizing them to be probability representations, the reason for choosing them as exponents is due to the calculation of the influencing factorsAccording to the ideal characteristic design of the region easy to be misdetected, the characteristic parameters are further amplified when the final probability is calculated.
So far, the probability to be enhanced of the pixel point corresponding to any gray level in any continuous gray level interval is obtained.
And S005, obtaining equalized corresponding gray levels according to the probability to be enhanced of any gray level corresponding pixel points, obtaining an enhanced package IC gray level image according to the equalized corresponding gray levels, and completing pin defect identification according to the enhanced package IC gray level image.
In order to obtain the desired enhancement effect, the pixel points with higher probability should be kept in the equalization process to prevent the pixel points from being combined, so that the equalization mapping relationship can be obtained.
Specifically, the corresponding gray level after equalization is obtained according to the probability to be enhanced of the pixel point corresponding to any gray level, which is specifically as follows:
in the method, in the process of the invention,for the probability to be enhanced of the pixel point corresponding to the ith gray level, < >>For packaging the total number of gray levels in the gray histogram of the IC gray image, < >>For packaging the number of pixel points corresponding to the ith gray level in the gray level histogram of the IC gray level image,/>For packaging the total number of the pixel points corresponding to all gray levels in the gray level histogram of the IC gray level image,/L>The corresponding gray level after the i-th gray level equalization.
It should be noted that the number of the substrates,the aim is to preserve the high probability grey level and highlight it in the image, the final detection process is more accurately identified for uncomputed +.>For gray level of +.>=1。
Further, an enhanced package IC gray level image is obtained according to the equalized corresponding gray level, and pin defect identification is completed according to the enhanced package IC gray level image, specifically as follows:
and acquiring corresponding gray levels after equalization of all gray levels, replacing the gray levels corresponding to the pixel points in the packaged IC gray image by utilizing the corresponding gray levels after equalization of all gray levels to obtain the enhanced packaged IC gray image, and carrying out rapid segmentation defect detection on the enhanced packaged IC gray image to finish the identification of the pin defects. It should be noted that, for the enhanced packaged IC gray level image, the error detection rate is reduced by using the rapid segmentation defect detection, and the "on-line detection theory and technical research for IC package" discloses a rapid segmentation defect detection, which is not specifically described in detail, and is not specifically limited in this embodiment.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the invention, but any modifications, equivalent substitutions, improvements, etc. within the principles of the present invention should be included in the scope of the present invention.

Claims (6)

1. A visual inspection method for surface defects of a packaged IC, the method comprising the steps of:
acquiring a packaged IC gray level image; obtaining a gradient histogram of the packaged IC gray level image and a gray level histogram of the packaged IC gray level image according to the packaged IC gray level image; obtaining pixel points to be enhanced according to the packaged IC gray level image and the gray level histogram of the packaged IC gray level image;
obtaining a plurality of continuous gray level intervals according to the pixel points to be enhanced and the gray level histograms of the packaged IC gray level images, obtaining derivatives of all gray levels in all the continuous gray level intervals according to the plurality of continuous gray level intervals, obtaining gradient histograms of the pixel points to be enhanced according to the gradient histograms of the packaged IC gray level images, obtaining a first influence factor according to the derivatives of all the gray levels in all the continuous gray level intervals, obtaining a second influence factor according to the gradient histograms of the pixel points to be enhanced and the continuous gray level intervals, and obtaining the probability to be enhanced of any one gray level corresponding to the pixel points according to the first influence factor and the second influence factor;
obtaining equalized corresponding gray levels according to the probability to be enhanced of any one gray level corresponding pixel point, obtaining an enhanced package IC gray level image according to the equalized corresponding gray levels, and performing segmentation defect detection on the enhanced package IC gray level image to complete identification of pin defects;
the first influencing factor is obtained according to the derivative of all gray levels in all continuous gray level intervals, and comprises the following specific steps:
in the method, in the process of the invention,for the i-th gray level in the j-th consecutive gray level interval +.>Derivative of>For all gray levels +.>Is the mean value of the derivatives of J, J is the total number of successive gray level intervals, +.>For the total number of gray levels in the j-th consecutive gray level interval +.>Is the first influencing factor;
the second influencing factor is obtained according to the gradient histogram of the pixel point to be enhanced and the continuous gray level interval, and the method comprises the following specific steps:
in the method, in the process of the invention,for the maximum gray level in the j-th consecutive gray level interval,/and->For the number of all different gradient values, +.>For the number of corresponding pixels in the j-th consecutive gray level interval, +.>For the number of pixels corresponding to the p-th gradient value in the number of all the different gradient values on the gradient histogram of the pixel to be enhanced, < ->As a logarithmic function with base 2 +.>Is the second influencing factor;
the specific acquisition method of the number of all the different gradient values is as follows:
acquiring a pixel point corresponding to a j-th continuous gray level interval, marking the pixel point as a first pixel point, acquiring different gradient values corresponding to the first pixel point on a gradient histogram of the pixel point to be enhanced, and marking the number of all the different gradient values as
The method for obtaining the probability to be enhanced of the pixel point corresponding to any gray level according to the first influence factor and the second influence factor comprises the following specific steps:
in the method, in the process of the invention,for the first influencing factor, ++>For the second influencing factor->An exponential function with a natural constant as a base, +.>The probability to be enhanced for the pixel point corresponding to the ith gray level.
2. The visual inspection method of surface defects of a packaged IC according to claim 1, wherein the steps of obtaining a gradient histogram of the packaged IC gray scale image and a gray scale histogram of the packaged IC gray scale image from the packaged IC gray scale image comprise the steps of:
and acquiring gradients of all pixel points in the packaged IC gray level image by utilizing a Sobel operator, and acquiring a gradient histogram of the packaged IC gray level image according to the gradients of all pixel points to acquire a gray level histogram of the packaged IC gray level image.
3. The visual inspection method of surface defects of a packaged IC according to claim 1, wherein the obtaining the pixel to be enhanced according to the gray level histogram of the packaged IC gray level image and the gray level histogram of the packaged IC gray level image comprises the following specific steps:
in a gray histogram of the packaged IC gray image, the gray histogram of the packaged IC gray image comprises two peaks, the two peaks are relatively compared, the gray value corresponding to one peak is low, the gray value corresponding to the other peak is high, and for the peak with the low gray value, the right side endpoint of the peak with the low gray value is obtained by symmetrically regarding the left side valley of the peak with the low gray value in the gray histogram of the packaged IC gray image as a first endpoint; and for the peak with high gray value, symmetrically obtaining a left end point of the peak with high gray value by using a right side valley of the peak with high gray value in a gray histogram of the packaged IC gray image about the peak, marking the left end point as a second end point, taking a gray range from a first end point to a second end point in the gray histogram of the packaged IC gray image as a target gray range, acquiring all pixels with the pixel gray value in the target gray range in the packaged IC gray image, acquiring gradients of all pixels in the target gray range, removing pixels with the gradient of 0, and marking the rest pixels as pixels to be reinforced.
4. The visual inspection method of surface defects of a packaged IC according to claim 1, wherein the obtaining a plurality of continuous gray level intervals according to the pixel points to be enhanced and the gray level histogram of the gray level image of the packaged IC, and obtaining derivatives of all gray levels in all continuous gray level intervals according to the plurality of continuous gray level intervals comprises the following specific steps:
acquiring the gray level of a pixel point to be enhanced in a gray level histogram of an encapsulated IC gray level image, acquiring a gray level continuous gray level interval of the gray level of the pixel point to be enhanced in the gray level histogram of the encapsulated IC gray level image, obtaining a plurality of continuous gray level intervals, fitting the gray level histogram corresponding to the continuous gray level interval into a continuous curve for any one continuous gray level interval, acquiring the derivative corresponding to each gray level of the continuous curve, obtaining the derivatives of all gray levels in any one continuous gray level interval, and acquiring the derivatives of all gray levels in all continuous gray level intervals.
5. The visual inspection method for surface defects of a packaged IC according to claim 1, wherein the obtaining the equalized corresponding gray level according to the probability to be enhanced of any one gray level corresponding pixel point comprises the following specific steps:
in the method, in the process of the invention,for the probability to be enhanced of the pixel point corresponding to the ith gray level, < >>For packaging the total number of gray levels in the gray histogram of the IC gray image, < >>To package the number of pixels corresponding to the i-th gray level in the gray level histogram of the IC gray level image,for packaging the total number of the pixel points corresponding to all gray levels in the gray level histogram of the IC gray level image,/L>The corresponding gray level after the i-th gray level equalization.
6. The visual inspection method of surface defects of a packaged IC according to claim 1, wherein the step of obtaining the enhanced packaged IC gray-scale image according to the equalized corresponding gray-scale level comprises the following specific steps:
and acquiring corresponding gray levels after equalization of all gray levels, and replacing the gray levels corresponding to the pixel points in the packaged IC gray image by utilizing the corresponding gray levels after equalization of all gray levels to obtain the enhanced packaged IC gray image.
CN202311773843.0A 2023-12-22 2023-12-22 Visual inspection method for surface defects of packaged IC Active CN117437238B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311773843.0A CN117437238B (en) 2023-12-22 2023-12-22 Visual inspection method for surface defects of packaged IC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311773843.0A CN117437238B (en) 2023-12-22 2023-12-22 Visual inspection method for surface defects of packaged IC

Publications (2)

Publication Number Publication Date
CN117437238A CN117437238A (en) 2024-01-23
CN117437238B true CN117437238B (en) 2024-03-29

Family

ID=89546609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311773843.0A Active CN117437238B (en) 2023-12-22 2023-12-22 Visual inspection method for surface defects of packaged IC

Country Status (1)

Country Link
CN (1) CN117437238B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114494256A (en) * 2022-04-14 2022-05-13 武汉金龙电线电缆有限公司 Electric wire production defect detection method based on image processing
CN114913178A (en) * 2022-07-19 2022-08-16 山东天宸塑业有限公司 Melt-blown fabric defect detection method and system
CN114972329A (en) * 2022-07-13 2022-08-30 江苏裕荣光电科技有限公司 Image enhancement method and system of surface defect detector based on image processing
CN115147414A (en) * 2022-09-01 2022-10-04 南通三信塑胶装备科技股份有限公司 Method for detecting surface breakdown defect of bipolar power transistor
CN115311301A (en) * 2022-10-12 2022-11-08 江苏银生新能源科技有限公司 PCB welding spot defect detection method
CN116109644A (en) * 2023-04-14 2023-05-12 东莞市佳超五金科技有限公司 Surface defect detection method for copper-aluminum transfer bar
CN116577351A (en) * 2023-07-14 2023-08-11 深圳市深卓越光电有限公司 Liquid crystal glass substrate polaroid quality detection method based on image data

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114494256A (en) * 2022-04-14 2022-05-13 武汉金龙电线电缆有限公司 Electric wire production defect detection method based on image processing
CN114972329A (en) * 2022-07-13 2022-08-30 江苏裕荣光电科技有限公司 Image enhancement method and system of surface defect detector based on image processing
CN114913178A (en) * 2022-07-19 2022-08-16 山东天宸塑业有限公司 Melt-blown fabric defect detection method and system
CN115147414A (en) * 2022-09-01 2022-10-04 南通三信塑胶装备科技股份有限公司 Method for detecting surface breakdown defect of bipolar power transistor
CN115311301A (en) * 2022-10-12 2022-11-08 江苏银生新能源科技有限公司 PCB welding spot defect detection method
CN116109644A (en) * 2023-04-14 2023-05-12 东莞市佳超五金科技有限公司 Surface defect detection method for copper-aluminum transfer bar
CN116577351A (en) * 2023-07-14 2023-08-11 深圳市深卓越光电有限公司 Liquid crystal glass substrate polaroid quality detection method based on image data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于Canny算法的列车轴承内圈外表面缺陷检测;石炜 等;数字技术与应用;20180531;第36卷(第5期);第134-136页 *
基于灰度分布梯度的织物疵点检测算法;吴军;毛纺科技;20180430;第46卷(第4期);第76-80页 *

Also Published As

Publication number Publication date
CN117437238A (en) 2024-01-23

Similar Documents

Publication Publication Date Title
CN115049653B (en) Integrated circuit board quality detection system based on computer vision
CN110349126B (en) Convolutional neural network-based marked steel plate surface defect detection method
CN110389127B (en) System and method for identifying metal ceramic parts and detecting surface defects
CN112651968B (en) Wood board deformation and pit detection method based on depth information
CN108876768B (en) Shadow defect detection method for light guide plate
CN115272346A (en) PCB production process online detection method based on edge detection
US5949905A (en) Model-based adaptive segmentation
CN110930390B (en) Chip pin missing detection method based on semi-supervised deep learning
CN115619793B (en) Power adapter appearance quality detection method based on computer vision
CN108827969A (en) Metal parts surface defects detection and recognition methods and device
CN115131359B (en) Method for detecting pitting defects on surface of metal workpiece
CN117011292B (en) Method for rapidly detecting surface quality of composite board
CN113920096A (en) Method for detecting metal packaging defects of integrated circuit
CN115082477B (en) Semiconductor wafer processing quality detection method based on light reflection removing effect
CN117152165B (en) Photosensitive chip defect detection method and device, storage medium and electronic equipment
CN116958125B (en) Electronic contest host power supply element defect visual detection method based on image processing
CN117557820B (en) Quantum dot optical film damage detection method and system based on machine vision
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN117274113B (en) Broken silicon wafer cleaning effect visual detection method based on image enhancement
CN117689655B (en) Metal button surface defect detection method based on computer vision
CN115330796B (en) Copper wire tinning defect identification method
CN115029704B (en) Intelligent control method and device for stainless steel pickling process
CN115690105A (en) Milling cutter scratch detection method based on computer vision
CN115359047A (en) Abnormal defect detection method for intelligent welding of PCB (printed circuit board)
CN112381751A (en) Online intelligent detection system and method based on image processing algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant