Image processing apparatus, inspection apparatus, image processing method, and computer-readable program

The image processing device addresses show-through issues in printed circuit board inspection by extracting a region of interest based on pixel values, enhancing defect detection accuracy and reducing false alarms.

JP2026011636APending Publication Date: 2026-01-23SCREEN HOLDINGS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024112408
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing methods for inspecting printed circuit boards fail to accurately detect defects due to show-through phenomena in thinner substrates, leading to frequent false alarms.

Method used

An image processing device that extracts a region of interest by determining specific pixel values in a histogram, excluding edge-identified areas, and assigning constant values to remaining regions, effectively removing show-through areas.

Benefits of technology

Accurately removes show-through regions, reducing false alarms and enabling stable defect detection in printed circuit boards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026011636000001_ABST
    Figure 2026011636000001_ABST
Patent Text Reader

Abstract

To appropriately remove a show-through area in a captured image.SOLUTION: An image storage part 46 of an image processor stores a picked-up image 61 including a show-through area where a pattern part of a second surface is shown through to an area of a background part of a first surface of a printed circuit board. In the histogram of the pixel values, a representative value of the show-through region is larger than a representative value of a background region obtained by excluding the show-through region from the region of the background portion, and is smaller than a representative value of the pattern region. The region extraction unit 42 determines a pixel value larger than the representative value of the show-through region and smaller than the representative value of the pattern region as a threshold value, thereby extracting a region of interest including the background region and the show-through region in the captured image. In the processed image acquisition section 44, a processed image is acquired by excluding the region specified by the edge detection for the region of interest from the region of interest and allocating a certain pixel value equal to or less than the threshold value to the remaining region of the region of interest in the captured image.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to image processing techniques and the inspection of printed circuit boards. [Background technology]

[0002] Various methods have been proposed for inspecting printed circuit board patterns. For example, a method of comparing a captured image of a printed circuit board acquired using an imaging element such as a CCD sensor with a master image representing a defect-free (good) printed circuit board is an effective method regardless of the shape of the pattern. One example of a master image is generated by converting the design data (CAD data) of the printed circuit board into an image. Since the captured image is a multi-level image, while the master image is typically a binary image, it is conceivable to binarize the captured data and compare it with the master image. However, this method fails to detect minute defects and reduces defect detection performance. Therefore, in the inspection disclosed in Patent Document 1, representative pixel values ​​of the background and pattern areas of the printed circuit board are identified from a histogram of pixel values ​​in the captured image, and these representative pixel values ​​are assigned to the corresponding areas of the master image (simple multi-level thresholding). Furthermore, a spatial smoothing process using the variance calculated from the histogram is applied to the master image, generating a multi-level master image that approximates the captured image. Then, by comparing the multi-level captured image with the multi-level master image, highly accurate defect detection is possible.

[0003] Patent Document 2 also discloses a method for creating reference data used in visual inspection of printed circuit boards using CAD data. Patent Document 3 discloses a method for setting an optimal binarization threshold based on a change-point histogram that expresses the distribution of the number of change points, defined as the number of times that a value increases or decreases beyond a predetermined threshold, relative to the threshold. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2000-199709 [Patent Document 2] Japanese Patent Application Laid-Open No. 2005-164277 [Patent Document 3] Japanese Patent Application Publication No. 6-86073 Summary of the Invention [Problem to be solved by the invention]

[0005] Incidentally, the method of Patent Document 1 is premised on the premise that the histogram of pixel values ​​of the captured image is bimodal for the pattern portion and the background portion. The binary master image obtained from CAD distinguishes between the background portion and the pattern portion, and as described above, in the multi-value processing of the master image, a representative pixel value obtained from the captured image is assigned to each region. In the histogram of the captured image, pixels outside the bimodal portion (i.e., two mountain-shaped portions, hereinafter each mountain-shaped portion will also be referred to as a "peak") are considered to be defects or the boundary between the background portion and the pattern portion.

[0006] In recent years, there has been a trend toward thinner substrates for printed circuit boards. In particular, the thickness of the substrate for flexible circuit boards is approximately the same as that of paper. When an image is captured by irradiating the first surface of such a board with illumination light, show-through occurs in the captured image. Show-through is a phenomenon in which the pattern on the second surface (back surface) of the board is shown in the captured image. In the histogram of pixel values ​​of the captured image, the peak of the show-through region exists between the peak of the background other than the show-through region and the peak of the pattern region, resulting in a multi-peaked shape. When such a captured image is compared with a master image that does not contain the show-through region for inspection, the show-through region is detected as a defect, resulting in frequent false alarms (i.e., erroneous detection of defects). Therefore, a method for appropriately removing the show-through region from the captured image is needed.

[0007] The present invention has been made in consideration of the above-mentioned problems, and has as its object to appropriately remove show-through areas in a captured image. [Means for solving the problem]

[0008] A first aspect of the present invention is an image processing device comprising: a memory unit that stores a captured image which is a multi-value image showing a pattern portion and a background portion on a first surface of a printed circuit board, the image including a show-through area where the pattern portion on a second surface of the printed circuit board shows through in the background portion area; a region extraction unit that extracts a region of interest including the background region and the show-through area in the captured image by determining a pixel value that is greater than the representative value of the pixel values ​​of the background region obtained by excluding the show-through area from the background portion area and is smaller than the representative value of the pixel values ​​of the pattern region showing the pattern portion as a threshold value, and a processed image acquisition unit that acquires a processed image by excluding an area identified by edge detection for the region of interest from the region of interest in the captured image and assigning a constant pixel value that is less than the threshold value to the remaining region of the region of interest in the captured image.

[0009] A second aspect of the present invention is an image processing device of the first aspect, wherein in the histogram, a specific pixel value at which the class separation degree is maximum is greater than the representative value of the show-through area and smaller than the representative value of the pattern area, and the area extraction unit determines as the threshold the pixel value between the specific pixel value and the representative value of the show-through area at which the class separation degree is closest to a predetermined value that is greater than or equal to 95% and less than 100% of the maximum value.

[0010] Aspect 3 of the present invention is an image processing device of aspect 1 (which may be aspect 1 or 2), wherein in the histogram, a specific pixel value at which the class separation degree is maximum is greater than the representative value of the back-light area and smaller than the representative value of the pattern area, and the area extraction unit determines, as another threshold value, a pixel value between the specific pixel value and the representative value of the pattern area that is closest to a predetermined value at which the class separation degree is greater than or equal to 95% and less than 100% of the maximum value, thereby extracting another area of ​​interest including the pattern area in the captured image, and the processed image acquisition unit acquires the processed image by assigning a certain pixel value greater than or equal to the other threshold value to the other area of ​​interest.

[0011] A fourth aspect of the present invention is an inspection device for inspecting printed circuit boards, comprising an image processing device according to any one of aspects 1 to 3, and a defect detection unit that detects defects in the printed circuit board by comparing the processed image acquired by the image processing device with a predetermined reference image.

[0012] A fifth aspect of the present invention is an inspection device according to the fourth aspect, wherein the image processing device further includes a reference image generation unit that generates the reference image by assigning pixel values ​​that are the same as or similar to the pixel values ​​of the region of interest in the processed image to a region representing the background in an image generated from the design data of the printed circuit board.

[0013] A sixth aspect of the present invention is an image processing method comprising the steps of: preparing a captured image which is a multi-value image showing a pattern portion and a background portion on a first surface of a printed circuit board, the image including a show-through area in which the pattern portion on the second surface of the printed circuit board shows through in the background portion area; extracting a region of interest in the captured image which includes the background area and the show-through area by determining a pixel value as a threshold value such that, in a histogram of pixel values ​​of the captured image, a representative value of the pixel values ​​of the show-through area is greater than the representative value of the pixel values ​​of the background area obtained by excluding the show-through area from the background portion area and is smaller than the representative value of the pixel values ​​of the pattern area showing the pattern portion; and obtaining a processed image by excluding an area identified by edge detection for the region of interest from the region of interest and assigning a constant pixel value less than the threshold value to the remaining region of the region of interest in the captured image.

[0014] A seventh aspect of the present invention is a computer-readable program that causes a computer to perform image processing, and computer execution of the program causes the computer to perform the following steps: prepare a captured image that is a multi-value image showing a pattern portion and background portion of a first surface of a printed circuit board, and includes a show-through area in which the pattern portion of the second surface of the printed circuit board shows through in the background area; extract a region of interest in the captured image that includes the background area and the show-through area by determining a pixel value as a threshold value such that, in a histogram of pixel values ​​of the captured image, a representative value of the pixel values ​​of the show-through area is greater than the representative value of the pixel values ​​of the background area obtained by excluding the show-through area from the background area, and is smaller than the representative value of the pixel values ​​of the pattern area showing the pattern portion; and obtain a processed image by excluding from the region of interest an area identified by edge detection for the region of interest, and assigning a constant pixel value that is less than the threshold value to the remaining region of the region of interest in the captured image. [Effects of the Invention]

[0015] According to the present invention, it is possible to appropriately remove show-through areas in a captured image. [Brief explanation of the drawings]

[0016] [Figure 1] FIG. 1 is a diagram illustrating a configuration of an inspection device. [Figure 2] FIG. 1 illustrates the configuration of a computer. [Figure 3] FIG. 2 is a block diagram showing a functional configuration realized by a computer. [Figure 4] FIG. 10 is a diagram showing a process flow for inspecting a printed circuit board. [Figure 5] FIG. [Figure 6] FIG. 10 is a diagram showing a histogram of pixel values ​​of a captured image. [Figure 7] 10A and 10B are diagrams illustrating a histogram of pixel values ​​of a captured image and a class separation degree. [Figure 8] FIG. 10 shows a processed image. [Figure 9] FIG. 2 is a diagram showing a reference image. [Figure 10] FIG. [Figure 11] FIG. 10 is a diagram showing a histogram of pixel values ​​of a captured image. [Figure 12] FIG. 10 shows a processed image. DETAILED DESCRIPTION OF THE INVENTION

[0017] FIG. 1 is a diagram showing the configuration of an inspection device 1 according to one embodiment of the present invention. The inspection device 1 is a device for inspecting the appearance of a printed circuit board 9. The printed circuit board 9 is a substrate made of resin, on the surface of which a wiring pattern or the like is formed using a conductive material such as copper. The printed circuit board 9 in this processing example is, for example, a flexible substrate, and the substrate is in the form of a film. Furthermore, patterns such as wiring patterns are formed on both sides of the substrate. The printed circuit board 9 may be a substrate other than a flexible substrate.

[0018] The inspection apparatus 1 includes an apparatus main body 2 and a computer 3. The computer 3 controls the overall operation of the inspection apparatus 1 and also realizes an image processing unit, etc., which will be described later. The apparatus main body 2 includes an imaging device 21, a stage 22, and a stage driving unit 23. The imaging device 21 captures an image of the printed circuit board 9 to acquire (data of) a multi-valued captured image. The imaging device 21 includes an illumination unit 211, an optical system 212, and an imaging unit 213. The illumination unit 211 emits illumination light. The optical system 212 guides the illumination light to the printed circuit board 9 and guides light from the printed circuit board 9 to the imaging unit 213. The imaging unit 213 converts the image of the printed circuit board 9 formed by the optical system 212 into an electrical signal. The stage 22 holds the printed circuit board 9. The stage driving unit 23 moves the stage 22 relatively to the imaging device 21. The stage driving unit 23 is composed of a ball screw, a guide rail, a motor, etc. The computer 3 controls the stage driving unit 23 and the imaging device 21 so that an image of a predetermined area of ​​the printed circuit board 9 is captured.

[0019] FIG. 2 shows the configuration of the computer 3. The computer 3 has a typical computer system configuration including a CPU 31, a ROM 32, a RAM 33, a storage device 34, a display unit (display) 35, an input unit 36, a reading device 37, a communication unit 38, a GPU 39, and a bus 30. The CPU 31 performs various arithmetic operations. The GPU 39 performs various arithmetic operations related to image processing and the like. The ROM 32 stores basic programs. The RAM 33 and the storage device 34 store various types of information. The display unit 35 displays various types of information such as images. The input unit 36 ​​includes a keyboard 36a and a mouse 36b for receiving input from an operator. The reading device 37 reads information from a computer-readable recording medium M1 such as an optical disk, a magnetic disk, a magneto-optical disk, or a memory card. The communication unit 38 transmits and receives signals to and from the device main body 2 and the like. The bus 30 is a signal circuit that connects the CPU 31, the GPU 39, the ROM 32, the RAM 33, the storage device 34, the display unit 35, the input unit 36, the reading device 37, and the communication unit 38. The computer 3 may be provided with a touch panel, and the input unit 36 ​​and the display unit 35 may be realized by the touch panel.

[0020] In the computer 3, the program 340 is read in advance from the recording medium M1 via the reading device 37 and stored in the storage device 34. The program 340 may be stored in the storage device 34 via a network. The CPU 31 and the GPU 39 execute arithmetic processing using the RAM 33 and the storage device 34 in accordance with the program 340. The CPU 31 and the GPU 39 function as a calculation unit in the computer 3. Other components that function as a calculation unit may be employed in addition to the CPU 31 and the GPU 39.

[0021] FIG. 3 is a block diagram showing the functional configuration realized by the computer 3. In the inspection apparatus 1, the computer 3 executes arithmetic processing and the like in accordance with a program 340, thereby realizing an image processing unit 41 and a defect detection unit 48. That is, the CPU 31, GPU 39, ROM 32, RAM 33, storage device 34, and the like of the computer 3 realize the image processing unit 41 and the defect detection unit 48. The image processing unit 41 is an image processing device and includes an area extraction unit 42, a processed image acquisition unit 44, a reference image generation unit 45, and an image storage unit 46. Details of the functions realized by these components will be described later. All or part of the image processing unit 41 and the defect detection unit 48 may be realized by dedicated electrical circuits, or each function may be realized by a separate program. Furthermore, the image processing unit 41 and the defect detection unit 48 may be realized by multiple computers.

