Illumination condition determination method and appearance inspection device
The method and device efficiently identify optimal illumination conditions in visual inspection devices by adjusting wavelength, method, and position of illumination light, addressing inefficiencies in existing technologies.
Patent Information
- Application Number
- JP2024128675
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-08-05
AI Technical Summary
Existing methods for specifying illumination conditions in visual inspection devices are inefficient and time-consuming, requiring extensive image capturing to determine optimal lighting conditions.
A method and device that utilize a visual inspection apparatus with a plurality of light sources and a camera to rapidly identify optimal illumination conditions by sequentially adjusting wavelength, method, and position of illumination light, maximizing contrast ratio to specify suitable lighting conditions.
Enables rapid identification of appropriate illumination conditions by minimizing the number of required image captures, reducing time and improving efficiency in specifying optimal lighting for visual inspection.
Smart Images

Figure 0007576897000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a lighting condition specifying method for automatically specifying lighting conditions for a visual inspection device, and also to a visual inspection device. [Background technology]
[0002] Conventionally, a lighting condition specifying method for specifying the optimal lighting conditions of a lighting device that irradiates a part with illumination light is known (see, for example, Patent Document 1). In Patent Document 1, the lighting device is provided with three types of lighting units. In the lighting condition specifying method described in Patent Document 1, the optimal conditions of the combination of the lighting unit to be turned on among the three types of lighting units and its luminance level are automatically specified. Also, conventionally, a lighting condition setting method for setting optimal lighting conditions in a visual inspection device is known (see, for example, Patent Document 2). In the lighting condition setting method described in Patent Document 2, the optimal lighting conditions according to the characteristics of the work are automatically set in order to capture an image suitable for detecting defects in the work. The lighting conditions are conditions defined by lighting elements such as the color (wavelength) and intensity (brightness) of the irradiated light, and combinations of these. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2005-315749 A [Patent Document 2] JP 2019-144209 A Summary of the Invention [Problem to be solved by the invention]
[0004] The inventors of the present application have been studying a method for automatically identifying more appropriate lighting conditions in a visual inspection device that includes an illumination mechanism for irradiating an object under inspection with illumination light and an imaging mechanism for imaging the object under inspection. When identifying more appropriate lighting conditions, it is preferable to be able to identify the lighting conditions in a short time.
[0005] Therefore, an object of the present invention is to provide an illumination condition specifying method for automatically specifying illumination conditions for an appearance inspection device, which is capable of specifying more appropriate illumination conditions in a short period of time.An object of the present invention is also to provide an appearance inspection device capable of specifying more appropriate illumination conditions in a short period of time. [Means for solving the problem]
[0006] In order to solve the above problems, the illumination condition specifying method of the present invention is an illumination condition specifying method for automatically specifying illumination conditions of an appearance inspection device that includes an illumination mechanism having a plurality of light sources and capable of irradiating illumination light to an object to be inspected using a plurality of different illumination methods, and an imaging mechanism that images the object to be inspected, the illumination condition specifying method comprising: a wavelength specifying step of causing the imaging mechanism to capture an image of the object to be inspected while changing the wavelength of illumination light irradiated from the illumination mechanism to the object to be inspected, and automatically specifying a wavelength of illumination light suitable for inspecting the object to be inspected based on the captured image of the object to be inspected; an illumination method specifying step of causing the imaging mechanism to capture an image of the object to be inspected while changing the illumination method of the illumination mechanism, and automatically specifying a lighting method suitable for inspecting the object to be inspected based on the captured image of the object to be inspected; and a lighting position specifying step of causing the imaging mechanism to capture an image of the object to be inspected while changing the light source to be turned on, and automatically specifying a lighting position of the illumination mechanism suitable for inspecting the object to be inspected based on the captured image of the object to be inspected, characterized in that the wavelength specifying step, the illumination method specifying step, and the lighting position specifying step are executed in order.
[0007] The illumination condition specifying method of the present invention includes a wavelength specifying step of automatically specifying a wavelength of illumination light suitable for inspecting an object to be inspected, an illumination method specifying step of automatically specifying an illumination method suitable for inspecting an object to be inspected, and an illumination position specifying step of automatically specifying a lighting position of an illumination mechanism suitable for inspecting an object to be inspected. That is, the illumination condition specifying method of the present invention specifies the wavelength of illumination light, the illumination method, and the lighting position of the illumination mechanism suitable for inspecting an object to be inspected. Therefore, by specifying illumination conditions using the illumination condition specifying method of the present invention, it becomes possible to specify more appropriate illumination conditions.
[0008] In addition, in the present invention, the wavelength specifying step, the illumination method specifying step, and the lighting position specifying step are executed in sequence, so that in the present invention, it becomes possible to specify the illumination conditions suitable for inspecting the object in a short time, as compared with the case where, for example, images of the object to be inspected are taken by the imaging mechanism while changing various combinations of three conditions, namely, the wavelength of the illumination light, the illumination method, and the lighting position of the illumination mechanism, and the illumination conditions suitable for inspecting the object are specified based on the images of the object to be inspected.
[0009] For example, if there are 10 patterns of the wavelength of the illumination light, 10 patterns of the illumination method, and 10 patterns of the lighting position of the illumination mechanism, there are 1000 combinations of the three conditions. In this case, therefore, it is necessary to capture 1000 patterns of images of the object to be inspected by the imaging mechanism in order to identify the illumination conditions suitable for inspecting the object to be inspected. In contrast, in the present invention, if 30 patterns of images of the object to be inspected are captured by the imaging mechanism, it is possible to identify the illumination conditions suitable for inspecting the object to be inspected, and therefore it is possible to identify the illumination conditions suitable for inspecting the object to be inspected in a short time.
[0010] In the present invention, it is preferable that in the wavelength specifying step, the wavelength of the illumination light when the contrast ratio of the photographed image of the inspection object is maximized is specified as the wavelength of the illumination light suitable for inspecting the inspection object, in the illumination scheme specifying step, the illumination scheme when the contrast ratio of the photographed image of the inspection object is maximized is specified as the illumination scheme suitable for inspecting the inspection object, and in the lighting position specifying step, the lighting position of the illumination mechanism when the contrast ratio of the photographed image of the inspection object is maximized is specified as the lighting position of the illumination mechanism suitable for inspecting the inspection object. With this configuration, it is possible to specify even more suitable illumination conditions.
[0011] In the present invention, it is preferable that the amount of illumination light irradiated from the illumination mechanism to the object under inspection is automatically adjusted in the wavelength specifying step, the illumination method specifying step, and the lighting position specifying step. With this configuration, it is possible to specify a more appropriate wavelength of illumination light in the wavelength specifying step, specify a more appropriate illumination method in the illumination method specifying step, and specify a more appropriate lighting position of the illumination mechanism in the lighting position specifying step.
[0012] In the present invention, the illumination condition specifying method includes a first initial wavelength specifying step and a second initial wavelength specifying step for automatically finding a wavelength of illumination light at which the contrast ratio of the image of the object to be inspected is equal to or greater than a predetermined reference value, while causing an imaging mechanism to capture an image of the object to be inspected while changing the wavelength of illumination light irradiated from the illumination mechanism to the object to be inspected, and a first reflectance measurement step and a second reflectance measurement step for automatically measuring the reflectance of the object to be inspected captured by the imaging mechanism. When a wavelength of illumination light at which the contrast ratio of the image of the object to be inspected is equal to or greater than the reference value is found in the first initial wavelength specifying step, the wavelength specifying step is performed and then the first reflectance measurement step is performed. When the reflectance of the object to be inspected measured in the first reflectance measurement step is less than the predetermined reference value, the lighting position specifying step is performed and then the illumination method specifying step is performed. When the reflectance of the object to be inspected measured in the first reflectance measurement step is equal to or greater than the reference value, the lighting method specifying step is performed and then the lighting position specifying step is performed. When the wavelength of illumination light at which the contrast ratio of the image of the object to be inspected is equal to or greater than the reference value is not found in the first initial wavelength specifying step, the second reflectance measurement step is performed. and if the reflectance of the object under test measured in the second reflectance measurement step is less than a predetermined reference value, then an illumination scheme specifying step is performed before the second initial wavelength specifying step, and if the wavelength of illumination light at which the contrast ratio of the image of the object under test is equal to or greater than the reference value is found in the second initial wavelength specifying step, then the wavelength specifying step is performed before the lighting position specifying step, and if the wavelength of illumination light at which the contrast ratio of the image of the object under test is equal to or greater than the reference value is not found in the second initial wavelength specifying step, then the lighting position specifying step is performed before the wavelength specifying step; and if the reflectance of the object under test measured in the second reflectance measurement step is equal to or greater than the reference value, then the lighting position specifying step is performed before the second initial wavelength specifying step, and if the wavelength of illumination light at which the contrast ratio of the image of the object under test is equal to or greater than the reference value is found in the second initial wavelength specifying step, then the wavelength specifying step is performed before the lighting scheme specifying step, and if the wavelength of illumination light at which the contrast ratio of the image of the object under test is equal to or greater than the reference value is found in the second initial wavelength specifying step, then the lighting scheme specifying step is performed before the wavelength specifying step.According to the study of the present inventors, this configuration makes it possible to identify optimal lighting conditions in a short period of time.
[0013] In addition, in order to solve the above-mentioned problems, the appearance inspection apparatus of the present invention includes an illumination mechanism having a plurality of light sources and capable of irradiating illumination light onto an object under inspection using a plurality of different illumination methods, an imaging mechanism for imaging the object under inspection, and an illumination condition setting unit for setting illumination conditions of the illumination mechanism, the illumination condition setting unit sequentially executes a wavelength specifying step of causing the imaging mechanism to capture an image of the object under inspection while changing the wavelength of illumination light irradiated onto the object under inspection from the illumination mechanism and automatically specifying a wavelength of illumination light suitable for inspection of the object under inspection based on the image of the object under inspection that has been captured, an illumination method specifying step of causing the imaging mechanism to capture an image of the object under inspection while changing the illumination method of the illumination mechanism and automatically specifying a lighting method suitable for inspection of the object under inspection based on the image of the object under inspection that has been captured, and a lighting position specifying step of causing the imaging mechanism to capture an image of the object under inspection while changing the light source to be turned on and automatically specifying a lighting position of the illumination mechanism suitable for inspection of the object under inspection based on the image of the object under inspection that has been captured, and is characterized in that the illumination condition setting unit sets the wavelength of illumination light specified in the wavelength specifying step, the illumination method specified in the illumination method specifying step, and the lighting position of the illumination mechanism specified in the lighting position specifying step as illumination conditions of the illumination mechanism.
[0014] In the appearance inspection device of the present invention, the illumination condition setting unit executes a wavelength specifying step of automatically specifying a wavelength of illumination light suitable for inspecting the object under inspection, an illumination method specifying step of automatically specifying an illumination method suitable for inspecting the object under inspection, and an illumination position specifying step of automatically specifying a lighting position of the illumination mechanism suitable for inspecting the object under inspection, and specifies the wavelength of illumination light, the illumination method, and the lighting position of the illumination mechanism suitable for inspecting the object under inspection. Therefore, in the present invention, it becomes possible to specify more appropriate illumination conditions.
[0015] Furthermore, in the present invention, the illumination condition setting unit sequentially executes the wavelength specifying step, the illumination method specifying step, and the lighting position specifying step, so that it becomes possible to identify illumination conditions suitable for inspecting the object to be inspected in a short time compared to a case in which images of the object to be inspected are taken with the imaging mechanism while changing various combinations of the three conditions, i.e., the wavelength of the illumination light, the illumination method, and the lighting position of the illumination mechanism, and illumination conditions suitable for inspecting the object to be inspected are identified based on the images of the object to be inspected that have been taken. Effect of the Invention
[0016] As described above, by specifying the illumination conditions using the illumination condition specifying method of the present invention, it becomes possible to specify more appropriate illumination conditions in a short time. Also, with the appearance inspection apparatus of the present invention, it becomes possible to specify more appropriate illumination conditions in a short time. [Brief description of the drawings]
[0017] [Figure 1] 1 is a schematic diagram for explaining a configuration of a visual inspection apparatus according to an embodiment of the present invention; [Diagram 2] 2 is a block diagram for explaining the configuration of the appearance inspection apparatus shown in FIG. 1. [Diagram 3] 1 is a flowchart illustrating a method for identifying an illumination condition according to an embodiment of the present invention. [Figure 4] 1 is a flowchart illustrating a method for identifying an illumination condition according to an embodiment of the present invention. [Diagram 5] 1 is a flowchart illustrating a method for identifying an illumination condition according to an embodiment of the present invention. [Figure 6] 4A is a flowchart for explaining a wavelength specifying step shown in FIG. 3, and FIG. 4B is a flowchart for explaining an illumination method specifying step shown in FIG. [Figure 7] 4 is a flowchart for explaining a lighting position specifying step shown in FIG. 3. [Figure 8] 10 is a flowchart illustrating a lighting condition specifying method according to another embodiment of the present invention. [Figure 9] 10 is a flowchart illustrating a lighting condition specifying method according to another embodiment of the present invention. [Figure 10] 10 is a flowchart illustrating a lighting condition specifying method according to another embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0018] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0019] (Configuration of visual inspection device) Fig. 1 is a schematic diagram for explaining the configuration of a visual inspection apparatus 1 according to an embodiment of the present invention, Fig. 2 is a block diagram for explaining the configuration of the visual inspection apparatus 1 shown in Fig. 1.
[0020] The appearance inspection device 1 of this embodiment is a device for inspecting the appearance of an inspection object 2. For example, the appearance inspection device 1 inspects the presence or absence of scratches on the surface of the inspection object 2, the presence or absence of distortion on the surface, the presence or absence of foreign matter attached to the surface, etc. The appearance inspection device 1 includes an illumination mechanism 3 that irradiates the inspection object 2 with illumination light, a camera 4 as an imaging mechanism that images the inspection object 2, a PC (personal computer) 5 to which the camera 4 is electrically connected, and an illumination controller 6 for controlling the illumination mechanism 3.
[0021] The camera 4 is disposed, for example, above the object 2 to be inspected. The camera 4 is installed, for example, so that the optical axis of the camera 4 is parallel to the up-down direction. An image captured by the camera 4 is transmitted to the PC 5. Software for processing the image captured by the camera 4 is installed in the PC 5. Based on the image captured by the camera 4, the PC 5 determines whether the object 2 to be inspected has scratches, whether the object 2 to be inspected has distortion, and whether foreign matter is attached to the object 2 to be inspected. In addition, software for specifying and setting the lighting conditions of the lighting mechanism 3 is installed in the PC 5.
[0022] The illumination mechanism 3 is capable of irradiating the object 2 with illumination light using a plurality of different illumination methods. The illumination mechanism 3 is equipped with, for example, an incident bright field illumination 7, an incident dark field illumination 8, and a transmitted bright field illumination 9. The illumination mechanism 3 irradiates the object 2 with illumination light from any one of the incident bright field illumination 7, the incident dark field illumination 8, and the transmitted bright field illumination 9, irradiates the object 2 with illumination light from two illuminations arbitrarily selected from the incident bright field illumination 7, the incident dark field illumination 8, and the transmitted bright field illumination 9, or irradiates the object 2 with illumination light from three illuminations, the incident bright field illumination 7, the incident dark field illumination 8, and the transmitted bright field illumination 9.
[0023] Incidentally, the incident brightfield illumination 7 is sometimes called "incident illumination" or "coaxial incident illumination". The incident darkfield illumination 8 is sometimes called "oblique illumination". Furthermore, the incident darkfield illumination 8 is sometimes called "darkfield illumination" when the illumination angle is close to horizontal. The transmitted brightfield illumination 9 is sometimes called "transmitted illumination".
[0024] Each of the incident brightfield illumination 7, incident darkfield illumination 8, and transmitted brightfield illumination 9 includes a plurality of light sources 11. That is, the illumination mechanism 3 includes a plurality of light sources 11. Specifically, the illumination mechanism 3 includes a large number of light sources 11. The light sources 11 are LEDs. Specifically, the light sources 11 are LED light sources that can be dimmed, and the light sources 11 can be turned on and off, and the light intensity and wavelength can be adjusted. The incident brightfield illumination 7, incident darkfield illumination 8, and transmitted brightfield illumination 9 include a circuit board 12 on which the plurality of light sources 11 are mounted. In this embodiment, each of the plurality of light sources 11 can be turned on individually.
[0025] The incident brightfield illumination 7 and the incident darkfield illumination 8 are disposed above the inspection object 2. The transmitted brightfield illumination 9 is disposed below the inspection object 2. The incident brightfield illumination 7 is equipped with a half mirror 13. At the half mirror 13, a portion of the illumination light emitted from the light source 11 is reflected toward the inspection object 2, and a portion of the light reflected by the inspection object 2 is transmitted toward the camera 4. In the incident darkfield illumination 8, for example, a large number of light sources 11 are arranged in a circular ring shape.
[0026] The illumination controller 6 controls the wavelength of the illumination light irradiated from the illumination mechanism 3 to the inspection object 2. The illumination controller 6 also controls which of the incident bright field illumination 7, incident dark field illumination 8, and transmitted bright field illumination 9 is to be turned on. That is, the illumination controller 6 controls the illumination method of the illumination mechanism 3. The illumination controller 6 also controls which of the multiple light sources 11 is to be turned on. That is, the illumination controller 6 controls the lighting position of the illumination mechanism 3. The illumination controller 6 also controls the amount of illumination light irradiated from the illumination mechanism 3 to the inspection object 2.
[0027] In this embodiment, before performing an appearance inspection of the object under inspection 2, the lighting conditions of the lighting mechanism 3 are automatically specified and set in the lighting controller 6. When performing an appearance inspection of the object under inspection 2, the lighting controller 6 irradiates the object under inspection 2 with illumination light under the set lighting conditions. The lighting conditions of the lighting mechanism 3 are automatically set by the PC 5 and the lighting controller 6. In this embodiment, the PC 5 and the lighting controller 6 constitute a lighting condition setting unit 14 for setting the lighting conditions of the lighting mechanism 3. Hereinafter, a lighting condition specifying method for automatically specifying the lighting conditions of the lighting mechanism 3 will be described.
[0028] (Lighting condition identification method) Fig. 3 to Fig. 5 are flow charts for explaining the illumination condition specifying method according to the embodiment of the present invention. Fig. 6(A) is a flow chart for explaining the wavelength specifying step S5 shown in Fig. 3, and Fig. 6(B) is a flow chart for explaining the illumination method specifying step S8 shown in Fig. 3. Fig. 7 is a flow chart for explaining the lighting position specifying step S9 shown in Fig. 3.
[0029] When specifying the illumination conditions of the illumination mechanism 3, the illumination controller 6 is electrically connected to the PC 5. When specifying the illumination conditions of the illumination mechanism 3, first, the camera 4 is set (step S1). In step S1, an operator who inspects the object 2 to be inspected sets the camera 4 so that the inspection site of the object 2 to be inspected is photographed by the camera 4. After that, the illumination conditions of the illumination mechanism 3 are initialized (step S2). In step S2, the wavelength of the illumination light irradiated from the illumination mechanism 3 to the object 2 to be inspected is set to a predetermined initial value, the illumination method of the illumination mechanism 3 is set to a predetermined illumination method, and the lighting position of the illumination mechanism 3 is set to a predetermined lighting position. In addition, in step S2, the amount of illumination light irradiated from the illumination mechanism 3 to the object 2 to be inspected is set to a predetermined initial value. In step S2, for example, an operator performs each setting in the PC 5. The PC 5 stores the illumination conditions set in step S2.
[0030] Thereafter, the camera 4 captures an image of the object under inspection 2 while changing the wavelength of the illumination light irradiated from the illumination mechanism 3 to the object under inspection 2, and the contrast ratio of the captured image is calculated (step S3). In step S3, first, the object under inspection 2 is irradiated with illumination light under the illumination conditions set in step S2, and then the wavelength of the illumination light irradiated to the object under inspection 2 is changed. In step S3, the illumination condition setting unit 14 automatically changes the wavelength of the illumination light irradiated to the object under inspection 2. Also in step S3, the PC 5 calculates the contrast ratio of the captured image.
[0031] Thereafter, the PC 5 judges whether or not there is a wavelength of illumination light at which the contrast ratio of the image calculated in step S3 is equal to or greater than a predetermined reference value (step S4). If there is a wavelength of illumination light at which the contrast ratio of the image is equal to or greater than the reference value in step S4, the camera 4 takes an image of the object 2 under inspection while changing the wavelength of the illumination light irradiated from the illumination mechanism 3 to the object 2 under inspection, and automatically identifies the wavelength of illumination light suitable for inspecting the object 2 under inspection based on the image of the object 2 under inspection that has been taken (wavelength identification step, step S5). Step S5 is executed by the illumination condition setting unit 14.
[0032] In step S5, the illumination light is applied to the inspection object 2 in the illumination mode and on-position of the illumination mechanism 3 set in step S2 (i.e., in the illumination mode and on-position of the illumination mechanism 3 stored in the PC 5). Also, in step S5, as shown in FIG. 6(A), first, the illumination condition setting unit 14 causes the camera 4 to capture an image of the inspection object 2 while applying illumination light of a predetermined wavelength to the inspection object 2 (step S51). The PC 5 stores the wavelength of the illumination light in step S51. After that, the PC 5 calculates and stores the contrast ratio of the image captured in step S51 (step S52).
[0033] Thereafter, the illumination condition setting unit 14 changes the wavelength of the illumination light, and causes the camera 4 to capture an image of the inspection object 2 while irradiating the inspection object 2 with the illumination light of the changed wavelength (step S53). Thereafter, the PC 5 calculates the contrast ratio of the image captured in step S53 (step S54). Thereafter, the PC 5 compares the contrast ratio of the image calculated in step S54 with the contrast ratio of the image stored in the PC 5, and determines whether the contrast ratio of the image calculated in step S54 is greater than the contrast ratio of the image stored in the PC 5 (step S55).
[0034] In step S55 after step S56 described below, the PC 5 compares the contrast ratio of the image stored in the PC 5 in step S56 with the contrast ratio of the image calculated in step S54. In step S55 when step S56 has not been performed, the PC 5 compares the contrast ratio of the image stored in the PC 5 in step S52 with the contrast ratio of the image calculated in step S54.
[0035] In step S55, if the contrast ratio of the image calculated in step S54 is greater, PC5 updates the contrast ratio of the image stored in PC5 to the contrast ratio of the image calculated in step S54, and stores this contrast ratio in PC5 (step S56). Also, in step S56, PC5 updates the wavelength of the illumination light stored in PC5 to the wavelength of the illumination light changed in step S53, and stores this wavelength of the illumination light in PC5.
[0036] Thereafter, the PC 5 judges whether or not the camera 4 has taken an image of the object 2 under inspection with illumination light of all wavelengths that can be used for the inspection of the object 2 under inspection (step S57). If the camera 4 has taken an image of the object 2 under inspection with illumination light of all wavelengths in step S57, the PC 5 identifies the wavelength of the illumination light stored in the PC 5 as the wavelength of the illumination light suitable for the inspection of the object 2 under inspection (step S58). When the wavelength of the illumination light is identified in step S58, step S5 ends.
[0037] On the other hand, in step S57, if the camera 4 has not yet captured images of the inspection object 2 using illumination light of all wavelengths, the process returns to step S53. Also, in step S55, if the contrast ratio of the image calculated in step S54 is smaller, the process proceeds to step S57. Note that in step S57, it may be determined whether images of the inspection object 2 have been captured using illumination light of all wavelengths within a predetermined range centered on the wavelength of the illumination light at which the image contrast ratio is equal to or greater than the reference value in step S4.
[0038] In this way, in step S5, the wavelength of the illumination light when the contrast ratio of the photographed image of the inspection object 2 is maximized is identified as the wavelength of the illumination light suitable for inspecting the inspection object 2. Also, in step S5, the illumination condition setting unit 14 automatically adjusts the amount of illumination light irradiated from the illumination mechanism 3 to the inspection object 2. Specifically, the illumination condition setting unit 14 automatically adjusts the amount of illumination light irradiated from the illumination mechanism 3 to the inspection object 2 so that the photographed image of the inspection object 2 is not saturated.
[0039] When step S5 is completed, the illumination condition setting unit 14 causes the camera 4 to capture an image of the object 2 under inspection while irradiating the object 2 with illumination light at the wavelength of illumination light specified in step S5 (i.e., at the wavelength of illumination light specified in step S58) and in the illumination mode and lighting position of the illumination mechanism 3 set in step S2, and the PC 5 measures the reflectance of the object 2 under inspection photographed by the camera 4 (first reflectance measurement step, step S6). After that, the PC 5 determines whether the reflectance measured in step S6 is equal to or greater than a predetermined reference value (step S7).
[0040] In step S7, if the reflectance measured in step S6 is equal to or greater than the reference value, the camera 4 is caused to capture images of the object 2 under inspection while changing the illumination method of the illumination mechanism 3, and an illumination method suitable for inspecting the object 2 under inspection is automatically identified based on the captured images of the object 2 under inspection (illumination method identification step, step S8). Step S8 is executed by the illumination condition setting unit 14. In step S8, illumination light is irradiated onto the object 2 under inspection at the wavelength of the illumination light identified in step S5 and at the lighting position of the illumination mechanism 3 set in step S2.
[0041] 6(B), first, in step S8, the illumination condition setting unit 14 causes the camera 4 to capture an image of the object 2 under inspection while irradiating the object 2 with illumination light in a predetermined illumination method (step S61). The PC 5 stores the illumination method of the illumination mechanism 3 in step S61. Then, the PC 5 calculates and stores the contrast ratio of the image captured in step S61 (step S62). Then, the illumination condition setting unit 14 changes the illumination method of the illumination mechanism 3, and causes the camera 4 to capture an image of the object 2 under inspection while irradiating the object 2 with illumination light in the changed illumination method (step S63).
[0042] Then, the PC 5 calculates the contrast ratio of the image captured in step S63 (step S64). Then, the PC 5 compares the contrast ratio of the image calculated in step S64 with the contrast ratio of the image stored in the PC 5, and determines whether the contrast ratio of the image calculated in step S64 is greater than the contrast ratio of the image stored in the PC 5 (step S65).
[0043] In step S65 after step S66 described below, the PC 5 compares the contrast ratio of the image stored in the PC 5 in step S66 with the contrast ratio of the image calculated in step S64. In step S65 when step S66 has not been performed, the PC 5 compares the contrast ratio of the image stored in the PC 5 in step S62 with the contrast ratio of the image calculated in step S64.
[0044] In step S65, if the contrast ratio of the image calculated in step S64 is greater, the PC 5 updates the contrast ratio of the image stored in the PC 5 to the contrast ratio of the image calculated in step S64, and stores this contrast ratio in the PC 5 (step S66). Also, in step S66, the PC 5 updates the illumination method of the illumination mechanism 3 stored in the PC 5 to the illumination method of the illumination mechanism 3 changed in step S63, and stores this illumination method in the PC 5.
[0045] Thereafter, the PC 5 judges whether or not the camera 4 has taken images of the object 2 under inspection using all the illumination methods that can be used for the inspection of the object 2 under inspection (step S67). In step S67, if the camera 4 has taken images of the object 2 under inspection using all the illumination methods, the PC 5 specifies the illumination method stored in the PC 5 as an illumination method suitable for the inspection of the object 2 under inspection (step S68). When the illumination method is specified in step S68, step S8 ends. On the other hand, in step S67, if the camera 4 has not taken images of the object 2 under all the illumination methods, the process returns to step S63. Also, in step S65, if the contrast ratio of the image calculated in step S64 is smaller, the process proceeds to step S67.
[0046] In this way, in step S8, the illumination method when the contrast ratio of the photographed image of the inspection object 2 is maximized is identified as the illumination method suitable for inspecting the inspection object 2. Also, in step S8, the illumination condition setting unit 14 automatically adjusts the amount of illumination light irradiated from the illumination mechanism 3 to the inspection object 2. Specifically, the illumination condition setting unit 14 automatically adjusts the amount of illumination light irradiated from the illumination mechanism 3 to the inspection object 2 so that the photographed image of the inspection object 2 is not saturated.
[0047] After step S8 is completed, the camera 4 is caused to take images of the object 2 under inspection while changing the light source 11 that is turned on, and the lighting position of the illumination mechanism 3 suitable for inspecting the object 2 under inspection is automatically identified based on the captured image of the object 2 under inspection (lighting position identification step, step S9). Step S9 is executed by the illumination condition setting unit 14. In step S9, illumination light is irradiated onto the object 2 under inspection with the wavelength of the illumination light identified in step S5 and the illumination method of the illumination mechanism 3 identified in step S8 (i.e., the illumination method identified in step S68).
[0048] 7, in step S9, first, the illumination condition setting unit 14 causes the camera 4 to capture an image of the inspection object 2 while irradiating the inspection object 2 with illumination light at a predetermined lighting position (step S71). The PC 5 stores the lighting position of the illumination mechanism 3 in step S71. Then, the PC 5 calculates and stores the contrast ratio of the image captured in step S71 (step S72). Then, the illumination condition setting unit 14 changes the lighting position of the illumination mechanism 3, and causes the camera 4 to capture an image of the inspection object 2 while irradiating the inspection object 2 with illumination light at the changed lighting position (step S73).
[0049] Then, the PC 5 calculates the contrast ratio of the image captured in step S73 (step S74). Then, the PC 5 compares the contrast ratio of the image calculated in step S74 with the contrast ratio of the image stored in the PC 5, and determines whether the contrast ratio of the image calculated in step S74 is greater than the contrast ratio of the image stored in the PC 5 (step S75).
[0050] In step S75 after step S76 described below, the PC 5 compares the contrast ratio of the image stored in the PC 5 in step S76 with the contrast ratio of the image calculated in step S74. In step S75 when step S76 has not been performed, the PC 5 compares the contrast ratio of the image stored in the PC 5 in step S72 with the contrast ratio of the image calculated in step S74.
[0051] In step S75, if the contrast ratio of the image calculated in step S74 is greater, the PC 5 updates the contrast ratio of the image stored in the PC 5 to the contrast ratio of the image calculated in step S74, and stores this contrast ratio in the PC 5 (step S76). Also, in step S76, the PC 5 updates the lighting position of the illumination mechanism 3 stored in the PC 5 to the lighting position of the illumination mechanism 3 changed in step S73, and stores this lighting position in the PC 5.
[0052] After that, the PC 5 judges whether the camera 4 has taken images of the object 2 under inspection at all lighting positions that can be used for the inspection of the object 2 under inspection (step S77). In step S77, if the camera 4 has taken images of the object 2 under inspection at all lighting positions, the PC 5 specifies the lighting positions stored in the PC 5 as lighting positions suitable for the inspection of the object 2 under inspection (step S78). When the lighting positions are specified in step S78, step S9 ends. When step S9 ends, the specification of the illumination conditions of the illumination mechanism 3 is completed. On the other hand, in step S77, if the camera 4 has not taken images of the object 2 under inspection at all lighting positions, the process returns to step S73. Also, in step S75, if the contrast ratio of the image calculated in step S74 is smaller, the process proceeds to step S77.
[0053] In this way, in step S9, the lighting position at which the contrast ratio of the photographed image of the inspection object 2 is maximized is identified as the lighting position suitable for inspecting the inspection object 2. Also, in step S9, the illumination condition setting unit 14 automatically adjusts the amount of illumination light irradiated from the illumination mechanism 3 to the inspection object 2. Specifically, the illumination condition setting unit 14 automatically adjusts the amount of illumination light irradiated from the illumination mechanism 3 to the inspection object 2 so that the photographed image of the inspection object 2 is not saturated.
[0054] On the other hand, in step S7, if the reflectance measured in step S6 is less than the reference value, the camera 4 is caused to take images of the object 2 under inspection while changing the light source 11 that is turned on, and the lighting position of the illumination mechanism 3 suitable for inspecting the object 2 under inspection is automatically identified based on the captured images of the object 2 under inspection (lighting position identification step, step S10). Step S10 is executed by the illumination condition setting unit 14. In step S10, illumination light is irradiated onto the object 2 under inspection with the wavelength of the illumination light identified in step S5 and with the illumination method of the illumination mechanism 3 set in step S2. In other respects, step S10 is similar to step S9.
[0055] After step S10 is completed, the camera 4 is caused to capture images of the object 2 under inspection while changing the illumination method of the illumination mechanism 3, and an illumination method suitable for inspecting the object 2 under inspection is automatically identified based on the captured images of the object 2 under inspection (illumination method identification step, step S11). Step S11 is executed by the illumination condition setting unit 14. In step S11, illumination light is irradiated onto the object 2 under inspection at the wavelength of the illumination light identified in step S5 and at the lighting position of the illumination mechanism 3 identified in step S10. In other respects, step S11 is similar to step S8. After step S11 is completed, identification of the illumination conditions of the illumination mechanism 3 is completed.
[0056] 4, the illumination condition setting unit 14 causes the camera 4 to capture an image of the object 2 under inspection while irradiating the object 2 with illumination light at the wavelength of illumination light, the illumination method of the illumination mechanism 3, and the lighting position of the illumination mechanism 3 set in step S2, and the PC 5 measures the reflectance of the object 2 under inspection captured by the camera 4 (second reflectance measurement step, step S12).Then, the PC 5 determines whether the reflectance measured in step S12 is equal to or greater than a predetermined reference value (step S13).
[0057] In step S13, if the reflectance measured in step S12 is less than the reference value, the camera 4 is caused to capture images of the object 2 under inspection while changing the illumination method of the illumination mechanism 3, and an illumination method suitable for inspecting the object 2 under inspection is automatically identified based on the captured images of the object 2 under inspection (illumination method identification step, step S14). Step S14 is executed by the illumination condition setting unit 14. In step S14, for example, illumination light is irradiated onto the object 2 under inspection with the wavelength of the illumination light and the lighting position of the illumination mechanism 3 set in step S2. In other respects, step S14 is similar to step S8.
[0058] After step S14 is completed, similarly to step S3, the camera 4 captures an image of the object 2 under inspection while changing the wavelength of the illumination light irradiated from the illumination mechanism 3 to the object 2 under inspection, and calculates the contrast ratio of the captured image (step S15). In step S15, first, the illumination light is irradiated to the object 2 under inspection with the illumination method of the illumination mechanism 3 specified in step S14, the wavelength of the illumination light set in step S2, and the lighting position of the illumination mechanism 3, and then the wavelength of the illumination light irradiated to the object 2 under inspection is changed. After that, the PC 5 judges whether there is a wavelength of the illumination light at which the contrast ratio of the image calculated in step S15 is equal to or greater than a predetermined reference value (step S16).
[0059] In step S16, if there is a wavelength of illumination light at which the contrast ratio of the image is equal to or greater than the reference value, the camera 4 is caused to capture an image of the object under inspection 2 while changing the wavelength of the illumination light irradiated from the illumination mechanism 3 to the object under inspection 2, and the wavelength of illumination light suitable for inspecting the object under inspection 2 is automatically identified based on the captured image of the object under inspection 2 (wavelength identification step, step S17). Step S17 is executed by the illumination condition setting unit 14. In step S17, illumination light is irradiated to the object under inspection 2 with the illumination method of the illumination mechanism 3 identified in step S14 and the lighting position of the illumination mechanism 3 set in step S2. In other respects, step S17 is similar to step S5.
[0060] When step S17 is completed, the camera 4 is caused to capture images of the object 2 under inspection while changing the light source 11 that is turned on, and the lighting position of the illumination mechanism 3 suitable for inspecting the object 2 under inspection is automatically identified based on the captured image of the object 2 under inspection (lighting position identification step, step S18). Step S18 is executed by the illumination condition setting unit 14. In step S18, illumination light is irradiated onto the object 2 under inspection with the wavelength of illumination light identified in step S17 and the illumination method of the illumination mechanism 3 identified in step S14. In other respects, step S18 is similar to step S9. When step S18 is completed, identification of the illumination conditions of the illumination mechanism 3 is completed.
[0061] On the other hand, in step S16, if there is no wavelength of illumination light that makes the contrast ratio of the image equal to or greater than the reference value, the camera 4 is caused to capture images of the object under inspection 2 while changing the light source 11 that is turned on, and the lighting position of the illumination mechanism 3 suitable for inspecting the object under inspection 2 is automatically identified based on the captured image of the object under inspection 2 (lighting position identification step, step S19). Step S19 is executed by the illumination condition setting unit 14. In step S19, illumination light is irradiated onto the object under inspection 2 with the wavelength of illumination light set in step S2 and the illumination method of the illumination mechanism 3 identified in step S14. In other respects, step S19 is similar to step S9.
[0062] When step S19 is completed, the camera 4 is caused to capture images of the object 2 under inspection while changing the wavelength of the illumination light irradiated from the illumination mechanism 3 to the object 2 under inspection, and the wavelength of the illumination light suitable for inspecting the object 2 under inspection is automatically identified based on the captured image of the object 2 under inspection (wavelength identification step, step S20). Step S20 is executed by the illumination condition setting unit 14. In step S20, illumination light is irradiated onto the object 2 under inspection with the illumination method of the illumination mechanism 3 identified in step S14 and the lighting position of the illumination mechanism 3 identified in step S19. In other respects, step S20 is similar to step S5. When step S20 is completed, identification of the illumination conditions of the illumination mechanism 3 is completed.
[0063] Furthermore, in step S13, if the reflectance measured in step S12 is equal to or greater than the reference value, as shown in Fig. 5, the camera 4 is caused to take images of the object 2 under inspection while changing the light source 11 that is turned on, and the lighting position of the illumination mechanism 3 suitable for inspecting the object 2 under inspection is automatically identified based on the captured images of the object 2 under inspection (lighting position identification step, step S21). Step S21 is executed by the illumination condition setting unit 14. In step S21, illumination light is irradiated onto the object 2 under inspection with the wavelength of the illumination light and the illumination method of the illumination mechanism 3 that were set in step S2. In other respects, step S21 is similar to step S9.
[0064] After step S21 is completed, similarly to step S3, the camera 4 captures an image of the object under inspection 2 while changing the wavelength of the illumination light irradiated from the illumination mechanism 3 to the object under inspection 2, and calculates the contrast ratio of the captured image (step S22). In step S22, first, the illumination light is irradiated to the object under inspection 2 with the lighting position of the illumination mechanism 3 specified in step S21, the wavelength of the illumination light set in step S2, and the illumination method of the illumination mechanism 3, and then the wavelength of the illumination light irradiated to the object under inspection 2 is changed. After that, the PC 5 judges whether or not there is a wavelength of the illumination light at which the contrast ratio of the image calculated in step S22 is equal to or greater than a predetermined reference value (step S23).
[0065] In step S23, if there is a wavelength of illumination light at which the contrast ratio of the image is equal to or greater than the reference value, the camera 4 is caused to capture an image of the object under inspection 2 while changing the wavelength of the illumination light irradiated from the illumination mechanism 3 to the object under inspection 2, and the wavelength of illumination light suitable for inspecting the object under inspection 2 is automatically identified based on the captured image of the object under inspection 2 (wavelength identification step, step S24). Step S24 is executed by the illumination condition setting unit 14. In step S24, illumination light is irradiated to the object under inspection 2 with the illumination method of the illumination mechanism 3 set in step S2 and the lighting position of the illumination mechanism 3 identified in step S21. In other respects, step S24 is similar to step S5.
[0066] After step S24 is completed, the camera 4 is caused to capture images of the object 2 under inspection while changing the illumination method of the illumination mechanism 3, and an illumination method suitable for inspecting the object 2 under inspection is automatically identified based on the captured images of the object 2 under inspection (illumination method identification step, step S25). Step S25 is executed by the illumination condition setting unit 14. In step S25, illumination light is irradiated onto the object 2 under inspection with the wavelength of illumination light identified in step S24 and the lighting position of the illumination mechanism 3 identified in step S21. In other respects, step S25 is similar to step S8. After step S25 is completed, identification of the illumination conditions of the illumination mechanism 3 is completed.
[0067] On the other hand, if there is no wavelength of illumination light that makes the image contrast ratio equal to or greater than the reference value in step S23, the camera 4 captures images of the object 2 under inspection while changing the illumination method of the illumination mechanism 3, and automatically identifies an illumination method suitable for inspecting the object 2 based on the captured images of the object 2 under inspection (illumination method identification step, step S26). Step S26 is executed by the illumination condition setting unit 14. In step S26, illumination light is irradiated onto the object 2 under inspection with the wavelength of illumination light set in step S2 and the lighting position of the illumination mechanism 3 identified in step S21. In other respects, step S26 is similar to step S8.
[0068] When step S26 is completed, the camera 4 is caused to capture images of the object 2 under inspection while changing the wavelength of the illumination light irradiated from the illumination mechanism 3 to the object 2 under inspection, and the wavelength of the illumination light suitable for inspecting the object 2 under inspection is automatically identified based on the captured image of the object 2 under inspection (wavelength identification step, step S27). Step S27 is executed by the illumination condition setting unit 14. In step S27, illumination light is irradiated onto the object 2 under inspection with the illumination method of the illumination mechanism 3 identified in step S26 and the lighting position of the illumination mechanism 3 identified in step S21. In other respects, step S27 is similar to step S5. When step S27 is completed, identification of the illumination conditions of the illumination mechanism 3 is completed.
[0069] In this manner, in this embodiment, the illumination condition setting unit 14 executes the wavelength specifying step, the illumination method specifying step, and the lighting position specifying step in order. That is, the illumination condition setting unit 14 executes the wavelength specifying step, the illumination method specifying step, and the lighting position specifying step individually and sequentially. Specifically, when a wavelength of illumination light at which the contrast ratio of the image of the test object 2 is equal to or greater than a reference value is found in step S4, the wavelength specifying step S5 is executed and then the first reflectance measuring step S6 is executed. If the reflectance of the test object 2 measured in the first reflectance measuring step S6 is equal to or greater than the reference value, the illumination method specifying step S8 is executed and then the lighting position specifying step S9 is executed. If the reflectance of the test object 2 measured in the first reflectance measuring step S6 is less than the reference value, the lighting position specifying step S10 is executed and then the illumination method specifying step S11 is executed.
[0070] Furthermore, if no wavelength of illumination light is found in step S4 for which the contrast ratio of the image of the object to be inspected 2 is equal to or greater than the reference value, a second reflectance measurement step S12 is executed, and if the reflectance of the object to be inspected 2 measured in the second reflectance measurement step S12 is less than the reference value, an illumination method identification step S14 is executed, and then steps S14 and S15 are executed. If no wavelength of illumination light is found in step S15 for which the contrast ratio of the image of the object to be inspected 2 is equal to or greater than the reference value, a wavelength identification step S17 is executed, and then a lighting position identification step S18 is executed. If no wavelength of illumination light is found in step S15 for which the contrast ratio of the image of the object to be inspected 2 is equal to or greater than the reference value, a lighting position identification step S19 is executed, and then a wavelength identification step S20 is executed.
[0071] Furthermore, if the reflectance of the object 2 measured in the second reflectance measurement step S12 is equal to or greater than a reference value, a lighting position identification step S21 is executed, followed by steps S22 and S23. If a wavelength of illumination light at which the contrast ratio of the image of the object 2 is equal to or greater than the reference value is found in step S23, a wavelength identification step S24 is executed, followed by an illumination method identification step S25. If a wavelength of illumination light at which the contrast ratio of the image of the object 2 is equal to or greater than the reference value is not found in step S23, an illumination method identification step S26 is executed, followed by a wavelength identification step S27.
[0072] The illumination condition setting unit 14 sets the wavelength of the illumination light specified in the wavelength specifying step, the illumination method specified in the illumination method specifying step, and the lighting position of the illumination mechanism 3 specified in the lighting position specifying step as the illumination conditions of the illumination mechanism 3, and irradiates the inspection subject 2 with illumination light under these illumination conditions when inspecting the inspection subject 2. The illumination conditions of the illumination mechanism 3 are stored in, for example, the illumination controller 6. When the illumination conditions of the illumination mechanism 3 are stored in the illumination controller 6, the illumination controller 6 is electrically disconnected from the PC 5, for example.
[0073] Steps S3 and S4 in this embodiment are first initial wavelength identification steps for making the camera 4 take an image of the inspection object 2 while changing the wavelength of the illumination light irradiated from the illumination mechanism 3 to the inspection object 2, and automatically finding the wavelength of the illumination light at which the contrast ratio of the image of the inspection object 2 taken is equal to or greater than a predetermined reference value. Steps S15, S16 and steps S22, S23 in this embodiment are second initial wavelength identification steps for making the camera 4 take an image of the inspection object 2 while changing the wavelength of the illumination light irradiated from the illumination mechanism 3 to the inspection object 2, and automatically finding the wavelength of the illumination light at which the contrast ratio of the image of the inspection object 2 taken is equal to or greater than a predetermined reference value.
[0074] (Main effects of this form) As described above, in this embodiment, a wavelength specifying step of automatically specifying a wavelength of illumination light suitable for inspecting the object under inspection 2, an illumination method specifying step of automatically specifying an illumination method suitable for inspecting the object under inspection 2, and an illumination position specifying step of automatically specifying a lighting position of the illumination mechanism 3 suitable for inspecting the object under inspection 2 are executed, and the wavelength of illumination light, the illumination method, and the lighting position of the illumination mechanism 3 suitable for inspecting the object under inspection 2 are specified. Therefore, by specifying the illumination conditions of the illumination mechanism 3 by the illumination condition specifying method of this embodiment, it becomes possible to specify more appropriate illumination conditions.
[0075] In addition, in this embodiment, the wavelength specifying step, the illumination method specifying step, and the lighting position specifying step are executed in this order. Therefore, in this embodiment, it becomes possible to specify the illumination conditions suitable for inspecting the object 2 in a short time, compared to the case where the image of the object 2 to be inspected is taken by the camera 4 while changing various combinations of the three conditions of the wavelength of the illumination light, the illumination method, and the lighting position of the illumination mechanism 3, and the illumination conditions suitable for inspecting the object 2 are specified based on the image of the object 2 to be inspected.
[0076] For example, if there are 10 patterns of the wavelength of the illumination light, 10 patterns of the illumination method, and 10 patterns of the lighting position of the illumination mechanism 3, there are 1000 patterns of combinations of the three conditions. In this case, therefore, it is necessary to capture 1000 patterns of images of the object to be inspected 2 by the camera 4 in order to specify the illumination conditions suitable for inspecting the object to be inspected 2. In contrast, in this embodiment, if 30 patterns of images of the object to be inspected 2 are captured by the camera 4, it becomes possible to specify the illumination conditions suitable for inspecting the object to be inspected 2, and therefore it becomes possible to specify the illumination conditions suitable for inspecting the object to be inspected 2 in a short time.
[0077] In this embodiment, in the wavelength specifying step, the wavelength of the illumination light when the contrast ratio of the photographed image of the inspection object 2 is maximized is specified as the wavelength of the illumination light suitable for inspecting the inspection object 2, in the illumination scheme specifying step, the illumination scheme when the contrast ratio of the photographed image of the inspection object 2 is maximized is specified as the illumination scheme suitable for inspecting the inspection object 2, and in the lighting position specifying step, the lighting position when the contrast ratio of the photographed image of the inspection object 2 is maximized is specified as the lighting position suitable for inspecting the inspection object 2. Therefore, in this embodiment, it is possible to specify even more suitable lighting conditions.
[0078] (Example of changing the method for identifying lighting conditions) 8 to 10 are flowcharts for explaining an illumination condition specifying method according to another embodiment of the present invention. In Fig. 8 to Fig. 10, the same steps as those in the above-mentioned embodiment are denoted by the same reference numerals.
[0079] In the above-mentioned embodiment, as shown in Fig. 8(A), steps S5, S8, and S9 may be executed in this order after step S2, or as shown in Fig. 8(B), steps S5, S10, and S11 may be executed in this order after step S2. Also, as shown in Fig. 9(A), steps S14, S17, and S18 may be executed in this order after step S2, or as shown in Fig. 9(B), steps S14, S19, and S20 may be executed in this order after step S2.
[0080] Furthermore, as shown in Fig. 10(A), steps S21, S24, and S25 may be executed in this order after step S2, or as shown in Fig. 10(B), steps S21, S26, and S27 may be executed in this order after step S2. Also, while executing each step of the six flowcharts shown in Fig. 8 to Fig. 10, the illumination condition that maximizes the contrast ratio of the image of the object to be inspected 2 among the six illumination conditions specified by the six flowcharts shown in Fig. 8 to Fig. 10 may be set as the illumination condition of the illumination mechanism 3.
[0081] (Other embodiments)
[0082] In the wavelength specifying step of the above embodiment, step S57 may be omitted. In this case, in step S55, if the contrast ratio of the image calculated in step S54 is smaller than the contrast ratio of the image stored in the PC5, the process returns to step S53. Similarly, in the illumination method specifying step, step S67 may be omitted. In this case, in step S65, if the contrast ratio of the image calculated in step S64 is smaller than the contrast ratio of the image stored in the PC5, the process returns to step S63. Also, in the lighting position specifying step, step S77 may be omitted. In this case, in step S75, if the contrast ratio of the image calculated in step S74 is smaller than the contrast ratio of the image stored in the PC5, the process returns to step S73.
[0083] In the above-described embodiment, the method for specifying the illumination condition may include a light amount specifying step of causing the camera 4 to capture an image of the inspection object 2 while changing the light amount of the illumination mechanism 3, and automatically specifying the light amount of the illumination mechanism 3 suitable for inspecting the inspection object 2 based on the captured image of the inspection object 2. In this case, in the light amount specifying step, the light amount at which the contrast ratio of the image of the inspection object 2 is maximized is specified as the light amount suitable for inspecting the inspection object 2. Also, in this case, the wavelength specifying step, the illumination method specifying step, the lighting position specifying step, and the light amount specifying step are executed in this order.
[0084] In the above-described embodiment, at least one of the incident brightfield illumination 7, incident darkfield illumination 8, and transmitted brightfield illumination 9 may include a diffusion plate or a polarizing plate. In addition, in the above-described embodiment, the illumination mechanism 3 may not include any one of the incident brightfield illumination 7, incident darkfield illumination 8, and transmitted brightfield illumination 9. In addition, in the above-described embodiment, the illumination mechanism 3 may include an illumination that irradiates illumination light by an illumination method other than the incident brightfield illumination 7, incident darkfield illumination 8, and transmitted brightfield illumination 9. For example, the illumination mechanism 3 may include transmitted darkfield illumination. [Explanation of symbols]
[0085] 1. Visual inspection equipment 2. Subject 3 Lighting system 4. Camera (filming mechanism) 11 Light source 14 Lighting condition setting section S3, S4 First initial wavelength identification step S5, S17, S20, S24, S27 Wavelength specific steps S6 First reflectance measurement step S8, S11, S14, S25, S26 Lighting method specification steps S9, S10, S18, S19, S21 Lighting position identification steps S12 Second reflectance measurement step S15, S16 Second initial wavelength identification step S22, S23 Second initial wavelength identification step
Claims
1. 1. A method for automatically specifying an illumination condition for an appearance inspection apparatus including an illumination mechanism having a plurality of light sources and capable of irradiating an object under inspection with illumination light in a plurality of different illumination methods, and an imaging mechanism for imaging the object under inspection, comprising: a wavelength specifying step of causing the imaging mechanism to capture an image of the inspection object while changing a wavelength of illumination light irradiated from the illumination mechanism onto the inspection object, and automatically specifying a wavelength of illumination light suitable for inspection of the inspection object based on the captured image of the inspection object; an illumination method specifying step of causing the imaging mechanism to capture images of the object under inspection while changing the illumination method of the illumination mechanism, and automatically specifying an illumination method suitable for inspecting the object under inspection based on the captured images of the object under inspection; a lighting position specifying step of causing the imaging mechanism to capture an image of the object under inspection while changing the light source to be turned on, and automatically specifying a lighting position of the illumination mechanism suitable for inspection of the object under inspection based on the captured image of the object under inspection, A lighting condition specifying method, comprising the steps of: specifying the wavelength; specifying the lighting method; and specifying the lighting position, in that order.
2. In the wavelength specifying step, a wavelength of illumination light when a contrast ratio of an image of the object to be inspected is maximized is specified as a wavelength of illumination light suitable for inspection of the object to be inspected; In the illumination method specifying step, an illumination method that maximizes a contrast ratio of an image of the object to be inspected is specified as an illumination method suitable for inspecting the object to be inspected; 2. The illumination condition specifying method according to claim 1, wherein in the lighting position specifying step, a lighting position of the illumination mechanism when a contrast ratio of the photographed image of the inspection object is maximized is specified as a lighting position of the illumination mechanism suitable for inspecting the inspection object.
3. 3. The illumination condition specifying method according to claim 1, wherein the amount of illumination light irradiated from the illumination mechanism to the object under inspection is automatically adjusted in the wavelength specifying step, the illumination method specifying step, and the lighting position specifying step.
4. a first initial wavelength specifying step and a second initial wavelength specifying step for automatically finding a wavelength of illumination light at which a contrast ratio of the image of the object to be inspected becomes equal to or greater than a predetermined reference value, while causing the imaging mechanism to capture an image of the object to be inspected while changing a wavelength of illumination light irradiated from the illumination mechanism to the object to be inspected; a first reflectance measuring step and a second reflectance measuring step for automatically measuring a reflectance of the object under inspection photographed by the photographing mechanism, When a wavelength of illumination light at which a contrast ratio of an image of the object to be inspected is equal to or greater than a reference value is found in the first initial wavelength identifying step, performing the wavelength specifying step and then performing the first reflectance measuring step; when the reflectance of the object under test measured in the first reflectance measuring step is less than a predetermined reference value, performing the lighting position specifying step and then the illumination scheme specifying step, and when the reflectance of the object under test measured in the first reflectance measuring step is equal to or greater than a reference value, performing the illumination scheme specifying step and then the lighting position specifying step; If no wavelength of illumination light is found in the first initial wavelength specifying step, which provides a contrast ratio of the image of the object to be inspected that is equal to or greater than a reference value, performing the second reflectance measurement step; if the reflectance of the object under inspection measured in the second reflectance measurement step is less than a predetermined reference value, then the illumination method specifying step is executed, and then the second initial wavelength specifying step is executed; if a wavelength of illumination light at which the contrast ratio of the image of the object under inspection is equal to or greater than a reference value is found in the second initial wavelength specifying step, then the wavelength specifying step is executed, and if a wavelength of illumination light at which the contrast ratio of the image of the object under inspection is equal to or greater than a reference value is not found in the second initial wavelength specifying step, then the illumination position specifying step is executed, and then the wavelength specifying step is executed; 3. The illumination condition specifying method according to claim 1 or 2, wherein, when the reflectance of the object under test measured in the second reflectance measurement step is equal to or greater than a reference value, the lighting position specifying step is executed before the second initial wavelength specifying step, and, when a wavelength of illumination light at which the contrast ratio of the image of the object under test is equal to or greater than a reference value is found in the second initial wavelength specifying step, the wavelength specifying step is executed before the illumination method specifying step, and, when a wavelength of illumination light at which the contrast ratio of the image of the object under test is equal to or greater than the reference value is not found in the second initial wavelength specifying step, the illumination method specifying step is executed before the wavelength specifying step.
5. a lighting mechanism having a plurality of light sources and capable of irradiating an object under inspection with illumination light in a plurality of different illumination methods, an imaging mechanism for imaging the object under inspection, and an illumination condition setting unit for setting illumination conditions for the lighting mechanism; the illumination condition setting unit sequentially executes the following steps: a wavelength specifying step of causing the imaging mechanism to capture an image of the object under inspection while changing the wavelength of the illumination light irradiated from the illumination mechanism to the object under inspection, and automatically specifying a wavelength of the illumination light suitable for inspection of the object under inspection based on the captured image of the object under inspection; an illumination method specifying step of causing the imaging mechanism to capture an image of the object under inspection while changing the illumination method of the illumination mechanism, and automatically specifying a lighting method suitable for inspection of the object under inspection based on the captured image of the object under inspection; and a lighting position specifying step of causing the imaging mechanism to capture an image of the object under inspection while changing the light source that is turned on, and automatically specifying a lighting position of the illumination mechanism suitable for inspection of the object under inspection based on the captured image of the object under inspection; and sets the wavelength of the illumination light specified in the wavelength specifying step, the illumination method specified in the illumination method specifying step, and the lighting position of the illumination mechanism specified in the lighting position specifying step as the illumination conditions of the illumination mechanism.
Citation Information
Patent Citations
Method and device for tracking continuous line and discontinuous line based on CCD (Charge Coupled Device) linear sensor
CN117485967A
Outer appearance inspection apparatus
JP1991261810A
Method and apparatus for recognizing substrate mark
JP2003097916A
Failure analyzer for semiconductor device
JP2003232749A
Illumination condition specifying method, component recognition device, and surface mounting equipment and component testing device provided the device
JP2005315749A
