Inspection apparatus and focus adjustment support method
The inspection device supports focus adjustment through an image processing system that calculates and displays edge amplitude graphs, aiding users in manually adjusting the focus of inspection devices without autofocus.
Patent Information
- Application Number
- JP2024125907
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2026-02-13
AI Technical Summary
Inspection devices without autofocus functions require manual focus adjustment, necessitating user knowledge of correct focus, which can be challenging.
An inspection device equipped with an image processing device that includes an image acquisition unit, edge extraction unit, and display control unit to assist in focus adjustment by calculating and displaying edge amplitude graphs based on manual focus adjustments.
Facilitates intuitive focus adjustment by displaying amplitude graphs, enabling users to determine correct focus positioning on inspection objects.
Smart Images

Figure 2026023746000001_ABST
Abstract
Description
[Technical Field]
[0001] The technology disclosed in this specification relates to an inspection apparatus and a focus adjustment support method. [Background technology]
[0002] In the technical field related to inspection devices, an inspection device equipped with an FA camera without an autofocus function, such as that disclosed in Patent Document 1, is known. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 2018-128393 Summary of the Invention [Problem to be solved by the invention]
[0004] If the imaging device does not have an autofocus function, the user of the inspection device must manually adjust the focus, and the user must know whether the focus is correct or not.
[0005] The technology disclosed in this specification aims to assist in focus adjustment. [Means for solving the problem]
[0006] This specification discloses an inspection device equipped with an image processing device having a processor. The image processing device includes an image acquisition unit that acquires an image of an inspection object captured by an imaging device whose focus is adjusted by manual operation, an edge extraction unit that extracts an edge portion from the captured image, an edge amplitude calculation unit that calculates an edge amplitude indicating a difference between a minimum luminance value and a maximum luminance value of a pixel in the edge portion that changes due to focus adjustment, and a display control unit that displays an amplitude graph indicating the edge amplitude on a display device. [Effects of the Invention]
[0007] According to the technology disclosed in this specification, focus adjustment is supported. [Brief explanation of the drawings]
[0008] [Figure 1] FIG. 1 is a diagram schematically illustrating an inspection device according to an embodiment. [Figure 2] FIG. 2 is a block diagram showing an inspection device according to an embodiment. [Figure 3] FIG. 3 is a flowchart showing a focus adjustment support method according to the embodiment. [Figure 4] FIG. 4 is a diagram showing a display device that displays a captured image according to the embodiment. [Figure 5] FIG. 5 is a diagram showing a display device that displays a captured image in which an extraction area is specified according to the embodiment. [Figure 6] FIG. 6 is a diagram for explaining an edge portion according to the embodiment. [Figure 7] FIG. 7 is a diagram showing a display device that displays an amplitude graph according to the embodiment. [Figure 8] FIG. 8 is a diagram for explaining the relationship between focus adjustment and an amplitude graph according to the embodiment. [Figure 9] FIG. 9 is a diagram for explaining the relationship between focus adjustment and an amplitude graph according to the embodiment. [Figure 10] FIG. 10 is a diagram for explaining a method for generating an amplitude graph according to the embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0009] Hereinafter, an embodiment will be described with reference to the drawings. In the embodiment, a local coordinate system, which is an XYZ Cartesian coordinate system, is defined for the inspection device 1, and the positional relationship of each part will be described with reference to the local coordinate system. The direction parallel to the X axis in a horizontal plane is defined as the X axis direction. The direction parallel to the Y axis in the horizontal plane, which is perpendicular to the X axis, is defined as the Y axis direction. The direction parallel to the Z axis, which is perpendicular to the horizontal plane, is defined as the Z axis direction. A plane including the X axis and the Y axis will be referred to as the XY plane as appropriate. The XY plane is parallel to the horizontal plane. The Z axis is parallel to a vertical line. The Z axis direction is the up-down direction. The +Z direction is the upward direction, and the -Z direction is the downward direction.
[0010] [First embodiment] A first embodiment will be described.
[0011] <Inspection equipment> 1 is a diagram schematically illustrating an inspection device 1 according to an embodiment. The inspection device 1 is an appearance inspection device that inspects the appearance of an inspection object W. As shown in FIG. 1, the inspection device 1 includes a table 2, an imaging device 3, an illumination device 4, and a movement device 50.
[0012] The table 2 supports an inspection object W. The inspection object W includes an industrial product. The industrial product includes a metal product. The industrial product may be a part, a work in progress, or a finished product. An example of an industrial product is an engine cylinder block.
[0013] The imaging device 3 images the inspection object W supported on the table 2. The imaging device 3 images the inspection object W from above. The imaging device 3 has an imaging optical system 5, an image sensor 6, and a body 53. The imaging optical system 5 and the image sensor 6 are each held in the body 53. The imaging optical system 5 has an optical element. The optical axis AX of the imaging optical system 5 is parallel to the Z axis. The image sensor 6 acquires an image of the inspection object W via the imaging optical system 5. Examples of the image sensor 6 include a CCD (Couple Charged Device) image sensor and a CMOS (Complementary Metal Oxide Semiconductor) image sensor.
[0014] The illumination device 4 illuminates the inspection object W supported on the table 2 with illumination light. The imaging device 3 captures an image of the inspection object W illuminated by the illumination device 4.
[0015] In the embodiment, the illumination device 4 has a coaxial illumination unit 7 and a side oblique illumination unit 8. The coaxial illumination unit 7 coaxially illuminates the inspection object W. Coaxial illumination refers to an illumination method in which illumination light is irradiated onto the inspection object W from a direction parallel to the optical axis AX. The side oblique illumination unit 8 illuminates the inspection object W from a side oblique direction. Side oblique illumination refers to an illumination method in which illumination light is irradiated onto the inspection object W from outside the optical axis AX.
[0016] The coaxial lighting unit 7 has a light source 9 and a half mirror 10. The coaxial lighting unit 7 is held in the body 53. The light source 9 emits illumination light. An example of the light source 9 is a light emitting diode (LED). The light source 9 emits white light as the illumination light. At least a portion of the half mirror 10 is arranged on the optical axis AX. In the embodiment, the half mirror 10 is arranged inside the imaging optical system 5. The illumination light emitted from the light source 9 is reflected by the half mirror 10 and irradiated onto the inspection object W. The illumination light reflected by the inspection object W passes through the imaging optical system 5 and the half mirror 10, and then enters the image sensor 6.
[0017] The side oblique illumination unit 8 includes a light source 11 and a support member 12. The light source 11 emits illumination light. An example of the light source 11 is a light-emitting diode (LED). The light source 11 emits white light as illumination light. The light source 11 is ring-shaped and arranged to surround the optical axis AX. In the embodiment, the side oblique illumination unit 8 performs ring illumination, which is a type of side oblique illumination. Ring illumination refers to an illumination method in which illumination light is irradiated onto the inspection object W from the ring-shaped light source 11 arranged to surround the optical axis AX. The optical axis AX of the imaging optical system 5 is arranged inside the annular light source 11. The support member 12 supports the light source 11. The support member 12 is arranged around the light source 11. The upper end of the support member 12 is fixed to the body 53 of the imaging device 3. The lower end of the support member 12 is arranged below the light source 11.
[0018] The side oblique illumination unit 8 has a plurality of light sources 11. The light sources 11 include a first light source 11A having a first inner diameter, a second light source 11B having a second inner diameter larger than the first inner diameter, and a third light source 11C having a third inner diameter larger than the second inner diameter. Of the plurality of light sources 11, the first light source 11A is disposed at a position farthest from the table 2, the second light source 11B is disposed at a position next farthest from the table 2 after the first light source 11A, and the third light source 11C is disposed at a position closest to the table 2.
[0019] The illumination device 4 illuminates the inspection object W under each of a plurality of illumination conditions that are different from one another. The illumination conditions include an incident angle θ of the illumination light incident on the inspection object W. The incident angle θ0 at which the illumination light emitted from the light source 9 of the coaxial illumination unit 7 is incident on the inspection object W, the incident angle θ1 at which the illumination light emitted from the first light source 11A is incident on the inspection object W, the incident angle θ2 at which the illumination light emitted from the second light source 11B is incident on the inspection object W, and the incident angle θ3 at which the illumination light emitted from the third light source 11C is incident on the inspection object W are all different.
[0020] The illumination device 4 irradiates the inspection object W with illumination light at each of a plurality of incident angles θ. When illumination light is emitted from the light source 9 of the coaxial illumination unit 7, illumination light is not emitted from each of the first light source 11A, the second light source 11B, and the third light source 11C. When illumination light is emitted from the first light source 11A, illumination light is not emitted from each of the second light source 11B, the third light source 11C, and the light source 9. When illumination light is emitted from the second light source 11B, illumination light is not emitted from each of the third light source 11C, the light source 9, and the first light source 11A. When illumination light is emitted from the third light source 11C, illumination light is not emitted from each of the light source 9, the first light source 11A, and the second light source 11B.
[0021] In the embodiment, there are four illumination conditions: a first illumination condition in which the inspection object W is illuminated with illumination light emitted from the light source 9, a second illumination condition in which the inspection object W is illuminated with illumination light emitted from the first light source 11A, a third illumination condition in which the inspection object W is illuminated with illumination light emitted from the second light source 11B, and a fourth illumination condition in which the inspection object W is illuminated with illumination light emitted from the third light source 11C.
[0022] The moving device 50 moves the imaging device 3 and the illumination device 4 in the Z-axis direction. The moving device 50 has a ball screw mechanism 51 connected to a body 53 of the imaging device 3 and a dial 52 operated by a user of the inspection device 1 to activate the ball screw mechanism 51. When the user operates the dial 52, the ball screw mechanism 51 is activated and the body 53 moves in the Z-axis direction. As the body 53 moves in the Z-axis direction, the imaging optical system 5, the image sensor 6, and the coaxial illumination unit 7 held by the body 53 move together with the body 53 in the Z-axis direction. The upper end of the support member 12 of the side oblique illumination unit 8 is fixed to the lower end of the body 53. As the body 53 moves in the Z-axis direction, the side oblique illumination unit 8 fixed to the body 53 moves together with the body 53 in the Z-axis direction.
[0023] The imaging optical system 5 is a fixed-focus optical system. In this embodiment, the imaging device 3 does not have an autofocus function. When focusing the imaging device 3 on the surface of the inspection object W, the user operates the dial 52 to move the imaging device 3 in the Z-axis direction. The focus of the imaging device 3 is adjusted by manual operation by the user.
[0024] <Image processing device> 2 is a block diagram showing the inspection device 1 according to the embodiment. As shown in FIG. 2, the inspection device 1 includes an image processing device 13, an imaging device 3, an illumination device 4, a display device 14, and an input device 15.
[0025] The image processing device 13 includes a computer. The image processing device 13 has a processor 16, a main memory 17, a storage 18, an input / output interface 19, and a communication interface 20.
[0026] The processor 16 includes a CPU (Central Processing Unit). The processor 16 may also include a GPU (Graphics Processing Unit).
[0027] The main memory 17 includes a non-volatile memory such as a read only memory (ROM) and a volatile memory such as a random access memory (RAM).
[0028] The storage 18 is a recording medium that stores computer programs and data in a manner that can be read by the processor 16. Examples of the storage 18 include a hard disk or a semiconductor memory.
[0029] The processor 16 reads the computer program from the storage 18, loads it into the main memory 17, and executes processing in accordance with the computer program. The functions of the image processing device 13 are realized by the computer program.
[0030] The input / output interface 19 includes an input / output circuit. The imaging device 3, the lighting device 4, the display device 14, and the input device 15 are each connected to the input / output interface 19. The image processing device 13 acquires a captured image Ma of the inspection object W from the imaging device 3 via the input / output interface 19. The image processing device 13 transmits display data to the display device 14 via the input / output interface 19. The image processing device 13 acquires input data from the input device 15 via the input / output interface 19.
[0031] The communication interface 20 communicates via a communication network. An example of the communication interface 20 is a local area network (LAN) module. The image processing device 13 transmits data to an external computer via the communication interface 20 and the communication network. The image processing device 13 receives data from the external computer via the communication network and the communication interface 20. A computer program may be distributed to the image processing device 13 via the communication network.
[0032] The display device 14 provides display data to the user. Examples of the display device 14 include a flat panel display such as a liquid crystal display or an organic EL display.
[0033] The input device 15 generates input data when operated by a user. The input data generated by the input device 15 is transmitted to the image processing device 13. Examples of the input device 15 include a computer keyboard, a mouse, a button, a switch, and a touch panel.
[0034] The processor 16 includes an imaging control unit 21 , an image acquisition unit 22 , an input data acquisition unit 23 , a designation unit 24 , an edge extraction unit 25 , an edge amplitude calculation unit 26 , and a display control unit 27 .
[0035] The imaging control unit 21 controls the imaging device 3 and the lighting device 4. The imaging control unit 21 controls the imaging device 3 and the lighting device 4 so that the inspection object W is imaged under specified imaging conditions. The imaging conditions include the illumination conditions of the inspection object W by the lighting device 4.
[0036] The image acquisition unit 22 acquires, from the imaging device 3, a captured image Ma of the inspection object W captured by the imaging device 3.
[0037] The input data acquisition unit 23 acquires, from the input device 15, input data generated by operating the input device 15.
[0038] The designation unit 24 designates an extraction area Lp for extracting an edge portion from the captured image Ma. The designation unit 24 designates the extraction area Lp based on input data from the input device 15.
[0039] The edge extraction unit 25 extracts an edge portion from the captured image Ma. The edge extraction unit 25 extracts an edge portion from the extraction area Lp of the captured image Ma designated by the designation unit 24.
[0040] The edge amplitude calculation unit 26 calculates an edge amplitude that indicates a difference between the minimum and maximum luminance values of pixels in an edge portion that changes due to focus adjustment performed manually by a user. In the embodiment, the luminance value refers to the luminance of a pixel in the edge portion of the captured image Ma. The minimum luminance value refers to the lowest luminance value among the multiple pixels in the edge portion. The maximum pixel value refers to the highest luminance value among the multiple pixels in the edge portion.
[0041] The display control unit 27 causes an amplitude graph 40 indicating the edge amplitude to be displayed on the display device 14. The display control unit 27 causes the amplitude graph 40 to be displayed on the display device 14 in synchronization with focus adjustment performed manually by the user.
[0042] <Focus adjustment support method> 3 is a flowchart showing a focus adjustment support method according to an embodiment. After the inspection object W is placed on the table 2, the imaging control unit 21 controls the imaging device 3 and the lighting device 4 to image the inspection object W. The lighting device 4 illuminates the inspection object W under specified lighting conditions. The imaging device 3 images the inspection object W illuminated by the lighting device 4. The image acquisition unit 22 acquires an image Ma of the inspection object W, which has been imaged by the imaging device 3, from the imaging device 3 (step S1). The display control unit 27 displays the image Ma acquired by the image acquisition unit 22 on the display device 14 (step S2).
[0043] FIG. 4 is a diagram showing a display device 14 that displays a captured image Ma according to an embodiment. As shown in FIG. 4, a captured image Ma of an inspection object W is displayed on the display device 14. In the embodiment, the captured image Ma includes bright portions Mb and dark portions Mc. The bright portions Mb include pixels of the captured image Ma that have high brightness. The dark portions Mc include pixels of the captured image Ma that have low brightness. If the inspection object W is a cylinder block of an engine, the bright portions Mb include, for example, the surface of the cylinder block. The dark portions Mc include, for example, holes provided in the cylinder block.
[0044] A user of the inspection device 1 specifies an extraction area Lp for extracting an edge portion from the captured image Ma while the captured image Ma is displayed on the display device 14. The user operates the input device 15 to specify the extraction area Lp.
[0045] 5 is a diagram showing the display device 14 displaying the captured image Ma in which an extraction area Lp has been specified according to the embodiment. With the captured image Ma displayed on the display device 14, the user operates the input device 15 to specify the extraction area Lp. In the embodiment, the extraction area Lp is specified in a line shape.
[0046] The user can specify the extraction area Lp at any position on the captured image Ma. If the input device 15 is a touch panel provided on the display screen of the display device 14, the user can specify the extraction area Lp by moving a finger that is in contact with the display screen of the display device 14.
[0047] The extraction area Lp is an area on the surface of the inspection object W where the imaging device 3 is to be focused. In other words, the extraction area Lp is a part of the surface of the inspection object W where the user wishes to focus the imaging device 3. The user operates the input device 15 to specify the extraction area Lp on the surface of the inspection object W where the user wishes to focus the imaging device 3.
[0048] When the user operates the input device 15, input data for specifying the extraction area Lp is generated in the input device 15. The input data for specifying the extraction area Lp is transmitted from the input device 15 to the image processing device 13. The input data acquisition unit 23 acquires the input data for specifying the extraction area Lp (step S3). The designation unit 24 designates the extraction area Lp for extracting the edge portion based on the input data from the input device 15 (step S4).
[0049] Examples of the edge E present in the captured image Ma include a step edge where the pixel brightness changes stepwise, a roof edge where the pixel brightness changes roof-like, and a spike edge where the pixel brightness changes pulse-like. In the example shown in Fig. 5, the user specifies the extraction area Lp so that it passes through a first edge Ea where the pixel brightness decreases stepwise from left to right of the captured image Ma displayed on the display device 14, a second edge Eb where the pixel brightness increases stepwise, a third edge Ec where the pixel brightness decreases stepwise, and a fourth edge Ed where the pixel brightness increases stepwise.
[0050] After the extraction area Lp is designated by the designation unit 24, the edge extraction unit 25 extracts an edge portion from the extraction area Lp of the captured image Ma (step S5).
[0051] FIG. 6 is a diagram illustrating an edge portion according to an embodiment. FIG. 6 shows, as an example, an edge portion including an edge E (Eb, Ed) where the pixel brightness increases stepwise from left to right in the captured image Ma. In the graph shown in FIG. 6, the horizontal axis indicates the position of a pixel present on a linear extraction area Lp, and the vertical axis indicates the pixel brightness value. The line La in the upper graph of FIG. 6 indicates an original drawing profile showing the relationship between the pixel position and the pixel brightness value. The line Lb in the lower graph of FIG. 6 indicates a first derivative profile obtained by first differentiating the original drawing profile. The edge portion refers to a range of a specified number of pixels centered on the edge E and defined along the extraction area Lp. The specified number of pixels is a predetermined value. The edge extraction unit 25 can extract the edge portion based on the brightness values of each of the pixels arranged along the linear extraction area Lp.
[0052] The edge amplitude calculation unit 26 calculates an edge amplitude indicating a difference between the minimum and maximum luminance values of pixels in the edge portion (step S6). As shown in Fig. 6, in the original image profile indicated by line La, the edge amplitude calculation unit 26 can calculate an edge amplitude indicating a difference between the minimum and maximum luminance values of pixels in the edge portion. In the first derivative profile indicated by line Lb, the edge amplitude calculation unit 26 can calculate an edge amplitude indicating a difference between the minimum and maximum luminance values of pixels in the edge portion.
[0053] The display control unit 27 causes the display device 14 to display an amplitude graph 40 indicating the edge amplitude (step S7).
[0054] 7 is a diagram showing the display device 14 displaying an amplitude graph 40 according to the embodiment. The edge amplitude is calculated for each of a first edge portion including the first edge Ea, a second edge portion including the second edge Eb, a third edge portion including the third edge Ec, and a fourth edge portion including the fourth edge Ed. As shown in FIG. 7, the display control unit 27 causes the display device 14 to display four amplitude graphs 40 corresponding to the first edge portion, the second edge portion, the third edge portion, and the fourth edge portion, respectively.
[0055] 7 is an example. As described above, examples of edges E present in the captured image Ma include a step edge where pixel brightness changes stepwise, a roof edge where pixel brightness changes roof-like, and a spike edge where pixel brightness changes pulse-like. That is, in addition to the first edge Ea, the second edge Eb, the third edge Ec, and the fourth edge Ed, multiple edges E may be detected on the extraction area Lp. The number of amplitude graphs 40 displayed corresponds to the number of edges E detected on the extraction area Lp.
[0056] 8 and 9 are diagrams illustrating the relationship between focus adjustment and amplitude graph 40 according to the embodiment. FIG. 9 is an enlarged view of a portion of amplitude graph 40 shown in FIG. 8. As described above, the focus of the imaging device 3 is adjusted by manual operation by the user. The focus adjustment of the imaging device 3 includes adjusting the position of the imaging device 3 in the Z-axis direction. The position of the imaging device 3 is adjusted in the Z-axis direction by manual operation of dial 52 by the user.
[0057] When the user operates the dial 52, the imaging device 3 moves in the Z-axis direction, changing the focus position of the imaging device 3 relative to the surface of the inspection object W. The edge amplitude changes due to focus adjustment of the imaging device 3. When the surface of the inspection object W and the focus position of the imaging device 3 coincide, i.e., when the imaging device 3 is focused on the surface of the inspection object W, the edge amplitude is maximum. When the surface of the inspection object W and the focus position of the imaging device 3 deviate, i.e., when the imaging device 3 is not focused on the surface of the inspection object W, the edge amplitude decreases. The longer the distance between the surface of the inspection object W and the focus position of the imaging device 3, i.e., the greater the focus of the imaging device 3 deviates from the surface of the inspection object W, the smaller the edge amplitude becomes.
[0058] The height of the amplitude graph 40 changes based on the magnitude of the edge amplitude. The display control unit 27 changes the height of the amplitude graph 40 to be displayed on the display device 14 based on the magnitude of the edge amplitude. The display control unit 27 changes the height of the amplitude graph 40 so that there is a one-to-one correspondence between the magnitude of the edge amplitude and the height of the amplitude graph 40. The display control unit 27 changes the height of the amplitude graph 40 so that the greater the edge amplitude, the higher the height of the amplitude graph 40, and the smaller the edge amplitude, the lower the height of the amplitude graph 40. In an embodiment, the display control unit 27 changes the height of the amplitude graph 40 so that the magnitude of the edge amplitude and the height of the amplitude graph 40 are proportional to each other.
[0059] That is, when the imaging device 3 is focused on the surface of the inspection object W, the height of the amplitude graph 40 is maximum. When the imaging device 3 is not focused on the surface of the inspection object W, the height of the amplitude graph 40 is lower. The greater the deviation of the focus of the imaging device 3 from the surface of the inspection object W, the lower the height of the amplitude graph 40.
[0060] 8 and 9, before the focus of the imaging device 3 is adjusted, the imaging device 3 is placed at an initial position in the Z-axis direction. As an example, the initial position of the imaging device 3 shown in FIGS. 8 and 9 is a near position where the focus position of the imaging device 3 is placed below the surface of the inspection object W. When the imaging device 3 is placed at the near position, the imaging device 3 is not focused on the surface of the inspection object W, and therefore the edge amplitude is small. Because the edge amplitude is small, the height of the amplitude graph 40 displayed on the display device 14 is low.
[0061] The user operates the dial 52 while checking the amplitude graph 40 displayed on the display device 14. The user operates the dial 52 so that the imaging device 3 is focused on the surface of the inspection object W, that is, so that the height of the amplitude graph 40 is maximized.
[0062] When the imaging device 3 is manually raised from the near position by the user, the distance between the surface of the inspection object W and the focus position of the imaging device 3 gradually decreases. As the distance between the surface of the inspection object W and the focus position of the imaging device 3 gradually decreases and the edge amplitude gradually increases, the height of the amplitude graph 40 displayed on the display device 14 gradually increases.
[0063] In the embodiment, the amplitude graph 40 includes a maximum amplitude graph 41 and a current amplitude graph 42. The maximum amplitude graph 41 is an amplitude graph 40 that indicates the maximum value of the edge amplitude that changes due to focus adjustment. The current amplitude graph 42 is an amplitude graph 40 that indicates the current value of the edge amplitude that changes due to focus adjustment. The height of the maximum amplitude graph 41 indicates the maximum value of the edge amplitude from the initial point in time when the imaging device 3 is placed in the initial position to the current point in time. The height of the current amplitude graph 42 changes in synchronization with the operation of the dial 52. In other words, the height of the current amplitude graph 42 changes based on the position of the imaging device 3 in the Z-axis direction.
[0064] The maximum amplitude graph 41 and the current amplitude graph 42 are displayed superimposed on each other. On the display screen of the display device 14, the position of the bottom end of the maximum amplitude graph 41 and the position of the bottom end of the current amplitude graph 42 are the same. The current amplitude graph 42 is displayed so as to overlap the maximum amplitude graph 41. In the area where the current amplitude graph 42 and the maximum amplitude graph 41 overlap, the maximum amplitude graph 41 is hidden by the current amplitude graph 42. In other words, in the area where the current amplitude graph 42 and the maximum amplitude graph 41 overlap, the maximum amplitude graph 41 is not displayed. The maximum amplitude graph 41 is displayed in a first color. The current amplitude graph 42 is displayed in a second color different from the first color. The first color is, for example, blue. The second color is, for example, red.
[0065] When the imaging device 3 is positioned at the near position and the dial 52 is operated to increase the edge amplitude, i.e., to raise the imaging device 3 from the near position, the maximum amplitude graph 41 and the current amplitude graph 42 extend upward at the same time. As described above, the maximum amplitude graph 41 is not displayed in the area where the current amplitude graph 42 and the maximum amplitude graph 41 overlap. Therefore, when the imaging device 3 is positioned at the near position and the dial 52 is operated to increase the edge amplitude, the current amplitude graph 42 extending upward is displayed on the display device 14, and the maximum amplitude graph 41 is not displayed.
[0066] After the maximum amplitude graph 41 and the current amplitude graph 42 simultaneously expand upward, if the dial 52 is operated to decrease the edge amplitude, i.e., to lower the imaging device 3, the current amplitude graph 42 shrinks in synchronization with the operation of the dial 52. On the other hand, the maximum amplitude graph 41 does not shrink because it indicates the maximum value of the edge amplitude at the current time. The display control unit 27 displays the current amplitude graph 42, which indicates the current value of the edge amplitude, while maintaining the display of the maximum amplitude graph 41, which indicates the maximum value of the edge amplitude that changes due to focus adjustment.
[0067] 8 and 9, the amplitude graph 40 when the imaging device 3 is disposed at the near position shows the amplitude graph 40 when the imaging device 3 rises slightly from the near position and then falls slightly. The amplitude graph 40 when the imaging device 3 is disposed at the near position includes a maximum amplitude graph 41 that shows the maximum value of the edge amplitude from the initial point in time when the imaging device 3 is disposed at the near position to the present point in time when the imaging device 3 rises from the near position and then falls, and a current amplitude graph 42 that shows the edge amplitude at the present point in time when the imaging device 3 falls.
[0068] When the dial 52 is operated so that the imaging device 3 rises from the near position, the distance between the surface of the inspection object W and the focus position of the imaging device 3 gradually shortens, and the imaging device 3 is positioned at an exact position where the focus position of the imaging device 3 coincides with the surface of the inspection object W, the edge amplitude becomes maximum and the height of the amplitude graph 40 displayed on the display device 14 becomes maximum.
[0069] After the imaging device 3 is positioned at the just position, if the user continues manual operation and the imaging device 3 further rises from the just position, the imaging device 3 is positioned at the far position, where the focus position of the imaging device 3 is positioned above the surface of the inspection object W. As the imaging device 3 moves from the just position to the far position, the distance between the surface of the inspection object W and the focus position of the imaging device 3 gradually increases, the edge amplitude decreases, and the height of the current amplitude graph 42 displayed on the display device 14 decreases. Since the maximum amplitude graph 41 indicates the maximum value of the edge amplitude from the initial point to the current point, which changes due to focus adjustment, when the imaging device 3 is positioned at the far position via the near position and the just position, the display control unit 27 causes the display device 14 to display the maximum amplitude graph 41 indicating the maximum value of the edge amplitude when the imaging device 3 was positioned at the just position. The display control unit 27 causes the display device 14 to display the current amplitude graph 42, which indicates the current value of the edge amplitude, while maintaining the display of the maximum amplitude graph 41, which indicates the maximum value of the edge amplitude, which changes due to focus adjustment. That is, when the imaging device 3 moves up from the just position to the far position, the maximum amplitude graph 41 does not shrink, but the current amplitude graph 42 does shrink. The current amplitude graph 42 indicates the current value of the edge amplitude when the imaging device 3 is positioned at the far position.
[0070] By checking the amplitude graph 40, the user can recognize that the imaging device 3 has passed the just position. While checking the amplitude graph 40, the user operates the dial 52 so that the imaging device 3 is positioned at the just position, that is, so that the imaging device 3 is lowered. As the imaging device 3 is lowered, the distance between the surface of the inspection object W and the focus position of the imaging device 3 gradually decreases, and the current amplitude graph 42 extends upward. While checking the amplitude graph 40, the user operates the dial 52 so that the current amplitude graph 42 overlaps the entire maximum amplitude graph 41 that would have been displayed when the imaging device 3 was positioned at the just position. By operating the dial 52 so that the current amplitude graph 42 overlaps the entire maximum amplitude graph 41, the imaging device 3 is positioned at the just position, and the surface of the inspection object W and the focus position of the imaging device 3 coincide with each other.
[0071] <Effects> As described above, in the embodiment, the inspection apparatus 1 includes the image processing device 13 having the processor 16. The image processing device 13 includes an image acquisition unit 22 that acquires a captured image Ma of the inspection object W captured by the imaging device 3, the focus of which is adjusted by a manual operation, an edge extraction unit 25 that extracts an edge portion from the captured image Ma, an edge amplitude calculation unit 26 that calculates an edge amplitude indicating a difference between the minimum luminance value and the maximum luminance value of a pixel in the edge portion that changes due to the focus adjustment, and a display control unit 27 that causes the display device 14 to display an amplitude graph 40 indicating the edge amplitude.
[0072] According to the embodiment, the edge amplitude is calculated as an index value for focusing. The user manually adjusts the focus of the imaging device 3. The focus adjustment of the imaging device 3 includes adjusting the position of the imaging device 3 in the Z-axis direction. An amplitude graph 40 that expands and contracts in synchronization with the focus adjustment of the imaging device 3 is displayed on the display device 14. By checking the amplitude graph 40 during the focus adjustment of the imaging device 3, the user can know whether the imaging device 3 is in focus on the surface of the inspection object W. The image processing device 13 can assist the user in adjusting the focus of the imaging device 3.
[0073] The display control unit 27 causes the display device 14 to display a current amplitude graph 42 indicating the current value of the edge amplitude, while maintaining the display of a maximum amplitude graph 41 indicating the maximum value of the edge amplitude that changes due to focus adjustment. While maintaining the display of the maximum amplitude graph 41, the current amplitude graph 42, which expands and contracts in synchronization with the focus adjustment of the imaging device 3, is displayed on the display device 14. The current amplitude graph 42 is displayed while maintaining the display of the maximum amplitude graph 41 when the imaging device 3 is positioned at the just position. The maximum amplitude graph 41 does not expand and contract, but the current amplitude graph 42 expands and contracts in synchronization with manual operation of the dial 52. By operating the dial 52, the user can recognize that the imaging device 3 has passed the just position. While checking the amplitude graph 40, the user can operate the dial 52 so that the current amplitude graph 42 overlaps the entire maximum amplitude graph 41 when the imaging device 3 is positioned at the just position. By operating the dial 52 so that the current amplitude graph 42 overlaps the entire maximum amplitude graph 41, the imaging device 3 is positioned exactly, and the surface of the inspection object W and the focus position of the imaging device 3 coincide with each other.
[0074] The maximum amplitude graph 41 and the current amplitude graph 42 are displayed superimposed on each other. The maximum amplitude graph 41 is displayed in a first color. The current amplitude graph 42 is displayed in a second color. This allows the user to intuitively recognize that the imaging device 3 has passed the exact position while operating the dial 52.
[0075] The image processing device 13 has a designation unit 24 that designates an extraction area Lp for extracting edge portions. The edge extraction unit 25 extracts edge portions from the extraction area Lp of the captured image Ma. The designation unit 24 designates the extraction area Lp based on input data from the input device 15. As a result, edge portions are extracted in the extraction area Lp desired by the user.
[0076] [Second embodiment] A second embodiment will now be described. In the following description, components that are the same as or equivalent to those in the first embodiment described above will be given the same reference numerals, and descriptions of those components will be simplified or omitted.
[0077] FIG. 10 is a diagram for explaining a method for generating an amplitude graph 40 according to an embodiment. The illumination device 4 can illuminate the inspection object W under a plurality of mutually different illumination conditions. As described above, the illumination device 4 can illuminate the inspection object W under each of the first illumination condition, the second illumination condition, the third illumination condition, and the fourth illumination condition. The appearance of the edge E in the captured image Ma may change depending on the illumination condition. That is, depending on the illumination condition, the edge E may be detectable or difficult to detect. For example, the edge E may be detectable under the first illumination condition and the fourth illumination condition, but may be difficult to detect under the second illumination condition and the third illumination condition.
[0078] In the embodiment, the imaging control unit 21 causes the lighting device 4 to illuminate the inspection object W under a plurality of mutually different illumination conditions. The imaging control unit 21 causes the imaging device 3 to capture an image of the inspection object W illuminated under a plurality of mutually different illumination conditions. The image acquisition unit 22 acquires a plurality of captured images Ma of the inspection object W illuminated under a plurality of mutually different illumination conditions. The edge extraction unit 25 extracts an edge portion from each of the plurality of captured images Ma. The edge amplitude calculation unit 26 calculates the edge amplitude of each of the plurality of edge portions. The display control unit 27 causes the display device 14 to display a composite amplitude graph 400 that combines the plurality of edge amplitudes.
[0079] The edge amplitude calculation unit 26 calculates the edge amplitude of the same edge portion of the inspection object W illuminated under a plurality of mutually different illumination conditions. The display control unit 27 generates a composite amplitude graph 400 that combines a plurality of edge amplitudes of the same edge portion illuminated under different illumination conditions, and displays the graph on the display device 14. Combining the edge amplitudes includes adding together a plurality of edge amplitudes calculated from the captured images Ma captured under a plurality of mutually different illumination conditions.
[0080] For example, the image acquisition unit 22 acquires captured images Ma including a first edge portion that includes a first edge Ea illuminated under four different illumination conditions. That is, the image acquisition unit 22 acquires four patterns of captured images Ma with different illumination conditions. The edge amplitude calculation unit 26 calculates the edge amplitude of the first edge portion illuminated under the four different illumination conditions. That is, the edge amplitude calculation unit 26 calculates the edge amplitude of the first edge portion illuminated under the first illumination condition, calculates the edge amplitude of the first edge portion illuminated under the second illumination condition, calculates the edge amplitude of the first edge portion illuminated under the third illumination condition, and calculates the edge amplitude of the first edge portion illuminated under the fourth illumination condition. The display control unit 27 adds the edge amplitude at the first edge portion illuminated under the first lighting condition, the edge amplitude at the first edge portion illuminated under the second lighting condition, the edge amplitude at the first edge portion illuminated under the third lighting condition, and the edge amplitude at the first edge portion illuminated under the fourth lighting condition to generate a composite amplitude graph 400 showing the edge amplitude at the first edge portion.
[0081] The composite amplitude graph 400 includes a composite maximum amplitude graph 410 and a composite current amplitude graph 420. The height of the composite maximum amplitude graph 410 is the sum of the height of the maximum amplitude graph 41 calculated from the first edge portion illuminated under a first lighting condition, the height of the maximum amplitude graph 41 calculated from the first edge portion illuminated under a second lighting condition, the height of the maximum amplitude graph 41 calculated from the first edge portion illuminated under a third lighting condition, and the height of the maximum amplitude graph 41 calculated from the first edge portion illuminated under a fourth lighting condition. The height of the composite current amplitude graph 420 is the sum of the height of the current amplitude graph 42 calculated from the first edge portion illuminated under the first lighting condition, the height of the current amplitude graph 42 calculated from the first edge portion illuminated under the second lighting condition, the height of the current amplitude graph 42 calculated from the first edge portion illuminated under the third lighting condition, and the height of the current amplitude graph 42 calculated from the first edge portion illuminated under a fourth lighting condition.
[0082] As described above, according to the embodiment, a plurality of captured images Ma of the inspection object W illuminated under a plurality of mutually different illumination conditions are acquired, and a plurality of edge amplitudes at the same edge portion are calculated from each of the plurality of captured images Ma, and a composite amplitude graph 400 in which the plurality of edge amplitudes are combined is displayed on the display device 14. According to the embodiment, even if it may be difficult to detect the edge E depending on the illumination condition, the edge E is detected from the plurality of captured images Ma of the inspection object W illuminated under a plurality of mutually different illumination conditions, and a composite amplitude graph 400 of sufficient height is displayed on the display device 14.
[0083] [Other embodiments] In the above-described embodiment, the designation unit 24 designates the extraction area Lp based on input data from the input device 15. The designation unit 24 may automatically set the extraction area Lp without relying on input data from the input device 15. [Explanation of symbols]
[0084] 1...inspection device, 2...table, 3...imaging device, 4...illumination device, 5...imaging optical system, 6...image sensor, 7...coaxial illumination unit, 8...side oblique illumination unit, 9...light source, 10...half mirror, 11...light source, 11A...first light source, 11B...second light source, 11C...third light source, 12...support member, 13...image processing device, 14...display device, 15...input device, 16...processor, 17...main memory, 18...storage, 19...input / output interface, 20...communication interface, 21...imaging control unit, 22...image acquisition unit, 23...input data data acquisition unit, 24...designation unit, 25...edge extraction unit, 26...edge amplitude calculation unit, 27...display control unit, 40...amplitude graph, 41...maximum amplitude graph, 42...current amplitude graph, 50...movement device, 51...ball screw mechanism, 52...dial, 53...body, 400...composite amplitude graph, 410...composite maximum amplitude graph, 420...composite current amplitude graph, E...edge, Ea...first edge, Eb...second edge, Ec...third edge, Ed...fourth edge, La...line, Lb...line, Lp...extraction area, Ma...captured image, Mb...bright area, Mc...dark area.
Claims
1. an image processing device having a processor; The image processing device includes: an image acquisition unit that acquires an image of the inspection object captured by an imaging device whose focus is adjusted by a manual operation; an edge extraction unit that extracts an edge portion from the captured image; an edge amplitude calculation unit that calculates an edge amplitude indicating a difference between a minimum luminance value and a maximum luminance value of a pixel in the edge portion that changes due to the focus adjustment; a display control unit that displays an amplitude graph showing the edge amplitude on a display device, Inspection equipment.
2. the display control unit displays a current amplitude graph indicating a current value of the edge amplitude while maintaining the display of a maximum amplitude graph indicating a maximum value of the edge amplitude that changes due to the focus adjustment. The inspection device according to claim 1 .
3. The maximum amplitude graph and the current amplitude graph are displayed in an overlapping manner, the maximum amplitude graph is displayed in a first color; The current amplitude graph is displayed in a second color. The inspection device according to claim 2 .
4. the image acquisition unit acquires a plurality of captured images of the inspection object illuminated under a plurality of mutually different illumination conditions; the edge extraction unit extracts the edge portion from each of the plurality of captured images; the edge amplitude calculation unit calculates the edge amplitude for each of the plurality of edge portions; the display control unit causes the display device to display a composite amplitude graph obtained by combining the plurality of edge amplitudes. The inspection device according to claim 1 .
5. The image processing device includes: a designation unit for designating an extraction area for extracting the edge portion; the edge extraction unit extracts the edge portion from the extraction area of the captured image; The inspection device according to claim 1 .
6. the designation unit designates the extraction area based on input data from an input device. The inspection device according to claim 5 .
7. acquiring an image of an object to be inspected captured by an imaging device whose focus is adjusted by manual operation; extracting an edge portion from the captured image; calculating an edge amplitude indicating a difference between a minimum luminance value and a maximum luminance value of a pixel in the edge portion that changes due to the focus adjustment; and displaying an amplitude graph showing the edge amplitude on a display device. Focus adjustment support method.
Citation Information
Patent Citations
Inspection device and focus adjustment support method
JP2018128393A