CN108717697A - Circuit board detection method and device, computer equipment and storage medium - Google Patents
Circuit board detection method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN108717697A CN108717697A CN201810482299.7A CN201810482299A CN108717697A CN 108717697 A CN108717697 A CN 108717697A CN 201810482299 A CN201810482299 A CN 201810482299A CN 108717697 A CN108717697 A CN 108717697A
- Authority
- CN
- China
- Prior art keywords
- area
- region
- element characteristics
- moved
- feature
- 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
- 238000001514 detection method Methods 0.000 title claims abstract description 49
- 238000003860 storage Methods 0.000 title claims abstract description 13
- 238000000034 method Methods 0.000 claims abstract description 41
- 238000004590 computer program Methods 0.000 claims description 37
- 238000012217 deletion Methods 0.000 claims 1
- 230000037430 deletion Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 22
- 239000011159 matrix material Substances 0.000 description 4
- 238000005253 cladding Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000002452 interceptive effect Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000006073 displacement reaction Methods 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000011002 quantification Methods 0.000 description 2
- 238000013316 zoning Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30141—Printed circuit board [PCB]
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- Chemical & Material Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The application relates to a circuit board detection method, a circuit board detection system, computer equipment and a storage medium. The method comprises the following steps: acquiring N initial areas; the N initial areas cover all element characteristics of the circuit board; determining M target areas according to the N initial areas and the element characteristics covered by the N initial areas; the M target areas cover all element features covered by the N initial areas; wherein N is more than M and more than 0; acquiring M regional images of the circuit board; the M area images correspond to the M target areas one by one; detecting element features in the M region images. By the circuit board detection method, the circuit board detection efficiency is improved.
Description
Technical field
This application involves detection technique field, more particularly to a kind of circuit board detecting method, apparatus, computer equipment and
Storage medium.
Background technology
With the development of various smart electronics products, to printed circuit board (PCB, Printed Circuit Board)
Quality requirement is higher and higher, it is therefore desirable to is detected to printed circuit board, to ensure the production quality of printed circuit board.
Currently, more typical circuit board detecting method is to shoot the image of circuit board, and to the element characteristics in the image
It is detected.In general, detection device has field angle (FOV, Field of View), limited by field angle, detection device
In one-time detection, some region of circuit board can only be detected.Therefore, circuit board is first divided by detection device needs
Multiple regions are detected respectively for multiple region, could complete the task of circuit board detecting.
However, the element distribution of printed circuit board may be more scattered, when a small amount of element is distributed in the region of multiple divisions
When, detection device then needs respectively to be detected multiple region, could complete, to the detection of a small amount of element, to lead to circuit board
That detects is less efficient.
Therefore, circuit board detecting method in the prior art has that detection efficiency is relatively low.
Invention content
Based on this, it is necessary in view of the above technical problems, provide a kind of circuit board detecting side that can promote detection efficiency
Method, device, computer equipment and storage medium.
In a first aspect, an embodiment of the present invention provides a kind of circuit board detecting method, the method includes:
Obtain N number of prime area;N number of prime area covers whole element characteristics of circuit board;
According to N number of prime area and its element characteristics of covering, M target area is determined;The M target area
Cover whole element characteristics of N number of prime area covering;Wherein, N > M > 0;
Obtain M area image of the circuit board;The M area image is corresponded with the M target area;
Detect the element characteristics in the M area image.
It is described according to N number of prime area and its element characteristics of covering in one of the embodiments, determine M
Target area, including
At least one prime area is chosen as region to be moved;
According to the element characteristics of the region overlay to be moved, the mobile region to be moved obtains the target area;
When the target area covering element characteristics include another prime area covering whole element characteristics,
Another described prime area is deleted, and is back to the step for choosing at least one prime area as region to be moved
Suddenly, until obtaining the M target area.
There is area identification, the element characteristics to have associated area for the prime area in one of the embodiments,
Domain identifier, the element characteristics according to the region overlay to be moved, the mobile region to be moved obtain the target area
Domain, including:
Obtain the region overlay to be moved and the associated element characteristics of area identification with the region to be moved,
Obtain the first candidate feature;
Location feature is chosen in first candidate feature;
The region to be moved is moved to the location feature, obtains the target area.
The region to be moved is moved according to the target signature described in one of the embodiments, is obtained described
After target area, the method further includes:
By the area identification in the region to be moved, the area identification as the target area;
The element characteristics for determining the target area covering, as the second candidate feature;
By different second candidate feature of area identification of associated area identification and the target area, as series of fortified passes
Join feature;
By the area identification of the re-association feature association, it is revised as the area identification of the target area.
In one of the embodiments, in the element characteristics according to the region overlay to be moved, it is mobile described in wait for
Moving area further includes after obtaining the target area:
Obtain the area identification of another prime area;
There is no associated element characteristics for area identification when another prime area, judge the target area
The element characteristics of covering include whole element characteristics of another prime area covering.
It is described in one of the embodiments, to choose location feature in first candidate feature, including:
Obtain the edges of regions in the region to be moved;
Minimum the first candidate feature at a distance from the edges of regions in the region to be moved is chosen, it is special to obtain the positioning
Sign.
It is described in one of the embodiments, to move in the region to be moved to the location feature, obtain the mesh
Region is marked, including:
Obtain the edge feature of the location feature;
The edges of regions in the region to be moved is calculated at a distance from the edge feature of the location feature, obtain edge away from
From;
The Edge Distance is moved into the location feature in the region to be moved, obtains the target area.
Further include in one of the embodiments,:
The circuit board is divided into multiple positioning lattices, and obtains the feature of the positioning lattice;
When the feature of the positioning lattice meets the feature of setting, using the feature of the positioning lattice as the element characteristics.
Further include in one of the embodiments,:
The element characteristics of the prime area covering are obtained, and, set the area identification of the prime area;
Establish the incidence relation between the element characteristics and the area identification of the prime area of the prime area covering.
The prime area has corresponding moving direction, the selection at least one just in one of the embodiments,
Beginning region as region to be moved, including:
In N number of prime area, prime area corresponding with the target moving direction of setting is chosen, is waited for as described
Moving area;
There are multiple candidate region edges, the candidate region edge to have corresponding moving direction for the prime area,
The edges of regions for obtaining the region to be moved, including:
In multiple candidate region edges in the region to be moved, candidate corresponding with the target moving direction is chosen
Edges of regions, the edges of regions as the region to be moved;
There are the element characteristics multiple candidate feature edges, the candidate feature edge to have corresponding moving direction,
The edge feature for obtaining the location feature, including:
In multiple candidate feature edges of the location feature, choose corresponding with the target moving direction candidate special
Levy edge, the edge feature as the location feature.
In one of the embodiments, described according to N number of prime area and its element characteristics of covering, M is determined
Before a target area, further include:
In preset multiple moving directions, a moving direction is chosen as the target moving direction.
Second aspect, an embodiment of the present invention provides a kind of circuit board detection device, described device includes:
Initial acquisition module, for obtaining N number of prime area;N number of prime area covers all members of circuit board
Part feature;
Target determination module determines M target area for the element characteristics according to N number of prime area and its covering
Domain;The M target area covers whole element characteristics of N number of prime area covering;Wherein, N > M > 0;
Image collection module, the M area image for obtaining the circuit board;The M area image is a with the M
Target area corresponds;
Detection module, for detecting the element characteristics in the M area image.
The target determination module in one of the embodiments, including
Submodule is chosen, for choosing at least one prime area as region to be moved;
Mobile submodule, for the element characteristics according to the region overlay to be moved, the mobile region to be moved obtains
To the target area;
Submodule is deleted, the element characteristics for being covered when the target area include the covering of another prime area
Whole element characteristics, delete another described prime area, and be back to and described choose at least one prime area conduct
The step of region to be moved, until obtaining the M target area.
There is area identification, the element characteristics to have associated area for the prime area in one of the embodiments,
Domain identifier, the mobile submodule, including:
Acquiring unit, for obtain the region overlay to be moved and with the area identification in the region to be moved close
The element characteristics of connection obtain the first candidate feature;
Location feature unit, for choosing location feature in first candidate feature;
Target area unit obtains the target area for moving the region to be moved to the location feature.
The third aspect, the embodiment of the present invention additionally provides a kind of computer equipment, including memory and processor, described to deposit
Reservoir is stored with computer program, and the processor realizes circuit board as described in relation to the first aspect when executing the computer program
Detection method.
Fourth aspect, the embodiment of the present invention additionally provide a kind of computer readable storage medium, are stored thereon with computer
Program, for executing circuit board detecting method as described in relation to the first aspect when the computer program is executed by processor.
Foregoing circuit board detecting method, device, computer equipment and storage medium, by for the N number of initial of circuit board
The element characteristics of region and its covering, quantification are less than the M target area of N, obtain the corresponding M area in M target area
Area image, and detect the element characteristics of M area image, to obtain N number of area image, simultaneously without for N number of prime area
N number of area image is detected, reduces the area image for needing to detect, improves the efficiency of circuit board detecting.
Description of the drawings
Fig. 1 is a kind of flow chart for circuit board detecting method that the embodiment of the present invention one provides;
Fig. 2 is a kind of schematic diagram of circuit board;
Fig. 3 is a kind of schematic diagram of the circuit board detecting method of the prior art;
Fig. 4 is the schematic diagram of N number of prime area of the embodiment of the present invention one;
Fig. 5 is a kind of schematic diagram of mobile prime area of the embodiment of the present invention one;
Fig. 6 is a kind of flow chart of circuit board detecting method provided by Embodiment 2 of the present invention;
Fig. 7 is a kind of schematic diagram of positioning lattice of the embodiment of the present invention two;
Fig. 8 is a kind of schematic diagram of element characteristics of the embodiment of the present invention two;
The step of Fig. 9 is a kind of determining target area of the embodiment of the present invention two is schemed;
Figure 10 is a kind of schematic diagram of moving area scene of the embodiment of the present invention two;
Figure 11 is a kind of effect diagram in shaking region of the embodiment of the present invention;
Figure 12 is a kind of structure diagram of circuit board detection device of the embodiment of the present invention three;
Figure 13 is a kind of structural schematic diagram for computer equipment that the embodiment of the present invention four provides.
Specific implementation mode
It is with reference to the accompanying drawings and embodiments, right in order to make the object, technical solution and advantage of the application be more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Embodiment one
Fig. 1 is a kind of flow chart for circuit board detecting method that the embodiment of the present invention one provides.
Firstly the need of explanation, circuit board detecting method provided in this embodiment can be executed by detection device.The inspection
Measurement equipment can have filming apparatus, for each region pickup area image for circuit board.Detection device then be used for pair
Each region image is detected.When being detected for area image, mainly to reflecting circuit board component in area image
Element characteristics are detected.
Above-mentioned circuit board, may be mounted at computer, mobile phone, tablet, the electronic equipments such as projecting apparatus or interactive intelligent tablet computer,
Various functions may be implemented by circuit board in electronic equipment.Wherein, interactive intelligent tablet computer can be by touch technology to display
Content on display tablet is manipulated and is realized the integration apparatus of man-machine interactive operation, is integrated with electronic whiteboard, sound
One or more functions such as sound, television set.
Fig. 2 is a kind of schematic diagram of circuit board.As it can be seen that circuit board, which may include, multiple element 201, Duo Geyuan in figure
Part 201 can be distributed on each position of circuit board.
Fig. 3 is a kind of schematic diagram of the circuit board detecting method of the prior art.There are one the filming apparatus tools of detection device
Field angle FOV carries out image taking, and be directed to by field angle FOV to the region being in circuit board in field angle FOV
The image of shooting is detected.When detecting, circuit board can be in advance divided into multiple regions 301, the model in each region 301
It encloses identical as the range of a field angle FOV.When filming apparatus carries out image taking, shot within the scope of its field angle FOV
Image, you can obtain the image in one of circuit board region.Filming apparatus moves field angle FOV, you can takes circuit
The image of the multiple regions 301 of plate, detection device are detected the image in multiple region 301, you can complete to circuit board
Whole elements detection.
With the example of Fig. 3, illustrate that the circuit board detecting method of the prior art has that detection efficiency is relatively low.Fig. 3
In element 302 be distributed in four regions 301, therefore, detection device needs four regions 301 are shot respectively,
And be detected for four images, the detection to element 302 could be completed, detection efficiency is relatively low.
Specifically, with reference to figure 1, circuit board detecting method provided in this embodiment specifically includes:
Step S101 obtains N number of prime area;N number of prime area covers whole element characteristics of circuit board.
Wherein, above-mentioned N number of prime area can be the multiple regions for dividing circuit board according to preset rules.
For example, can more parts be divided into the length and width of circuit board, according to a length and a width as a region, from
And circuit board is divided into N number of region.
Wherein, above-mentioned element characteristics can be the feature of the electronic component on circuit board.For example, having on circuit board
Electronic component, after circuit board is divided into multiple regions, the filming apparatus of detection device is shot for region, is obtained
May include the characteristics of image of electronic component in image, it can be using the characteristics of image of electronic component as an element characteristics.
In practical applications, it can be divided into multiple grid for circuit board, may include that there are one complete in the range of a grid
Electronic component, can include the characteristics of image of complete electronic component by grid, as an element characteristics;One grid
In the range of, it is also possible to include only local electronic component, it can also be by electronic component local included in grid
Characteristics of image, as an element characteristics.
In the specific implementation, detection device, which can be directed to circuit board, divides N number of region, as above-mentioned N number of prime area.Electricity
There can be multiple element feature on the plate of road, N number of prime area can be covered with whole element characteristics on circuit board.
Fig. 4 is the schematic diagram of N number of prime area of the embodiment of the present invention one.It can be seen that circuit board can be divided
For 4 prime areas, respectively prime area 401, prime area 402, prime area 403 and prime area 404.4 initial
In region, it is covered each by element characteristics E01, element characteristics E02, element characteristics E03 and element characteristics E04.
Step S102 determines M target area according to N number of prime area and its element characteristics of covering;The M
A target area covers whole element characteristics of N number of prime area covering;Wherein, N > M > 0.
In the specific implementation, the element characteristics that can be covered according to prime area, at the beginning of moving one in N number of prime area
Beginning region or multiple prime areas.At mobile prime area, can be moved to the target of setting based on the edge of element characteristics
Direction is moved, when some or multiple prime areas after movement, the whole elements for being covered with another prime area are special
Sign, it may be determined that another prime area is the prime area of a redundancy, if using the prime area of redundancy as target area
Domain is detected, then can be detected to identical element characteristics, reduce detection efficiency.It therefore, can be by the initial of redundancy
It deletes in region.After the prime area of redundancy is deleted, using remaining prime area as target area, thus obtains quantity and be less than
The M target area of N.For example, for 12 prime areas, after mobile 2 prime areas, 2 target areas are obtained, this 2
Target area covers the whole element characteristics for the prime area that 1 is not moved, determines that it is the prime area of redundancy, by redundancy
Prime area delete and need not be mobile, continue to move remaining 9 prime areas, obtain 9 target areas, finally
11 target areas are obtained.
Fig. 5 is a kind of schematic diagram of mobile prime area of the embodiment of the present invention one.It can be seen that being divided in circuit board
There are prime area 501, prime area 502, prime area 503 and prime area 504.Current prime area 501, prime area
502, prime area 503 and prime area 504, be covered each by element characteristics E01, element characteristics E02, element characteristics E03 and
Element characteristics E04.
Prime area 501 is chosen to be moved, prime area 501` is obtained, using prime area 501` as a mesh
Mark region 505.Target area 505 covers the element characteristics E02 of prime area 502, and there are one element spies for prime area 502
Levy E02, that is, target area 505 covers whole element characteristics of prime area 502.Similarly, target area 505 covers just
Whole element characteristics in beginning region 503, target area 505 covers whole element characteristics of prime area 504.It therefore, can be with
Determine that prime area 502, prime area 503 and prime area 504 are the prime area of redundancy, delete prime area 502, just
Beginning region 503 and prime area 504.Finally, the target area for whole element characteristics that one is covered with multiple prime areas is obtained
Domain 505.
In practical application, it can judge that some prime area is according to the incidence relation between element characteristics and prime area
No redundancy.Specifically, can circuit board be divided into multiple positioning lattices first, the feature in multiple positioning lattices is obtained, when some
The feature of positioning lattice includes the feature of the completed element of circuit board, alternatively, including the feature of local element, then by this feature
As an element characteristics, meanwhile, set the area identification of N number of prime area, by a prime area element characteristics with
The area identification of the prime area establishes incidence relation.At a mobile prime area, searched from first in the prime area
The edges of regions in beginning region is nearest and associated element characteristics of area identification with the prime area, as location feature, base
Prime area is moved in the location feature, by the prime area after movement, as a target area, when the target area covers
The element characteristics for having another prime area, by the element characteristics of another prime area covered, as a weight
Area identification associated by re-association feature is revised as the area identification of target area by linked character, when another is initial
Among the element characteristics of region overlay, there is no have with the associated element characteristics of the area identification of another prime area,
Show that whole element characteristics of another prime area are covered by target area, it is possible to determine that another is initial
Region is the prime area of redundancy.
With reference to figure 5, prime area 501, prime area 502, prime area 503 and prime area 504 are respectively provided with region
Identify S01, S02, S03 and S04.Currently, area identification S01 is associated with element characteristics E01, area identification S02 and element characteristics
E02 is associated with, and area identification S03 is associated with element characteristics E03, and area identification S04 is associated with element characteristics E04.
Prime area 501 is chosen to be moved, determines and is covered with element characteristics E01, element characteristics in prime area 501
E01 is associated with the area identification S01 of prime area 501, therefore, is moved prime area 501 based on element characteristics E01, is obtained just
Beginning region 501`, using prime area 501` as target area 505, the area identification of target area 505 is all S01.Target
Region 505 covers the element characteristics E02 of prime area 502, by the associated area identifications of element characteristics E02, from area identification
S02 is revised as the area identification S01 of target area 505.Similarly, target area 505 covers the element characteristics of prime area 503
E03, and, the element characteristics E04 of prime area 504 is covered, therefore, by the associated area identifications of element characteristics E03, modification
The associated area identifications of element characteristics E04 are revised as area identification S01 for area identification S01.
Then, prime area 502 is chosen, since related element spy is not present in the area identification S02 of prime area 502
Sign, shows that whole element characteristics of prime area 502 are covered by target area, therefore, it is possible to determine that prime area
502 be the prime area of redundancy, deletes prime area 502.Similarly, prime area 503 and 504 can be deleted, finally, obtains one
A target area 505.
It should be noted that the square example of above-mentioned determining target area is merely to illustrate the technical thought of the present embodiment, this
Field technology personnel can determine target area, the present embodiment according to technical thought provided in this embodiment using various ways
To determining that the concrete mode of target area is not restricted.
Step S103 obtains M area image of the circuit board;The M area image and the M target area
It corresponds.
Wherein, area image is that the filming apparatus of detection device is directed to the figure that the target area of circuit board is shot
Picture.
In the specific implementation, after determining M target area, detection device can be directed to M target area of circuit board
It is shot, obtains M area image, which includes whole element characteristics of circuit board.
Step S104 detects the element characteristics in the M area image.
In the specific implementation, the M area image includes whole element characteristics of circuit board, for the M area image
It is detected, you can be detected with whole element characteristics for circuit board.
With reference to figure 5, the area image of target area 505 is obtained, which is detected, you can to complete to member
Part feature E01, element characteristics E02, element characteristics E03 and element characteristics E04 are detected, and need not be respectively to prime area
501, prime area 502, prime area 503 and the area image of prime area 504 corresponding four are detected, and improve circuit
Plate detection efficiency.
Technical solution provided in this embodiment, by for N number of prime area of circuit board and its element characteristics of covering,
Quantification is less than the M target area of N, obtains the corresponding M area image in M target area, and detect M area image
Element characteristics, to without obtaining N number of area image for N number of prime area and being detected to N number of area image, subtract
Lack the area image for needing to detect, improves the efficiency of circuit board detecting.
Embodiment two
Fig. 6 is a kind of flow chart of circuit board detecting method provided by Embodiment 2 of the present invention.Electricity provided in this embodiment
Road board detecting method specifically includes:
Step S201 obtains N number of prime area;N number of prime area covers whole element characteristics of circuit board.
Optionally, the method further includes:
The circuit board is divided into multiple positioning lattices, and obtains the feature of the positioning lattice;As the spy of the positioning lattice
Sign meets the feature of setting, using the feature of the positioning lattice as the element characteristics.
Wherein, above-mentioned positioning lattice is for positioning element characteristics.After circuit board is divided into multiple positioning lattices,
The positioning lattice matrix that multiple positioning lattices form a multiple lines and multiple rows can be right for position of the positioning lattice in positioning lattice matrix
Each positioning lattice is numbered, for example, some positioning lattice, which is located at the 2nd positioned in lattice matrix, arranges the 3rd row, the number of the positioning lattice
As G_2_3.Correspondingly, the element characteristics in positioning lattice, number are G_2_3.According to the number, element spy can be established
Incidence relation between sign and region.
Wherein, the feature of positioning lattice may include the characteristics of image in positioning lattice.Completed element or office can be preset
The feature of portion's element will be in the positioning lattice when the feature of the feature and completed element or local element of some positioning lattice meets
Feature, as element characteristics.
In the specific implementation, can be carried out etc., than dividing, obtaining determining for multiple clathrates according to the length and width of circuit board
Position lattice.Each positioning lattice can have certain feature, can be by the spy in the positioning lattice when this feature and the feature of setting meet
Sign is used as an element characteristics.
Fig. 7 is a kind of schematic diagram of positioning lattice of the embodiment of the present invention two.It can be seen that being drawn for circuit board
Point, multiple positioning lattices 701 can be obtained, to form a positioning lattice matrix.
Fig. 8 is a kind of schematic diagram of element characteristics of the embodiment of the present invention two.It can be seen that circuit board can be divided into
Multiple positioning lattices, the feature with 802 part of element wherein in the feature of positioning lattice 801, the feature of positioning lattice 801 is one
A element characteristics.
Step S202 obtains the element characteristics of the prime area covering, and, set the region mark of the prime area
Know.
Wherein, area identification is for identifying different regions.For example, the area identification of a prime area is S01, it is another
The area identification of a prime area is S02.
In the specific implementation, the filming apparatus of detection device, which can be directed to prime area, acquires a preview image, identification should
Characteristics of image in preview image, you can determine the element characteristics of prime area covering.
Step S203 is established between the element characteristics and the area identification of the prime area of the prime area covering
Incidence relation.
In the specific implementation, the element characteristics that a prime area is covered can be obtained, and set for the prime area
One area identification.Then, element characteristics and the area identification of the prime area that a prime area is covered are closed
Connection.It, can be with the incidence relation of the number of recording element feature and area identification in practical application.For example, a prime area is covered
The number of the element characteristics E01 of lid is G_2_3, and the area identification of the prime area is S01, and the association of record G_2_3 and S01 is closed
System.
Step S204 determines M target area according to N number of prime area and its element characteristics of covering;The M
A target area covers whole element characteristics of N number of prime area covering;Wherein, N > M > 0.
Optionally, as shown in figure 9, the step of providing a kind of determining target area of embodiment two is schemed, the step
S204 can be specifically included:
Step S11 chooses at least one prime area as region to be moved;
Step S12, according to the element characteristics of the region overlay to be moved, the mobile region to be moved obtains described
Target area;
Step S13, by the area identification in the region to be moved, the area identification as the target area;
Step S14 determines the element characteristics of the target area covering, as the second candidate feature;
Step S15, by different second candidate feature of area identification of associated area identification and the target area,
As re-association feature;
The area identification of the re-association feature association is revised as the area identification of the target area by step S16;
Step S17 obtains the area identification of another prime area;
Step S18, when associated element characteristics are not present in the area identification of another prime area, described in judgement
The element characteristics of target area covering include whole element characteristics of another prime area covering.
Step S19, when the element characteristics of target area covering include the whole of another prime area covering
Element characteristics delete another described prime area, and are back to step S11, until obtaining the M target area.
Wherein, above-mentioned steps S11's in the specific implementation, can in N number of prime area, according to the selection rule of setting,
A prime area is chosen, as region to be moved.After the mobile prime area, next prime area is chosen, as
Region to be moved, mobile next prime area.So analogize, mobile multiple prime areas.
In practical application, selection rule can from left to right, choose original area successively from top to bottom since the upper left corner
Domain can also be since the lower right corner as region to be moved, turn left from the right side, the conduct of selection prime area waits for successively from top to bottom
Moving area.Certainly, selection rule may be set according to actual conditions in those skilled in the art, and the embodiment of the present invention does not make this
Limitation.
Optionally, the prime area has corresponding moving direction, and at least one prime area of selection, which is used as, waits for
Moving area, including:
In N number of prime area, prime area corresponding with the target moving direction of setting is chosen, is waited for as described
Moving area.
Specifically, multiple moving directions such as lower right, upper right side, upper left side, lower left can be set, in mobile original area
Before domain, a moving direction is set, as target moving direction.According to the target moving direction of setting, correspondence can be chosen
Prime area as region to be moved.If for example, currently being moved to the right, the detection zone for choosing the upper left corner is made
For region to be moved the detection zone conduct below the detection zone of the upper left corner is chosen after the detection zone in the mobile upper left corner
Region to be moved, according to the mobile one or more detection zones of the sequence.
Figure 10 is a kind of schematic diagram of moving area scene of the embodiment of the present invention two.As seen from the figure, it is assumed that currently set
Determine the target moving direction of lower right, correspondingly, can choose and be used as region to be moved positioned at the prime area 1001 in the upper left corner,
It is moved to the right, obtains target area 1001`.Then, it chooses prime area 1002 and is used as region to be moved, to bottom right
Fang Jinhang is moved, and obtains target area 1002`.So analogize, according to setting rule choose prime area choose prime area into
Row movement.
Wherein, above-mentioned steps S12's in the specific implementation, can according to the element characteristics for waiting for region overlay to be moved, determine
The moving direction and displacement distance in region to be moved, are moved according to the moving direction and displacement distance, by waiting for after movement
Moving area, as target area.
Optionally, there is area identification, the element characteristics to have associated area identification, the step for the prime area
Rapid S12, including:
Step a, obtain the region overlay to be moved and the associated element of area identification with the region to be moved
Feature obtains the first candidate feature;
Step b, location feature is chosen in first candidate feature;
Step c, the region to be moved is moved to the location feature, obtains the target area.
In the specific implementation, the element characteristics of region overlay to be moved can be obtained, it is special in the element of region overlay to be moved
In sign, the associated element characteristics of area identification with region to be moved are searched, multiple first candidate features are obtained.In the first candidate
In feature, one or more first candidate features are chosen according to preset rules, as above-mentioned location feature.Based on positioning spy
The mobile region to be moved of sign, by the region to be moved after movement, as target area.
With reference to figure 10, the area identification of prime area 1001 is S01,1001 cladding element feature E01 of prime area to member
Part feature E04, current element characteristics E01 to element characteristics E04 are associated with the area identification S01 of prime area 1001.Cause
This, element characteristics E01 to element characteristics E04 is the first candidate feature of prime area 1001.In element characteristics E01 to member
In multiple first candidate features of part feature E04, according to preset rules, E01 is as location feature for selection element feature.Original area
Domain 1001 is moved to element characteristics E01, obtains target area 1001`.
Optionally, the step b, including:
Obtain the edges of regions in the region to be moved;It chooses minimum at a distance from the edges of regions in the region to be moved
The first candidate feature, obtain the location feature.
Wherein, edges of regions is the edge of a prime area.For example, prime area is rectangle, the four edges of rectangle are then
For four edges of regions of prime area.
In the specific implementation, region to be moved can have multiple candidate region edges, in multiple candidate region edge,
According to preset rules, one or more candidate regions edge, the edges of regions as prime area are chosen.Then, will with wait moving
First candidate feature of the distance minimum of the edges of regions in dynamic region, as above-mentioned location feature.
Optionally, there are multiple candidate region edges, the candidate region edge to have corresponding shifting for the prime area
Dynamic direction, the edges of regions for obtaining the region to be moved, including:
In multiple candidate region edges in the region to be moved, candidate corresponding with the target moving direction is chosen
Edges of regions, the edges of regions as the region to be moved.
With reference to figure 10, prime area 1001 has 4 edges, as candidate region edge, the target that currently sets
Moving direction is lower right, the candidate region edge at the candidate region edge and left side of upside can be chosen, as prime area
1001 edges of regions.
Optionally, the step c, including:
Obtain the edge feature of the location feature;Calculate the edges of regions in the region to be moved and the location feature
Edge feature distance, obtain Edge Distance;The Edge Distance is moved into the region to be moved to the location feature,
Obtain the target area.
In the specific implementation, location feature can have one or more features edge.In the regional edge for determining prime area
It, can be with the distance between zoning edge and edge feature, as above-mentioned Edge Distance after edge.It then, will be to be moved
Edge Distance is moved in region to location feature, obtains target area.
With reference to figure 10, element characteristics E01 is location feature, and element characteristics E01 has 4 edges, will according to preset rules
The edge at edge and left side on the upside of element characteristics E01, the edge feature as location feature.Prime area 1001 is to be moved
Region, it is edges of regions that prime area 1001, which has 4 edges, the edge of upside and the edge in left side,.Zoning edge and
The distance of edge feature, wherein the edge of 1001 upside of prime area is with the distance between the edge on the upside of element characteristics E01
2 positioning lattices, the distance between the edge in 1001 left side of prime area and the edge on the left of element characteristics E01 are also 2 positioning
Lattice.Therefore, 2 positioning lattices are moved into prime area 1001 to the right, moves 2 positioning lattices downwards, obtains target area
1001`。
Optionally, there are the element characteristics multiple candidate feature edges, the candidate feature edge to have corresponding shifting
Dynamic direction, the edge feature for obtaining the location feature, including:
In multiple candidate feature edges of the location feature, choose corresponding with the target moving direction candidate special
Levy edge, the edge feature as the location feature.
With reference to figure 10, element characteristics E01 has 4 edges, and as candidate feature edge, the target currently set is moved
Dynamic direction is lower right, the candidate feature edge at the candidate feature edge and left side of upside can be chosen, as element characteristics E01
Edge feature.
Wherein, above-mentioned steps S13's in the specific implementation, after movement region to be moved obtains target area, can will
The area identification in region to be moved, the area identification as target area.
With reference to figure 10 target area 1001` is obtained after prime area 1001 is moved.The area identification of prime area 1001
For S01, the area identification of target area 1001` is S01 as a result,.
Wherein, above-mentioned steps S14's in the specific implementation, after mobile prime area, it is mobile before prime area covered
The element characteristics of lid, the element characteristics covered with the prime area before movement simultaneously differ.Therefore, it is obtained in mobile prime area
To after target area, the element characteristics of target area covering can be obtained, as the second above-mentioned candidate feature.
With reference to figure 10, prime area 1001 cladding element feature E01 to element characteristics E04, mobile prime area obtains mesh
Mark region 1001`, the element characteristics of target area 1001` coverings include element characteristics E01 to element characteristics E06, element characteristics
E08 to element characteristics E09.Element characteristics E01 to element characteristics E06, element characteristics E08 are then target area to element characteristics E09
The second candidate feature of domain 1001`.
Wherein, above-mentioned steps S15's in the specific implementation, the associated area identification of the second candidate feature can be obtained, when certain
When the associated area identification of a second candidate feature and the area identification of target area differ, which makees
Attach most importance to linked character.
With reference to figure 10, element characteristics E05 to element characteristics E06, element characteristics E08 to the associated regions element characteristics E09
Mark differs for the area identification S02 of prime area 1002 with the area identification S01 of target area 1001`, therefore, element
Feature E05 to element characteristics E06, element characteristics E08 are to element characteristics E09, linked character of attaching most importance to.
Wherein, above-mentioned steps S16's in the specific implementation, when another prime area of re-association feature association region mark
Know, the area identification of another prime area, and the area identification of newly-increased target area can be deleted, as re-association feature
Associated area identification.
With reference to figure 10, for element characteristics E05 to element characteristics E06, element characteristics E08 to element characteristics E09, Jiang Qiguan
The area identification S02 of connection is revised as the area identification S01 of target area.
Wherein, above-mentioned steps S17's in the specific implementation, after a mobile prime area, can choose it is next just
It is moved in beginning region.Before the next prime area of movement, it can be determined that whole elements of next prime area covering
Feature, if covered by target area.Specifically, the area identification of next prime area can be obtained first, judged
Whether the area identification has associated element characteristics.Due to the associated region mark of one or more element characteristics of prime area
Knowledge may be changed, and cause the area identification of next prime area that related element characteristics are not present.When next initial
Related element characteristics are not present in the area identification in region, show whole element characteristics of next prime area by mesh
Mark region is covered.
Wherein, above-mentioned steps S18's in the specific implementation, when a prime area area identification be not present associated element
Feature, it is possible to determine that included whole element characteristics of the prime area in the element characteristics that target area is covered,
That is, the prime area is the prime area of a redundancy.
Wherein, above-mentioned steps S19's in the specific implementation, after determining the prime area of redundancy, can be by the redundancy
Prime area is deleted, and is back to step S11, is chosen next prime area and is moved.Behind the multiple prime areas of movement,
It can obtain M target area.
For the ease of those skilled in the art understand that the embodiment of the present invention, will illustrate to determine M target below based on Figure 10
The process in region.
With reference to figure 10, currently there are 12 prime areas.It chooses prime area 1001 and is used as region to be moved.Prime area
1001 include element characteristics E01 to element characteristics E04.Currently, element characteristics E01 to element characteristics E04 is and prime area
1001 area identification S01 associations, are the first candidate feature.Wherein, at a distance from the edges of regions of prime area 1001
It is minimum and be element characteristics E01 with associated first candidate features of S01, using element characteristics E01 as location feature.
The Edge Distance between the edge feature of element characteristics E01 and the edges of regions of prime area 1001 is determined, for cross
To 2 positioning lattices and longitudinal 2 positioning lattices, 2 positioning lattices are moved to the right and downwards in prime area 1001 respectively, obtain target area
Domain 1001`.
Target area 1001` covers element characteristics E01 to element characteristics E06, element characteristics E08 to element characteristics E09,
It is the second candidate feature.
In second candidate feature, element characteristics E05 to element characteristics E06, element characteristics E08 to element characteristics E09, association
Area identification be S02, therefore, element characteristics E05 to element characteristics E06, element characteristics E08 to element characteristics E09, be series of fortified passes
Join feature.By the area identification of re-association feature association, it is revised as the area identification S01 of target area 1001`.
It chooses prime area 1002 and is used as region to be moved.Prime area 1002 includes element characteristics E05 to element characteristics
E14.Wherein, element characteristics E05 to element characteristics E06, element characteristics E08 are to the associated area identifications of element characteristics E09
S01, therefore, area identification S02 associated element characteristics that prime area 1002 covers and with prime area 1002, including
There are element characteristics E07, element characteristics E10 to element characteristics E14, is the first candidate feature.With the region of prime area 1002
The distance at edge it is minimum and be element characteristics E07 with associated first candidate features of S02, using element characteristics E07 as positioning
Feature.
The Edge Distance between the edge feature of element characteristics E07 and the edges of regions of prime area 1002 is determined, for cross
To 1 positioning lattice and longitudinal 1 positioning lattice, 1 positioning lattice is moved to the right and downwards in prime area 1002 respectively, obtains target area
Domain 1002`.
Target area 1002` covers element characteristics E07 to element characteristics E14, is the second candidate feature.
In second candidate feature, element characteristics E08 to element characteristics E09, associated area identification is S01, therefore, element
Feature E08 to element characteristics E09, linked character of attaching most importance to.By the area identification of re-association feature association, it is revised as target area
The area identification S02 of 1002`.
Next prime area is continued to move in the manner described above, when being moved to prime area 1003, prime area 1003
Target area 1003`, target area 1003` cladding element feature E15 to element characteristics E18, by element characteristics are obtained after movement
E15 is revised as the area identification S03 of target area 1003` to the associated area identifications of element characteristics E18.Due to prime area
The element characteristics E16 of 1004 coverings is not associated with the area identification S04 of prime area 1004, that is, what prime area 1004 covered
Whole element characteristics are covered by target area 1003`, and prime area 1004 is the prime area of redundancy, can be by prime area
1004 delete.Similarly, it may be determined that prime area 1005 and the prime area that prime area 1006 is redundancy, it can be by original area
Domain 1005 and prime area 1006 are deleted.To when being detected, ensure to examine whole element characteristics of circuit board
While survey, reduce the detection to prime area 1004 to prime area 1006, improves the detection efficiency of circuit board.
Optionally, before the step S204, further include:
In preset multiple moving directions, a moving direction is chosen as the target moving direction.
In the specific implementation, the multiple regions of circuit board can to the right, upper right side, upper left side, multiple shiftings such as lower left
Dynamic direction is moved, and before mobile prime area, a moving direction can be set, as a target moving direction.
At the multiple prime areas of movement, moved according to the target moving direction.After mobile prime area, it can choose down
One moving direction moves prime area again as target moving direction.To which so that multiple regions are to different moving directions
It is mobile, it determines the region of redundancy by repeatedly shaking region, the prime area of redundancy can be quickly determined, further promoted
The efficiency of circuit board detecting.
Figure 11 is a kind of effect diagram in shaking region of the embodiment of the present invention.It can be seen that according to different movements
Each region is moved in direction, realizes the flicker effect to region, in the M target area repeatedly obtained after shaking, is both covered
Whole element characteristics of circuit board, while reducing the quantity in region.
Step S205 obtains M area image of the circuit board;The M area image and the M target area
It corresponds.
In the specific implementation, detection device can shoot M target area of circuit board, corresponding M area is obtained
Area image.
Step S206 detects the element characteristics in the M area image.
In the specific implementation, detectable equipment can be detected the element characteristics in M area image, judgment component is special
Sign is with the presence or absence of abnormal.
Technical solution provided in this embodiment is associated with by establishing region with the incidence relation of element characteristics, according to this
It is moving area and incidence relation is changed according to the region after movement, leads to too small amount of mobile number, you can determine the area of redundancy
Domain, improves the speed of determining redundant area, further improves the efficiency of circuit board detecting.
Although should be understood that Fig. 1,6 and 9 flow chart and block diagram in each step according to arrow instruction according to
Secondary display, but these steps are not the inevitable sequence indicated according to arrow to be executed successively.Unless having herein explicitly
Bright, there is no stringent sequences to limit for the execution of these steps, these steps can execute in other order.Moreover, Fig. 1,6
May include that either these sub-steps of multiple stages or stage be not necessarily for multiple sub-steps at least part step in 9
It is so to execute completion in synchronization, but can execute at different times, these sub-steps or stage execute sequence
Also it is not necessarily and carries out successively, but can be with other steps either sub-step of other steps or at least part in stage
It executes in turn or alternately.
Embodiment three
Figure 12 is a kind of structure diagram of circuit board detection device of the embodiment of the present invention three, the circuit board detecting dress
It sets, specifically includes initial acquisition module 301, target determination module 302, image collection module 303 and detection module 304.
Initial acquisition module 301, for obtaining N number of prime area;N number of prime area covers the whole of circuit board
Element characteristics;
Target determination module 302 determines M target for the element characteristics according to N number of prime area and its covering
Region;The M target area covers whole element characteristics of N number of prime area covering;Wherein, N > M > 0;
Image collection module 303, the M area image for obtaining the circuit board;The M area image with it is described
M target area corresponds;
Detection module 304, for detecting the element characteristics in the M area image.
One embodiment wherein, the target determination module 302, including:
Submodule is chosen, for choosing at least one prime area as region to be moved;
Mobile submodule, for the element characteristics according to the region overlay to be moved, the mobile region to be moved obtains
To the target area;
Submodule is deleted, the element characteristics for being covered when the target area include the covering of another prime area
Whole element characteristics, delete another described prime area, and be back to and described choose at least one prime area conduct
The step of region to be moved, until obtaining the M target area.
There is area identification, the element characteristics to have associated region for one embodiment wherein, the prime area
Mark, the mobile submodule, including:
Acquiring unit, for obtain the region overlay to be moved and with the area identification in the region to be moved close
The element characteristics of connection obtain the first candidate feature;
Location feature unit, for choosing location feature in first candidate feature;
Target area unit obtains the target area for moving the region to be moved to the location feature.
One embodiment wherein, the target determination module 302 further include:
First identifier submodule is used for the area identification in the region to be moved, the region as the target area
Mark;
Feature acquisition submodule, the element characteristics for determining the target area covering, as the second candidate feature;
Re-association submodule is used for the area identification different second of associated area identification and the target area
Candidate feature, as re-association feature;
Mark modification submodule, for by the area identification of the re-association feature association, being revised as the target area
Area identification.
One embodiment wherein, the target determination module 302 further include:
Second identifier submodule, the area identification for obtaining another prime area;
Decision sub-module, for associated element characteristics to be not present when the area identification of another prime area,
Judge that the element characteristics of the target area covering include whole element characteristics of another prime area covering.
One embodiment wherein, the location feature unit, including:
Edges of regions subelement obtains the edges of regions in the region to be moved;
Subelement is chosen, for choosing minimum the first candidate spy at a distance from the edges of regions in the region to be moved
Sign, obtains the location feature.
One embodiment wherein, the target area unit, including:
Edge feature subelement, the edge feature for obtaining the location feature;
Apart from computation subunit, the characteristic edge of edges of regions and the location feature for calculating the region to be moved
The distance of edge, obtains Edge Distance;
Mobile subelement obtains institute for the Edge Distance to be moved in the region to be moved to the location feature
State target area.
One embodiment wherein, described device further include:
Division module for the circuit board to be divided into multiple positioning lattices, and obtains the feature of the positioning lattice;
Element characteristics determining module, the feature for meeting setting when the feature of the positioning lattice, by the positioning lattice
Feature is as the element characteristics.
One embodiment wherein, described device further include:
Setting module, the element characteristics for obtaining the prime area covering, and, set the area of the prime area
Domain identifier;
Establish module, for establish the element characteristics of prime area covering and the prime area area identification it
Between incidence relation.
One embodiment wherein, the prime area have corresponding moving direction, the selection submodule, including:
Unit to be moved, it is corresponding with the target moving direction of setting initial in N number of prime area, choosing
Region, as the region to be moved;
There are multiple candidate region edges, the candidate region edge to have corresponding moving direction for the prime area,
The edges of regions subelement, including:
First edge module, in multiple candidate region edges in the region to be moved, choosing and the target
The corresponding candidate region edge of moving direction, the edges of regions as the region to be moved;
There are the element characteristics multiple candidate feature edges, the candidate feature edge to have corresponding moving direction,
The edge feature subelement, including:
Second edge module, in multiple candidate feature edges of the location feature, choosing and being moved with the target
The dynamic corresponding candidate feature edge in direction, the edge feature as the location feature.
One embodiment wherein, described device further include:
Module is chosen in direction, in preset multiple moving directions, choosing a moving direction as the target
Moving direction.
Specific about circuit board detection device limits the restriction that may refer to above for circuit board detecting method,
This is repeated no more.Modules in foregoing circuit board checking device can come fully or partially through software, hardware and combinations thereof
It realizes.Above-mentioned each module can be embedded in or in the form of hardware independently of in the processor in computer equipment, can also be with software
Form is stored in the memory in computer equipment, and the corresponding operation of the above modules is executed in order to which processor calls.
Example IV
Figure 13 is a kind of structural schematic diagram for computer equipment that the embodiment of the present invention four provides.The computer equipment can be with
It is server, internal structure chart can be as shown in figure 13.The computer equipment include the processor connected by system bus,
Memory, network interface and database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The meter
The memory for calculating machine equipment includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operation system
System, computer program and database.The built-in storage is operating system and computer program in non-volatile memory medium
Operation provides environment.The database of the computer equipment is used for storage circuit plate detection data.The network of the computer equipment connects
Mouth with external terminal by network connection for being communicated.To realize a kind of circuit board when the computer program is executed by processor
Detection method.
It will be understood by those skilled in the art that structure shown in Figure 13, only with the relevant part of application scheme
The block diagram of structure, does not constitute the restriction for the computer equipment being applied thereon to application scheme, and specific computer is set
Standby may include either combining certain components than more or fewer components as shown in the figure or being arranged with different components.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory
Computer program, the processor realize following steps when executing computer program:
Obtain N number of prime area;N number of prime area covers whole element characteristics of circuit board;According to described N number of
The element characteristics of prime area and its covering determine M target area;The M target area covers N number of original area
Whole element characteristics of domain covering;Wherein, N > M > 0;Obtain M area image of the circuit board;The M area image
It is corresponded with the M target area;Detect the element characteristics in the M area image.
In one embodiment, following steps are also realized when processor executes computer program:
At least one prime area is chosen as region to be moved;
According to the element characteristics of the region overlay to be moved, the mobile region to be moved obtains the target area;
When the target area covering element characteristics include another prime area covering whole element characteristics,
Another described prime area is deleted, and is back to the step for choosing at least one prime area as region to be moved
Suddenly, until obtaining the M target area.
In one embodiment, following steps are also realized when processor executes computer program:
Obtain the region overlay to be moved and the associated element characteristics of area identification with the region to be moved,
Obtain the first candidate feature;
Location feature is chosen in first candidate feature;
The region to be moved is moved to the location feature, obtains the target area.
In one embodiment, following steps are also realized when processor executes computer program:
By the area identification in the region to be moved, the area identification as the target area;
The element characteristics for determining the target area covering, as the second candidate feature;
By different second candidate feature of area identification of associated area identification and the target area, as series of fortified passes
Join feature;
By the area identification of the re-association feature association, it is revised as the area identification of the target area.
In one embodiment, following steps are also realized when processor executes computer program:
Obtain the area identification of another prime area;
There is no associated element characteristics for area identification when another prime area, judge the target area
The element characteristics of covering include whole element characteristics of another prime area covering.
In one embodiment, following steps are also realized when processor executes computer program:
Obtain the edges of regions in the region to be moved;
Minimum the first candidate feature at a distance from the edges of regions in the region to be moved is chosen, it is special to obtain the positioning
Sign.
In one embodiment, following steps are also realized when processor executes computer program:
Obtain the edge feature of the location feature;
The edges of regions in the region to be moved is calculated at a distance from the edge feature of the location feature, obtain edge away from
From;
The Edge Distance is moved into the location feature in the region to be moved, obtains the target area.
In one embodiment, following steps are also realized when processor executes computer program:
The circuit board is divided into multiple positioning lattices, and obtains the feature of the positioning lattice;
When the feature of the positioning lattice meets the feature of setting, using the feature of the positioning lattice as the element characteristics.
In one embodiment, following steps are also realized when processor executes computer program:
The element characteristics of the prime area covering are obtained, and, set the area identification of the prime area;
Establish the incidence relation between the element characteristics and the area identification of the prime area of the prime area covering.
In one embodiment, following steps are also realized when processor executes computer program:
In N number of prime area, prime area corresponding with the target moving direction of setting is chosen, is waited for as described
Moving area;
There are multiple candidate region edges, the candidate region edge to have corresponding moving direction for the prime area,
The edges of regions for obtaining the region to be moved, including:
In multiple candidate region edges in the region to be moved, candidate corresponding with the target moving direction is chosen
Edges of regions, the edges of regions as the region to be moved;
There are the element characteristics multiple candidate feature edges, the candidate feature edge to have corresponding moving direction,
The edge feature for obtaining the location feature, including:
In multiple candidate feature edges of the location feature, choose corresponding with the target moving direction candidate special
Levy edge, the edge feature as the location feature.
In one embodiment, following steps are also realized when processor executes computer program:
In preset multiple moving directions, a moving direction is chosen as the target moving direction.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program realizes following steps when being executed by processor:
In one embodiment, following steps are also realized when computer program is executed by processor:
At least one prime area is chosen as region to be moved;
According to the element characteristics of the region overlay to be moved, the mobile region to be moved obtains the target area;
When the target area covering element characteristics include another prime area covering whole element characteristics,
Another described prime area is deleted, and is back to the step for choosing at least one prime area as region to be moved
Suddenly, until obtaining the M target area.
In one embodiment, following steps are also realized when computer program is executed by processor:
Obtain the region overlay to be moved and the associated element characteristics of area identification with the region to be moved,
Obtain the first candidate feature;
Location feature is chosen in first candidate feature;
The region to be moved is moved to the location feature, obtains the target area.
In one embodiment, following steps are also realized when computer program is executed by processor:
By the area identification in the region to be moved, the area identification as the target area;
The element characteristics for determining the target area covering, as the second candidate feature;
By different second candidate feature of area identification of associated area identification and the target area, as series of fortified passes
Join feature;
By the area identification of the re-association feature association, it is revised as the area identification of the target area.
In one embodiment, following steps are also realized when computer program is executed by processor:
Obtain the area identification of another prime area;
There is no associated element characteristics for area identification when another prime area, judge the target area
The element characteristics of covering include whole element characteristics of another prime area covering.
In one embodiment, following steps are also realized when computer program is executed by processor:
Obtain the edges of regions in the region to be moved;
Minimum the first candidate feature at a distance from the edges of regions in the region to be moved is chosen, it is special to obtain the positioning
Sign.
In one embodiment, following steps are also realized when computer program is executed by processor:
Obtain the edge feature of the location feature;
The edges of regions in the region to be moved is calculated at a distance from the edge feature of the location feature, obtain edge away from
From;
The Edge Distance is moved into the location feature in the region to be moved, obtains the target area.
In one embodiment, following steps are also realized when computer program is executed by processor:
The circuit board is divided into multiple positioning lattices, and obtains the feature of the positioning lattice;
When the feature of the positioning lattice meets the feature of setting, using the feature of the positioning lattice as the element characteristics.
In one embodiment, following steps are also realized when computer program is executed by processor:
The element characteristics of the prime area covering are obtained, and, set the area identification of the prime area;
Establish the incidence relation between the element characteristics and the area identification of the prime area of the prime area covering.
In one embodiment, following steps are also realized when computer program is executed by processor:
In N number of prime area, prime area corresponding with the target moving direction of setting is chosen, is waited for as described
Moving area;
There are multiple candidate region edges, the candidate region edge to have corresponding moving direction for the prime area,
The edges of regions for obtaining the region to be moved, including:
In multiple candidate region edges in the region to be moved, candidate corresponding with the target moving direction is chosen
Edges of regions, the edges of regions as the region to be moved;
There are the element characteristics multiple candidate feature edges, the candidate feature edge to have corresponding moving direction,
The edge feature for obtaining the location feature, including:
In multiple candidate feature edges of the location feature, choose corresponding with the target moving direction candidate special
Levy edge, the edge feature as the location feature.
In one embodiment, following steps are also realized when computer program is executed by processor:
In preset multiple moving directions, a moving direction is chosen as the target moving direction.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein,
Any reference to memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above example can be combined arbitrarily, to keep description succinct, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield is all considered to be the range of this specification record.
The several embodiments of the application above described embodiment only expresses, 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, under the premise of not departing from the application design, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the protection domain of the application patent should be determined by the appended claims.
Claims (16)
1. a kind of circuit board detecting method, which is characterized in that the method includes:
Obtain N number of prime area;N number of prime area covers whole element characteristics of circuit board;
According to N number of prime area and its element characteristics of covering, M target area is determined;The M target area covering
The whole element characteristics of N number of prime area covering;Wherein, N > M > 0;
Obtain M area image of the circuit board;The M area image is corresponded with the M target area;
Detect the element characteristics in the M area image.
2. according to the method described in claim 1, it is characterized in that, described according to N number of prime area and its member of covering
Part feature determines M target area, including:
At least one prime area is chosen as region to be moved;
According to the element characteristics of the region overlay to be moved, the mobile region to be moved obtains the target area;
When the element characteristics of target area covering include whole element characteristics of another prime area covering, deletion
Another described prime area, and it is back to the step of at least one prime area of selection is as region to be moved, directly
To obtaining the M target area.
3. according to the method described in claim 2, it is characterized in that, the prime area has area identification, the element special
Levying has associated area identification, the element characteristics according to the region overlay to be moved, the mobile region to be moved,
The target area is obtained, including:
Obtain the region overlay to be moved and the associated element characteristics of area identification with the region to be moved, it obtains
First candidate feature;
Location feature is chosen in first candidate feature;
The region to be moved is moved to the location feature, obtains the target area.
4. according to the method described in claim 3, it is characterized in that, described described to be moved according to target signature movement
Region, after obtaining the target area, the method further includes:
By the area identification in the region to be moved, the area identification as the target area;
The element characteristics for determining the target area covering, as the second candidate feature;
By different second candidate feature of area identification of associated area identification and the target area, as re-association spy
Sign;
By the area identification of the re-association feature association, it is revised as the area identification of the target area.
5. according to the method described in claim 4, it is characterized in that, special in the element according to the region overlay to be moved
Sign, the mobile region to be moved further include after obtaining the target area:
Obtain the area identification of another prime area;
There is no associated element characteristics for area identification when another prime area, judge the target area covering
Element characteristics include another prime area covering whole element characteristics.
6. according to the method described in claim 3, it is characterized in that, described choose positioning spy in first candidate feature
Sign, including:
Obtain the edges of regions in the region to be moved;
Minimum the first candidate feature at a distance from the edges of regions in the region to be moved is chosen, the location feature is obtained.
7. according to the method described in claim 6, it is characterized in that, described move in the region to be moved to the location feature
It is dynamic, the target area is obtained, including:
Obtain the edge feature of the location feature;
The edges of regions in the region to be moved is calculated at a distance from the edge feature of the location feature, obtains Edge Distance;
The Edge Distance is moved into the location feature in the region to be moved, obtains the target area.
8. according to the method described in claim 3, it is characterized in that, further including:
The circuit board is divided into multiple positioning lattices, and obtains the feature of the positioning lattice;
When the feature of the positioning lattice meets the feature of setting, using the feature of the positioning lattice as the element characteristics.
9. according to the method described in claim 8, it is characterized in that, further including:
The element characteristics of the prime area covering are obtained, and, set the area identification of the prime area;
Establish the incidence relation between the element characteristics and the area identification of the prime area of the prime area covering.
10. the method according to the description of claim 7 is characterized in that the prime area have corresponding moving direction, it is described
At least one prime area is chosen as region to be moved, including:
In N number of prime area, prime area corresponding with the target moving direction of setting is chosen, as described to be moved
Region;
The prime area has multiple candidate region edges, and the candidate region edge has corresponding moving direction, described
The edges of regions in the region to be moved is obtained, including:
In multiple candidate region edges in the region to be moved, candidate region corresponding with the target moving direction is chosen
Edge, the edges of regions as the region to be moved;
The element characteristics have multiple candidate feature edges, and the candidate feature edge has corresponding moving direction, described
The edge feature of the location feature is obtained, including:
In multiple candidate feature edges of the location feature, candidate feature side corresponding with the target moving direction is chosen
Edge, the edge feature as the location feature.
11. according to the method described in claim 10, it is characterized in that, described according to N number of prime area and its covering
Element characteristics further include before determining M target area:
In preset multiple moving directions, a moving direction is chosen as the target moving direction.
12. a kind of circuit board detection device, which is characterized in that described device includes:
Initial acquisition module, for obtaining N number of prime area;Whole elements that N number of prime area covers circuit board are special
Sign;
Target determination module determines M target area for the element characteristics according to N number of prime area and its covering;Institute
State whole element characteristics that M target area covers N number of prime area covering;Wherein, N > M > 0;
Image collection module, the M area image for obtaining the circuit board;The M area image and the M target
Region corresponds;
Detection module, for detecting the element characteristics in the M area image.
13. device according to claim 12, which is characterized in that the target determination module, including
Submodule is chosen, for choosing at least one prime area as region to be moved;
Mobile submodule, for the element characteristics according to the region overlay to be moved, the mobile region to be moved obtains institute
State target area;
Submodule is deleted, the element characteristics for being covered when the target area include the complete of another prime area covering
Portion's element characteristics delete another described prime area, and are back at least one prime area conduct of the selection and wait moving
The step of dynamic region, until obtaining the M target area.
14. device according to claim 13, which is characterized in that the prime area has area identification, the element
Feature have associated area identification, the mobile submodule, including:
Acquiring unit, for obtain the region overlay to be moved and with the area identification in the region to be moved it is associated
Element characteristics obtain the first candidate feature;
Location feature unit, for choosing location feature in first candidate feature;
Target area unit obtains the target area for moving the region to be moved to the location feature.
15. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists
In when the processor executes the computer program the step of any one of realization claim 1 to 11 the method.
16. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method described in any one of claim 1 to 11 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810482299.7A CN108717697B (en) | 2018-05-18 | 2018-05-18 | Circuit board detection method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810482299.7A CN108717697B (en) | 2018-05-18 | 2018-05-18 | Circuit board detection method and device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108717697A true CN108717697A (en) | 2018-10-30 |
CN108717697B CN108717697B (en) | 2021-04-13 |
Family
ID=63899939
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810482299.7A Active CN108717697B (en) | 2018-05-18 | 2018-05-18 | Circuit board detection method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108717697B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112129227A (en) * | 2020-11-23 | 2020-12-25 | 维嘉数控科技(苏州)有限公司 | Method, device, equipment and medium for scanning printed circuit board |
CN114040120A (en) * | 2022-01-06 | 2022-02-11 | 深圳思谋信息科技有限公司 | Shooting path determination method, device and equipment for panel element detection |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050281452A1 (en) * | 2004-06-18 | 2005-12-22 | Usikov Daniel A | System and method for performing automated optical inspection of objects |
KR100810722B1 (en) * | 2007-04-03 | 2008-03-07 | (주)펨트론 | Apparatus for measurement of surface profile and control method thereof |
US20090324055A1 (en) * | 2008-06-02 | 2009-12-31 | Ditza Auerbach | System and method for generating spatial signatures reference to related applications |
JP2010008149A (en) * | 2008-06-25 | 2010-01-14 | Panasonic Corp | Inspection region setting method |
KR101511089B1 (en) * | 2013-07-22 | 2015-04-10 | (주)펨트론 | Teaching data auto-generating method for aoi apparatus |
US20150294456A1 (en) * | 2012-11-23 | 2015-10-15 | Alexander Phillip Davies | Method of Detection of Faults on Circuit Boards |
CN105184793A (en) * | 2015-09-02 | 2015-12-23 | 广东电网有限责任公司汕尾供电局 | Electric energy meter sample appearance and PCB element detection method |
CN105203549A (en) * | 2015-09-10 | 2015-12-30 | 苏州威盛视信息科技有限公司 | Circuit board AOI (automated optical inspection) detection method |
CN105510348A (en) * | 2015-12-31 | 2016-04-20 | 南京协辰电子科技有限公司 | Flaw detection method and device of printed circuit board and detection equipment |
CN106370671A (en) * | 2016-10-12 | 2017-02-01 | 浙江理工大学 | PCB (printed circuit board) component detection system and method based on machine vision |
WO2017098561A1 (en) * | 2015-12-07 | 2017-06-15 | 富士機械製造株式会社 | Substrate image processing device and substrate image processing method |
CN107025648A (en) * | 2017-03-20 | 2017-08-08 | 中国人民解放军空军工程大学 | A kind of board failure infrared image automatic testing method |
CN107330879A (en) * | 2017-06-21 | 2017-11-07 | 广州视源电子科技股份有限公司 | Device inspection method, device, equipment and storage medium |
-
2018
- 2018-05-18 CN CN201810482299.7A patent/CN108717697B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050281452A1 (en) * | 2004-06-18 | 2005-12-22 | Usikov Daniel A | System and method for performing automated optical inspection of objects |
KR100810722B1 (en) * | 2007-04-03 | 2008-03-07 | (주)펨트론 | Apparatus for measurement of surface profile and control method thereof |
US20090324055A1 (en) * | 2008-06-02 | 2009-12-31 | Ditza Auerbach | System and method for generating spatial signatures reference to related applications |
JP2010008149A (en) * | 2008-06-25 | 2010-01-14 | Panasonic Corp | Inspection region setting method |
US20150294456A1 (en) * | 2012-11-23 | 2015-10-15 | Alexander Phillip Davies | Method of Detection of Faults on Circuit Boards |
KR101511089B1 (en) * | 2013-07-22 | 2015-04-10 | (주)펨트론 | Teaching data auto-generating method for aoi apparatus |
CN105184793A (en) * | 2015-09-02 | 2015-12-23 | 广东电网有限责任公司汕尾供电局 | Electric energy meter sample appearance and PCB element detection method |
CN105203549A (en) * | 2015-09-10 | 2015-12-30 | 苏州威盛视信息科技有限公司 | Circuit board AOI (automated optical inspection) detection method |
WO2017098561A1 (en) * | 2015-12-07 | 2017-06-15 | 富士機械製造株式会社 | Substrate image processing device and substrate image processing method |
CN105510348A (en) * | 2015-12-31 | 2016-04-20 | 南京协辰电子科技有限公司 | Flaw detection method and device of printed circuit board and detection equipment |
CN106370671A (en) * | 2016-10-12 | 2017-02-01 | 浙江理工大学 | PCB (printed circuit board) component detection system and method based on machine vision |
CN107025648A (en) * | 2017-03-20 | 2017-08-08 | 中国人民解放军空军工程大学 | A kind of board failure infrared image automatic testing method |
CN107330879A (en) * | 2017-06-21 | 2017-11-07 | 广州视源电子科技股份有限公司 | Device inspection method, device, equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
宿鸣明: "电路板元器件的检测与识别", 《中国优秀博硕士学位论文全文数据库 (硕士)信息科技辑》 * |
柯一剑: "件定位与识别技术研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112129227A (en) * | 2020-11-23 | 2020-12-25 | 维嘉数控科技(苏州)有限公司 | Method, device, equipment and medium for scanning printed circuit board |
CN112129227B (en) * | 2020-11-23 | 2021-03-02 | 维嘉数控科技(苏州)有限公司 | Method, device, equipment and medium for scanning printed circuit board |
CN114040120A (en) * | 2022-01-06 | 2022-02-11 | 深圳思谋信息科技有限公司 | Shooting path determination method, device and equipment for panel element detection |
Also Published As
Publication number | Publication date |
---|---|
CN108717697B (en) | 2021-04-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109726647B (en) | Point cloud labeling method and device, computer equipment and storage medium | |
US9569873B2 (en) | Automated iterative image-masking based on imported depth information | |
CN103491298B (en) | Multi-region real-time synthesis photographing method and touch control terminal | |
CN109947967A (en) | Image-recognizing method, device, storage medium and computer equipment | |
CN105657272A (en) | Terminal equipment and photographing method thereof | |
CN110473238A (en) | A kind of method for registering images, device, electronic equipment and storage medium | |
CN104410785A (en) | An information processing method and electronic device | |
CN106060422A (en) | Image exposure method and mobile terminal | |
CN106020596A (en) | Method and device for setting desktop background image of mobile terminal as well as mobile terminal | |
CN108717697A (en) | Circuit board detection method and device, computer equipment and storage medium | |
CN105376490A (en) | Mode switching method, mode switching apparatus and terminal device using mode switching method | |
CN110705532A (en) | Method, device and equipment for identifying copied image | |
CN104994287A (en) | Camera shooting method based on wide-angle camera and mobile terminal | |
CN104410790A (en) | Information processing method and electronic equipment | |
CN111524086B (en) | Moving object detection device, moving object detection method, and storage medium | |
CN108198189A (en) | Acquisition methods, device, storage medium and the electronic equipment of picture clarity | |
CN105554366A (en) | Multimedia photographing processing method and device and intelligent terminal | |
CN112269519A (en) | Document processing method and device and electronic equipment | |
JP3332166B2 (en) | Video search device | |
KR20170010826A (en) | Picture processing method and electronic device | |
WO2021186672A1 (en) | Image processing method | |
CN112698775A (en) | Image display method and device and electronic equipment | |
CN105611108A (en) | Information processing method and electronic equipment | |
CN105653194A (en) | Method and device for deleting pictures or files | |
CN106873882B (en) | File selection method, file selection device and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |