Inspection apparatus, inspection method, and inspection program

The inspection device accurately determines defective pixels in periodic patterns by using threshold-based comparisons within search ranges defined by the pattern's pitch, eliminating the need for model images and reducing setup time.

JP2026006168APending Publication Date: 2026-01-16OMRON CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024104976
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

Conventional inspection devices require setting a defect-free model image for each pattern, which is time-consuming and inefficient.

Method used

An inspection device determines whether a pixel is defective or non-defective based on comparisons with a search range separated by integer multiples of the periodic pattern's pitch, using threshold values for density differences and gradient changes, without needing a model image.

Benefits of technology

This approach reduces the effort required for setting parameters and enhances the accuracy and stability of defect detection in inspection images with periodic patterns.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026006168000001_ABST
    Figure 2026006168000001_ABST
Patent Text Reader

Abstract

To provide an inspection device capable of determining whether each pixel of an inspection image is a defective pixel or a non-defective pixel without setting a model image.SOLUTION: The inspection apparatus specifies a search range away from the target pixel by an integer multiple of the pitch of the periodic pattern. When the target pixel is a non-edge pixel, the inspection device determines whether the target pixel is a defective pixel or a non-defective pixel according to a comparison result between a minimum value of a density difference between the target pixel and a pixel included in the search range and a first threshold. When the target pixel is an edge pixel, the inspection device determines whether the target pixel is a defective pixel or a non-defective pixel according to a comparison result between a minimum value of a difference in the change direction of the density gradient between the target pixel and the pixel included in the search range and a second threshold value.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to an inspection device, an inspection method, and an inspection program. [Background technology]

[0002] Conventionally, inspection devices have been developed that inspect the presence or absence of defects in an inspection object based on an inspection image obtained by photographing the inspection object. For example, Japanese Patent Laid-Open Publication No. 2015-175706 (Patent Document 1) discloses an inspection device that determines whether each pixel in an inspection image is a defective pixel or a non-defective pixel based on the result of comparing the inspection image with a pre-registered model image. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2015-175706 Summary of the Invention [Problem to be solved by the invention]

[0004] The object to be inspected may have a periodic pattern that differs for each type. In this case, the technology described in Patent Document 1 requires that a model image be set for each pattern. If there is a defect in the model image, proper inspection cannot be performed, so it is necessary to set a defect-free model image for each pattern. Therefore, setting the model image requires a lot of man-hours.

[0005] The present disclosure has been made in consideration of this situation, and its purpose is to provide an inspection device, an inspection method, and an inspection program that can determine whether each pixel in an inspection image is a defective pixel or a non-defective pixel without setting a model image. [Means for solving the problem]

[0006] An inspection device according to one aspect of the present disclosure inspects an object to be inspected based on an inspection image showing the object to be inspected having a periodic pattern. The inspection device includes a first determination unit that determines whether a target pixel in the inspection image is an edge pixel or a non-edge pixel, and a second determination unit that determines whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between the target pixel and a search range that is separated from the target pixel by an integer multiple of the pitch of the periodic pattern. If the target pixel is a non-edge pixel, the second determination unit determines whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between the minimum value of the density difference between the target pixel and pixels included in the search range and a first threshold value. If the target pixel is an edge pixel, the second determination unit determines whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between the minimum value of the difference in the direction of change in density gradient between the target pixel and pixels included in the search range and a second threshold value.

[0007] According to this disclosure, the inspection device can determine whether a target pixel in an inspection image is a defective pixel or a non-defective pixel without setting a model image.

[0008] In the above disclosure, the periodic pattern is repeated along a first direction and also along a second direction different from the first direction, and the search ranges include a first search range that is spaced apart from the target pixel along the first direction by an integer multiple of a first pitch corresponding to the first direction, and a second search range that is spaced apart from the target pixel along the second direction by an integer multiple of a second pitch corresponding to the second direction.

[0009] According to this disclosure, the search range is increased, which reduces the chance of misjudging a non-defective pixel as a defective pixel, allowing the inspection device to make more stable judgments.

[0010] In the above disclosure, the inspection device further includes a setting unit that sets an inspection area in the inspection image where the periodic pattern occupies, and a first determination unit that sequentially selects each pixel included in the inspection area as a target pixel.

[0011] According to this disclosure, the inspection device determines whether a target pixel is defective or non-defective only for the inspection area occupied by the periodic pattern, thereby shortening the time required for inspection and reducing the user's effort required to set the inspection area.

[0012] In the above disclosure, the inspection device further includes a setting unit that sets an edge level based on the distribution of edge intensities in the inspection image, and a first determination unit that determines that the target pixel is an edge pixel when the edge intensity of the target pixel exceeds the edge level.

[0013] According to this disclosure, the edge level is automatically set, which reduces the user's effort required to set the edge level.

[0014] In the above disclosure, the inspection device further includes a setting unit that sets the pitch based on the density distribution in the inspection image.

[0015] According to this disclosure, the pitch is automatically set, which reduces the effort required for the user to set the pitch.

[0016] In the above disclosure, the inspection device further includes a setting unit that sets a first threshold value based on the minimum value of the density difference calculated for one or more defect-free non-defective images, and sets a second threshold value based on the minimum value of the difference in the direction of change of the density gradient calculated for one or more non-defective images.

[0017] According to this disclosure, the first threshold and the second threshold are set automatically, which reduces the effort required for the user to set the first threshold and the second threshold.

[0018] In the above disclosure, the periodic pattern is repeated along a specific direction. When at least a portion of a first subrange that is n times the pitch away from the target pixel in the specific direction is not included in the inspection area, the search range includes a second subrange that is n times the pitch away from the target pixel in the opposite direction to the specific direction, and a third subrange that is 2n times the pitch away from the target pixel in the opposite direction, where n is an integer greater than or equal to 1. When at least a portion of the second subrange is not included in the inspection area, the search range includes the first subrange and a fourth subrange that is 2n times the pitch away from the target pixel in the specific direction. When the first subrange and the second subrange are included in the inspection area, the search range includes the first subrange and the second subrange.

[0019] According to this disclosure, the search range includes two sub-ranges spaced apart from each other. The probability that defects are contained in both of these sub-ranges is extremely low. As a result, the inspection system can more accurately determine whether a target pixel is defective or non-defective.

[0020] In the above disclosure, the inspection device further includes an output unit that outputs screen data showing a user interface screen. The user interface screen includes an inspection image and a mark superimposed on the inspection image that indicates the positional relationship between the target pixel and the search range. This disclosure allows a user to easily check whether the position and size of the search range are appropriate.

[0021] In the above disclosure, the inspection device further includes an output unit that outputs screen data showing a user interface screen. The user interface screen includes a first image showing defective pixels and non-defective pixels with different densities. This disclosure allows a user to easily determine the location of defects.

[0022] The above disclosure further includes an output unit that outputs screen data showing a user interface screen. The user interface screen includes a second image that, for each pixel block containing consecutive defective pixels, represents a representative value of the density difference between the defective pixel and a pixel that is an integer multiple of the pitch away from the defective pixel. This disclosure allows the user to grasp the degree of density change of the defect from normal operation.

[0023] An inspection method according to one aspect of the present disclosure inspects an object to be inspected based on an inspection image depicting the object to be inspected having a periodic pattern. The inspection method includes determining whether a target pixel of the inspection image is an edge pixel or a non-edge pixel, and determining whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between the target pixel and a search range separated from the target pixel by an integer multiple of the pitch of the periodic pattern. Determining whether the target pixel is a defective pixel or a non-defective pixel includes, if the target pixel is a non-edge pixel, determining whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between a first threshold value and a minimum value of a difference in the direction of change in the density gradient between the target pixel and pixels included in the search range. Furthermore, if the target pixel is an edge pixel, determining whether the target pixel is a defective pixel or a non-defective pixel includes, if the target pixel is a pixel to be inspected, determining whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between a second threshold value and a minimum value of a difference in the direction of change in the density gradient between the target pixel and pixels included in the search range.

[0024] An inspection program according to one aspect of the present disclosure causes a computer to execute the above-described inspection method. The inspection method and inspection program according to these disclosures also enable the determination of whether each pixel of an inspection image is defective or non-defective without setting a model image. [Effects of the Invention]

[0025] According to the present disclosure, an inspection device, an inspection method, or an inspection program can determine whether each pixel of an inspection image is a defective pixel or a non-defective pixel without setting a model image. [Brief explanation of the drawings]

