CN106528665B - AOI equipment test file lookup method and system - Google Patents

AOI equipment test file lookup method and system Download PDF

Info

Publication number
CN106528665B
CN106528665B CN201610921643.9A CN201610921643A CN106528665B CN 106528665 B CN106528665 B CN 106528665B CN 201610921643 A CN201610921643 A CN 201610921643A CN 106528665 B CN106528665 B CN 106528665B
Authority
CN
China
Prior art keywords
image
feature description
value
test file
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.)
Active
Application number
CN201610921643.9A
Other languages
Chinese (zh)
Other versions
CN106528665A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201610921643.9A priority Critical patent/CN106528665B/en
Publication of CN106528665A publication Critical patent/CN106528665A/en
Application granted granted Critical
Publication of CN106528665B publication Critical patent/CN106528665B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5838Retrieval 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching 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 present invention relates to a kind of AOI equipment test file lookup method and systems, the image that pcb board card to be detected generates is shot this method comprises: obtaining, obtain testing image, feature extraction is carried out to testing image and obtains the feature description value of testing image, obtains the feature description value of template image in each test file prestored.The feature description value of testing image is compared with the feature description value of each template image, obtains the similarity of testing image Yu each template image;It obtains with the test file where the maximum template image of testing image similarity, the test file as pcb board card to be detected.So, it is analyzed by the template image in the image and test file to pcb board card to be detected, finds out test file corresponding with pcb board card to be detected, realize the automatic lookup before AOI equipment is tested to test file, without manually participating in, search efficiency is high.

Description

