Surface inspection apparatus, surface inspection method, and program

The surface inspection apparatus employs rectangular wave illumination and phase image generation to enhance accuracy and simplicity in surface defect detection, addressing the limitations of sine-wave methods.

JP2026056014APending Publication Date: 2026-04-01TAKANO CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2026-04-01

AI Technical Summary

Technical Problem

Existing surface inspection methods using sine-wave-shaped pattern light face challenges with complex illumination structures and reduced inspection accuracy due to large pattern widths, leading to decreased phase change sensitivity.

Method used

A surface inspection apparatus that uses rectangular wave-shaped patterned light, shifts its phase, and captures multiple images to generate phase images with calculated phase values at specific timings, enabling accurate surface shape inspection with a simple configuration.

Benefits of technology

The apparatus achieves high-accuracy surface shape inspection by utilizing rectangular wave illumination and phase image generation, effectively detecting defects on both flat and curved surfaces with reduced noise and improved sensitivity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026056014000001_ABST
    Figure 2026056014000001_ABST
Patent Text Reader

Abstract

It accurately inspects the surface shape of the object being inspected using a simple configuration. [Solution] The illumination device 10 irradiates the object to be inspected with patterned light whose light intensity changes in a rectangular wave shape, while shifting the phase of the patterned light. The imaging device 20 acquires multiple images with different phases by imaging the object to be inspected multiple times with the reflected light of the patterned light irradiated by the illumination device 10. The phase image generation unit 314 generates a phase image having a phase value obtained at a specific timing as a brightness value, based on the multiple images acquired by the imaging device 20. The inspection unit 315 inspects the surface shape of the object to be inspected based on the phase image generated by the phase image generation unit 314. For each pixel, the phase image generation unit 314 calculates a phase value using the brightness value in the image acquired at the rising or falling timing of the patterned light among the multiple images, and generates a phase image having the calculated phase value as a brightness value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a surface inspection apparatus, a surface inspection method, and a program.

Background Art

[0002] Techniques for inspecting the surface of an inspection object are known. For example, Patent Document 1 discloses a surface shape inspection apparatus that can inspect the surface of an inspection object in which fine irregularities and scratches are dispersed, for an inspection object whose surface has the property of specular reflection. More specifically, the surface shape inspection apparatus disclosed in Patent Document 1 irradiates the surface of the inspection object with pattern light whose light intensity changes periodically, and images the reflected light from the inspection object on which the pattern light is projected. Then, a phase image is created based on a plurality of captured images having different phases of the pattern light, and the surface shape of the inspection object is inspected based on the shape of the histogram of the phase image.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] By using a phase image as in the surface shape inspection apparatus disclosed in Patent Document 1, it becomes possible to accurately inspect the surface shape of the inspection object. However, on the other hand, when using sine-wave-shaped pattern light, the structure of the illumination tends to become complicated. Further, when trying to accurately represent a sine-wave-shaped pattern, the pattern width of one cycle in the illumination tends to become large, so that the phase change associated with the shape abnormality becomes small and the inspection accuracy decreases. In view of such circumstances, it is required to accurately inspect the surface shape of the inspection object even when using simpler illumination.

[0005] This invention was made to solve the above-mentioned problems, and aims to provide a surface inspection device, etc., that can accurately inspect the surface shape of an object to be inspected with a simple configuration. [Means for solving the problem]

[0006] To achieve the above objective, the surface inspection apparatus according to the first aspect of the present invention is: An illumination unit that irradiates an object to be inspected with patterned light whose light intensity changes in a rectangular wave shape, while shifting the phase of the patterned light, An imaging unit acquires multiple images with different phases by imaging the object to be inspected multiple times using the reflected light of the pattern light irradiated by the illumination unit, A phase image generation unit generates a phase image having a phase value obtained at a specific timing as a brightness value, based on the plurality of captured images acquired by the imaging unit. The system includes an inspection unit that inspects the surface shape of the object to be inspected based on the phase image generated by the phase image generation unit, The phase image generation unit calculates the phase value for each pixel using the brightness value in the captured image acquired at the rising or falling timing of the pattern light from among the plurality of captured images, and generates the phase image having the calculated phase value as the brightness value.

[0007] To achieve the above objective, the surface inspection method according to the second aspect of the present invention is: A lighting step in which patterned light, whose light intensity changes in a rectangular wave shape, is shone onto the object to be inspected while shifting the phase of the patterned light, An imaging step in which the object to be inspected is imaged multiple times using the reflected light of the pattern light irradiated in the illumination step, thereby acquiring multiple images with different phases, A phase image generation step, based on the plurality of captured images acquired in the imaging step, generates a phase image having a phase value obtained at a specific timing as a brightness value, The inspection step includes inspecting the surface shape of the object to be inspected based on the phase image generated in the phase image generation step, In the phase image generation step, for each pixel, the phase value is calculated using the brightness value in the captured image acquired at the rising or falling timing of the pattern light from among the plurality of captured images, and the phase image having the calculated phase value as the brightness value is generated.

[0008] To achieve the above objective, the program according to the third aspect of the present invention is: Computers, The lighting unit includes a lighting control unit that irradiates the object to be inspected with patterned light whose light intensity changes in a rectangular wave shape, while shifting the phase of the patterned light. The imaging unit captures multiple images with different phases by causing the inspection target to be imaged multiple times using the reflected light of the pattern light irradiated by the illumination unit, and the image acquisition unit captures multiple images with different phases. A phase image generation unit generates a phase image having a phase value obtained at a specific timing as a brightness value, based on the plurality of captured images acquired by the image acquisition unit. Based on the phase image generated by the phase image generation unit, it functions as an inspection unit that inspects the surface shape of the object to be inspected. The phase image generation unit calculates the phase value for each pixel using the brightness value in the captured image acquired at the rising or falling timing of the pattern light from among the plurality of captured images, and generates the phase image having the calculated phase value as the brightness value. [Effects of the Invention]

[0009] According to the present invention, the surface shape of an object to be inspected can be inspected with high accuracy using a simple configuration. [Brief explanation of the drawing]

[0010] [Figure 1] This is a schematic diagram showing the overall configuration of the surface inspection apparatus according to the embodiment. [Figure 2](A) is a diagram showing a light and dark pattern image displayed on the lighting device according to the embodiment. (B) is a diagram showing the profile of the light and dark pattern image shown in (A) in the phase shift direction. [Figure 3] It is a block diagram showing the configuration of the image processing apparatus according to the embodiment. [Figure 4] (A) to (C) are diagrams showing a state where the light and dark pattern images displayed on the lighting device according to the embodiment are shifted by a predetermined phase one by one. [Figure 5] (A) to (C) are diagrams showing examples of a plurality of captured images captured by the imaging device according to the embodiment. [Figure 6] It is a diagram showing an example of the difference image according to the embodiment. [Figure 7] (A) is a diagram showing an example of the phase image according to the embodiment. (B) is a diagram showing the profile of the phase image shown in (A) in the phase shift direction. [Figure 8] It is a diagram for explaining the contribution range in the lighting device according to the embodiment. [Figure 9] It is a diagram showing the profile of the captured image according to the embodiment in the phase shift direction. [Figure 10] It is a diagram showing an example of the change in the luminance value according to the phase of the pattern light irradiated from the lighting device for each pixel in the captured image according to the embodiment. [Figure 11] It is a diagram showing an example of the differential image of the phase image according to the embodiment. [Figure 12] It is a flowchart showing the flow of the surface inspection process executed by the surface inspection apparatus according to the embodiment.

