CN106528665A - AOI equipment test file searching method and system - Google Patents
AOI equipment test file searching method and system Download PDFInfo
- Publication number
- CN106528665A CN106528665A CN201610921643.9A CN201610921643A CN106528665A CN 106528665 A CN106528665 A CN 106528665A CN 201610921643 A CN201610921643 A CN 201610921643A CN 106528665 A CN106528665 A CN 106528665A
- Authority
- CN
- China
- Prior art keywords
- image
- feature description
- value
- description value
- testing image
- 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.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 251
- 238000000034 method Methods 0.000 title claims abstract description 22
- 238000000605 extraction Methods 0.000 claims abstract description 25
- 238000001514 detection method Methods 0.000 claims description 6
- 238000013507 mapping Methods 0.000 claims description 5
- 230000000052 comparative effect Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 229910002056 binary alloy Inorganic materials 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000005764 inhibitory process Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000003466 welding Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/58—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/583—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
- G06F16/5838—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- Library & Information Science (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Databases & Information Systems (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to a method and a system for searching an AOI equipment test file, wherein the method comprises the following steps: the method comprises the steps of obtaining an image generated by shooting a PCB board card to be detected, obtaining an image to be detected, carrying out feature extraction on the image to be detected to obtain a feature description value of the image to be detected, and obtaining feature description values of template images in pre-stored test files. Comparing the feature description value of the image to be detected with the feature description value of each template image to obtain the similarity between the image to be detected and each template image; and acquiring a test file where the template image with the maximum similarity to the image to be detected is located as the test file of the PCB to be detected. Therefore, the image of the PCB to be detected and the template image in the test file are analyzed, the test file corresponding to the PCB to be detected is found out, automatic search of the test file before AOI equipment test is achieved, manual participation is not needed, and search efficiency is high.
Description
Technical field
The present invention relates to field of optical measuring technologies, more particularly to a kind of AOI equipment test file lookup method and it is
System.
Background technology
AOI (Automatic Optic Inspection automatic optics inspections) equipment, is come butt welding based on optical principle
The equipment detected by the common deficiency run in producing of delivering a child, (Printed circuit board print such as on-line checking PCB
Circuit board) board.Generally, the test file of the pcb board card of each model that is stored with AOI equipment, wraps in each test file
The key message such as the test point of the pcb board card containing correspondence model and Prototype drawing.
Before AOI equipment tests pcb board card, need first to find the corresponding test file of model of pcb board card, root
Tested according to the test file.In traditional technology, staff is needed to check the pcb board card-type number for currently producing,
Then corresponding test file is searched on AOI equipment, open this file and tested.Therefore, each producing line changes production
During pcb board card-type, it is required for manually going to search corresponding board-like file, efficiency is low.
The content of the invention
Based on this, it is necessary to for the problems referred to above, there is provided a kind of AOI equipment test file lookup methods of efficiency high and be
System.
A kind of AOI equipment test file lookup method, including:
The image for shooting that pcb board card to be detected is generated is obtained, testing image is obtained;
Feature extraction is carried out to the testing image, the feature description value of the testing image is obtained;
Obtain the feature description value of template image in each test file;
Feature description value of the feature description value of the testing image with each template image is compared, described treating is obtained
The similarity of altimetric image and each template image;
The test file that the template image maximum with the testing image similarity is located is obtained, and as described to be detected
The test file of pcb board card.
A kind of AOI equipment test file searches system, including:
Testing image acquisition module, for obtaining the image for shooting that pcb board card to be detected is generated, obtains testing image;
Characteristic extracting module, for carrying out feature extraction to the testing image, the feature for obtaining the testing image is retouched
State value;
Description value acquisition module, for obtaining the feature description value of template image in each test file;
Similarity acquisition module, for by the feature description value of the feature description value of the testing image and each template image
Compare, obtain the similarity of the testing image and each template image;
Test file searching modul, for obtaining the test that the template image maximum with the testing image similarity is located
File, and as the test file of the pcb board card to be detected.
Above-mentioned AOI equipment test file lookup method, obtains the image for shooting that pcb board card to be detected is generated, obtains to be measured
After image, the feature description value that feature extraction obtains testing image is carried out to testing image, additionally, obtaining each test text for prestoring
The feature description value of template image in part.Then, testing image and template image are analyzed according to feature description value, will be treated
The feature description value of altimetric image is compared with the feature description value of each template image, obtains testing image with each template image
Similarity, similarity are used for characterizing the testing image probability size consistent with template image;Obtain similar to testing image
The test file that the maximum template image of degree is located, using the test file for obtaining as pcb board card to be detected test file.Such as
This, is analyzed by the template image in the image and test file to pcb board card to be detected, is found out and pcb board to be detected
Block corresponding test file, the automatic lookup before realizing the test of AOI equipment to test file, without the need for manually participating in, is searched
Efficiency high.
Description of the drawings
Fig. 1 is the flow chart of AOI equipment test file lookup methods in an embodiment;
Fig. 2 be an embodiment in feature extraction is carried out to testing image, obtain testing image feature description value it is concrete
Flow chart;
Fig. 3 is reference image vegetarian refreshments, the schematic diagram of central pixel point in an embodiment;
Fig. 4 is the schematic diagram of pixel pair in an embodiment;
Fig. 5 is that the feature description value in an embodiment by the feature description value of testing image with each template image is compared
It is right, obtain the particular flow sheet of testing image and the similarity of each template image;
Fig. 6 is the module frame chart of AOI equipment test file lookup system in an embodiment.
Specific embodiment
With reference to Fig. 1, the AOI equipment test file lookup methods in an embodiment, comprise the steps.
S110:The image for shooting that pcb board card to be detected is generated is obtained, testing image is obtained.
Pcb board card to be detected refers to the pcb board card for needing AOI equipment to be detected.The pcb board card to be detected of different models
Testing image, different at the aspect such as color or typesetting, the testing image for obtaining is different.By obtaining pcb board card to be detected
Image obtains testing image, is easy to be analyzed testing image.
S130:Feature extraction is carried out to testing image, the feature description value of testing image is obtained.
Feature extraction is carried out to testing image, can be that the parameter for characterizing testing image unique features is carried out at image
Reason, for example, carries out feature extraction according to gray value to testing image.The feature description value that feature extraction is obtained is to be measured for characterizing
The unique features of image, can be numerical value, or numeric string.The quantity of the feature description value of testing image can be one
It is individual, or it is multiple.
S150:Obtain the feature description value of template image in each test file.
The corresponding test file of pcb board card of the various models that are stored with AOI equipment, is stored with each test file
The template image of the pcb board card of correspondence model, from the disk of AOI equipment, automatic indexing listed files can search test text
Part.The feature description value of template image can, after the feature description value for obtaining testing image, carry out spy to each template image
Levy extraction to obtain, or prestore.The quantity of the feature description value of template image can be one, or it is many
It is individual.
In the present embodiment, before step S150, also include:Feature extraction is carried out to template image, template image is obtained
Feature description value.The concrete grammar and the concrete grammar for carrying out feature extraction to testing image of feature extraction is carried out to template image
It is identical.The feature description value of all template images is obtained by carrying out feature extraction in advance, is easy to directly invoke, improve operation just
Profit.Specifically, step S150 can be performed before step S110.
S170:Feature description value of the feature description value of testing image with each template image is compared, obtains to be measured
The similarity of image and each template image.
When the quantity of the feature description value of testing image is one, by the feature of this feature description value and all template images
Description value is compared;When the quantity of the feature description value of testing image is multiple, respectively by each feature description value of testing image
Compare with the feature description value of template image.
S190:The test file that the template image maximum with testing image similarity is located is obtained, and as PCB to be detected
The test file of board.
Similarity is bigger, represents that testing image is more similar to template image.By comparing testing image and each Prototype drawing
The similarity of picture, chooses maximum therein, using maximum corresponding template image place test file as with PCB to be detected
The corresponding test file of board.
Above-mentioned AOI equipment test file lookup method, obtains the image for shooting that pcb board card to be detected is generated, obtains to be measured
After image, the feature description value that feature extraction obtains testing image is carried out to testing image, additionally, obtaining each test text for prestoring
The feature description value of template image in part.Then, testing image and template image are analyzed according to feature description value, will be treated
The feature description value of altimetric image is compared with the feature description value of each template image, obtains testing image with each template image
Similarity, similarity are used for characterizing the testing image probability size consistent with template image;Obtain similar to testing image
The test file that the maximum template image of degree is located, using the test file for obtaining as pcb board card to be detected test file.Such as
This, is analyzed by the template image in the image and test file to pcb board card to be detected, is found out and pcb board to be detected
Block corresponding test file, the automatic lookup before realizing the test of AOI equipment to test file, without the need for manually participating in, is searched
Efficiency high.
In one embodiment, with reference to Fig. 2, step S130 includes step S131 to step S136.
S131:The Selection Center pixel from testing image.If so, then execution step S132.
The number of central pixel point can be one, or multiple.In the present embodiment, the side of Selection Center pixel
Method is:The square of multiple pre-set dimensions is not chosen according to order from left to right, from top to bottom successively from testing image overlappingly
Shape block, the pixel centered on the corresponding pixel of the central point of rectangular block.For example, pre-set dimension can be 9 pixels of every row
The square block of point, 9 pixels of each column.It is appreciated that in other embodiments, the selection mode of central pixel point can also be
Other, for example, it may be randomly select one or more central pixel points from testing image.
S132:Whether inspection center's pixel is characterized a little.
Whether central pixel point is characterized a little, specially judges whether meet default bar as the image attributes of feature
Part, if meet default condition, then it represents that central pixel point is characterized a little;Otherwise, represent that central pixel point is not characteristic point.
For example, if the feature with gray value as image, can determine whether whether the gray value of central pixel point meets default condition.Feature
The number of point can be one, or multiple.
In the present embodiment, step S132 includes step (a1) to step (a5).
Step (a1):Centered on central pixel point, multiple references are obtained from the range of predeterminable area according to pre-configured orientation
Pixel simultaneously obtains the total number of reference image vegetarian refreshments.
Wherein, pre-configured orientation and predeterminable area specifically can be arranged according to actual needs.For example, in the present embodiment, such as Fig. 3
It is shown, pixel centered on F, corresponding four reference image vegetarian refreshments at the pre-configured orientation of F1, F2, F3, F4 position, predeterminable area scope is
Obtain the rectangular block scope of the pre-set dimension arranged during central pixel point.It is appreciated that in other embodiments, pre-configured orientation is also
Can be other orientation, the number of reference image vegetarian refreshments can also be other.
Step (a2):Calculate the absolute value of the difference of the gray value of reference image vegetarian refreshments and the gray value of central pixel point.
When reference image vegetarian refreshments has multiple, step (a2) is the gray value and center pixel for calculating each reference image vegetarian refreshments respectively
The absolute value of the difference of the gray value of point.
Step (a3):Detection obtains referring to number more than the number of the corresponding reference image vegetarian refreshments of absolute value of preset difference value.
Wherein, preset difference value specifically can be arranged according to actual needs.By comparing the size of absolute value and preset difference value,
Absolute value is more than preset difference value, represents that the gray value between corresponding reference image vegetarian refreshments and central pixel point differs larger, therefore
The reference number that detection is obtained, can be used to indicate that the number of the reference image vegetarian refreshments for differing larger with the gray value of central pixel point
Mesh.
Step (a4):Judge whether the ratio with reference to number with the total number of reference image vegetarian refreshments is more than or equal to preset value.
If so, represent the feature of central pixel point substantially, now execution step (a5).
Wherein, the size of preset value specifically can be arranged according to actual needs.
Step (a5):Judge that central pixel point is characterized a little.
For example, preset value can be 0.5, with reference to Fig. 3, in four reference image vegetarian refreshments, have the gray scale of three reference image vegetarian refreshments
When the absolute value of the difference of the gray value of value and central pixel point is more than preset difference value, judge that central pixel point F is characterized a little.
The present embodiment is compared by central pixel point is carried out gray value with the pixel of surrounding, is judged according to comparative result
Whether central pixel point is characterized a little, processes easy and accuracy high.
S133:Centered on characteristic point, obtain predeterminable area in the range of preset number pixel to and sort.
The predeterminable area scope that predeterminable area scope is adopted with Selection Center pixel is identical.Preset number can be according to reality
Border needs concrete setting, generally takes 128,256,512 equivalent.Pixel is to including two pixels, two of which pixel can
To randomly select.For example, as shown in figure 4, by taking wherein 4 pixels pair as an example, respectively:P1 (A1, B1), P2 (A2, B2), P3
(A3, B3), P4 (A4, B4).
S134:Respectively the gray value of each two pixels of pixel centering is compared, the two of each pixel pair are obtained
Binary value.
It is compared by the gray value to two pixels of pixel centering, comparative result binarization is obtained into two and is entered
Numerical value processed.In the present embodiment, S134 is specially:Judge whether the gray value of first pixel of pixel centering is more than or equal to
The gray value of second pixel point, if so, then the binary numeral of the pixel pair is 1;Otherwise, the binary system of the pixel pair
Numerical value is 0.It is appreciated that in other embodiments, can also be using other modes compared result binarization, for example,
If the gray value of first pixel is less than the gray value of second pixel point, binary numeral is 1;Otherwise, binary number
It is worth for 0.
S135:Arrange by the binary numeral to each pixel pair that puts in order of pixel pair, obtain characteristic point
Binary string.
, to one binary numeral of correspondence, multiple pixels are to rearranging the two of a character pair point for each pixel
System string, therefore, the digit of binary string is the number of pixel pair.
S136:Using the binary string of characteristic point as feature description value.
When the number of characteristic point is one, feature description value is a binary string;It is when the number of characteristic point is multiple, special
Levying description value includes multiple binary strings.
It is appreciated that in other embodiments, step S130 can also adopt other modes.For example, step S130 can be with
Including:The corresponding pixel of center position for choosing testing image is characterized a little;Other pixels in addition to characteristic point are made
For reference image vegetarian refreshments;Reference image vegetarian refreshments and characteristic point are carried out gray value successively to compare, if the gray value of characteristic point is more than or waits
In the gray value of reference image vegetarian refreshments, then it is 1 to obtain binary numeral, otherwise, obtains binary numeral for 0;According to comparative sequence
The binary numeral that arrangement is obtained is obtained the binary string of Feature point correspondence, and as feature description value.
In one embodiment, with reference to Fig. 5, step S170 includes step S171 to step S174.
S171:Obtain the total number of the feature description value of testing image.
S172:Similarity comparison is carried out to the feature description value of testing image and the feature description value of template image.
When the corresponding feature description value quantity of testing image is one, step S172 is to retouch the single feature of testing image
The single or multiple feature description values that value is stated with template image carry out similarity comparison;The corresponding feature description value quantity of testing image
For it is multiple when, the single or multiple feature description values by each feature description value of testing image with template image are compared respectively
It is right, can be specifically the feature description value of the feature description value of testing image and template image is corresponded after compare,
Can be that the feature description value of testing image is carried out into similarity comparison one by one with all feature description values of template image respectively.
In the present embodiment, feature description value is numeric string.S172 includes step (b1) to step (b5).
Step (b1):Obtain the digit of the numeric string of testing image.
Numeric string includes multiple numerical value, the numerical value number that the digit index word string of numeric string includes.For example, numeric string is
Binary string, the digit of numeric string are the number of the binary numeral that binary string is included.
Step (b2):Calculate the Hamming distance of the numeric string of testing image and the numeric string of template image.
By calculating Hamming distance, can analyze identical in the numeric string for learn the numeric string with template image of testing image
The quantity of position different value.For example, (00) is 1 with the Hamming distance of (01), and the Hamming distance of (110) and (101) is 2.
Step (b3):The ratio that Hamming distance takes the digit of numeric string is calculated, different ratio is obtained.
Different ratio, the quantity of as identical bits different value account for the ratio of total bit.By calculating different ratio, can obtain
Know testing image numeric string and template image numeric string between different degree.
Step (b4):Judge different ratio whether less than preset ratio.If so, then execution step (b5).
Step (b5):Judge that the feature description value of testing image is similar to the feature description of template image value.
Preset ratio specifically can be arranged according to actual needs.If different ratio is less than preset ratio, then it represents that treat mapping
The numeric string of picture is similar to the numeric string of template image;Otherwise, represent the numeric string of the numeric string with template image of testing image
Difference is larger.
Hamming distance can intuitively compare positions different between two numeric strings, by according to Hamming distance and numeric string
Digit analysis testing image numeric string and template image numeric string, it is whether similar so as to analyze feature description value, accurately
Degree is high.
S173:The quantity of the feature description value of the record testing image similar to the feature description of template image value, obtains
Similar amt.
Similar amt is the numerical value obtained according to Similar contrasts' result, during the similarity comparison of step S172, each time
Similar or dissimilar result is obtained after comparison all, if result is similar, similar amt adds one.
S174:The ratio of similar amt and the total number of the feature description value of testing image is calculated, and as testing image
With the similarity of template image.
Using calculated ratio as similarity, similar amt is more, and calculated ratio is bigger, testing image with
Corresponding template image similarity is bigger.
It is appreciated that in other embodiments, step S170 can also adopt other modes.For example, step S170 includes:
Calculate the Hamming distance of the feature description value of testing image and the feature description value of template image;The feature description value of testing image
When feature description value with template image is one, calculated Hamming distance quantity is one, is directly made Hamming distance
For testing image and the similarity of template image;The feature description value of testing image is multiple or the feature description value of template image
For it is multiple when, calculated Hamming distance quantity selects the minima in multiple Hamming distances as testing image for multiple
With the similarity of template image.
In one embodiment, also include after step S190:Open the test file of pcb board card to be detected.By looking into
Automatically opened up after the test file for finding matching, without the need for manually operating, the testing efficiency of pcb board card to be detected is high.
With reference to Fig. 6, the AOI equipment test file in an embodiment searches system, including testing image acquisition module 110,
Characteristic extracting module 130, description value acquisition module 150, similarity acquisition module 170 and test file searching modul 190.
Testing image acquisition module 110 is used for obtaining the image for shooting that pcb board card to be detected is generated, and obtains testing image.
Testing image is obtained by obtaining the image of pcb board card to be detected, is easy to be analyzed testing image.
Characteristic extracting module 130 obtains the feature description value of testing image for carrying out feature extraction to testing image.It is special
Levy and the feature description value for obtaining is extracted for characterizing the unique features of testing image, can be numerical value, or numeric string.Treat
The quantity of the feature description value of altimetric image can be one, or it is multiple.
Description value acquisition module 150 is used for obtaining the feature description value of template image in each test file.Template image
Feature description value can, after the feature description value for obtaining testing image, be carried out feature extraction to each template image and obtain,
Can prestore.The quantity of the feature description value of template image can be one, or it is multiple.
In the present embodiment, above-mentioned AOI equipment test file searches system also includes advance acquisition module, for Prototype drawing
As carrying out feature extraction, the feature description value of template image is obtained.Specifically, the concrete side for carrying out feature extraction to template image
Method is identical with the concrete grammar for carrying out feature extraction to testing image.All template images are obtained by carrying out feature extraction in advance
Feature description value, be easy to directly invoke, improve operation ease.
Similarity acquisition module 170 enters for the feature description value by the feature description value of testing image with each template image
Row is compared, and obtains the similarity of testing image and each template image.
Test file searching modul 190 is used for obtaining the test text that the template image maximum with testing image similarity is located
Part, and as the test file of pcb board card to be detected.
Similarity is bigger, represents that testing image is more similar to template image.By comparing testing image and each Prototype drawing
The similarity of picture, chooses maximum therein, using maximum corresponding template image place test file as with PCB to be detected
The corresponding test file of board.
Above-mentioned AOI equipment test file searches system, and testing image acquisition module 110 is obtained and shoots pcb board card to be detected
The image of generation, after obtaining testing image, characteristic extracting module 130 carries out feature extraction to testing image and obtains testing image
Feature description value, additionally, description value acquisition module 150 obtains the feature description value of template image in each test file for prestoring.
Then, testing image and template image are analyzed according to feature description value, similarity acquisition module 170 is by testing image
The feature description value of feature description value and each template image is compared, and obtains the similarity of testing image and each template image,
Similarity is used for characterizing the testing image probability size consistent with template image;Test file searching modul 190 obtain with
The test file that the maximum template image of testing image similarity is located, using the test file for obtaining as pcb board card to be detected
Test file.Thus, being analyzed by the template image in the image and test file to pcb board card to be detected, find out
Test file corresponding with pcb board card to be detected, the automatic lookup before realizing the test of AOI equipment to test file, need not
Artificial to participate in, search efficiency is high.
In one embodiment, characteristic extracting module 130 includes that pixel chooses unit (not shown), pixel detector unit
(not shown), pixel are to acquiring unit (not shown), gray value comparing unit (not shown), binary string acquiring unit (figure
Do not show) and feature description value determining unit (not shown).
Pixel chooses unit for the Selection Center pixel from testing image.
The number of central pixel point can be one, or multiple.In the present embodiment, pixel chooses unit selection
The method of central pixel point is:According to order from left to right, from top to bottom successively not overlappingly from testing image choose it is many
The rectangular block of individual pre-set dimension, the pixel centered on the corresponding pixel of the central point of rectangular block.For example, pre-set dimension can be with
It is 9 pixels of every row, the square block of 9 pixels of each column.It is appreciated that in other embodiments, the choosing of central pixel point
The mode of taking can also be other, for example, it may be randomly selecting one or more central pixel points from testing image.
Whether pixel detector unit is characterized a little for inspection center's pixel.
The number of characteristic point can be one, or multiple.
In the present embodiment, pixel detector unit is used for:Centered on central pixel point, according to pre-configured orientation from preset areas
Multiple reference image vegetarian refreshments are obtained in the range of domain and obtain the total number of reference image vegetarian refreshments;The gray value of calculating reference image vegetarian refreshments is with
The absolute value of the difference of the gray value of imago vegetarian refreshments;Number of the detection more than the corresponding reference image vegetarian refreshments of absolute value of preset difference value,
Obtain referring to number;Judge whether the ratio with reference to number with the total number of reference image vegetarian refreshments is more than or equal to preset value;If so,
Then judge that central pixel point is characterized a little.The present embodiment carries out gray value ratio by the pixel by central pixel point with surrounding
Compared with, judging whether central pixel point is characterized a little according to comparative result, process is easy and accuracy is high.
Pixel centered on characteristic point, obtains preset areas to acquiring unit for when central pixel point is characterized
The pixel of the preset number in the range of domain to and sort.
Gray value comparing unit is used for being compared the gray value of each two pixels of pixel centering respectively, obtains each
The binary numeral of pixel pair.
It is compared by the gray value to two pixels of pixel centering, comparative result binarization is obtained into two and is entered
Numerical value processed.In the present embodiment, gray value comparing unit specifically for:The gray value for judging first pixel of pixel centering is
The no gray value more than or equal to second pixel point, if so, then the binary numeral of the pixel pair is 1;Otherwise, the pixel
Point to binary numeral be 0.It is appreciated that in other embodiments, can also be using other modes compared result two
Enter inhibition and generation, for example, if the gray value of first pixel is less than the gray value of second pixel point, binary numeral is 1;It is no
Then, binary numeral is 0.
Binary string acquiring unit is for being carried out by the binary numeral to each pixel pair that puts in order of pixel pair
Arrangement, obtains the binary string of characteristic point.
Feature description value determining unit for using the binary string of characteristic point as feature description value.
It is appreciated that in other embodiments, characteristic extracting module 130 can also obtain testing image using other modes
Feature description value.For example, characteristic extracting module 130 specifically for:Choose the corresponding pixel of center position of testing image
Point is characterized a little;Using other pixels in addition to characteristic point as reference image vegetarian refreshments;Successively reference image vegetarian refreshments is clicked through with feature
Row gray value compares, if the gray value of characteristic point is more than or equal to the gray value of reference image vegetarian refreshments, obtaining binary numeral is
1, otherwise, binary numeral is obtained for 0;The binary numeral obtained according to comparative sequence arrangement is obtained Feature point correspondence
Binary string, and as feature description value.
In one embodiment, similarity acquisition module 170 includes number acquiring unit (not shown), approx imately-detecting unit
(not shown), number recording unit (not shown) and similarity calculated (not shown).
Number acquiring unit is used for the total number of the feature description value for obtaining testing image.
Approx imately-detecting unit is similar for carrying out to the feature description value of testing image and the feature description value of template image
Compare.
In the present embodiment, feature description value is numeric string, and approx imately-detecting unit is used for:Obtain the numeric string of testing image
Digit;Calculate the Hamming distance of the numeric string of testing image and the numeric string of template image;Calculate Hamming distance and take numeric string
Digit ratio, obtain different ratio;Judge different ratio whether less than preset ratio;If so, then judge testing image
Feature description value is similar to the feature description of template image value.
Number recording unit is used for the feature description value of the testing image for recording similar to the feature description of template image value
Quantity, obtain similar amt.
Similar amt is the numerical value obtained according to Similar contrasts' result, during approx imately-detecting unit carries out similarity comparison,
Similar or dissimilar result is obtained all after comparing each time, if result is similar, similarity number in number recording unit
Amount Jia one.
Similarity calculated is used for calculating the ratio of similar amt and the total number of the feature description value of testing image, and
As testing image and the similarity of template image.
Using calculated ratio as similarity, similar amt is more, and calculated ratio is bigger, testing image with
Corresponding template image similarity is bigger.
It is appreciated that in other embodiments, similarity acquisition module 170 can also realize similarity using other modes
Acquisition.For example, similarity acquisition module 170 specifically for:Calculate the feature description value of testing image and the spy of template image
Levy the Hamming distance of description value;When the feature description value of the feature description value of testing image and template image is one, calculate
The Hamming distance quantity for arriving is one, directly using Hamming distance as testing image and the similarity of template image;Testing image
Feature description value be multiple or the feature description value of template image for it is multiple when, calculated Hamming distance quantity is many
Individual, the minima in the multiple Hamming distances of selection is used as testing image and the similarity of template image.
In one embodiment, above-mentioned AOI equipment test file searches system also includes file opening module (not shown), uses
In the test file for opening pcb board card to be detected.By being automatically opened up after the test file for finding matching, need not
Artificial to operate, the testing efficiency of pcb board card to be detected is high.
Each technical characteristic of embodiment described above arbitrarily can be combined, for making description succinct, not to above-mentioned reality
Apply all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, the scope of this specification record is all considered to be.
Embodiment described above only expresses the several embodiments of the present invention, and its description is more concrete and detailed, but and
Therefore can not be construed as limiting the scope of the patent.It should be pointed out that for one of ordinary skill in the art comes
Say, without departing from the inventive concept of the premise, some deformations and improvement can also be made, these belong to the protection of the present invention
Scope.Therefore, the protection domain of patent of the present invention should be defined by claims.
Claims (10)
1. a kind of AOI equipment test file lookup method, it is characterised in that include:
The image for shooting that pcb board card to be detected is generated is obtained, testing image is obtained;
Feature extraction is carried out to the testing image, the feature description value of the testing image is obtained;
Obtain the feature description value of template image in each test file;
Feature description value of the feature description value of the testing image with each template image is compared, obtains described treating mapping
As the similarity with each template image;
The test file that the template image maximum with the testing image similarity is located is obtained, and as the PCB to be detected
The test file of board.
2. AOI equipment test file lookup method according to claim 1, it is characterised in that described to treat mapping to described
As carrying out feature extraction, the feature description value of the testing image is obtained, including:
From Selection Center pixel in the testing image;
Detect whether the central pixel point is characterized a little;
If the central pixel point is characterized a little, centered on the characteristic point, the present count in the range of predeterminable area is obtained
Purpose pixel to and sort;
Respectively the gray value of each two pixels of pixel centering is compared, the binary numeral of each pixel pair is obtained;
Arrange by the binary numeral to each pixel pair that puts in order of the pixel pair, obtain the characteristic point
Binary string;
Using the binary string of the characteristic point as the feature description value.
3. AOI equipment test file lookup method according to claim 2, it is characterised in that the detection center
Whether pixel is characterized a little, including:
Centered on the central pixel point, multiple reference image vegetarian refreshments are obtained from the range of the predeterminable area according to pre-configured orientation
And obtain the total number of the reference image vegetarian refreshments;
Calculate the gray value of the reference image vegetarian refreshments and the absolute value of the difference of the gray value of the central pixel point;
Detection obtains referring to number more than the number of the corresponding reference image vegetarian refreshments of absolute value of preset difference value;
Judge the reference number with the ratio of the total number of the reference image vegetarian refreshments whether more than or equal to preset value;
If so, then judge that the central pixel point is characterized a little.
4. AOI equipment test file lookup method according to claim 1, it is characterised in that described to treat mapping by described
The feature description value of picture is compared with the feature description value of each template image, obtains the testing image with each template image
Similarity, including:
Obtain the total number of the feature description value of the testing image;
Similarity comparison is carried out with the feature description value of the template image to the feature description value of the testing image;
The quantity of the feature description value of the record testing image similar to the feature description of template image value, obtains phase
Like quantity;
The ratio of the similar amt and the total number of the feature description value of the testing image is calculated, and mapping is treated as described
As the similarity with the template image.
5. AOI equipment test file lookup method according to claim 4, it is characterised in that the feature description value is
Numeric string, the feature description value to the testing image carry out similarity comparison with the feature description value of the template image,
Including:
Obtain the digit of the numeric string of the testing image;
Calculate the numeric string of the testing image and the Hamming distance of the numeric string of the template image;
The ratio that the Hamming distance takes the digit of the numeric string is calculated, different ratio is obtained;
Judge the different ratio whether less than preset ratio;
If so, then judge that the feature description value of the testing image is similar to the feature description value of the template image.
6. a kind of AOI equipment test file searches system, it is characterised in that include:
Testing image acquisition module, for obtaining the image for shooting that pcb board card to be detected is generated, obtains testing image;
Characteristic extracting module, for carrying out feature extraction to the testing image, obtains the feature description value of the testing image;
Description value acquisition module, for obtaining the feature description value of template image in each test file;
Similarity acquisition module, is carried out for the feature description value by the feature description value of the testing image with each template image
Compare, obtain the similarity of the testing image and each template image;
Test file searching modul, for obtaining the test text that the template image maximum with the testing image similarity is located
Part, and as the test file of the pcb board card to be detected.
7. AOI equipment test file according to claim 6 searches system, it is characterised in that the characteristic extracting module,
Including:
Pixel chooses unit, for from Selection Center pixel in the testing image;
Pixel detector unit, for detecting whether the central pixel point is characterized a little;
Pixel to acquiring unit, for when the central pixel point is characterized, centered on the characteristic point, obtaining pre-
If the pixel of the preset number in regional extent to and sort;
Gray value comparing unit, for being compared to the gray value of each two pixels of pixel centering respectively, obtains each picture
The binary numeral of vegetarian refreshments pair;
Binary string acquiring unit, for being carried out by the binary numeral to each pixel pair that puts in order of the pixel pair
Arrangement, obtains the binary string of the characteristic point;
Feature description value determining unit, for using the binary string of the characteristic point as the feature description value.
8. AOI equipment test file according to claim 7 searches system, it is characterised in that the pixel detection is single
Unit is used for:Centered on the central pixel point, multiple reference images are obtained from the range of the predeterminable area according to pre-configured orientation
Vegetarian refreshments simultaneously obtains the total number of the reference image vegetarian refreshments;Calculate the gray value of the reference image vegetarian refreshments and the central pixel point
The absolute value of the difference of gray value;Detection obtains reference number more than the number of the corresponding reference image vegetarian refreshments of absolute value of preset difference value
Mesh;Judge the reference number with the ratio of the total number of the reference image vegetarian refreshments whether more than or equal to preset value;If so, then
Judge that the central pixel point is characterized a little.
9. AOI equipment test file according to claim 6 searches system, it is characterised in that the similarity obtains mould
Block includes:
Number acquiring unit, for obtaining the total number of the feature description value of the testing image;
Approx imately-detecting unit, for carrying out with the feature description value of the template image to the feature description value of the testing image
Similarity comparison;
Number recording unit, the feature for recording the testing image similar to the feature description value of the template image are retouched
The quantity of value is stated, similar amt is obtained;
Similarity calculated, for calculating the ratio of the similar amt and the total number of the feature description value of the testing image
Value, and as the similarity of the testing image and the template image.
10. AOI equipment test file according to claim 9 searches system, it is characterised in that the feature description value is
Numeric string, the approx imately-detecting unit are used for:Obtain the digit of the numeric string of the testing image;Calculate the testing image
The Hamming distance of numeric string and the numeric string of the template image;Calculate the digit of the Hamming distance occupancy numeric string
Ratio, obtains different ratio;Judge the different ratio whether less than preset ratio;If so, then judge the testing image
Feature description value is similar to the feature description of template image value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610921643.9A CN106528665B (en) | 2016-10-21 | 2016-10-21 | AOI equipment test file searching method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610921643.9A CN106528665B (en) | 2016-10-21 | 2016-10-21 | AOI equipment test file searching method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106528665A true CN106528665A (en) | 2017-03-22 |
CN106528665B CN106528665B (en) | 2019-09-03 |
Family
ID=58291936
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610921643.9A Active CN106528665B (en) | 2016-10-21 | 2016-10-21 | AOI equipment test file searching method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106528665B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107315140A (en) * | 2017-06-21 | 2017-11-03 | 广州视源电子科技股份有限公司 | AOI detection method, device, equipment and storage medium |
CN108920550A (en) * | 2018-06-15 | 2018-11-30 | 广州视源电子科技股份有限公司 | file searching method and device |
CN110346704A (en) * | 2019-07-02 | 2019-10-18 | 广州视源电子科技股份有限公司 | Method, device and equipment for determining test file in board test and storage medium |
CN113379726A (en) * | 2021-06-30 | 2021-09-10 | 深圳中科飞测科技股份有限公司 | Line detection method, device, equipment and computer readable storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101162204A (en) * | 2006-10-10 | 2008-04-16 | 同方威视技术股份有限公司 | Small vehicle holding articles automatic detection method based on radiation image-changing testing |
JP4205760B1 (en) * | 2007-12-27 | 2009-01-07 | 株式会社ファースト | Image matching method, program and application apparatus |
CN102479149A (en) * | 2010-11-25 | 2012-05-30 | 佛山市顺德区顺达电脑厂有限公司 | AOI (Automated Optical Inspection) data processing method |
CN103578093A (en) * | 2012-07-18 | 2014-02-12 | 成都理想境界科技有限公司 | Image registration method and device and augmented reality system |
CN104751465A (en) * | 2015-03-31 | 2015-07-01 | 中国科学技术大学 | ORB (oriented brief) image feature registration method based on LK (Lucas-Kanade) optical flow constraint |
CN105069144A (en) * | 2015-08-20 | 2015-11-18 | 华南理工大学 | Similar image search method |
CN105976354A (en) * | 2016-04-14 | 2016-09-28 | 广州视源电子科技股份有限公司 | Color and gradient based component positioning method and system |
-
2016
- 2016-10-21 CN CN201610921643.9A patent/CN106528665B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101162204A (en) * | 2006-10-10 | 2008-04-16 | 同方威视技术股份有限公司 | Small vehicle holding articles automatic detection method based on radiation image-changing testing |
JP4205760B1 (en) * | 2007-12-27 | 2009-01-07 | 株式会社ファースト | Image matching method, program and application apparatus |
CN102479149A (en) * | 2010-11-25 | 2012-05-30 | 佛山市顺德区顺达电脑厂有限公司 | AOI (Automated Optical Inspection) data processing method |
CN103578093A (en) * | 2012-07-18 | 2014-02-12 | 成都理想境界科技有限公司 | Image registration method and device and augmented reality system |
CN104751465A (en) * | 2015-03-31 | 2015-07-01 | 中国科学技术大学 | ORB (oriented brief) image feature registration method based on LK (Lucas-Kanade) optical flow constraint |
CN105069144A (en) * | 2015-08-20 | 2015-11-18 | 华南理工大学 | Similar image search method |
CN105976354A (en) * | 2016-04-14 | 2016-09-28 | 广州视源电子科技股份有限公司 | Color and gradient based component positioning method and system |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107315140A (en) * | 2017-06-21 | 2017-11-03 | 广州视源电子科技股份有限公司 | AOI detection method, device, equipment and storage medium |
CN108920550A (en) * | 2018-06-15 | 2018-11-30 | 广州视源电子科技股份有限公司 | file searching method and device |
CN110346704A (en) * | 2019-07-02 | 2019-10-18 | 广州视源电子科技股份有限公司 | Method, device and equipment for determining test file in board test and storage medium |
CN110346704B (en) * | 2019-07-02 | 2022-05-20 | 广州视源电子科技股份有限公司 | Method, device and equipment for determining test file in board test and storage medium |
CN113379726A (en) * | 2021-06-30 | 2021-09-10 | 深圳中科飞测科技股份有限公司 | Line detection method, device, equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106528665B (en) | 2019-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111179251B (en) | Defect detection system and method based on twin neural network and by utilizing template comparison | |
CN109961421B (en) | Data generating device, data generating method, and data generating recording medium | |
CN103714338B (en) | Image processing apparatus and image processing method | |
JP2019087044A (en) | Inspection device, data generation device, data generation method, and data generation program | |
CN106528665A (en) | AOI equipment test file searching method and system | |
CN116188475A (en) | Intelligent control method, system and medium for automatic optical detection of appearance defects | |
CN1323369C (en) | Image recognition apparatus and image recognition method, and teaching apparatus and teaching method of the image recognition apparatus | |
WO2019117068A1 (en) | Data generation device, data generation method, and data generation program | |
CN113222913B (en) | Circuit board defect detection positioning method, device and storage medium | |
CN109146873A (en) | A kind of display screen defect intelligent detecting method and device based on study | |
CN113313704B (en) | Integrated circuit pin detection method, device, terminal and storage medium | |
CN109685756A (en) | Image feature automatic identifier, system and method | |
CN114494103A (en) | Defect detection method and device | |
CN111899238A (en) | Defect detection method, device, medium and electronic equipment for double-light source image | |
CN114943875A (en) | Visual analysis method for cable element identification | |
KR101849933B1 (en) | Apparatus of Covariance-matching-based Model for musical-symbol recognition | |
US11727673B1 (en) | Visual analysis method for cable element identification | |
CN117011878A (en) | Intelligent visual recognition detection method and system for control cabinet | |
CN115937555A (en) | Industrial defect detection algorithm based on standardized flow model | |
CN113128881B (en) | Operation evaluation method, device and storage medium for measuring instrument | |
CN114782431A (en) | Printed circuit board defect detection model training method and defect detection method | |
CN112328951B (en) | Processing method of experimental data of analysis sample | |
CN106952392B (en) | A kind of crown word number discrimination determines method and device | |
WO2021033239A1 (en) | Information processing device, information processing program, and information processing method | |
KR20200044172A (en) | Deep learning method for analyzing defectiveness |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | 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 |