AOI equipment test file lookup method and system
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 are System.
Background technique
AOI (Automatic Optic Inspection automatic optics inspection) equipment, is based on optical principle come butt welding The equipment that the common deficiency encountered in producing of delivering a child is detected, such as on-line checking PCB (Printed circuit board printing Circuit board) board.In general, being stored with the test file of the pcb board card of each model in AOI equipment, wrapped in each test file The key messages such as the test point of the pcb board card containing corresponding 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 It is tested according to the test file.In traditional technology, staff is needed to check the pcb board card-type number currently produced, Then corresponding test file is searched in AOI equipment, is opened this file and is tested.Therefore, each producing line replacement produces When pcb board card-type, require manually to go to search corresponding board-like file, low efficiency.
Summary of the invention
Based on this, it is necessary in view of the above-mentioned problems, providing the high-efficient AOI equipment test file lookup method of one kind and being System.
A kind of AOI equipment test file lookup method, comprising:
It obtains and shoots the image that pcb board card to be detected generates, obtain testing image;
Feature extraction is carried out to the testing image, obtains the feature description value of the testing image;
Obtain the feature description value of template image in each test file;
The feature description value of the testing image is compared with the feature description value of each template image, obtain it is described to The similarity of altimetric image and each template image;
Acquisition and the test file where the maximum template image of testing image similarity, and as described to be detected The test file of pcb board card.
A kind of AOI equipment test file lookup system, comprising:
Testing image obtains module, for obtaining the image for shooting pcb board card to be detected and generating, 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 obtains module, for obtaining the feature description value of template image in each test file;
Similarity obtains module, for by the feature description value of the feature description value of the testing image and each template image It is compared, obtains the similarity of the testing image Yu each template image;
Test file searching module, for obtaining and the test where the maximum template image of testing image similarity File, and the test file as the pcb board card to be detected.
Above-mentioned AOI equipment test file lookup method obtains and shoots the image that pcb board card to be detected generates, obtains to be measured After image, feature extraction is carried out to testing image and obtains the feature description value of testing image, in addition, obtaining each test text prestored The feature description value of template image in part.Then, testing image and template image are analyzed according to feature description value, it will be to The feature description value of altimetric image is compared with the feature description value of each template image, obtains testing image and each template image Similarity, similarity is for characterizing a possibility that testing image is consistent with template image size;It obtains similar to testing image The test file where maximum template image is spent, test file of the test file that will acquire as pcb board card to be detected.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 is searched without artificial participation It is high-efficient.
Detailed description of the invention
Fig. 1 is the flow chart of AOI equipment test file lookup method in an embodiment;
Fig. 2 is to carry out feature extraction to testing image in an embodiment, obtains the specific of the feature description value of testing image Flow chart;
Fig. 3 is the schematic diagram of reference image vegetarian refreshments in an embodiment, central pixel point;
Fig. 4 is the schematic diagram of pixel pair in an embodiment;
Fig. 5 is to compare the feature description value of testing image and the feature description value of each template image in an embodiment It is right, obtain the specific flow chart of the similarity of testing image and each template image;
Fig. 6 is the module frame chart that AOI equipment test file searches system in an embodiment.
Specific embodiment
With reference to Fig. 1, AOI equipment test file lookup method in an embodiment includes the following steps.
S110: it obtains and shoots the image that pcb board card to be detected generates, obtain testing image.
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, color or in terms of difference, obtained testing image is different.By obtaining pcb board card to be detected Image obtains testing image, convenient for analyzing testing image.
S130: feature extraction is carried out to testing image, obtains the feature description value of testing image.
Feature extraction is carried out to testing image, can be and the parameter of characterization testing image unique features is carried out at image Reason, for example, carrying out feature extraction to testing image according to gray value.The feature description value that feature extraction obtains is to be measured for characterizing The unique features of image, can be numerical value, be also possible to numeric string.The quantity of the feature description value of testing image can be one It is a, or multiple.
S150: the feature description value of template image in each test file is obtained.
It is stored with the corresponding test file of pcb board card of various models in AOI equipment, is stored in each test file The template image of the pcb board card of corresponding model, from the disk of AOI equipment, automatic indexing listed files can search test text Part.The feature description value of template image can be after the feature description value for obtaining testing image, carry out to each template image special Sign is extracted and is obtained, and is also possible to be stored in advance.The quantity of the feature description value of template image can be one, or more It is a.
In the present embodiment, before step S150, further includes: carry out feature extraction to template image, obtain template image Feature description value.The specific method of feature extraction and the specific method that feature extraction is carried out to testing image are 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, convenient for calling directly, improves operation just Benefit.Specifically, step S150 can be executes before step S110.
S170: the feature description value of testing image is compared with the feature description value of each template image, is obtained 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 compares;When the quantity of the feature description value of testing image is multiple, respectively by each feature description value of testing image It is compared with the feature description value of template image.
Test file where S190: obtaining and the maximum template image of testing image similarity, and as PCB to be detected The test file of board.
Similarity is bigger, indicates that testing image is more similar to template image.By comparing testing image and each Prototype drawing The similarity of picture chooses maximum value therein, using test file where the corresponding template image of maximum value as with PCB to be detected The corresponding test file of board.
Above-mentioned AOI equipment test file lookup method obtains and shoots the image that pcb board card to be detected generates, obtains to be measured After image, feature extraction is carried out to testing image and obtains the feature description value of testing image, in addition, obtaining each test text prestored The feature description value of template image in part.Then, testing image and template image are analyzed according to feature description value, it will be to The feature description value of altimetric image is compared with the feature description value of each template image, obtains testing image and each template image Similarity, similarity is for characterizing a possibility that testing image is consistent with template image size;It obtains similar to testing image The test file where maximum template image is spent, test file of the test file that will acquire as pcb board card to be detected.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 is searched without artificial participation It is high-efficient.
It in one embodiment, include step S131 to step S136 with reference to Fig. 2, step S130.
S131: the Selection Center pixel from testing image.If so, thening follow the steps S132.
The number of central pixel point can be one, be also possible to multiple.In the present embodiment, the side of Selection Center pixel Method are as follows: do not choose the square of multiple pre-set dimensions from testing image overlappingly successively according to sequence from left to right, from top to bottom Shape block, using the corresponding pixel of the central point of rectangular block as center pixel.For example, pre-set dimension can be 9 pixels of every row The square block of 9 point, each column pixels.It is appreciated that in other embodiments, the selection mode of central pixel point may be Other, for example, it may be randomly selecting 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 the image attributes as feature meets preset item Part, if meet preset condition, then it represents that central pixel point is characterized a little;Otherwise, indicate that central pixel point is not characteristic point. For example, if can determine whether the gray value of central pixel point meets preset condition using gray value as the feature of image.Feature The number of point can be one, be also possible to multiple.
In the present embodiment, step S132 includes step (a1) to step (a5).
Step (a1): centered on central pixel point, multiple references are obtained out of predeterminable area according to pre-configured orientation Pixel and the total number for obtaining reference image vegetarian refreshments.
Wherein, pre-configured orientation and predeterminable area can be specifically arranged according to actual needs.For example, in the present embodiment, such as Fig. 3 Shown, F is center pixel, corresponding four reference image vegetarian refreshments at F1, F2, F3, F4 pre-configured orientations, and predeterminable area range is The rectangular block range for the pre-set dimension being arranged when obtaining central pixel point.It is appreciated that in other embodiments, pre-configured orientation is also It can be other orientation, the number of reference image vegetarian refreshments may be other.
Step (a2): the absolute value of the difference of the gray value of reference image vegetarian refreshments and the gray value of central pixel point is calculated.
When reference image vegetarian refreshments has multiple, step (a2) is the gray value and center pixel for calculating separately each reference image vegetarian refreshments The absolute value of the difference of the gray value of point.
Step (a3): detection is greater than the number of the corresponding reference image vegetarian refreshments of absolute value of preset difference value, obtains with reference to number.
Wherein, preset difference value can be specifically arranged according to actual needs.By comparing the size of absolute value and preset difference value, Absolute value is greater than preset difference value, indicates that the gray value between corresponding reference image vegetarian refreshments and central pixel point differs larger, therefore Obtained reference number is detected, can be used to indicate that the number for differing biggish reference image vegetarian refreshments with the gray value of central pixel point Mesh.
Step (a4): whether judgement is greater than or equal to preset value with reference to the ratio of number and the total number of reference image vegetarian refreshments. If so, indicating that the feature of central pixel point is obvious, step (a5) is executed at this time.
Wherein, the size of preset value can be specifically arranged according to actual needs.
Step (a5): determine 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, there are three the gray scales of reference image vegetarian refreshments When value and the absolute value of the difference of the gray value of central pixel point are greater than preset difference value, determine that central pixel point F is characterized a little.
The present embodiment according to comparison result by compared with the pixel of surrounding carries out gray value, determining central pixel point Whether central pixel point is characterized a little, and processing is easy and accuracy is high.
S133: centered on characteristic point, obtain predeterminable area within the scope of preset number pixel to and sort.
Predeterminable area range is identical as the predeterminable area range that Selection Center pixel uses.Preset number can be according to reality Border needs specific setting, usually takes 128,256,512 equivalences.For pixel to including two pixels, two of them pixel can To randomly select.For example, as shown in figure 4, being respectively as follows: P1 (A1, B1) by taking wherein 4 pixels pair as an example, P2 (A2, B2), P3 (A3, B3), P4 (A4, B4).
S134: the gray value of each two pixels of pixel centering is compared respectively, obtains the two of each pixel pair Binary value.
Be compared by the gray value to two pixels of pixel centering, by comparison result binarization obtain two into Numerical value processed.In the present embodiment, S134 specifically: judge whether the gray value of first pixel of pixel centering is greater than or equal to The gray value of second pixel point, if so, 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 1;Otherwise, binary number Value is 0.
S135: the binary numeral of each pixel pair is arranged by putting in order for pixel pair, obtains characteristic point Binary string.
Each pixel is to a corresponding binary numeral, and multiple pixels are to rearranging the two of a character pair point 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 special when the number of characteristic point is multiple Levying description value includes multiple binary strings.
It is appreciated that in other embodiments, step S130 can also use other modes.For example, step S130 can be with Include: choose testing image the corresponding pixel of center position be characterized a little;Other pixels in addition to characteristic point are made For reference image vegetarian refreshments;Successively by reference image vegetarian refreshments compared with characteristic point carries out gray value, if the gray value of characteristic point is greater than or waits In the gray value of reference image vegetarian refreshments, then obtaining binary numeral is 1, and otherwise, obtaining binary numeral is 0;According to comparative sequence Arranging obtained binary numeral can be obtained the corresponding binary string of characteristic point, and as feature description value.
It in one embodiment, include step S171 to step S174 with reference to Fig. 5, step S170.
S171: the total number of the feature description value of testing image is obtained.
S172: the feature description value of feature description value and template image to testing image carries out similarity comparison.
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 for stating value and template image carry out similarity comparison;The corresponding feature description value quantity of testing image When being multiple, the single or multiple feature description values of each feature description value of testing image and template image are compared respectively It is right, it specifically can be and compared after corresponding the feature description value of the feature description value of testing image and template image, It can be and the feature description value of testing image is subjected to similarity comparison with all feature description values of template image respectively one by one.
In the present embodiment, feature description value is numeric string.S172 includes step (b1) to step (b5).
Step (b1): the digit of the numeric string of testing image is obtained.
It include multiple numerical value, the numerical value number that the digit index word string of numeric string includes in numeric string.For example, numeric string is Binary string, the digit of numeric string are the number for the binary numeral that binary string includes.
Step (b2): the Hamming distance of the numeric string of testing image and the numeric string of template image is calculated.
By calculating Hamming distance, can analyze identical in the numeric string of the numeric string with template image of learning testing image The quantity of position different value.For example, the Hamming distance of (00) and (01) is 1, the Hamming distance of (110) and (101) is 2.
Step (b3): the ratio that Hamming distance occupies the digit of numeric string is calculated, different ratio is obtained.
The quantity of different ratio, as identical bits different value accounts for the ratio of total bit.By calculating different ratio, can obtain Know the different degree between the numeric string of testing image and the numeric string of template image.
Step (b4): judge whether different ratio is less than preset ratio.If so, thening follow the steps (b5).
Step (b5): the feature description value for determining testing image is similar to the feature description value of template image.
Preset ratio can be specifically arranged according to actual needs.If different ratio is less than preset ratio, then it represents that mapping The numeric string of picture and the numeric string of template image are similar;Otherwise, the numeric string of testing image and the numeric string of template image are indicated Differ larger.
Hamming distance can intuitively compare position different between two numeric strings, by according to Hamming distance and numeric string Digit analysis testing image numeric string and template image numeric string, so that whether similar, accurately if analyzing feature description value Degree is high.
S173: the feature description of record and template image is worth the quantity of the feature description value of similar testing image, obtains Similar amt.
Similar amt is the numerical value obtained according to Similar contrasts' result, during the similarity comparison of step S172, each time Compare after all can be obtained it is similar or dissimilar as a result, if result be it is similar, similar amt adds one.
S174: the ratio of the total number of the feature description value of similar amt and testing image is calculated, and as testing image With the similarity of template image.
Using the ratio being calculated as similarity, similar amt is more, and the ratio being calculated is bigger, testing image with Corresponding template image similarity is bigger.
It is appreciated that in other embodiments, step S170 can also use 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, the Hamming distance quantity being calculated is one, directly makees Hamming distance For the similarity of testing image and template image;The feature description value of testing image is multiple or template image feature description values When being multiple, the Hamming distance quantity that is calculated be it is multiple, select the minimum value in multiple Hamming distances as testing image With the similarity of template image.
In one embodiment, after step S190 further include: open the test file of pcb board card to be detected.By looking into It finds matched test file to be automatically opened later, without human intervention, 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 obtain module 110, Characteristic extracting module 130, description value obtain module 150, similarity obtains module 170 and test file searching module 190.
Testing image obtains module 110 and is used to obtain the image for shooting pcb board card generation to be detected, obtains testing image. Image by obtaining pcb board card to be detected obtains testing image, convenient for analyzing testing image.
Characteristic extracting module 130 is used to carry out feature extraction to testing image, obtains the feature description value of testing image.It is special Sign extracts the unique features that obtained feature description value is used to characterize testing image, can be numerical value, is also possible to numeric string.To The quantity of the feature description value of altimetric image can be one, or multiple.
Description value obtains the feature description value that module 150 is used to obtain template image in each test file.Template image Feature description value can be after the feature description value for obtaining testing image, carries out feature extraction to each template image and obtains, It can be and be stored in advance.The quantity of the feature description value of template image can be one, or multiple.
In the present embodiment, it further includes preparatory acquisition module that above-mentioned AOI equipment test file, which searches system, for Prototype drawing As carrying out feature extraction, the feature description value of template image is obtained.Specifically, the specific side of feature extraction is carried out to template image Method is identical as the specific method of feature extraction is carried out to testing image.All template images are obtained by carrying out feature extraction in advance Feature description value, convenient for calling directly, improve operation ease.
Similarity obtain module 170 be used to for the feature description of the feature description value of testing image and each template image being worth into Row compares, and obtains the similarity of testing image Yu each template image.
Test file searching module 190 is used to obtain and the test text where the maximum template image of testing image similarity Part, and the test file as pcb board card to be detected.
Similarity is bigger, indicates that testing image is more similar to template image.By comparing testing image and each Prototype drawing The similarity of picture chooses maximum value therein, using test file where the corresponding template image of maximum value as with PCB to be detected The corresponding test file of board.
Above-mentioned AOI equipment test file searches system, and testing image obtains module 110 and obtains shooting 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, in addition, description value obtains the feature description value that module 150 obtains template image in each test file prestored. Then, testing image and template image are analyzed according to feature description value, similarity obtains module 170 for testing image Feature description value is compared with the feature description value of each template image, obtains the similarity of testing image Yu each template image, Similarity is for characterizing a possibility that testing image is consistent with template image size;Test file searching module 190 obtain with Test file where the maximum template image of testing image similarity, the test file that will acquire is as pcb board card to be detected Test file.In this way, 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 realizes the automatic lookup before AOI equipment is tested to test file, is not necessarily to Artificial to participate in, search efficiency is high.
In one embodiment, characteristic extracting module 130 includes pixel selection unit (not shown), pixel detection 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 determination unit (not shown).
Pixel selection unit is used for the Selection Center pixel from testing image.
The number of central pixel point can be one, be also possible to multiple.In the present embodiment, pixel selection unit is chosen The method of central pixel point are as follows: do not chosen from testing image overlappingly successively according to sequence from left to right, from top to bottom more The rectangular block of a pre-set dimension, using the corresponding pixel of the central point of rectangular block as center pixel.For example, pre-set dimension can be with For 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 Taking mode may be other, for example, it may be randomly selecting one or more central pixel points from testing image.
Whether pixel detection unit is characterized a little for inspection center's pixel.
The number of characteristic point can be one, be also possible to multiple.
In the present embodiment, pixel detection unit is used for: centered on central pixel point, according to pre-configured orientation from preset areas Multiple reference image vegetarian refreshments are obtained within the scope of domain and obtain the total number of reference image vegetarian refreshments;The gray value of reference image vegetarian refreshments is calculated in The absolute value of the difference of the gray value of imago vegetarian refreshments;Detection is greater than the number of the corresponding reference image vegetarian refreshments of absolute value of preset difference value, It obtains with reference to number;Whether judgement is greater than or equal to preset value with reference to the ratio of number and the total number of reference image vegetarian refreshments;If so, Then determine that central pixel point is characterized a little.The present embodiment is by carrying out gray value ratio for the pixel of central pixel point and surrounding Compared with determining whether central pixel point is characterized a little according to comparison result, the easy and accuracy of processing is high.
Pixel is used for when central pixel point is characterized acquiring unit, centered on characteristic point, obtains preset areas The pixel of preset number within the scope of domain to and sort.
Gray value comparing unit obtains each for being compared respectively to the gray value of each two pixels of pixel centering The binary numeral of pixel pair.
Be compared by the gray value to two pixels of pixel centering, by comparison result binarization obtain two into Numerical value processed.In the present embodiment, gray value comparing unit is specifically used for: judging the gray value of first pixel of pixel centering is The no gray value more than or equal to second pixel point, if so, the binary numeral of the pixel pair is 1;Otherwise, the pixel The binary numeral of point pair is 0.It is appreciated that in other embodiments, can also be using other modes compared result two System, for example, if the gray value of first pixel is less than the gray value of second pixel point, binary numeral 1;It is no Then, binary numeral 0.
Binary string acquiring unit is used for the binary numeral progress to put in order to each pixel pair by pixel pair Arrangement, obtains the binary string of characteristic point.
Feature description value determination unit is used 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 is specifically used for: choosing 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 and feature are clicked through Row gray value compares, if the gray value of characteristic point is greater than or equal to the gray value of reference image vegetarian refreshments, obtaining binary numeral is 1, otherwise, obtaining binary numeral is 0;It is corresponding that characteristic point can be obtained according to the binary numeral that comparative sequence arranges Binary string, and as feature description value.
In one embodiment, it includes number acquiring unit (not shown), approx imately-detecting unit that similarity, which obtains module 170, (not shown), number recording unit (not shown) and similarity calculated (not shown).
Number acquiring unit is used to obtain the total number of the feature description value of testing image.
Approx imately-detecting unit is for similar to the feature description value of testing image and the feature description value progress of template image It compares.
In the present embodiment, feature description value is numeric string, and approx imately-detecting unit is used for: obtaining 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;It calculates Hamming distance and occupies numeric string Digit ratio, obtain different ratio;Judge to be less than preset ratio whether different ratio;If so, determining testing image Feature description value is similar to the feature description of template image value.
Number recording unit is used to record the feature description value for being worth similar testing image with the feature description of template image 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, It all can be obtained similar or dissimilar after comparing each time as a result, if result is similar, similarity number in number recording unit Amount plus one.
Similarity calculated is used to calculate the ratio of the total number of the feature description value of similar amt and testing image, and Similarity as testing image and template image.
Using the ratio being calculated as similarity, similar amt is more, and the ratio being calculated is bigger, testing image with Corresponding template image similarity is bigger.
It is appreciated that in other embodiments, similarity, which obtains module 170, to realize similarity using other modes Acquisition.It is specifically used for for example, similarity obtains module 170: calculates feature description value and the spy of template image of testing image Levy the Hamming distance of description value;When the feature description value of testing image and the feature description value of template image are one, calculate The Hamming distance quantity arrived is one, directly using Hamming distance as the similarity of testing image and template image;Testing image Feature description value when to be multiple or template image feature description value be multiple, the Hamming distance quantity being calculated is more It is a, select similarity of the minimum value as testing image and template image in multiple Hamming distances.
In one embodiment, it further includes file opening module (not shown) that above-mentioned AOI equipment test file, which searches system, is used In the test file for opening pcb board card to be detected.By being automatically opened after finding matched test file, it is not necessarily to The testing efficiency of manual operation, pcb board card to be detected is high.
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality It applies 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, all should be considered as described in this specification.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to protection of the invention Range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.

