CN116309562B - Board defect identification method and system - Google Patents

Board defect identification method and system Download PDF

Info

Publication number
CN116309562B
CN116309562B CN202310553076.6A CN202310553076A CN116309562B CN 116309562 B CN116309562 B CN 116309562B CN 202310553076 A CN202310553076 A CN 202310553076A CN 116309562 B CN116309562 B CN 116309562B
Authority
CN
China
Prior art keywords
image
segmentation
matching
detection
defect
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
CN202310553076.6A
Other languages
Chinese (zh)
Other versions
CN116309562A (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.)
Jiangxi Firefly Microelectronics Technology Co ltd
Original Assignee
Jiangxi Firefly Microelectronics Technology 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 Jiangxi Firefly Microelectronics Technology Co ltd filed Critical Jiangxi Firefly Microelectronics Technology Co ltd
Priority to CN202310553076.6A priority Critical patent/CN116309562B/en
Publication of CN116309562A publication Critical patent/CN116309562A/en
Application granted granted Critical
Publication of CN116309562B publication Critical patent/CN116309562B/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/70Denoising; Smoothing
    • 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
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • 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)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a method and a system for identifying defects of a board, wherein the method comprises the steps of obtaining an original detection image and a standard template image of the board, and carrying out image preprocessing on the original detection image to obtain a processed detection image; threshold image segmentation is carried out on the processing detection image so as to obtain a plurality of segmentation detection images; sequentially performing coarse matching and fine matching on the plurality of segmentation detection images and the standard template image to obtain feature matching points, and performing matching point alignment on the plurality of segmentation detection images and the standard template image based on the feature matching points; based on a preset characteristic defect recognition algorithm, performing defect recognition on the segmentation detection image and the standard template image after matching point alignment, and outputting a corresponding defect recognition result.

Description

Board defect identification method and system
Technical Field
The invention belongs to the technical field of image recognition, and particularly relates to a method and a system for recognizing board defects.
Background
Defect recognition is a popular application of image recognition, and in the process of image recognition, it is usually a process of comparing a given template image with a test image and locating a similar sub-image in the test image, and in this process, matching between the test image and the template image is extremely important, but in the actual recognition process, there may be large interference, such as noise interference, outlier interference, complex image environment, and image rotation translation, etc., where the interference may cause that accurate matching between the test image and the template image cannot be achieved, thereby resulting in efficiency and accuracy of defect recognition.
Disclosure of Invention
In order to solve the technical problems, the invention provides a board defect identification method and a board defect identification system, which are used for solving the technical problems in the prior art.
In a first aspect, the present invention provides the following technical solutions, a method for identifying a board card defect, where the method includes:
acquiring an original detection image and a standard template image of a board card, and performing image preprocessing on the original detection image to obtain a processed detection image;
Threshold image segmentation is carried out on the processing detection image so as to obtain a plurality of segmentation detection images;
sequentially performing coarse matching and fine matching on the plurality of segmentation detection images and the standard template image to obtain feature matching points, and performing matching point alignment on the plurality of segmentation detection images and the standard template image based on the feature matching points;
and carrying out defect recognition on the segmentation detection image and the standard template image which are subjected to matching point alignment based on a preset characteristic defect recognition algorithm, and outputting a corresponding defect recognition result.
Compared with the prior art, the application has the beneficial effects that: firstly, acquiring an original detection image and a standard template image of a board card, and carrying out image preprocessing on the original detection image to obtain a processed detection image; then, threshold image segmentation is carried out on the processing detection image so as to obtain a plurality of segmentation detection images; then sequentially performing coarse matching and fine matching on the plurality of segmentation detection images and the standard template image to obtain feature matching points, and performing matching point alignment on the plurality of segmentation detection images and the standard template image based on the feature matching points; and finally, carrying out defect recognition on the segmented detection image and the standard template image which are subjected to matching point alignment based on a preset characteristic defect recognition algorithm, and outputting a corresponding defect recognition result.
Preferably, the step of performing image preprocessing on the original detection image to obtain a processed detection image includes:
and sequentially performing image cutting, image denoising and image enhancement on the original detection image to obtain a processed detection image.
Preferably, the step of performing threshold image segmentation on the processed detection image to obtain a plurality of segmented detection images includes:
setting a segmentation threshold value X, and segmenting the processing detection image into a first segmentation detection image T based on the segmentation threshold value X 1 From a second segmented detection image T 2
Respectively calculating the first segmentation detection image T 1 From the second segmentation detection image T 2 Is a pixel distribution probability of (1):
in the method, in the process of the invention,detecting an image T for a first segmentation 1 Pixel distribution probability, < >>Detecting the image T for the second segmentation 2 Pixel distribution probability, < >>The probability of i for the pixel gray;
calculating an inter-class variance of the processed detection image based on the pixel distribution probability
In the method, in the process of the invention,for processing the average gray value of the detected image +.>An average gray value for pixels having a gray level of 0 to a division threshold value X;
selecting the inter-class varianceAnd (3) the processing detection image is segmented based on the segmentation threshold value X corresponding to the maximum value so as to obtain a plurality of segmentation detection images.
Preferably, the step of sequentially performing coarse matching and fine matching on the plurality of segmentation detection images and the standard template image to obtain feature matching points includes:
acquiring polar coordinate projection vectors of the segmentation detection image and the standard template image, and carrying out smooth enhancement processing on the polar coordinate projection vectors to obtain detection vectors and template vectors;
calculating first similarity between the segmentation detection image and the standard template image based on the detection vector and the template vector, and determining a plurality of undetermined matching points based on the first similarity;
and calculating an orthogonal function product of each undetermined matching point, calculating second similarity between undetermined matching points of the segmentation detection image and undetermined matching points on the standard template image, and determining characteristic matching points based on the second similarity.
Preferably, the step of obtaining the polar coordinate projection vectors of the segmented detection image and the standard template image and performing smoothing enhancement processing on the polar coordinate projection vectors to obtain detection vectors and template vectors includes:
acquiring polar coordinate projection vectors of the segmentation detection image and the standard template image, and performing smoothing processing on the polar coordinate projection vectors to obtain a first smoothed feature vector And a second smooth feature vector->
In the method, in the process of the invention,for segmenting the polar projection vector of the detected image, < >>For the polar projection vector of the standard template image, < >>For convolution operation, ++>For the variance of the filter +.>For the current size of the filter, +.>Is the maximum size of the filter;
for the first smoothed feature vectorAnd the second smooth feature vector +.>And conducting derivative enhancement to obtain a detection vector and a template vector.
Preferably, the step of calculating a first similarity between the segmented detection image and the standard template image based on the detection vector and the template vector, and determining a plurality of undetermined matching points based on the first similarity includes:
based on the number of elements in the detection vector and the template vector, a distance accumulation matrix is establishedWherein->For detecting the number of elements of the vector, +.>The number of elements of the template vector;
according to the distance accumulation matrixDetermining a plurality of synchronous sequences, calculating the accumulation distance of each corresponding sequence, and selecting the synchronous sequence corresponding to the smallest accumulation distance as an optimal sequence;
and calculating the first similarity between the segmentation detection image and the standard template image according to the optimal sequence by adopting an NCC matching algorithm, and taking the point which is not smaller than the first similarity in the segmentation detection image and the standard template image as a undetermined matching point.
Preferably, the step of calculating an orthogonal function product of each of the undetermined matching points, and calculating a second similarity between the undetermined matching point of the segmentation detection image and the undetermined matching point on the standard template image, and determining the feature matching point based on the second similarity includes:
calculating the orthogonal function product of each undetermined matching point
In the method, in the process of the invention,for normalizing the coefficient, +.>For pending match point, ++>Orthogonal polynomial for undetermined matching point, +.>For the polar diameter of the undetermined matching point, +.>The polar angle of the undetermined matching point;
based on the orthogonal function productAnd calculating a second similarity between the undetermined matching points of the segmentation detection image and the undetermined matching points on the standard template image by adopting an NCC matching algorithm, and taking the points which are not smaller than the second similarity in the undetermined matching points as characteristic matching points.
Preferably, the step of performing defect recognition on the segmented detection image and the standard template image after matching point alignment based on a preset feature defect recognition algorithm, and outputting a corresponding defect recognition result includes:
performing subtraction operation on pixel points in the segmentation detection image and the standard template image after matching point alignment to obtain a defect area on the segmentation detection image and a standard area corresponding to the defect area in the standard template image;
Extracting a gray level histogram of the defect area and the standard area, comparing the gray level of the gray level histogram with the number of pixels of each gray level to obtain a first defect type result, converting the defect area and the standard area into HSV colors, comparing the color characteristics of the defect area and the standard area to obtain a second defect type result, calculating the rectangle degree of the minimum circumscribed rectangle of the defect area, calculating the area duty ratio of the minimum circumscribed rectangle of the defect area and a defect target, determining a third defect type result according to the rectangle degree and the area duty ratio, and determining a defect type according to the first defect type result, the second defect type result and the third defect type result;
and carrying out block splitting on the defect area to obtain a plurality of split sub-blocks with equal areas, calculating the color histogram similarity of the split sub-blocks and the standard area, if the color histogram similarity is not greater than a first threshold value, the split sub-blocks are defect sub-blocks, if the color histogram similarity is greater than the first threshold value and not greater than a second threshold value, the split sub-blocks are to-be-determined sub-blocks, and carrying out block splitting on the to-be-determined sub-blocks again, if the color histogram similarity is greater than the second threshold value, removing the split sub-blocks, and counting and determining the positions and the number of all the defect sub-blocks to obtain defect positions.
In a second aspect, the present invention provides a board defect identifying system, including:
the acquisition module is used for acquiring an original detection image and a standard template image of the board card and carrying out image preprocessing on the original detection image to obtain a processed detection image;
the segmentation module is used for carrying out threshold image segmentation on the processing detection image so as to obtain a plurality of segmentation detection images;
the matching module is used for sequentially carrying out rough matching and fine matching on the plurality of segmentation detection images and the standard template image to obtain feature matching points, and carrying out matching point alignment on the plurality of segmentation detection images and the standard template image based on the feature matching points;
and the identification module is used for carrying out defect identification on the segmentation detection image and the standard template image after matching point alignment based on a preset characteristic defect identification algorithm, and outputting a corresponding defect identification result.
Preferably, the dividing module includes:
a first segmentation module for setting a segmentation threshold X and segmenting the processing detection image into a first segmentation detection image T based on the segmentation threshold X 1 From a second segmented detection image T 2
A first computing sub-module for computing the first segmentation detection images T respectively 1 From a second segmented detection image T 2 Is a pixel distribution probability of (1):
in the method, in the process of the invention,detecting an image T for a first segmentation 1 Pixel distribution probability, < >>Detecting the image T for the second segmentation 2 Pixel distribution probability, < >>The probability of i for the pixel gray;
a second calculation sub-module for calculating the inter-class variance of the processed detection image based on the pixel distribution probability
In the method, in the process of the invention,for processing the average gray value of the detected image +.>An average gray value for pixels having a gray level of 0 to a division threshold value X;
a second segmentation submodule for selecting the inter-class varianceAnd (3) the processing detection image is segmented based on the segmentation threshold value X corresponding to the maximum value so as to obtain a plurality of segmentation detection images.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present 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 of a method for identifying defects of a board card according to a first embodiment of the present invention;
FIG. 2 is a detailed flowchart of step S2 in the board card defect identifying method according to the first embodiment of the present invention;
FIG. 3 is a detailed flowchart of step S3 in the board defect identifying method according to the first embodiment of the present invention;
fig. 4 is a detailed flowchart of step S31 in the board defect identifying method according to the first embodiment of the present invention;
FIG. 5 is a detailed flowchart of step S32 in the board defect identifying method according to the first embodiment of the present invention;
FIG. 6 is a detailed flowchart of step S33 in the board defect identifying method according to the first embodiment of the present invention;
FIG. 7 is a detailed flowchart of step S4 in the board defect identifying method according to the first embodiment of the present invention;
FIG. 8 is a block diagram illustrating a board defect identification system according to a second embodiment of the present invention;
fig. 9 is a block diagram of a hardware structure of a computer according to another embodiment of the present invention.
Embodiments of the present invention will be further described below with reference to the accompanying drawings.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. Several embodiments of the invention are presented in the figures. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
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 in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
Example 1
As shown in fig. 1, in a first embodiment of the present invention, the present invention provides a method for identifying a board defect, where the method includes:
s1, acquiring an original detection image and a standard template image of a board card, and performing image preprocessing on the original detection image to obtain a processed detection image;
specifically, in this step, the original detected image is a photograph of the front and back sides of the board photographed by the picture collecting device, and the standard template photograph is a standard defect-free photograph stored in the picture database.
The step S1 specifically includes:
sequentially performing image cutting, image denoising and image enhancement on the original detection image to obtain a processed detection image;
The purpose of picture cutting is in order to cut the blank area except the integrated circuit board in original detection image and get rid of to remain the image that only has the integrated circuit board, and the purpose that the image denoising and image enhancement is in order to make the image more clear and the characteristic is more outstanding, in order to follow-up defect identification process.
S2, carrying out threshold image segmentation on the processing detection image to obtain a plurality of segmentation detection images;
specifically, on the premise of defect identification of the board, the image needs to be segmented, and because the board is flexible and rigid staggered and the circuit is staggered with the background, in order to reduce the interference of sample difference on defect identification, the image needs to be segmented into a plurality of segmentation detection images.
As shown in fig. 2, the step S2 includes:
s21, setting a segmentation threshold value X, and segmenting the processing detection image into a first segmentation detection image T based on the segmentation threshold value X 1 From a second segmented detection image T 2
Here, the partition threshold X is preset, and the partition threshold may be changed according to a change in the following inter-class variance.
S22, respectively calculating the first segmentation detection images T 1 From a second segmented detection image T 2 Is a pixel distribution probability of (1):
In the method, in the process of the invention,detecting an image T for a first segmentation 1 Pixel distribution probability, < >>Detecting the image T for the second segmentation 2 Pixel distribution probability, < >>The probability of i for the pixel gray;
wherein the first segmentation detection image T 1 The gray value of the middle pixel point is between 0 and X, and the second divided detection image T 2 The gray value of the middle pixel point is between X and the maximum gray value,then the pixels are classified into a first segmented detection image T 1 Probability of->Then the pixels are classified into a second segmentation detection image T 2 Is a probability of (2).
S23, calculating the inter-class variance of the processing detection image based on the pixel distribution probability
In the method, in the process of the invention,for processing the average gray value of the detected image +.>An average gray value for pixels having a gray level of 0 to a division threshold value X;
s24, selecting the inter-class varianceThe corresponding segmentation threshold value X is the largest, and the processing detection image is segmented based on the segmentation threshold value X so as to obtain a plurality of segmentation detection images;
when the inter-class variance is larger, it means that the first segmented detected image T after classification 1 From a second segmented detection image T 2 The larger the difference is, so that the minimum probability of false segmentation can be ensured when the segmentation is carried out by the segmentation threshold value X when the inter-class variance is maximum.
S3, sequentially performing rough matching and fine matching on the plurality of segmentation detection images and the standard template image to obtain feature matching points, and performing matching point alignment on the plurality of segmentation detection images and the standard template image based on the feature matching points;
as shown in fig. 3, the step S3 includes:
s31, acquiring polar coordinate projection vectors of the segmentation detection image and the standard template image, and carrying out smooth enhancement processing on the polar coordinate projection vectors to obtain detection vectors and template vectors;
as shown in fig. 4, the step S31 includes:
s311, acquiring polar coordinate projection vectors of the segmentation detection image and the standard template image, and performing smoothing processing on the polar coordinate projection vectors to obtain a first smoothed feature vectorAnd a second smooth feature vector->
In the method, in the process of the invention,for segmenting the polar projection vector of the detected image, < >>For the polar projection vector of the standard template image, < >>For convolution operation, ++>For the variance of the filter +.>For the current size of the filter, +.>Is the maximum size of the filter;
specifically, in this step, an annular matching mode is adopted to replace a traditional rectangular matching mode, so that the method is applicable to a matching process under various interference conditions, in this step, the polar coordinate projection vectors are respectively established on the segmentation detection image and the standard template image by taking the center of the image as the center of a circle, the corresponding polar coordinate projection vectors can be determined according to the projection values of the concentric circles, meanwhile, by carrying out smoothing treatment on the polar coordinate projection vectors, the length of the vectors can be correspondingly reduced after the smoothing treatment, the matching difficulty is reduced, meanwhile, the noise resistance is high, and more characteristics can be reserved.
S312, for the first smooth feature vectorAnd the second smooth feature vector +.>Conducting derivative enhancement to obtain a detection vector and a template vector;
specifically, this step is to apply the first smoothing feature vectorAnd the second smooth characteristic vectorAnd carrying out derivation to obtain function vectors after derivation, so that characteristic peaks of the vectors can be increased, and the subsequent matching process is facilitated.
S32, calculating first similarity between the segmentation detection image and the standard template image based on the detection vector and the template vector, and determining a plurality of undetermined matching points based on the first similarity;
as shown in fig. 5, the step S32 includes:
s321, establishing a distance accumulation matrix based on the number of elements in the detection vector and the template vectorWherein->For detecting the number of elements of the vector, +.>The number of elements of the template vector;
specifically, in the actual matching process, the number of elements in the detection vector is equal to the number of elements in the template vector, namelyTo facilitate determination of the synchronization sequence in a subsequent step.
S322, accumulating the matrix according to the distanceDetermining a plurality of parallel synchronization sequences, calculating the accumulated distance of each corresponding sequence, Selecting a corresponding synchronous sequence with the smallest accumulation distance as an optimal sequence;
specifically, when the accumulation distance is smaller, the matching degree between the two sequences is represented to be higher, so that the corresponding synchronous sequence with the smallest accumulation distance needs to be selected as the optimal sequence, and the first similarity is determined based on the optimal sequence.
S323, calculating first similarity between the segmentation detection image and the standard template image according to the optimal sequence by adopting an NCC matching algorithm, and taking a point which is not smaller than the first similarity in the segmentation detection image and the standard template image as a to-be-determined matching point;
specifically, the optimal sequence represents that the accumulation distance is the smallest, and the accumulation distance is the smallest, which can reflect the degree of similarity to a certain extent, but it is difficult to directly calculate the first similarity between the segmented detection image and the standard template image, so that the first similarity between the segmented detection image and the standard template image can be calculated through an NCC matching algorithm, the undetermined matching point is determined according to the first similarity, and the undetermined matching point is a matching point determined in the rough matching process, and may include some interference points, so that the interference points in the undetermined matching point need to be removed in a subsequent step.
S33, calculating an orthogonal function product of each undetermined matching point, calculating second similarity between undetermined matching points of the segmentation detection image and undetermined matching points on the standard template image, and determining characteristic matching points based on the second similarity;
as shown in fig. 6, the step S33 includes:
s331, calculating an orthogonal function product of each undetermined matching point
In the method, in the process of the invention,for normalizing the coefficient, +.>For pending match point, ++>Orthogonal polynomial for undetermined matching point, +.>For the polar diameter of the undetermined matching point, +.>The polar angle of the undetermined matching point;
specifically, more feature vectors can be provided through the orthogonal function product and have more excellent feature expression capability so as to improve the accuracy of subsequent matching.
S332, based on the orthogonal function productAnd calculating a second similarity between the undetermined matching points of the segmentation detection image and the undetermined matching points on the standard template image by adopting an NCC matching algorithm, and taking the points which are not smaller than the second similarity in the undetermined matching points as characteristic matching points.
S4, performing defect recognition on the segmentation detection image and the standard template image after matching point alignment based on a preset characteristic defect recognition algorithm, and outputting a corresponding defect recognition result;
As shown in fig. 7, the step S4 includes:
s41, performing subtraction operation on pixel points in the segmentation detection image and the standard template image after matching points are aligned to obtain a defect area on the segmentation detection image and a standard area corresponding to the defect area in the standard template image;
specifically, by performing subtraction operation, the regions with different pixel values between the segmented detection image and the standard template image can be marked and roughly positioned, so that a plurality of defect regions are determined in the segmented detection image, and the defect regions only represent a certain number of defects in the segmented detection image at this time, but the specific types and specific coordinate positions of the defects cannot be obtained.
S42, extracting gray histograms of the defect area and the standard area, comparing gray levels of the gray histograms and the number of pixels of each gray level to obtain a first defect type result, converting the defect area and the standard area into HSV colors, comparing color features of the defect area and the standard area to obtain a second defect type result, calculating the rectangle degree of the minimum circumscribed rectangle of the defect area, calculating the area duty ratio of the minimum circumscribed rectangle of the defect area and a defect target, determining a third defect type result according to the rectangle degree and the area duty ratio, and determining a defect type according to the first defect type result, the second defect type result and the third defect type result;
Specifically, the first defect type result may reflect a solder joint defect, a foreign matter defect, etc. of the board card, the second defect type result may reflect a heterochromatic defect, a cavity recess defect, etc. of the board card, and the third defect type result may reflect a surface scratch, a bump, a scratch defect, a short circuit, an open circuit defect, etc. of the board card.
S43, carrying out block splitting on the defect area to obtain a plurality of split sub-blocks with equal areas, calculating the color histogram similarity of the split sub-blocks and the standard area, if the color histogram similarity is not greater than a first threshold value, the split sub-blocks are defect sub-blocks, if the color histogram similarity is greater than the first threshold value and not greater than a second threshold value, the split sub-blocks are sub-blocks to be determined, and carrying out block splitting on the sub-blocks to be determined again, and if the color histogram similarity is greater than the second threshold value, removing the split sub-blocks, and counting and determining the positions and the number of all the defect sub-blocks to obtain defect positions;
specifically, in the present embodiment, the number of split sub-blocks for the first block split is 9 times, and the number of splits is n 2 Wherein n is a positive integer not less than 2, so that after the first splitting, 9 split sub-blocks with equal areas are divided, the types of the split sub-blocks can be determined according to the color histogram similarity by calculating the color histogram similarity of the split sub-blocks and the standard area, and the split sub-blocks are three types, namely a defective sub-block, a non-defective sub-block and a sub-block to be fixed, respectively, wherein when the color histogram similarity is greater than a second threshold, the split sub-block is high in similarity with the standard area, the defect of the area represented by the split sub-block is required to be eliminated, when the color histogram similarity is greater than the first threshold and is not greater than the second threshold, the defect sub-block represented by the split sub-block is also possible to be a non-defective sub-block, so that the split sub-block is required to be continuously split, and in repeating step S43 until the sub-block to be fixed is not existed, the color histogram similarity is not greater than the first threshold, the split sub-block is low in similarity with the standard area, the defect is required to be represented by the split sub-block, and the specific defect is required to be retained after the specific shape is required to be obtained.
The first advantage of this embodiment is: firstly, acquiring an original detection image and a standard template image of a board card, and carrying out image preprocessing on the original detection image to obtain a processed detection image; then, threshold image segmentation is carried out on the processing detection image so as to obtain a plurality of segmentation detection images; then sequentially performing coarse matching and fine matching on the plurality of segmentation detection images and the standard template image to obtain feature matching points, and performing matching point alignment on the plurality of segmentation detection images and the standard template image based on the feature matching points; and finally, carrying out defect recognition on the segmented detection image and the standard template image which are subjected to matching point alignment based on a preset characteristic defect recognition algorithm, and outputting a corresponding defect recognition result.
Example two
As shown in fig. 8, in a second embodiment of the present invention, there is provided a card defect recognition system including:
in a second aspect, the present invention provides a board defect identifying system, including:
the acquisition module 1 is used for acquiring an original detection image and a standard template image of the board card and carrying out image preprocessing on the original detection image to obtain a processed detection image;
the segmentation module 2 is used for carrying out threshold image segmentation on the processing detection image so as to obtain a plurality of segmentation detection images;
the matching module 3 is used for sequentially performing rough matching and fine matching on the plurality of segmentation detection images and the standard template image to obtain feature matching points, and performing matching point alignment on the plurality of segmentation detection images and the standard template image based on the feature matching points;
and the identification module 4 is used for carrying out defect identification on the segmentation detection image and the standard template image after matching point alignment based on a preset characteristic defect identification algorithm, and outputting a corresponding defect identification result.
The acquiring module 1 is specifically configured to:
and sequentially performing image cutting, image denoising and image enhancement on the original detection image to obtain a processed detection image.
The segmentation module 2 comprises:
a first segmentation module for setting a segmentation threshold X and segmenting the processing detection image into a first segmentation detection image T based on the segmentation threshold X 1 From a second segmented detection image T 2
A first calculation sub-module for dividingSeparately calculating first divided detection images T 1 From a second segmented detection image T 2 Is a pixel distribution probability of (1):
in the method, in the process of the invention,detecting an image T for a first segmentation 1 Pixel distribution probability, < >>Detecting the image T for the second segmentation 2 Pixel distribution probability, < >>The probability of i for the pixel gray;
a second calculation sub-module for calculating the inter-class variance of the processed detection image based on the pixel distribution probability
In the method, in the process of the invention,for processing the average gray value of the detected image +.>An average gray value for pixels having a gray level of 0 to a division threshold value X;
a second segmentation submodule for selecting the inter-class varianceMaximum corresponding partition threshold X and based onThe segmentation threshold X segments the processing detection image to obtain a plurality of segmentation detection images.
The matching module 3 includes:
the processing sub-module is used for acquiring polar coordinate projection vectors of the segmentation detection image and the standard template image, and carrying out smooth enhancement processing on the polar coordinate projection vectors so as to obtain detection vectors and template vectors;
The first matching sub-module is used for calculating first similarity between the segmentation detection image and the standard template image based on the detection vector and the template vector, and determining a plurality of undetermined matching points based on the first similarity;
and the second matching sub-module is used for calculating the orthogonal function product of each undetermined matching point, calculating the second similarity between the undetermined matching point of the segmentation detection image and the undetermined matching point on the standard template image, and determining the characteristic matching point based on the second similarity.
The processing sub-module comprises:
a smoothing unit for obtaining polar coordinate projection vectors of the segmentation detection image and the standard template image, and smoothing the polar coordinate projection vectors to obtain a first smoothed feature vectorAnd a second smooth feature vector->
In the method, in the process of the invention,for segmenting the polar projection vector of the detected image, < >>For the polar projection vector of the standard template image, < >>For convolution operation, ++>For the variance of the filter +.>For the current size of the filter, +.>Is the maximum size of the filter;
an enhancement unit for the first smooth feature vectorAnd the second smooth feature vector +. >And conducting derivative enhancement to obtain a detection vector and a template vector. />
The first matching submodule includes:
a matrix unit for establishing a distance accumulation matrix based on the detection vector and the number of elements in the template vectorWherein->For detecting the number of elements of the vector, +.>The number of elements of the template vector;
a sequence unit for accumulating matrix according to the distanceDetermining ifThe sequences are synchronized, the accumulation distance of each corresponding sequence is calculated, and the synchronization sequence corresponding to the smallest accumulation distance is selected as the optimal sequence;
and the first similarity calculation unit is used for calculating the first similarity of the segmentation detection image and the standard template image according to the optimal sequence by adopting an NCC matching algorithm, and taking the point which is not smaller than the first similarity in the segmentation detection image and the standard template image as a undetermined matching point.
The second matching submodule includes:
a calculation unit for calculating an orthogonal function product of each undetermined matching point
In the method, in the process of the invention,for normalizing the coefficient, +.>For pending match point, ++>Orthogonal polynomial for undetermined matching point, +.>For the polar diameter of the undetermined matching point, +. >The polar angle of the undetermined matching point;
a second similarity calculation unit for integrating the functions based on the orthogonal functionsCalculating undetermined matching points of the segmentation detection image and undetermined matching points on the standard template image by adopting NCC matching algorithmAnd taking the points which are not smaller than the second similarity in the undetermined matching points as characteristic matching points.
The identification module 4 comprises:
the region identification sub-module is used for carrying out subtraction operation on the pixel points in the segmentation detection image and the standard template image after matching point alignment so as to obtain a defect region on the segmentation detection image and a standard region corresponding to the defect region in the standard template image;
the defect type identification sub-module is used for extracting the gray level histogram of the defect area and the standard area, comparing the gray level of the gray level histogram with the number of pixels of each gray level to obtain a first defect type result, converting the defect area and the standard area into HSV colors, comparing the color characteristics of the defect area and the standard area to obtain a second defect type result, calculating the rectangle degree of the minimum circumscribed rectangle of the defect area, calculating the area duty ratio of the minimum circumscribed rectangle of the defect area and a defect target, determining a third defect type result according to the rectangle degree and the area duty ratio, and determining a defect type according to the first defect type result, the second defect type result and the third defect type result;
The defect position identification sub-module is used for carrying out block splitting on the defect area to obtain a plurality of split sub-blocks with equal areas, calculating the color histogram similarity of the split sub-blocks and the standard area, if the color histogram similarity is not greater than a first threshold value, the split sub-blocks are defect sub-blocks, if the color histogram similarity is greater than the first threshold value and not greater than a second threshold value, the split sub-blocks are sub-blocks to be determined, and carrying out block splitting on the sub-blocks to be determined again, if the color histogram similarity is greater than the second threshold value, the split sub-blocks are removed, and the positions and the number of all the defect sub-blocks are counted and determined to obtain the defect positions.
In other embodiments of the present application, a computer is provided in the embodiments of the present application, including a memory 102, a processor 101, and a computer program stored in the memory 102 and capable of running on the processor 101, where the processor 101 implements the board defect identifying method as described above when executing the computer program.
In particular, the processor 101 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or may be configured as one or more integrated circuits that implement embodiments of the present application.
Memory 102 may include, among other things, mass storage for data or instructions. By way of example, and not limitation, memory 102 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, solid state Drive (Solid State Drive, SSD), flash memory, optical Disk, magneto-optical Disk, tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. Memory 102 may include removable or non-removable (or fixed) media, where appropriate. The memory 102 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 102 is a Non-Volatile (Non-Volatile) memory. In a particular embodiment, the Memory 102 includes Read-Only Memory (ROM) and random access Memory (Random Access Memory, RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, abbreviated PROM), an erasable PROM (Erasable Programmable Read-Only Memory, abbreviated EPROM), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, abbreviated EEPROM), an electrically rewritable ROM (Electrically Alterable Read-Only Memory, abbreviated EAROM), or a FLASH Memory (FLASH), or a combination of two or more of these. The RAM may be Static Random-Access Memory (SRAM) or dynamic Random-Access Memory (Dynamic Random Access Memory DRAM), where the DRAM may be a fast page mode dynamic Random-Access Memory (Fast Page Mode Dynamic Random Access Memory FPMDRAM), extended data output dynamic Random-Access Memory (Extended Date Out Dynamic Random Access Memory EDODRAM), synchronous dynamic Random-Access Memory (Synchronous Dynamic Random-Access Memory SDRAM), or the like, as appropriate.
Memory 102 may be used to store or cache various data files that need to be processed and/or communicated, as well as possible computer program instructions for execution by processor 101.
The processor 101 reads and executes the computer program instructions stored in the memory 102 to implement the above-described board defect identification method.
In some of these embodiments, the computer may also include a communication interface 103 and a bus 100. As shown in fig. 9, the processor 101, the memory 102, and the communication interface 103 are connected to each other via the bus 100 and perform communication with each other.
The communication interface 103 is used to implement communications between modules, devices, units, and/or units in embodiments of the application. The communication interface 103 may also enable communication with other components such as: and the external equipment, the image/data acquisition equipment, the database, the external storage, the image/data processing workstation and the like are used for data communication.
Bus 100 includes hardware, software, or both, coupling components of a computer to each other. Bus 100 includes, but is not limited to, at least one of: data Bus (Data Bus), address Bus (Address Bus), control Bus (Control Bus), expansion Bus (Expansion Bus), local Bus (Local Bus). By way of example, and not limitation, bus 100 may include a graphics acceleration interface (Accelerated Graphics Port), abbreviated AGP, or other graphics Bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) Bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (Industry Standard Architecture, ISA) Bus, a wireless bandwidth (InfiniBand) interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a micro channel architecture (Micro Channel Architecture, abbreviated MCa) Bus, a peripheral component interconnect (Peripheral Component Interconnect, abbreviated PCI) Bus, a PCI-Express (PCI-X) Bus, a serial advanced technology attachment (Serial Advanced Technology Attachment, abbreviated SATA) Bus, a video electronics standards association local (Video Electronics Standards Association Local Bus, abbreviated VLB) Bus, or other suitable Bus, or a combination of two or more of the foregoing. Bus 100 may include one or more buses, where appropriate. Although embodiments of the application have been described and illustrated with respect to a particular bus, the application contemplates any suitable bus or interconnect.
The computer can execute the board card defect recognition method based on the obtained board card defect recognition system, thereby realizing the defect recognition of the board card.
In still other embodiments of the present application, in combination with the above-mentioned method for identifying a board card defect, the embodiments of the present application provide a technical solution, a readable storage medium storing a computer program thereon, where the computer program implements the above-mentioned method for identifying a board card defect when executed by a processor.
Those of skill in the art will appreciate that the logic and/or steps represented in the flow diagrams or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (6)

