CN115272173A - Tin ball defect detection method and device, computer equipment and storage medium - Google Patents

Tin ball defect detection method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115272173A
CN115272173A CN202210672344.1A CN202210672344A CN115272173A CN 115272173 A CN115272173 A CN 115272173A CN 202210672344 A CN202210672344 A CN 202210672344A CN 115272173 A CN115272173 A CN 115272173A
Authority
CN
China
Prior art keywords
image
solder ball
characteristic
initial
defect detection
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.)
Pending
Application number
CN202210672344.1A
Other languages
Chinese (zh)
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 Geling Jingrui Vision Co ltd
Original Assignee
Shenzhen Geling Jingrui Vision 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 Geling Jingrui Vision Co ltd filed Critical Shenzhen Geling Jingrui Vision Co ltd
Priority to CN202210672344.1A priority Critical patent/CN115272173A/en
Publication of CN115272173A publication Critical patent/CN115272173A/en
Pending legal-status Critical Current

Links

Images

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
    • G06T5/30Erosion or dilatation, e.g. thinning
    • 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
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20036Morphological image processing
    • 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/30152Solder

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The tin ball defect detection method and device, the computer equipment and the storage medium belong to the technical field of machine vision, affine transformation is carried out on an initial image to obtain a tin ball image, corrosion operation is carried out on the tin ball image according to a preset structural operator to obtain a first characteristic image, the tin ball image and the first characteristic image are subtracted to obtain a second characteristic image, threshold segmentation is carried out on the second characteristic image to obtain a defect detection result, the tin ball defect detection efficiency can be improved, defective tin balls are accurately detected, and the omission ratio of the defective tin balls is reduced.

Description

Tin ball defect detection method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of machine vision, in particular to a method and a device for detecting tin ball defects, computer equipment and a storage medium.
Background
In the related technology, two modes of manual detection and image processing are adopted for detecting the tin ball defects, the detection efficiency of the manual detection mode is low, the detection is easily influenced by artificial subjective factors, and the accuracy of the defect detection is low. The image processing method judges whether the solder ball has defects or not by calculating the gray value of each solder ball according to the gray value, and the defective solder ball cannot be accurately identified, so that the missing detection rate of the defective solder ball is high.
Disclosure of Invention
The embodiment of the application mainly aims to provide a solder ball defect detection method and device, computer equipment and storage medium, which can accurately detect defective solder balls and reduce the missing rate of the defective solder balls.
In order to achieve the above object, a first aspect of the embodiments of the present application provides a method for detecting solder ball defects, where the method includes:
acquiring an initial image;
carrying out affine transformation on the initial image to obtain a solder ball image;
carrying out corrosion operation on the tin ball image according to a preset structural operator to obtain a first characteristic image;
subtracting a first pixel value of a pixel point in the solder ball image from a second pixel value of a pixel point in the first characteristic image to obtain a second characteristic image;
and performing threshold segmentation on the second characteristic image to obtain a defect detection result.
In some embodiments, the acquiring an initial image comprises:
acquiring a color image;
and extracting a green channel image component of the color image, and obtaining an initial image according to the green channel image component.
In some embodiments, the affine transformation of the initial image to obtain a solder ball image includes one of:
if the initial image is a noisy image, performing Gaussian filtering on the initial image to obtain a first intermediate image, and performing affine transformation on the first intermediate image to obtain a solder ball image;
if the initial image is a weak image, carrying out gray level enhancement on the initial image to obtain a second intermediate image, and carrying out affine transformation on the second intermediate image to obtain a solder ball image;
if the initial image is a blurred image, deblurring the initial image to obtain a third intermediate image, and carrying out affine transformation on the third intermediate image to obtain a solder ball image;
and if the initial image is a distorted image, performing geometric correction on the initial image to obtain a fourth intermediate image, and performing affine transformation on the fourth intermediate image to obtain a solder ball image.
In some embodiments, the preset structural operator is a circular structural operator, and the performing an erosion operation on the solder ball image according to the preset structural operator to obtain a first characteristic image includes:
and carrying out corrosion operation on the solder ball image according to the circular structure operator to obtain a first characteristic image.
In some embodiments, the performing an erosion operation on the solder ball image according to the circular structure operator to obtain a first feature image includes:
acquiring a solder ball profile image;
obtaining a defective solder ball image according to the solder ball outline image;
removing the defective tin ball image from the tin ball image to obtain a defect-free tin ball image;
and carrying out corrosion operation on the non-defective tin ball image according to the circular structure operator to obtain a first characteristic image.
In some embodiments, said obtaining a defective solder ball image from said solder ball profile image comprises:
calculating the height and the surface area of the solder ball in the solder ball profile image;
and obtaining a defective tin ball image according to the height and the surface area.
In some embodiments, the threshold segmentation on the second feature image to obtain a defect detection result includes:
acquiring a gray level histogram of the second characteristic image;
determining a threshold value according to the gray level histogram;
and performing threshold segmentation on the second characteristic image according to the threshold to obtain a defect detection result.
A second aspect of the embodiments of the present application provides a solder ball defect detection apparatus, including:
the image acquisition module is used for acquiring an initial image;
the first image operation module is used for carrying out affine transformation on the initial image to obtain a solder ball image;
the second image operation module is used for carrying out corrosion operation on the solder ball image according to a preset structural operator to obtain a first characteristic image;
the third image operation module is used for subtracting a first pixel value of a pixel point in the solder ball image from a second pixel value of a pixel point in the first characteristic image to obtain a second characteristic image;
and the image segmentation module is used for carrying out threshold segmentation on the second characteristic image to obtain a defect detection result.
A third aspect of the embodiments of the present application provides a computer device, which includes a memory and a processor, where the memory stores a program, and the processor is configured to execute the method for detecting solder ball defects according to any one of the embodiments of the first aspect of the present application when the program is executed by the processor.
A fourth aspect of the embodiments of the present application provides a storage medium, where the storage medium is a computer-readable storage medium, and the storage medium stores computer-executable instructions, where the computer-executable instructions are configured to cause a computer to execute the method for detecting a solder ball defect according to any one of the embodiments of the first aspect of the present application.
According to the tin ball defect detection method and the tin ball defect detection device, the computer equipment and the storage medium, the initial image is obtained, affine transformation is carried out on the initial image to obtain the tin ball image, the tin ball image is subjected to corrosion operation according to the preset structural operator to obtain the first characteristic image, the tin ball image and the first characteristic image are subtracted to obtain the second characteristic image, threshold segmentation is carried out on the second characteristic image to obtain the defect detection result, the tin ball defect detection efficiency can be improved, the defective tin ball is accurately detected, and the missing rate of the defective tin ball is reduced.
Drawings
FIG. 1 is a flowchart of a solder ball defect detection method according to an embodiment of the present application;
FIG. 2 is a flowchart of a specific method of step S110 in FIG. 1;
FIG. 3 is a flowchart of a specific method of step S120 in FIG. 1;
FIG. 4 is a flowchart of a specific method of step S130 in FIG. 1;
FIG. 5 is a flowchart illustrating a specific method of step S420 in FIG. 4;
FIG. 6 is a flowchart of a specific method of step S150 in FIG. 1;
fig. 7 is a block diagram of a solder ball defect detection apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
It should be noted that although functional blocks are partitioned in a schematic diagram of an apparatus and a logical order is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the partitioning of blocks in the apparatus or the order in the flowchart. The terms first, second and the like in the description and in the claims, and the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
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 terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
The BGA package realizes data transmission and mechanical connection of a chip by manufacturing an array solder ball at the bottom of a substrate of a package body. The performance of the array solder ball directly affects the reliability of a solder joint in BGA packaging, thereby affecting the quality stability of a chip. In order to ensure the quality stability of the chip, the chip needs to be tested, wherein the solder ball defect detection is a necessary process for testing the chip. In the related art, there are two main techniques for detecting defects of solder balls, one is to perform defect detection on solder balls by using a manual detection technique, and the other is to perform defect detection on solder balls by using a machine vision-based 2D image processing technique. The workload of solder ball defect detection is large, and the manual detection technology relies on manually wearing a microscope to detect the solder balls one by one, so that the detection efficiency is low, the detection result is inaccurate, and the influence of artificial subjective factors is large. The machine vision-based 2D image processing technology judges whether the solder balls have defects or not by calculating the gray value of each solder ball and judging whether the solder balls have defects or not through the gray value, the calculated amount is large, the defect detection efficiency is low, and when the damage defects of the solder balls are small, the omission ratio is high.
Based on this, the main object of the embodiment of the present application is to provide a method for detecting solder ball defects, in which a solder ball image of a solder ball is obtained by irradiation of a white annular light source, a first characteristic image is obtained by performing a corrosion operation on the solder ball image according to a preset structural operator, a second characteristic image is obtained by subtracting a first pixel value of a pixel point in the solder ball image from a second pixel value of a pixel point in the first characteristic image, so as to remove a bright area at the top of the solder ball, and the second characteristic image is subjected to threshold segmentation to obtain a solder ball defect detection result.
Referring to fig. 1, the method for detecting solder ball defects according to the first embodiment of the present application is applied to a solder ball defect detection apparatus, and the method for detecting solder ball defects includes, but is not limited to, steps S110 to S150.
S110, acquiring an initial image;
s120, carrying out affine transformation on the initial image to obtain a solder ball image;
s130, carrying out corrosion operation on the solder ball image according to a preset structural operator to obtain a first characteristic image;
s140, subtracting a first pixel value of a pixel point in the solder ball image from a second pixel value of the pixel point in the first characteristic image to obtain a second characteristic image;
and S150, performing threshold segmentation on the second characteristic image to obtain a defect detection result.
In step S110, an initial image is obtained, where the initial image is an image of the array solder ball collected by a camera, the resolution of the camera is 1200 ten thousand, the array solder ball is irradiated by a white ring light source, and the size of the initial image is 4000 × 3000.
In step S120, affine transformation is performed on the initial image, and the array solder ball in the initial image is divided into a plurality of individual solder balls to obtain a solder ball image.
In step S130, the preset structural operator is a circular structural operator, the plurality of individual solder balls are traversed one by one, and a solder ball image of the plurality of individual solder balls is subjected to a corrosion operation according to the circular structural operator, so as to obtain a first characteristic image. Under the irradiation of a white annular light source, bright areas are generated at the tops of the solder balls due to smoothness, corrosion operation is carried out on the solder ball images according to a circular structural operator, the bright area characteristics of the tops of the solder balls are obtained, the bright area characteristics are circular, the circle center of the circle is the center of the solder ball in the solder ball images, and the radius is one third or one half of the radius of the solder ball. It can be understood that the first characteristic image is an image obtained by performing an etching operation on the solder ball image, and includes a bright area characteristic of the top of the solder ball.
The role of erosion operations in mathematical morphology operations is to eliminate object boundary points and reduce the image. If the solder ball image is represented as A and the structure operator is represented as S, the corrosion operationCharacter indicates as >
Figure BDA0003695132740000041
The corrosion operation is to move in the solder ball image A through a circular structure operator S, when the circular structure operator S completely covers the solder ball image, whether a coverage area of the circular structure operator S is matched with the circular structure operator is judged, if the coverage area of the circular structure operator S is matched with the circular structure operator S, an image pixel point covered by an original point of the circular structure operator is marked as a foreground point, namely a bright characteristic point, other image pixel points are marked as background points, namely dark characteristic points, until the structure operator S finishes moving scanning of each pixel point in the solder ball image, and finally the obtained image is the first characteristic image.
The ring characteristic obtained after the corrosion operation can visually display the defect detection result of the solder balls, if the ring characteristic is a bright characteristic, the solder ball corresponding to the ring characteristic is considered to be a defective solder ball, and if the ring characteristic is a dark characteristic, the solder ball corresponding to the ring characteristic is considered to be a non-defective solder ball.
In step S140, since the solder ball in the solder ball image is a circle and the bright area feature is a circle smaller than the solder ball, the first pixel value of the pixel point in the solder ball image is subtracted from the second pixel value of the pixel point in the first feature image to remove the bright area feature at the top of the solder ball from the solder ball image, so as to obtain the ring feature, i.e., the second feature image includes the ring feature.
In step S150, threshold segmentation is performed on the second feature image, and pixel points greater than the threshold are used as bright features, and pixel points less than or equal to the threshold are used as dark features, so as to obtain a target image, and if bright features exist in the target image, it is determined that the defect detection result is that a solder ball corresponding to the bright features has defects; if the dark feature exists in the target image, the defect detection result indicates that the solder ball corresponding to the dark feature has no defect, so that the defect detection of the BGA packaging solder ball is realized. When the difference between the bright feature and the dark feature is large, a defective solder ball can be detected from the target image by using threshold segmentation.
According to the tin ball defect detection method provided by the embodiment of the application, the initial image is obtained, affine transformation is carried out on the initial image to obtain the tin ball image, corrosion operation is carried out on the tin ball image according to the preset structural operator to obtain the first characteristic image, the tin ball image and the first characteristic image are subtracted to obtain the second characteristic image, threshold segmentation is carried out on the second characteristic image to obtain the defect detection result, the calculated amount is small, the detection speed is high, the defective tin ball can be accurately detected, and the missing rate of the defective tin ball is reduced.
In some embodiments, as shown in fig. 2, step S110 specifically includes, but is not limited to, step S210 to step S220.
S210, acquiring a color image;
and S220, extracting a green channel image component of the color image, and obtaining an initial image according to the green channel image component.
In step S210, a color image is acquired, wherein the color image is composed of image components of three channels of a red channel image component, a green channel image component, and a blue channel image component.
In step S220, in order to grayish the color image, a green channel image component of the color image is extracted from the image components of the three channels of the color image, and the green channel image component is taken as an initial image.
Under the irradiation of a white annular light source, the top of the solder ball without defects can generate a bright area due to smoothness, and the other parts are dark areas. When the solder ball with defects is irradiated, the bright area at the top of the solder ball is enlarged, and the surface of the solder ball is luminous, presents bright color and has larger difference with dark color, thereby being convenient for carrying out image processing on the solder ball image subsequently. By graying the image, the difference between the bright area and the dark area is increased, namely the gray value difference is large, so that the subsequent corrosion operation and subtraction operation can be conveniently carried out on the solder ball image according to the structural operator, and a more accurate solder ball defect detection result can be obtained.
In some embodiments, as shown in fig. 3, step S120 specifically includes, but is not limited to, one of step S310 to step S340.
S310, if the initial image is a noisy image, performing Gaussian filtering on the initial image to obtain a first intermediate image, and performing affine transformation on the first intermediate image to obtain a solder ball image;
s320, if the initial image is a weak image, carrying out gray level enhancement on the initial image to obtain a second intermediate image, and carrying out affine transformation on the second intermediate image to obtain a solder ball image;
s330, if the initial image is a blurred image, deblurring processing is carried out on the initial image to obtain a third intermediate image, affine transformation is carried out on the third intermediate image to obtain a solder ball image;
and S340, if the initial image is a distorted image, performing geometric correction on the initial image to obtain a fourth intermediate image, and performing affine transformation on the fourth intermediate image to obtain a solder ball image.
In step S310, in order to avoid the influence of noise on the result of solder ball defect detection, the noise is mistakenly detected as a defective solder ball, and if the initial image is a noisy image, a two-dimensional gaussian filter is used to smooth and denoise the initial image to obtain a first intermediate image, where the first intermediate image is a gaussian-filtered image, and the definition of the two-dimensional gaussian filter is shown in formula (1).
Figure BDA0003695132740000051
Where x is the abscissa of the image space, y is the ordinate of the image space, and σ is the blur radius.
In order to avoid that the detail features of the initial image are smoothed, which results in the initial image blurring, the embodiment of the present application sets the blurring radius to 1.
In step S320, since the contrast of the weak image is low and the detail features such as the edge of the solder ball are not obvious, the defective solder ball cannot be detected, and in order to improve the accuracy of detecting the defect of the solder ball, if the initial image is the weak image, the gray level of the initial image is enhanced to obtain a second intermediate image, wherein the second intermediate image is an image with the enhanced gray level. In the embodiment of the application, the initial image is enhanced by adopting gray scale transformation, and the gray scale transformation can be piecewise linear transformation, logarithmic transformation, gamma transformation and the like.
In step S330, the blurred image has low image quality, and in order to obtain a sharp picture, an image restoration method is used to deblur the blurred image to obtain a third intermediate image, where the third intermediate image is an image after deblurring. It is understood that the image restoration method includes inverse filtering, wiener filtering, constrained least squares filtering, and the like.
In step S340, the image may be distorted due to problems such as exposure of the camera during shooting, which results in degradation of image quality, and if the initial image is a distorted image, the initial image is geometrically corrected to obtain a fourth intermediate image, where the fourth intermediate image is an image after geometric correction. And performing geometric correction on the initial image according to the distortion correction matrix by solving the distortion correction matrix of the initial image.
In some embodiments, as shown in fig. 4, step S130 specifically includes, but is not limited to, step S410 to step S440.
S410, acquiring a solder ball outline image;
s420, obtaining a defective solder ball image according to the solder ball outline image;
s430, removing the defective solder ball image from the solder ball image to obtain a defect-free solder ball image;
s440, carrying out corrosion operation on the flawless tin ball image according to the circular structure operator to obtain a first characteristic image.
In step S410, a solder ball profile image is obtained, wherein the solder ball profile image is acquired by a 3D line laser.
In step S420, the defective solder balls are identified by calculating the average height and surface area of each solder ball in the solder ball profile image, so as to obtain a defective solder ball image.
In step S430, the defective solder ball image is removed from the solder ball image, so as to avoid repeated detection of the defective solder ball, which results in low detection efficiency.
In step S440, the non-defective solder ball image is subjected to erosion operation according to the circular structure operator to further detect the non-defective solder ball, so as to avoid missing detection of the defective solder ball.
In some embodiments, as shown in fig. 5, step S420 specifically includes, but is not limited to, step S510 to step S520.
S510, calculating the height and the surface area of the solder ball in the solder ball outline image;
s520, obtaining the defective tin ball image according to the height and the surface area.
In step S510, the average height of the solder ball is reduced and the surface area is increased after the solder ball is worn or flattened. The tin balls with obvious defects can be identified by calculating the average height and the surface area of the tin balls so as to carry out preliminary screening on the tin balls.
In step S520, if the average height of the solder balls is smaller than a preset first threshold, or the surface area of the solder balls is larger than a preset second threshold, it indicates that the solder balls have wear or are flattened, so as to obtain a defective solder ball image, where the first threshold is the average height of the sample solder balls, and the second threshold is the surface area of the sample solder balls. For example, the average height of the solder balls in the 5 th row, the 6 th column, the 7 th column, the 8 th column and the 9 th column in the chip is 0.1707, 0.1642, 0.1586 and 0.1689 respectively, the surface area of the corresponding solder balls is 0.0845, 0.0920, 0.0923 and 0.1042 respectively, if the first threshold is 0.15, the second threshold is 0.08, the average height is greater than the first threshold and the surface area of the solder ball is greater than the second threshold, the solder balls in the 5 th row, the 6 th column, the 7 th column, the 8 th column and the 9 th column are solder balls with obvious defects.
In some embodiments, as shown in fig. 6, step S150 specifically includes, but is not limited to, step S610 to step S630.
S610, acquiring a gray level histogram of the second characteristic image;
s620, determining a threshold value according to the gray level histogram;
s630, performing threshold segmentation on the second characteristic image according to the threshold to obtain a defect detection result.
In steps S610 to S630, a gray level histogram of the second feature image is obtained, a minimum value between a foreground peak value and a background peak value of the gray level histogram is used as a threshold, and if a pixel value of a pixel point in the second feature image is greater than the threshold, the pixel point is used as a bright feature point; if the pixel value of the pixel point in the second characteristic image is smaller than or equal to the threshold value, taking the pixel point as a dark characteristic point; and obtaining the target image after all the pixel points in the second characteristic image are classified into bright characteristic points or dark characteristic points. If the bright features exist in the target image, the solder balls corresponding to the bright features have defects; if the dark feature exists in the target image, the solder ball corresponding to the dark feature is free of defects, and therefore defect detection of the BGA packaging solder ball is achieved.
The following describes the method for detecting solder ball defects in an embodiment of the present invention in detail, with reference to a specific embodiment, it is to be understood that the following description is only exemplary and not intended to limit the invention.
The method comprises the steps of obtaining a color image shot by a camera, extracting a green channel image component of the color image, taking the green channel image component as an initial image, conducting Gaussian filtering on the initial image to obtain a first intermediate image, conducting gray level transformation on the first intermediate image to obtain a second intermediate image, conducting image restoration on the second intermediate image to obtain a third intermediate image, conducting geometric correction on the third intermediate image to obtain a fourth intermediate image, conducting affine transformation on the fourth intermediate image to obtain a solder ball image, obtaining a solder ball outline image collected by 3D line laser, calculating the average height and the surface area of the solder ball in the solder ball outline image, obtaining a defective solder ball image if the average height of the solder ball is smaller than a preset first threshold value or the surface area of the solder ball is larger than a preset second threshold value, removing the defective solder ball image from the solder ball image to obtain a defect-free solder ball image, conducting corrosion operation on the solder ball outline image according to a circular structure to obtain a first characteristic image, segmenting a first pixel value of a pixel point in the defect-free image and a second pixel value of a pixel point in the first characteristic image to obtain a defect-free solder ball image, obtaining a second characteristic image, obtaining a histogram, and segmenting the defect-free solder ball according to obtain a second characteristic image.
The tin ball is subjected to multi-dimensional detection through the 3D line laser and the two-dimensional image processing method based on morphology, accuracy of tin ball surface defect detection is improved, the missing rate of defects is reduced, the calculated amount and the detection speed are high, and the requirements of the detection speed and the detection precision can be met at the same time.
The embodiment of the present application further provides a solder ball defect detection apparatus, as shown in fig. 7, the solder ball defect detection apparatus can implement the above-mentioned solder ball defect detection method, and the apparatus includes an image acquisition module 710, a first image operation module 720, a second image operation module 730, a third image operation module 740, and an image segmentation module 750. The image acquisition module 710 is used for acquiring an initial image; the first image operation module 720 is configured to perform affine transformation on the initial image to obtain a solder ball image; the second image operation module 730 performs corrosion operation on the solder ball image according to a preset structural operator to obtain a first characteristic image; the third image operation module 740 is configured to subtract a first pixel value of a pixel point in the solder ball image from a second pixel value of a pixel point in the first characteristic image to obtain a second characteristic image; the image segmentation module 750 is configured to perform threshold segmentation on the second feature image to obtain a defect detection result.
The solder ball defect detection apparatus of the embodiment of the present application is used for executing the solder ball defect detection method in the above embodiment, and the specific processing procedure is the same as the solder ball defect detection method in the above embodiment, and is not described here any more.
According to the tin ball defect detection device provided by the embodiment of the application, the image acquisition module is used for acquiring the initial image, the first image operation module is used for carrying out affine transformation on the initial image to obtain the tin ball image, the second image operation module is used for carrying out corrosion operation on the tin ball image according to the preset structural operator to obtain the first characteristic image, the third image operation module is used for subtracting the tin ball image from the first characteristic image to obtain the second characteristic image, and the image segmentation module is used for carrying out threshold segmentation on the second characteristic image to obtain the defect detection result.
An embodiment of the present application further provides a computer device, including:
at least one processor, and,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions that are executed by the at least one processor, so that the at least one processor, when executing the instructions, implements the method for detecting solder ball defects according to any one of the embodiments of the first aspect of the present application.
The computer device includes: a processor, a memory, an input/output interface, a communication interface, and a bus.
The processor may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute a related program to implement the technical solution provided in the embodiment of the present Application;
the Memory may be implemented in the form of a ROM (Read Only Memory), a static Memory device, a dynamic Memory device, or a RAM (Random Access Memory). The memory can store an operating system and other application programs, when the technical scheme provided by the embodiment of the specification is realized through software or firmware, related program codes are stored in the memory, and the processor calls and executes the solder ball defect detection method of the embodiment of the application;
the input/output interface is used for realizing information input and output;
the communication interface is used for realizing communication interaction between the equipment and other equipment, and can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, bluetooth and the like); and
a bus that transfers information between various components of the device (e.g., the processor, memory, input/output interfaces, and communication interfaces);
wherein the processor, the memory, the input/output interface and the communication interface are communicatively connected to each other within the device by a bus.
The embodiment of the present application further provides a storage medium, where the storage medium is a computer-readable storage medium, and the computer-readable storage medium stores computer-executable instructions, where the computer-executable instructions are used to enable a computer to execute the method for detecting solder ball defects in the embodiment of the present application.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation to the technical solutions provided in the embodiments of the present application, and it is obvious to those skilled in the art that the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems with the evolution of technology and the emergence of new application scenarios.
It will be understood by those skilled in the art that the embodiments shown in fig. 1 to 6 do not constitute a limitation of the embodiments of the present application, and may include more or less steps than those shown, or some steps may be combined, or different steps may be included.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like (if any) in the description of the present application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that, in this application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, in essence or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing programs, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and the scope of the claims of the embodiments of the present application is not limited thereto. Any modifications, equivalents and improvements that may occur to those skilled in the art without departing from the scope and spirit of the embodiments of the present application are intended to be within the scope of the claims of the embodiments of the present application.

