WO2023032313A1 - 撮像システムおよびその制御方法 - Google Patents

撮像システムおよびその制御方法 Download PDF

Info

Publication number
WO2023032313A1
WO2023032313A1 PCT/JP2022/012762 JP2022012762W WO2023032313A1 WO 2023032313 A1 WO2023032313 A1 WO 2023032313A1 JP 2022012762 W JP2022012762 W JP 2022012762W WO 2023032313 A1 WO2023032313 A1 WO 2023032313A1
Authority
WO
WIPO (PCT)
Prior art keywords
polarization
image
polarization information
information
pixel
Prior art date
Application number
PCT/JP2022/012762
Other languages
English (en)
French (fr)
Inventor
幸広 小松
泰之 池田
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Publication of WO2023032313A1 publication Critical patent/WO2023032313A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • H04N23/54Mounting of pick-up tubes, electronic image sensors, deviation or focusing coils
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals

Definitions

  • the present invention relates to technology for imaging transparent objects.
  • Patent Document 1 A technique for imaging a transparent object using a polarization camera having an imaging device in which polarizers with different transmission axis directions are regularly arranged (see Patent Document 1). Such technology is expected to be applied to the detection and inspection of articles made of glass or transparent resin, for example.
  • specularly reflected light When light hits a transparent object, some of the light is specularly reflected on the surface of the transparent object. Since specularly reflected light has polarization properties, it can be observed with a polarization camera, and based on the observation results, the surface (reflection surface) of a transparent object can be imaged.
  • the present invention has been made in view of the above-mentioned circumstances, and its purpose is to provide a technique capable of stably extracting polarization information regardless of the subject or situation.
  • the present invention is an imaging system for imaging a transparent object, comprising an illumination device for illuminating the transparent object, and a polarization camera having an imaging element in which polarizers with different transmission axis directions are regularly arranged.
  • a processing device comprising control means for controlling one or both of the illumination device and the polarization camera to photograph the transparent object under different photographing conditions; and an image acquiring means for acquiring a plurality of original images obtained by obtaining a plurality of original images, and for each pixel of each of the plurality of original images, polarization information, which is information on polarization derived from specular reflection on the transparent object, is extracted.
  • Polarization extraction means for executing extraction processing; and image generation means for synthesizing a plurality of pieces of polarization information extracted from each of the plurality of original images by the polarization extraction processing, and generating a polarization information image in which the polarization information is visualized.
  • an imaging system characterized by comprising:
  • the imaging system according to the present invention the same transparent object is photographed a plurality of times under different photographing conditions to acquire a plurality of original images. If any of the photographing conditions match, it can be expected that at least one original image suitable for extracting the polarization information of the transparent object will be obtained. Therefore, by using the polarization information extracted from each of the plurality of original images, it is possible to stably extract the polarization information regardless of the subject or situation.
  • the image generating means selects, for each pixel, the polarization information with the highest reliability among the plurality of pieces of polarization information extracted from each of the plurality of original images, and selects the polarization information selected for each pixel.
  • the information may be used to generate the polarization information image.
  • polarization information extracted from the same original image is not necessarily selected for all pixels. This is because, depending on the position within the field of view of the polarizing camera, the shape, orientation, and reflection characteristics of the reflective surface differ, the intensity of the illumination light reaching the reflective surface differs, and the effect of diffuse reflection differs. be. Therefore, by selecting the optimum polarization information for each pixel and using them to generate the final polarization information image, it is possible to obtain a highly reliable polarization information image regardless of the position within the field of view. Also, with this method, even if there are multiple subjects in the field of view of the polarization camera (and even if there are multiple subjects with different shapes, reflection characteristics, or postures), all subjects can be captured. can be extracted with high precision.
  • the image generating means may regard the one with the strongest degree of polarization among the plurality of pieces of polarization information as the one with the highest reliability of the polarization information.
  • the degree of polarization is the strongest means that the polarization component is observed most clearly. It can be considered that the stronger the degree of polarization appears (the more clearly the polarization component is observed), the higher the reliability of the polarization information. Therefore, by selecting the one with the strongest degree of polarization from a plurality of pieces of polarization information obtained for one pixel, the pixel (that is, the area on the reflective surface of the transparent object corresponding to the pixel) is selected. Highly reliable polarization information can be obtained.
  • the control means may control either or both of the illumination device and the polarization camera so as to obtain a plurality of original images with different brightness. If the specular reflection is too weak, it will be difficult to extract the polarization information, and if the specular reflection is too strong, the polarization information will not be extracted due to overexposure. Observing the light is essential. If a plurality of original images with different brightness are captured as in the present invention, specular reflected light with an appropriate intensity can be observed in one of the original images, and highly reliable polarization information can be extracted from that original image. You can expect to be able to.
  • the control means may perform control to vary the "illumination intensity of the lighting device" as the photographing condition, or perform control to vary the "exposure time of the polarization camera” as the photographing condition. Alternatively, control may be performed to vary the "gain of the polarization camera” as the photographing condition.
  • the control means may simultaneously control two or more of "illumination intensity of the illumination device", “exposure time of the polarization camera", and “gain of the polarization camera".
  • the control means may control the illumination device so as to obtain a plurality of original images with different illumination directions with respect to the transparent object.
  • the lighting direction is changed, the situation of diffuse reflection in the background etc. changes. Therefore, from among multiple original images taken with different illumination directions, the one that has the least influence of the diffuse reflected light component (i.e., noise) and has the clearest polarization component can be selected to increase the reliability of the image. It is possible to extract highly accurate polarization information.
  • the lighting device may have a plurality of light sources that can be turned on independently, and the control means may change the lighting direction with respect to the transparent object by switching the light sources to be turned on.
  • the control means may change the lighting direction with respect to the transparent object by switching the light sources to be turned on.
  • the polarization extraction processing may include noise removal processing for removing or reducing noise included in the calculation result after calculating the polarization information of each pixel of the original image.
  • High-quality polarization information can be extracted by performing noise removal processing.
  • the noise removal process compares the polarization information between the target pixel and its peripheral pixels to determine whether the polarization information of the target pixel and the peripheral pixels are similar or dissimilar, and determines that they are dissimilar. In this case, a process of deleting the polarization information of the target pixel may be included. Such processing can remove unreliable polarization information.
  • the noise removal process compares the polarization information of the target pixel and its surrounding pixels to determine whether the polarization information of the target pixel and the surrounding pixels is similar or dissimilar. may include a process of replacing the polarization information of the target pixel with the polarization information of a pixel selected from the target pixel and the peripheral pixels. Such processing smoothes the polarization information, so that the SN ratio of the polarization information can be further improved.
  • the present invention provides a control method for an imaging system comprising an illumination device, a polarization camera having an imaging device in which polarizers with different transmission axis directions are regularly arranged, and a processing device, wherein the illumination device and the photographing a transparent object under different photographing conditions by controlling one or both of the polarization cameras; importing a plurality of original images photographed under different photographing conditions into the processing device; For each pixel of each of the plurality of original images, polarization extraction processing is performed to extract polarization information, which is information about polarization derived from specular reflection on the transparent object, and the plurality of original images are extracted by the polarization extraction processing. and synthesizing a plurality of pieces of polarization information extracted from each of the original images to generate a polarization information image in which the polarization information is imaged.
  • the present invention may provide a program for causing a processor to execute each step of the above control method.
  • the present invention may be regarded as an imaging system having at least part of the above means, or may be regarded as a processing device, a control device, or an image processing device. Also, the present invention may be regarded as an apparatus for detecting or inspecting a transparent object using a polarization information image obtained by an imaging system. Further, the present invention may be regarded as an imaging system control method, an image processing method, a detection method, or an inspection method including at least a part of the above processing, and a program for realizing such a method and a recording of the program. It can also be regarded as a recording medium. It should be noted that each of the means and processes described above can be combined with each other as much as possible to constitute the present invention.
  • FIG. 1 is a diagram schematically showing the overall configuration of an imaging system according to an embodiment of the invention.
  • FIG. 2 is a diagram schematically showing the structure of a polarization camera.
  • FIG. 3A is a diagram schematically showing the structure of the lighting device, and
  • FIGS. 3B and 3C are diagrams showing other configuration examples of the lighting device.
  • FIG. 4 is a block diagram showing the logical configuration (functional configuration) of the processing device.
  • 5A and 5B are diagrams illustrating specular reflection.
  • FIG. 6 is a diagram for explaining a method of extracting polarization components from the image of the polarization camera.
  • FIG. 7 is a flow chart showing an example of the operation of the imaging system.
  • FIG. 8 is an example of a user interface for inputting image processing parameters.
  • FIG. 9 is a flowchart of polarization information calculation processing.
  • 10A to 10D are diagrams showing examples of neighboring pixels.
  • FIG. 11A is a diagram showing an example of specular reflection on a curved surface portion
  • FIG. 11B is a diagram showing an example of selection of a mask size when the range on which polarized light is incident is narrow.
  • FIG. 12 is a diagram showing an example in which a large mask size is suitable.
  • FIG. 13 is a flowchart of noise removal processing.
  • 14A and 14B are diagrams showing examples of comparison ranges.
  • FIG. 15 is a flowchart of image generation processing.
  • FIG. 16A is a diagram showing how a syringe arranged in a nest is observed by a zenith camera, and FIG.
  • FIG. 16B is a diagram for explaining non-uniformity in the intensity of illumination light depending on the position within the field of view.
  • FIG. 17 is a diagram showing an example of a difference in polarization intensity images when the illumination intensity is changed stepwise, and a polarization intensity image obtained by synthesizing them.
  • 18A and 18B are diagrams for explaining the second embodiment.
  • FIG. 1 schematically shows the overall configuration of an imaging system according to the first embodiment of the invention.
  • This imaging system 1 is a system for imaging a transparent object using a polarizing camera 10, and is used, for example, for detecting and inspecting a transparent object on a production line in a factory.
  • the imaging system 1 includes a polarization camera 10, a lighting device 11, a processing device 12, and a stage 13 as main components.
  • the polarization camera 10 is imaging means having an imaging element in which polarizers are arranged.
  • the illumination device 11 is a light source for irradiating illumination light L onto a subject (transparent object) W placed on the stage 13 .
  • the processing device 12 is a device that executes control of the imaging system 1 as a whole and information processing using an image captured by the polarization camera 10 .
  • the stage 13 is a device for placing or holding the subject W. As shown in FIG.
  • the polarization camera 10 is arranged so as to photograph the subject W placed on the stage 13 from the zenith direction.
  • the optical axis of the polarization camera 10 is parallel to the Z axis. Since the purpose of this system is to capture light specularly reflected by the object W with the polarization camera 10, it is desirable that the incident angle of the illumination light L with respect to the surface of the object be as close to the Brewster's angle as possible.
  • the illumination device 11 is positioned at approximately the same height as the stage 13 (actually, the lower end of the illumination device 11 is placed at approximately the same height as the upper end of the stage 13 so that the illumination light L is not blocked by the stage 13). ) so that the illumination light L is incident on the subject W almost from the side (direction perpendicular to the Z axis).
  • Such an illumination arrangement is also called low-angle illumination.
  • the polarization camera 10 captures the specular reflection R of the illumination light L with an incident angle of about 45 degrees on the object surface.
  • an illumination arrangement is adopted in which the illumination light L is applied from a position lower than the object W, or the optical axis of the polarization camera 10 is placed on the opposite side of the illumination device 11. You can knock them down.
  • FIG. 2 is a diagram schematically showing the structure of the polarization camera 10. As shown in FIG.
  • the polarization camera 10 has a structure in which a polarizer array 21 is combined with an imaging device 20 .
  • the imaging element 20 is a device in which photoelectric conversion elements (also called pixels) such as a CCD (Charge Coupled Device) sensor and a CMOS (Complementary Metal Oxide Semiconductor) sensor are two-dimensionally arranged, and is also called an image sensor.
  • the polarizer array 21 is a device in which a large number of polarizers are arranged two-dimensionally, and the position and size are designed 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 that has the property of transmitting only linearly polarized light in a specific direction (the vibration direction of the linearly polarized light transmitted by the polarizer 210 is called the transmission axis direction of the polarizer 210).
  • the polarizer array 21 of this embodiment has a structure in which polarizers 210 in four types of transmission axis directions (0 degrees, 45 degrees, 90 degrees, and 135 degrees) are regularly arranged. .
  • the resolution (pixel pitch) and size (number of pixels) of the imaging element 20 and the polarizer array 21 may be appropriately designed according to the subject and the application of the image.
  • Methods for realizing the polarizer array 21 include wire grids, photonic crystals, and the like, and any method may be used.
  • four types of polarizers with different transmission axis directions are combined into 4 pixels of 2 ⁇ 2, but the variation and arrangement of the transmission axis directions of the polarizers may be other configurations.
  • FIG. 3A is a diagram schematically showing the structure of the illumination device 11 of the present embodiment, and shows a state when the stage 13 is viewed from the polarization camera 10 side.
  • the illumination device 11 is composed of four rod-shaped illuminations 30 arranged so as to surround the stage 13 .
  • 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). Also, by selectively turning on only one of the rod-shaped lights 30, the lighting direction can be switched.
  • the bar-shaped illumination 30 is composed of, for example, a plurality of LED light sources arranged on a substrate and a diffusion plate arranged to cover them.
  • the structure of the illumination device 11 is not limited to that shown in FIG. 3A.
  • an annular illumination device 11 as shown in FIG. 3B may be used.
  • the object W can be illuminated simultaneously from all directions. It is also possible to arbitrarily switch the lighting direction by selectively turning on the LED light source.
  • a configuration may be used in which the subject W is illuminated only from a specific direction as shown in FIG. 3C. For example, when the existence range of the subject W is limited, or when the angle of the surface of the subject to be detected is known or limited, it is sufficient to illuminate from the required direction.
  • omnidirectional photography can be performed by changing the relative position of the lighting device 11 and the subject W (for example, rotating the subject W on the stage). good too.
  • FIG. 4 is a block diagram showing the logical configuration (functional configuration) of the processing device 12 of this embodiment.
  • the processing device 12 has a camera control unit 40, a lighting control unit 41, and an image processing unit 42 as main components.
  • the camera control unit 40 is responsible for controlling the polarization camera 10 .
  • the camera control unit 40 controls imaging conditions (exposure time, gain, etc.) of the polarization camera 10, takes in image data from the polarization camera 10, performs calibration of the polarization camera 10, and the like.
  • the lighting control unit 41 controls the lighting device 11 .
  • the lighting control unit 41 executes control of lighting conditions (light emission intensity, light emission time, etc.), lighting/light-off control of each light source, and the like.
  • the image processing unit 42 performs processing on the image captured from the polarization camera 10 .
  • the image processing unit 42 of this embodiment has functions such as an image acquisition unit 420, a polarization extraction unit 421, a polarization information image generation unit 422, a display unit 423, a parameter reception unit 424, and the like.
  • the image acquisition unit 420 acquires an image captured by the polarization camera 10 (hereinafter also referred to as “original image”) via the camera control unit 40 .
  • the polarization extraction unit 421 performs polarization extraction processing for extracting polarization information from the original image.
  • Polarization information is information about polarization resulting from specular reflection on a transparent object.
  • the polarization information image generator 422 generates an image representing polarization information (hereinafter also referred to as a “polarization information image”) based on the extraction result of the polarization extraction process.
  • the display unit 423 performs processing for displaying the generated polarization information image on the display device.
  • the parameter reception unit 424 is a function that receives changes to various condition settings (parameters) that determine the operation of the imaging system 1 . Details of each process of the image processing unit 42 will be described later.
  • the processing device 12 is configured by a computer equipped with, for example, a processor such as a CPU/GPU, a memory as a main memory, a storage as an auxiliary memory, a display device, an input device such as a mouse or a touch panel, a network I/F, and the like. good too.
  • a general-purpose computer such as a personal computer, a tablet terminal, a smartphone, or a field computer may be used, or an embedded computer or a dedicated device may be used, or other devices such as the polarization camera 10 and PLC (Programmable logic controller). computer resources.
  • the configuration shown in FIG. 4 is realized by loading a program stored in a storage or the like into a memory and executing it by a processor.
  • part or all of the configuration shown in FIG. 4 may be configured with a dedicated device such as ASIC (Application Specific Integrated Circuit) or FPGA (Field Programmable Gate Array). Further, part of the configuration and part of the processing shown in FIG. 4 may be executed by another device using cloud computing or distributed computing.
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the incident light 50 when light 50 obliquely enters a transparent object W such as glass or transparent resin, most of the incident light 50 becomes refracted light 51 and passes through the transparent object W. The part is mirror-reflected on the surface (interface) of the transparent object W and becomes reflected light 52 .
  • the incident light 50 includes p-waves (polarized components whose electric field vibration direction is parallel to the plane of incidence) and s-waves (polarized light components whose electric field vibration direction is perpendicular to the plane of incidence (that is, parallel to the plane of reflection)). component), a difference in reflectance occurs.
  • p-waves polarized components whose electric field vibration direction is parallel to the plane of incidence
  • s-waves polarized light components whose electric field vibration direction is perpendicular to the plane of incidence (that is, parallel to the plane of reflection)
  • the s-wave reflectance monotonically increases with the incident angle ⁇ , while the p-wave reflectance gradually decreases as the incident angle ⁇ increases from 0 degrees, reaching a certain angle (Brewster angle ), the reflectance becomes 0. Therefore, the reflected light 52 observed in the case of specular reflection is dominated by the s-wave, that is, the polarized component vibrating in the direction parallel to the surface of the transparent object W, which is the reflecting surface.
  • the surface (reflecting surface) of the transparent object W can be imaged by capturing polarized light with a polarization camera.
  • the polarization camera receives not only the polarized light due to specular reflection, but also the diffusely reflected light from the subject and background.
  • the diffuse reflected light component is unnecessary and causes artifacts. Therefore, it is necessary to first extract only the polarized light component from the image of the polarization camera. Therefore, in this embodiment, the difference in transmission characteristics between polarizers is utilized.
  • the intensity of the polarized component received by the light-receiving element is maximized when the polarization direction ⁇ and the transmission axis direction of the polarizer match, and decreases as the transmission axis direction deviates from the polarization direction ⁇ . It is minimum when ⁇ is orthogonal. That is, when the direction of the transmission axis of the polarizer is changed from 0 degrees to 180 degrees, the intensity of the polarized component received by the light receiving element changes like a sine wave. On the other hand, the intensity of the diffusely reflected light component contained in the incident light is constant regardless of the transmission axis direction of the polarizer. Therefore, only the information of the polarization component contained in the incident light can be extracted based on the change in light intensity (transmission axis direction dependency) when observed through a plurality of types of polarizers with different transmission axis directions.
  • FIG. 6 a case is assumed in which incident light containing a polarization component in the polarization direction ⁇ is observed through four types of polarizers 210 with transmission axis directions of 0 degrees, 45 degrees, 90 degrees, and 135 degrees. .
  • the value of the pixel 200 corresponding to each polarizer 210 (corresponding to the light intensity of the transmitted light) has a difference depending on the transmission axis direction.
  • the polarization direction ⁇ and the polarization intensity of the polarization component can be estimated.
  • the angle at which the fitting curve is maximized represents the polarization direction ⁇ of the polarization component
  • the amplitude of the fitting curve represents the intensity of polarization (also called degree of polarization).
  • the polarization extraction processing by the polarization extraction unit 421 of this embodiment also extracts polarization information based on changes in light intensity (transmission axis direction dependency) when observed through a plurality of types of polarizers with different transmission axis directions.
  • the basic principle is the same. However, in order to further improve accuracy and usability, unique processing such as selection of mask size (a parameter that defines the range of neighboring pixels to be referred to when calculating polarization) and noise removal is added. Details will be described later.
  • step S70 a transparent object to be the subject W is placed on the stage 13.
  • the subject W may be transported and positioned using a robot or transport device, or the subject W may be set on the stage 13 by an operator.
  • step S71 the lighting control unit 41 of the processing device 12 sets the lighting conditions of the lighting device 11.
  • the illumination device 11 of the present embodiment can switch the illumination intensity in four stages from 1 to 4, and the illumination control unit 41 first sets the illumination intensity to 1 (the darkest state).
  • step S72 the subject W is photographed. Specifically, the illumination device 11 is turned on according to the illumination conditions given by the illumination control unit 41 to irradiate the subject W with illumination light. Then, with the object W illuminated, the camera control unit 40 controls the polarization camera 10 in accordance with the given imaging conditions to perform imaging.
  • the image acquisition unit 420 of the processing device 12 captures the image (original image) captured at step S72 from the polarization camera 10.
  • the captured original image data is stored in a memory or storage and processed by the image processing unit 42 .
  • step S74 the processing device 12 confirms whether or not imaging has been completed under all imaging conditions, and if not completed, returns to step S71 and performs imaging under the next imaging condition. That is, in step S71, the illumination control unit 41 changes the illumination intensity of the illumination device 11 to 2. In step S72, the subject W is photographed again. It is captured. In the present embodiment, the processing of steps S71 to S74 is repeated four times, and four original images with different brightnesses of the same subject W are captured by the processing device 12. FIG. When the photographing under all the photographing conditions is completed, the process proceeds to step S75.
  • step S75 the user inputs the image processing parameters used by the image processing unit 42 using the user interface provided by the parameter receiving unit 424. Note that if there is no need to change the image processing parameters, the process of step S74 may be skipped. Also, image processing parameters may be set before shooting.
  • FIG. 8 is an example of a user interface (UI) for inputting image processing parameters provided by the parameter reception unit 424.
  • FIG. This UI screen includes mask size setting 80 , noise removal setting 81 , display image setting 82 , whole image display area 83 , enlarged image display area 84 , and enlargement setting 85 .
  • Mask size setting 80 is a UI for setting a “mask size” that defines the range of neighboring pixels to be referred to when calculating polarization information from an original image. In the example of FIG. 8, the mask size is selected from 2 ⁇ 2, 3 ⁇ 3, 4 ⁇ 4, and 5 ⁇ 5, but the user may be prompted to input an arbitrary size.
  • the noise removal setting 81 is a UI for setting conditions related to "noise removal processing” for removing or reducing noise included in the calculation result of polarization information.
  • noise removal processing for removing or reducing noise included in the calculation result of polarization information.
  • FIG. 8 it is possible to select whether or not to apply noise removal processing, and in the case of "yes", parameters used in noise removal processing (comparison range, polarization angle difference threshold, polarization intensity difference threshold ) can be entered.
  • the display image setting 82 is a UI for setting the type of image to be displayed in the entire image display area 83 and the enlarged image display area 84 .
  • the entire image display area 83 is an area where the entire image (low resolution) is displayed
  • the enlarged image display area 84 is an area where a portion of the image (portion indicated by frame 86) is displayed with high resolution.
  • the enlargement setting 85 is a UI for setting the magnification and range of the enlarged image displayed in the enlarged image display area 84 .
  • the polarization extraction unit 421 calculates polarization information from the plurality of original images captured at step S73. Details of the polarization information calculation process will be described later.
  • step S77 the polarization extraction unit 421 applies noise removal processing to the calculation result of step S76. Note that if noise removal is set to "no" on the UI of FIG. 8, the process of step S77 is skipped. Details of the noise removal processing will be described later.
  • the polarization information image generation unit 422 combines a plurality of pieces of polarization information extracted from each of the plurality of original images by the polarization extraction unit 421 to generate a polarization information image. Details of the image generation processing will be described later.
  • three types of images, a polarization intensity image, a polarization direction image, and a brightness image are generated as polarization information images.
  • the polarization intensity image is an image that represents the polarization intensity (degree of polarization) in shades
  • the polarization direction image is an image that represents the polarization direction in shades or pseudo colors.
  • the brightness image is an image that expresses the light intensity of the polarized component in shades.
  • step S79 the display unit 423 displays the image selected in the display image setting 82 of the UI in FIG.
  • the lighting conditions of the illumination device 11 are changed as the shooting conditions, but it is also possible to shoot images with different brightness by changing the shooting conditions of the polarization camera 10 .
  • the camera control section 40 of the processing device 12 may perform control to change the exposure time of the polarization camera 10 . As the exposure time is lengthened, the amount of light received by the image sensor increases, so a bright image can be captured.
  • the camera control unit 40 may perform control to change the gain of the polarization camera 10 . The gain is the amplification factor of the image sensor, and the larger the gain, the brighter the image.
  • both the lighting conditions of the illumination device 11 and the imaging conditions of the polarization camera 10 may be controlled.
  • FIG. 9 is a flowchart of polarization information calculation processing
  • FIGS. 10A to 10D are diagrams showing examples of neighboring pixels.
  • the size (number of pixels) of the original image is represented by M rows and N columns
  • the pixel in row i, column j is denoted by (i, j)
  • the pixel value (light intensity) of the pixel is denoted by I (i, j).
  • j 1, 2, . . . , N).
  • 10A to 10D are enlarged views of a part of the original image, each rectangle represents a pixel, the arrow in the pixel represents the direction of the transmission axis, and the symbols in the margin indicate the direction of the pixel. Represents row and column numbers.
  • step S10 the polarization extraction unit 421 selects one original image to be processed from among the plurality of original images captured under different imaging conditions in steps S71 to S74 of FIG.
  • the original image captured at illumination intensity 1, the original image captured at illumination intensity 2, the original image captured at illumination intensity 3, and the original image captured at illumination intensity 4 are arranged in this order. shall be selected.
  • step S11 the polarization extraction unit 421 selects a target pixel to be calculated from the original image.
  • step S11 pixels of interest from (1, 1) to (M, N) are selected in order.
  • step S12 the polarization extraction unit 421 selects neighboring pixels to be referred to when calculating the polarization information of the pixel of interest.
  • the range of neighboring pixels selected here is determined by the mask size designated by the mask size setting 80 in FIG. First, the default mask size of 2 ⁇ 2 will be described as an example.
  • the mask size is 2 ⁇ 2
  • three pixels (i ⁇ 1, j ⁇ 1), (i ⁇ 1, j), (i, j ⁇ 1) is selected as the neighboring pixel. Note that if the pixel of interest is on the boundary of the original image and there is no neighboring pixel, the processing of steps S12 and S13 may be skipped, or padding may be performed with an appropriate value.
  • the polarization extraction unit 421 calculates the polarization information of the pixel of interest based on the light intensities (pixel values) of the pixel of interest and neighboring pixels.
  • the light intensities of the transmission axis directions of 0 degrees, 45 degrees, 90 degrees, and 135 degrees are respectively represented by I1, I2, I3, and I4, for example, the brightness I0, the polarization direction ⁇ , and the polarization intensity D of the pixel of interest are obtained by the following equations. sought.
  • the transmission axis directions corresponding to four pixels (i-1, j-1), (i-1, j), (i, j-1), and (i, j) are Since they are 90 degrees, 135 degrees, 45 degrees, and 0 degrees, I1 to I4 in equations (1) to (3) are given by the following equations.
  • I1 I(i,j)
  • I2 I(i,j ⁇ 1)
  • I3 I(i-1, j-1)
  • I4 I(i-1,j)
  • the lightness I0 in Equation (1) is an index representing the intensity of incident light incident on the pixel of interest.
  • the polarization direction ⁇ in Equation (2) represents the principal axis orientation of the polarization component included in the incident light incident on the pixel of interest.
  • the polarization intensity D in Equation (3) is an index representing the degree of polarization of the polarization component contained in the incident light incident on the pixel of interest.
  • equations (1) to (3) are only examples, and other calculation formulas may be used to calculate indices corresponding to the brightness, polarization direction, and polarization intensity.
  • the coefficients in equations (1)-(3) may be replaced with others, or equation (3) may be replaced with equation (4) below.
  • step S15 the polarization extraction unit 421 confirms whether or not the polarization information calculation processing has been completed for all original images. Execute the process.
  • three items of polarization information (polarization direction ⁇ , polarization intensity D, brightness I0) are calculated for all pixels of all original images.
  • the calculation result of the polarization information calculation process is, for example, a correspondence between the coordinates (i, j) of each pixel and the polarization direction ⁇ (i, j), the polarization intensity D (i, j), and the brightness I0 (i, j). stored in a memory or storage in a data format and provided for subsequent processing.
  • step S12 eight pixels (i ⁇ 1, j ⁇ 1), (i ⁇ 1, j) adjacent to the pixel of interest (i, j) ), (i ⁇ 1, j+1), (i, j ⁇ 1), (i, j+1), (i+1, j ⁇ 1), (i+1, j), (i+1, j+1) are selected as neighboring pixels. .
  • eight pixels i ⁇ 1, j ⁇ 1), (i ⁇ 1, j) adjacent to the pixel of interest (i, j) ), (i ⁇ 1, j+1), (i, j ⁇ 1), (i, j+1), (i+1, j+1) are selected as neighboring pixels. .
  • I1 to I4 are given by the following equations.
  • I1 I(i,j)
  • I2 ⁇ I(i,j ⁇ 1)+I(i,j+1) ⁇ /2
  • I3 ⁇ I(i-1,j-1)+I(i-1,j+1)+I(i+1,j-1)+I(i+1,j+1) ⁇ /4
  • I4 ⁇ I(i,j ⁇ 1)+I(i,j+1) ⁇ /2
  • the mode value in addition to the average value, the mode value, median value, maximum value, minimum value, etc. may be used. Also, without using the representative value, by performing sine wave fitting to the values of nine pixels, I1 to I4 can be estimated, or the brightness I0, the polarization direction ⁇ , and the polarization intensity D can be directly calculated. good too.
  • FIG. 10C is an example with a mask size of 4 ⁇ 4. 7 pixels (i-2, j-2), (i-2, j-1), (i-2, j), (i-2, j+1), (i-1, j-2), (i, j-2), (i+1, j-2) plus ranges are selected.
  • the selection range includes four pixels each at 0 degrees, 45 degrees, 90 degrees, and 135 degrees. Also in this case, as in the case of 3 ⁇ 3, the representative values for each transmission axis direction may be substituted for I1 to I4, or sine wave fitting may be performed on the values of 16 pixels.
  • FIG. 10D is an example with a mask size of 5 ⁇ 5.
  • 9 pixels (i-2, j+2), (i-1, j+2), (i, j+2), (i+1, j+2), (i+2, j ⁇ 2), (i+2, j ⁇ 1), (i+2, j), (i+2, j+1), (i+2, j+2) plus ranges are selected.
  • the selection includes 9 pixels at 0 degrees, 6 pixels at 45 degrees, 6 pixels at 135 degrees, and 4 pixels at 90 degrees.
  • the representative values for each transmission axis direction may be substituted for I1 to I4, or sine wave fitting may be performed on the values of 25 pixels.
  • the mask size that is, the pixel range referred to when calculating the polarization information
  • the mask size can be arbitrarily changed.
  • the user can select an appropriate mask size according to the shape and condition of the subject, or the application of this system.
  • the reflection surface is extremely narrow, so the polarization is not reflected (depending on the resolution of the polarization camera 10).
  • the incident range may be a narrow area with a width of several pixels.
  • pixels on which polarized light is not incident are also referred to, which may reduce the detectability of polarization information. Therefore, it is preferable to choose a mask size that is smaller than the range on which the polarized light is incident. Thereby, the polarization information in the narrow area can be appropriately extracted.
  • mask sizes of 2 ⁇ 2, 3 ⁇ 3, 4 ⁇ 4, and 5 ⁇ 5 are shown as examples of mask sizes, but the mask sizes are not limited to these.
  • masks larger than 5 ⁇ 5 may be used, and masks with non-square shapes may be used.
  • the user may be allowed to arbitrarily design the size and shape of the mask.
  • the polarization information calculation process described above utilizes the principle of detecting the polarization by treating the difference in local pixel values as the difference in the amount of transmission due to the difference in the transmission axis direction of the polarizer. Therefore, for example, when a luminance change with a high spatial frequency occurs in an edge portion or a texture portion of an object, it may be misunderstood as a difference in pixel values due to polarization, leading to erroneous detection of polarization.
  • the noise removal process is a process for removing or reducing noise due to such erroneous detection from the calculation result of the polarization information calculation process.
  • FIG. 13 is a flowchart of noise removal processing
  • FIGS. 14A and 14B are diagrams showing examples of comparison ranges.
  • the polarization extraction unit 421 reads the parameters set in the noise removal setting 81 of FIG.
  • four parameters are read: presence/absence of noise removal, comparison range, polarization angle difference threshold, and polarization intensity difference threshold. If noise removal is set to "no”, the subsequent processing is skipped (step S21). If noise removal is "yes”, the process proceeds to step S22.
  • step S22 the polarization extraction unit 421 reads the calculation result of the polarization information calculation process from memory or storage.
  • the coordinates (i, j) of each pixel, the polarization direction ⁇ (i, j), the polarization intensity D (i, j), and the brightness I0 (i, j) extracted from each of a plurality of original images is acquired.
  • the polarization extraction unit 421 selects one original image to be processed from among the plurality of original images.
  • the original image captured at illumination intensity 1, the original image captured at illumination intensity 2, the original image captured at illumination intensity 3, and the original image captured at illumination intensity 4 are selected in this order.
  • step S24 the polarization extraction unit 421 selects target pixels to be processed.
  • target pixels are selected in order from (1, 1) to (M, N).
  • step S25 the polarization extraction unit 421 compares the polarization directions between the target pixel and its surrounding pixels, and determines whether the polarization directions are similar. As shown in FIG. 14A, when the comparison range is set to "1", between the target pixel (i, j) and three surrounding pixels (i, j+1), (i+1, j), (i+1, j+1) is compared. Also, as shown in FIG. 14A, when the comparison range is set to "1", between the target pixel (i, j) and three surrounding pixels (i, j+1), (i+1, j), (i+1, j+1) is compared. Also, as shown in FIG.
  • step S26 the polarization extraction unit 421 compares the polarization intensity between the target pixel and its surrounding pixels, and determines whether the polarization intensities are similar. How to select the comparison range is as shown in FIGS. 14A and 14B. If even one combination is found in which the difference in polarization intensity is greater than the threshold value for the difference in polarization intensity, it is determined to be "dissimilar” and the process proceeds to step S27. On the other hand, if it is determined to be "similar", the process proceeds to step S28.
  • step S27 the polarization extraction unit 421 deletes the polarization information (polarization direction ⁇ and polarization intensity D) of the target pixel.
  • step S28 the polarization extracting unit 421 selects a pixel with the highest polarization intensity from among the target pixel and the pixels within the comparison range.
  • the polarization direction/polarization intensity is replaced with the polarization direction/polarization intensity of the selected pixel. This process provides a smoothing effect that reduces local variations in polarization direction and polarization intensity.
  • step S29 the polarization extraction unit 421 confirms whether the noise removal processing has been completed for all pixels, and if there is an unprocessed pixel, returns to step S24 and executes the processing for the next target pixel. .
  • step S30 the polarization extraction unit 421 checks whether the noise removal processing has been completed for all original images, and if there is an unprocessed original image, the process returns to step S23 to perform the processing for the next original image. Execute.
  • noise is removed and smoothed for the polarization direction ⁇ and the polarization intensity D, which are the calculation results of the polarization information calculation processing.
  • the corrected data is overwritten and saved in the memory or storage.
  • step S40 the polarization information image generator 422 first selects one target pixel (i, j) to be processed. It is assumed that target pixels are selected in order from (1, 1) to (M, N) each time the loop of steps S40 to S45 is repeated. Then, the polarization information image generator 422 acquires the polarization information extracted from each of the plurality of original images for the target pixel (i, j).
  • polarization information extracted from the pixel (i, j) of the k-th original image is denoted by PIk (i, j)
  • PIk (i, j) four images taken with illumination intensity 1 to illumination intensity 4
  • Polarization information PI1(i,j) to PI4(i,j) corresponding to each of the original images are read from the memory.
  • the polarization information PIk(i,j) includes three items of information: polarization intensity Dk(i,j), polarization direction ⁇ k(i,j), and brightness I0k(i,j) (subscript k represents the number of the original image).
  • step S41 the polarization information image generator 422 compares the plurality of polarization information PI1(i,j) to PI4(i,j) acquired in step S40, and the polarization intensity Dk(i,j) is the strongest.
  • the polarization information is regarded as the most reliable polarization information and is adopted as the polarization information for the target pixel (i,j).
  • the polarization intensity is an index representing the degree of polarization, and the larger this value is, the more clearly the polarization component is observed.
  • the pixel (i,j) that is, , the region on the reflective surface of the transparent object corresponding to the pixel (i,j)
  • PIn(i,j) which is the polarization information of the n-th original image
  • step S42 the polarization information image generation unit 422 stores the polarization intensity value Dn(i, j) of the polarization information PIn(i, j) selected in step S41 in the pixel (i, j) of the polarization intensity image.
  • step S43 the polarization information image generator 422 converts the polarization direction value ⁇ n(i, j) of the polarization information PIn(i, j) selected in step S41 to the pixel (i, j) of the polarization direction image. j).
  • step S44 the polarization information image generation unit 422 assigns the brightness value I0n(i, j) of the polarization information PIn(i, j) selected in step S41 to the pixel (i, j) of the brightness image.
  • a polarization information image obtained by synthesizing good portions (that is, highly reliable polarization information) of the plurality of polarization information PI1 to PI4 is obtained.
  • the polarization intensity D itself is used as an index representing the reliability of the polarization information, but the reliability of the polarization information may be obtained using another index.
  • an index obtained by (I3-I1) 2 +(I2-I4) 2 (an index corresponding to the strength of contrast of four pixels) may be used as the reliability of the polarization information.
  • the brightness of the image may be taken into consideration, since the dark portion of the image is generally susceptible to noise.
  • MAX(I1, I2, I3, I4) is less than or equal to the threshold (that is, in the case of a dark part of the image), it may be considered that there is no polarized light there, and the reliability may be set to 0 (minimum value). .
  • robots are usually used to pick and place the syringes and inject the liquid. At this time, if the syringe is in an incorrect position or is lying on its side, there is a risk of damage to the syringe or failure of the manufacturing equipment. A mechanism for outputting an error or stopping the device is desired.
  • FIG. 16A shows how the syringe 101 arranged in the nest 100 is observed by the polarization camera 10 installed at the zenith.
  • the two syringes 101b are not inserted into the holes of the nest 100 and are lying on their side.
  • the syringe 101 is colorless and transparent, even if the syringe 101 is photographed with normal transmitted illumination and an optical camera, the boundary between the syringe 101 and the background (white nest 100) can hardly be identified on the image. Therefore, it is difficult to detect the sideways syringe 101b in a normal optical image.
  • the orientation of the reflecting surface of the syringe 101 (orientation of the normal to the reflecting surface in the XY plane) can be anywhere from 0 degrees to 360 degrees.
  • the specular reflection of the reflecting surface can be observed by the polarization camera 10 .
  • the intensity of the specularly reflected light observed by each of the syringes 101r and 101l is not the same.
  • Light from the light source 11r arranged on the right side of the nest 100 is incident on the right-facing reflective surfaces of the syringes 101r and 101l. This is because there is a difference in the intensity of the illumination light incident on the reflecting surface with the syringe 101l at the position. Therefore, all subjects within the field of view of the polarization camera 10 cannot be photographed under completely uniform lighting conditions.
  • the polarization component is weak in the distal syringe 101l, making it difficult to extract polarization information. If the illumination intensity of the light source 11r is set by using the syringe 101r located near the syringe 101r, a situation may occur in which overexposure occurs and polarization information cannot be extracted.
  • Images 104a to 104d shown in FIG. 17 schematically show examples of polarization intensity images when the illumination intensity is increased stepwise. It can be seen that the optimum illumination intensity differs depending on the position within the field of view. By collecting and synthesizing portions with high polarization intensity from these images 104a to 104d, it is possible to obtain a high-quality polarization information image 105 in which the polarization information of all subjects present within the field of view is appropriately extracted. Become.
  • the syringe 101a in the correct posture clearly appears as a circular image
  • the syringe 101b lying on its side clearly appears as a linear belt-like image.
  • a computer-based image recognition technique may be used to detect the syringe from the polarization information image 105, determine the orientation of the syringe, and the like. For example, a properly positioned syringe will exhibit specular reflections at the inner circle and the surrounding flange. By focusing on this image feature and detecting the shape of the circle and the flange portion from the polarization information image by a method such as pattern matching, it becomes possible to automatically recognize the correct posture of the syringe.
  • a set of pixels (pixel region) that have a specific polarization direction range (eg, 0° to 60°) and are adjacent to each other are extracted, and then, out of the extracted pixel regions A pixel region having a width and length equal to or greater than a threshold value can be detected from .
  • a specific polarization direction range eg, 0° to 60°
  • the lighting conditions (illumination intensity) of the lighting device 11 are switched and multiple shots are taken.
  • control may be performed to switch both the lighting conditions of the lighting device 11 and the imaging conditions of the polarization camera 10 .
  • any method can be used to change the imaging conditions.
  • the diffusely reflected light from the background passes through the transparent object W and is observed together with the specularly reflected light.
  • weak specular reflection light is drowned out by strong diffuse reflection light, and the extraction accuracy of the polarization information is significantly reduced. may decline.
  • the second embodiment multiple shots are taken while switching the illumination direction with respect to the subject W. For example, as shown in FIG. 18B, the first photographing is performed with only the light source 11l lit, and then the second photographing is performed with only the light source 11r lit.
  • the diffusely reflected light of the illumination light from the light source 11l and the specularly reflected light of the illumination light from the light source 11r can be observed separately. Therefore, it is possible to reduce the situation where strong diffuse reflected light drowns out weak specular reflected light.
  • step S70 a transparent object to be the subject W is placed on the stage 13.
  • the subject W may be transported and positioned using a robot or transport device, or the subject W may be set on the stage 13 by an operator.
  • the lighting control unit 41 of the processing device 12 sets the lighting conditions (lighting direction) of the lighting device 11.
  • the illumination device 11 of this embodiment has four rod-shaped illuminations (light sources) 30 arranged so as to surround the stage 13, and each of the rod-shaped illuminations 30 independently switches on/off and controls illumination intensity. can be controlled.
  • the lighting control unit 41 sets lighting conditions such that only one of the four rod-shaped lights 30 is turned on and the other three are turned off.
  • step S72 the subject W is photographed. Specifically, the illumination device 11 is turned on according to the illumination conditions given by the illumination control unit 41 to irradiate the subject W with illumination light. At this time, the object W on the stage 13 is illuminated only from one direction. Then, with the object W illuminated, the camera control unit 40 controls the polarization camera 10 in accordance with the given imaging conditions to perform imaging.
  • the image acquisition unit 420 of the processing device 12 captures the image (original image) captured at step S72 from the polarization camera 10.
  • the captured original image data is stored in a memory or storage and processed by the image processing unit 42 .
  • step S74 the processing device 12 confirms whether or not imaging has been completed under all imaging conditions, and if not completed, returns to step S71 and performs imaging under the next imaging conditions. That is, in step S71, the illumination control unit 41 changes the illumination direction of the illumination device 11, in step S72, the subject W is photographed again, and in step S73, a new original image is captured. In the present embodiment, the processing of steps S71 to S74 is repeated four times, and four original images of the same subject W with different lighting directions are captured by the processing device 12 . When the photographing under all the photographing conditions is completed, the process proceeds to step S75. Since the subsequent processing may be the same as that of the first embodiment, the description is omitted.
  • the one that has the least influence of the diffuse reflected light component (i.e., noise) and has the clearest polarization component can be selected to increase the reliability of the image. It is possible to extract highly accurate polarization information.
  • the lighting device 11 having a plurality of light sources that can be turned on independently is used, and the lighting direction is switched by switching the light sources to be turned on.
  • This method has the advantage of being able to shorten the takt time for photographing because it is possible to switch the illumination direction at high speed with simple control.
  • the arrangement and configuration of the polarization camera and lighting device are not limited to those shown in FIGS. 1 and 3A to 3C, and may be appropriately designed according to the subject and application. That is, it is sufficient that specular reflection of illumination light can be observed with a polarization camera. Also, a plurality of polarizing cameras may be provided, or a movable polarizing camera or lighting device may be used.
  • the setting of the transmission axis direction is not limited to this. It is only necessary to be able to observe light that has passed through polarizers with different transmission axis directions in the imaging device and extract polarization information contained in the incident light from the observation results.
  • the UI screen configuration and parameter items are merely examples. Any UI may be used as long as it allows the user to change the parameters used in the polarization extraction process. In other words, it is sufficient if the user himself/herself can appropriately change the logic of polarized light extraction according to the subject, application, and the like.
  • the parameter reception unit 424 provides a user interface for setting parameters, but the parameter reception unit 424 may receive a parameter change instruction from the user from an external device via a network.
  • the image brightness switching control in the first embodiment and the lighting direction switching control in the second embodiment may be performed together. As a result, it is possible to achieve both uniform illumination conditions in the entire field of view and reduction of diffuse reflection noise, thereby enabling extraction of polarization information with higher reliability.
  • the lighting direction is changed by switching the light source, but the configuration of the lighting device is not limited to this.
  • the illumination direction may be changed by changing the relative positional relationship between the illumination device 11 and the subject W using the illumination device 11 that illuminates from one direction as shown in FIG. 3C.
  • the processing device (12) comprises: control means (40, 41) for controlling either or both of said illumination device (11) and said polarization camera (10) to photograph said transparent object (W) under different photographing conditions; an image acquiring means (420) for acquiring a plurality of original images taken under different shooting conditions; Polarization extraction means (421) for executing a polarization extraction process for extracting polarization information, which is information about polarization derived from specular reflection on the transparent object (W), for each pixel of each of the plurality of original images.
  • image generation means for synthesizing a plurality of pieces of polarization information extracted from each of the plurality of original images by the polarization extraction process and generating a polarization information image in which the polarization information is imaged.
  • An imaging system ( 1) is the control method, photographing a transparent object (W) under different photographing conditions by controlling one or both of the illumination device (11) and the polarization camera (10); a step of loading a plurality of original images shot under different shooting conditions into the processing device (12); Polarization extraction processing for extracting polarization information, which is information about polarization derived from specular reflection on the transparent object (W), for each pixel of each of the plurality of original images by the processing device (12). and synthesizing a plurality of pieces of polarization information extracted from each of the plurality of original images by the polarization extraction process to generate a polarization information image in which the polarization information is visualized. control method.
  • Imaging system 10 Polarization camera 11: Illumination device 12: Processing device 13: Stage 20: Image sensor 21: Polarizer array 30: Bar-shaped illumination

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