[0026] [Figure 1] 1 is a schematic diagram showing the overall configuration of an inspection system including an inspection device according to an embodiment of the present invention. [Figure 2] 1 is a block diagram showing a main hardware configuration of an inspection device according to an embodiment of the present invention; [Figure 3] FIG. 2 is a block diagram showing an example of functions provided in the inspection device according to the present embodiment. [Figure 4] FIG. 10 is a diagram illustrating a method for automatically setting an edge level. [Figure 5] FIG. 10 is a diagram illustrating parameters indicated by search range information. [Figure 6] FIG. 10 is a diagram showing projection data obtained by projecting an image in the vertical direction (Y direction). [Figure 7] FIG. 10 is a diagram showing a frequency distribution of the distance between adjacent peak positions. [Figure 8] 10A and 10B are diagrams illustrating a process of extracting an inspection area from an image. [Figure 9] 10A and 10B are diagrams illustrating a method for determining a plurality of sub-ranges included in a search range when a target pixel is located near the left end of an inspection area. [Figure 10] 10A and 10B are diagrams illustrating a method for determining a plurality of sub-ranges included in a search range when a target pixel is located near the right end of an inspection area. [Figure 11] FIG. 10 is a diagram showing an example of an inspection image included in a user interface screen. [Figure 12] FIG. 10 is a diagram illustrating an example of an edge image included in a user interface screen. [Figure 13] FIG. 10 is a diagram showing an example of a filter image included in a user interface screen. [Figure 14] FIG. 10 is a diagram illustrating a method for generating a grayscale difference image. [Figure 15] FIG. 10 is a diagram illustrating an example of a grayscale difference image included in a user interface screen. [Figure 16] FIG. 10 is a diagram illustrating an example of a user interface screen used to set configuration information. [Figure 17]FIG. 10 is a diagram showing an example of a window for switching the type of image. [Figure 18] FIG. 10 is a diagram illustrating an example of setting a pitch coefficient n. [Figure 19] FIG. 10 is a diagram showing a first example of a user interface screen showing the processing results of the item "comparison filter." [Figure 20] FIG. 10 is a diagram showing a second example of a user interface screen showing the processing results of the item "comparison filter." [Figure 21] FIG. 10 is a diagram showing a third example of a user interface screen showing the processing results of the item "comparison filter." [Figure 22] FIG. 10 is a diagram showing a fourth example of a user interface screen showing the processing results of the item "comparison filter." [Figure 23] FIG. 10 is a diagram showing a fifth example of a user interface screen showing the processing results of the item "comparison filter." [Figure 24] FIG. 10 is a diagram showing a sixth example of a user interface screen showing the processing results of the item "comparison filter." [Figure 25] FIG. 11 is a diagram showing a seventh example of a user interface screen showing the processing results of the item "comparison filter." [Figure 26] FIG. 13 is a diagram showing an eighth example of a user interface screen showing the processing results of the item "comparison filter." [Figure 27] FIG. 10 is a diagram showing a modified example of a periodic pattern. DETAILED DESCRIPTION OF THE INVENTION

[0027] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail with reference to the accompanying drawings, in which the same or corresponding parts in the drawings are designated by the same reference numerals and the description thereof will not be repeated.

[0028] §1 Application Examples An application example of the present invention will be described with reference to Fig. 1. In this application example, an inspection device that inspects an inspection object 2 having a periodic pattern for defects will be described.

[0029] 1 is a schematic diagram showing the overall configuration of an inspection system including an inspection device according to the present embodiment. The inspection system 1 includes an inspection device 100, an imaging device 500, an input device 600, and a display device 700. The imaging device 500, the input device 600, and the display device 700 are connected to the inspection device 100.

[0030] The imaging device 500 includes, for example, an imaging element partitioned into multiple pixels, such as a CCD (Coupled Charged Device) or a CMOS (Complementary Metal Oxide Semiconductor) sensor, in addition to an optical system such as a lens. The imaging device 500 captures an image of the inspection object 2 and transmits image data obtained by capturing the image (hereinafter referred to as an "inspection image 20") to the inspection device 100.

[0031] The inspection object 2 is placed so that the specific direction in which the periodic pattern is repeated coincides with the horizontal direction of the field of view of the imaging device 500. Therefore, the periodic pattern is also repeated along the horizontal direction (X direction) in the inspection image 20. Alternatively, the inspection image 20 may be generated by performing a rotation process on the image captured by the imaging device 500 so that the periodic pattern is repeated in the horizontal direction (X direction).

[0032] The input device 600 includes, for example, at least one of a mouse, a keyboard, and a touch panel, and receives operations for the inspection device 100. The display device 700 includes a liquid crystal display, an organic EL (Electro Luminescence) display, or the like, and displays various types of information.

[0033] The inspection device 100 inspects the appearance of the inspection object 2 by performing image processing on the inspection image 20 received from the imaging device 500. The inspection device 100 is capable of executing an image processing item (hereinafter referred to as an item "comparison filter") for inspecting the presence or absence of defects in the inspection object 2 having a periodic pattern.

[0034] As part of the image processing for the "comparison filter" item, inspection device 100 determines whether target pixel 30 in inspection image 20 is an edge pixel or a non-edge pixel. In the example shown in FIG. 1, target pixel 30a located at the center of region 21 in inspection image 20 is determined to be a non-edge pixel. Target pixel 30b located at the center of region 22 in inspection image 20 is determined to be an edge pixel.

[0035] Furthermore, as image processing for the "comparison filter" item, the inspection apparatus 100 determines whether the target pixel 30 is a defective pixel or a non-defective pixel based on the results of comparing the target pixel 30 with a search range 32 that is an integer multiple of the pitch P of the periodic pattern away from the target pixel 30. The search range 32 may include multiple sub-ranges that are spaced apart from each other. In the example shown in FIG. 1, the search range 32 includes a sub-range 32a located to the left of the target pixel 30 and a sub-range 32b located to the right of the target pixel 30.

[0036] When the target pixel 30 is a non-edge pixel (e.g., target pixel 30a), the inspection device 100 calculates the density difference between the target pixel 30 and each pixel included in the search range 32. The density difference is also called a luminance difference. The inspection device 100 then determines whether the target pixel 30 is a defective pixel or a non-defective pixel based on the result of comparing the minimum value of the calculated density differences with a grayscale difference determination value. The grayscale difference determination value is a reference value used to determine whether a non-edge pixel is a defective pixel or a non-defective pixel. The grayscale difference determination value is an example of the "first threshold" of the present disclosure and is set in advance.

[0037] Normally, defects occur only in a part of the inspection image 20. In other words, the probability that defects will occur throughout the entire search range 32 is low. Therefore, if no defect is captured in the target pixel 30a, the density of the target pixel 30 is likely to be equivalent to the density of any pixel in the search range 32 that is an integer multiple of the pitch P away. Therefore, the inspection device 100 determines that the target pixel 30 is a defective pixel when the minimum value of the density difference between the target pixel 30 and the pixels included in the search range 32 exceeds the grayscale difference determination value.

[0038] If the target pixel 30 is an edge pixel (e.g., target pixel 30b), the inspection device 100 calculates the difference in the direction of change in density gradient between the target pixel 30 and each pixel included in the search range 32. The inspection device 100 then compares the minimum of the calculated differences with an EC (edge ​​code) difference determination value to determine whether the target pixel 30 is a defective pixel or a non-defective pixel. EC (edge ​​code) represents the direction perpendicular to the direction of change in density gradient, i.e., the tangent direction of the edge. The EC difference determination value is a reference value for determining whether an edge pixel is a defective pixel or a non-defective pixel. The EC difference determination value is an example of the "second threshold" of the present disclosure and is set in advance.

[0039] The direction of change in the density gradient is perpendicular to the edge direction. As described above, the probability of defects occurring throughout the entire search range 32 is low. Therefore, if no defect is captured in the target pixel 30, the edge direction of the target pixel 30 is likely to be the same as the edge direction of any pixel in the search range 32 that is an integer multiple of the pitch P away. Therefore, the inspection device 100 determines that the target pixel 30 is a defective pixel when the minimum value of the difference in the direction of change in the density gradient between the target pixel 30 and the pixels included in the search range 32 exceeds the EC difference determination value.

[0040] According to the inspection device 100 of this embodiment, it is possible to determine whether a target pixel in an inspection image is a defective pixel or a non-defective pixel without setting a model image.

[0041] §2 Specific examples <Hardware configuration of inspection equipment> 2 is a block diagram showing the main hardware configuration of an inspection device according to this embodiment. Inspection device 100 includes processor 101, main memory 102, communication interface 103, camera interface 104, input interface 105, output interface 106, memory card interface 107, and storage device 120. These components are connected to each other via internal bus 119 so that they can communicate with each other.

[0042] The processor 101 is configured, for example, by at least one integrated circuit. The integrated circuit is configured, for example, by at least one central processing unit (CPU), at least one application specific integrated circuit (ASIC), at least one field programmable gate array (FPGA), or a combination thereof.

[0043] The processor 101 implements various processes according to this embodiment by loading the inspection program 122 stored in the storage device 120 into the main memory 102 and executing it. The main memory 102 is configured from a volatile memory, and functions as a work memory required for the processor 101 to execute the inspection program.

[0044] The communication interface 103 exchanges data and signals with external devices via a network.

