The present application claims the priority based on Japanese Patent Application No. 2004-217598 filed on Jul. 26, 2004, the disclosure of which is hereby incorporated herein by reference in its entirety.
1. Field of the Invention
This invention relates to technique for detecting a defect of an object under inspection by means of area segmenting of an image.
2. Description of the Related Art
Printed circuit boards used in production of electronic circuitry are provided with through-holes for connectivity among layers and for mounting of components. Anomaly in position or shape of the through-holes, or anomaly such as blockage of the through-holes, may cause electrical continuity failure and failure to properly mount components. To detect such anomaly or defect potentially occurring in the through-holes, various inspection devices such as an apparatus disclosed in JP08-191185A are proposed.
However, when detecting a defect in the through-holes with some kind of inspection devices, it is necessary to extract characteristic quantities such as planar dimension and circumferential length for each of the individual through-holes provided in the printed circuit board. As a result, the processing volume entailed in the inspection process increases with increase of number of the through-holes provided in the printed circuit board. Although this problem is particularly notable in defect detection of the through-holes with some kind of inspection devices, it is a problem common to defect detection of objects subject to the inspection in general.
An object of the present invention is to prevent increase in defect detection processing volume due to the shape of an object subject to the defect detection.
According to an aspect of the present invention, a method of detecting a defect relating to a specific region among a plurality of color regions, using a color image of an object under inspection having the plurality of color regions is provided. The method comprises the steps of: (a) performing segmentation of the color image into areas according to colors; (b) obtaining an inspection image representing a shape of the specific region from a result of the segmentation; and (c) detecting a defect relating to the specific region by comparing the inspection image with a comparison image, the comparison image being comparable at least in part with the inspection image.
In this arrangement, defects relating to the specific region can be detected by means of comparing the inspection image generated by area segmentation of the color image with the comparison image. In consequence, the processing volume entailed in detecting a defect may be reduced, even in instances where the object subject to the defect detection has a complex shape.
The present invention may be realized in various aspects, for example, a method and a device for obtaining position of surface region on an object, an inspection method and device employing that obtained result, a computer program for realizing the functions of these kinds of methods or devices, a recording medium on which that computer program is recorded, data signals embodied within carrier waves including that computer program, and the like.
These and other objects, features, aspects, and advantages of the present invention will become more apparent from the following detailed description of the preferred embodiments with the accompanying drawings.
Embodiments of the present invention will now be described in the following sequence.
The computer 40 has the functions of an image acquisition unit 210, an area segmentation unit 220, a specific area extraction unit 230, a comparison image obtaining unit 240, and a comparative evaluation unit 250. The functions of these units are realized through execution of a computer program stored on the external storage device 50 by the computer 40.
In the image of the defect-free printed circuit board PCB captured by the imaging unit 30 (
At Step S200, the area segmentation unit 220 (
Foreign matter (gold) exists at the center of the through-hole TH2. Thus, a gold area GL appears at the center of the black area BK representing the through-hole TH2. The hole diameter of the through-hole TH3 is smaller than normal, so the black area BK representing the through-hole TH3 is smaller than the black area BK representing the defect-free through-hole TH1. For the through-hole TH4, since the hole is obstructed by gold (termed “hole blockage”), the through-hole TH4 is represented as a gold area GLa slightly darker than the surrounding gold area GL. For the through-hole TH5, since the hole is partially covered by the resist (termed “resist coverage”), the black area BK representing the through-hole TH5 is of semi-circular shape in the part thereof not covered over by the resist. The diameter of the through-hole TH6 is larger than normal, so the black area BK representing the through-hole TH6 is larger than the black area BK representing the through-hole TH1. The through-hole TH7 has a defect whereby the hole shape has flattened deformation. Thus, the black area BK representing the through-hole TH7 differs in shape from the black area BK representing the through-hole TH1.
By means of the area segmentation carried out at step S200 (
At step S300 of
At step S400, the comparison image obtaining unit 240 (
The comparison image may be generated by means of a procedure similar to steps from S100 to S300 described above. Specifically, a color image of a defect-free printed circuit board PCB (
The comparison image is generated by extracting the black areas BK representing the through-holes of the printed circuit board PCB from the segmentation result SRM.
In the first embodiment, the comparison image is generated from an image of a defect-free printed circuit board. It is also possible to obtain the comparison image by some other method. For example, a comparison image is also possible to obtain by acquiring images of a plurality of printed circuit boards and generating a comparison image on the basis of the cumulative frequency of appearance of black color representing the through-holes. It is also possible to obtain a comparison image in accordance with the information on through-hole location and through-hole size contained in the design data (CAD data) used for forming the through-holes.
At step S500 of
When performing the operation of exclusive-OR between the inspection image TI1 and the comparison image MI1, a process for correcting displacement of the two images TI1, MI1 may be carried out. This correction may be carried out by shifting at least one of the two images TI1, MI1 in order to acquire a relative shift amount that minimizes the displacement of the two images TI1, MI1 (the process is also called as a “shaking process”), and correcting the displacement in accordance with the acquired shift amount. In this case, the level of relative shift for minimizing the displacement of the two images TI1, MI1 may be set to the relative shift amount at which the number of black pixels in the comparison result image RI1 is smallest, for example.
At step S600 of
The following criteria may be employed in determining whether a defect exists in a through-hole.
(1) In the event that the planar dimension of a defect in an individual inspection area exceeds a criterion dimension of defect, it is determined that the corresponding through-hole has a defect.
(2) A weighted planar dimension of which weight is set according to defect location in the inspection area is employable as the planar dimension of the defect of criterion (1) above. It is preferable to assign the grater weight for the center portion of an inspection area, which is highly affected by a defect, than the weight assigned for the peripheral portion of the same inspection area.
(3) In the event that a defect is a hole diameter anomaly as with through-holes TH3, TH6 (
(4) In the event that a defect is deformation as with through-hole TH7 (
In the first embodiment, the aforementioned criterion (1) is used, but any one or more criteria selected from criteria (1)˜(4) may be used for the determination. It is also possible to use determination criteria other than these as well.
As shown in
In this way, according to the first embodiment, it is possible to detect a defect relating to a through-hole by comparing a comparison image with an inspection image generated by area segmentation of a color image.
In the first embodiment, inspection areas are established for individual through-holes. It is also acceptable to establish a inspection area that includes areas corresponding to a plurality of through-holes. Alternatively, the total planar dimension of defects appearing in the comparison result image RI1 may be evaluated for the inspection, without establishing an inspection area. However, the approach of establishing inspection areas for individual through-holes is preferred for its greater accuracy in detection of a through-hole defect.
The through-holes TH3, TH6 displace to the left from their proper location. The through-hole TH3 of which left edge contacts the brown area BR (board base region RSB) and the through-hole TH6 of which left edge contacts the green area GD (base resist region RBR) are in the state of land breakout. The through-holes TH4, TH7 experience the blockage due to being obstructed by gold or copper. Thus, the through-hole TH4 is represented as a gold area GLa slightly darker than the surrounding gold area GL, and the through-hole TH7 is represented as a green area GBa slightly darker than the surrounding green area GB.
By carrying out area segmentation at step S200 (
At step S300 of
At step S410 of
At step S420, the comparison image obtaining unit 240 extracts circular areas from each of the three comparison images MI2a˜MI2c. In
The “circular area” herein refers to an area whose contour is enclosed by a circle, and differing from a true circle by no more than a predetermined tolerance range. In the second embodiment, the circular area is an area having a predetermined relationship of maximum diameter R to circumferential length l (e.g. 2.8≦l/R≦3.4), extracted from non-hatched areas of the comparison images MI2a˜MI2c. The extraction of circular areas is also able to carry out by some other method. In this case, circular areas may be extracted on the basis of non-hatched area circumferential length, center of mass, radius, aspect ratio, planar dimension, circularity, and so on.
At step S610, circular areas extracted from the three comparison images MI2a˜MI2c in this way are compared to the through holes extracted from the inspection image TI2, to determine whether a defect exists. Specifically, in the event that a circular area corresponding to a through-hole exists in the comparison image, it is determined that that through-hole is free of defects. On the other hand, if a circular area corresponding to a through-hole does not exist, it is determined that that there is a defect in the through-hole. In the example of
The comparison of through-holes extracted from the inspection image T12 and circular areas in the comparison images MI2a˜MI2c may be carried out by comparing respective locations. If the distance between a circular area and an area representing a through-hole does not exceed a predetermined distance criterion (e.g. 5 pixels), it is determined that the circular area corresponds with the through-hole. It is also possible to carry out the comparison by some other method. For example, it is possible to generate an image representing circular areas extracted from the comparison images MI2a˜MI2c, and the through-holes compared with the circular areas by means of performing a logic operation on this image and the inspection image. In this case, by performing the AND operation of the inspection image TI2 and an image having a 0 only for the inside of the circular area in the comparison images MI2a, there can be obtained an image in which the area representing the through-hole TH5 of the inspection image T12 is replaced by white color (0). By performing successive AND operations on the image thus obtained and images having a 0 only for the inside of circular area in the comparison images MI2b and MI2c, an image as shown in
In this way, in the second embodiment as well, it is possible to detect through-hole defects by means of comparing a comparison image with an inspection image generated by segmentation of a color image.
In the second embodiment, the comparison image obtaining unit 240 designates the shape of the areas extracted from the segmentation result SR2 as the shape of a normal through-hole, i.e., circular, some other shape may be designated as the shape for extraction from the segmentation result. Generally, the shape of the area for extraction may be the shape of a specific region represented in the inspection image.
The present invention is not limited to the aforementioned embodiments and working examples, and may be reduced to practice in various other modes without departing from the scope and spirit thereof, such as the following modifications, for example.
The two defect detection procedures described in the first embodiment and the second embodiment need not be executed independently. It is acceptable to execute either of the two defect detection procedures. In this case, it is acceptable, for example, to use the defect detection procedure of the second embodiment to detect defects that is not detected with the defect detection procedure of the first embodiment. Conversely, it is also acceptable to use the defect detection procedure of the first embodiment to detect defects that is not detected with the defect detection procedure of the second embodiment. In preferred practice, the two defect detection procedures are combined in order to increase the accuracy of defect detection.
Application of the defect detection technique of the present invention is not limited for inspection of a through-hole in printed circuit board. It is also possible to apply the defect detection technique of the present invention to detection of a defect relating to a specific region of any object, when the specific region subject to the defect detection is represented by a particular color area in an image. For example, the technique is applicable for detection of a defect such as a defect in shape of mechanical parts and a defect in letters printed on an object.
In the first embodiment, as shown in
Although the present invention has been described and illustrated in detail, it is clearly understood that the same is by way of illustration and example only and is not to be taken by way of limitation, the spirit and scope of the present invention being limited only by the terms of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
2004-217598 | Jul 2004 | JP | national |