処理装置が、異なる撮影条件で透明物体を撮影するために、照明装置と偏光カメラのいずれか又は両方を制御する制御手段と、異なる撮影条件で撮影された複数の元画像を取得する画像取得手段と、前記複数の元画像のそれぞれに対し、各画素について、前記透明物体での鏡面反射に由来する偏光に関する情報である偏光情報を抽出する、偏光抽出処理を実行する偏光抽出手段と、前記偏光抽出処理によって前記複数の元画像のそれぞれから抽出された複数の偏光情報を合成し、前記偏光情報を画像化した偏光情報画像を生成する画像生成手段と、を有する。

Description

撮像システムおよびその制御方法
 本発明は、透明物体を画像化するための技術に関する。
 透過軸方向の異なる偏光子が規則的に配置された撮像素子を有する偏光カメラを用いて、透明物体を画像化する技術が知られている(特許文献1参照)。このような技術は、例えば、ガラスや透明樹脂からなる物品の検出や検査などへの応用が期待されている。
特開2020-17688号公報
 透明物体に光を当てると、一部の光が透明物体の表面で鏡面反射する。鏡面反射した光は偏光特性を持つため、偏光カメラで観測することができ、その観測結果をもとに透明物体の表面(反射面)を画像化することができる。
 しかしながら、偏光カメラには、鏡面反射光だけでなく、被写体や背景などで拡散反射した光も入射し、それがノイズ要因となる場合がある。また、照明と被写体の間の距離が遠すぎるために鏡面反射光が非常に弱くなり偏光情報の抽出が困難になったり、逆に、照明と被写体が近すぎ、鏡面反射光が明るすぎていわゆる白飛び(反射光が偏光カメラのダイナミックレンジを超えること)が発生し、偏光情報の抽出ができなくなることもある。とはいえ、機材の配置や被写体の選び方によって、透明物体の形状や反射特性、背景の状況、透明物体と照明のあいだの相対距離や相対的な位置関係などは様々であるため、あらゆる被写体ないしあらゆる状況に対して安定的に偏光情報を抽出可能なシステムを実現することは難しい。そのため、偏光カメラを利用した検出や検査を安定して行うには、対象となる被写体ないし状況に応じて、撮影条件などを調整する(追い込む)作業が必要となることが一般的である。しかし、そのような調整作業には高度なスキルおよび知識と試行錯誤が必要であるし、手作業の発生は物品の検出もしくは検査の省力化や自動化への阻害要因ともなる。また、撮影条件の調整が極めて困難なケースもある。例えば、視野内のある部分に合わせて照明の明るさを調整すると、他の部分で白飛びあるいは露光不足が発生してしまう、というような状況である。このような問題は、偏光カメラの視野内に複数の被写体が存在し、被写体ごとに照明との相対距離や相対位置が相違するケースなどで、顕著となる可能性がある。
 本発明は上記実情に鑑みてなされたものであって、その目的とするところは、被写体や状況によらず、偏光情報を安定して抽出することが可能な技術を提供することにある。
 本発明は、透明物体を画像化するための撮像システムであって、透明物体を照明するための照明装置と、透過軸方向の異なる偏光子が規則的に配列された撮像素子を有する偏光カメラと、処理装置と、を備え、前記処理装置は、異なる撮影条件で前記透明物体を撮影するために、前記照明装置と前記偏光カメラのいずれか又は両方を制御する制御手段と、異なる撮影条件で撮影された複数の元画像を取得する画像取得手段と、前記複数の元画像のそれぞれに対し、各画素について、前記透明物体での鏡面反射に由来する偏光に関する情報である偏光情報を抽出する、偏光抽出処理を実行する偏光抽出手段と、前記偏光抽出処理によって前記複数の元画像のそれぞれから抽出された複数の偏光情報を合成し、前記偏光情報を画像化した偏光情報画像を生成する画像生成手段と、を有することを特徴とする撮像システムを提供する。
 機材の配置や被写体の選び方によって、透明物体の形状や反射特性、背景の状況、透明物体と照明のあいだの相対距離や相対的な位置関係などは様々である。そこで、本発明に係る撮像システムでは、同じ透明物体を異なる撮影条件で複数回撮影し、複数の元画像を取得する。いずれかの撮影条件がマッチすれば、当該透明物体の偏光情報を抽出するのに適した元画像が少なくとも1枚は得られるものと期待できる。したがって、複数の元画像のそれぞれから抽出した偏光情報を用いることによって、被写体や状況によらず、偏光情報を安定して抽出することが可能となる。
 前記画像生成手段は、前記複数の元画像のそれぞれから抽出された前記複数の偏光情報のうち偏光情報の信頼度が最も高いものを選択する操作を画素ごとに行い、各画素について選択された偏光情報を用いて前記偏光情報画像を生成してもよい。
 複数の元画像から信頼度の高い偏光情報を集めることにより、良好な偏光情報画像を生成することができる。ここで、全ての画素について、同じ元画像から抽出された偏光情報が選択されるとは限らない。なぜなら、偏光カメラの視野内の位置によって、反射面の形状・向きや反射特性が異なっていたり、反射面に到達する照明光の強度が異なっていたり、拡散反射の影響が異なっていたりするからである。したがって、画素ごとに最適な偏光情報を選択し、それらを用いて最終的な偏光情報画像を生成することで、視野内の位置によらず、信頼度の高い偏光情報画像を得ることができる。またこの方法を用いれば、偏光カメラの視野内に複数の被写体が存在する場合でも(さらに言うと、形状、反射特性、あるいは姿勢の異なる複数の被写体が混在している場合でも)、全ての被写体の偏光情報を精度よく抽出することができる。
 前記画像生成手段は、前記複数の偏光情報のうち偏光の程度が最も強いものを、偏光情報の信頼度が最も高いものとみなしてもよい。「偏光の程度が最も強い」とは、偏光成分が最も明りょうに観測されていることをいう。偏光の程度が強く現れているほど(偏光成分がより明りょうに観測されているほど)、その偏光情報の信頼性が高いと考えることができる。したがって、1つの画素について得られた複数の偏光情報のうちから偏光の程度が最も強いものを選択することで、当該画素(つまり、当該画素に対応する透明物体の反射面上の領域)に関する最も信頼度の高い偏光情報を得ることができる   。
 前記制御手段は、明るさが異なる複数の元画像が得られるように、前記照明装置と前記偏光カメラのいずれか又は両方を制御してもよい。鏡面反射光が弱すぎると偏光情報の抽出が困難となるし、鏡面反射光が強すぎても白飛びにより偏光情報が抽出できないため、偏光情報を精度よく抽出するには適切な強度の鏡面反射光を観測することが肝要である。本発明のように明るさが異なる複数の元画像を撮影すれば、いずれかの元画像において適切な強度の鏡面反射光が観測できており、その元画像から信頼性の高い偏光情報を抽出することができると期待できる。
 前記制御手段は、前記撮影条件として「前記照明装置の照明強度」を異ならせる制御を行ってもよいし、前記撮影条件として「前記偏光カメラの露光時間」を異ならせる制御を行ってもよいし、前記撮影条件として「前記偏光カメラのゲイン」を異ならせる制御を行ってもよい。制御手段は、「前記照明装置の照明強度」、「前記偏光カメラの露光時間」、「前記偏光カメラのゲイン」のうちの2つ以上を同時に制御してもよい。
 前記制御手段は、前記透明物体に対する照明方向が異なる複数の元画像が得られるように、前記照明装置を制御してもよい。照明方向を変えると、背景などでの拡散反射の状況が変化する。それゆえ、照明方向を変えて撮影した複数の元画像の中から、拡散反射光成分の影響(すなわちノイズ)が最も少なく偏光成分が最も明りょうに現れているものを選択することで、より信頼性の高い偏光情報の抽出が可能となる。
 前記照明装置は、独立に点灯可能な複数の光源を有しており、前記制御手段は、点灯する光源を切り替えることによって、前記透明物体に対する照明方向を異ならせてもよい。このような照明装置を用いることで、簡易な制御で高速に照明方向の切り替えが可能となるので、撮影のタクトタイムを短くすることができる。
 前記偏光抽出処理は、前記元画像の各画素の偏光情報を算出した後に、その算出結果に含まれるノイズを除去ないし低減するノイズ除去処理を含んでもよい。ノイズ除去処理を行うことにより、高品位な偏光情報を抽出することができる。
 前記ノイズ除去処理は、対象画素とその周辺画素とのあいだで偏光情報を比較することによって、前記対象画素と前記周辺画素の偏光情報が類似するか非類似かを判断し、非類似と判断した場合に、前記対象画素の偏光情報を削除する処理を含んでもよい。このような処理により、信頼性の低い偏光情報を除去することができる。
 前記ノイズ除去処理は、対象画素とその周辺画素とのあいだで偏光情報を比較することによって、前記対象画素と前記周辺画素の偏光情報が類似するか非類似かを判断し、類似と判断した場合に、前記対象画素の偏光情報を、前記対象画素と前記周辺画素のなかから選択した画素の偏光情報で置き換える処理を含んでもよい。このような処理により、偏光情報がスムージングされるため、偏光情報のSN比をさらに向上することができる。
 本発明は、照明装置と、透過軸方向の異なる偏光子が規則的に配列された撮像素子を有する偏光カメラと、処理装置と、を備える撮像システムの制御方法であって、前記照明装置と前記偏光カメラのいずれか又は両方を制御することによって、異なる撮影条件で透明物体を撮影するステップと、異なる撮影条件で撮影された複数の元画像を前記処理装置に取り込むステップと、前記処理装置によって、前記複数の元画像のそれぞれに対し、各画素について、前記透明物体での鏡面反射に由来する偏光に関する情報である偏光情報を抽出する、偏光抽出処理を実行し、前記偏光抽出処理によって前記複数の元画像のそれぞれから抽出された複数の偏光情報を合成し、前記偏光情報を画像化した偏光情報画像を生成するステップと、を含むことを特徴とする制御方法を提供してもよい。
 本発明は、上記制御方法の各ステップをプロセッサに実行させるためのプログラムを提供してもよい。
 本発明は、上記手段の少なくとも一部を有する撮像システムとして捉えてもよいし、処理装置、制御装置、あるいは画像処理装置として捉えてもよい。また、本発明は、撮像システムで得られた偏光情報画像を用いて透明物体を検出ないし検査する装置として捉えてもよい。また、本発明は、上記処理の少なくとも一部を含む撮像システムの制御方法、画像処理方法、検出方法、あるいは検査方法として捉えてもよいし、かかる方法を実現するためのプログラムやそのプログラムを記録した記録媒体として捉えることもできる。なお、上記手段および処理の各々は可能な限り互いに組み合わせて本発明を構成することができる。
 本発明によれば、被写体や状況によらず、偏光情報を安定して抽出することが可能である。
図1は、本発明の実施形態に係る撮像システムの全体構成を模式的に示す図である。 図2は、偏光カメラの構造を模式的に示す図である。 図3Aは、照明装置の構造を模式的に示す図であり、図3Bおよび図3Cは照明装置の他の構成例を示す図である。 図4は、処理装置の論理構成(機能構成)を示すブロック図である。 図5Aおよび図5Bは、鏡面反射を説明する図である。 図6は、偏光カメラの画像から偏光成分を抽出する方法を説明する図である。 図7は、撮像システムの動作の一例を示すフローチャートである。 図8は、画像処理パラメータ入力用のユーザインターフェイスの一例である。 図9は、偏光情報算出処理のフローチャートである。 図10A~図10Dは、近傍画素の例を示す図である。 図11Aは、曲面部分での鏡面反射の例を示す図であり、図11Bは、偏光が入射する範囲が狭小である場合のマスクサイズの選択例を示す図である。 図12は、大きいマスクサイズが適している例を示す図である。 図13は、ノイズ除去処理のフローチャートである。 図14Aおよび図14Bは、比較範囲の例を示す図である。 図15は、画像生成処理のフローチャートである。 図16Aは、ネストに配置されたシリンジを天頂カメラで観測する様子を示す図であり、図16Bは、視野内の位置による照明光の強度の不均一を説明するための図である。 図17は、照明強度を段階的に変えたときの偏光強度画像の違いと、それらを合成した偏光強度画像の例を示す図である。 図18A、図18Bは、第2実施形態を説明するための図である。
 <第1実施形態>
 (システム構成)
 図1は、本発明の第1実施形態に係る撮像システムの全体構成を模式的に示している。この撮像システム1は、偏光カメラ10を利用して透明物体を画像化するためのシステムであり、例えば、工場の製造ラインにおいて透明物体の検出や検査を行うために利用される。
 撮像システム1は、主な構成として、偏光カメラ10、照明装置11、処理装置12、ステージ13を有して構成される。偏光カメラ10は、偏光子が配列された撮像素子を有する撮像手段である。照明装置11は、ステージ13に配置された被写体(透明物体)Wに照明光Lを照射するための光源である。処理装置12は、撮像システム1全体の制御、および、偏光カメラ10で撮影された画像を用いた情報処理を実行する装置である。ステージ13は、被写体Wを載置ないし保持するための装置である。
 偏光カメラ10は、ステージ13に配置された被写体Wを天頂方向から撮影するように配置されている。ステージ13と平行にX,Y軸をとり、ステージ13に垂直にZ軸をとったXYZ座標系を考えた場合、偏光カメラ10の光軸はZ軸に平行となる。本システムでは、被写体Wで鏡面反射した光を偏光カメラ10で捉えることが目的のため、被写体表面に対する照明光Lの入射角ができるだけブリュースター角に近い方が望ましい。そこで本実施形態では、照明装置11をステージ13とほぼ同じ高さに(実際上は、照明光Lがステージ13で遮られないよう、照明装置11の下端がステージ13の上端とほぼ同じ高さになる程度に)配置し、照明光Lがほぼ真横(Z軸に対し垂直な方向)から被写体Wに入射するようにしている。このような照明配置をローアングル照明とも称する。本実施形態のような天頂カメラとローアングル照明の組み合わせでは、被写体表面への入射角が約45度となる照明光Lの鏡面反射Rが偏光カメラ10で捉えられることとなる。なお、入射角をよりブリュースター角に近づけるために、被写体Wよりも低い位置から照明光Lを当てるような照明配置を採用したり、偏光カメラ10の光軸を照明装置11とは反対側に倒したりしてもよい。
 (偏光カメラ)
 図2を参照して、偏光カメラ10の構成の一例を説明する。図2は、偏光カメラ10の構造を模式的に示す図である。
 偏光カメラ10は、撮像素子20に偏光子アレイ21を組み合わせた構造を有する。撮像素子20は、CCD(Charge Coupled Device)センサ、CMOS(Complementary Metal Oxide Semiconductor)センサなどの光電変換素子(画素とも称する)が2次元的に配列されたデバイスであり、イメージセンサとも呼ばれる。偏光子アレイ21は、多数の偏光子が2次元的に配列されたデバイスであり、1つの偏光子210が撮像素子20の1つの画素(受光素子)200に対応するように位置およびサイズが設計されている。偏光子210は、特定の方向の直線偏光のみを通過させる性質をもつ光学素子である(偏光子210が透過する直線偏光の振動方向を、その偏光子210の透過軸方向と呼ぶ。)。本実施形態の偏光子アレイ21は、図2に示すように、4種類の透過軸方向(0度、45度、90度、135度)の偏光子210が規則的に配列された構造を有する。具体的には、撮像素子20の2×2の4画素に、それぞれ異なる透過軸方向(0度、45度、90度、135度)の直線偏光成分が入射するような配列パターンがとられている。
 撮像素子20および偏光子アレイ21の解像度(画素ピッチ)およびサイズ(画素数)は、被写体や画像の用途に応じて適宜設計すればよい。偏光子アレイ21の実現方法としては、ワイヤーグリッド、フォトニック結晶などがあるが、いずれの方法を用いてもよい。また、図2では、4種類の透過軸方向の偏光子を2×2の4画素に組み合わせたが、偏光子の透過軸方向のバリエーションや配列は他の構成でもよい。
 (照明装置)
 図3Aを参照して、照明装置11の構成の一例を説明する。図3Aは、本実施形態の照明装置11の構造を模式的に示す図であり、偏光カメラ10側からステージ13を視たときの様子を示している。
 照明装置11は、ステージ13を囲むように配置された、4本の棒状照明30から構成される。4本の棒状照明30を同時に点灯すると、ステージ13上の被写体Wを四方(X正方向、X負方向、Y正方向、Y負方向)から照明することができる。また、いずれかの棒状照明30のみを選択的に点灯させれば、照明方向を切り換えることができる。棒状照明30は、例えば、基板上に配置した複数のLED光源とそれらを覆うように配置した拡散板により構成される。
 なお、照明装置11の構造は図3Aに示すものに限られない。例えば、図3Bのような円環状の照明装置11を用いてもよい。この構造でも被写体Wを全方位から同時に照明することができる。また、LED光源を選択的に点灯させることで照明方向を任意に切り換えることも可能である。また、全方位照明ではなく、図3Cに示すように特定の方向だけから被写体Wを照明する構成でもよい。例えば、被写体Wの存在範囲が限られていたり、検出したい被写体表面の角度が既知もしくは限られている場合には、必要な方向から照明すれば足りる。あるいは、図3Cのような照明装置11を用いた場合でも、照明装置11と被写体Wの相対位置を変える(例えば、被写体Wをステージ上で回転させるなど)ことによって全方位的な撮影を行ってもよい。
 (処理装置)
 図4を参照して、処理装置12の構成の一例を説明する。図4は、本実施形態の処理装置12の論理構成(機能構成)を示すブロック図である。
 処理装置12は、主な構成として、カメラ制御部40、照明制御部41、画像処理部42を有する。カメラ制御部40は、偏光カメラ10の制御を担う。例えば、カメラ制御部40は、偏光カメラ10の撮像条件(露光時間、ゲインなど)の制御、偏光カメラ10からの画像データの取り込み、偏光カメラ10のキャリブレーションなどを実行する。照明制御部41は、照明装置11の制御を担う。例えば、照明制御部41は、照明条件(発光強度、発光時間など)の制御、光源ごとの点灯/消灯の制御などを実行する。画像処理部42は、偏光カメラ10から取り込まれた画像に対する処理を実行する。
 本実施形態の画像処理部42は、画像取得部420、偏光抽出部421、偏光情報画像生成部422、表示部423、パラメータ受付部424などの機能を有する。画像取得部420は、偏光カメラ10によって撮影された画像(以下「元画像」とも称する)をカメラ制御部40を介して取得する。偏光抽出部421は、元画像から偏光情報を抽出する偏光抽出処理を行う。偏光情報は、透明物体での鏡面反射に由来する偏光に関する情報である。偏光情報画像生成部422は、偏光抽出処理の抽出結果に基づいて偏光情報を表す画像(以下「偏光情報画像」とも称する)を生成する。表示部423は、生成された偏光情報画像をディスプレイ装置に表示する処理を行う。パラメータ受付部424は、撮像システム1の動作を決定する各種の条件設定(パラメータ)の変更を受け付ける機能である。画像処理部42の各処理の詳細は後述する。
 処理装置12は、例えば、CPU・GPUなどのプロセッサ、主記憶としてのメモリ、補助記憶としてのストレージ、ディスプレイ装置、マウスやタッチパネルなどの入力装置、ネットワークI/F等を備えたコンピュータにより構成してもよい。コンピュータとしては、パーソナルコンピュータ、タブレット端末、スマートフォン、フィールドコンピュータなどの汎用コンピュータを利用してもよいし、組み込み型コンピュータや専用装置でもよいし、偏光カメラ10やPLC(Programmable logic Controller)といった他の装置のコンピュータ資源を利用するものであってもよい。図4に示す構成は、ストレージなどに格納されたプログラムをメモリにロードしプロセッサによって実行することにより、実現される。ただし、図4に示す構成の一部もしくは全部を、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)などの専用デバイスで構成してもよい。また、クラウドコンピューティングや分散コンピューティングを利用して、図4に示す構成の一部や処理の一部を他の装置で実行してもよい。
 (偏光カメラによる透明物体検出)
 偏光カメラによる透明物体検出の基本原理について説明する。
 図5Aに示すように、ガラスや透明樹脂などの透明物体Wに光50が斜めに入射したとき、入射光50の大部分は屈折光51となり透明物体Wを透過するが、入射光50の一部は透明物体Wの表面(界面)において鏡面反射し、反射光52となる。この鏡面反射において、入射光50に含まれるp波(電界の振動方向が入射面に平行な偏光成分)とs波(電界の振動方向が入射面に垂直な(つまり反射面に平行な)偏光成分)との間に反射率の差が生じる。図5Bは、横軸に入射角、縦軸に反射率をとり、s波とp波の反射率の差の一例を示したものである。この例に示すように、s波の反射率は入射角αに応じて単調増加するが、p波の反射率は入射角αが0度から増すに従い徐々に減少し、ある角度(ブリュースター角と呼ばれる)で反射率が0となる。したがって、鏡面反射の場合に観測される反射光52は、s波、すなわち、反射面である透明物体Wの表面に平行な方向に振動する偏光成分が支配的となる。このような性質を利用し、偏光カメラによって偏光をとらえることで、透明物体Wの表面(反射面)を画像化することができる。
 ところで、偏光カメラには、鏡面反射による偏光だけでなく、被写体や背景などで拡散反射した光も入射する。透明物体の画像化においては、拡散反射光成分は不要でありアーチファクトの原因ともなることから、まずは偏光カメラの画像から偏光成分のみを抽出する必要がある。そのために、本実施形態では、偏光子による透過特性の違いを利用する。
 図6を参照して、偏光カメラの画像から偏光成分を抽出する方法を説明する。受光素子で受光される偏光成分の強度は、偏光方向θと偏光子の透過軸方向とが一致した場合に最大となり、透過軸方向が偏光方向θからずれるに従い減少し、透過軸方向と偏光方向θが直交する場合に最小となる。つまり、偏光子の透過軸方向を0度~180度まで変化させていくと、受光素子で受光される偏光成分の強度は正弦波のように変化する。一方、入射光に含まれる拡散反射光成分の強度は、偏光子の透過軸方向に依らず、一定である。したがって、透過軸方向の異なる複数種類の偏光子を通して観測したときの光強度の変化(透過軸方向依存性)に基づいて、入射光に含まれる偏光成分の情報だけを抽出することができる。
 例えば、図6に示すように、透過軸方向が0度、45度、90度、135度の4種類の偏光子210を通して、偏光方向θの偏光成分を含む入射光を観測するケースを想定する。このとき、各偏光子210に対応する画素200の値(透過光の光強度に相当)には、透過軸方向に依存した差が生じている。この4点の画素値に対し、正弦波をフィッティングすることで、偏光成分の偏光方向θおよび偏光強度を推定できる。図6において、フィッティングカーブが最大となる角度が偏光成分の偏光方向θを表し、フィッティングカーブの振幅が偏光強度(偏光度とも呼ぶ)を表している。偏光カメラ10で得られた画像の各画素について、このような偏光抽出処理を適用することにより、偏光カメラ10の視野内に存在する透明物体Wで鏡面反射した偏光の情報(偏光方向、偏光強度など)をとらえることができる。
 本実施形態の偏光抽出部421による偏光抽出処理も、透過軸方向の異なる複数種類の偏光子を通して観測したときの光強度の変化(透過軸方向依存性)に基づいて偏光情報を抽出する、という基本的な原理は同じである。ただし、精度やユーザビリティのさらなる向上を図るため、マスクサイズ(偏光を算出するときに参照する近傍画素の範囲を規定するパラメータ)の選択、ノイズ除去などのユニークな処理を加えている。詳しくは後述する。
 (撮像システムの動作例)
 図7のフローチャートに沿って、撮像システム1の動作の一例を説明する。
 ステップS70にて、被写体Wとなる透明物体がステージ13上に配置される。ロボットや搬送装置を利用して被写体Wを搬送・位置決めしてもよいし、作業者がステージ13上に被写体Wをセットしてもよい。
 ステップS71にて、処理装置12の照明制御部41が、照明装置11の照明条件を設定する。本実施形態の照明装置11は照明強度を1~4の4段階に切り替え可能であり、照明制御部41は、まず照明強度を1(最も暗い状態)に設定する。
 ステップS72にて、被写体Wの撮影が行われる。具体的には、照明制御部41が与えられた照明条件に従って照明装置11を点灯させ、被写体Wに照明光を照射する。そして、被写体Wを照明した状態で、カメラ制御部40が与えられた撮像条件に従って偏光カメラ10を制御し、撮影を行う。
 ステップS73にて、処理装置12の画像取得部420が、ステップS72で撮影された画像(元画像)を偏光カメラ10から取り込む。取り込まれた元画像データは、メモリ又はストレージに格納され、画像処理部42による処理に供される。
 ステップS74にて、処理装置12は全ての撮影条件での撮影が完了したかを確認し、未完了であればステップS71に戻って次の撮影条件での撮影を行う。すなわち、ステップS71にて、照明制御部41が照明装置11の照明強度を2に変更し、ステップS72にて、再び被写体Wが撮影され、ステップS73にて、照明強度2に対応する元画像が取り込まれる。本実施形態では、ステップS71~S74の処理が4回繰り返され、同じ被写体Wに関し、明るさが異なる4枚の元画像が処理装置12に取り込まれる。全ての撮影条件での撮影が完了すると、ステップS75に進む。
 ステップS75にて、パラメータ受付部424が提供するユーザインターフェイスを利用して、ユーザが、画像処理部42で用いられる画像処理パラメータを入力する。なお、画像処理パラメータを変更する必要がなければ、ステップS74の処理はスキップしてもよい。また、画像処理パラメータの設定は、撮影の前に行ってもよい。
 図8は、パラメータ受付部424が提供する画像処理パラメータ入力用のユーザインターフェイス(UI)の一例である。このUI画面は、マスクサイズ設定80、ノイズ除去設定81、表示画像設定82、全体画像表示エリア83、拡大画像表示エリア84、拡大設定85から構成されている。マスクサイズ設定80は、元画像から偏光情報を算出するときに参照する近傍画素の範囲を規定する「マスクサイズ」を設定するためのUIである。図8の例では、2×2、3×3、4×4、5×5のなかからマスクサイズを選択させるようになっているが、ユーザに任意のサイズを入力させるようにしてもよい。ノイズ除去設定81は、偏光情報の算出結果に含まれるノイズを除去ないし低減する「ノイズ除去処理」に関する条件を設定するためのUIである。図8の例では、ノイズ除去処理を適用するか否かを選択可能であり、「あり」の場合には、さらに、ノイズ除去処理で用いるパラメータ(比較範囲、偏光角度差閾値、偏光強度差閾値)を入力可能である。
 表示画像設定82は、全体画像表示エリア83および拡大画像表示エリア84に表示する画像の種類を設定するためのUIである。図8の例では、元画像、偏光強度画像、偏光方向画像、明度画像のなかから選択可能となっている。全体画像表示エリア83は、全体画像(低解像度)が表示されるエリアであり、拡大画像表示エリア84は、画像の一部分(枠86で示される部分)が高解像度で表示されるエリアである。また、拡大設定85は、拡大画像表示エリア84に表示する拡大画像の倍率や範囲を設定するためのUIである。
 ステップS76にて、偏光抽出部421が、ステップS73で取り込まれた複数の元画像から偏光情報を算出する。偏光情報算出処理の詳細は後述する。
 ステップS77にて、偏光抽出部421が、ステップS76の算出結果に対してノイズ除去処理を適用する。なお、図8のUIにおいてノイズ除去「なし」に設定されている場合は、ステップS77の処理はスキップされる。ノイズ除去処理の詳細は後述する。
 ステップS78にて、偏光情報画像生成部422が、偏光抽出部421によって複数の元画像のそれぞれから抽出された複数の偏光情報を合成し、偏光情報画像を生成する。画像生成処理の詳細は後述する。本実施形態では、偏光情報画像として、偏光強度画像、偏光方向画像、明度画像の3種類の画像が生成される。偏光強度画像は、偏光強度(偏光の程度)を濃淡で表す画像であり、偏光方向画像は、偏光方向を濃淡もしくは疑似色で表す画像である。また、明度画像は、偏光成分の光強度を濃淡で表す画像である。
 ステップS79では、表示部423が、図8のUIの表示画像設定82で選択されている画像を全体画像表示エリア83および拡大画像表示エリア84に表示する。
 ここで、ユーザが、図8のUI上で表示画像設定82を変更すると、それに応じて全体画像表示エリア83および拡大画像表示エリア84に表示される画像が切り替わる。このUIを利用することにより、元画像の様子と、偏光情報(偏光強度、偏光方向、明度)とを見比べることができるので、例えば、偏光情報の算出やノイズの除去が適切に行われているか確認したり、透明物体の形状や状態を確認したりする作業が容易になる。なお、図8のUI上でマスクサイズ設定80やノイズ除去設定81が変更された場合に、ステップS76~S79の処理が再度実行されてもよい。このようなUIを利用することにより、演算結果(偏光情報画像)を確認しながら、画像処理パラメータ(マスクサイズ、ノイズ除去の有無、比較範囲、閾値など)の追い込みを行うことができる。
 本実施形態では、撮影条件として照明装置11の照明条件を変更したが、偏光カメラ10の撮像条件を変更することでも、明るさが異なる画像を撮影することが可能である。例えば、処理装置12のカメラ制御部40が偏光カメラ10の露光時間を変更する制御を行ってもよい。露光時間を長くするほど、撮像素子の受光量が増えるため、明るい画像を撮影することができる。あるいは、カメラ制御部40が偏光カメラ10のゲインを変更する制御を行ってもよい。ゲインは撮像素子での増幅率であり、ゲインを大きくするほど、明るい画像が得られる。もちろん、照明装置11の照明条件と偏光カメラ10の撮像条件の両方を制御しても構わない。
 (偏光情報算出処理)
 図9および図10A~図10Dを参照して、偏光抽出部421の偏光情報算出処理(図7のステップS76)の実装例を説明する。図9は偏光情報算出処理のフローチャートであり、図10A~図10Dは近傍画素の例を示す図である。ここでは、元画像のサイズ(画素数)をM行×N列とし、i行j列の画素を(i,j)、その画素の画素値(光強度)をI(i,j)と表記する(i=1,2,・・・,M、j=1,2,・・・,N)。図10A~図10Dは元画像の一部を拡大して示したものであり、一つ一つの矩形が画素を表し、画素内の矢印は透過軸方向を表し、欄外に記載した記号は画素の行番号と列番号を表している。
 ステップS10にて、偏光抽出部421は、図7のステップS71~S74において異なる撮影条件で撮影された複数の元画像のなかから、処理対象の元画像を1つ選択する。本実施形態では、ステップS10において、照明強度1で撮影された元画像、照明強度2で撮影された元画像、照明強度3で撮影された元画像、照明強度4で撮影された元画像の順に選択されるものとする。
 ステップS11にて、偏光抽出部421は、元画像から演算対象とする注目画素を選択する。ステップS11では、(1,1)から(M,N)まで注目画素が順に選択されるものとする。
 ステップS12にて、偏光抽出部421は、注目画素の偏光情報を算出する際に参照する近傍画素を選択する。ここで選択する近傍画素の範囲は、図8のマスクサイズ設定80で指定されたマスクサイズで決まる。まずは、デフォルトのマスクサイズである2×2の場合を例に挙げて説明する。マスクサイズが2×2の場合、図10Aに示すように、注目画素(i,j)に隣接する3つの画素(i-1,j-1)、(i-1,j)、(i,j-1)が近傍画素として選択される。なお、注目画素が元画像の境界にあり、近傍画素が存在しない場合には、ステップS12~S13の処理をスキップしてもよいし、適当な値でパディングしてもよい。
 ステップS13にて、偏光抽出部421は、注目画素と近傍画素の光強度(画素値)を基に、注目画素の偏光情報を算出する。透過軸方向が0度、45度、90度、135度の光強度をそれぞれI1、I2、I3、I4とおいた場合、例えば、注目画素の明度I0、偏光方向θ、偏光強度Dは下記式により求まる。
Figure JPOXMLDOC01-appb-M000001
 図10Aの例では、4つの画素(i-1,j-1)、(i-1,j)、(i,j-1)、(i,j)に対応する透過軸方向は、それぞれ、90度、135度、45度、0度であるから、式(1)~(3)におけるI1~I4は下記式で与えられる。
  I1=I(i,j)
  I2=I(i,j-1)
  I3=I(i-1,j-1)
  I4=I(i-1,j)
 式(1)の明度I0は、注目画素に入射する入射光の強度を表す指標である。式(2)の偏光方向θは、注目画素に入射する入射光に含まれる偏光成分の主軸方位を表す。式(3)の偏光強度Dは、注目画素に入射する入射光に含まれる偏光成分の偏光の程度を表す指標である。
 なお、上記式(1)~(3)は一例であり、他の計算式によって明度、偏光方向、偏光強度に相当する指標を計算しても構わない。例えば、式(1)~(3)における係数を他のものに置き換えたり、式(3)を下記の式(4)に置き換えてもよい。
Figure JPOXMLDOC01-appb-M000002
 ステップS14にて、偏光抽出部421は、元画像のすべての画素に対して偏光情報の算出処理が完了したか(すなわち、i=Mかつj=Nであるか)確認し、未処理の画素がある場合にはステップS11に戻って次の注目画素に対する処理を実行する。
 ステップS15にて、偏光抽出部421は、すべての元画像に対して偏光情報の算出処理が完了したか確認し、未処理の元画像がある場合にはステップS10に戻って次の元画像に対する処理を実行する。
 以上述べた処理により、すべての元画像のすべての画素について、3項目の偏光情報(偏光方向θ、偏光強度D、明度I0)が算出される。偏光情報算出処理の演算結果は、例えば、各画素の座標(i,j)と偏光方向θ(i,j)・偏光強度D(i,j)・明度I0(i,j)とを対応付けたデータ形式でメモリ又はストレージに保存され、後段の処理に供される。
 次に、図10B~図10Dを参照して、マスクサイズが2×2より大きい場合の処理例を説明する。
 図10Bに示すように、マスクサイズが3×3の場合は、ステップS12において、注目画素(i,j)に隣接する8つの画素(i-1,j-1)、(i-1,j)、(i-1,j+1)、(i,j-1)、(i,j+1)、(i+1,j-1)、(i+1,j)、(i+1,j+1)が近傍画素として選択される。図10Bの例では、注目画素と近傍画素を合わせた9つの画素群のなかに、透過軸方向が0度の画素が1つ、45度の画素と135度の画素が2つずつ、90度の画素が4つ含まれる。このように透過軸方向が同じ画素が複数存在する場合には、ステップS13の演算において、透過軸方向ごとの画素の代表値を式(1)~(3)のI1~I4に代入すればよい。
 例えば、代表値として平均値を用いる場合であれば、I1~I4は下記式で与えられる。
  I1=I(i,j)
  I2={I(i,j-1)+I(i,j+1)}/2
  I3={I(i-1,j-1)+I(i-1,j+1)+I(i+1,j-1)+I(i+1,j+1)}/4
  I4={I(i,j-1)+I(i,j+1)}/2
 代表値としては、平均値の他、最頻値、中間値、最大値、最小値などを用いてもよい。また、代表値を用いずに、9つの画素の値に対し正弦波のフィッティングを行うことで、I1~I4を推定するか、又は、明度I0、偏光方向θ、偏光強度Dを直接計算してもよい。
 図10Cは、マスクサイズが4×4の例である。マスクサイズ3×3のときの8つの近傍画素にさらに7つの画素(i-2,j-2)、(i-2,j-1)、(i-2,j)、(i-2,j+1)、(i-1,j-2)、(i,j-2)、(i+1,j-2)を加えた範囲が選択される。図10Cの例では、選択範囲のなかに0度、45度、90度、135度の画素が4つずつ含まれる。この場合も、3×3の場合と同じく、透過軸方向ごとの代表値をI1~I4に代入するか、16個の画素の値に対し正弦波のフィッティングを行えばよい。
 図10Dは、マスクサイズが5×5の例である。マスクサイズ4×4のときの15個の近傍画素にさらに9つの画素(i-2,j+2)、(i-1,j+2)、(i,j+2)、(i+1,j+2)、(i+2,j-2)、(i+2,j-1)、(i+2,j)、(i+2,j+1)、(i+2,j+2)を加えた範囲が選択される。図10Dの例では、選択範囲のなかに0度の画素が9つ、45度の画素と135度の画素が6つずつ、90度の画素が4つ含まれる。この場合も、3×3の場合と同じく、透過軸方向ごとの代表値をI1~I4に代入するか、25個の画素の値に対し正弦波のフィッティングを行えばよい。
 本実施形態では、マスクサイズ、すなわち、偏光情報の算出時に参照する画素範囲を任意に変更できるようになっている。ユーザは、被写体の形状や状態、あるいは、本システムの用途などに応じて、適切なマスクサイズを選択すればよい。
 例えば、図11Aに示すように、被写体Wの曲面部分での鏡面反射を偏光カメラ10でとらえるようなケースでは、反射面が極めて狭小なため、(偏光カメラ10の解像度にもよるが)偏光が入射する範囲が数画素幅の狭小領域になることがある。このようなケースにおいては、マスクサイズが大きすぎると、図11Bに示すように、偏光が入射していない画素まで参照してしまい、偏光情報の検出性が低下する可能性がある。したがって、偏光が入射する範囲よりも小さいマスクサイズを選択することが好ましい。これにより、狭小領域における偏光情報を適切に抽出することができる。
 一方で、図12に示すように、平坦な面の反射の特性(鏡面反射、散乱の強さ)により、面上の汚れ・異物などの検査を行うケースでは、画像上の比較的広い範囲において、類似した偏光特性が現れることが想定される。このようなケースにおいては、マスクサイズが小さすぎると、局所的な反射率の違いなどに敏感に影響を受け、検査が安定しない可能性がある。したがって、ある程度大きめのマスクサイズを設定することにより、局所的な反射率の違いなどによるかく乱要因を平均化することが好ましい。これにより、検査の安定性を向上することができる。
 なお、本実施形態では、マスクサイズの例として2×2、3×3、4×4、5×5の4つを示したが、マスクサイズはこれらに限られない。例えば、5×5より大きいマスクを用いてもよいし、正方形でない形状のマスクを用いてもよい。また、ユーザがマスクのサイズや形状を任意に設計できるようにしてもよい。
 (ノイズ除去処理)
 上述した偏光情報算出処理は、局所的な画素値の差を、偏光子の透過軸方向の違いによる透過量の差であるととらえ、偏光を検出する、という原理を利用している。そのため、例えば、被写体のエッジ部分やテクスチャ部分において空間周波数の高い輝度変化が生じた場合に、偏光による画素値の差であると誤解し、偏光の誤検出を招くことがある。ノイズ除去処理は、このような誤検出によるノイズを、偏光情報算出処理の演算結果から除去ないし低減するための処理である。
 図13および図14A、図14Bを参照して、ノイズ除去処理(図7のステップS77)の実装例を説明する。図13はノイズ除去処理のフローチャートであり、図14A、図14Bは比較範囲の例を示す図である。
 ステップS20にて、偏光抽出部421は、図8のノイズ除去設定81で設定されたパラメータを読み込む。ここでは、ノイズ除去のあり/なし、比較範囲、偏光角度差閾値、偏光強度差閾値の4つのパラメータが読み込まれる。ノイズ除去「なし」に設定されている場合には、以降の処理をスキップする(ステップS21)。ノイズ除去「あり」の場合は、ステップS22に進む。
 ステップS22にて、偏光抽出部421は、メモリ又はストレージから偏光情報算出処理の演算結果を読み込む。ここでは、複数の元画像のそれぞれから抽出された、各画素の座標(i,j)と偏光方向θ(i,j)・偏光強度D(i,j)・明度I0(i,j)とが対応付けられたデータが取得される。
 ステップS23にて、偏光抽出部421は、複数の元画像のなかから、処理対象の元画像を1つ選択する。本実施形態では、照明強度1で撮影された元画像、照明強度2で撮影された元画像、照明強度3で撮影された元画像、照明強度4で撮影された元画像の順に選択されるものとする。
 ステップS24にて、偏光抽出部421は、処理対象とする対象画素を選択する。ステップS24では、(1,1)から(M,N)まで対象画素が順に選択されるものとする。
 ステップS25にて、偏光抽出部421は、対象画素とその周辺画素のあいだで偏光方向を比較し、偏光方向が類似しているか否か判断する。図14Aに示すように、比較範囲「1」に設定された場合は、対象画素(i,j)と3つの周辺画素(i,j+1)、(i+1,j)、(i+1,j+1)のあいだで比較が行われる。また、図14Bに示すように、比較範囲「2」に設定された場合は、対象画素(i,j)と8つの周辺画素(i-1,j-1)、(i-1,j)、(i-1,j+1)、(i,j-1)、(i,j+1)、(i+1,j-1)、(i+1,j)、(i+1,j+1)のあいだで比較が行われる。そして、偏光方向の差が偏光角度差閾値よりも大きくなる組み合わせが1つでも見つかった場合には、「非類似」と判断し、ステップS27に進む。一方、「類似」と判断された場合には、ステップS26へと進む。
 ステップS26にて、偏光抽出部421は、対象画素とその周辺画素のあいだで偏光強度を比較し、偏光強度が類似しているか否か判断する。比較範囲の選び方は図14Aおよび図14Bで示したとおりである。そして、偏光強度の差が偏光強度差閾値よりも大きくなる組み合わせが1つでも見つかった場合には、「非類似」と判断し、ステップS27に進む。一方、「類似」と判断された場合には、ステップS28へと進む。
 偏光方向又は偏光強度のいずれかが「非類似」である場合、対象画素の偏光情報は周辺画素に比べて特異な値(外れ値)になっており、ノイズである蓋然性が高い。そこで、ステップS27にて、偏光抽出部421は、対象画素の偏光情報(偏光方向θおよび偏光強度D)を削除する。
 偏光方向と偏光強度のいずれも「類似」である場合、ステップS28にて、偏光抽出部421は、対象画素と比較範囲内の画素のなかで偏光強度が最も大きい画素を選択し、対象画素の偏光方向・偏光強度をその選択画素の偏光方向・偏光強度に置き換える。この処理によって、偏光方向・偏光強度の局所的なばらつきを低減するスムージング効果が得られる。
 ステップS29にて、偏光抽出部421は、すべての画素に対してノイズ除去処理が完了したか確認し、未処理の画素がある場合にはステップS24に戻って次の対象画素に対する処理を実行する。
 ステップS30にて、偏光抽出部421は、すべての元画像に対してノイズ除去処理が完了したか確認し、未処理の元画像がある場合にはステップS23に戻って次の元画像に対する処理を実行する。
 以上述べた処理により、偏光情報算出処理の演算結果である偏光方向θと偏光強度Dに対し、ノイズ(外れ値)の除去とスムージングが行われる。なお、修正後のデータは、メモリ又はストレージ内に上書き保存される。
 (画像生成処理)
 図15のフローチャートを参照して、画像生成処理(図7のステップS78)の実装例を説明する。
 ステップS40にて、偏光情報画像生成部422は、まず処理対象とする対象画素(i,j)を1つ選択する。ステップS40~S45のループが繰り返されるたびに、(1,1)から(M,N)まで順に対象画素が選択されるものとする。そして、偏光情報画像生成部422は、対象画素(i,j)について、複数の元画像のそれぞれから抽出された偏光情報を取得する。ここで、k番目の元画像の画素(i,j)から抽出された偏光情報をPIk(i,j)と表記する場合、本例では、照明強度1~照明強度4で撮影された4枚の元画像のそれぞれに対応する偏光情報PI1(i,j)~PI4(i,j)がメモリから読み込まれる。なお、偏光情報PIk(i,j)は、偏光強度Dk(i,j)、偏光方向θk(i,j)、および明度I0k(i,j)の3項目の情報を含んでいる(添え字kは、元画像の番号を表す)。
 ステップS41にて、偏光情報画像生成部422は、ステップS40で取得した複数の偏光情報PI1(i,j)~PI4(i,j)を比較し、最も偏光強度Dk(i,j)が強い偏光情報を、最も信頼度が高い偏光情報であるとみなし、対象画素(i,j)の偏光情報として採用する。偏光強度は、偏光の程度を表す指標であり、この値が大きいほど偏光成分が明りょうに観測されていることを意味する。したがって、撮影条件を変えて取得した複数の偏光情報PI1(i,j)~PI4(i,j)の中から、偏光強度が最も強いものを採用することで、画素(i,j)(つまり、当該画素(i,j)に対応する透明物体の反射面上の領域)に関する最も信頼度の高い偏光情報を得ることができる。n番目の元画像の偏光情報であるPIn(i,j)が採用されたものとして以降の説明を続ける。
 ステップS42にて、偏光情報画像生成部422は、ステップS41で選択した偏光情報PIn(i,j)の偏光強度の値Dn(i,j)を、偏光強度画像の画素(i,j)に書き込む。同様に、ステップS43にて、偏光情報画像生成部422は、ステップS41で選択した偏光情報PIn(i,j)の偏光方向の値θn(i,j)を、偏光方向画像の画素(i,j)に書き込む。また、ステップS44にて、偏光情報画像生成部422は、ステップS41で選択した偏光情報PIn(i,j)の明度の値I0n(i,j)を、明度画像の画素(i,j)に書き込む。
 以上述べたステップS40~S44の操作を画素ごとに行うことにより(ステップS45)、複数の偏光情報PI1~PI4の良い部分(つまり、信頼性の高い偏光情報)を合成した偏光情報画像を得ることができる。なお、上記実施形態では、偏光強度Dそのものを偏光情報の信頼度を表す指標として用いたが、偏光情報の信頼度は別の指標により求めてもよい。例えば、(I3-I1)+(I2-I4)で求まる指標(4つの画素のコントラストの強さに相当する指標)を偏光情報の信頼度として用いてもよい。また、画像の暗部では一般にノイズの影響が出やすいことから、画像の明るさを考慮してもよい。例えば、MAX(I1,I2,I3,I4)が閾値以下の場合(つまり、画像の暗部の場合)には、そこには偏光は無いとみなし、信頼度を0(最小値)にしてもよい。
 上述した撮像システム1を、薬液充填済みシリンジの製造プロセスにおける検出や検査に応用する例を用いて、本実施形態の偏光情報画像の利点を説明する。
 薬液充填済みシリンジの製造プロセスでは、通常、ロボットを利用してシリンジのピック&プレースや薬液注入が行われる。このとき、シリンジが不正な位置に存在したり、横倒しの姿勢になっていたりすると、シリンジの破損や製造装置の故障を招くおそれがあるため、シリンジの位置や姿勢を監視し、問題が生じた場合にエラーを出力したり装置を停止したりする仕組みが望まれる。
 図16Aは、ネスト100に配置されたシリンジ101を天頂に設置した偏光カメラ10で観測する様子を示している。2本のシリンジ101bがネスト100の穴に挿入されず、横倒しになっている。しかし、シリンジ101は無色透明であるため、これを例えば通常の透過照明と光学カメラで撮影しても、シリンジ101と背景(白色のネスト100)の境界を画像上ほとんど識別することができない。そのため、通常の光学画像では、横倒しのシリンジ101bを検出することは困難である。
 本実施形態の撮像システム1では、図16Bに示すように、ネスト100の周囲にローアングルの照明装置11(光源11r、11l、11t、11b)を設置し、偏光カメラ10でシリンジ101の表面での鏡面反射(偏光)を撮影する。シリンジ101の反射面の向き(反射面の法線のXY平面における方位)は0度~360度の全てをとり得るが、図16Bのようにシリンジ101を四方から照明することによって、あらゆる向きの反射面の鏡面反射を偏光カメラ10で観測可能となる。
 しかしながら、例えば、視野の右側にあるシリンジ101rと左側にあるシリンジ101lを比べたときに、それぞれのシリンジ101r、101lで観測される鏡面反射光の強度は同じにならない。各シリンジ101r、101lの右向きの反射面には、ネスト100の右方に配置された光源11rからの光が入射することになるが、光源11rから近い位置にあるシリンジ101rと、光源11rから遠い位置にあるシリンジ101lとでは、反射面に入射する照明光の強度に差があるからである。それゆえ、偏光カメラ10の視野内に存在する全ての被写体を完全に均一な照明条件で撮影することはできない。仮に近位のシリンジ101rに合わせて光源11rの照明強度を設定すると、遠位のシリンジ101lでは偏光成分が弱く偏光情報の抽出が困難となってしまったり、逆に、遠位のシリンジ101lに合わせて光源11rの照明強度を設定すると、近位のシリンジ101rでは白飛びが発生し偏光情報の抽出ができないという状況が起こり得る。
 そこで、撮像システム1では、撮影条件を変えて複数回偏光を測定する。図17に示す画像104a~104dは、照明強度を段階的に明るくしたときの偏光強度画像の例を模式的に示している。視野内の位置に応じて最適な照明強度が相違することが判る。これらの画像104a~104dから偏光強度の高い部分を集めて合成することで、視野内に存在する全ての被写体の偏光情報が適切に抽出された高品位な偏光情報画像105を得ることが可能となる。偏光情報画像105では、正しい姿勢のシリンジ101aでは円形の像が明りょうに現れ、横倒しのシリンジ101bでは直線的な帯状の像が明りょうに現れる。このような偏光情報画像105を利用することで、シリンジの位置および姿勢の検査や、不正な位置もしくは姿勢のシリンジの検出を安定的に行うことが可能となる。
 コンピュータによる画像認識技術を用いて、偏光情報画像105からシリンジの検出や、シリンジの姿勢の判定などを行ってもよい。例えば、正しい姿勢のシリンジは、内側の円形およびその周囲のフランジ部にて鏡面反射が現れる。この画像特徴に着目し、偏光情報画像のなかから、円およびフランジ部の形状をパターンマッチング等の方法にて検出することによって、正しい姿勢のシリンジの自動認識が可能となる。横倒しのシリンジの場合は、例えば、まず、特定の偏光方向範囲(例:0°~60°)を持ち、互いに隣接する画素の集合(画素領域)を抽出し、その後、抽出した画素領域のうちから閾値以上の幅および長さを持つ画素領域を検出すればよい。このような処理によって、横倒しのシリンジの帯状の画素領域を自動認識することが可能となる。
 なお、上記実施形態では、照明装置11の照明条件(照明強度)を切り替えて複数回の撮影を実施したが、偏光カメラ10の撮像条件(露光条件又はゲイン)を切り替えながら複数回の撮影を実施してもよいし、あるいは、照明装置11の照明条件と偏光カメラ10の撮像条件の両方を切り替える制御を行ってもよい。すなわち、明るさが異なる複数の元画像を得ることができれば、撮影条件の変更方法は任意である。
 <第2実施形態>
 第1実施形態では、被写体を全方位から照明した状態で撮影を行った。この方法は、視野内のあらゆる向きの反射面をワンショットで撮影できるため、元画像の撮影時間を短縮できるという利点がある。しかしながら、全方位から同時に照明する方法は、ある方位からの照明光の鏡面反射を観測するときに、他の方位からの照明光の拡散反射がノイズとなる可能性がある。図18Aにその一例を示す。光源11rから入射した光は、被写体Wの右側の傾斜面で鏡面反射し、偏光カメラ10で観測される。このとき、他の方位にある光源11lから強い光が入射していると、背景での拡散反射光が透明な被写体Wを通過し、鏡面反射光とともに観測される。例えば、光源11rが被写体Wから遠位にあり、光源11lが被写体Wの近位にあるような状況では、強い拡散反射光によって弱い鏡面反射光がかき消されてしまい、偏光情報の抽出精度が著しく低下する可能性がある。
 このような拡散反射ノイズを低減するため、第2実施形態では、被写体Wに対する照明方向を切り替えながら複数回の撮影を実施する。例えば、図18Bのように、光源11lのみを点灯して1回目の撮影を行い、次に、光源11rのみを点灯して2回目の撮影を行う。これにより、光源11lからの照明光の拡散反射光と、光源11rからの照明光の鏡面反射光とを、分離して観測することができる。したがって、強い拡散反射光によって弱い鏡面反射光がかき消される状況を低減することができる。
 では、図7のフローチャートを参照して、第2実施形態の撮像システム1の動作の一例を説明する。
 ステップS70にて、被写体Wとなる透明物体がステージ13上に配置される。ロボットや搬送装置を利用して被写体Wを搬送・位置決めしてもよいし、作業者がステージ13上に被写体Wをセットしてもよい。
 ステップS71にて、処理装置12の照明制御部41が、照明装置11の照明条件(照明方向)を設定する。本実施形態の照明装置11は、ステージ13を囲むように配置された4本の棒状照明(光源)30を有しており、各々の棒状照明30は独立に点灯/消灯の切り替えや照明強度を制御できるようになっている。照明制御部41は、4本の棒状照明30のうちの1本のみが点灯し、他の3本が消灯するように照明条件を設定する。
 ステップS72にて、被写体Wの撮影が行われる。具体的には、照明制御部41が与えられた照明条件に従って照明装置11を点灯させ、被写体Wに照明光を照射する。このとき、ステージ13上の被写体Wは一方向からのみ照明された状態となる。そして、被写体Wを照明した状態で、カメラ制御部40が与えられた撮像条件に従って偏光カメラ10を制御し、撮影を行う。
 ステップS73にて、処理装置12の画像取得部420が、ステップS72で撮影された画像(元画像)を偏光カメラ10から取り込む。取り込まれた元画像データは、メモリ又はストレージに格納され、画像処理部42による処理に供される。
 ステップS74にて、処理装置12は全ての撮影条件での撮影が完了したかを確認し、未完了であればステップS71に戻って次の撮影条件での撮影を行う。すなわち、ステップS71にて、照明制御部41が照明装置11の照明方向を変更し、ステップS72にて、再び被写体Wが撮影され、ステップS73にて、新たな元画像が取り込まれる。本実施形態では、ステップS71~S74の処理が4回繰り返され、同じ被写体Wに関し、照明方向が異なる4枚の元画像が処理装置12に取り込まれる。全ての撮影条件での撮影が完了すると、ステップS75に進む。これ以降の処理は、第1実施形態のものと同じでよいので、説明を割愛する。
 以上述べたように、照明方向を変えると、背景などでの拡散反射の状況が変化する。それゆえ、照明方向を変えて撮影した複数の元画像の中から、拡散反射光成分の影響(すなわちノイズ)が最も少なく偏光成分が最も明りょうに現れているものを選択することで、より信頼性の高い偏光情報の抽出が可能となる。
 本実施形態では、独立に点灯可能な複数の光源を有する照明装置11を用い、点灯する光源を切り替えることによって照明方向の切り替えを実現した。この方法は、簡易な制御で高速に照明方向の切り替えが可能となるので、撮影のタクトタイムを短くすることができるという利点がある。
 (その他)
 上記実施形態は、本発明の構成例を例示的に説明するものに過ぎない。本発明は上記の具体的な形態には限定されることはなく、その技術的思想の範囲内で種々の変形が可能である。
 例えば、偏光カメラと照明装置の配置や構成は、図1や図3A~図3Cに示したものに限られず、被写体や用途に応じて適宜設計すればよい。すなわち、照明光の鏡面反射が偏光カメラで観測できさえすればよい。また、複数台の偏光カメラを設けてもよいし、可動式の偏光カメラや照明装置を用いてもよい。
 上記実施形態では、0度、45度、90度、135度の偏光子を用いたが、透過軸方向の設定はこれに限られない。撮像素子において異なる透過軸方向の偏光子を通過した光を観測でき、かつ、その観測結果から入射光に含まれる偏光情報を抽出できさえすればよい。
 図8のUI画面では、偏光情報算出処理で用いるマスクサイズと、ノイズ除去処理で用いるパラメータとを設定可能としたが、UI画面の構成やパラメータ項目は一例にすぎない。偏光抽出処理で用いられるパラメータをユーザに変更させるUIであれば、どのようなものでもよい。すなわち、ユーザ自身が、被写体や用途などに応じて、偏光抽出のロジックを適宜変更できればよい。また、上記実施形態では、パラメータ受付部424がパラメータ設定用のユーザインターフェイスを提供したが、パラメータ受付部424は、ユーザからのパラメータの変更指示をネットワークを通じて外部装置から受信するものでもよい。
 第1実施形態における画像の明るさの切り替え制御と、第2実施形態における照明方向の切り替え制御を一緒に行ってもよい。これにより、視野内全体の照明条件の均一化と、拡散反射ノイズの低減の両方を図ることができ、より信頼性の高い偏光情報の抽出が可能となる。
 また、第2実施形態では、点灯する光源を切り替えることで照明方向の変更を実現したが、照明装置の構成はこれに限られない。例えば、図3Cに示すような一方向から照明する照明装置11を用い、照明装置11と被写体Wの相対的な位置関係を変更することによって、照明方向の変更を実現してもよい。
 <付記1>
 透明物体(W)を画像化するための撮像システム(1)であって、
 透明物体(W)を照明するための照明装置(11)と、
 透過軸方向の異なる偏光子(210)が規則的に配列された撮像素子(20)を有する偏光カメラ(10)と、
 処理装置(12)と、を備え、
 前記処理装置(12)は、
  異なる撮影条件で前記透明物体(W)を撮影するために、前記照明装置(11)と前記偏光カメラ(10)のいずれか又は両方を制御する制御手段(40,41)と、
  異なる撮影条件で撮影された複数の元画像を取得する画像取得手段(420)と、
  前記複数の元画像のそれぞれに対し、各画素について、前記透明物体(W)での鏡面反射に由来する偏光に関する情報である偏光情報を抽出する、偏光抽出処理を実行する偏光抽出手段(421)と、
  前記偏光抽出処理によって前記複数の元画像のそれぞれから抽出された複数の偏光情報を合成し、前記偏光情報を画像化した偏光情報画像を生成する画像生成手段(422)と、を有する