[0045] The camera interface 104 mediates data transmission between the processor 101 and the imaging device 500 so as to receive the inspection image 20 from the imaging device 500. In particular, upon receiving the inspection image 20 from the imaging device 500, the camera interface 104 outputs the inspection image 20 to the processor 101.

[0046] The input interface 105 mediates data transmission between the processor 101 and the input device 600. That is, the input interface 105 accepts operation commands given by the user operating the input device 600.

[0047] The output interface 106 is connected to the display device 700 and outputs signals for displaying various screens to the display device 700 in accordance with commands from the processor 101 .

[0048] The memory card interface 107 mediates data transmission between the processor 101 and the memory card 107A. The memory card 107A includes a general-purpose semiconductor storage device such as an SD (Secure Digital), a magnetic recording medium such as a flexible disk, an optical recording medium such as a CD-ROM (Compact Disk Read Only Memory), and the like.

[0049] The storage device 120 is, for example, a hard disk, and includes, for example, a library 121, a test program 122, and setting information 124.

[0050] The library 121 includes a plurality of program parts, each of which defines a corresponding image processing item. The plurality of program parts includes a program part 125 corresponding to the item "comparison filter."

[0051] The library 121 may be provided by being stored in a storage medium such as the memory card 107A. The library 121 is read from the memory card 107A by the memory card interface 107 and installed in the inspection device 100.

[0052] Instead of installing the library 121 stored in the memory card 107A in the inspection device 100, the library 121 may be downloaded from a distribution server or the like via the communication interface 103 and installed in the inspection device 100.

[0053] The inspection program 122 includes one or more program parts selected from a plurality of program parts included in the library 121. The following describes a case where the inspection program 122 includes a program part 125 corresponding to the item "comparison filter."

[0054] The inspection program 122 may be provided not as a standalone program but as part of an arbitrary program. In this case, the inspection program 122 cooperates with the arbitrary program to realize the processing according to this embodiment. Even if the program does not include some of these modules, this does not deviate from the spirit of the inspection device 100 according to this embodiment. Furthermore, some or all of the functions provided by the inspection program 122 may be realized by dedicated hardware.

[0055] The setting information 124 indicates the values ​​of various parameters used in the execution of the inspection program 122 .

[0056] <Inspection equipment functions> Fig. 3 is a block diagram showing an example of functions provided in the inspection device according to the present embodiment. As shown in Fig. 3, inspection device 100 includes setting unit 131, first determination unit 132, second determination unit 133, and output unit 134. Setting unit 131, first determination unit 132, second determination unit 133, and output unit 134 are realized by processor 101 executing inspection program 122.

[0057] The setting unit 131 sets the setting information 124. The setting information 124 includes edge determination information used to determine whether the target pixel 30 is an edge pixel or a non-edge pixel. The edge determination information indicates a mask size and an edge level. The mask size is selected from 3×3, 5×5, 7×7, and 9×9 depending on an input to the input device 600. The edge level is compared with the edge strength of the target pixel 30 and is used to determine whether the target pixel 30 is an edge pixel or a non-edge pixel. The edge strength represents the magnitude of the density gradient. The setting unit 131 may display a screen on the display device 700 prompting the user to input the edge level and set the edge level in accordance with the input to the input device 600. Alternatively, the setting unit 131 may automatically set the edge level based on the frequency distribution of edge strength in the inspection image 20.

[0058] 4 is a diagram illustrating a method for automatically setting an edge level. The setting unit 131 calculates a frequency distribution of edge intensities of a plurality of pixels included in an image. When an inspection area (described later) is set, the setting unit 131 calculates a frequency distribution of edge intensities of a plurality of pixels included in the inspection area of ​​the image. The edge intensity can take a value between 0 and 255.

[0059] Specifically, the setting unit 131 calculates the edge intensity (magnitude of density gradient) of each pixel using an edge extraction filter having a set mask size. The edge extraction filter is, for example, a Sobel filter. That is, the setting unit 131 calculates the edge intensity of a pixel by applying the edge extraction filter to a pixel set having the set mask size, with the pixel whose edge intensity is to be calculated as the center.

[0060] The setting unit 131 calculates a threshold value for binarizing the edge strength (hereinafter referred to as "automatic binarization level") based on the frequency distribution of the edge strength. For example, the setting unit 131 sets the average value of the edge strength as the automatic binarization level.

[0061] The setting unit 131 identifies the value L of the edge strength that is greater than the automatic binarization level and has the maximum frequency. The setting unit 131 sets the value obtained by subtracting the standard deviation of the edge strength from the value L as the edge level.

[0062] 3, the setting information 124 further includes search range information, which is used to specify the search range 32.

[0063] FIG. 5 is a diagram showing parameters indicated by the search range information. The search range information indicates the pitch P, pitch coefficient n, and width W of the periodic pattern. The width W indicates half the width of each subrange constituting the search range. The pitch coefficient n is an integer equal to or greater than 1. In the example shown in FIG. 4, a range having a horizontal width 2W and a center at a position spaced to the left of the target pixel 30 by a pitch coefficient n (=nP) of the pitch P is identified as subrange 32a of the search range 32. Similarly, a range having a horizontal width 2W and a center at a position spaced to the right of the target pixel 30 by a pitch coefficient n (=nP) of the pitch P is identified as subrange 32b of the search range 32. The heights of the subranges 32a and 32b are predetermined. For example, the heights (vertical lengths) of the subranges 32a and 32b are one to several pixels.

[0064] The setting unit 131 may display a screen on the display device 700 prompting the user to input a search range, and set the search range information in response to an input to the input device 600. The setting unit 131 may automatically set the pitch P based on the density distribution in the inspection image 20.

[0065] A method for automatically setting the pitch P will be described with reference to FIGS. 6 and 7. FIG. 6 is a diagram showing projection data obtained by projecting an image in the vertical direction (Y direction). The setting unit 131 projects the image in the Y direction and creates a density distribution (also called a "luminance distribution") for each X coordinate. Specifically, the setting unit 131 divides a plurality of pixels included in the image into a plurality of groups for each X coordinate. That is, all of the plurality of pixels belonging to each group have the same X coordinate. The setting unit 131 calculates, for each group, the total density value of the plurality of pixels belonging to that group. In graph 80, the horizontal axis represents the x coordinate, and the vertical axis represents the total density value.