Embodiments for Carrying Out the Invention

[0011] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the drawings, the same or corresponding parts are denoted by the same reference numerals.

[0012] The surface inspection apparatus 1 according to this embodiment is an apparatus for inspecting the surface of an object to be inspected K. More specifically, the surface inspection apparatus 1 determines whether or not there are defects on the surface of the object to be inspected K, and thereby inspects the surface condition and appearance of the object to be inspected K. Here, the object to be inspected K is an object with a mirror-like surface, such as the body or bumper of an automobile or a resin packaging film. The surface of the object to be inspected K is not limited to being flat, but may also be curved. A defect is an abnormal part that may exist on the surface of the object to be inspected K, and examples include dirt, scratches, foreign matter, dents, bulges, etc.

[0013] As shown in Figure 1, the surface inspection apparatus 1 comprises an illumination device 10, an imaging device 20, and an image processing device 30. These are also referred to as the illumination unit, the imaging unit, and the image processing unit, respectively. The details of each of these units will be described below.

[0014] <Lighting device (lighting unit) 10> The lighting device 10 is a unit that irradiates light onto the object to be inspected K. The lighting device 10 is equipped with a surface light source capable of emitting patterned light whose light intensity changes periodically, and irradiates the surface of the object to be inspected K with the patterned light emitted from the surface light source.

[0015] To explain in more detail, the lighting device 10 includes, for example, an electronic display (hereinafter simply referred to as "display") as a surface light source. The display is, for example, a liquid crystal display or an EL (Electro-Luminescence) display that can emit visible light in a planar manner. The lighting device 10 displays an image on the display and irradiates the object to be inspected K with display light L1 representing the displayed image. As a result, the object to be inspected K is illuminated by the lighting device 10.

[0016] More specifically, the illumination device 10 displays an image on the display representing patterned light in which the light intensity changes periodically in one direction (the X-axis direction in Figure 1). Specifically, when illuminating the object to be inspected K, the illumination device 10 displays the light-dark pattern image 11 shown in Figure 2(A) on the display. The light-dark pattern image 11 has multiple bright areas and multiple dark areas arranged alternately in the horizontal direction (X-axis direction). The multiple bright areas and multiple dark areas form a light-dark pattern in which light and dark are periodically repeated. Each bright area is a long rectangular bright region in the vertical direction (Y-axis direction), for example, a white region. Each dark area is a long rectangular dark region in the vertical direction (Y-axis direction), which is darker than the bright areas, i.e., a region with lower light intensity. Each dark area is, for example, a black region, i.e., a region that does not emit display light L1.

[0017] Figure 2(B) shows the profile of the light-dark pattern image 11 at the position indicated by the dashed arrow in Figure 2(A). As shown in Figure 2(B), the profile of the light-dark pattern image 11 in the X-axis direction, that is, in the direction in which the light intensity changes periodically, is rectangular wave-shaped. In the light-dark pattern image 11, the light intensity of each bright and dark area is constant. Also, the width s (hereinafter referred to as "slit width s") of each bright and dark area in the lateral direction (X-axis direction) is all equal. The sum of the width s of one bright area and the width s of one dark area corresponds to one period.

[0018] The lighting device 10 displays such a light and dark pattern image 11 on a display, and irradiates the object to be inspected K with display light L1, which is a rectangular wave-shaped pattern light (which may also be called "slit light"). The surface of the object to be inspected K is illuminated with the light and dark pattern shown by the display light L1. The display light L1 emitted from the display is specularly reflected off the surface of the object to be inspected K. The display light L1 reflected off the object to be inspected K is called reflected light L2.

[0019] <Imaging device (imaging unit) 20> The imaging device 20 is a unit that acquires an image of the inspection target K by imaging the inspection target K. The imaging device 20 is positioned on the same side as the illumination device 10 with respect to the inspection target K, and receives the reflected light L2 from the inspection target K of the pattern light irradiated by the illumination device 10. The imaging device 20 then images the inspection target K using the reflected light L2 and acquires an image of the inspection target K.

[0020] More specifically, the imaging device 20 includes, although not shown in the figures, a lens that focuses reflected light L2 and an image sensor that receives the reflected light L2 focused by the lens. The image sensor includes, for example, an image sensor such as a CCD (Charge Coupled Device) or CMOS (Complementary Metal Oxide Semiconductor). The image sensor receives the reflected light L2 reflected from the surface of the object to be inspected K and generates an image showing the brightness distribution of the surface of the object to be inspected K.

[0021] The reflected light L2 incident on the image sensor is photoelectrically converted by a photodiode and read out as a signal by a readout circuit (not shown in the diagram). The readout circuit includes, for example, an A / D (Analog / Digital) converter that converts the analog signal representing the image captured by the image sensor into digital data. The signal read out by the image sensor is output to the image processing device 30.

[0022] <Image processing unit (image processing unit) 30> Returning to Figure 1, the image processing device 30 performs image processing based on the image captured by the imaging device 20 to inspect for defects on the surface of the object K to be inspected. Specifically, the image processing device 30 is an information processing device such as a personal computer or a cloud server. The image processing device 30 may be integrated with at least one of the illumination device 10 and the imaging device 20 to form a single unit, or it may be located separately from the illumination device 10 and the imaging device 20. As shown in Figure 3, the image processing device 30 includes a control unit 31, a storage unit 32, an operation unit 33, a display unit 34, and a communication unit 35.

[0023] The control unit 31 includes a CPU (Central Processing Unit), ROM (Read Only Memory), and RAM (Random Access Memory). The CPU is a central processing unit that includes a microprocessor and performs various operations and calculations. In the control unit 31, the CPU reads the control program stored in the ROM and controls the operation of the entire image processing device 30 while using the RAM as work memory. The control unit 31 may also include an image processing processor such as a DSP (Digital Signal Processor) or GPU (Graphics Processing Unit).

[0024] The storage unit 32 is a non-volatile memory such as flash memory or a hard disk. The storage unit 32 stores programs and data executed by the control unit 31, as well as data generated by the control unit 31. The operation unit 33 is equipped with input devices such as a keyboard, mouse, or touch panel, and accepts user input. The display unit 34 is equipped with a display device such as a liquid crystal display or an organic EL (Electro-Luminescence) display, and displays various images under the control of the control unit 31. For example, the display unit 34 displays an image representing the inspection results from the surface inspection device 1.

[0025] The communication unit 35 is equipped with a communication interface for communicating with external devices of the image processing device 30. For example, the communication unit 35 communicates with external devices in accordance with well-known communication standards such as LAN (Local Area Network) and USB (Universal Serial Bus). Here, the external devices include the illumination device 10 and the imaging device 20. For example, the communication unit 35 communicates with the illumination device 10 and transmits control signals to the illumination device 10. The communication unit 35 also communicates with the imaging device 20 and acquires the image of the inspection target K captured by the imaging device 20.

