The present invention relates to a distance image generation device, and in particular, relates to a distance image generation device which corrects distance measurement abnormalities.
TOF (time of flight) cameras which output a distance based on the time of flight of light as distance measuring devices for measuring the distance to an object are known. Many TOF cameras use a phase difference method in which a target space is irradiated with reference light which is intensity-modulated over predetermined cycles, and a distance measurement value of the target space is output based on the phase difference between the reference light and the light reflected by the object in the target space. The phase difference is determined from the amount of reflected light received.
In such TOF cameras, distance measurement abnormalities may occur due to various optical phenomena in the camera interior (the lens, the silicon layer of the image sensor, etc.). For example, when a highly-reflective material such as a white material or a retroreflective material is photographed, the distance measurement value may be distorted up to a pixel surrounding the pixel which should receive the light due to light scattered within the camera. Such distance measurement abnormalities are not limited to highly-reflective materials, but can also be caused by optical phenomena such as flaring or ghosting, which may occur when the lens is pointed at strong light sources, for example, the sun. Furthermore, the measurement values of the peripheral pixels may be abnormal due to the influence of aberrations, which is a lens characteristic.
The principle behind this type of distance measurement abnormality is shown in
However, in the world of TOF cameras, since the time of flight of light is measured, if the amount of light received by pixel a is determined by combining path b and path a, the luminance ratio between path b constituting pixel a and path a becomes a problem. When the luminance of path a is large and the luminance of path b is low, the measurement value calculated by pixel a represents the distance of path a rather than the distance of path b.
Japanese Unexamined Patent Publication (Kokai) No. 2018-063157 describes a shape measurement device which comprises a light projection unit and a light reception unit and which generates distance image data based on received light, wherein a determination formula including a degree of coincidence between height data corresponding to a target pixel and height data corresponding to peripheral pixels and the maximum amount of light received by the peripheral pixels is set, it is determined whether the height data corresponding to the target pixel has been generated based on the stray light based on the value obtained by the determination formula, and the height data is corrected based on the result of the stray light determination.
Japanese Unexamined Patent Publication (Kokai) No. 2014-178186 describes a system using a TOF camera which comprises a light projection unit and a light reception unit and which generates a distance image based on received light, detects an object in a detection area, and outputs an alarm (safety signal), wherein an image processing unit acquires a received light image and a distance image, calculates whether raindrop pixels, in which a raindrop is reflected, are present from the linear function of amount of light received and distance, determines raindrop-influenced pixels, and determines whether an object is noise from the number of raindrop pixels in the generated raindrop influence image.
Japanese Unexamined Patent Publication (Kokai) No. 2017-181291 describes a distance measurement device which comprises a light projection unit and a light receiving unit and which generates a distance image based on detected light, wherein a region group is extracted by grouping small regions having distances in two-dimensional coordinates in an input image (distance image) which are close and distance values which are largely different from each other, and it is determined whether noise is caused by the influence of sunlight.
In light of the conventional problems, a technology which can simply and accurately correct distance measurement abnormalities caused by various optical phenomena such as stray light and aberrations has been demanded.
An aspect of the present disclosure provides a distance image generation device comprising a light projection unit for projecting reference light onto a subject, a light reception unit having a plurality of two-dimensionally arrayed pixels, an optical system for guiding light from the subject to the light reception unit, an influence calculation means for calculating, based on an amount of light received by a target pixel and a peripheral pixel thereof among the plurality of pixels, an influence of optical phenomena on the target pixel and the peripheral pixel, an impact calculation means for calculating the impact exerted by the peripheral pixel on the target pixel based on the influence, and a distance image generation means for generating a distance image of the subject based on the impact.
The embodiments of the present disclosure will be described in detail below referring to the attached drawings. In the drawings, identical or similar constituent elements are assigned the same or similar reference signs. Furthermore, the embodiments described below do not limit the technical scope of the invention and the definitions of the terms described in the claims.
The light projection unit 10 comprises a light source (e.g., a light-emitting diode, semiconductor laser, etc.) which emits intensity-modulated reference light, and a diffuser which scatters the emitted reference light toward the subject O, and the light projection unit 10 projects the reference light onto the subject O. The light reception unit 11 comprises an image sensor (e.g., a CCD (charge-coupled device), CMOS (complementary metal-oxide semiconductor), etc.) having a plurality of two-dimensionally arrayed pixels.
The optical system 12 comprises a condenser lens which condenses the light from the subject O, and an optical filter which allows the wavelength band of the reference light to pass therethrough, and the optical system 12 guides the light from the subject O to the light reception unit 11. The emission and imaging control unit 13 comprises a control circuit which controls the light emission of the light projection unit 10 and the capturing of the light reception unit 11, and the emission and imaging control unit 13 is controlled by the processor 16. The A/D conversion unit 14 comprises an A/D converter which A/D converts the amount of light received by the light reception unit 11.
The memory 15 comprises a memory (e.g., a semiconductor memory, magnetic storage device, etc.) which stores various information. The processor 16 comprises a processor (e.g., a semiconductor integrated circuit such as a CPU (central processing unit) or FPGA (field-programmable gate array)) which controls the entirety of the distance image generation device 1. The display unit 17 comprises a display device (e.g., a liquid crystal display, organic EL display, etc.) which displays various information.
The influence Fi of optical phenomena at each pixel can be described by, for example, the formula below. In the formula below, A is the amount of light received at the individual pixel, C1 is an influence coefficient, and C2 is a correction coefficient corresponding to individual characteristics (lens characteristics, sensor characteristics, etc.) inside the device.
[Formula 2]
Fi=C1A+C2 2
[Formula 3]
C1=f(w,h) 3
The influence coefficient C1 may be set in advance by, for example, the device provider by capturing an image of a subject having a predetermined pattern prepared in advance, or may be determined from the distribution of the amounts of light received by a target pixel and peripheral pixels thereof in phase images while using the device, i.e., from a spread width w and a height h of a shaded edge. Furthermore, the correction coefficient C2 can be experimentally determined in advance by the device provider in accordance with the individual characteristics within the device.
The influence Fi exerts a strong influence on pixels near the target pixel, and weakens as the distance increases. Thus, the influence coefficient C1 can be well described by a smoothing filter, in particular, a Gaussian filter. In another embodiment, another smoothing filter, for example, a moving average filter, a median filter, a low-pass filter, or the like, may be applied. Further, in some cases, a dedicated filter, for example, an asymmetric filter, which is described later, may be prepared.
A conventional Gaussian filter is described by the following formula. In the following formula, x and y are positions within the filter, with (0, 0) as a center, and a is the standard deviation of the Gaussian distribution. As the value of standard deviation a increases, the Gaussian distribution becomes flatter, while the effect of smoothing (blurring) increases, and the smaller the value of standard deviation a, the more the Gaussian distribution becomes convex, and the smaller the effect of smoothing (blurring). Thus, the standard deviation a may be obtained from formula 3 above, or the device provider may set a fixed value in advance.
Since the influence of optical phenomena such as stray light and aberrations differs depending on the distance from the image center and the position within the filter in some cases, in actual applications, an asymmetric filter in which at least one of the correction coefficient of distance (i′, j′) from the image center and the weight (a, b) of the position in the filter is applied to the Gaussian filter is more preferable. The asymmetric filter can be described by, for example, the following formula. In the following formula, the position of the pixel in the image is set as (i, j), the position of the image center pixel is set as (ic, jc), and the distance (i′, j′) from the image center is (i−ic, j−jc).
In step S11, the influence of optical phenomena is calculated based on the amount of light received by the target pixel and peripheral pixels thereof in each phase image. In other words, in this step, a smoothing filter (corresponding to the “influence coefficient”) such as a Gaussian filter is generated from the distribution of the amounts of light received by the target pixel and the peripheral pixels, and the influence is calculated based on the relationship between the influence coefficients and the amounts of light received by the target pixel and the peripheral pixels. However, the smoothing filter (influence coefficient) may be set in advance by the device provider, and a fixed value may be loaded. Furthermore, influence images may be generated based on the influences calculated at this time, and the influence images may be stored in the memory.
In step S12, the impact exerted on the target pixel by the peripheral pixel is calculated based on the calculated influence. In other words, in this step, the smoothing filter (corresponding to the “influence coefficient”) is applied to each phase image, and impact images are generated. At this time, the impact image may be stored in the memory.
In step S13, the impact images are subtracted from each phase image to generate difference images. The difference images correspond to the phase images of the light which should be originally received. In step S14, a distance image is generated from each difference image based on the distance calculation formula of formula 1 above. At this time, the difference images may be stored in the memory. Note that the generated distance image may be applied to a control system which controls machines such as robots, machine tools, and automobiles, an object monitoring system that monitors objects in a monitoring region, etc.
Though not indispensable, in step S15, at least one of the phase images, the influence images, the impact images, and the difference images are displayed on the display unit. In particular, by displaying the influence images and impact images, investigation of the cause of the distance measurement abnormality is facilitated. Since the distance measurement abnormality becomes great in locations at which the impact is large, it is possible to take measures such as moving, to the location, the subject causing the distance measurement abnormality by specifying the location where the influence is presumed to be exerted.
A distance measurement abnormality correction method according to another embodiment will be described with reference to
The influence of the distance measurement abnormality is determined in accordance with the actual distance value of the target pixel E, which receives the influence, the actual distance values of the peripheral pixels A, B, C, D, F, G, H, and I, which exert the influence, and the influence coefficients of the target pixel and the peripheral pixels. Thus, the measurement value l of the target pixel E can be described by the formula below. In the formula below, la, lb, ld, ld, le, lf, lg, lh, and li are the actual distance values of the target pixel and the peripheral pixels, and a, b, c, d, e, f, g, h, and i are influence coefficients.
By solving the formula above for the actual distance value le, the formula below is obtained. Since the actual distance values la, lb, lc, ld, lf, lg, lh, and li of the peripheral pixels are unknown in the formula below, in actual applications, the measurement values of the peripheral pixels may be used in place of the actual distance values. Furthermore, the influence coefficients a, b, c, d, e, f, g, h, and i may be determined from the distribution (e.g., formula 3 above) of the amounts of light received by the target pixel and the peripheral pixels.
As shown in the formula above, the actual distance value le (i.e., the distance image) of the target pixel E can be determined by calculating the influence coefficients a, b, c, d, e, f, g, h, and i, for calculating the influence, based on the distribution of the amounts of light received at the target pixel and the peripheral pixels, and calculating the impacts ala, blb, cld, dld, flf, glg, hlh, and ili based on the relationship between the influence coefficients and the measurement values of the peripheral pixels.
According to the embodiments described above, it is possible to easily specify the amount of light which should be originally received by the target pixel, and correct distance measurement abnormalities caused by various optical phenomena with high accuracy.
Furthermore, the program carried out by the distance image generation device 1 may be stored on and supplied from computer-readable non-temporary recording medium, for example, a CD-ROM or the like.
Though the various embodiments have been described in the present description, the present invention is not limited to the embodiments described above, and it should be appreciated that various modifications can be made within the scope described in the claims below.
Number | Date | Country | Kind |
---|---|---|---|
JP2019-101602 | May 2019 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
20120262553 | Chen | Oct 2012 | A1 |
20160161611 | Ito | Jun 2016 | A1 |
20180168440 | Das | Jun 2018 | A1 |
20190391266 | Mori | Dec 2019 | A1 |
Number | Date | Country |
---|---|---|
2014178186 | Sep 2014 | JP |
2017181291 | Oct 2017 | JP |
201863157 | Apr 2018 | JP |
2018063157 | Apr 2018 | JP |
Number | Date | Country | |
---|---|---|---|
20200380707 A1 | Dec 2020 | US |