1. The board defect identification method is characterized by comprising the following steps of:
acquiring an original detection image and a standard template image of a board card, and performing image preprocessing on the original detection image to obtain a processed detection image;
threshold image segmentation is carried out on the processing detection image so as to obtain a plurality of segmentation detection images;
sequentially performing coarse matching and fine matching on the plurality of segmentation detection images and the standard template image to obtain feature matching points, and performing matching point alignment on the plurality of segmentation detection images and the standard template image based on the feature matching points;
Performing defect recognition on the segmentation detection image and the standard template image which are subjected to matching point alignment based on a preset characteristic defect recognition algorithm, and outputting a corresponding defect recognition result;
the step of sequentially performing coarse matching and fine matching on the plurality of segmentation detection images and the standard template image to obtain feature matching points comprises the following steps:
acquiring polar coordinate projection vectors of the segmentation detection image and the standard template image, and carrying out smooth enhancement processing on the polar coordinate projection vectors to obtain detection vectors and template vectors;
calculating first similarity between the segmentation detection image and the standard template image based on the detection vector and the template vector, and determining a plurality of undetermined matching points based on the first similarity;
calculating an orthogonal function product of each undetermined matching point, calculating a second similarity between the undetermined matching point of the segmentation detection image and the undetermined matching point on the standard template image, and determining a characteristic matching point based on the second similarity;
the step of obtaining the polar coordinate projection vectors of the segmentation detection image and the standard template image and performing smooth enhancement processing on the polar coordinate projection vectors to obtain detection vectors and template vectors comprises the following steps:
Acquiring polar coordinate projection vectors of the segmentation detection image and the standard template image, and performing smoothing processing on the polar coordinate projection vectors to obtain a first smoothed feature vectorAnd a second smooth feature vector->
In the method, in the process of the invention,for segmenting the polar projection vector of the detected image, < >>For the polar projection vector of the standard template image, < >>For convolution operation, ++>For the variance of the filter +.>For the current size of the filter, +.>Is the maximum size of the filter;
for the first smoothed feature vectorAnd the second smooth feature vector +.>Conducting derivative enhancement to obtain a detection vector and a template vector;
the step of calculating a first similarity of the segmented detection image and the standard template image based on the detection vector and the template vector, and determining a plurality of undetermined matching points based on the first similarity comprises:
based on the number of elements in the detection vector and the template vector, a distance accumulation matrix is establishedWherein->For detecting the number of elements of the vector, +.>The number of elements of the template vector;
according to the distance accumulation matrixDetermining a plurality of synchronous sequences, calculating the accumulation distance of each corresponding sequence, and selecting the synchronous sequence corresponding to the smallest accumulation distance as an optimal sequence;
Calculating first similarity between the segmentation detection image and the standard template image according to the optimal sequence by adopting an NCC matching algorithm, and taking a point with the similarity not smaller than the first similarity in the segmentation detection image and the standard template image as a to-be-determined matching point;
the step of calculating the orthogonal function product of each undetermined matching point, calculating the second similarity between the undetermined matching point of the segmentation detection image and the undetermined matching point on the standard template image, and determining the feature matching point based on the second similarity comprises the following steps:
calculating the orthogonal function product of each undetermined matching point
In the method, in the process of the invention,for normalizing the coefficient, +.>For pending match point, ++>Orthogonal polynomial for undetermined matching point, +.>For the polar diameter of the undetermined matching point, +.>The polar angle of the undetermined matching point;
based on the orthogonal function productAnd calculating a second similarity between the undetermined matching point of the segmentation detection image and the undetermined matching point on the standard template image by adopting an NCC matching algorithm, and taking a point with the similarity not smaller than the second similarity in the undetermined matching point as a characteristic matching point.
2. The method for identifying board card defects according to claim 1, wherein the step of performing image preprocessing on the original inspection image to obtain a processed inspection image comprises:
And sequentially performing image cutting, image denoising and image enhancement on the original detection image to obtain a processed detection image.
3. The method for identifying board card defects according to claim 1, wherein the step of performing threshold image segmentation on the processed inspection image to obtain a plurality of segmented inspection images comprises:
setting a segmentation threshold value X, and segmenting the processing detection image into a first segmentation detection image T based on the segmentation threshold value X 1 From a second segmented detection image T 2
Respectively calculating the first segmentation detection image T 1 From the second segmentation detection image T 2 Is a pixel distribution probability of (1):
in the method, in the process of the invention,detecting an image T for a first segmentation 1 Pixel distribution probability, < >>Detecting the image T for the second segmentation 2 Pixel distribution probability, < >>The probability of i for the pixel gray;
calculating an inter-class variance of the processed detection image based on the pixel distribution probability
In the method, in the process of the invention,for processing the average gray value of the detected image +.>An average gray value for pixels having a gray level of 0 to a division threshold value X;
selecting the inter-class varianceAnd (3) the processing detection image is segmented based on the segmentation threshold value X corresponding to the maximum value so as to obtain a plurality of segmentation detection images.
4. The board card defect recognition method according to claim 1, wherein the step of performing defect recognition on the segmented detection image and the standard template image after matching point alignment based on a preset feature defect recognition algorithm, and outputting a corresponding defect recognition result comprises:
performing subtraction operation on pixel points in the segmentation detection image and the standard template image after matching point alignment to obtain a defect area on the segmentation detection image and a standard area corresponding to the defect area in the standard template image;
extracting a gray level histogram of the defect area and the standard area, comparing the gray level of the gray level histogram with the number of pixels of each gray level to obtain a first defect type result, converting the defect area and the standard area into HSV colors, comparing the color characteristics of the defect area and the standard area to obtain a second defect type result, calculating the rectangle degree of the minimum circumscribed rectangle of the defect area, calculating the area duty ratio of the minimum circumscribed rectangle of the defect area and a defect target, determining a third defect type result according to the rectangle degree and the area duty ratio, and determining a defect type according to the first defect type result, the second defect type result and the third defect type result;
And carrying out block splitting on the defect area to obtain a plurality of split sub-blocks with equal areas, calculating the color histogram similarity of the split sub-blocks and the standard area, if the color histogram similarity is not greater than a first threshold value, the split sub-blocks are defect sub-blocks, if the color histogram similarity is greater than the first threshold value and not greater than a second threshold value, the split sub-blocks are to-be-determined sub-blocks, and carrying out block splitting on the to-be-determined sub-blocks again, if the color histogram similarity is greater than the second threshold value, removing the split sub-blocks, and counting and determining the positions and the number of all the defect sub-blocks to obtain defect positions.
5. A card defect identification system, the system comprising:
the acquisition module is used for acquiring an original detection image and a standard template image of the board card and carrying out image preprocessing on the original detection image to obtain a processed detection image;
the segmentation module is used for carrying out threshold image segmentation on the processing detection image so as to obtain a plurality of segmentation detection images;
the matching module is used for sequentially carrying out rough matching and fine matching on the plurality of segmentation detection images and the standard template image to obtain feature matching points, and carrying out matching point alignment on the plurality of segmentation detection images and the standard template image based on the feature matching points;
The identification module is used for carrying out defect identification on the segmentation detection image and the standard template image after matching point alignment based on a preset characteristic defect identification algorithm, and outputting a corresponding defect identification result;
the matching module comprises:
the processing sub-module is used for acquiring polar coordinate projection vectors of the segmentation detection image and the standard template image, and carrying out smooth enhancement processing on the polar coordinate projection vectors so as to obtain detection vectors and template vectors;
the first matching sub-module is used for calculating first similarity between the segmentation detection image and the standard template image based on the detection vector and the template vector, and determining a plurality of undetermined matching points based on the first similarity;
the second matching sub-module is used for calculating an orthogonal function product of each undetermined matching point, calculating second similarity between undetermined matching points of the segmentation detection image and undetermined matching points on the standard template image, and determining characteristic matching points based on the second similarity;
the processing sub-module comprises:
a smoothing unit for obtaining polar coordinate projection vectors of the segmentation detection image and the standard template image, and smoothing the polar coordinate projection vectors to obtain a first smoothed feature vector And a second smooth feature vector
In the method, in the process of the invention,for segmenting the polar projection vector of the detected image, < >>For the polar projection vector of the standard template image, < >>For convolution operation, ++>For the variance of the filter +.>For the current size of the filter, +.>Is the maximum size of the filter;
an enhancement unit for the first smooth feature vectorAnd the second smooth feature vector +.>Conducting derivative enhancement to obtain a detection vector and a template vector;
the first matching submodule includes:
a matrix unit for establishing a distance accumulation matrix based on the detection vector and the number of elements in the template vectorWherein->For detecting the number of elements of the vector, +.>The number of elements of the template vector;
a sequence unit for accumulating matrix according to the distanceDetermining a plurality of synchronous sequences, calculating the accumulation distance of each corresponding sequence, and selecting the synchronous sequence corresponding to the smallest accumulation distance as an optimal sequence;
the first similarity calculation unit is used for calculating first similarity between the segmentation detection image and the standard template image according to the optimal sequence by adopting an NCC matching algorithm, and taking a point, in which the similarity between the segmentation detection image and the standard template image is not smaller than the first similarity, as a to-be-determined matching point;
The second matching submodule includes:
a calculation unit for calculating an orthogonal function product of each undetermined matching point
In the method, in the process of the invention,for normalizing the coefficient, +.>For pending match point, ++>Orthogonal polynomial for undetermined matching point, +.>For the polar diameter of the undetermined matching point, +.>The polar angle of the undetermined matching point;
a second similarity calculation unit for integrating the functions based on the orthogonal functionsCalculating a second similarity between the undetermined matching points of the segmentation detection image and the undetermined matching points on the standard template image by adopting an NCC matching algorithm, and taking the points with the similarity not smaller than the second similarity in the undetermined matching points as feature matchingAnd (5) dispensing.
6. The board card defect identification system of claim 5, wherein the segmentation module comprises:
a first segmentation module for setting a segmentation threshold X and segmenting the processing detection image into a first segmentation detection image T based on the segmentation threshold X 1 From a second segmented detection image T 2
A first computing sub-module for computing the first segmentation detection images T respectively 1 From a second segmented detection image T 2 Is a pixel distribution probability of (1):
in the method, in the process of the invention,detecting an image T for a first segmentation 1 Pixel distribution probability, < > >Detecting the image T for the second segmentation 2 Pixel distribution probability, < >>The probability of i for the pixel gray;
a second calculation sub-module for calculating the inter-class variance of the processed detection image based on the pixel distribution probability
In the method, in the process of the invention,for processing the average gray value of the detected image +.>An average gray value for pixels having a gray level of 0 to a division threshold value X;
a second segmentation submodule for selecting the inter-class varianceAnd (3) the processing detection image is segmented based on the segmentation threshold value X corresponding to the maximum value so as to obtain a plurality of segmentation detection images.
CN202310553076.6A 2023-05-17 2023-05-17 Board defect identification method and system Active CN116309562B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310553076.6A CN116309562B (en) 2023-05-17 2023-05-17 Board defect identification method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310553076.6A CN116309562B (en) 2023-05-17 2023-05-17 Board defect identification method and system