ことを特徴とする撮像システム(1)。
 <付記2>
 照明装置(11)と、透過軸方向の異なる偏光子(210)が規則的に配列された撮像素子(20)を有する偏光カメラ(10)と、処理装置(12)と、を備える撮像システム(1)の制御方法であって、
 前記照明装置(11)と前記偏光カメラ(10)のいずれか又は両方を制御することによって、異なる撮影条件で透明物体(W)を撮影するステップと、
 異なる撮影条件で撮影された複数の元画像を前記処理装置(12)に取り込むステップと、
 前記処理装置(12)によって、前記複数の元画像のそれぞれに対し、各画素について、前記透明物体(W)での鏡面反射に由来する偏光に関する情報である偏光情報を抽出する、偏光抽出処理を実行し、前記偏光抽出処理によって前記複数の元画像のそれぞれから抽出された複数の偏光情報を合成し、前記偏光情報を画像化した偏光情報画像を生成するステップと、を含む
ことを特徴とする制御方法。
1:撮像システム
10:偏光カメラ
11:照明装置
12:処理装置
13:ステージ
20:撮像素子
21:偏光子アレイ
30:棒状照明

Claims (14)

  1.  透明物体を画像化するための撮像システムであって、
     透明物体を照明するための照明装置と、
     透過軸方向の異なる偏光子が規則的に配列された撮像素子を有する偏光カメラと、
     処理装置と、を備え、
     前記処理装置は、
      異なる撮影条件で前記透明物体を撮影するために、前記照明装置と前記偏光カメラのいずれか又は両方を制御する制御手段と、
      異なる撮影条件で撮影された複数の元画像を取得する画像取得手段と、
      前記複数の元画像のそれぞれに対し、各画素について、前記透明物体での鏡面反射に由来する偏光に関する情報である偏光情報を抽出する、偏光抽出処理を実行する偏光抽出手段と、
      前記偏光抽出処理によって前記複数の元画像のそれぞれから抽出された複数の偏光情報を合成し、前記偏光情報を画像化した偏光情報画像を生成する画像生成手段と、を有する
    ことを特徴とする撮像システム。
  2.  前記画像生成手段は、前記複数の元画像のそれぞれから抽出された前記複数の偏光情報のうち偏光情報の信頼度が最も高いものを選択する操作を画素ごとに行い、各画素について選択された偏光情報を用いて前記偏光情報画像を生成する
    ことを特徴とする請求項1に記載の撮像システム。
  3.  前記画像生成手段は、前記複数の偏光情報のうち偏光の程度が最も強いものを、偏光情報の信頼度が最も高いものとみなす
    ことを特徴とする請求項2に記載の撮像システム。
  4.  前記制御手段は、明るさが異なる複数の元画像が得られるように、前記照明装置と前記偏光カメラのいずれか又は両方を制御する
    ことを特徴とする請求項1~3のうちいずれか1項に記載の撮像システム。
  5.  前記制御手段は、前記撮影条件として前記照明装置の照明強度を異ならせる制御を行うことを特徴とする請求項4に記載の撮像システム。
  6.  前記制御手段は、前記撮影条件として前記偏光カメラの露光時間を異ならせる制御を行う
    ことを特徴とする請求項4又は5に記載の撮像システム。
  7.  前記制御手段は、前記撮影条件として前記偏光カメラのゲインを異ならせる制御を行うことを特徴とする請求項4~6のうちいずれか1項に記載の撮像システム。
  8.  前記制御手段は、前記透明物体に対する照明方向が異なる複数の元画像が得られるように、前記照明装置を制御する
    ことを特徴とする請求項1~3のうちいずれか1項に記載の撮像システム。
  9.  前記照明装置は、独立に点灯可能な複数の光源を有しており、
     前記制御手段は、点灯する光源を切り替えることによって、前記透明物体に対する照明方向を異ならせる
    ことを特徴とする請求項8に記載の撮像システム。
  10.  前記偏光抽出処理は、前記元画像の各画素の偏光情報を算出した後に、その算出結果に含まれるノイズを除去ないし低減するノイズ除去処理を含む
    ことを特徴とする請求項1~9のうちいずれか1項に記載の撮像システム。
  11.  前記ノイズ除去処理は、対象画素とその周辺画素とのあいだで偏光情報を比較することによって、前記対象画素と前記周辺画素の偏光情報が類似するか非類似かを判断し、非類似と判断した場合に、前記対象画素の偏光情報を削除する処理を含む
    ことを特徴とする請求項10に記載の撮像システム。
  12.  前記ノイズ除去処理は、対象画素とその周辺画素とのあいだで偏光情報を比較することによって、前記対象画素と前記周辺画素の偏光情報が類似するか非類似かを判断し、類似と判断した場合に、前記対象画素の偏光情報を、前記対象画素と前記周辺画素のなかから選択した画素の偏光情報で置き換える処理を含む
    ことを特徴とする請求項10又は11に記載の撮像システム。
  13.  照明装置と、透過軸方向の異なる偏光子が規則的に配列された撮像素子を有する偏光カメラと、処理装置と、を備える撮像システムの制御方法であって、
     前記照明装置と前記偏光カメラのいずれか又は両方を制御することによって、異なる撮影条件で透明物体を撮影するステップと、
     異なる撮影条件で撮影された複数の元画像を前記処理装置に取り込むステップと、
     前記処理装置によって、前記複数の元画像のそれぞれに対し、各画素について、前記透明物体での鏡面反射に由来する偏光に関する情報である偏光情報を抽出する、偏光抽出処理を実行し、前記偏光抽出処理によって前記複数の元画像のそれぞれから抽出された複数の偏光情報を合成し、前記偏光情報を画像化した偏光情報画像を生成するステップと、を含む
    ことを特徴とする制御方法。
  14.  請求項13に記載の制御方法の各ステップをプロセッサに実行させるためのプログラム。