[0066] In FIG. 6, the threshold level 81 indicates the average value between the maximum value of the total density and the minimum value of the total density. The setting unit 131 identifies the peak position based on the intersection of the graph 80 and the threshold level 81. For example, the setting unit 131 determines the X coordinate (=x) at which the total density exceeds the threshold level 81 when the x coordinate is increased from 0. 11 ) and the next X coordinate (=x 12 Then, the setting unit 131 determines (x 11 +x 12 ) / 2 is determined as the peak position. In this way, the setting unit 131 identifies a plurality of peak positions. Then, the setting unit 131 calculates the distance between adjacent peak positions.

[0067] 7 is a diagram showing the frequency distribution of the distance between adjacent peak positions. The setting unit 131 sets the distance with the highest frequency as the pitch P.

[0068] Returning to FIG. 3 , the setting information 124 further includes inspection area information indicating an inspection area occupied by the periodic pattern in the inspection image 20. The setting unit 131 may display a screen on the display device 700 prompting the user to specify an inspection area, and set the inspection area information in response to a user operation on the input device 600. For example, the user specifies a rectangular area in the inspection image 20 occupied by the periodic pattern as the inspection area. Specifically, the user specifies the upper left vertex and the lower right vertex of the rectangular area. The setting unit 131 sets the inspection area information indicating the specified inspection area. Alternatively, the setting unit 131 may extract an inspection area from the inspection image 20 and set the inspection area information indicating the extracted inspection area.

[0069] FIG. 8 is a diagram illustrating a process for extracting an inspection area from an inspection image. As shown in FIG. 8, the setting unit 131 projects the inspection image 20 in the vertical direction (Y direction) and creates a graph 80 representing the density distribution for each X coordinate. The method for creating the graph 80 is as described with reference to FIG. 6. The setting unit 131 identifies the inspection area occupied by the periodic pattern by comparing the graph 80 with a threshold level 81. Specifically, the setting unit 131 identifies the left end of the periodic pattern when two or more periodic patterns having a pitch P appear consecutively from the left side. Similarly, the setting unit 131 identifies the right end of the periodic pattern when two or more periodic patterns having a pitch P appear consecutively from the right side. The setting unit 131 sets the area from the left end to the right end as the inspection area 23. The setting unit 131 sets the other areas (i.e., the area to the left of the left end and the area to the right of the right end) as the non-inspection area 24.

[0070] 3, the setting information 124 further includes a shading difference judgment value and an EC difference judgment value. The setting unit 131 displays a screen on the display device 700 to prompt the user to input the shading difference judgment value and the EC difference judgment value, and sets the shading difference judgment value and the EC difference judgment value in accordance with the input to the input device 600.

[0071] The first determination unit 132 determines whether the target pixel 30 of the inspection image 20 is an edge pixel or a non-edge pixel. When the inspection area information is set, the first determination unit 132 sequentially selects each pixel included in the inspection area 23 of the inspection image 20 as the target pixel 30.

[0072] The first determination unit 132 applies an edge extraction filter having a mask size indicated by the setting information 124 to a pixel set centered on the target pixel 30, and calculates the edge strength (magnitude of the density gradient) of the target pixel 30. The method of calculating the edge strength will be described later. The first determination unit 132 determines that the target pixel 30 is an edge pixel when the edge strength exceeds the edge level indicated by the setting information 124. The first determination unit 132 determines that the target pixel 30 is a non-edge pixel when the edge strength is equal to or less than the edge level.

[0073] The second determination unit 133 determines whether the target pixel 30 is a defective pixel or a non-defective pixel based on the result of comparison between the target pixel 30 and a search range 32 that is separated from the target pixel 30 by the pitch coefficient n times the pitch P.

[0074] The search range 32 preferably includes a plurality of spaced-apart sub-ranges. A method for determining the plurality of sub-ranges will be described with reference to Figures 5, 9 and 10.

[0075] As shown in FIG. 5, the second determination unit 133 identifies a rectangular or line-segment-shaped subrange 32a whose center is located at a position that is a pitch coefficient n times (=nP) of the pitch P to the left of the target pixel 30 and has a horizontal width of 2W. The leftward direction is an example of a "specific direction" in the present disclosure. The subrange 32a is an example of a "first subrange" in the present disclosure. When the coordinates of the target pixel 30 are (x, y), the coordinates of the upper left and lower right vertices of the rectangular subrange 32a are expressed as (x-nP-W, yH) and (x-nP+W, y+H), respectively. H is the value obtained by multiplying the vertical height of one pixel by a predetermined integer. When H is set to 0, a line-segment-shaped subrange 32a is identified. In this case, the leftmost and rightmost coordinates of the subrange 32a are expressed as (x-nP-W, y) and (x-nP+W, y), respectively.

[0076] Further, the second determination unit 133 specifies a rectangular or line segment-shaped sub-range 32b having a width of 2W in the horizontal direction, centered at a position separated by n times the pitch P (= nP) in the right direction from the target pixel 30. The right direction is an example of the "opposite direction of the specified direction" in the present disclosure. The sub-range 32b is an example of the "second sub-range" in the present disclosure. When the coordinates of the target pixel 30 are (x, y), the upper left and lower right vertex coordinates of the rectangular sub-range 32b are represented by (x + nP - W, y - H) and (x + nP + W, y + H), respectively. When H is set to 0, a line segment-shaped sub-range 32a is specified. In this case, the left end coordinate and the right end coordinate of the sub-range 32b are represented by (x + nP - W, y) and (x + nP + W, y), respectively.

[0077] The second determination unit 133 determines whether the sub-range 32a and the sub-range 32b are included in the inspection region 23. Specifically, when the upper left and lower right vertex coordinates of the rectangular inspection region 23 are (x1, y1) and (x2, y2), respectively, the second determination unit 133 determines whether the X coordinate x of the target pixel 30 satisfies the following formula (1). x1 + nP + W ≤ x ≤ x2 - nP - W ··· Formula (1) The second determination unit 133 determines that the sub-range 32a and the sub-range 32b are included in the inspection region 23 in response to the X coordinate x of the target pixel 30 satisfying the formula (1). When the sub-range 32a and the sub-range 32b are included in the inspection region 23, the second determination unit 133 includes the sub-range 32a and the sub-range 32b in the search range 32.

[0078] FIG. 9 is a diagram for explaining a method of determining a plurality of sub-ranges included in a search range when a target pixel is located near the left end of an inspection region. The second determination unit 133 determines that the target pixel 30 is located near the left end of the inspection region 23 and the sub-range 32a is not included in the inspection region 23 in response to the X coordinate x of the target pixel 30 satisfying the following formula (2). x < x1 + nP + W ··· Formula (2) If the sub-range 32a is not included in the inspection region 23, the second determination unit 133 includes the sub-range 32b and a sub-range 32c, which has its center at a position 2n times the pitch P (=2nP) away from the target pixel 30 to the right and has a width of 2W in the horizontal direction, in the search range 32. The sub-range 32c is an example of a "third sub-range" in the present disclosure.

[0079] 10 is a diagram illustrating a method for determining multiple sub-ranges included in the search range when the target pixel 30 is located near the right edge of the inspection area 23. If the X coordinate x of the target pixel 30 satisfies the following formula (3), the second determination unit 133 determines that the target pixel 30 is located near the right edge of the inspection area 23 and that the sub-range 32b is not included in the inspection area 23. x>x2-nP-W...Formula (3) If sub-range 32b is not included in inspection region 23, second determination unit 133 includes sub-range 32a and sub-range 32d, which has its center at a position 2n times the pitch P (=2nP) away from target pixel 30 to the left and has a width of 2W in the horizontal direction, in search range 32. Sub-range 32d is an example of a "fourth sub-range" in the present disclosure.

[0080] Returning to FIG. 3, the second determination unit 133 performs different processing depending on whether the target pixel 30 is an edge pixel or a non-edge pixel, based on the determination result of the first determination unit 132.

[0081] If the target pixel 30 is a non-edge pixel, the second determination unit 133 determines whether the target pixel 30 is a defective pixel or a non-defective pixel based on the comparison result between the minimum value of the density difference between the target pixel 30 and the pixels included in the search range 32 and the grayscale difference determination value. Specifically, the second determination unit 133 determines that the target pixel 30 is a defective pixel if the minimum value of the density difference exceeds the grayscale difference determination value, and determines that the target pixel 30 is a non-defective pixel if the minimum value of the density difference is equal to or less than the grayscale difference determination value.

[0082] If the target pixel 30 is an edge pixel, the second determination unit 133 determines whether the target pixel 30 is a defective pixel or a non-defective pixel based on the comparison result between the minimum value of the difference in the direction of change of the density gradient between the target pixel 30 and the pixels included in the search range 32 and the EC difference determination value. Specifically, the second determination unit 133 determines that the target pixel 30 is a defective pixel when the minimum value of the difference in the direction of change of the density gradient exceeds the EC difference determination value, and determines that the target pixel 30 is a non-defective pixel when the minimum value of the difference in the direction of change of the density gradient is equal to or less than the EC difference determination value.

[0083] The direction of change in the density gradient is calculated using the technology disclosed in Patent Document 1. That is, the second determination unit 133 calculates the amount of change in density in the horizontal direction (X direction) Ex(x,y) and the amount of change in density in the vertical direction (Y direction) for the target pixel 30 and each pixel within the search range 32. Then, for a vector with Ex(x,y) and Ey(x,y) as the X and Y components, respectively, the length IE(x,y) is calculated using the following equation (4). This IE(x,y) is the edge strength (magnitude of the density gradient). IE(x,y)=[{Ex(x,y)} 2 +{Ey(x,y)} 2 ] 1 / 2 ···(4).

[0084] The direction indicated by the vector corresponds to the direction of change in the density gradient at the pixel. Therefore, the angle θ(x, y) representing the direction of change in the density gradient at pixel (x, y) can be calculated using one of the following equations (5) to (9). (5) When Ex(x,y)>0 and Ey(x,y)≧0, θ(x,y)=atan(Ey(x,y) / Ex(x,y)) (6) When Ex(x,y)>0 and Ey(x,y)<0, θ(x,y)=360+atan(Ey(x,y) / Ex(x,y)) (7) When Ex(x,y)<0, θ(x,y)=180+atan(Ey(x,y) / Ex(x,y)) (8) When Ex(x,y)=0 and Ey(x,y)>0, θ(x,y)=90 (9) When Ex(x,y)=0 and Ey(x,y)<0, θ(x,y)=270 If IE(x, y) of a pixel is 0, the direction of change in the density gradient for that pixel cannot be identified. In this case, the second determination unit 133 determines that the direction of change in the density gradient for that pixel cannot be identified.

[0085] The second judgment unit 133 calculates the minimum value of the difference between the angle θ obtained for the target pixel 30 and the angle θ obtained for the pixels included in the search range 32 as the minimum value of the difference in the direction of change of the density gradient between the target pixel 30 and the pixels included in the search range 32.

[0086] It is possible that, even if a significant angle θ is calculated for the target pixel 30, which is an edge pixel, the direction of change in the density gradient is determined to be unidentifiable for all pixels within the search range 32. In this case, the second determination unit 133 determines the minimum value of the difference in the direction of change in the density gradient between the target pixel 30 and the pixels included in the search range 32 to be 180°.

[0087] The output unit 134 outputs screen data showing a user interface screen that displays the processing results for the item “comparison filter.” The display device 700 displays the user interface screen based on the screen data.

[0088] The output unit 134 may include the inspection image 20 on a user interface screen, which allows the user to set the inspection area information or search range information while checking the inspection image 20.

[0089] FIG. 11 illustrates an example of an inspection image included on the user interface screen. As shown in FIG. 11 , when search range information is set, the output unit 134 overlays a mark 26 on the inspection image 20, indicating the positional relationship between the target pixel and the search range. The mark 26 includes a cross 26 a indicating a pixel specified in the inspection image 20 (e.g., a clicked pixel). The mark 26 also includes lines 26 b, 26 c, and 26 d indicating the left, center, and right ends of each subrange included in the search range when the pixel indicated by the cross 26 a is the target pixel. The user can confirm the appropriateness of the position and size of the search range based on the mark 26. As a result, the user can easily modify the search range information so that the search range has an appropriate position and size. The display format of the mark 26 is not limited to the example shown in FIG. 11 .

[0090] When inspection area information is set, the output unit 134 may overlay a frame indicating the inspection area 23 and a frame indicating the non-inspection area 24 on the inspection image 20. This allows the user to check whether the position and size of the inspection area 23 are appropriate. As a result, the user can easily correct the inspection area 23 so that it has an appropriate position and size.

[0091] The output unit 134 may include on the user interface screen an edge image indicating the determination result of the first determination unit 132. The edge image represents edge pixels and non-edge pixels with different densities (brightness).

[0092] Fig. 12 is a diagram showing an example of an edge image included in the user interface screen. The edge image 27 shown in Fig. 12 is generated from the inspection image 20 shown in Fig. 11. As shown in Fig. 12, the edge image 27, for example, represents edge pixels in white and non-edge pixels in black. The output unit 134 may also superimpose on the edge image 27 a frame line indicating the inspection region 23, a frame line indicating the non-inspection region 24, and a mark 26 indicating the search range.

[0093] The output unit 134 may include a filter image indicating the determination result of the second determination unit 133 on the user interface screen. The filter image represents defective pixels and non-defective pixels with different densities (brightness). The filter image is an example of a "first image" in the present disclosure.

[0094] Fig. 13 is a diagram showing an example of a filter image included in the user interface screen. Filter image 28 shown in Fig. 13 is generated from inspection image 20 shown in Fig. 11. As shown in Fig. 13, filter image 28, for example, represents defective pixels in white and non-defective pixels in black. Output unit 134 may also superimpose on filter image 28 a frame line indicating inspection region 23, a frame line indicating non-inspection region 24, and mark 26 indicating a search range.

[0095] For each group of consecutive defective pixels (hereinafter referred to as a "pixel group"), the output unit 134 may include, on the user interface screen, a grayscale difference image that represents a representative value of the density difference between the defective pixel and a pixel that is n times the pitch P away from the defective pixel. The grayscale difference image is an example of a "second image" in the present disclosure. Note that a "pixel group" is also referred to as a collection of multiple consecutive defective pixels.

[0096] 14 is a diagram showing a method for generating a grayscale difference image. The output unit 134 identifies pixel blocks 36 containing consecutive defective pixels based on the determination result of the second determination unit 133. For each pixel block 36, the output unit 134 calculates the density difference d(x, y) between each defective pixel (x, y) belonging to the pixel block 36 and a pixel that is n times the pitch P away from the defective pixel.

[0097] Specifically, the output unit 134 determines whether the X-coordinate x of a defective pixel belonging to the pixel block 36 satisfies any of the above formulas (1) to (3). If the X-coordinate x of the defective pixel satisfies formula (1), the output unit 134 calculates the density difference d(x, y) according to the following formula (10). Note that f(p, q) represents the density of pixel (p, q). That is, the output unit 134 compares a first absolute value of a first density difference between the defective pixel (x, y) and a pixel (x-nP, y) that is nP away to the left of the defective pixel (x, y) with a second absolute value of a second density difference between the defective pixel (x, y) and a pixel (x+nP, y) that is nP away to the right of the defective pixel (x, y). If the second absolute value is greater than the first absolute value, the output unit 134 calculates the second density difference as the density difference d(x, y). If the first absolute value is equal to or greater than the second absolute value, the output unit 134 calculates the first density difference as the density difference d(x, y).

[0098]

number

[0099] If the X-coordinate x of the defective pixel satisfies equation (2), the output unit 134 calculates the density difference d(x, y) according to equation (11) below. That is, the output unit 134 compares the second absolute value of the second density difference between the defective pixel (x, y) and the pixel (x + nP, y) that is nP away to the right of the defective pixel (x, y) with the third absolute value of the third density difference between the defective pixel (x, y) and the pixel (x + 2nP, y) that is 2nP away to the right of the defective pixel (x, y). If the second absolute value is greater than the third absolute value, the output unit 134 calculates the second density difference as the density difference d(x, y). If the third absolute value is greater than or equal to the second absolute value, the output unit 134 calculates the third density difference as the density difference d(x, y).

[0100]

number

[0101] If the X-coordinate x of the defective pixel satisfies equation (3), the output unit 134 calculates the density difference d(x,y) according to equation (12) below. That is, the output unit 134 compares the first absolute value of the first density difference between the defective pixel (x,y) and a pixel (x-nP,y) that is nP away from the defective pixel (x,y) to the left with the fourth absolute value of the fourth density difference between the defective pixel (x,y) and a pixel (x-2nP,y) that is 2nP away from the defective pixel (x,y) to the left. If the fourth absolute value is greater than the first absolute value, the output unit 134 calculates the fourth density difference as the density difference d(x,y). If the first absolute value is equal to or greater than the fourth absolute value, the output unit 134 calculates the first density difference as the density difference d(x,y).

[0102]

number

[0103] For each pixel block 36, the output unit 134 divides the total density difference d of the defective pixels included in the pixel block 36 by the area of ​​the pixel block 36 (the number of pixels included in the pixel block 36) to calculate a representative value of the density difference between the defective pixel and a pixel that is an integer multiple of the pitch P away from the defective pixel. The representative value is positive if the pixel block 36 is brighter due to a defect, and negative if the pixel block 36 is darker due to a defect.

[0104] FIG. 15 is a diagram illustrating an example of a grayscale difference image included in a user interface screen. The grayscale difference image 29 illustrated in FIG. 15 is generated from the inspection image 20 illustrated in FIG. 11. As illustrated in FIG. 15, the grayscale difference image 29 represents pixels other than the pixel block 36 in a reference color (e.g., gray) and represents the pixel block 36 in a color corresponding to the representative value. For example, if the representative value is positive, the grayscale difference image 29 represents the pixel block 36 in a color brighter than the reference color, and if the representative value is negative, the pixel block 36 in a color brighter than the reference color. In the example illustrated in FIG. 15, the brightness of the pixel block 36 is higher than the brightness of the pixels other than the pixel block 36. This allows the user to recognize that a defect that reduces density has occurred in the pixel block 36.

[0105] The output unit 134 may also superimpose on the grayscale difference image 29 a frame line indicating the inspection region 23, a frame line indicating the non-inspection region 24, and a mark 26 indicating the search range.

[0106] Furthermore, the output unit 134 may include a mask image on the user interface screen, which indicates the non-inspection region 24 where no inspection is to be performed.

[0107] <Example of a user interface screen used to set configuration information> Fig. 16 is a diagram showing an example of a user interface screen used to set setting information. The user interface screen 40 shown in Fig. 16 is generated by the setting unit 131 and displayed on the display device 700. As shown in Fig. 16, the user interface screen 40 includes tabs 41a and 41b, buttons 42 to 45, check boxes 46 to 48, and input fields 49 to 56.

[0108] Tab 41a is selected when making various settings related to image processing for the item "comparison filter." Tab 41b is selected when manually setting the inspection area 23 in the inspection image 20. In the example shown in FIG. 16, tab 41a is selected.

[0109] Button 42 and input field 56 are used to set the type of one or more images included in the user interface screen that shows the processing result of the item "Comparison Filter." Input field 56 defines the number of each of one or more images included in the user interface screen that shows the processing result of the item "Comparison Filter." Button 42 is used to switch the type of image whose number is entered in input field 56.

[0110] Fig. 17 is a diagram showing an example of a window for switching the type of image. Window 60 shown in Fig. 17 is displayed on display device 700 in response to pressing of button 42 shown in Fig. 16. As shown in Fig. 17, window 60 accepts selection of one of "inspection image," "edge image," "mask image," "filter image," and "grayscale difference image." Setting unit 131 switches the image corresponding to the number input in input field 56 to the selected type of image.

[0111] 16, the button 43 is used to automatically set the pitch P. When the button 43 is pressed, the setting unit 131 automatically sets the pitch P using the latest inspection image 20 or an inspection image 20 specified by the user. The process for automatically setting the pitch P is as described above with reference to FIGS. 6 and 7.

[0112] The button 44 is used to automatically set the inspection area 23. When the button 44 is pressed, the setting unit 131 automatically sets the inspection area 23 and the non-inspection area 24 using the latest inspection image 20 or an inspection image 20 specified by the user. The process for automatically setting the inspection area 23 and the non-inspection area 24 is as described above with reference to FIG. 8.

[0113] The button 45 is used to automatically set the edge level. When the button 45 is pressed, the setting unit 131 automatically sets the edge level using the latest inspection image 20 or an inspection image 20 specified by the user. The process for automatically setting the edge level is as described above with reference to FIG. 4.

[0114] The check box 46 is checked when it is desired to measure the pitch P for each inspection image 20. When the check box 46 is checked, the setting unit 131 measures the pitch P for each inspection image 20. The method for measuring the pitch P is as described above with reference to FIGS. 6 and 7. The second determination unit 133 uses the measured pitch P to determine whether the target pixel 30 is a defective pixel or a non-defective pixel. On the other hand, when the check box 46 is not checked, the second determination unit 133 uses the pitch P indicated by the setting information 124 to determine whether the target pixel 30 is a defective pixel or a non-defective pixel.

[0115] The check box 47 is checked when it is desired to measure the inspection area 23 for each inspection image 20. When the check box 47 is checked, the setting unit 131 measures the inspection area 23 for each inspection image 20. The method for measuring the inspection area 23 is as described above with reference to FIG. 8. The second determination unit 133 uses the measured inspection area 23 to determine whether the target pixel 30 is a defective pixel or a non-defective pixel. On the other hand, when the check box 47 is not checked, the second determination unit 133 uses the inspection area 23 indicated by the inspection area information in the setting information 124 to determine whether the target pixel 30 is a defective pixel or a non-defective pixel.

[0116] The check box 48 is checked when it is desired to measure the edge level for each inspection image 20. When the check box 48 is checked, the setting unit 131 measures the edge level for each inspection image 20. The method for measuring the edge level is as described above with reference to FIG. 4. The first determination unit 132 uses the measured edge level to determine whether the target pixel 30 is an edge image or a non-edge pixel. On the other hand, when the check box 48 is not checked, the first determination unit 132 uses the edge level indicated by the setting information 124 to determine whether the target pixel 30 is an edge image or a non-edge pixel.

[0117] The input field 49 is used to input a mask size. When the input field 49 is operated, the setting unit 131 displays a pull-down menu. The pull-down menu includes four mask sizes: "3x3," "5x5," "7x7," and "9x9." The setting unit 131 sets the mask size in accordance with the input to the pull-down menu.

[0118] The input field 50 is used to input the edge level. When the button 45 is operated, the automatically set value of the edge level is displayed in the input field 50. The user may adjust the automatically set value of the edge level by operating the input field 50. The user interface screen 40 includes a slider 50a to assist input into the input field 50. The user can change the position of the slider 50a. Depending on the position of the slider 50a, the value displayed in the input field 50 changes within the range of possible edge levels (for example, 0 to 255). The setting unit 131 sets the value displayed in the input field 50 as the value of the edge level.

[0119] The input field 51 is used to input the pitch P. When the button 43 is operated, the automatically set value of the pitch P is displayed in the input field 51. The user may adjust the automatically set value of the pitch P by operating the input field 51. The user interface screen 40 includes a slider 51a to assist input into the input field 51. The user can change the position of the slider 51a. Depending on the position of the slider 51a, the value displayed in the input field 51 changes within the range that the pitch P can take (for example, 1 to 99 pixels). The setting unit 131 sets the value displayed in the input field 51 as the value of the pitch P.

[0120] Input field 52 is used to input pitch coefficient n. Input field 52 accepts integers within the range that pitch coefficient n can take (for example, 1 to 5). Setting unit 131 sets the value displayed in input field 52 as the value of pitch coefficient n.

[0121] FIG. 18 is a diagram illustrating an example of how to set the pitch coefficient n. The periodic pattern of the inspection image 20 shown in FIG. 18 has minute protrusions at every other pixel. If the pitch coefficient n is set to "1" for such a pattern, the second determination unit 133 will erroneously determine the protrusions as defective pixels, as shown in FIG. 18. As a result, the filtered image 28 will display the protrusions and the rest of the image with different densities. On the other hand, if the pitch coefficient n is set to "2," the second determination unit 133 will determine the protrusions as non-defective pixels. As a result, the filtered image 28 will display the protrusions and the rest of the image with the same densities. Therefore, it is preferable for the user to set the pitch coefficient n to "2." In this way, the user can set an appropriate pitch coefficient n according to the shape of the periodic pattern.

[0122] The input field 53 is used to input a width W (see FIG. 5) that defines the size of the search range. The user interface screen 40 includes a slider 53a to assist input into the input field 53. The user can change the position of the slider 53a. Depending on the position of the slider 53a, the value displayed in the input field 53 changes within the range that the width W can take (for example, 0 to 9 pixels). The setting unit 131 sets the value displayed in the input field 53 as the value of the width W.

[0123] The input field 54 is used to input a grayscale difference judgment value. The user interface screen 40 includes a slider 54a to assist input into the input field 54. The user can change the position of the slider 54a. Depending on the position of the slider 54a, the value displayed in the input field 54 changes within the range (for example, 1 to 255) that the grayscale difference judgment value can take. The setting unit 131 sets the value displayed in the input field 54 as the grayscale difference judgment value.

[0124] The input field 55 is used to input the EC difference judgment value. The user interface screen 40 includes a slider 55a to assist input into the input field 55. The user can change the position of the slider 55a. Depending on the position of the slider 55a, the value displayed in the input field 55 changes within the range (for example, 1 to 255) that the EC difference judgment value can take. The setting unit 131 sets the value displayed in the input field 55 as the EC difference judgment value.

[0125] <Image processing example> FIG. 19 is a diagram showing a first example of a user interface screen showing the processing results of the item "comparison filter." FIG. 20 is a diagram showing a second example of a user interface screen showing the processing results of the item "comparison filter." FIG. 21 is a diagram showing a third example of a user interface screen showing the processing results of the item "comparison filter." FIG. 22 is a diagram showing a fourth example of a user interface screen showing the processing results of the item "comparison filter." FIG. 23 is a diagram showing a fifth example of a user interface screen showing the processing results of the item "comparison filter." FIG. 24 is a diagram showing a sixth example of a user interface screen showing the processing results of the item "comparison filter." FIG. 25 is a diagram showing a seventh example of a user interface screen showing the processing results of the item "comparison filter." FIG. 26 is a diagram showing an eighth example of a user interface screen showing the processing results of the item "comparison filter."

[0126] 19 to 26 includes areas 62 to 64. In area 62, an inspection image 20 is displayed. In area 63, a filtered image 28 is displayed. In area 64, a grayscale difference image 29 is displayed. Inspection image 20 includes a periodic print pattern formed using black ink.

[0127] 19, in the first example, a pinhole (a tiny hole with no ink) is included near the center of a black pattern. Filter image 28 shows the pinhole. Grayscale difference image 29 shows the pinhole with a higher brightness than the rest of the image.

[0128] 20, in the second example, dot-like ink droplets are present in part of the white grid that borders the periodic pattern. Filter image 28 shows the ink droplets. Grayscale difference image 29 shows the ink droplets with a lower brightness than the rest of the image.

[0129] 21, in the third example, a line-shaped blur is included in part of the periodic black pattern. Filter image 28 shows the blurred portion. Grayscale difference image 29 shows the blurred portion with a higher brightness than the remaining portion.

[0130] 22, the fourth example includes an unwanted ink stain that spans two horizontally adjacent patterns. Filter image 28 shows the ink stained area. Grayscale difference image 29 shows the ink stained area with a lower brightness than the rest of the image.

[0131] 23, the fifth example includes a relatively large hickey (white area) that spans two horizontally adjacent patterns. The filter image 28 shows the hickey area. The grayscale difference image 29 shows the hickey area with a higher brightness than the rest of the image.

[0132] 24, in the sixth example, two vertically adjacent patterns contain gray stains. Filter image 28 shows the stained areas. Grayscale difference image 29 shows the stained areas with a slightly higher brightness than the rest of the image.

[0133] 25, the seventh example includes numerous gray stains in the form of dots across three patterns. Filter image 28 shows the stained areas. Grayscale difference image 29 shows the stained areas with a higher brightness than the rest of the image.

[0134] 26, the eighth example includes a chip at the edge of the pattern. Filter image 28 shows the chipped portion. Grayscale difference image 29 shows the chipped portion with a slightly higher brightness than the remaining portion.

[0135] As shown in FIGS. 19 to 26, the inspection device 100 according to this embodiment can detect various types of defects.

[0136] <Variation 1> In the above description, the periodic pattern is repeated in the horizontal direction in the inspection image 20. However, the repeating direction of the periodic pattern is not limited to the horizontal direction. For example, the periodic pattern may be repeated in the vertical direction (Y direction) in the inspection image 20. In this case, the second determination unit 133 may determine whether the target pixel is a defective pixel or a non-defective pixel based on the comparison result between the target pixel and the search range 32 that is separated from the target pixel by an integer multiple of the pitch in the vertical direction (Y direction).

[0137] Alternatively, in the inspection image 20, the periodic pattern may be repeated along a first direction and also along a second direction different from the first direction. The second direction is typically perpendicular to the first direction. However, the second direction does not have to be perpendicular to the first direction. For example, if the repeated pattern is a parallelogram or a rhombus, the second direction intersects with the first direction at an angle greater than 0° and less than 90°.

[0138] FIG. 27 is a diagram illustrating a modified example of a periodic pattern. The periodic pattern illustrated in FIG. 27 is repeated in both the horizontal direction (X direction) and the vertical direction (Y direction). The horizontal direction (X direction) is an example of a "first direction" in the present disclosure. The vertical direction (Y direction) is an example of a "second direction" in the present disclosure. The setting unit 131 sets pitches P1 and P2 for the X direction and the Y direction, respectively. The pitches P1 and P2 may be set according to a user input or may be automatically set as described with reference to FIGS. 6 and 7. Furthermore, the setting unit 131 sets an area occupied by the periodic pattern having pitches P1 and P2 as an inspection area 23, and sets the other area as a non-inspection area 24.

[0139] The second determination unit 133 may identify, as the search range 32 corresponding to the target pixel 30, a first search range 32X that is an integer multiple of the pitch P1 away from the target pixel 30 along the X direction, and a second search range 32Y that is an integer multiple of the pitch P2 away from the target pixel 30 along the Y direction.

[0140] The first search range 32X may include multiple sub-ranges. For example, if the target pixel 30 is located near the center of the inspection area 23, the first search range 32X includes a sub-range nP1 away from the target pixel 30 to the left and a sub-range nP1 away from the target pixel 30 to the right. If the target pixel 30 is located near the left edge of the inspection area 23, the first search range 32X includes a sub-range nP1 away from the target pixel 30 to the right and a sub-range 2nP1 away from the target pixel 30 to the right. If the target pixel 30 is located near the right edge of the inspection area 23, the first search range 32X includes a sub-range nP1 away from the target pixel 30 to the left and a sub-range 2nP1 away from the target pixel 30 to the left.

[0141] The second search range 32Y may include multiple sub-ranges. For example, if the target pixel 30 is located near the center of the inspection area 23, the second search range 32Y includes a sub-range that is nP2 above the target pixel 30 and a sub-range that is nP1 below the target pixel 30. If the target pixel 30 is located near the top edge of the inspection area 23, the second search range 32Y includes a sub-range that is nP2 below the target pixel 30 and a sub-range that is 2nP2 below the target pixel 30. If the target pixel 30 is located near the bottom edge of the inspection area 23, the second search range 32Y includes a sub-range that is nP2 above the target pixel 30 and a sub-range that is 2nP2 above the target pixel 30.

[0142] <Variation 2> The setting unit 131 may automatically set the grayscale difference judgment value and the EC difference judgment value based on one or more defect-free non-defective images. Specifically, the setting unit 131 performs the same process as the first judgment unit 132 for each of the one or more non-defective images to judge whether each pixel in the inspection area 23 is an edge pixel or a non-edge pixel.

[0143] Furthermore, for each non-edge pixel, the setting unit 131 calculates the minimum value of the density difference between the non-edge pixel and a pixel included in the search range corresponding to the non-edge pixel. The method for calculating this minimum value is the same as the processing performed by the second determination unit 133. The setting unit 131 sets a grayscale difference determination value based on the calculated minimum value of the density difference. For example, the setting unit 131 sets a value obtained by adding a predetermined margin to the maximum value of the minimum value of the density difference calculated for each non-edge pixel as the grayscale difference determination value.

[0144] For each edge pixel, the setting unit 131 calculates the minimum value of the difference in the direction of change of density gradient between the edge pixel and a pixel included in the search range corresponding to the edge pixel. The method of calculating this minimum value is the same as the processing of the second determination unit 133. The setting unit 131 sets an EC difference determination value based on the calculated minimum value of the difference in the direction of change of density gradient. For example, the setting unit 131 sets a value obtained by adding a predetermined margin to the maximum value of the minimum value of the difference in the direction of change of density gradient calculated for each edge pixel as the EC difference determination value.

[0145] <Variation 3> In the above description, when the target pixel 30 is an edge pixel, the second determination unit 133 calculates the angle θ that represents the direction of change in the density gradient of the target pixel 30. However, the second determination unit 133 may also calculate the angle θ that represents the direction perpendicular to the direction of change in the density gradient (i.e., the tangent direction of the edge). In this case, the difference between the angle θ calculated for the target pixel 30 and the angle θ calculated for the pixels included in the search range 32 represents the difference in the direction of change in the density gradient.

[0146] §3 Supplementary Note As described above, the present embodiment includes the following disclosures.

[0147] (Configuration 1) An inspection device (100) for inspecting an inspection object (2) having a periodic pattern based on an inspection image (20) in which the inspection object (2) is captured, a first determination unit (132) that determines whether a target pixel (30) of the inspection image (20) is an edge pixel or a non-edge pixel; a second determination unit (133) that determines whether the target pixel (30) is a defective pixel or a non-defective pixel based on a comparison result between the target pixel (30) and a search range (32) that is spaced from the target pixel (30) by an integer multiple of the pitch of the periodic pattern, The second determination unit (133) If the target pixel (30) is the non-edge pixel, determining whether the target pixel is the defective pixel or the non-defective pixel based on a comparison result between the minimum value of the density difference between the target pixel (30) and the pixels included in the search range (32) and a first threshold value; If the target pixel (30) is an edge pixel, the inspection device (100) determines whether the target pixel (30) is a defective pixel or a non-defective pixel based on a comparison result between the minimum value of the difference in the direction of change in density gradient between the target pixel (30) and a pixel included in the search range (32) and a second threshold value.

[0148] (Configuration 2) the periodic pattern is repeated along a first direction and also along a second direction different from the first direction; The inspection device (100) according to configuration 1, wherein the search range (32) includes a first search range (32X) that is spaced from the target pixel (30) along the first direction by an integer multiple of a first pitch corresponding to the first direction, and a second search range (32Y) that is spaced from the target pixel (30) along the second direction by an integer multiple of a second pitch corresponding to the second direction.

[0149] (Configuration 3) a setting unit (131) for setting an inspection area (23) occupied by the periodic pattern in the inspection image (20); 4. The inspection device (100) according to any one of configurations 1 to 3, wherein the first determination unit (132) sequentially selects each pixel included in the inspection area (23) as the target pixel (30).

[0150] (Configuration 4) The apparatus further includes a setting unit (131) that sets an edge level based on the distribution of edge strength in the inspection image (20), The inspection device (100) according to any one of configurations 1 to 3, wherein the first determination unit (132) determines that the target pixel (30) is the edge pixel when the edge intensity of the target pixel (30) exceeds the edge level.

[0151] (Configuration 5) The inspection device (100) according to any one of configurations 1 to 3, further comprising a setting unit (131) that sets the pitch based on a density distribution in the inspection image (20).

[0152] (Configuration 6) The inspection device (100) according to any one of configurations 1 to 3 further comprises a setting unit (131) that sets the first threshold based on the minimum value of the density difference calculated for one or more non-defective images without defects, and sets the second threshold based on the minimum value of the difference in the direction of change of the density gradient calculated for the one or more non-defective images.

[0153] (Configuration 7) the periodic pattern is repeated along a particular direction; The search range (32) is If at least a part of a first sub-range (32a) that is n times the pitch away from the target pixel (32) in the specific direction is not included in the inspection area (23), the inspection area (23) includes a second sub-range (32b) that is n times the pitch away from the target pixel (30) in the opposite direction to the specific direction, and a third sub-range (32c) that is 2n times the pitch away from the target pixel (30) in the opposite direction, where n is an integer equal to or greater than 1; When at least a portion of the second sub-range (32b) is not included in the inspection area (23), the inspection area (23) includes the first sub-range (32a) and a fourth sub-range (32d) that is spaced from the target pixel (30) by 2n times the pitch in the specific direction, The inspection device (100) according to configuration 3, including the first sub-range (32a) and the second sub-range (32b) when the first sub-range (32a) and the second sub-range (32b) are included in the inspection area (23).

[0154] (Configuration 8) further comprising an output unit (134) that outputs screen data showing a user interface screen (61); The user interface screen (61) The inspection image (20); 8. The inspection device (100) according to any one of configurations 1 to 7, further comprising a mark (26) that is displayed superimposed on the inspection image (20) and indicates the positional relationship between the target pixel (30) and the search range (32).

[0155] (Configuration 9) further comprising an output unit (134) that outputs screen data showing a user interface screen (61); 8. The inspection device (100) according to any one of configurations 1 to 7, wherein the user interface screen (61) includes a first image (28) in which the defective pixels and the non-defective pixels exhibit different densities.

[0156] (Configuration 10) further comprising an output unit (134) that outputs screen data showing a user interface screen (61); The inspection device (100) according to any one of configurations 1 to 7, wherein the user interface screen (61) includes, for each pixel block (36) in which the defective pixel is continuous, a second image (29) that represents a representative value of the density difference between the defective pixel and a pixel that is an integer multiple of the pitch away from the defective pixel.

[0157] (Configuration 11) An inspection method for inspecting an object (2) based on an inspection image (20) in which the object (2) has a periodic pattern, comprising: determining whether a target pixel (30) of the inspection image (20) is an edge pixel or a non-edge pixel; determining whether the target pixel (30) is a defective pixel or a non-defective pixel based on a comparison result between the target pixel (30) and a search range (32) that is spaced from the target pixel (30) by an integer multiple of the pitch of the periodic pattern; Determining whether the target pixel (30) is the defective pixel or the non-defective pixel includes: If the target pixel (30) is a non-edge pixel, determining whether the target pixel (30) is a defective pixel or a non-defective pixel based on a comparison result between the minimum value of the density difference between the target pixel (30) and a pixel included in the search range (30) and a first threshold value; and if the target pixel (30) is an edge pixel, determining whether the target pixel (30) is a defective pixel or a non-defective pixel based on a comparison result between the minimum value of the difference in the direction of change in density gradient between the target pixel (30) and a pixel included in the search range (30) and a second threshold value.

[0158] (Configuration 12) A program (122, 125) for causing a computer (101) to execute an inspection method for inspecting an inspection object (2) having a periodic pattern based on an inspection image (20) in which the inspection object (2) is captured, The inspection method includes: determining whether a target pixel (30) of the inspection image (20) is an edge pixel or a non-edge pixel; determining whether the target pixel (30) is a defective pixel or a non-defective pixel based on a comparison result between the target pixel (30) and a search range (32) that is spaced from the target pixel (30) by an integer multiple of the pitch of the periodic pattern; Determining whether the target pixel (30) is the defective pixel or the non-defective pixel includes: If the target pixel (30) is a non-edge pixel, determining whether the target pixel (30) is a defective pixel or a non-defective pixel based on a comparison result between the minimum value of the density difference between the target pixel (30) and a pixel included in the search range (30) and a first threshold value; and if the target pixel (30) is the edge pixel, determining whether the target pixel (30) is the defective pixel or the non-defective pixel based on a comparison result between the minimum value of the difference in the direction of change in density gradient between the target pixel (30) and a pixel included in the search range (30) and a second threshold value.

[0159] Although the embodiments of the present invention have been described, the embodiments disclosed herein should be considered to be illustrative and not restrictive in all respects. The scope of the present invention is defined by the claims, and it is intended to include all modifications within the meaning and scope of the claims. [Explanation of symbols]

[0160] 1 inspection system, 2 inspection object, 20 inspection image, 23 inspection area, 24 non-inspection area, 26 mark, 27 edge image, 28 filter image, 29 grayscale difference image, 30, 30a, 30b target pixel, 32 search range, 32X first search range, 32Y second search range, 32a to 32d sub-range, 36 pixel block, 40, 61 user interface screen, 41a, 41b tab, 42 to 45 button, 46 to 48 check box, 49 to 56 input field, 50a, 51a, 53a to 55a slider, 60 window, 80 graph, 81 threshold level, 100 inspection device, 101 processor, 102 main memory, 103 communication interface, 104 camera interface, 105 input interface, 106 output interface, 107 Memory card interface, 107A memory card, 119 internal bus, 120 storage device, 121 library, 122 inspection program, 124 setting information, 125 program components, 131 setting unit, 132 first judgment unit, 133 second judgment unit, 134 output unit, 500 imaging device, 600 input device, 700 display device.

Claims

1. An inspection apparatus that inspects an inspection object based on an inspection image in which the inspection object has a periodic pattern, a first determination unit that determines whether a target pixel of the inspection image is an edge pixel or a non-edge pixel; a second determination unit that determines whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between the target pixel and a search range that is an integer multiple of the pitch of the periodic pattern away from the target pixel, The second determination unit If the target pixel is the non-edge pixel, determining whether the target pixel is the defective pixel or the non-defective pixel based on a comparison result between the minimum value of the density difference between the target pixel and the pixels included in the search range and a first threshold value; If the target pixel is an edge pixel, the inspection device determines whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between the minimum value of the difference in the direction of change in density gradient between the target pixel and the pixels included in the search range and a second threshold value.

2. the periodic pattern is repeated along a first direction and also along a second direction different from the first direction; 2. The inspection device according to claim 1, wherein the search ranges include a first search range that is spaced from the target pixel along the first direction by an integer multiple of a first pitch corresponding to the first direction, and a second search range that is spaced from the target pixel along the second direction by an integer multiple of a second pitch corresponding to the second direction.

3. a setting unit that sets an inspection area in the inspection image that is occupied by the periodic pattern, The inspection device according to claim 1 , wherein the first determination unit sequentially selects each pixel included in the inspection area as the target pixel.

4. a setting unit that sets an edge level based on a distribution of edge intensities in the inspection image; 3. The inspection device according to claim 1, wherein the first determination unit determines that the target pixel is the edge pixel when the edge intensity of the target pixel exceeds the edge level.

5. The inspection device according to claim 1 , further comprising a setting unit that sets the pitch based on a density distribution in the inspection image.

6. 3. The inspection device according to claim 1, further comprising a setting unit that sets the first threshold based on the minimum value of the density difference calculated for one or more defect-free non-defective images, and sets the second threshold based on the minimum value of the difference in the direction of change of the density gradient calculated for the one or more non-defective images.

7. the periodic pattern is repeated along a particular direction; The search range is: If at least a part of a first sub-range that is n times the pitch away from the target pixel in the specific direction is not included in the inspection area, the inspection area includes a second sub-range that is n times the pitch away from the target pixel in an opposite direction to the specific direction, and a third sub-range that is 2n times the pitch away from the target pixel in the opposite direction, where n is an integer equal to or greater than 1; When at least a portion of the second sub-range is not included in the inspection area, the inspection area includes the first sub-range and a fourth sub-range that is spaced apart from the target pixel in the specific direction by 2n times the pitch, The inspection device according to claim 3 , wherein the inspection area includes the first sub-range and the second sub-range when the first sub-range and the second sub-range are included in the inspection area.

8. an output unit that outputs screen data showing a user interface screen; The user interface screen includes: The inspection image; 3. The inspection device according to claim 1, further comprising a mark that indicates a positional relationship between the target pixel and the search range and that is displayed superimposed on the inspection image.

9. an output unit that outputs screen data showing a user interface screen; 3. The inspection device according to claim 1, wherein the user interface screen includes a first image in which the defective pixels and non-defective pixels have different densities.

10. an output unit that outputs screen data showing a user interface screen; 3. The inspection device according to claim 1, wherein the user interface screen includes a second image that represents, for each pixel group in which the defective pixel is continuous, a representative value of a density difference between the defective pixel and a pixel that is an integer multiple of the pitch away from the defective pixel.

11. 1. An inspection method for inspecting an object to be inspected based on an inspection image in which the object to be inspected has a periodic pattern, comprising: determining whether a target pixel of the inspection image is an edge pixel or a non-edge pixel; determining whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between the target pixel and a search range that is an integer multiple of the pitch of the periodic pattern away from the target pixel; Determining whether the target pixel is the defective pixel or the non-defective pixel includes: If the target pixel is a non-edge pixel, determining whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between a minimum value of density differences between the target pixel and pixels included in the search range and a first threshold value; and if the target pixel is an edge pixel, determining whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between a minimum value of a difference in a direction of change in density gradient between the target pixel and a pixel included in the search range and a second threshold value.

12. A program for causing a computer to execute an inspection method for inspecting an inspection object having a periodic pattern based on an inspection image of the inspection object, the program comprising: The inspection method includes: determining whether a target pixel of the inspection image is an edge pixel or a non-edge pixel; determining whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between the target pixel and a search range that is an integer multiple of the pitch of the periodic pattern away from the target pixel; Determining whether the target pixel is the defective pixel or the non-defective pixel includes: If the target pixel is a non-edge pixel, determining whether the target pixel is a defective pixel or a non-defective pixel based on a comparison result between a minimum value of density differences between the target pixel and pixels included in the search range and a first threshold value; and if the target pixel is the edge pixel, determining whether the target pixel is the defective pixel or the non-defective pixel based on a comparison result between a minimum value of a difference in a direction of change in density gradient between the target pixel and a pixel included in the search range and a second threshold value.

Citation Information

Patent Citations

  • Inspection device, inspection method, program, and recording medium thereof

    JP2015175706A