Claims (10)

1. The solder ball defect detection method is characterized by comprising the following steps:
acquiring an initial image;
(ii) performing an affine transformation on the initial image, obtaining a solder ball image;
carrying out corrosion operation on the solder ball image according to a preset structural operator to obtain a first characteristic image;
subtracting a first pixel value of a pixel point in the solder ball image from a second pixel value of a pixel point in the first characteristic image to obtain a second characteristic image;
and performing threshold segmentation on the second characteristic image to obtain a defect detection result.
2. The method of claim 1, wherein the obtaining an initial image comprises:
acquiring a color image;
and extracting a green channel image component of the color image, and obtaining an initial image according to the green channel image component.
3. The method of claim 1, wherein the affine transformation of the initial image to obtain the solder ball image comprises one of the following steps:
if the initial image is a noisy image, performing Gaussian filtering on the initial image to obtain a first intermediate image, and performing affine transformation on the first intermediate image to obtain a solder ball image;
if the initial image is a weak image, carrying out gray level enhancement on the initial image to obtain a second intermediate image, and carrying out affine transformation on the second intermediate image to obtain a solder ball image;
if the initial image is a blurred image, deblurring processing is carried out on the initial image to obtain a third intermediate image, and affine transformation is carried out on the third intermediate image to obtain a solder ball image;
and if the initial image is a distorted image, performing geometric correction on the initial image to obtain a fourth intermediate image, and performing affine transformation on the fourth intermediate image to obtain a solder ball image.
4. The method of claim 1, wherein the predetermined texture operator is a circular texture operator, and the performing the erosion operation on the solder ball image according to the predetermined texture operator to obtain the first characteristic image comprises:
and carrying out corrosion operation on the solder ball image according to the circular structure operator to obtain a first characteristic image.
5. The method of claim 4, wherein the performing an erosion operation on the solder ball image according to the circle structure operator to obtain a first characteristic image comprises:
acquiring a solder ball profile image;
obtaining a defective solder ball image according to the solder ball outline image;
removing the defective tin ball image from the tin ball image to obtain a defect-free tin ball image;
and carrying out corrosion operation on the non-defective tin ball image according to the circular structure operator to obtain a first characteristic image.
6. The method for detecting solder ball defects of claim 5, wherein the obtaining of defective solder ball images based on the solder ball profile images comprises:
calculating the height and the surface area of the solder ball in the solder ball profile image;
and obtaining a defective tin ball image according to the height and the surface area.
7. The method of any of claims 1 to 6, wherein the thresholding of the second characteristic image to obtain defect detection results comprises:
acquiring a gray level histogram of the second characteristic image;
determining a threshold value according to the gray level histogram;
and performing threshold segmentation on the second characteristic image according to the threshold to obtain a defect detection result.
8. Solder ball defect detection apparatus, characterized in that, the apparatus comprises:
the image acquisition module is used for acquiring an initial image;
the first image operation module is used for carrying out affine transformation on the initial image to obtain a solder ball image;
the second image operation module is used for carrying out corrosion operation on the solder ball image according to a preset structural operator to obtain a first characteristic image;
the third image operation module is used for subtracting a first pixel value of a pixel point in the solder ball image from a second pixel value of a pixel point in the first characteristic image to obtain a second characteristic image;
and the image segmentation module is used for carrying out threshold segmentation on the second characteristic image to obtain a defect detection result.
9. Computer device, characterized in that the computer device comprises a memory and a processor, wherein the memory has stored therein a program which, when executed by the processor, is adapted to perform:
the method of claim 1 to 7.
10. A storage medium which is a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the computer is configured to execute:
the method for detecting solder ball defects according to any of claims 1 to 7.
CN202210672344.1A 2022-06-15 2022-06-15 Tin ball defect detection method and device, computer equipment and storage medium Pending CN115272173A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210672344.1A CN115272173A (en) 2022-06-15 2022-06-15 Tin ball defect detection method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210672344.1A CN115272173A (en) 2022-06-15 2022-06-15 Tin ball defect detection method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115272173A true CN115272173A (en) 2022-11-01