Claims (12)

1. a kind of AOI equipment test file lookup method characterized by comprising
It obtains and shoots the image that pcb board card to be detected generates, obtain testing image;
Feature extraction is carried out to the testing image, obtains the feature description value of the testing image;
Obtain the feature description value of template image in each test file;
The feature description value of the testing image is compared with the feature description value of each template image, is obtained described to mapping As the similarity with each template image;
Acquisition and the test file where the maximum template image of testing image similarity, and as the PCB to be detected The test file of board;
Automatically open the test file of the pcb board card to be detected.
2. AOI equipment test file lookup method according to claim 1, which is characterized in that it is described to described to mapping As carrying out feature extraction, the feature description value of the testing image is obtained, comprising:
The Selection Center pixel from 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 within the scope of predeterminable area is obtained Purpose pixel to and sort;
The gray value of each two pixels of pixel centering is compared respectively, obtains the binary numeral of each pixel pair;
The binary numeral of each pixel pair is arranged by putting in order for the pixel pair, obtains 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, which is characterized in that the detection center Whether pixel is characterized a little, comprising:
Centered on the central pixel point, multiple reference image vegetarian refreshments are obtained out of described predeterminable area according to pre-configured orientation And obtain the total number of the reference image vegetarian refreshments;
Calculate the absolute value of the difference of the gray value of the reference image vegetarian refreshments and the gray value of the central pixel point;
Detection is greater than the number of the corresponding reference image vegetarian refreshments of absolute value of preset difference value, obtains with reference to number;
Judge whether the ratio with reference to number and the total number of the reference image vegetarian refreshments is greater than or equal to preset value;
If so, determining that the central pixel point is characterized a little.
4. AOI equipment test file lookup method according to claim 1, which is characterized in that the general is described to mapping The feature description value of picture is compared with the feature description value of each template image, obtains the testing image and each template image Similarity, comprising:
Obtain the total number of the feature description value of the testing image;
The feature description value of feature description value and the template image to the testing image carries out similarity comparison;
The feature description of record and the template image is worth the quantity of the feature description value of the similar testing image, obtains phase Like quantity;
The ratio of the total number of the feature description value of the similar amt and the testing image is calculated, and as described to mapping As the similarity with the template image.
5. AOI equipment test file lookup method according to claim 4, which is characterized in that the feature description value is The feature description value of numeric string, the feature description value to the testing image and the template image carries out similarity comparison, Include:
Obtain the digit of the numeric string of the testing image;
Calculate the Hamming distance of the numeric string of the testing image and the numeric string of the template image;
The ratio that the Hamming distance occupies the digit of the numeric string is calculated, different ratio is obtained;
Judge whether the different ratio is less than preset ratio;
If so, determining 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 characterized by comprising
Testing image obtains module, for obtaining the image for shooting pcb board card to be detected and generating, obtains testing image;
Characteristic extracting module obtains the feature description value of the testing image for carrying out feature extraction to the testing image;
Description value obtains module, for obtaining the feature description value of template image in each test file;
Similarity obtains module, for carrying out the feature description value of the feature description value of the testing image and each template image It compares, obtains the similarity of the testing image Yu each template image;
Test file searching module, for obtaining and the test text where the maximum template image of testing image similarity Part, and the test file as the pcb board card to be detected;
File opening module is used to open the test file of the pcb board card to be detected.
7. AOI equipment test file according to claim 6 searches system, which is characterized in that the characteristic extracting module, Include:
Pixel selection unit, for the Selection Center pixel from the testing image;
Pixel detection unit, for detecting whether the central pixel point is characterized a little;
Pixel is to acquiring unit, for centered on the characteristic point, obtaining pre- when the central pixel point is characterized If the pixel of the preset number in regional scope to and sort;
Gray value comparing unit is compared for the gray value respectively to each two pixels of pixel centering, obtains each picture The binary numeral of vegetarian refreshments pair;
Binary string acquiring unit, for the binary numeral progress to put in order to each pixel pair by the pixel pair Arrangement, obtains the binary string of the characteristic point;
Feature description value determination 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, which is characterized in that the pixel detection is single Member is used for: centered on the central pixel point, multiple reference images are obtained out of described predeterminable area according to pre-configured orientation Vegetarian refreshments and the total number for obtaining the reference image vegetarian refreshments;Calculate the reference image vegetarian refreshments gray value and the central pixel point The absolute value of the difference of gray value;Detection is greater than the number of the corresponding reference image vegetarian refreshments of absolute value of preset difference value, obtains reference number Mesh;Judge whether the ratio with reference to number and the total number of the reference image vegetarian refreshments is greater than or equal to preset value;If so, Determine that the central pixel point is characterized a little.
9. AOI equipment test file according to claim 6 searches system, which is characterized in that the similarity obtains mould Block includes:
Number acquiring unit, the total number of the feature description value for obtaining the testing image;
Approx imately-detecting unit, the feature description value for feature description value and the template image to the testing image carry out Similarity comparison;
Number recording unit, the feature that the similar testing image is worth for recording the feature description with the template image are retouched The quantity for stating value, obtains similar amt;
Similarity calculated, the ratio of the total number of the feature description value for calculating the similar amt and the testing image Value, and the similarity as the testing image and the template image.
10. AOI equipment test file according to claim 9 searches system, which is characterized in that the feature description value is Numeric string, the approx imately-detecting unit are used for: obtaining the digit of the numeric string of the testing image;Calculate the testing image The Hamming distance of the numeric string of numeric string and the template image;Calculate the digit that the Hamming distance occupies the numeric string Ratio obtains different ratio;Judge whether the different ratio is less than preset ratio;If so, determining the testing image Feature description value is similar to the feature description of template image value.
11. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed Device realizes AOI equipment test file lookup method as described in any one in claim 1-5 when executing.
12. a kind of computer equipment, including memory, processor and it is stored on the memory and can be on the processor The computer program of operation, which is characterized in that the processor is realized when executing described program such as any one of claim 1-5 institute The AOI equipment test file lookup method stated.
CN201610921643.9A 2016-10-21 2016-10-21 AOI equipment test file lookup method and system Active CN106528665B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610921643.9A CN106528665B (en) 2016-10-21 2016-10-21 AOI equipment test file lookup 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 lookup method and system