[0026] Functionally, the control unit 31 comprises an illumination control unit 311, an image acquisition unit 312, a difference image generation unit 313, a phase image generation unit 314, an inspection unit 315, and an output unit 316. In the control unit 31, the CPU functions by reading a program stored in ROM into RAM and executing that program to control each of these units.

[0027] The lighting control unit 311 controls the illumination provided by the lighting device 10. The lighting control unit 311 supplies an image signal to the lighting device 10 via the communication unit 35. The lighting control unit 311 then displays a light-dark pattern image 11, which shows a rectangular wave-shaped pattern of light, on the display of the lighting device 10, as shown in Figure 2(A). The lighting device 10 displays the light-dark pattern image 11 on its display according to the image signal supplied from the lighting control unit 311 and irradiates the object to be inspected K with the pattern light represented by the light-dark pattern image 11.

[0028] More specifically, the lighting control unit 311 repeatedly displays the light and dark pattern image 11 on the display of the lighting device 10 while shifting the phase of the rectangular wave-shaped pattern light. Here, the phase is a value that represents the position within one cycle in the pattern light in which light and dark areas are periodically repeated.

[0029] To explain in more detail, the lighting control unit 311 displays the light and dark pattern images 11A, 11B, 11C, ... on the lighting device 10 in the order shown in Figures 4(A) to (C) at regular time intervals. Here, the phase of the pattern light in the light and dark pattern image 11B is shifted by φ in the X-axis direction compared to the light and dark pattern image 11A. Similarly, the phase of the pattern light in the light and dark pattern image 11C is shifted by φ in the X-axis direction compared to the light and dark pattern image 11B. Due to this phase shift in the X-axis direction, the bright or dark areas gradually disappear from the right edge of the display, and in their place, new bright or dark areas gradually appear from the left side of the display.

[0030] In this way, the lighting control unit 311 displays the light and dark pattern image 11 on the lighting device 10 while moving the display positions of the light and dark areas on the display by φ in the X-axis direction. As a result, the lighting device 10 irradiates the surface of the object to be inspected K with pattern light whose light intensity changes in a rectangular wave shape, while shifting its phase.

[0031] The phase shift amount φ is expressed as "2s / n" using the slit width s when the illumination device 10 is irradiated with the pattern light in n cycles (where n is a natural number greater than or equal to 2). In this case, when the phase shifts n times, the pattern light returns to its initial phase. For example, when n=5, the illumination control unit 311 displays the light / dark pattern image 11 on the illumination device 10 while shifting the light / dark pattern by 2s / 5 each time.

[0032] Returning to Figure 3, the image acquisition unit 312 acquires the image of the inspection target K captured by the imaging device 20. The image acquisition unit 312 supplies a control signal to the imaging device 20 via the communication unit 35 to instruct it to take an image. When the control signal is supplied, the imaging device 20 performs an imaging operation and takes an image of the inspection target K illuminated by the illumination device 10. The imaging device 20 supplies image data showing the image obtained by imaging to the image processing device 30. The image acquisition unit 312 acquires the image data supplied from the imaging device 20 via the communication unit 35 and stores it in the storage unit 32.

[0033] More specifically, the image acquisition unit 312 causes the imaging device 20 to image the inspection target K multiple times at a timing synchronized with the timing when the illumination control unit 311 displays the light-dark pattern image 11 on the illumination device 10. Specifically, the image acquisition unit 312 causes the imaging device 20 to image the inspection target K at each timing when the illumination device 10 is displaying the light-dark pattern images 11A, 11B, 11C, ... shown in Figures 4(A) to (C). In other words, the image acquisition unit 312 causes the imaging device 20 to image the inspection target K n times in one cycle. Here, n (times / cycle) is the number of times the imaging device 20 images the inspection target K per cycle of pattern light, and corresponds to the sampling number described later. As a result, the image acquisition unit 312 acquires images 21A, 21B, 21C, ... as shown in Figures 5(A) to (C).

[0034] Each of the multiple captured images 21A, 21B, 21C, ... is an image of the inspection target K with a light and dark pattern corresponding to the bright and dark areas projected onto its surface. The light and dark patterns in each captured image 21A, 21B, 21C, ... are shifted according to the phase of the pattern light (illumination pattern) emitted from the illumination device 10. In this way, the image acquisition unit 312 acquires multiple captured images 21A, 21B, 21C, ... with different phases of the pattern light. Figures 5(A) to (C) show an example where the surface of the inspection target K is flat. If the surface of the inspection target K is curved, distortion occurs in the light and dark patterns in the multiple captured images 21A, 21B, 21C, ...

[0035] In each of the captured images 21A, 21B, 21C, ..., the direction in which the phase shifts is defined as the X-axis direction, and the direction perpendicular to the X-axis direction is defined as the Y-axis direction, similar to the light and dark pattern images 11A, 11B, 11C, .... Hereafter, when referring to multiple captured images 21A, 21B, 21C, ... without distinguishing between them, they will be collectively referred to as captured image 21.

[0036] As an example, the captured images 21A, 21B, 21C, ... shown in Figures 5(A) to (C) capture defects X1 and X2 present on the surface of the object K being inspected. Here, defect X1 is a defect such as dirt, scratches, or foreign matter. Defect X2 is a defect caused by abnormal surface irregularities such as depressions or bulges. In other words, defect X1 corresponds to defects other than surface shape (first type of defect), and defect X2 corresponds to surface shape defects (second type of defect). The illumination device 10 irradiates the object K being inspected with patterned light while shifting the phase, so that the bright and dark parts of the patterned light pass through defects X1 and X2, respectively. Therefore, by taking multiple images with the imaging device 20, captured images 21 are obtained for cases where defects X1 and X2 are located in the bright and dark parts, respectively.

[0037] Each captured image 21 may be a color image or a grayscale image. For the sake of clarity, in the following explanation, each captured image 21 will be described as a 256-level grayscale image with each pixel having a brightness value between 0 and 255.

[0038] The image processing device 30 inspects the surface of the object to be inspected K based on a plurality of captured images 21A, 21B, 21C, ... acquired by the image acquisition unit 312. Specifically, the image processing device 30 performs a first inspection using difference images and a second inspection using phase images. Each of these will be described below.

[0039] Returning to Figure 3, the difference image generation unit 313 generates the difference image 22 shown in Figure 6 based on the multiple captured images 21A, 21B, 21C, ... acquired by the image acquisition unit 312. Here, the difference image 22 is an image in which the difference between the maximum and minimum brightness values ​​in the multiple captured images 21A, 21B, 21C, ... is used as the brightness value for each pixel. The difference image generation unit 313 calculates the difference between the maximum and minimum brightness values ​​in the multiple captured images 21A, 21B, 21C, ... for each pixel and generates a difference image 22 in which the calculated difference is used as the brightness value for each pixel.

[0040] More specifically, the difference image generation unit 313 compares the luminance values ​​(for example, values ​​ranging from 0 to 255 corresponding to 256 gradations) of pixels at the same coordinates in the multiple captured images 21A, 21B, 21C, ..., and identifies the maximum and minimum luminance values. Here, the maximum luminance value of a pixel corresponds to the luminance value when that pixel is illuminated by the bright part of the pattern light. The minimum luminance value of a pixel corresponds to the luminance value when that pixel is illuminated by the dark part of the pattern light. The difference image generation unit 313 calculates the difference between the identified maximum and minimum luminance values ​​for each pixel at each coordinate and generates a difference image 22 in which the calculated difference is used as the luminance value for each pixel.

