The present invention relates to a technique for imaging a transparent object.
A technique for imaging a transparent object by using a polarization camera that includes an imaging element in which polarizers with different transmission axis directions are regularly arranged is known (see Patent Document 1). Such a technique is expected to be applied to, for example, detection and inspection of an article made of glass or a transparent resin.
Patent Document 1: Japanese Unexamined Patent Publication No. 2020-17688
When light is applied to the transparent object, part of the light is specularly reflected at the surface of the transparent object. The specularly reflected light has polarization characteristics and can thus be observed by a polarization camera, and based on the observation result, the surface (reflection surface) of the transparent object can be imaged.
However, not only specularly reflected light but also light diffusely reflected by a subject, a background, or the like is incident on the polarization camera, which may be a noise factor. In addition, the appearance of polarized light varies depending on the shape and reflection characteristics of the subject. For this reason, it is difficult to prepare highly versatile logic that can exhibit stable performance for any subject or situation.
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a novel technique for extracting high-quality polarization information from an image of a polarization camera.
The present invention is an imaging system for imaging a transparent object, the imaging system including: an illumination apparatus configured to illuminate a transparent object; a polarization camera including an imaging element in which polarizers with different transmission axis directions are regularly arranged; and a processing apparatus. The processing apparatus includes an image acquisition unit configured to acquire an original image captured by the polarization camera in a state where the illumination apparatus illuminates the transparent object, a polarization extraction unit configured to execute a polarization extraction process that extracts, for each of pixels of the original image, polarization information that is information regarding polarization derived from specular reflection on the transparent object, an image generation unit configured to generate a polarization information image obtained by imaging the polarization information, based on an extraction result of the polarization extraction process, and a reception unit configured to receive a change in one or more parameters to be used in the polarization extraction process.
According to this configuration, a user can change a parameter for the polarization extraction process as necessary. Therefore, for example, the user adaptively adjusts the parameter according to the shape and state of the transparent object as the subject, the situation of diffuse reflection, and the like, so that high-quality polarization information can be extracted. Note that the reception unit may provide a user interface for changing the parameter and receive the parameter changed by the user on the user interface, or the reception unit may receive a parameter change instruction from the user from an external apparatus through a network.
The polarization extraction process may include a polarization information calculation process that calculates polarization information of a target pixel with reference to pixel values of the target pixel and a neighboring pixel of the target pixel. In this process, one or more neighboring pixels are referenced. When the transmission axis directions of the polarizers are n types (n≥2), the neighboring pixels may be selected so that n types of pixels respectively corresponding to the n types of transmission axis directions are at least included in a pixel group made up of the target pixel and the neighboring pixels.
In this case, the parameter may include a mask size that is an item defining a range of a neighboring pixel to be referenced when the polarization information is calculated in the polarization information calculation process. For example, an appropriate mask size is set according to the size of the reflection surface of the transparent object as the subject, so that high-quality polarization information can be extracted.
The reception unit may include a user interface that causes a user to select a mask size that is used in the polarization information calculation process from a plurality of mask sizes different from each other. By adopting the selection form, usability can be improved.
The polarization extraction process may include a noise removal process that, after calculation of the polarization information of each of the pixels of the original image by the polarization information calculation process, removes or reduces noise included in a result of the calculation. By performing the noise removal process, high-quality polarization information can be extracted.
The noise removal process may include a process of comparing polarization information between the target pixel and the peripheral pixel to determine the similarity or dissimilarity of the polarization information between the target pixel and the peripheral pixel, and deleting the polarization information of the target pixel when the dissimilarity is determined. Through such a process, polarization information with low reliability can be removed.
The noise removal process may include a process of comparing polarization information between the target pixel and the peripheral pixel to determine the similarity or dissimilarity of the polarization information between the target pixel and the peripheral pixel, and replacing the polarization information of the target pixel with polarization information of a pixel selected from the target pixel and the peripheral pixel when the similarity is determined. Through such a process, the polarization information is smoothed, and hence the SN ratio of the polarization information can be further improved.
The parameter may include an item that defines a range of the peripheral pixel to be compared with the target pixel. Further, the parameter may include an item defining a determination criterion of the similarity or dissimilarity for the polarization information. For example, the parameter is adjusted according to the degree and range of noise included in the result of the polarization information calculation process, whereby the SN ratio can be improved to the extent that overcorrection does not occur.
The parameters may include an item that designates whether to apply the noise removal process to a calculation result of the polarization information calculation process. When the result of the polarization information calculation process is sufficiently high quality, the noise removal process can be skipped to prevent overcorrection and reduce processing time.
The present invention may provide a control method for an imaging system that includes an illumination apparatus, a polarization camera including an imaging element in which polarizers with different transmission axis directions are regularly arranged, and a processing apparatus, the control method including: a step of illuminating a transparent object with the illumination apparatus; a step of capturing an image with the polarization camera; a step of taking an original image captured by the polarization camera into the processing apparatus; and a step of executing, by the processing apparatus, a polarization extraction process that extracts, for each of pixels of the original image, polarization information that is information regarding polarization derived from specular reflection on the transparent object, and generating a polarization information image obtained by imaging the polarization information, based on an extraction result of the polarization extraction process. A parameter to be used in the polarization extraction process is changeable.
The present invention may provide a program for causing a processor to execute each step of the control method.
The present invention may be regarded as an imaging system including at least some of the above units, or may be regarded as a processing apparatus, a control apparatus, or an image processing apparatus. Further, the present invention may be regarded as an apparatus that detects or inspects a transparent object by using a polarization information image obtained by an imaging system. Moreover, the present invention may be regarded as a control method, an image processing method, a detection method, or an inspection method for the imaging system that includes some of the above processes, or may be regarded as a program for implementing such a method or a recording medium on which the program is recorded. Note that each of the above methods and processes can be combined with each other as much as possible to constitute the present invention.
According to the present invention, high-quality polarization information can be extracted from an image of a polarization camera.
The imaging system 1 mainly includes a polarization camera 10, an illumination apparatus 11, a processing apparatus 12, and a stage 13. The polarization camera 10 is an imaging unit including an imaging element in which polarizers are arranged. The illumination apparatus 11 is a light source for irradiating the subject (transparent object) W placed on the stage 13 with the illumination light L. The processing apparatus 12 is an apparatus that executes the control of the entire imaging system 1 and information processing using an image captured by the polarization camera 10. The stage 13 is an apparatus for placing or holding the subject W.
The polarization camera 10 is disposed to capture an image of the subject W placed on the stage 13 from a direction directly above. Considering an XYZ coordinate system with X and Y axes taken parallel to the stage 13 and a Z axis perpendicular to the stage 13, the optical axis of the polarization camera 10 is parallel to the Z axis. The purpose of the present system is to capture the light specularly reflected by the subject W using the polarization camera 10, and it is thus desirable for the incident angle of the illumination light L on the subject surface to be as close as possible to Brewster's angle. Therefore, in the present embodiment, the illumination apparatus 11 is disposed at substantially the same height as the stage 13 (in practice, the lower edge of the illumination apparatus 11 is about the same height as the upper edge of the stage 13 so that the illumination light L is not blocked by the stage 13), and the illumination light L is incident on the subject W from almost directly across (a direction perpendicular to the Z axis). Such an illumination arrangement is also referred to as low-angle illumination. In the combination of the overhead camera and the low-angle illumination as in the present embodiment, specular reflection R of the illumination light L having an incident angle of about 45 degrees on the subject surface is captured by the polarization camera 10. To bring the incident angle closer to Brewster's angle, an illumination arrangement may be adopted in which the illumination light L is applied from a position lower than the subject W, or the optical axis of the polarization camera 10 may be tilted to the side opposite to the illumination apparatus 11.
An example of the configuration of the polarization camera 10 will be described with reference to
The polarization camera 10 has a structure in which a polarizer array 21 is combined with an imaging element 20. The imaging element 20 is a device in which photoelectric conversion elements (also referred to as pixels), such as charge-coupled device (CCD) sensors or complementary metal-oxide-semiconductor (CMOS) sensors, are two-dimensionally arranged, and is also called an image sensor. The polarizer array 21 is a device in which many polarizers are two-dimensionally arranged, and is designed in position and size such that one polarizer 210 corresponds to one pixel (light receiving element) 200 of the imaging element 20. The polarizer 210 is an optical element having a property of allowing only linearly polarized light in a specific direction to pass therethrough (the vibration direction of the linearly polarized light transmitted by the polarizer 210 is referred to as the transmission axis direction of the polarizer 210). As illustrated in
The resolution (pixel pitch) and the size (number of pixels) of the imaging element 20 and the polarizer array 21 may be appropriately designed according to the application of the subject or the image. Methods of achieving the polarizer array 21 include using a wire grid, a photonic crystal, and the like, but any method may be adopted. In addition, although the polarizers with four different transmission axis directions have been combined in four 2×2 pixels in
An example of the configuration of the illumination apparatus 11 will be described with reference to
The illumination apparatus 11 includes four rod-shaped illuminators 30 arranged to surround the stage 13. When the four rod-shaped illuminators 30 are simultaneously turned on, the subject W on the stage 13 can be illuminated from four directions (X positive direction, X negative direction, Y positive direction, Y negative direction). In addition, when only one of the rod-shaped illuminators 30 is selectively turned on, the illumination direction can be switched. The rod-shaped illuminator 30 includes, for example, a plurality of light-emitting diode (LED) light sources arranged on a substrate and a diffusion plate arranged to cover the LED light sources.
Note that the structure of the illumination apparatus 11 is not limited to that illustrated in
An example of the configuration of the processing apparatus 12 will be described with reference to
The processing apparatus 12 includes a camera controller 40, an illumination controller 41, and an image processor 42 as main components. The camera controller 40 controls the polarization camera 10. For example, the camera controller 40 executes the control of imaging conditions (exposure time, gain, etc.) of the polarization camera 10, the taking-in of image data from the polarization camera 10, the calibration of the polarization camera 10, and the like. The illumination controller 41 controls the illumination apparatus 11. For example, the illumination controller 41 executes the control of illumination conditions (light emission intensity, light emission time, etc.), the control of turning on/off for each light source, and the like. The image processor 42 executes processing on the image taken in from the polarization camera 10.
The image processor 42 of the present embodiment has functions such as an image acquisition section 420, a polarization extractor 421, a polarization information image generator 422, a display 423, and a parameter receptor 424. The image acquisition section 420 acquires, via the camera controller 40, an image captured by the polarization camera 10 (hereinafter referred to also as an “original image”). The polarization extractor 421 performs a polarization extraction process that extracts polarization information from the original image. The polarization information is information regarding polarization derived from specular reflection on a transparent object. The polarization information image generator 422 generates an image representing the polarization information (hereinafter referred to also as a “polarization information image”), based on the extraction result of the polarization extraction process. The display 423 performs a process of displaying the generated polarization information image on a display apparatus. The parameter receptor 424 is a function of receiving changes in various condition settings (parameters) that determine the operation of the imaging system 1. Details of each process of the image processor 42 will be described later.
The processing apparatus 12 may be configured by, for example, a computer including a processor such as a central processing unit (CPU) or a graphics processing unit (GPU), a memory as a main storage, a storage as an auxiliary storage, a display apparatus, an input apparatus such as a mouse or a touch panel, a network interface, and the like. As the computer, a general-purpose computer such as a personal computer, a tablet terminal, a smartphone, or a field computer may be used, an embedded computer or a dedicated apparatus may be used, or a computer resource of another apparatus such as the polarization camera 10 or a programmable logic controller (PLC) may be used. The configuration illustrated in
A basic principle of transparent object detection by the polarization camera will be described.
As illustrated in
Meanwhile, light polarized by specular reflection, as well as light that is diffusely reflected by a subject, a background, or similar sources, is incident on the polarization camera. In imaging of a transparent object, a diffusely reflected light component is unnecessary and causes an artifact. Therefore, it is first necessary to extract only a polarization component from an image of the polarization camera. For this purpose, in the present embodiment, a difference in transmission characteristics due to the polarizers is used.
With reference to
For example, as illustrated in
The polarization extraction process performed by the polarization extractor 421 of the present embodiment also has the same basic principle of extracting polarization information based on a change in light intensity (transmission axis direction dependency) when observed through a plurality of types of polarizers with different transmission axis directions. However, to further improve accuracy and usability, unique processes have been added, such as the selection of a mask size (a parameter that defines the range of neighboring pixels to be referenced during polarization calculation) and noise removal. Details will be described later.
An example of the operation of the imaging system 1 will be described with reference to the flowchart in
In step S70, a transparent object to be the subject W is placed on the stage 13. The subject W may be conveyed and positioned using a robot or a conveyance apparatus, or an operator may set the subject W on the stage 13.
In step S71, a user inputs the imaging conditions of the polarization camera 10 and the illumination conditions of the illumination apparatus 11 using the user interface provided by the parameter receptor 424 of the processing apparatus 12. Note that when there is no need to change the imaging conditions or the illumination conditions, the process of step S71 may be skipped.
In step S72, an image of the subject W is captured. Specifically, the illumination controller 41 of the processing apparatus 12 turns on the illumination apparatus 11 according to the given illumination conditions, and irradiates the subject W with illumination light. With the subject W illuminated, the camera controller 40 then controls the polarization camera 10 according to the given imaging conditions to capture an image of the subject W.
In step S73, the image acquisition section 420 of the processing apparatus 12 takes in the image (original image) captured in step S72 from the polarization camera 10. The taken-in original image data is stored in a memory or a storage and used for the processes by the image processor 42.
In step S74, the user inputs image processing parameters, which will be used by the image processor 42, by using the user interface provided by the parameter receptor 424. When no image processing parameter needs changing, the process of step S74 may be skipped.
In step S75, the polarization extractor 421 calculates polarization information from the original image taken in in step S73. Details of the polarization information calculation process will be described later.
In step S76, the polarization extractor 421 applies the noise removal
process to the calculation result of step S75. When noise removal has been set to “No” in the UI in
In step S77, the polarization information image generator 422 generates a polarization information image, based on the calculation result of the polarization extractor 421. In the present embodiment, three types of images are generated as the polarization information image: a polarization intensity image, a polarization direction image, and a brightness image. The polarization intensity image is an image representing the polarization intensity (degree of polarization) in grayscale, and the polarization direction image is an image representing the polarization direction in grayscale or pseudo color. The brightness image is an image representing the light intensity of the polarization component in grayscale.
In step S78, the display 423 displays the image selected in the display image setting 82 of the UI in
Here, when the user changes the display image setting 82 on the UI in
An implementation example of a polarization information calculation process (step S75 in
In step S10, the polarization extractor 421 selects a target pixel to be calculated from the original image. In step S10, the target pixel is sequentially selected from (1, 1) to (M, N).
In step S11, the polarization extractor 421 selects neighboring pixels to be referenced when calculating the polarization information of the target pixel. The range of the neighboring pixels to be selected here is determined by the mask size designated by the mask size setting 80 in
In step S12, the polarization extractor 421 calculates polarization information of the target pixel, based on the light intensities (pixel values) of the target pixel and the neighboring pixels. When the light intensities at 0 degrees, 45 degrees, 90 degrees, and 135 in the transmission axis directions are denoted by I1, I2, I3, and I4, respectively, for example, the brightness I0, the polarization direction θ, and the polarization intensity D of the target pixel are obtained by the following equations.
In the example of
A brightness I0 in Equation (1) is an index representing the intensity of incident light that is incident on the target pixel. A polarization direction θ in Equation (2) represents the principal axis direction of a polarization component included in the incident light that is incident on the target pixel. A polarization intensity D in Equation (3) is an index representing the degree of polarization of the polarization component included in the incident light that is incident on the target pixel.
Note that the above Equations (1) to (3) are examples, and indices corresponding to the brightness, polarization direction, and polarization intensity may be calculated by other equations. For example, the coefficients in Equations (1) to (3) may be replaced with other coefficients, or Equation (3) may be replaced with the following Equation (4).
In step S13, the polarization extractor 421 confirms whether the polarization information calculation process has been completed for all the pixels of the original image (i.e., whether i=M and j=N), and when there is an unprocessed pixel, the process returns to step S10 and executes the process on the next target pixel.
Through the processes described above, the polarization direction 0, the polarization intensity D, and the brightness I0 are calculated for all the pixels of the original image. The calculation result of the polarization information calculation process is stored in a memory or a storage, for example, in a data format that associates the coordinates (i, j) of each pixel with the polarization direction θ(i, j), the polarization intensity D(i, j), and the brightness I0(i, j), for use in a later process.
Next, process examples when the mask size is larger than 2×2 will be described with reference to
As illustrated in
For example, when an average value is used as the representative value, I1 to I4 are given by the following equations.
As the representative value, in addition to the average value, a mode value, an intermediate value, a maximum value, a minimum value, or the like may be used. Instead of using the representative value, I1 to I4 may be estimated by performing a sine wave fitting on the nine pixel values, or the brightness I0, the polarization direction θ, and the polarization intensity D may be calculated directly.
In the present embodiment, any change can be made in the mask size, that is, the pixel range referenced at the time of calculating the polarization information. The user may select an appropriate mask size according to the shape and state of the subject, the application of the present system, or the like.
For example, as illustrated in
On the other hand, as illustrated in
Note that the present embodiment has shown four mask sizes of 2×2, 3×3, 4×4, and 5×5 as examples, but the mask size is not limited thereto. For example, a mask larger than 5×5 may be used, or a mask having a non-square shape may be used. In addition, the user may be able to design the mask with desired size and shape.
The polarization information calculation process described above uses the principle of detecting polarization in which a local difference in pixel value is taken as a difference in transmission amount due to a difference in the transmission axis direction of the polarizer to detect polarization. Therefore, for example, when a luminance change with a high spatial frequency occurs in an edge portion or a texture portion of a subject, it may be mistaken for a difference in pixel value due to polarization, leading to erroneous detection of polarization. The noise removal process is a process for removing or reducing noise caused by such erroneous detection from the calculation result of the polarization information calculation process.
An implementation example of the noise removal process (step S76 in
In step S20, the polarization extractor 421 reads parameters set in the noise removal setting 81 in
In step S22, the polarization extractor 421 reads the calculation result of the polarization information calculation process from the memory or the storage. Here, data is acquired where coordinates (i, j) of each pixel are associated with the polarization direction θ(i, j), the polarization intensity D(i, j), and the brightness I0(i, j).
In step S23, the polarization extractor 421 selects a target pixel to be processed. In step S23, the target pixel is sequentially selected from (1, 1) to (M, N).
In step S24, the polarization extractor 421 compares the polarization directions between the target pixel and its peripheral pixels, and determines whether or not the polarization directions are similar. As illustrated in
In step S25, the polarization extractor 421 compares polarization intensities between the target pixel and its peripheral pixels, and determines whether or not the polarization intensities are similar. The selection of the comparison range is as illustrated in
When either the polarization direction or the polarization intensity is “dissimilar”, the polarization information of the target pixel is a unique value (outlier) compared to the peripheral pixels, and is more likely to be noise. Therefore, in step S26, the polarization extractor 421 deletes the polarization information (the polarization direction θ and the polarization intensity D) of the target pixel.
When both the polarization direction and the polarization intensity are “similar”, in step S27, the polarization extractor 421 selects a pixel having the largest polarization intensity among the target image and the pixels within the comparison range. Then, the polarization extractor 421 replaces the polarization direction and the polarization intensity of the target pixel with the polarization direction and the polarization intensity of the selected pixel. Through this process, a smoothing effect for reducing local variations in polarization direction and polarization intensity can be obtained.
In step S28, the polarization extractor 421 confirms whether the noise removal process has been completed for all the pixels, and when there is an unprocessed pixel, the process returns to step S23 and executes the process on the next target pixel.
Through the process described above, noise (outlier) is removed and smoothing is performed on the polarization direction θ and the polarization intensity D, which are the calculation results of the polarization information calculation process. Note that the corrected data is overwritten and stored in the memory or the storage.
An example in which the imaging system 1 described above is applied to detection and inspection in a manufacturing process for a syringe filled with a medical solution will be described.
In the manufacturing process for a syringe filled with a medical solution, a robot is typically used to pick up and place the syringe and then inject the medical solution. At this time, when the syringe is present at an incorrect position or in a lying posture, there is a risk of damaging the syringe or causing a malfunction in the manufacturing apparatus. Therefore, a mechanism for monitoring the position and posture of the syringe and outputting an error or stopping the apparatus in the case of a problem is desired.
In contrast, when the polarization information is extracted using the imaging system 1 according to the embodiment of the present invention, only specular reflection on the surface of the syringe 101 can be imaged as illustrated in
A computer image recognition technique may be used to detect a syringe or determines a syringe posture from the polarization information image. For example, a syringe in the correct posture exhibits specular reflection at the inner circle and its surrounding flange. By focusing on this image feature and detecting the shapes of the circle and the flange portion from the polarization information image by a method such as pattern matching, it is possible to automatically recognize the syringe in the correct posture. In the case of a lying syringe, for example, first, a set of pixels (pixel regions) having a specific polarization direction range (e.g., 0° to 60°) and adjacent to each other is extracted, and then a pixel region with a width and a length equal to or larger than a threshold value may be detected from the extracted pixel regions. Through such a process, it is possible to automatically recognize the belt-shaped pixel region of the lying syringe.
The above embodiments merely describe, as examples, the configuration examples of the present invention. The present invention is not limited to the specific aspects described above, and various variations can be made within the scope of the technical idea.
For example, the arrangement and configuration of the polarization camera and the illumination apparatus are not limited to those illustrated in
In the above embodiment, the polarizers at 0 degrees, 45 degrees, 90 degrees, and 135 degrees have been used, but the setting of the transmission axis direction is not limited thereto. It is sufficient that the light having passed through the polarizers with different transmission axis directions can be observed in the imaging element and that the polarization information included in the incident light from the observation result can be extracted.
In the UI screen in
An imaging system (1) for imaging a transparent object (W), the imaging system (1) including:
A control method for an imaging system (1) including an illumination apparatus (11), a polarization camera (10) that includes an imaging element (20) in which polarizers (210) with different transmission axis directions are regularly arranged, and a processing apparatus (12), the control method including:
Number | Date | Country | Kind |
---|---|---|---|
2021-139934 | Aug 2021 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2022/012759 | 3/18/2022 | WO |