PCT/JP2022/012762 2021-08-30 2022-03-18 撮像システムおよびその制御方法 WO2023032313A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021140080A JP2023034025A (ja) 2021-08-30 2021-08-30 撮像システムおよびその制御方法
JP2021-140080 2021-08-30

Publications (1)

Publication Number Publication Date
WO2023032313A1 true WO2023032313A1 (ja) 2023-03-09

Family

ID=85412458

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/012762 WO2023032313A1 (ja) 2021-08-30 2022-03-18 撮像システムおよびその制御方法

Country Status (2)

Country Link
JP (1) JP2023034025A (ja)
WO (1) WO2023032313A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009157129A1 (ja) * 2008-06-26 2009-12-30 パナソニック株式会社 画像処理装置、画像分割プログラムおよび画像合成方法
WO2019012858A1 (ja) * 2017-07-12 2019-01-17 ソニー株式会社 撮像装置、画像生成方法、撮像システム
WO2020054076A1 (ja) * 2018-09-14 2020-03-19 株式会社ソニー・インタラクティブエンタテインメント 情報処理装置および物体検出方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009157129A1 (ja) * 2008-06-26 2009-12-30 パナソニック株式会社 画像処理装置、画像分割プログラムおよび画像合成方法
WO2019012858A1 (ja) * 2017-07-12 2019-01-17 ソニー株式会社 撮像装置、画像生成方法、撮像システム
WO2020054076A1 (ja) * 2018-09-14 2020-03-19 株式会社ソニー・インタラクティブエンタテインメント 情報処理装置および物体検出方法