[0041] Specifically, the brightness value of the pixel at coordinate (x,y) in the i-th image (i=1,2,3,...) among the multiple captured images 21A, 21B, 21C,... is represented as Pxy(i). In this case, the maximum and minimum brightness values ​​of the pixel at coordinate (x,y) are represented as max(Pxy(i)) and min(Pxy(i)), respectively. The difference image generation unit 313 calculates the brightness value Sxy of the pixel at coordinate (x,y) in the difference image 22 using the following equation (1). Sxy = max(Pxy(i))-min(Pxy(i)) …(1)

[0042] For example, if the brightness value of the pixel at coordinate (x,y) is largest in the captured image 21A and smallest in the captured image 21C, then the value obtained by subtracting the brightness value of the pixel at coordinate (x,y) in the captured image 21C from the brightness value of the pixel at coordinate (x,y) in the captured image 21A will be the brightness value of the pixel at coordinate (x,y) in the difference image 22.

[0043] If defects X1 and X2 are captured in each of the captured images 21A, 21B, 21C, ..., then defects X1 and X2 are also captured in the difference image 22, as shown in Figure 6. Generally, the reflectance of the display light L1 in the defective area, such as dirt, scratches, or foreign matter like defect X1, is different from that of the normal area on the surface of the object K being inspected. Therefore, the difference between the maximum and minimum brightness values ​​in the area of ​​defect X1 is smaller than the difference in the normal area. In other words, the brightness value of the area of ​​defect X1 in the difference image 22 is smaller than that of the normal area. Defect X1 can be detected by utilizing the brightness value in such a difference image 22. In particular, since the difference image 22 takes the difference in brightness values, the influence of noise can be reduced, so the difference between the area of ​​defect X1 and the normal area is emphasized compared to the captured image 21. Therefore, by using the difference image 22, it becomes possible to accurately determine the presence or absence of defect X1.

[0044] Returning to Figure 3, the phase image generation unit 314 generates a phase image 23 as shown in Figure 7(A) based on a plurality of captured images 21A, 21B, 21C, ... acquired by the image acquisition unit 312. Here, the phase image 23 is an image in which the phase value, which is a value corresponding to the phase in the pattern light, is used as the brightness value of each pixel. More specifically, the phase value is a value corresponding to the phase at a specific timing (for example, at the time of the first capture) when viewing the plurality of captured images 21A, 21B, 21C, ... for individual pixel coordinates.

[0045] Figure 7(B) shows the profile of the phase image 23 at a location where defects X1 and X2, indicated by dashed arrows in Figure 7(A), are not present. As shown in Figure 7(B), the brightness value of each pixel in the phase image 23 corresponds to the phase, so when the surface of the object K being inspected is planar, it becomes a periodic value in the X-axis direction, which is the phase shift direction. The repetition period in the phase image 23 corresponds to the repetition period of the pattern light irradiated by the illumination device 10 (width 2s in the light / dark pattern image 11).

[0046] The phase image 23 is used to accurately determine the presence or absence of surface morphological defects such as defect X2. Specifically, if there are gentle irregularities on the surface of the object K to be inspected, the reflectance of the display light L1 in the irregular areas is about the same as that of the normal areas. Therefore, the difference in reflectance between the irregular areas and the normal areas is smaller than in the case of defect X1. For this reason, unlike defect X1, it is difficult to accurately detect defect X2 with the difference image 22. On the other hand, in the phase image 23, if there are gentle irregularities on the surface of the object K to be inspected, a deviation from the ideal profile shown in Figure 7(B) occurs. Therefore, the phase image generation unit 314 generates the phase image 23 in order to accurately determine the presence or absence of defect X2. The specific procedure for generating the phase image 23 is described below.

[0047] Here, since the pattern light emitted by the illumination device 10 is rectangular in shape, it may appear at first glance that accurately detecting the phase from the captured image 21 is difficult compared to the case where the pattern light is sinusoidal. However, as shown in Figure 2(B), even if the pattern light is rectangular on the illumination side, the waveform on the imaging side does not become a perfect rectangle due to the effect of the aperture, and the edges of the waveform become sloped. By utilizing this slope generated by the effect of the aperture, it is possible in principle to accurately detect the phase.

[0048] Specifically, as shown in Figure 8, we consider the case where the display light L1 emitted from the illumination device 10 is specularly reflected at a point of interest on the surface of the object to be inspected K. In Figure 8, for ease of understanding, a schematic representation of some of the bright and dark areas in the light and dark pattern image 11 displayed on the display of the illumination device 10 is shown. The light and dark pattern image 11 displayed on the display of the illumination device 10 has a contribution range that contributes to the brightness value of individual pixels in the captured image 21. This contribution range depends on the aperture angle θ of the imaging device 20 and the illumination distance d, which is the distance between the illumination device 10 and the object to be inspected K. Specifically, the width of the contribution range in the X-axis direction (phase shift direction) is expressed as "2d × tanθ".

[0049] Because of the existence of such contribution ranges, when the captured image 21 is acquired while shifting the light / dark pattern image 11 in sufficiently fine increments, the captured image 21 will have a state in which light and dark areas are mixed within the contribution range. Therefore, even when a rectangular wave pattern light is irradiated, the profile of the captured image 21 in the X-axis direction will have a sloped edge portion of the rectangular wave, as shown in Figure 9. Note that Figure 9 shows an example where the surface of the object to be inspected K is flat. If the surface of the object to be inspected K is curved, the profile will be more distorted than in Figure 9, but the edge portion of the rectangular wave will still be sloped, similar to Figure 9.

[0050] To explain in more detail, if the contributing range contains only bright areas and no dark areas, the portion of the captured image 21 corresponding to that contributing range will correspond to the peak of a rectangular wave, as shown in (a) in Figure 9, and the brightness value of this portion will be the maximum. Conversely, if the contributing range contains only dark areas and no bright areas, the portion of the captured image 21 corresponding to that contributing range will correspond to the trough of a rectangular wave, as shown in (c) in Figure 9, and the brightness value of this portion will be the minimum. In contrast, if the contributing range contains a mixture of bright and dark areas, the portion of the captured image 21 corresponding to that contributing range will be slope-shaped, as shown in (b) or (d) in Figure 9, and the brightness value of this portion will be between the maximum and minimum values.

[0051] The width a (hereinafter referred to as "maximum width a") of the range (a) or (c) corresponding to the peak (maximum value) or trough (minimum value) of such a rectangular wave is expressed as shown in equation (2) below, using the slit width s, which is the width of the pattern light in the phase shift direction (X-axis direction), and the width of the contributing range 2d × tanθ. a = (s-2d×tanθ) / 2s …(2)

[0052] The maximum width a is the ratio of the width of the maximum value portion in the waveform of one period in the captured image 21. The width of the sloped range (b) or (d) (hereinafter referred to as "slope width") is expressed as "(1-2a) / 2". Thus, the maximum width a and the slope width in the captured image 21 can be adjusted by changing the slit width s and the illumination distance d.

[0053] The phase image generation unit 314 uses the luminance values ​​of the slope-shaped range (b) or (d) in the captured image 21 to extract values ​​corresponding to the phase at a specific timing and generate a phase image 23. Here, Figure 10 shows an example of the change in luminance value of individual pixels in the captured image 21 according to the phase of the illumination pattern. When the number of samples n per cycle is sufficiently large, the luminance value of each pixel in the captured image 21 shows (a) the peak of the rectangular wave, (b) the falling edge, (c) the trough of the rectangular wave, and (d) the rising edge, as shown by the dashed lines in Figure 10.

[0054] However, in reality, due to factors such as imaging time and data volume, it is difficult to sufficiently increase the sampling rate n (times / period), which is the number of times an image 21 is acquired per period. Therefore, multiple images 21 are acquired with a certain phase interval, for example, as shown by the sampling timing indicated by the black dots in Figure 10. In order to generate the phase image 23 and the difference image 22 described above, it is generally necessary to acquire the brightness value of each pixel in each of the intervals (a) to (d), depending on the conditions. To do this, it is necessary to adjust the sampling rate n so that the brightness value of each pixel is acquired at a timing in each of the intervals (a) to (d) when the image 21 is acquired.

[0055] Firstly, in order to generate the difference image 22, the maximum and minimum brightness values ​​of each pixel are required. To do this, at least one of the multiple captured images 21A, 21B, 21C, ... must be acquired at timings within the peak (maximum value) interval of (a) and at timings within the trough (minimum value) interval of (c). In this case, as shown in equation (3) below, the condition that the maximum value width a is 1 / n period or greater must be satisfied. a ≥ 1 / n …(3)

[0056] Secondly, in order to generate the phase image 23, the brightness value at the rising or falling timing of the pattern light at each pixel is required. To this end, at least one of the multiple captured images 21A, 21B, 21C, ... must be acquired at a timing within the falling interval of (b) or the rising interval of (d). In particular, when the maximum width a is a variable, the brightness value at the rising and falling timings of the pattern light is required, and the condition that the slope width (1-2a) / 2 is 1 / n period or greater must be satisfied, as shown in equation (4) below. (1-2a) / 2 ≥ 1 / n …(4)

[0057] Solving equations (3) and (4) above for the maximum width a yields equation (5) below. In order to generate the difference image 22 and the phase image 23, at least one of the maximum width a and the number of samples n is set to a value that satisfies the condition of equation (5). Here, the maximum width a is determined by the slit width s and the illumination distance d, as in equation (2) above. Therefore, in other words, equation (5) is set to a value such that at least one of the slit width s, illumination distance d and the number of samples n is acquired at timings (a) to (d) among the multiple captured images 21A, 21B, 21C, ... 1 / n ≤ a ≤ 1 / 2 - 1 / n …(5)

[0058] When the maximum value width a and the number of samples n satisfy the conditions of equation (5) above, among the multiple captured images 21A, 21B, 21C, ... there exist captured images 21 acquired in each of the intervals (a) to (d). The difference image generation unit 313 generates a difference image 22 based on the difference between the maximum and minimum values ​​of the brightness value, as described above, and therefore uses the captured images 21 acquired in intervals (a) and (c). On the other hand, the phase image generation unit 314 generates a phase image 23 based on the captured images 21 acquired in intervals (b) and (d). The process of generating the phase image 23 by the phase image generation unit 314 will be described below.

[0059] The phase image generation unit 314 identifies, for each pixel, the image 21 acquired at the rising or falling timing of the pattern light, i.e., the image 21 acquired in the interval of (b) or (d), from among the multiple image images 21A, 21B, 21C, ... Here, the rising or falling timing of the pattern light differs depending on the pixel, but it can be determined by calculating the difference in brightness values ​​between adjacent image images 21 among the multiple image images 21A, 21B, 21C, ... and confirming the amount of the difference.

[0060] The phase image generation unit 314 identifies the captured image 21 acquired in interval (b) or (d) for each pixel, and calculates a phase value, which is a value corresponding to the phase at a specific timing such as the initial capture, from the brightness value in the identified captured image 21 according to a predetermined conversion formula. The phase image generation unit 314 then generates a phase image 23 in which the calculated phase value is the brightness value of each pixel.

[0061] For a more detailed explanation, the change in the luminance value accompanying the phase change of the illumination pattern in the sections (a) to (d) indicated by the dashed line in FIG. 10 is expressed using mathematical formulas. When the phase of the luminance waveform within one period for pixel coordinates (x, y) is set as t (0 ≤ t < 1) and the luminance value is represented as Pxy(t), the luminance value Pxy(t) is expressed as functions of the phase t by the following formulas (6) to (9). Specifically, in the section (a) (0 ≤ t ≤ a), as shown in the following formula (6), the luminance value Pxy(t) is constant at the maximum value H. In the section (b) (a < t < 1 / 2), as shown in the following formula (7), the luminance value Pxy(t) decreases with the phase. In the section (c) (1 / 2 ≤ t ≤ 1 / 2 + a), as shown in the following formula (8), the luminance value Pxy(t) is constant at the minimum value 0. In the section (d) (1 / 2 + a < t < 1), as shown in the following formula (9), the luminance value Pxy(t) increases with the phase. Formula (7) is a relational formula representing the relationship between the luminance value Pxy(t) and the phase t in the captured image obtained at the timing of the fall of the pattern light, and formula (9) is a relational formula representing the relationship between the luminance value Pxy(t) and the phase t in the captured image obtained at the timing of the rise of the pattern light.

[0062] (a) Pxy(t) = H …(6) (b) Pxy(t) = -2H×(t - 1 / 2) / (1 - 2a)…(7) (c) Pxy(t) = 0 …(8) (d) Pxy(t) = 2H×(t - 1) / (1 - 2a)+H …(9)

[0063] In the above formulas (6) to (9), the timing at the start of the section (a) is set as the phase t = 0, and the timing at the end of the section (d) is set as the phase t = 1. However, this is not restrictive, and an appropriate timing can be set as the initial value of the phase t. Also, in formula (8), the luminance value Pxy(t) in the section (c) is set to 0. However, this is not restrictive, and even if the minimum value of the luminance value is a general value other than 0, formulas similar to the above formulas (6) to (9) can be used by considering an appropriate offset.

[0064] The phase image generation unit 314 uses equations (7) and (9) as conversion formulas to calculate the phase value b at the time of the first image acquisition from the luminance value. First, for each pixel, the phase image generation unit 314 calculates the difference in luminance values ​​between adjacent captured images 21A, 21B, 21C, ... and calculates the imaging timing of the rising and falling edges of the pattern light based on the calculated difference. Hereinafter, the imaging timing of the falling edge will be expressed as p+1, and the imaging timing of the rising edge will be expressed as q+1. The phase value b corresponds to the phase value at the time of the first image acquisition, with the completion of the rising edge as the reference point.

[0065] First, by substituting the brightness value Pxy(b+q / n) at t=b+q / n (where n is the sampling number), obtained in interval (d) during the q+1th imaging, into equation (9), an equation with unknowns a and b is obtained. Next, by substituting the brightness value Pxy(b+p / n+α), obtained in interval (b) during the p+1th imaging, at t=b+p / n+α, into equation (7), an equation with unknowns a and b is obtained. The α term is a correction term used to ensure that the falling edge comes first in the calculation, because in one period of equations (6) to (9), α=-1 when p>q and α=0 otherwise. At this point, since there are only two unknowns, a and b, in equations (7) and (9), the maximum width a and phase value b can be found by solving the system of equations. Specifically, by eliminating the maximum value width a from the system of equations and solving for the phase value b, a conversion formula is obtained that converts the luminance value Pxy(b+q / n) and the luminance value Pxy(b+p / n+α) to the phase value b. Similarly, by eliminating the phase value b from the system of equations and solving for the maximum value width a, the maximum value width a can be calculated. The phase image generation unit 314 performs calculations for the maximum value width a and the phase value b based on this procedure. The maximum value H can be the difference between the maximum and minimum luminance values, which is calculated by the difference image generation unit 313 when generating the difference image 22.

[0066] In this case, the phase value is not limited to the phase value b at the time of initial image acquisition; a phase value ba / 2 based on the peak center may also be used. Furthermore, for the purpose of simplicity and improved noise immunity, the peak may be calculated after performing a moving average processing that takes periodicity into consideration. In addition, if the maximum value width a can be considered a constant, the phase value may be obtained from the brightness value in the captured image 21 acquired at either the rising or falling timing of the pattern light, and from the maximum and minimum values ​​of the brightness value function Pxy(t).

[0067] The phase values ​​calculated in this way are offset, taking periodicity into consideration, so that they are between 0 and 1, and then replaced with 256 gradations, which are set as the brightness value Qxy of coordinate (x,y) in the phase image 23. The phase image generation unit 314 calculates the phase value from the brightness value Pxy(t) acquired in the interval of (b) or (d) in this way for each pixel of coordinate (x,y) included in the captured image 21, and sets the brightness value Qxy in the phase image 23. As a result, the phase image generation unit 314 generates a phase image 23 as shown in Figure 7(A).

[0068] Returning to Figure 3, the inspection unit 315 inspects the surface of the object K. Based on the difference image 22 generated by the difference image generation unit 313 and the phase image 23 generated by the phase image generation unit 314, the inspection unit 315 determines whether or not there are defects on the surface of the object K.

[0069] Firstly, the inspection unit 315 determines, based on the difference image 22 generated by the difference image generation unit 313, whether or not a defect of a first type, such as defect X1, exists on the surface of the object to be inspected K. Specifically, the inspection unit 315 determines whether or not there is a region in the difference image 22 that satisfies the first defect condition. The first defect condition is a condition for determining the presence or absence of a defect of a first type. As shown in Figure 6, the part of the difference image 22 where defect X1 exists has a lower brightness value than the normal part. Therefore, the inspection unit 315 can determine, as an example, that a region in which a predetermined number or more pixels with a brightness value smaller than a threshold are concentrated is a region that satisfies the first defect condition. Specifically, the inspection unit 315 generates a binarized image in the difference image 22 in which pixels with a brightness value of 1 or higher than the threshold are set to "1" (white) and pixels with a brightness value of less than the threshold are set to "0" (black). The inspection unit 315 then determines that regions in the binarized image where a predetermined number or more pixels of "0" are concentrated are regions that satisfy the first defect condition.

[0070] The first defect condition is not limited to this, and various conditions can be adopted as the first defect condition. For example, the inspection unit 315 may identify a region in which a predetermined number or more pixels with a brightness value smaller than a threshold are concentrated, and determine whether the identified region satisfies the first defect condition based on the characteristics of the identified region. Here, the characteristics of the region are, for example, the shape and size of the region. For example, if the shape and size of the identified region match the shape and size typical of dirt, the inspection unit 315 will determine that a dirt defect exists in the identified region. The same applies to defects such as scratches and foreign objects.

[0071] Alternatively, the inspection unit 315 may perform a predetermined process on the brightness value of each pixel in the difference image 22 and determine whether or not there is a region in the difference image 22 that satisfies the first defect condition based on the brightness value after the predetermined process. In this way, regardless of what condition is adopted as the first defect condition, the difference image 22 emphasizes the parts where the first type of defect exists, such as dirt, scratches, or foreign objects, compared to the captured image 21. Therefore, the inspection unit 315 can accurately determine the presence or absence of the first type of defect by using the difference image 22.

[0072] Secondly, the inspection unit 315 determines, based on the phase image 23 generated by the phase image generation unit 314, whether or not there are surface shape defects of a second type of defect, such as defect X2, on the surface of the object to be inspected K. This allows the inspection unit 315 to check whether or not there are abnormalities such as depressions or bulges in the surface shape of the object to be inspected K.

[0073] Specifically, the inspection unit 315 calculates the difference in brightness value between each pixel of the phase image 23 generated by the phase image generation unit 314 and other pixels in the phase shift direction (X-axis direction). Based on the calculated difference, it generates the differential image 24 shown in Figure 11. The differential image 24 is obtained by taking the first derivative of the brightness value for each pixel of the phase image 23 in the X-axis direction (phase shift direction), that is, by calculating the difference in brightness value between adjacent pixels in the X-axis direction. The brightness value Rxy of coordinate (x,y) in the differential image 24 is calculated by the difference between the brightness value Qxy of coordinate (x,y) and the brightness value Q(x+1)y of coordinate (x+1,y) in the phase image 23, as shown in equation (10) below. Rxy = Qxy - Q(x+1)y …(10)

[0074] Furthermore, when the inspection unit 315 generates a differential image 24 from the phase image 23, it calculates the brightness value Rxy in the differential image 24 by adding an appropriate offset to eliminate the phase jump (the edge portion of the profile shown in Figure 7(B)) that exists in each period. The differential image 24 is an example of an image based on the phase image 23.

[0075] When the differential image 24 is generated, the inspection unit 315 determines whether or not there is a region in the differential image 24 that satisfies the second defect condition. The second defect condition is a condition for determining whether or not there is a surface shape defect such as a depression or a bulge. Specifically, the inspection unit 315 performs image processing such as shading correction on the differential image 24. Then, the inspection unit 315 extracts bright or dark areas from the differential image 24 after image processing, and determines whether or not there is a region in the differential image 24 that satisfies the second defect condition based on the brightness values ​​of the extracted bright or dark areas. If there is a region that satisfies the second defect condition, the inspection unit 315 determines that there is a surface shape defect such as defect X2 in that region.

[0076] Furthermore, the second defect condition is not limited to this, and various conditions can be adopted as the second defect condition. For example, the inspection unit 315 generates a histogram of brightness values ​​for each of several regions in the differential image 24. The inspection unit 315 then compares the peak value or standard deviation of the histogram with a predetermined threshold. As a result of the comparison, the inspection unit 315 may determine that a region where the peak value is smaller than the threshold, or a region where the standard deviation is larger than the threshold, satisfies the second defect condition, and may determine that a surface shape defect such as defect X2 exists in that region. Regardless of the conditions adopted as the second defect condition, the inspection unit 315 can accurately determine the presence or absence of surface shape defects such as depressions and bulges by using the phase image 23.

[0077] Returning to Figure 3, the output unit 316 outputs the inspection results from the inspection unit 315. Specifically, the output unit 316 displays an image showing the inspection results from the inspection unit 315 on the display unit 34. Alternatively, the output unit 316 is not limited to displaying the inspection results from the inspection unit 315 on the display unit 34, but may also output them to an external device via the communication unit 35.

[0078] For example, if the inspection unit 315 determines that defects X1 and X2 exist on the surface of the object to be inspected K, the output unit 316 displays an image on the display unit 34 showing the locations of defects X1 and X2 on the surface of the object to be inspected K. In this case, if it is determined that a first type of defect X1 is present, the output unit 316 may display the difference image 22 shown in Figure 6 on the display unit 34 and also highlight the area of ​​defect X1 within the displayed difference image 22. If it is determined that a second type of defect X2 is present, the output unit 316 may display the differential image 24 shown in Figure 11 on the display unit 34 and also highlight the area of ​​defect X2 within the displayed differential image 24. Through this output processing by the output unit 316, the user can confirm the presence or absence of defects X1 and X2 on the surface of the object to be inspected K.

[0079] Next, the flow of the surface inspection process performed by the surface inspection device 1 will be explained with reference to the flowchart shown in Figure 12. The surface inspection process shown in Figure 12 is performed by the control unit 31 of the image processing device 30 when the user operates the operation unit 33 of the image processing device 30 to instruct the start of the surface inspection process, provided that the illumination device 10 is able to illuminate the inspection target K and the imaging device 20 is able to image the inspection target K. The surface inspection process shown in Figure 12 is an example of a surface inspection method.

[0080] When the surface inspection process is started, the control unit 31 functions as an illumination control unit 311 and causes the illumination device 10 to irradiate the object to be inspected K with a rectangular wave pattern light (step S1). Specifically, the control unit 31 displays the light and dark pattern image 11 shown in Figure 2(A) on the display of the illumination device 10 and irradiates the object to be inspected K with the display light L1 corresponding to the light and dark pattern image 11.

[0081] When the illumination device 10 is irradiated with patterned light, the control unit 31 functions as an image acquisition unit 312 and causes the imaging device 20 to image the object to be inspected K (step S2). Specifically, the control unit 31 causes the imaging device 20 to image the object to be inspected K at a timing synchronized with the timing when the illumination device 10 is irradiated with patterned light, and acquires an image 21 using the reflected light L2 reflected from the surface of the object to be inspected K.

[0082] When an image 21 is acquired, the control unit 31 determines whether the number of acquisitions has reached a specified value (step S3). The specified value is set to n, for example, the number of samples per cycle, in order to acquire multiple images 21 with different phases over one cycle.

[0083] If the number of imaging cycles has not reached the specified value (step S3; NO), the control unit 31 shifts the phase of the pattern light emitted by the illumination device 10 by a predetermined shift amount φ (step S4). Then, the control unit 31 returns to step S2 and has the imaging device 20 image the inspection target K illuminated by the phase-shifted pattern light, thereby acquiring an image 21 of the inspection target K. In this way, the control unit 31 continues to shift the phase of the pattern light emitted from the illumination device 10 by φ each time until the number of imaging cycles reaches the specified value, while having the imaging device 20 image the inspection target K. As a result, the control unit 31 acquires multiple image images 21A, 21B, 21C, ... with shifted phases, as shown in Figures 5(A) to (C).

[0084] Subsequently, when the number of imaging cycles reaches a specified value (step S3; YES), the control unit 31 performs inspection processing of the inspection target K based on the multiple imaging images 21 acquired in step S2. Firstly, the control unit 31 functions as a difference image generation unit 313 and generates a difference image 22 from the multiple imaging images 21 (step S5). Specifically, the control unit 31 calculates the difference between the maximum and minimum brightness values ​​in the multiple imaging images 21 acquired in step S2 for each pixel. Then, the control unit 31 generates a difference image 22, as shown in Figure 6, in which the calculated difference is used as the brightness value for each pixel.

[0085] Secondly, the control unit 31 functions as a phase image generation unit 314 and generates a phase image 23 from a plurality of captured images 21 (step S6). Specifically, the control unit 31 identifies, for each pixel, the captured image 21 acquired at the rising or falling timing of the pattern light from among the plurality of captured images 21 acquired in step S2. Next, the control unit 31 calculates the phase t obtained for a specific timing, such as the initial capture, from the brightness value of the identified captured image 21 according to equation (7) or (9) above. Then, the control unit 31 generates a phase image 23, as shown in Figure 7, in which the phase value based on the calculated phase t is used as the brightness value of each pixel.

[0086] Once the difference image 22 and the phase image 23 are generated, the control unit 31 functions as an inspection unit 315 and determines whether or not there are defects in the object K to be inspected (step S7). Specifically, the control unit 31 determines whether or not there are defects other than surface defects such as defect X1 based on the difference image 22. The control unit 31 also determines whether or not there are surface defects such as defect X2 based on the phase image 23.

[0087] Once the presence or absence of defects is determined, the control unit 31 functions as an output unit 316 and displays the determination result from step S7, outputs it externally via communication, etc. (step S8). With this, the surface inspection process shown in Figure 12 is completed.

[0088] As described above, the surface inspection apparatus 1 according to this embodiment irradiates the inspection target K with pattern light whose light intensity changes in a rectangular wave shape while shifting its phase, and acquires multiple images of the inspection target K multiple times by imaging the reflected light of the irradiated pattern light, thereby acquiring multiple images with different phases.The surface inspection apparatus 1 according to this embodiment generates a phase image 23 using the brightness value of the image 21 acquired at the rising or falling timing of the pattern light, and determines the presence or absence of defects in the inspection target K based on the phase image 23.In this way, since the surface inspection apparatus 1 according to this embodiment uses the brightness value of the image 21 acquired at the rising or falling timing of the pattern light, even when using a simpler rectangular wave pattern light instead of a sinusoidal pattern light, the surface shape of the inspection target K can be inspected based on the phase image 23.As a result, with a simple configuration, surface shape defects that are difficult to inspect with difference images 22 can be inspected with high accuracy.

[0089] In particular, to improve inspection sensitivity and inspection range (depth of field), it is generally desirable to reduce the aperture angle θ of the imaging device 20 and set the viewing angle per cycle of the pattern light accordingly. When the aperture angle θ of the imaging device 20 is small, it is necessary to realize a pattern light with a narrow slit width s in the illumination device 10 to match the aperture angle θ. However, when using sinusoidal pattern light, it is difficult to narrow the slit width s with sinusoidal pattern light when displaying a light / dark pattern image 11 on a display. It is possible to reduce the viewing angle by increasing the illumination distance d, but in that case the inspection range becomes narrower. In contrast, in this embodiment, since rectangular wave pattern light is used, it is easy to narrow the slit width s, and it is easy to reduce the aperture angle θ of the imaging device 20. Therefore, it is advantageous in improving inspection sensitivity and inspection range.

[0090] Furthermore, when using sinusoidal patterned light, it is possible to design and manufacture a sinusoidal grating for irradiating sinusoidal patterned light and to create a mechanism to shift the phase by moving the sinusoidal grating, but this is expected to be time-consuming and costly. In contrast, in this embodiment, since rectangular wave patterned light is used, the configuration of the lighting device 10 can be simplified, thereby reducing time and cost.