Publications (2)

Publication Number Publication Date
CN106528665A CN106528665A (en) 2017-03-22
CN106528665B true 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 lookup method and system

Country Status (1)

Country Link
CN (1) CN106528665B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107315140B (en) * 2017-06-21 2020-03-10 广州视源电子科技股份有限公司 AOI detection method, device, equipment and storage medium
CN108920550A (en) * 2018-06-15 2018-11-30 广州视源电子科技股份有限公司 File search method and device
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

Citations (7)

* Cited by examiner, † Cited by third party
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 element positioning method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
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 element positioning method and system

Also Published As

Publication number Publication date
CN106528665A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN106528665B (en) AOI equipment test file lookup method and system
WO2017032311A1 (en) Detection method and apparatus
CN103528617B (en) A kind of cockpit instrument identifies and detection method and device automatically
CN110472082B (en) Data processing method, data processing device, storage medium and electronic equipment
CN103308523B (en) Method for detecting multi-scale bottleneck defects, and device for achieving method
CN106412573A (en) Method and device for detecting lens stain
CN1323369C (en) Image recognition apparatus and image recognition method, and teaching apparatus and teaching method of the image recognition apparatus
CN110490237B (en) Data processing method and device, storage medium and electronic equipment
TW201317904A (en) Tag detecting system, apparatus and method for detecting tag thereof
CN109283182A (en) A kind of detection method of battery welding point defect, apparatus and system
CN109284700B (en) Method, storage medium, device and system for detecting multiple faces in image
CN107493469A (en) A kind of method and device of the area-of-interest of determination SFR test cards
CN107223257A (en) Method of testing, test server and system
KR102096631B1 (en) Apparatus and method for analyzing irregular data, a recording medium on which a program / application for implementing the same
CN114494274A (en) Building construction evaluation method, building construction evaluation device, electronic equipment and storage medium
CN109685756A (en) Image feature automatic identifier, system and method
US10783403B2 (en) Automated design testing through deep learning
Ghosh et al. GenEval: An object-focused framework for evaluating text-to-image alignment
CN113128881B (en) Operation evaluation method, device and storage medium for measuring instrument
CN112016334A (en) Appraising method and device
CN113313704B (en) Integrated circuit pin detection method, device, terminal and storage medium
CN114373188A (en) Drawing identification method and device, electronic equipment and storage medium
CN113538411A (en) Insulator defect detection method and device
CN114494765A (en) Method and device for identifying true and false cigarette identification points, electronic equipment and storage medium
CN113902940A (en) Neural network-based multi-class article visual identification method and metering equipment

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