Publications (2)

Publication Number Publication Date
CN116309562A CN116309562A (en) 2023-06-23
CN116309562B true CN116309562B (en) 2023-08-18

Family

ID=86798091

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310553076.6A Active CN116309562B (en) 2023-05-17 2023-05-17 Board defect identification method and system

Country Status (1)

Country Link
CN (1) CN116309562B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101984463A (en) * 2010-11-02 2011-03-09 中兴通讯股份有限公司 Method and device for synthesizing panoramic image
CN103177451A (en) * 2013-04-17 2013-06-26 南京理工大学 Three-dimensional matching algorithm between adaptive window and weight based on picture edge
CN111553952A (en) * 2020-05-08 2020-08-18 中国科学院自动化研究所 Industrial robot visual image identification method and system based on survival countermeasure
CN113539298A (en) * 2021-07-19 2021-10-22 中通服咨询设计研究院有限公司 Sound big data analysis calculates imaging system based on cloud limit end
CN114926331A (en) * 2022-04-21 2022-08-19 上海赫千电子科技有限公司 Panoramic image splicing method applied to vehicle
KR102442090B1 (en) * 2022-06-30 2022-09-13 주식회사 비엠이코리아 Point registration method in surgical navigation system
CN115205223A (en) * 2022-06-22 2022-10-18 锋睿领创(珠海)科技有限公司 Visual detection method and device for transparent object, computer equipment and medium
CN115311301A (en) * 2022-10-12 2022-11-08 江苏银生新能源科技有限公司 PCB welding spot defect detection method
CN115546182A (en) * 2022-10-26 2022-12-30 上海第二工业大学 Method for detecting welding spot defects of printed circuit board based on digital image processing

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101984463A (en) * 2010-11-02 2011-03-09 中兴通讯股份有限公司 Method and device for synthesizing panoramic image
CN103177451A (en) * 2013-04-17 2013-06-26 南京理工大学 Three-dimensional matching algorithm between adaptive window and weight based on picture edge
CN111553952A (en) * 2020-05-08 2020-08-18 中国科学院自动化研究所 Industrial robot visual image identification method and system based on survival countermeasure
CN113539298A (en) * 2021-07-19 2021-10-22 中通服咨询设计研究院有限公司 Sound big data analysis calculates imaging system based on cloud limit end
CN114926331A (en) * 2022-04-21 2022-08-19 上海赫千电子科技有限公司 Panoramic image splicing method applied to vehicle
CN115205223A (en) * 2022-06-22 2022-10-18 锋睿领创(珠海)科技有限公司 Visual detection method and device for transparent object, computer equipment and medium
KR102442090B1 (en) * 2022-06-30 2022-09-13 주식회사 비엠이코리아 Point registration method in surgical navigation system
CN115311301A (en) * 2022-10-12 2022-11-08 江苏银生新能源科技有限公司 PCB welding spot defect detection method
CN115546182A (en) * 2022-10-26 2022-12-30 上海第二工业大学 Method for detecting welding spot defects of printed circuit board based on digital image processing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王春林等.《人工智能》.西安电子科技大学出版社,2020,(第第1版版),第149-151页. *

Also Published As

Publication number Publication date
CN116309562A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
CN110414507B (en) License plate recognition method and device, computer equipment and storage medium
CN116168026B (en) Water quality detection method and system based on computer vision
CN111681256B (en) Image edge detection method, image edge detection device, computer equipment and readable storage medium
Li et al. Road lane detection with gabor filters
CN109146832B (en) Video image splicing method and device, terminal equipment and storage medium
CN110660072B (en) Method and device for identifying straight line edge, storage medium and electronic equipment
CN114897806A (en) Defect detection method, electronic device and computer readable storage medium
Bahrami et al. A novel approach for partial blur detection and segmentation
CN112037287A (en) Camera calibration method, electronic device and storage medium
CN112258569A (en) Pupil center positioning method, device, equipment and computer storage medium
Ashoori-Lalimi et al. An efficient method for vehicle license plate detection in complex scenes
CN111223078B (en) Method for determining flaw level and storage medium
CN108960247B (en) Image significance detection method and device and electronic equipment
CN114298985B (en) Defect detection method, device, equipment and storage medium
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
CN117635590A (en) Defect detection method, defect detection device and storage medium for notebook computer shell
CN117333518A (en) Laser scanning image matching method, system and computer equipment
CN116596899A (en) Method, device, terminal and medium for identifying circulating tumor cells based on fluorescence image
CN116309562B (en) Board defect identification method and system
CN109871779B (en) Palm print identification method and electronic equipment
CN114821194B (en) Equipment running state identification method and device
CN116363097A (en) Defect detection method and system for photovoltaic panel
CN113822361B (en) SAR image similarity measurement method and system based on Hamming distance
CN116152191A (en) Display screen crack defect detection method, device and equipment based on deep learning
CN112329572B (en) Rapid static living body detection method and device based on frame and flash point

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