[0091] Furthermore, when using sinusoidal pattern light, its amplitude is susceptible to noise, and the detection sensitivity for defects other than surface shape tends to decrease. In contrast, in this embodiment, since rectangular wave pattern light is used, the maximum and minimum values ​​of the pattern light can be sampled, and the amplitude can be stably detected. Therefore, not only surface shape defects but also defects other than surface shape, such as dirt, scratches, and foreign matter, can be detected with high accuracy.

[0092] (modified version) Although embodiments of the present invention have been described above, it is possible to combine the embodiments, or to modify or omit the embodiments as appropriate.

[0093] For example, in the above embodiment, the lighting device 10 irradiated the object to be inspected K with a rectangular wave pattern light by displaying a light / dark pattern image 11 on a display. However, the lighting device 10 is not limited to using a display, as long as it is capable of irradiating pattern light whose light intensity changes in a rectangular wave shape while shifting its phase.

[0094] Furthermore, in the above embodiment, the illumination device 10 shifted the phase of the rectangular wave-shaped pattern light while moving the display positions of the bright and dark parts of the light and dark pattern image 11 displayed on the display by φ in the X-axis direction. However, the phase shift of the pattern light is not limited to this, and it is sufficient to shift the phase relative to the illumination device 10 and the object to be inspected K. For example, it is not limited to moving the light and dark pattern image 11 within the display, but the display or the illumination device 10 itself may be moved. Alternatively, the object to be inspected K may be moved by transporting the object to be inspected K and the imaging device 20 in sync using a transport device.

[0095] In the above embodiment, the control unit 31 of the image processing device 30 functioned as the respective parts shown in Figure 3 by the CPU executing a program stored in the ROM or storage unit 32. However, the control unit 31 may be dedicated hardware. Dedicated hardware includes, for example, a single circuit, a composite circuit, a programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a combination thereof. If the control unit 31 is dedicated hardware, each function of the respective parts may be implemented with separate hardware, or the functions of each part may be implemented together with a single piece of hardware.

[0096] Furthermore, some of the functions of each part may be implemented by dedicated hardware, while other parts may be implemented by software or firmware. In this way, the control unit 31 can implement the above-mentioned functions by hardware, software, firmware, or a combination thereof.

[0097] It is also possible to make an existing computer, such as a personal computer or cloud server, function as the image processing device 30 by applying the program that defines the operation of the image processing device 30 described above to the computer.

[0098] Furthermore, the method of distribution of such programs is optional. For example, they may be distributed by storing them on computer-readable storage media such as CD-ROMs (Compact Disk ROMs), DVDs (Digital Versatile Disks), MOs (Magneto Optical Disks), or memory cards, or they may be distributed via communication networks such as the Internet.

[0099] This invention allows for various embodiments and modifications without departing from the broad spirit and scope of the invention. Furthermore, the embodiments described above are for illustrative purposes only and do not limit the scope of the invention. In other words, the scope of the invention is indicated not by the embodiments, but by the claims. Various modifications made within the scope of the claims and the equivalent scope of the meaning of the invention are considered to be within the scope of this invention. [Explanation of Symbols]

[0100] 1 Surface inspection device, 10 Illumination device, 11 Brightness pattern image, 20 Imaging device, 21 Acquired image, 22 Difference image, 23 Phase image, 24 Differential image, 30 Image processing device, 31 Control unit, 32 Storage unit, 33 Operation unit, 34 Display unit, 35 Communication unit, 311 Illumination control unit, 312 Acquired image acquisition unit, 313 Difference image generation unit, 314 Phase image generation unit, 315 Inspection unit, 316 Output unit, K Inspection target, X1, X2 Defect

Claims

1. An illumination unit that irradiates an object to be inspected with patterned light whose light intensity changes in a rectangular wave shape, while shifting the phase of the patterned light, An imaging unit acquires multiple images with different phases by imaging the object to be inspected multiple times using the reflected light of the pattern light irradiated by the illumination unit, A phase image generation unit generates a phase image having a phase value obtained at a specific timing as a brightness value, based on the plurality of captured images acquired by the imaging unit. The system includes an inspection unit that inspects the surface shape of the object to be inspected based on the phase image generated by the phase image generation unit, The phase image generation unit calculates the phase value for each pixel using the brightness value in the captured image acquired at the rising or falling timing of the pattern light from among the plurality of captured images, and generates the phase image having the calculated phase value as the brightness value. Surface inspection device.

2. The system further comprises a difference image generation unit that calculates the difference between the maximum and minimum brightness values ​​in the plurality of captured images for each pixel, and generates a difference image having the calculated difference as the brightness value, The inspection unit determines whether there are defects in the surface shape based on the phase image generated by the phase image generation unit, and determines whether there are defects other than those in the surface shape based on the difference image generated by the difference image generation unit. The surface inspection apparatus according to claim 1.

3. The phase image generation unit calculates the phase value for each pixel based on a relational expression representing the relationship between the brightness value in the captured image acquired at the rising timing of the pattern light and the phase, and a relational expression representing the relationship between the brightness value in the captured image acquired at the falling timing of the pattern light and the phase, and generates the phase image having the calculated phase value as the brightness value. The surface inspection apparatus according to claim 1 or 2.

4. At least one of the following is set to a value such that at least one of the following is acquired at the rising or falling timing of the pattern light: the width of the pattern light in the phase shift direction, the distance between the illumination unit and the object to be inspected, and the number of times the imaging unit images the object to be inspected per cycle of the pattern light. The surface inspection apparatus according to claim 1 or 2.

5. A lighting step in which patterned light, whose light intensity changes in a rectangular wave shape, is shone onto the object to be inspected while shifting the phase of the patterned light, An imaging step in which the object to be inspected is imaged multiple times using the reflected light of the pattern light irradiated in the illumination step, thereby acquiring multiple images with different phases, A phase image generation step, based on the plurality of captured images acquired in the imaging step, generates a phase image having a phase value obtained at a specific timing as a brightness value, The inspection step includes inspecting the surface shape of the object to be inspected based on the phase image generated in the phase image generation step, In the phase image generation step, for each pixel, the phase value is calculated using the brightness value in the captured image acquired at the rising or falling timing of the pattern light from among the plurality of captured images, and the phase image having the calculated phase value as the brightness value is generated. Surface inspection methods.

6. Computers, The lighting unit includes a lighting control unit that irradiates the object to be inspected with patterned light whose light intensity changes in a rectangular wave shape, while shifting the phase of the patterned light. The imaging unit captures multiple images with different phases by causing the inspection target to be imaged multiple times using the reflected light of the pattern light irradiated by the illumination unit, and the image acquisition unit captures multiple images with different phases. A phase image generation unit generates a phase image having a phase value obtained at a specific timing as a brightness value, based on the plurality of captured images acquired by the image acquisition unit. Based on the phase image generated by the phase image generation unit, it functions as an inspection unit that inspects the surface shape of the object to be inspected. The phase image generation unit calculates the phase value for each pixel using the brightness value in the captured image acquired at the rising or falling timing of the pattern light from among the plurality of captured images, and generates the phase image having the calculated phase value as the brightness value. program.

Citation Information

Patent Citations

  • Surface shape inspection device and surface shape inspection method

    JP2014020870A