[0022] FIG. 4 is a diagram showing the flow of processing in which the inspection device 1 inspects the printed circuit board 9. In this processing example, the processing of step S12a in FIG. 4 is not executed. In inspecting the printed circuit board 9, first, the printed circuit board 9 to be inspected is placed on the stage 22 in FIG. 1, and a multi-valued captured image is acquired by the imaging device 21. The captured image is output to the computer 3 and stored and prepared in the image storage unit 46 (step S11). In FIG. 3, the captured image stored in the image storage unit 46 is denoted by the reference symbol 61.

[0023] FIG. 5 is a diagram illustrating a portion of a captured image 61. When capturing the captured image 61, one surface of the printed circuit board 9, the first surface, faces the imaging device 21, and the other surface, the second surface, contacts the stage 22. As described above, patterns are formed on both surfaces of the printed circuit board 9. That is, the first surface has a pattern portion and a background portion other than the pattern portion, and the second surface also has a pattern portion and a background portion. As shown in FIG. 5, the captured image 61 includes a pattern region 66 representing the pattern portion of the first surface and a background region. The background region also includes a show-through region 68 where the pattern portion of the second surface shows through, and a background region 67 which is the remaining region of the background region excluding the show-through region 68. The show-through region 68 is formed, for example, by illumination light transmitted through the substrate being reflected by the pattern portion on the second surface (the surface of the pattern portion that contacts the substrate), and has a substantially constant brightness. In a typical captured image 61 , the show-through area 68 is slightly lighter than the background area 67 and darker than the pattern area 66 .

[0024] FIG. 6 is a diagram showing a histogram of pixel values ​​of a captured image 61. In the captured image 61, the brightness of most of the pattern region 66 is saturated, and the pixel values ​​of most of the pixels in the pattern region 66 are the maximum value in the gradation range of the captured image 61. The histogram in FIG. 6 includes a peak P2 in the background region 67, a peak P3 in the show-through region 68, and a peak P1 in the pattern region 66. The pixel value approximately at the center of peak P2 is approximate to a representative value in the distribution of pixel values ​​of the pixels included in the background region 67 (hereinafter simply referred to as the "representative value of the background region 67"; the same applies to the show-through region 68 and the pattern region 66). The representative value is a value that indicates approximately the center of the distribution, such as the average, median, or mode. The pixel value approximately at the center of peak P3 is approximate to the representative value of the show-through region 68, and the pixel value approximately at the center of peak P1 is approximate to the representative value of the pattern region 66. In the histogram of the captured image 61 , the representative value of the show-through region 68 is slightly larger than the representative value of the background region 67 and is smaller than the representative value of the pattern region 66 .

[0025] Note that the inspection device 1 does not identify the pattern region 66, background region 67, and show-through region 68 of the captured image 61, nor calculate the representative value of each of the regions 66 to 68. However, it can be said that the above relationship is satisfied for the representative values ​​of the regions 66 to 68, based on the structure of the printed circuit board 9, the imaging conditions, and the like. The same applies to the relationship between the specific pixel value and the representative value of each of the regions 66 to 68, which will be described later. The magnitude relationship of the pixel values ​​in this specification is for convenience's sake. For example, in a captured image in which the representative value of the pattern region 66 is smaller than the representative value of the background region 67, it can be said that the above relationship is satisfied if, in an image in which the gradation is inverted, the representative value of the show-through region 68 is larger than the representative value of the background region 67 and smaller than the representative value of the pattern region 66. The same applies hereinafter.

[0026] The region extraction unit 42 calculates the class separation degree for each pixel value in the histogram using discriminant analysis (Otsu's binarization). The class separation degree is calculated using the intra-class variance and the inter-class variance. FIG. 7 shows a histogram of pixel values ​​of the captured image 61 and the class separation degree. In FIG. 7, the histogram of pixel values ​​is indicated by a dashed line L1, and the class separation degree is indicated by a solid line L2. The lower part of FIG. 7 shows the histogram and class separation degree for the entire pixel value range. The upper part shows the class separation degree for a portion of the pixel value range, with the scale of the vertical axis (class separation degree) enlarged. When the class separation degree is calculated for the entire pixel value range, the pixel value V1 at which the class separation degree reaches the maximum value D1 is identified as the specific pixel value V1. Typically, in the histogram, the specific pixel value is greater than the representative value of the show-through region 68 and less than the representative value of the pattern region 66.

[0027] Once the specific pixel value V1 is acquired, a value is calculated by dividing the class separability by the class separability at the specific pixel value V1 for each pixel value from the specific pixel value V1 toward the peak P3 of the show-through area 68 (i.e., a value obtained by dividing the class separability for each pixel value by the maximum class separability value D1, hereinafter referred to as the "relative value of class separability"). Then, the pixel value V2 whose relative value of class separability is closest to a predetermined value less than 100% is determined as the threshold. The predetermined value is, for example, 95% or more, preferably 97% or more, and more preferably 98% or more. The predetermined value is, for example, 99.8% or less, preferably 99.5% or less. In this processing example, the predetermined value is 99.0%, and in the example of FIG. 7, the value obtained by dividing the class separability D2 at the pixel value V2 by the maximum class separability value D1 approximates 99.0%.

[0028] Thereafter, a set of pixels in the captured image 61 whose pixel values ​​are equal to or less than a threshold value (pixel value V2) is extracted as a region of interest (step S12). The threshold pixel value V2 is typically located between the specific pixel value V1 and a representative value of the show-through region 68 (a pixel value approximately at the center of peak P3 of the show-through region 68). Therefore, the region of interest includes the background region 67 and most of the show-through region 68.

[0029] Here, the relationship between the region extracted using a threshold and the threshold will be described. A specific pixel value V1, which maximizes the degree of class separation, is generally used as a binarization threshold. In a bimodal histogram, the degree of class separation is generally high between the bases (inner bases) of the two peaks. When a pixel value other than the specific pixel value V1 but with a high degree of class separation is used as a threshold, the region extraction results (class separation results) do not differ significantly compared to when the specific pixel value V1 is used as a threshold. In other words, as long as a pixel value with a low degree of class separation is not used as a threshold, region extraction with a certain degree of accuracy is possible. Furthermore, many of the pixels in the defective region indicating a defect in the captured image 61 have pixel values ​​at or near the peak P3 of the show-through region 68. By using a pixel value V2, which is shifted from the specific pixel value V1 toward the representative value of the show-through region 68, as a threshold, it is possible to reduce the number of defective regions included in the region of interest. As a result, as will be described later, the amount of calculation required to identify defect candidate regions in the region of interest can be reduced. Depending on the design of the inspection device 1, the specific pixel value V1 may be used as the threshold value, or a pixel value between the specific pixel value V1 and the representative value of the pattern region 66 may be used as the threshold value.

[0030] Once the region of interest is extracted, the processed image acquisition unit 44 identifies a defect candidate region 69 (see FIG. 5 ) present within the region of interest. While the background region 67 and the show-through region 68 in the captured image 61 typically have uniform pixel values ​​(density), the defect region has texture characteristics in which pixel values ​​vary. Therefore, edge detection is used to identify the defect candidate region 69. In this processing example, an edge filter is applied to the region of interest in the captured image 61, and an area surrounded by pixels whose edge strength is greater than a predetermined threshold is identified as the defect candidate region 69. The defect candidate region 69 is excluded from the region of interest. The threshold is slightly greater than the edge strength at the boundary between the show-through region 68 and the background region 67, and the boundary is not detected as a pixel identifying the defect candidate region 69. Various other edge detection methods may also be used to identify the defect candidate region 69. For example, a method using a co-occurrence matrix or a method using HOG (Histogram of Oriented Gradients) may be used.

[0031] Thereafter, a processed image is generated by assigning a constant pixel value to the remaining area of ​​the region of interest in the captured image 61 (i.e., the region of interest after the defect candidate region 69 has been excluded, hereinafter referred to as the "region of interest after exclusion") (step S13). The constant pixel value is, for example, a representative value of the pixel values ​​of the region of interest after exclusion in the captured image 61. Note that in the processed image, a "blending process" such as alpha blending may be performed on the boundary of the region of interest after exclusion to suppress abrupt changes in pixel values ​​near the boundary.

[0032] FIG. 8 is a diagram showing a portion of a processed image 62, which corresponds to the captured image 61 in FIG. 5. In the processed image 62, the variance of pixel values ​​included in the region of interest after exclusion (i.e., the background region 67 and the show-through region 68 after exclusion) is very small, and the entire region of interest after exclusion becomes a background region 67a. In addition, in a defect candidate region 69 excluded from the region of interest, the pixel values ​​of the captured image 61 are maintained as they are. Regions not extracted as regions of interest in step S12 (mainly the pattern region 66 and the defect candidate regions not included in the region of interest in step S12) also maintain the pixel values ​​of the captured image 61 as they are. In this way, the processed image acquisition unit 44 acquires a processed image 62 from which the show-through region 68 has been removed while maintaining the defect candidate region 69 that was included in the region of interest in step S12 (the defect candidate region 69 whose pixel values ​​are close to those of the background region 67 or the show-through region 68).

[0033] The reference image generation unit 45 reads out a master image 71 from the image storage unit 46. The master image 71 is a binary image generated from design data (CAD data) of a printed circuit board, and is stored in advance in the image storage unit 46. In the master image 71, for example, one value is assigned to each pixel included in a pattern area, and another value is assigned to each pixel included in a background area (area indicating the background). The master image 71 does not include a show-through area.

[0034] Next, for example, the pixel value of the region of interest after exclusion in the processed image 62 (i.e., the representative value of the pixel values ​​of the region of interest after exclusion in the captured image 61) is assigned to each pixel in the background region of the master image 71. Furthermore, for example, the mode value of peak P1 in the pattern region 66 is assigned to each pixel in the pattern region as a pixel value. The pixel value of the pattern region may be a representative value of the pixel values ​​of pixels other than the region of interest in the captured image 61. As a result, as shown in FIG. 9, a reference image 72 obtained by multi-value processing of the master image 71 is generated (step S14). The reference image 72 in FIG. 9 corresponds to the processed image 62 in FIG. 8. The reference image 72 may be subjected to spatial smoothing processing using variance values, as in JP 2000-199709 A (the above-mentioned Patent Document 1). Note that the pixel values ​​of the background region of the reference image 72 do not need to be identical to the pixel values ​​of the region of interest after exclusion in the processed image 62, and may be values ​​close to the pixel values ​​of the region of interest after exclusion depending on the threshold value, etc., used in the comparison test between the processed image 62 and the reference image 72 described below.

[0035] The defect detection unit 48 compares the processed image 62 with the reference image 72 (step S15). This detects defective areas contained in the captured image 61. Various known methods can be used to detect defective areas by comparative inspection of the processed image 62 with the reference image 72. This completes the inspection process of the printed circuit board 9 by the inspection device 1.

[0036] Incidentally, when a captured image 61 in FIG. 5 includes a show-through region 68, it is conceivable to generate a multi-valued reference image (master image) that reflects the show-through region 68 using information about the pattern portion of the second surface indicated by the CAD data. However, the extent of show-through and the pixel values ​​at that time vary depending on the properties of the substrate, the state of both the front and back surfaces (the first and second surfaces), the lighting conditions during imaging, and other factors, making it difficult to predict through simulation and to generate a multi-valued master image that takes show-through into account. Another possible approach is to binarize the captured image and compare it with the binary master image, but setting a threshold is difficult because the defect region in the background area where show-through occurs and the show-through region may have similar brightness.

[0037] 3 extracts a region of interest including a background region 67 and a show-through region 68 from the captured image 61 by determining, as a threshold, a pixel value in a histogram of pixel values ​​in the captured image 61 that is greater than the representative value of the show-through region 68 and smaller than the representative value of the pattern region 66. The processed image acquisition unit 44 also excludes regions identified by edge detection for the region of interest from the region of interest, and assigns a certain pixel value equal to or less than the threshold to the remaining region of the captured image 61, thereby acquiring a processed image 62. This allows the show-through region 68 to be appropriately removed from the captured image 61 while maintaining (while reproducing in the processed image 62) a defect candidate region 69 that is included in the background region 67 and the show-through region 68 and has pixel values ​​similar to those of these regions. In addition, the defect detection unit 48 can accurately and stably detect defects in the printed circuit board 9 while reducing false alarms by comparing the processed image 62 from which the show-through area 68 has been removed with the reference image 72.

[0038] Preferably, the region extraction unit 42 determines as the threshold a pixel value in the histogram that is closest to a predetermined value in which the degree of class separation is 95% or more and less than 100% of the maximum value between the specific pixel value at which the degree of class separation is maximum and the representative value of the show-through region 68. This makes it possible to reduce the number of defect candidate regions 69 included in the region of interest, and to reduce the calculations in the processed image acquisition unit 44 (processing related to identifying regions by edge detection and excluding those regions).

[0039] Note that since show-through depends on the pattern on the second surface, depending on the imaging area of ​​the printed circuit board 9, the captured image 61 may not include the show-through area 68, and the histogram may become bimodal. Even in this case, the inspection device 1 can obtain a processed image 62 by simply employing the process of FIG. 4 and detect defects in the printed circuit board 9. In other words, it is possible to inspect the printed circuit board 9 without being aware of the presence or absence of the show-through area 68 in the captured image 61.

[0040] Preferably, the reference image generating unit 45 of the inspection device 1 generates the reference image 72 by assigning pixel values ​​that are the same as or similar to the pixel values ​​of the region of interest in the processed image 62 to a region showing a background in an image (master image 71 in the above) generated from the design data of the printed circuit board 9. In this way, by setting pixel values ​​that match the processed image 62 for the background region of the reference image 72, it is possible to more reliably reduce false alarms.

[0041] Next, another processing example in which the inspection device 1 inspects the printed circuit board 9 will be described. In this processing example, the processing of step S12a in Fig. 4 is executed. First, a multi-valued captured image is acquired by the imaging device 21 and stored in the image storage unit 46 (step S11).

[0042] FIG. 10 is a diagram showing a portion of a captured image 61a, and FIG. 11 is a diagram showing a histogram of pixel values ​​of the captured image 61a. In the captured image 61a of FIG. 10, noise in a pattern region 66 is greater than that in a background region 67, and the width of a peak P1 in the pattern region 66 is wider in the histogram of FIG. 11. As in the above process, the region extraction unit 42 determines, as a threshold value, a pixel value V2 that is closest to a predetermined value whose relative value of the class separation is less than 100% between a specific pixel value V1 at which the class separation degree is maximized and a representative value of the show-through region 68 (approximately the center of peak P3), and extracts a region of interest (step S12). As will be described later, in this processing example, other regions of interest are also extracted, and therefore the region of interest extracted in step S12 will be referred to as a "first region of interest" hereinafter.

[0043] Furthermore, the region extraction unit 42 extracts another region of interest (hereinafter referred to as the "second region of interest") (step S12a). Specifically, in the pixel value range extending from the specific pixel value V1 toward the peak P1 of the pattern region 66, a pixel value V3 that is closest to a predetermined value where the relative value of the class separation degree is less than 100% is determined as the threshold value. The predetermined value is, for example, 95% or more, preferably 97% or more, and more preferably 98% or more. The predetermined value is, for example, 99.8% or less, preferably 99.5% or less. In this processing example, the predetermined value is 99.0%. Thereafter, a set of pixels in the captured image 61a whose pixel values ​​are equal to or greater than the threshold value (pixel value V3) is extracted as the second region of interest. The pixel value V3, which is the threshold value, is typically located between the specific pixel value V1 and the representative value of the pattern region 66 (the pixel value approximately at the center of the peak P1 of the pattern region 66). Therefore, the second region of interest includes most of the pattern region 66.

[0044] In the processed image acquisition unit 44, defect candidate regions 69 present in the first region of interest are identified and excluded from the first region of interest, similar to the above process. Then, in the captured image 61a, a certain pixel value is assigned to the excluded first region of interest, and another certain pixel value is assigned to the second region of interest, thereby generating a processed image 62a shown in FIG. 12 (step S13). The pixel value assigned to the second region of interest is, for example, a representative value of the pixel values ​​of the second region of interest in the captured image 61a. Note that defect candidate regions may be identified and excluded from the second region of interest by performing edge detection on the second region of interest in the same way as for the first region of interest.

[0045] The reference image generation unit 45 generates a reference image 72 by multi-value-processing the master image 71 (step S14). At this time, for example, the pixel value of the second region of interest in the processed image 62a (i.e., the representative value of the pixel values ​​of the second region of interest in the captured image 61a) is assigned to each pixel in the pattern region of the master image 71. In this processing example, only simple multi-value processing is performed to generate the reference image 72, but spatial smoothing processing may also be performed. Thereafter, the defect detection unit 48 compares the processed image 62a with the reference image 72 (step S15). As a result, defective regions included in the captured image 61a are detected.

[0046] As described above, the region extraction unit 42 of the inspection device 1 extracts another region of interest (the second region of interest in the above example) including the pattern region 66 from the captured image 61a by determining, as another threshold value, a pixel value whose class separation degree is closest to a predetermined value between the specific pixel value at which the class separation degree is maximum and the representative value of the pattern region 66, where the class separation degree is greater than or equal to 95% and less than 100% of the maximum value. The processed image acquisition unit 44 assigns a certain pixel value greater than or equal to the other threshold value to the other region of interest in the captured image 61a, thereby acquiring a processed image 62a. This makes it possible to remove the show-through region 68 and noise from the pattern region 66 while maintaining the defect candidate region in the captured image 61a (i.e., to eliminate the influence of the pattern portion on the second surface and the influence of the surface condition of the pattern portion on the first surface). As a result, a comparison inspection of the processed image 62a with the reference image 72 enables accurate and stable detection of defects in the printed circuit board 9.

[0047] The image processing device, image processing method, and inspection device 1 described above can be modified in various ways.

[0048] The threshold value for extracting the region of interest does not necessarily have to be determined based on the class separation degree, and may be determined based on a change point number histogram, as in JP-A-6-86073 (the above-mentioned Patent Document 3). In this way, the threshold value that is larger than the representative value of the show-through region 68 and smaller than the representative value of the pattern region 66 may be determined by various methods.

[0049] The processed images 62, 62a may be used for inspections other than the comparison inspection with the reference image 72. The processed images 62, 62a may also be used to generate a trained model for classifying defects, and to classify defects using the trained model. In this case, by using the processed images 62, 62a from which the show-through region 68 has been removed, it is possible to reduce misclassifications caused by the show-through region 68 and improve classification accuracy.

[0050] The configurations of the above-described embodiment and each modification may be combined as appropriate as long as they are not mutually contradictory. [Explanation of symbols]

[0051] 1. Inspection equipment 3. Computer 9 Printed Circuit Board 41 Image processing section 42 Region extraction part 44 Processed image acquisition unit 45 Reference image generation unit 46 Image storage unit 48 Defect detection section 61,61a Captured image 62,62a Processed image 66 Pattern Area 67,67a Background area 68 Show-through area 69 Defect candidate area 71 Master Image 72 Reference Images 340 Programs S11~S15, S12a steps

Claims

1. An image processing device, a storage unit that stores a captured image that is a multi-valued image showing a pattern portion and a background portion of a first surface of a printed circuit board, the captured image including a show-through area where the pattern portion of a second surface of the printed circuit board shows through in an area of ​​the background portion; a region extraction unit that extracts a region of interest including the background region and the show-through region from the captured image by determining, as a threshold value, a pixel value that is greater than the representative value of the pixel values ​​of the show-through region and smaller than the representative value of the pixel values ​​of the pattern region that indicates the pattern portion, in a histogram of pixel values ​​of the captured image, the representative value of the pixel values ​​of the show-through region being greater than the representative value of the pixel values ​​of the background region obtained by excluding the show-through region from the region of the background portion, and smaller than the representative value of the pixel values ​​of the pattern region that indicates the pattern portion; a processed image acquisition unit that acquires a processed image by excluding an area identified by edge detection for the area of ​​interest from the area of ​​interest and assigning a constant pixel value equal to or less than the threshold value to the remaining area of ​​the area of ​​interest in the captured image; An image processing device comprising:

2. 2. The image processing device according to claim 1, In the histogram, a specific pixel value at which the degree of class separation is maximum is larger than the representative value of the show-through region and smaller than the representative value of the pattern region, An image processing device in which the area extraction unit determines as the threshold the pixel value between the specific pixel value and the representative value of the back-lighting area, where the class separation degree is closest to a predetermined value that is 95% or more and less than 100% of the maximum value.

3. 2. The image processing device according to claim 1, In the histogram, a specific pixel value at which the degree of class separation is maximum is larger than the representative value of the show-through region and smaller than the representative value of the pattern region, the region extraction unit determines, as another threshold value, a pixel value that is between the specific pixel value and the representative value of the pattern region and that most closely approximates a predetermined value that makes the degree of class separation equal to or greater than 95% and less than 100% of the maximum value, thereby extracting another region of interest including the pattern region in the captured image; The image processing device wherein the processed image acquisition unit acquires the processed image by assigning a certain pixel value equal to or greater than the other threshold value to the other region of interest.

4. An inspection device for inspecting printed circuit boards, An image processing device according to any one of claims 1 to 3; a defect detection unit that detects defects in the printed circuit board by comparing the processed image acquired by the image processing device with a predetermined reference image; An inspection device comprising:

5. The inspection device according to claim 4, The inspection device further includes a reference image generation unit configured to generate the reference image by assigning pixel values ​​that are the same as or similar to the pixel values ​​of the region of interest in the processed image to a region representing the background in an image generated from design data of the printed circuit board.

6. 1. An image processing method, comprising: preparing a captured image that is a multi-valued image showing a pattern portion and a background portion of a first surface of a printed circuit board, the captured image including a show-through region in which the pattern portion of a second surface of the printed circuit board shows through in a region of the background portion; a step of extracting a region of interest including the background region and the show-through region from the captured image by determining, as a threshold value, a pixel value in a histogram of pixel values ​​of the captured image that is greater than a representative value of pixel values ​​of the background region obtained by excluding the show-through region from the region of the background portion and smaller than a representative value of pixel values ​​of a pattern region indicating the pattern portion, the pixel value being greater than the representative value of the show-through region and smaller than the representative value of the pattern region; a step of excluding an area identified by edge detection from the area of ​​interest and assigning a constant pixel value equal to or less than the threshold to the remaining area of ​​the captured image in the area of ​​interest to obtain a processed image; An image processing method comprising:

7. A computer-readable program that causes a computer to perform image processing, wherein the execution of the program by the computer includes the steps of: preparing a captured image that is a multi-valued image showing a pattern portion and a background portion of a first surface of a printed circuit board, the captured image including a show-through region in which the pattern portion of a second surface of the printed circuit board shows through in a region of the background portion; a step of extracting a region of interest including the background region and the show-through region from the captured image by determining, as a threshold value, a pixel value in a histogram of pixel values ​​of the captured image that is greater than a representative value of pixel values ​​of the background region obtained by excluding the show-through region from the region of the background portion and smaller than a representative value of pixel values ​​of a pattern region indicating the pattern portion, the pixel value being greater than the representative value of the show-through region and smaller than the representative value of the pattern region; a step of excluding an area identified by edge detection from the area of ​​interest and assigning a constant pixel value equal to or less than the threshold to the remaining area of ​​the captured image in the area of ​​interest to obtain a processed image; A computer-readable program that causes a

Citation Information

Patent Citations

  • Binarized threshold value setting device

    JP1994086073A

  • Method and device for inspecting pattern

    JP2000199709A

  • Reference data preparation device and method for visual inspection, and visual inspection system and method

    JP2005164277A