Family

ID=83760867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210672344.1A Pending CN115272173A (en) 2022-06-15 2022-06-15 Tin ball defect detection method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115272173A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117437237A (en) * 2023-12-22 2024-01-23 珠海格力电器股份有限公司 Defect detection method and device for U-shaped tube, electronic equipment and storage medium
CN117437237B (en) * 2023-12-22 2024-05-24 珠海格力电器股份有限公司 Defect detection method and device for U-shaped tube, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117437237A (en) * 2023-12-22 2024-01-23 珠海格力电器股份有限公司 Defect detection method and device for U-shaped tube, electronic equipment and storage medium
CN117437237B (en) * 2023-12-22 2024-05-24 珠海格力电器股份有限公司 Defect detection method and device for U-shaped tube, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107490582B (en) Assembly line workpiece detection system
CN110288566B (en) Target defect extraction method
CN109472271B (en) Printed circuit board image contour extraction method and device
CN112686858A (en) Visual defect detection method, device, medium and equipment for mobile phone charger
CN111598801B (en) Identification method for weak Mura defect
CN116542982B (en) Departure judgment device defect detection method and device based on machine vision
CN115908269A (en) Visual defect detection method and device, storage medium and computer equipment
CN110796615A (en) Image denoising method and device and storage medium
JP7449507B2 (en) Method of generating a mask for a camera stream, computer program product and computer readable medium
CN111489337A (en) Method and system for removing false defects through automatic optical detection
CN114998314A (en) PCB (printed Circuit Board) defect detection method based on computer vision
KR20190023374A (en) Method for testing display pannel
CN107909554B (en) Image noise reduction method and device, terminal equipment and medium
EP3712842A1 (en) System and method for evaluating symbols
CN116503388A (en) Defect detection method, device and storage medium
KR101677070B1 (en) System and Method for Automatically Detecting a Mura Defect using Morphological Image Processing and Labeling
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
KR101716111B1 (en) System and method for detecting foreign substance
CN114170165A (en) Chip surface defect detection method and device
KR100754969B1 (en) Image inspecting apparatus, image inspecting method, and computer-readable storage medium
CN115272173A (en) Tin ball defect detection method and device, computer equipment and storage medium
CN114565585A (en) Image detection method
US10958899B2 (en) Evaluation of dynamic ranges of imaging devices
CN112991251B (en) Method, device and equipment for detecting surface defects
CN114332079A (en) Plastic lunch box crack detection method, device and medium based on image processing

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