Also Published As

Publication number Publication date
JP2023034025A (ja) 2023-03-13

Similar Documents

Publication Publication Date Title
EP2381215B1 (en) Shape measurement apparatus and calibration method
KR20120049230A (ko) 롤링 이미지 캡처 시스템에서의 주변 보정
JP2005127989A (ja) 傷検出装置および傷検出プログラム
JP5068731B2 (ja) 表面疵検査装置、表面疵検査方法及びプログラム
JP2010117337A (ja) 表面欠陥検査装置
JP2009229197A (ja) 線状欠陥検出方法および線状欠陥検出装置
US10853935B2 (en) Image processing system, computer readable recording medium, and image processing method
JP2003168103A (ja) 画面の線欠陥検出方法及び装置並びに画像データの補正方法
WO2023032313A1 (ja) 撮像システムおよびその制御方法
JP6315419B2 (ja) 半導体検査方法、半導体検査装置及び半導体製造方法
US20210109035A1 (en) Defect detection device, defect detection method, and defect observation device
JP2021092439A (ja) 照明最適化方法、制御装置、及びプログラム
WO2023032312A1 (ja) 撮像システムおよびその制御方法
TWI687672B (zh) 光學檢測系統及影像處理方法
WO2023032318A1 (ja) 撮像システムおよびその制御方法
Riza et al. Data efficient digital micromirror device-based image edge detection sensor using space-time processing
KR20020084974A (ko) 3차원 납땜검사장치 및 그 제어방법
JP2021047162A (ja) 外観検査装置、外観検査装置の較正方法
JP6939501B2 (ja) 画像処理システム、画像処理プログラム、および画像処理方法
JP2001235319A (ja) シェーディング補正装置及びシェーディング補正方法及び表面検査装置
JP2000125289A (ja) 凹部強調画像の作成方法
JPH10141925A (ja) 外観検査装置
TW201514479A (zh) 缺陷觀察裝置及其方法
CN114746716B (zh) 形状复原方法和图像测量装置
JPH08159984A (ja) パタンムラ検査装置

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE