Imaging device and imaging method

The depth acquisition device addresses the challenge of inaccurate depth measurement by using synchronized infrared and visible light imaging to detect and correct flare regions, ensuring precise depth estimation.

JP7745176B2Active Publication Date: 2025-09-29PANASONIC INTELLECTUAL PROPERTY MANAGEMENT CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2023053739
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-09-18
Filing Date
2023-03-29
Publication Date
2025-09-29
Estimated Expiration
2039-09-09

AI Technical Summary

Technical Problem

Existing distance measuring devices struggle to accurately obtain the depth of an image due to issues like flare, ghosting, and brightness saturation, especially when capturing images under different conditions or from varying viewpoints.

Method used

A depth acquisition device that captures infrared and visible light images of the same scene from the same viewpoint and time, detects flare regions in the infrared image, and estimates depth using both images to correct for flare effects.

Benefits of technology

Enables accurate acquisition of depth information even in regions affected by flare, by leveraging the high correlation between infrared and visible light images to compensate for missing data and correct depth estimates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007745176000005
    Figure 0007745176000005
  • Figure 0007745176000006
    Figure 0007745176000006
  • Figure 0007745176000007
    Figure 0007745176000007
Patent Text Reader

Abstract

To provide an imaging apparatus, method and program which correctly acquire the depth of an image.SOLUTION: A depth acquisition device 1 comprises: a light source 101 which irradiates a subject with irradiation light; an IR camera 102 and a BW camera 103 which have solid-state image sensors that perform a first imaging of the subject and a second imaging using reflection light obtained from reflection of the irradiation light on the subject; a flare detection unit 112 which detects a flare region using subject information about the subject output by the solid-state image sensor; and an output unit 118 which generates and outputs output information according to the detected flare region.SELECTED DRAWING: Figure 8
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to a depth acquisition device that acquires the depth of an image. [Background technology]

[0002] Distance measuring devices that measure the distance to a subject have been proposed (see, for example, Patent Document 1). This distance measuring device includes a light source and an imaging unit. The light source irradiates light onto the subject. The imaging unit captures the light reflected by the subject. The distance measuring device then measures the distance to the subject by converting each pixel value of the image obtained by the imaging into the distance to the subject. In other words, the distance measuring device acquires the depth of the image obtained by the imaging unit. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2011-64498 Summary of the Invention [Problem to be solved by the invention]

[0004] However, the distance measuring device of Patent Document 1 has a problem in that it is not possible to accurately obtain the depth of an image.

[0005] Therefore, the present disclosure provides a depth acquisition device that can accurately acquire the depth of an image. [Means for solving the problem]

[0006] An imaging device according to one aspect of the present disclosure includes a light source that irradiates an object with irradiation light; a solid-state imaging element that performs a first image of the object and a second image using light reflected by the object from the irradiation light; a flare detection unit that detects a flare area using object information about the object output by the solid-state imaging element; and an output unit that generates and outputs output information according to the detected flare area. The first and second images are taken from substantially the same viewpoint. do.

[0007] A depth acquisition device according to one aspect of the present disclosure includes a memory and a processor, wherein the processor acquires timing information indicating a timing at which a light source irradiates a subject with infrared light, acquires an infrared image obtained by imaging, based on infrared light, of a scene including the subject in accordance with the timing indicated by the timing information and stored in the memory, acquires a visible light image obtained by imaging, based on visible light, of a scene substantially identical to the infrared image, from substantially the same viewpoint and at substantially the same imaging time as the infrared image and stored in the memory, detects a flare region from the infrared image, and estimates a depth of the flare region based on the infrared image, the visible light image, and the flare region.

[0008] These comprehensive or specific aspects may be realized as a system, a method, an integrated circuit, a computer program, or a computer-readable recording medium such as a CD-ROM, or may be realized as any combination of the system, the method, the integrated circuit, the computer program, and the recording medium. The recording medium may also be a non-transitory recording medium. [Effects of the Invention]

[0009] The depth acquisition device of the present disclosure can accurately acquire the depth of an image. Further advantages and effects of one aspect of the present disclosure will become apparent from the specification and drawings. Such advantages and / or effects are provided by some embodiments and features described in the specification and drawings, but not all of them are necessarily provided to obtain one or more identical features. [Brief explanation of the drawings]

[0010] [Figure 1] FIG. 1 is a block diagram showing a hardware configuration of a depth acquisition device according to an embodiment. [Figure 2] FIG. 2 is a schematic diagram showing a pixel array of the solid-state imaging device according to the embodiment. [Figure 3] FIG. 3 is a timing chart showing the relationship between the light emission timing of the light emitting element of the light source and the exposure timing of the first pixel of the solid-state imaging device in the embodiment. [Figure 4] FIG. 4 is a block diagram illustrating an example of a functional configuration of the depth acquisition device according to the embodiment. [Figure 5] FIG. 5 is a block diagram illustrating another example of the functional configuration of the depth acquisition device according to the embodiment. [Figure 6] FIG. 6 is a flowchart showing the overall processing operation of the depth acquisition device according to the embodiment. [Figure 7] FIG. 7 is a flowchart showing the overall processing operation by the processor of the depth acquisition device according to the embodiment. [Figure 8] FIG. 8 is a block diagram showing a specific functional configuration of a processor of the depth acquisition device according to the embodiment. [Figure 9A] FIG. 9A is a diagram showing an example of an IR image. [Figure 9B] FIG. 9B is a diagram showing an example of a BW image. [Figure 10] FIG. 10 is a diagram showing an example of a binarized image obtained by binarizing an IR image. [Figure 11] FIG. 11 is a diagram showing an example of a high-brightness area in an IR image. [Figure 12] FIG. 12 is a diagram showing an area of ​​a BW image corresponding to a high-brightness area of ​​an IR image. [Figure 13] FIG. 13 is a diagram showing an example of a flare region detected from an IR image. [Figure 14]FIG. 14 is a diagram showing a simulation result of the depth acquisition device according to the embodiment. [Figure 15] FIG. 15 is a flowchart showing the overall processing operation of the depth acquisition device shown in FIG. [Figure 16] FIG. 16 is a flowchart showing the detailed processing of steps S31 to S34 in FIG. [Figure 17] FIG. 17 is a flowchart showing an example of processing instead of steps S31 to S34 in FIG. [Figure 18] FIG. 18 is a flowchart showing another example of processing instead of steps S31 to S34 in FIG. [Figure 19] FIG. 19 is a flowchart showing another example of processing instead of steps S31 to S34 in FIG. [Figure 20] FIG. 20 is a block diagram illustrating an example of a functional configuration of a depth acquisition device according to the first modification of the embodiment. [Figure 21] FIG. 21 is a block diagram showing another example of the functional configuration of the depth acquisition device according to the first modification of the embodiment. [Figure 22] FIG. 22 is a flowchart showing the processing operation of the flare detection unit in the second modification of the embodiment. [Figure 23] FIG. 23 is a flowchart showing the overall processing operation of the depth acquisition device according to the third modification of the embodiment. [Figure 24] FIG. 24 is a flowchart showing the detailed processing of steps S31a to S34a in FIG. [Figure 25] FIG. 25 is a flowchart showing an example of processing instead of steps S31a to S34a in FIG. [Figure 26] FIG. 26 is a flowchart showing another example of processing instead of steps S31a to S34a in FIG. DETAILED DESCRIPTION OF THE INVENTION

[0011] (Findings that formed the basis of this disclosure) The present inventors have found that the distance measuring device of Patent Document 1, described in the "Background Art" section, has the following problems.

[0012] As described above, the distance measuring device of Patent Document 1 irradiates a subject with light from a light source, captures an image of the illuminated subject, and measures the depth of the image. This depth measurement uses TOF (Time Of Flight). In this type of distance measuring device, imaging is performed under different imaging conditions to improve distance measurement accuracy. That is, the distance measuring device captures an image under predetermined imaging conditions, and then sets imaging conditions different from the predetermined imaging conditions depending on the imaging results. The distance measuring device then captures an image again under the set imaging conditions.

[0013] However, images obtained by capturing images may have flare, ghosting, brightness saturation, or the like. It is not possible to accurately measure depth from only an image in which flare or the like occurs. Even if the capturing conditions are changed, it may be difficult to easily suppress the occurrence of flare or the like. Furthermore, for example, if a range finder mounted on a vehicle repeatedly captures images under different capturing conditions while the vehicle is traveling, the viewpoint positions of the repeated captures will be different, resulting in different scenes in the multiple images obtained. In other words, it is not possible to repeatedly capture the same scene, and it is therefore not possible to properly estimate the depth of the image in which the scene is displayed, particularly the depth of an area in which flare or the like occurs.

[0014] In order to solve such problems, a depth acquisition device according to one aspect of the present disclosure includes a memory and a processor, wherein the processor acquires timing information indicating a timing at which a light source irradiates a subject with infrared light, acquires an infrared image obtained by infrared-light-based imaging of a scene including the subject according to the timing indicated by the timing information and stored in the memory, acquires a visible light image of substantially the same scene as the infrared image, obtained by visible-light-based imaging from substantially the same viewpoint and at substantially the same imaging time as the infrared image and stored in the memory, detects a flare region from the infrared image, and estimates a depth of the flare region based on the infrared image, the visible light image, and the flare region. Note that the flare region is a region where flare, ghosting, luminance saturation, or smear occurs.

[0015] As a result, a flare region is detected from the infrared image, and the depth of the flare region is estimated based on not only the infrared image but also the visible light image, thereby enabling the depth of the flare region to be appropriately acquired. That is, the infrared image and the visible light image capture substantially the same scene, and the viewpoint and imaging time are also substantially the same. Here, an example of an image of substantially the same scene captured at substantially the same viewpoint and imaging time is an image captured using different pixels of the same image sensor. Such an image is similar to the red, green, and blue channel images of a color image captured using a Bayer array color filter, and the angle of view, viewpoint, and imaging time of each image are approximately the same. That is, in images of substantially the same scene captured at substantially the same viewpoint and imaging time, the position of the subject on the image does not differ by more than two pixels in each captured image. For example, if a point light source having visible light and infrared components exists in the scene and only one pixel is captured with high brightness in the visible light image, the point light source will also be captured in the infrared image closer than two pixels to the pixel position captured in the visible light image. Furthermore, "substantially the same imaging time" means that the difference in imaging time is equal to or less than one frame. Therefore, there is a high correlation between the infrared image and the visible light image. Furthermore, since flare is a wavelength-dependent phenomenon, even if flare occurs in the infrared image, there is a high possibility that flare does not occur in the visible light image. Therefore, information missing in the flare region can be compensated for from the region in the visible light image corresponding to the flare region (i.e., the corresponding region). As a result, the depth of the flare region can be appropriately acquired.

[0016] For example, in estimating the depth of the flare region, the processor may estimate first depth information indicating the depth at each position in the infrared image, correct the depth at each position in the flare region indicated by the first depth information based on the visible light image, thereby estimating second depth information indicating the corrected depth at each position in the flare region, and further generate third depth information indicating the depth at each position outside the flare region of the infrared image indicated by the first depth information and the depth at each position within the flare region of the infrared image indicated by the second depth information. Note that, in estimating the first depth information, TOF or the like may be applied to the infrared image.

[0017] As a result, the third depth information indicates a depth obtained from the infrared image as a depth outside the flare region of the infrared image, and indicates a depth obtained from the infrared image and corrected based on the visible light image as a depth in the flare region of the infrared image. Therefore, even if the infrared image has a flare region, the overall depth of the infrared image can be appropriately estimated.

[0018] In addition, in detecting the flare region, the processor may detect a region in the infrared image having a brightness equal to or greater than a first threshold as the flare region.

[0019] Since the brightness within the flare region tends to be higher than the brightness outside the flare region, the flare region can be appropriately detected by detecting a region in the infrared image that has a brightness equal to or greater than a first threshold as the flare region.

[0020] In detecting the flare region, the processor may detect, as the flare region, a region in the infrared image that has a brightness equal to or greater than a first threshold and satisfies a predetermined condition, wherein the predetermined condition is a condition in which a correlation value between an image feature in a region of the infrared image and an image feature in a region of the visible light image corresponding to the region is less than a second threshold. For example, the image feature in each region of the infrared image and the visible light image may be an edge included in the image in the region. Alternatively, the image feature in each region of the infrared image and the visible light image may be the brightness in the region.

[0021] Since there tends to be a low correlation between image features in a flare region of an infrared image and image features in a region of the visible light image corresponding to that flare region, it is possible to more appropriately detect a flare region by detecting a region in the infrared image that has high brightness and low correlation between the image features as a flare region.

[0022] In addition, in detecting the flare region, the processor may (i) obtain a first converted image by performing a CENSUS transform on an image within at least one high-brightness region in the infrared image having a brightness equal to or greater than a first threshold, and (ii) obtain a second converted image by performing a CENSUS transform on an image within a region of the visible light image corresponding to the high-brightness region, and detect, among the at least one high-brightness region, a high-brightness region in which the Hamming distance between the first converted image and the second converted image exceeds a third threshold as the flare region.

[0023] This allows the flare region to be detected appropriately.

[0024] In addition, when estimating the depth of the flare region, the processor may estimate depth information indicating the depth at each position within the infrared image, and correct the depth at each position within the flare region indicated by the depth information by inputting the infrared image, the visible light image, the flare region, and the depth information into a learning model.

[0025] Thus, if the learning model is trained in advance so that the correct depth at each position within the flare region is output in response to input of an infrared image, a visible light image, a flare region, and depth information, the depth information estimated from the infrared image can be appropriately corrected. In other words, the depth at each position within the flare region indicated by the depth information can be appropriately corrected.

[0026] In addition, a depth acquisition device according to another aspect of the present disclosure may include a memory and a processor, wherein the processor acquires timing information indicating when a light source irradiates a subject with infrared light, acquires an infrared image obtained by infrared light-based imaging of a scene including the subject according to the timing indicated by the timing information and stored in the memory, acquires a visible light image of substantially the same scene as the infrared image, obtained by visible light-based imaging from substantially the same viewpoint and at substantially the same imaging time as the infrared image and stored in the memory, estimates depth information indicating the depth at each position within the infrared image, and corrects the depth at each position within a flare region of the infrared image indicated by the depth information by inputting the infrared image, the visible light image, and the depth information into a learning model.

[0027] Thus, if the learning model is trained in advance so that the correct depth at each position within the flare region of the infrared image is output in response to input of an infrared image, a visible light image, and depth information, the depth information estimated from the infrared image can be appropriately corrected. In other words, the depth at each position within the flare region indicated by the depth information can be appropriately corrected without detecting the flare region.

[0028] According to another aspect of the present disclosure, there is provided a depth acquisition device including a memory and a processor, the processor acquiring an infrared image stored in the memory, the infrared image being obtained by imaging using infrared light, and acquiring a visible light image stored in the memory, the visible light image being obtained by imaging using visible light from substantially the same viewpoint and at the same time as the infrared image, detecting a region in which a flare is displayed as a flare region from the infrared image, and estimating a depth of the flare region based on the flare region. Furthermore, when the visible light image and the infrared image are each divided into a flare region and other regions, the depth of the flare region is estimated based on the visible light image, and the depth of the other regions is estimated based on the infrared image.

[0029] This makes it possible to appropriately acquire the depth of the flare region, similar to the depth acquisition device according to the above aspect of the present disclosure.

[0030] These comprehensive or specific aspects may be realized as a system, a method, an integrated circuit, a computer program, or a computer-readable recording medium such as a CD-ROM, or may be realized as any combination of the system, the method, the integrated circuit, the computer program, or the recording medium. The recording medium may also be a non-transitory recording medium.

[0031] Hereinafter, the embodiments will be specifically described with reference to the drawings.

[0032] The embodiments described below are all comprehensive or specific examples. The numerical values, shapes, materials, components, component placement and connection configurations, steps, and step order shown in the following embodiments are merely examples and are not intended to limit the present disclosure. Furthermore, among the components in the following embodiments, components that are not described in the independent claims that represent the highest concepts are described as optional components.

[0033] In addition, each drawing is a schematic diagram and is not necessarily an exact illustration. In addition, the same components are denoted by the same reference numerals in each drawing.

[0034] (Embodiment) [Hardware configuration] 1 is a block diagram showing the hardware configuration of a depth acquisition device 1 according to an embodiment. The depth acquisition device 1 according to this embodiment has a hardware configuration that can acquire an image based on infrared light (or near-infrared light) and an image based on visible light by capturing images of substantially the same scene from substantially the same viewpoint and at substantially the same capturing time. Note that "substantially the same" means that the images are identical to the extent that the effects of the present disclosure can be achieved.

[0035] As shown in FIG. 1, the depth acquisition device 1 includes a light source 10, a solid-state image sensor 20, a processing circuit 30, a diffuser 50, a lens 60, and a band-pass filter .

[0036] The light source 10 emits illumination light. More specifically, the light source 10 emits illumination light to illuminate the subject at the timing indicated by the light emission signal generated by the processing circuit 30.

[0037] The light source 10 includes, for example, a capacitor, a drive circuit, and a light-emitting element, and emits light by driving the light-emitting element with electrical energy stored in the capacitor. The light-emitting element is realized by, for example, a laser diode, a light-emitting diode, etc. The light source 10 may include one type of light-emitting element, or may include multiple types of light-emitting elements depending on the purpose.

[0038] In the following description, the light-emitting element is, for example, a laser diode that emits near-infrared light, or a light-emitting diode that emits near-infrared light. However, the light emitted by light source 10 does not need to be limited to near-infrared light. The light emitted by light source 10 may be, for example, infrared light (also referred to as infrared light) in a frequency band other than near-infrared light. In the following description of the present embodiment, the light emitted by light source 10 is described as infrared light, but the infrared light may be near-infrared light or infrared light in a frequency band other than near-infrared light.

[0039] The solid-state imaging element 20 captures an image of a subject and outputs an imaging signal indicating the amount of exposure. More specifically, the solid-state imaging element 20 performs exposure at the timing indicated by the exposure signal generated by the processing circuit 30, and outputs an imaging signal indicating the amount of exposure.

[0040] The solid-state imaging element 20 has a pixel array in which first pixels that capture an image using light reflected from a subject and second pixels that capture an image of the subject are arranged in an array. The solid-state imaging element 20 may have logic functions such as a cover glass, an AD converter, etc., as necessary.

[0041] In the following description, the reflected light is assumed to be infrared light, just like the irradiated light. However, the reflected light does not have to be limited to infrared light, as long as it is light that is irradiated light reflected by the subject.

[0042] FIG. 2 is a schematic diagram showing a pixel array 2 included in the solid-state imaging device 20. As shown in FIG.

[0043] As shown in Figure 2, the pixel array 2 is configured in such a way that first pixels 21 (IR pixels) that capture images using light reflected from a subject when irradiated light is reflected, and second pixels 22 (BW pixels) that capture images of the subject are arranged in an array, alternating in columns.

[0044] 2, in the pixel array 2, the second pixels 22 and the first pixels 21 are arranged adjacent to each other in the row direction and arranged in stripes in the row direction, but this is not limited thereto and the pixels may be arranged every several rows (for example, every two rows). That is, the first rows in which the second pixels 22 are arranged adjacent to each other in the row direction and the second rows in which the first pixels 21 are arranged adjacent to each other in the row direction may be arranged alternately every M rows (M is a natural number). Furthermore, the first rows in which the second pixels 22 are arranged adjacent to each other in the row direction and the second rows in which the first pixels 21 are arranged adjacent to each other in the row direction may be arranged at different intervals (the first rows alternate every N rows and the second rows alternate every L rows (N and L are different natural numbers)).

[0045] The first pixel 21 is realized by, for example, an infrared pixel having sensitivity to infrared light, which is reflected light, and the second pixel 22 is realized by, for example, a visible pixel having sensitivity to visible light.

[0046] The infrared light pixel includes, for example, an optical filter (also referred to as an IR filter) that transmits only infrared light, a microlens, a light receiving element as a photoelectric conversion unit, and an accumulation unit that accumulates electric charges generated by the light receiving element. Therefore, an image indicating the luminance of infrared light is expressed by imaging signals output from the multiple infrared light pixels (i.e., first pixels 21) included in the pixel array 2. Hereinafter, this infrared light image will also be referred to as an IR image or an infrared image.

[0047] The visible light pixel includes, for example, an optical filter (also called a BW filter) that transmits only visible light, a microlens, a light receiving element as a photoelectric conversion unit, and an accumulation unit that accumulates the electric charge converted by the light receiving element. Therefore, the visible light pixel, i.e., the second pixel 22, outputs an image signal indicating the luminance and color difference. That is, a color image indicating the luminance and color difference of visible light is expressed by the image signal output from the plurality of second pixels 22 included in the pixel array 2. The optical filter of the visible light pixel may transmit both visible light and infrared light, or may transmit only light of a specific wavelength band, such as red (R), green (G), or blue (B), of visible light.

[0048] Alternatively, the visible light pixels may detect only the luminance of visible light. In this case, the visible light pixels, i.e., the second pixels 22, output imaging signals indicating the luminance. Therefore, imaging signals output from the second pixels 22 included in the pixel array 2 represent a black and white image indicating the luminance of visible light, in other words, a monochrome image. This monochrome image will hereinafter also be referred to as a BW image. The above-mentioned color image and BW image will also be collectively referred to as a visible light image.

[0049] Returning to FIG. 1 again, the description of the depth acquisition device 1 will continue.

[0050] The processing circuit 30 uses the imaging signal output by the solid-state imaging device 20 to calculate subject information relating to the subject.

[0051] The processing circuit 30 is configured, for example, by an arithmetic processing device such as a microcomputer. The microcomputer includes a processor (microprocessor), memory, etc., and generates a light emission signal and an exposure signal by executing a driving program stored in the memory by the processor. The processing circuit 30 may use an FPGA or an ISP, etc., and may be configured by one piece of hardware or by multiple pieces of hardware.

[0052] The processing circuit 30 calculates the distance to the subject by, for example, a TOF distance measurement method using an imaging signal from the first pixel 21 of the solid-state imaging device 20.

[0053] Hereinafter, calculation of the distance to the subject by the TOF distance measurement method performed by the processing circuit 30 will be described with reference to the drawings.

[0054] Figure 3 is a timing diagram showing the relationship between the light emission timing of the light-emitting element of the light source 10 and the exposure timing of the first pixel 21 of the solid-state imaging element 20 when the processing circuit 30 calculates the distance to the subject using the TOF ranging method.

[0055] 3, Tp is the light emission period during which the light emitting element of the light source 10 emits irradiation light, and Td is the delay time from when the light emitting element of the light source 10 emits irradiation light until the reflected light of the irradiation light reflected by the subject returns to the solid-state imaging element 20. The first exposure period has the same timing as the light emission period during which the light source 10 emits irradiation light, and the second exposure period has the timing from the end of the first exposure period until the light emission period Tp has elapsed.

[0056] In Figure 3, q1 indicates the total amount of exposure at the first pixel 21 of the solid-state imaging element 20 due to reflected light during the first exposure period, and q2 indicates the total amount of exposure at the first pixel 21 of the solid-state imaging element 20 due to reflected light during the second exposure period.

[0057] By emitting light from the light-emitting element of the light source 10 and exposing the first pixel 21 of the solid-state imaging element 20 at the timing shown in Figure 3, the distance d to the subject can be expressed by the following (Equation 1), where c is the speed of light.

[0058] d=c×Tp / 2×q2 / (q1+q2) (Formula 1)

[0059] Therefore, by using (Equation 1), the processing circuit 30 can calculate the distance to the subject using the imaging signal from the first pixel 21 of the solid-state imaging device 20.

[0060] Furthermore, the first pixels 21 of the solid-state imaging device 20 may be exposed for only a third exposure period Tp after the first and second exposure periods have ended. The first pixels 21 can detect noise other than reflected light using the exposure amount obtained during this third exposure period Tp. In other words, the processing circuit 30 can more accurately calculate the distance d to the subject by removing noise from the exposure amount q1 of the first exposure period and the exposure amount q2 of the second exposure period in the above (Equation 1).

[0061] Returning to FIG. 1 again, the description of the depth acquisition device 1 will continue.

[0062] The processing circuit 30 may use, for example, an imaging signal from the second pixel 22 of the solid-state imaging device 20 to detect the subject and calculate the distance to the subject.

[0063] That is, the processing circuit 30 may detect the subject and calculate the distance to the subject based on the visible light image captured by the plurality of second pixels 22 of the solid-state imaging device 20. Here, the subject may be detected, for example, by pattern recognition based on edge detection of the subject's singular points to determine its shape, or by processing such as deep learning using a pre-trained learning model. Furthermore, the distance to the subject may be calculated using world coordinate transformation. Of course, the subject may be detected by multimodal learning processing using not only the visible light image but also the luminance and distance information of infrared light captured by the first pixels 21.

[0064] The processing circuit 30 generates a light emission signal indicating the timing of light emission and an exposure signal indicating the timing of exposure, and outputs the generated light emission signal to the light source 10 and the generated exposure signal to the solid-state imaging element 20.

[0065] The processing circuit 30 may, for example, generate and output a light emission signal to cause the light source 10 to emit light at a predetermined cycle, and generate and output an exposure signal to cause the solid-state imaging element 20 to expose at a predetermined cycle, thereby enabling the depth acquisition device 1 to perform continuous imaging at a predetermined frame rate. The processing circuit 30 may also include, for example, a processor (microprocessor), memory, etc., and generate the light emission signal and the exposure signal by the processor executing a driving program stored in the memory.

[0066] The diffuser 50 adjusts the intensity distribution and angle of the irradiated light. In adjusting the intensity distribution, the diffuser 50 makes the intensity distribution of the irradiated light from the light source 10 uniform. In the example shown in FIG. 1, the depth acquisition device 1 includes the diffuser 50, but the diffuser 50 may not be included.

[0067] The lens 60 is an optical lens that focuses light entering from outside the depth acquisition device 1 onto the surface of the pixel array 2 of the solid-state imaging element 20.

[0068] The bandpass filter 70 is an optical filter that transmits infrared light, which is reflected light, and visible light. In the example shown in Fig. 1, the depth acquisition device 1 includes the bandpass filter 70, but the bandpass filter 70 may not be included.

[0069] The depth acquisition device 1 having the above configuration is mounted on transportation equipment for use. For example, the depth acquisition device 1 is mounted on a vehicle that travels on a road surface for use. Note that the transportation equipment on which the depth acquisition device 1 is mounted does not necessarily have to be limited to a vehicle. The depth acquisition device 1 may also be mounted on transportation equipment other than a vehicle, such as a motorcycle, a boat, or an airplane for use.

[0070] [Depth acquisition device overview] 1, the depth acquisition device 1 of this embodiment acquires an IR image and a BW image by capturing images of substantially the same scene from substantially the same viewpoint and at the same time. The depth acquisition device 1 then corrects the depth at each position in the IR image obtained from the IR image using the BW image. Specifically, if the IR image contains a flare region (described later), the depth acquisition device 1 corrects the depth at each position in the flare region obtained from the IR image using an image in the region of the BW image corresponding to the flare region.

[0071] FIG. 4 is a block diagram showing an example of the functional configuration of the depth acquisition device 1. As shown in FIG.

[0072] The depth acquisition device 1 includes a light source 101, an IR camera 102, a BW camera 103, a depth estimation unit 111, and a flare detection unit 112.

[0073] The light source 101 may be composed of the light source 10 and the diffusion plate 50 shown in FIG.

[0074] 1, a lens 60, and a band-pass filter 70. Such an IR camera 102 captures an IR image by capturing an image of a scene including a subject based on infrared light in accordance with the timing at which a light source 101 irradiates the subject with infrared light.

[0075] The BW camera 103 may be composed of a plurality of second pixels 22 of the solid-state imaging element 20 shown in Fig. 1, a lens 60, and a band-pass filter 70. Such a BW camera 103 captures an image based on visible light of a scene that is substantially the same as the infrared image, from substantially the same viewpoint and at the same time as the infrared image, thereby acquiring a visible light image (specifically, a BW image).

[0076] The depth estimation unit 111 and the flare detection unit 112 may be realized as a function of the processing circuitry 30 shown in FIG.

[0077] The flare detection unit 112 detects a flare region from the IR image based on the IR image obtained by imaging with the IR camera 102 and the BW image obtained by imaging with the BW camera 103 .

[0078] In this embodiment, a flare region is a region where flare, ghost, brightness saturation, or smear occurs. Flare is a light fogging phenomenon that occurs when harmful light is reflected on the lens surface or lens barrel when the lens of the IR camera 102 is pointed toward a strong light source. Flare also makes the image whitish and reduces sharpness. Ghost is a type of flare, in which light that has been repeatedly reflected in complex ways on the lens surface is clearly captured as an image. Smear is a phenomenon in which linear white areas appear when a subject that is brighter than the surrounding area is photographed with a camera by a camera.

[0079] In the present disclosure, a phenomenon including at least one of flare, ghost, saturation of brightness, and smear is referred to as flare or the like.

[0080] The depth estimation unit 111 estimates the depth at each position in the IR image including the flare region detected by the flare detection unit 112. Specifically, the depth estimation unit 111 acquires an IR image captured by the IR camera 102 in accordance with the timing at which the light source 101 irradiates the subject with infrared light, and estimates the depth at each position in the IR image based on the IR image. Furthermore, the depth estimation unit 111 corrects the depth at each position estimated in the flare region detected by the flare detection unit 112 based on the BW image. That is, the depth estimation unit 111 estimates the depth of the flare region based on the IR image, the BW image, and the flare region.

[0081] FIG. 5 is a block diagram showing another example of the functional configuration of the depth acquisition device 1. As shown in FIG.

[0082] The depth acquisition device 1 may include a memory 200 and a processor 110.

[0083] 5, processor 110 may include not only depth estimation unit 111 and flare detection unit 112, but also light emission timing acquisition unit 113, IR image acquisition unit 114, and BW image acquisition unit 115. These components are realized as functions of processor 110.

[0084] The light emission timing acquisition unit 113 acquires timing information indicating the timing at which the light source 101 irradiates the subject with infrared light. That is, the light emission timing acquisition unit 113 outputs the light emission signal shown in Fig. 1 to the light source 101, thereby acquiring information indicating the output timing as the timing information described above.

[0085] The IR image acquisition unit 114 acquires an IR image that is obtained by capturing an image of a scene including a subject based on infrared light in accordance with the timing indicated by the timing information and that is stored in the memory 200 .

[0086] The BW image acquisition unit 115 acquires a BW image that is captured based on visible light of a scene that is substantially the same as the above-mentioned IR image, and that is obtained by capturing an image from substantially the same viewpoint and at the same time as the IR image, and that is stored in the memory 200.

[0087] As described above, the flare detection unit 112 detects a flare region from the IR image, and the depth estimation unit 111 estimates the depth based on the IR image, the BW image, and the flare region.

[0088] The depth acquisition device 1 in this embodiment may be configured with the processor 110 and the memory 200 without including the light source 101, the IR camera 102, and the BW camera 103.

[0089] FIG. 6 is a flowchart showing the overall processing operation of the depth acquisition device 1.

[0090] (Step S11) First, the light source 101 emits light to irradiate the subject with infrared light.

[0091] (Step S12) Next, the IR camera 102 acquires an IR image. That is, the IR camera 102 captures an image of a scene including an object illuminated with infrared light by the light source 101. As a result, the IR camera 102 acquires an IR image based on the infrared light reflected from the object. Specifically, the IR camera 102 acquires an IR image obtained by the respective timings and exposure amounts of the first exposure period, the second exposure period, and the third exposure period shown in FIG. 3 .

[0092] (Step S13) Next, the BW camera 103 acquires a BW image. That is, the BW camera 103 acquires a BW image corresponding to the IR image acquired in step S12, that is, a BW image of the same scene and the same viewpoint as the IR image.

[0093] (Step S14) Then, the flare detection unit 112 detects a flare region from the IR image acquired in step S12.

[0094] (Step S15) Next, the depth estimation unit 111 estimates the depth of the flare region based on the IR image acquired in step S12, the BW image acquired in step S13, and the flare region detected in step S14.

[0095] FIG. 7 is a flowchart showing the overall processing operation by the processor 110 of the depth acquisition device 1.

[0096] (Step S21) First, light emission timing acquisition unit 113 of processor 110 acquires timing information indicating the timing at which light source 101 irradiates the subject with infrared light.

[0097] (Step S22) Next, the IR image acquisition unit 114 acquires an IR image from the IR camera 102 that captured an image at the timing indicated by the timing information acquired in step S21. For example, the IR image acquisition unit 114 outputs an exposure signal to the IR camera 102 at the timing when the light emission timing acquisition unit 113 outputs the light emission signal shown in FIG. 1 . This causes the IR image acquisition unit 114 to start capturing an image in the IR camera 102, and acquires an IR image obtained by the capturing from the IR camera 102. At this time, the IR image acquisition unit 114 may acquire the IR image from the IR camera 102 via the memory 200, or may acquire the IR image directly from the IR camera 102.

[0098] (Step S23) Next, the BW image acquisition unit 115 acquires a BW image corresponding to the IR image acquired in step S22 from the BW camera 103. At this time, the BW image acquisition unit 115 may acquire the BW image from the BW camera 103 via the memory 200, or may acquire the BW image directly from the BW camera 103.

[0099] (Step S24) Then, the flare detection unit 112 detects a flare region from the IR image.

[0100] (Step S25) Next, the depth estimation unit 111 estimates the depth of the flare region based on the IR image acquired in step S22, the BW image acquired in step S23, and the flare region detected in step S24. This allows depth information indicating at least the depth of the flare region to be calculated. Note that at this time, the depth estimation unit 111 may estimate the depth of the entire IR image, not just the flare region, and calculate depth information indicating the estimation result.

[0101] Specifically, the depth estimation unit 111 in this embodiment estimates the depth at each position in the IR image acquired in step S22. Then, the depth estimation unit 111 corrects the depth at each position in the flare region using the BW image. Note that each position may be the position of each of a plurality of pixels or the position of a block consisting of a plurality of pixels.

[0102] In the depth acquisition device 1 according to this embodiment, a flare region is detected from an IR image, and the depth of the flare region is estimated based on not only the IR image but also the BW image, thereby enabling appropriate acquisition of the depth of the flare region. In other words, the IR image and the BW image capture substantially the same scene, and the viewpoint and capture time are also substantially the same. Therefore, the IR image and the BW image have a high correlation. Furthermore, since flare is a wavelength-dependent phenomenon, even if a flare or the like occurs in the IR image, it is highly likely that the flare or the like does not occur in the BW image. Therefore, missing information in the flare region can be compensated for from the region in the BW image corresponding to the flare region (i.e., the corresponding region). As a result, the depth of the flare region can be appropriately acquired.

[0103] [Specific functional configuration of the depth acquisition device] FIG. 8 is a block diagram showing a specific functional configuration of the processor 110 of the depth acquisition device 1. As shown in FIG.

[0104] Processor 110 includes first depth estimation unit 111a, second depth estimation unit 111b, flare detection unit 112, high-brightness region detection unit 116, first edge detection unit 117IR, second edge detection unit 117BW, and output unit 118. Note that first depth estimation unit 111a and second depth estimation unit 111b correspond to depth estimation unit 111 shown in FIG. 5. Processor 110 may also include light emission timing acquisition unit 113, IR image acquisition unit 114, and BW image acquisition unit 115 described above.

[0105] The high-brightness region detection unit 116 detects regions in the IR image that have a brightness equal to or greater than a first threshold as high-brightness regions. The first edge detection unit 117IR detects edges in the IR image. The second edge detection unit 117BW detects edges in the BW image.

[0106] The flare detection unit 112 compares, for each of at least one high-brightness region in the IR image, an edge detected for that high-brightness region with an edge detected for a region in the BW image corresponding to that high-brightness region. Through this comparison, the flare detection unit 112 determines whether the high-brightness region is a flare region. That is, through this determination, a flare region is detected. In other words, the flare detection unit 112 divides the captured IR image into regions, namely, a flare region and a non-flare region.

[0107] Here, flare and the like are phenomena that depend on the wavelength of light. Therefore, flare and the like that occurs in an IR image often do not occur in a BW image. It is known that IR images and BW images generally have a strong correlation. However, when a flare or the like occurs in an IR image, the edges of the IR image are crushed, and the correlation value between the edge of the area where the flare or the like occurs and the edge of the area in the BW image that corresponds to that area becomes low. Furthermore, when a flare or the like occurs, the brightness of the area where the flare or the like occurs increases. Therefore, the flare detection unit 112 in this embodiment utilizes this relationship to identify a flare area from a captured IR image.

[0108] That is, the flare detection unit 112 in this embodiment detects, as a flare region, a region in the IR image that has a brightness equal to or greater than a first threshold and satisfies a predetermined condition. The predetermined condition is that a correlation value between an image feature amount in a region of the IR image and an image feature amount in a region of the BW image corresponding to that region is less than a second threshold. Here, the image feature amount in each region of the IR image and the BW image is an edge included in the image in that region. Note that the region of the BW image corresponding to the region of the IR image is a region that is spatially located at the same position as the region of the IR image and has the same shape and size as the region of the IR image.

[0109] As described above, there tends to be a low correlation between the image feature amounts in a flare region of an IR image and the image feature amounts in a region of the BW image corresponding to that flare region. Therefore, in this embodiment, a region in the IR image that has high brightness and low correlation between the image feature amounts is detected as a flare region, thereby making it possible to more appropriately detect the flare region.

[0110] The first depth estimation section 111a and the second depth estimation section 111b have the function of the depth estimation section 111 described above.

[0111] The first depth estimation unit 111a estimates the depth at each position in the IR image based on the IR image acquired in accordance with the timing of irradiation of infrared light by the light source 101. The first depth estimation unit 111a outputs information indicating the estimated depth at each position in the IR image as first depth information. In other words, the first depth estimation unit 111a estimates the first depth information indicating the depth at each position in the IR image.

[0112] The second depth estimation unit 111b corrects the first depth information based on the BW image and the flare region in the IR image. As a result, the depth of the flare region, among the depths at each position in the IR image indicated by the first depth information, is corrected. The second depth estimation unit 111b outputs information indicating the corrected depth at each position in the flare region as second depth information. In other words, the second depth estimation unit 111b estimates second depth information indicating the corrected depth at each position in the flare region by correcting the depth at each position in the flare region indicated by the first depth information based on the BW image.

[0113] The output unit 118 replaces the depth at each position within the flare region indicated by the first depth information with the corrected depth at each position within the flare region indicated by the second depth information. This generates third depth information including the depth at each position outside the flare region of the IR image indicated by the first depth information and the corrected depth at each position within the flare region of the IR image indicated by the second depth information. The output unit 118 outputs the third depth information.

[0114] As a result, the third depth information indicates a depth obtained from the IR image as a depth outside the flare region of the IR image, and indicates a depth obtained from the IR image and corrected based on the BW image as a depth in the flare region of the IR image. Therefore, in this embodiment, even if the IR image has a flare region, the overall depth of the IR image can be appropriately estimated.

[0115] Figure 9A shows an example of an IR image, and Figure 9B shows an example of a BW image.

[0116] As shown in Figure 9B, the BW image shows a scene in which a signboard is placed on a road. The signboard contains, for example, a material that easily reflects infrared light. When the IR camera 102 captures the same scene as shown in Figure 9B from the same viewpoint as the BW camera 103, the IR image shown in Figure 9A is acquired.

[0117] As shown in FIG. 9A , the IR image acquired as described above exhibits a high-intensity flare in a region including an area corresponding to the signboard in the BW image. This occurs because infrared light from the light source 101 is specularly reflected by the road signboard, resulting in high-intensity infrared light entering the IR camera 102 as reflected light. Materials that easily reflect infrared light are often used for clothing worn by construction workers or for poles erected along roads. Therefore, when a scene including a subject made of such materials is captured, flare and other issues are likely to occur in the IR image. However, flare and other issues are unlikely to occur in the BW image. As a result, the correlation between the image feature values ​​of the flare region in the IR image and the image feature values ​​of the region in the BW image corresponding to the flare region is low. On the other hand, the correlation between the image feature values ​​of the region other than the flare region in the IR image (i.e., the non-flare region) and the image feature values ​​of the region in the BW image corresponding to the non-flare region is high.

[0118] FIG. 10 shows an example of a binarized image obtained by binarizing an IR image.

[0119] The high-brightness region detection unit 116 detects regions having a brightness equal to or greater than a first threshold as high-brightness regions in the IR image shown in Fig. 9A. That is, the high-brightness region detection unit 116 binarizes the brightness at each position (i.e., each pixel) in the IR image. As a result, for example, as shown in Fig. 10, a binarized image consisting of white regions and black regions (hatched regions in Fig. 10) is generated.

[0120] FIG. 11 shows an example of a high brightness region in an IR image.

[0121] The high-brightness region detection unit 116 detects white regions in the binarized image as high-brightness regions. For example, as shown in Fig. 11, if the binarized image contains six white regions, the high-brightness region detection unit 116 detects the six white regions as high-brightness regions A to F. In other words, the IR image or the binarized image is divided into six high-brightness regions A to F and non-high-brightness regions that are not high-brightness regions.

[0122] FIG. 12 shows the areas of the BW image that correspond to the high brightness areas of the IR image.

[0123] For each of at least one high-brightness region in the binarized image (i.e., IR image), the flare detection unit 112 identifies an image feature of a region in the BW image corresponding to the high-brightness region. The image feature may be, for example, an edge. The region in the BW image corresponding to the high-brightness region is located at the same spatial position as the high-brightness region in the binarized image or IR image and has the same shape and size as the high-brightness region. Hereinafter, the region in the BW image corresponding to the region in the IR image is also referred to as a corresponding region.

[0124] For example, as shown in FIG. 11, when high luminance areas A to F are detected, the flare detection unit 112 identifies image feature amounts of areas corresponding to these high luminance areas A to F in the BW image.

[0125] FIG. 13 shows an example of a flare region detected from an IR image.

[0126] The flare detection unit 112 determines whether each of the high-brightness regions A to F is a flare region. That is, the flare detection unit 112 determines whether each high-brightness region is a flare region by comparing the image feature amount of the high-brightness region A in the IR image with the image feature amount of the corresponding region in the BW image that corresponds to the high-brightness region A. As a result, for example, as shown in FIG. 13 , the flare detection unit 112 determines that the high-brightness regions A, C, D, and E of the high-brightness regions A to F are flare regions.

[0127] FIG. 14 shows the simulation results of the depth acquisition device 1.

[0128] The depth acquisition device 1 acquires a BW image shown in (a) of Fig. 14 by capturing an image using the BW camera 103, and further acquires an IR image shown in (b) of Fig. 14 by capturing an image using the IR camera 102. The BW image and IR image are images obtained by capturing an image of the same scene from the same viewpoint and at the same time. In the example shown in (b) of Fig. 14, a large flare area appears at the right end of the IR image.

[0129] The first depth estimation unit 111a generates the first depth information shown in (c) of Fig. 14 by estimating the depth from the IR image. This first depth information is expressed as a first depth image that indicates the depth at each position in the IR image by brightness. In this first depth image, the depth of the flare region is expressed inappropriately.

[0130] The second depth estimation unit 111b corrects the inappropriate depth in the flare region. Then, the output unit 118 generates third depth information indicating the corrected depth of the flare region and the depth of the non-flare region, as shown in (e) of FIG. 14. Like the first depth information, this third depth information is expressed as a third depth image indicating depth by brightness. Note that the second depth estimation unit 111b may also correct the depth of the non-flare region in the first depth image based on the image feature amount of the corresponding region in the BW image.

[0131] In this way, the depth acquisition device 1 according to this embodiment can make the third depth image closer to the correct depth image shown in FIG. 14(d) over the entire image including the flare region.

[0132] [Specific processing flow of the depth acquisition device] FIG. 15 is a flowchart showing the overall processing operation of the depth acquisition device 1 shown in FIG.

[0133] (Step S31) First, the high-brightness region detection unit 116 detects high-brightness regions from the IR image.

[0134] (Step S32) The first edge detector 117IR detects edges in the IR image.

[0135] (Step S33) The second edge detector 117BW detects edges in the BW image.

[0136] (Step S34) The flare detection unit 112 detects a flare region in the IR image by comparing, for each of at least one high-brightness region in the IR image, an edge in the high-brightness region with an edge in a corresponding region in the BW image. That is, the flare detection unit 112 detects a high-brightness region as a flare region when a correlation value between an edge in the high-brightness region and an edge in a corresponding region in the BW image is less than a second threshold. This divides the IR image into at least one flare region and a non-flare region.

[0137] (Step S35) The first depth estimation unit 111a generates first depth information from the IR image using, for example, TOF.

[0138] (Step S36) The second depth estimation unit 111b generates second depth information indicating the depth of the flare region based on the first depth information of the IR image and the BW image.

[0139] (Step S37) The output unit 118 generates third depth information by replacing the depth of the flare region indicated by the first depth information with the depth indicated by the second depth information.

[0140] FIG. 16 is a flowchart showing the detailed processing of steps S31 to S34 in FIG.

[0141] (Step S41) First, the high-brightness area detection unit 116 determines whether the brightness at each position in the IR image is equal to or greater than a first threshold. Here, the first threshold may be, for example, about 1500 if the IR image is a 12-bit gradation image. Of course, this first threshold may be a value that changes depending on the environmental conditions or the settings of the IR camera 102. For example, when a dark scene such as at night is captured, the brightness of the entire IR image is low, so the first threshold may be a smaller value than when a bright scene is captured in the daytime. Furthermore, when the exposure time of the IR camera 102 is long, the brightness of the entire IR image is high, so the first threshold may be a larger value than when the exposure time is short.

[0142] (Step S42) If it is determined that the brightness at any position is not equal to or greater than the first threshold (No in step S41), the high-brightness region detection unit 116 determines that no flare occurs in the IR image (step S42). That is, the entire IR image is determined to be a non-flare region.

[0143] (Step S43) On the other hand, if it is determined that the luminance at any position is equal to or greater than the first threshold (Yes in step S41), the high-luminance region detection unit 116 divides the IR image into regions. That is, the high-luminance region detection unit 116 divides the IR image into at least one high-luminance region and a region other than the high-luminance region. This region division may be performed using a luminance-based technique such as SuperPixel.

[0144] (Step S44) Next, the first edge detector 117IR and the second edge detector 117BW perform edge detection on the IR image and the BW image, respectively. The edge detection may be performed using the Canny method or a Sobel filter.

[0145] (Step S45) For each of at least one high-brightness region in the IR image, the flare detection unit 112 compares an edge in that high-brightness region with an edge in a region of the BW image corresponding to that high-brightness region. That is, the flare detection unit 112 determines whether the correlation value between an edge in a high-brightness region in the IR image and an edge in a corresponding region of the BW image is equal to or greater than a second threshold. The correlation value is calculated by arranging the values ​​output by edge detection for each of the IR image and the BW image into a vector for each region and normalizing the dot product. That is, the flare detection unit 112 normalizes the dot product of a vector consisting of multiple values ​​obtained by edge detection in a high-brightness region in the IR image and a vector consisting of multiple values ​​obtained by edge detection in a region of the BW image corresponding to that high-brightness region. This calculates the correlation value for the high-brightness region.

[0146] (Step S46) If it is determined that the correlation value is not equal to or greater than the second threshold, i.e., is less than the second threshold (No in step S45), the flare detection unit 112 determines that high-luminance region is a flare region. That is, because there is no edge correlation between the region in the IR image where the flare or the like occurs and the corresponding region in the BW image due to the influence of the flare or the like, the flare detection unit 112 determines that high-luminance region in the IR image is a flare region.

[0147] On the other hand, if flare detection unit 112 determines in step S45 that the correlation value is equal to or greater than the second threshold, i.e., is not less than the second threshold (Yes in step S45), it determines that no flare or the like has occurred in that high-luminance region. In other words, flare detection unit 112 determines that that high-luminance region is a non-flare region.

[0148] This method requires an IR image and a BW image from substantially the same viewpoint. In the depth acquisition device 1 according to the present embodiment, the filter used for each pixel is set to either an IR filter or a BW filter. That is, as shown in FIG. 2, first pixels 21 having IR filters and second pixels 22 having BW filters are alternately arranged in the column direction. This allows an IR image and a BW image from substantially the same viewpoint to be acquired, thereby enabling the flare region to be appropriately identified.

[0149] <Utilizing brightness correlation> In the above description, edges are used to distinguish between flare and non-flare regions, but edges do not necessarily have to be used for this distinction. For example, the correlation value between the luminance of the IR image and the BW image may be used. As described above, when no flare or the like occurs, there is a strong correlation between the IR image and the BW image, but in a region where a flare or the like occurs, the correlation becomes weak. Therefore, by utilizing the correlation between the luminance of the IR image and the BW image, it is possible to appropriately distinguish between flare regions.

[0150] Fig. 17 is a flowchart showing an example of processing instead of steps S31 to S34 in Fig. 15. That is, Fig. 17 is a flowchart showing processing for detecting a flare area using the correlation between the brightness of an IR image and a BW image. Note that in Fig. 17, the same steps as in Fig. 16 are given the same reference numerals, and detailed explanations will be omitted. Unlike the flowchart shown in Fig. 16, the flowchart shown in Fig. 17 does not include step S44, and includes step S45a instead of step S45.

[0151] (Step S45a) In step S45a, for each high-brightness region obtained by the region division in step S43, the flare detection unit 112 calculates the correlation value between the luminance of each pixel in the high-brightness region and the luminance of each pixel in the region of the BW image corresponding to the high-brightness region. The correlation value is obtained by arranging the luminances of each pixel of the IR image and the BW image in a vector form for each region and normalizing the inner product value by the number of pixels. That is, the flare detection unit 112 normalizes the inner product value between the vector composed of the luminances of each pixel in the high-brightness region of the IR image and the vector composed of the luminances of each pixel in the corresponding region of the BW image. Thereby, the correlation value for the high-brightness region is calculated.

[0152] Here, when the correlation value is greater than or equal to the second threshold value, that is, not less than the second threshold value (Yes in step S45a), the flare detection unit 112 determines that no flare or the like has occurred in the high-brightness region (step S42). On the other hand, when the correlation value is less than the second threshold value (No in step S45a), due to the influence of flare or the like, the correlation between the luminance of each pixel in the high-brightness region of the IR image and the luminance of each pixel in the corresponding region of the BW image becomes low. Therefore, in such a case, the flare detection unit 112 determines the high-brightness region as a flare region (step S46).

[0153] That is, the image feature amounts in the respective regions of the IR image and the BW image used for detecting the flare region are the edges included in the image in the region in the example shown in FIG. 16, but are the luminances in the region in the example shown in FIG. 17. Here, as described above, the correlation between the luminance in the flare region of the IR image and the luminance in the region of the BW image corresponding to the flare region tends to be low. Therefore, in the IR image, by detecting a region with high luminance and low correlation of the luminance as a flare region, the flare region can be detected more appropriately.

[0154] <Using CENSUS transform> Of course, the evaluation value for distinguishing between flare and non-flare regions does not have to be a correlation value. For example, Hamming distance and CENSUS transform may be used. The CENSUS transform is disclosed, for example, in a non-patent document (R. Zabih and J. Woodfill, "Non-parametric Local Transforms for Computing Visual Correspondence," Proc. of ECCV, pp. 151-158, 1994). The CENSUS transform sets a window in an image and converts the magnitude relationship between the center pixel of the window and surrounding pixels into a binary vector.

[0155] Fig. 18 is a flowchart showing another example of processing instead of steps S31 to S34 in Fig. 15. That is, Fig. 18 is a flowchart showing processing for detecting a flare region using CENSUS transforms of an IR image and a BW image. Note that in Fig. 18, the same steps as in Fig. 16 are given the same reference numerals, and detailed description thereof will be omitted. Unlike the flowchart shown in Fig. 16, the flowchart shown in Fig. 18 includes steps S44b and S45b instead of steps S44 and S45.

[0156] (Step S44b) In step S44b, for each high-brightness region obtained by the region division in step S43, flare detection unit 112 performs a CENSUS transformation on the image of that high-brightness region in the IR image and the image of the corresponding region in the BW image, thereby generating a CENSUS-transformed image for the image of that high-brightness region in the IR image and a CENSUS-transformed image for the image of the corresponding region in the BW image.

[0157] (Step S45b) Next, in step S45b, the flare detection unit 112 calculates the Hamming distance between the CENSUS-transformed image of the IR image obtained in step S44b and the CENSUS-transformed image of the BW image. Then, when the value obtained by normalizing this Hamming distance by the number of pixels in the high-luminance region is not more than the third threshold (Yes in step S45b), the flare detection unit 112 determines that no flare or the like has occurred in that high-luminance region (step S42). On the other hand, when the value of the normalized Hamming distance is greater than the third threshold (No in step S45b), the flare detection unit 112 determines that the texture has disappeared in the image of that high-luminance region due to the influence of a flare or the like. As a result, the flare detection unit 112 discriminates that high-luminance region as a flare region (step S46).

[0158] That is, for each of at least one high-luminance region having a luminance of not less than the first threshold in the IR image, the flare detection unit 112 obtains a first transformed image by performing CENSUS transformation on the image within the high-luminance region. Then, the flare detection unit 112 obtains a second transformed image by performing CENSUS transformation on the image within the region of the BW image corresponding to the high-luminance region. Note that the first transformed image and the second transformed image are the above-described CENSUS-transformed images. Next, the flare detection unit 112 detects, as a flare region, a high-luminance region in which the Hamming distance between the first transformed image and the second transformed image exceeds the third threshold among at least one high-luminance region. Even when using CENSUS transformation in this way, the flare region can be appropriately detected.

[0159] <Using the luminance of the IR image> In the example shown in FIG. 17, the correlation value between the luminance of the IR image and the luminance of the IR image and the BW image is used to discriminate between the flare region and the non-flare region, but only the luminance of the IR image may be used.

[0160] Fig. 19 is a flowchart showing another example of processing instead of steps S31 to S34 in Fig. 15. That is, Fig. 19 is a flowchart showing processing for detecting a flare area using only the luminance of an IR image. Note that in Fig. 19, the same steps as in Fig. 16 are given the same reference numerals, and detailed explanations will be omitted. Steps S43 to S45 shown in Fig. 16 are omitted from the flowchart shown in Fig. 19.

[0161] That is, in step S41, flare detection unit 112 determines whether the luminance of a pixel in the IR image is equal to or greater than a first threshold. If it is determined that the luminance of the pixel is less than the first threshold (No in step S41), flare detection unit 112 determines that no flare has occurred in the region including that pixel (step S42). On the other hand, if it is determined that the luminance of the pixel is equal to or greater than the first threshold (Yes in step S41), flare detection unit 112 determines that a flare has occurred in the region including that pixel. That is, flare detection unit 112 determines that the region is a flare region (step S46).

[0162] 19, the flare detection unit 112 detects an area in the IR image having a brightness equal to or greater than a first threshold as a flare area. Since the brightness within the flare area tends to be higher than the brightness outside the flare area, the flare area can be appropriately detected by detecting an area in the IR image having a brightness equal to or greater than the first threshold as a flare area.

[0163] Furthermore, the discrimination between flare and non-flare regions may be achieved using a learning process. For example, deep learning or other processes may be used for the learning process. In this case, for learning, an IR image, a BW image, and a ground truth image in which the IR image is divided into flare and non-flare regions are prepared in advance. Next, the IR image and the BW image are provided as inputs to a learning model. The learning model is then trained so that the output from the learning model in response to the input matches the ground truth image. For example, the learning model is a neural network. The output from the learning model is an image in which each pixel indicates a value of "0" or "1," where "0" indicates that the pixel belongs to a non-flare region and "1" indicates that the pixel belongs to a flare region.

[0164] The flare detection unit 112 distinguishes between flare regions and non-flare regions by using the learning model that has been trained in advance in this way. That is, the flare detection unit 112 inputs an IR image and a BW image to the learning model. Then, the flare detection unit 112 distinguishes, as a non-flare region, a region that includes pixels corresponding to a numerical value "0" output from the learning model. Furthermore, the flare detection unit 112 distinguishes, as a flare region, a region that includes pixels corresponding to a numerical value "1" output from the learning model.

[0165] Through the above processing, the flare detection unit 112 divides the captured IR image into a flare region where a flare or the like occurs and a non-flare region.

[0166] <Depth correction processing> The second depth estimation unit 111b generates second depth information by using the BW image, the first depth information, and the flare region (that is, the discrimination result of the above-mentioned region).

[0167] Flare and other phenomena depend on the wavelength of light. Therefore, flare and other phenomena that occur in an IR image often do not occur in a BW image. Therefore, by correcting the first depth information using the BW image instead of the first depth information obtained from the IR image only in the flare area, it is possible to obtain second depth information that is not affected by flare and other phenomena that occur in the IR image.

[0168] A guided filter, which is a type of image correction filter, may be used to acquire the second depth information. Guided filters are disclosed in a non-patent document (Kaiming He, Jian Sun and Xiaoou Tang, “Guided Image Filtering”, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 35, Iss. 6, pp. 1397-1409, 2013.). A guided filter is a filter that corrects a target image by utilizing the correlation between the target image and a reference image. In the guided filter, it is assumed that the reference image I and the target image p are expressed by parameters a and b as shown in the following (Equation 2).

[0169]

number

[0170] Here, q is the output image obtained by correcting the target image p, i is the number of each pixel, and ωk is the peripheral area of ​​pixel k. Furthermore, parameters a and b are expressed by the following (Equation 3).

[0171]

number

[0172] where ε is a regularization parameter, μ and σ are the mean and variance within the block of the reference image, and are calculated by the following (Equation 4).

[0173]

number

[0174] However, in order to suppress the noise contained in the obtained parameters a and b, averaged parameters are used and the output is calculated as shown in the following (Equation 5).

[0175]

number

[0176] In this embodiment, the second depth estimation unit 111b corrects the first depth information (or first depth image), which is the target image, by providing a BW image as a reference image. This generates or acquires second depth information. To generate such second depth information, an IR image and a BW image having substantially the same viewpoint are required. In the depth acquisition device 1 of this embodiment, the filter used for each pixel is set to either an IR filter or a BW filter. That is, as shown in FIG. 2, first pixels 21 having IR filters and second pixels 22 having BW filters are alternately arranged in the column direction. This allows an IR image and a BW image having substantially the same viewpoint to be acquired, thereby enabling appropriate second depth information to be acquired.

[0177] Of course, the second depth estimation unit 111b may use processing other than the guided filter. For example, the second depth estimation unit 111b may use processing such as a bilateral filter (Non-Patent Document: C. Tomasi, R. Manduchi, “Bilateral filtering for gray and color images,” IEEE International Conference on Computer Vision (ICCV), pp. 839-846, 1998) or Mutual-Structure for Joint Filtering (Non-Patent Document: Xiaoyong Shen, Chao Zhou, Li Xu, and Jiaya Jia, “Mutual-Structure for Joint Filtering,” IEEE International Conference on Computer Vision (ICCV), 2015).

[0178] As described above, in this embodiment, the first depth information is used for an area determined to be free of flare or the like (i.e., a non-flare area), and the second depth information is used for an area where flare or the like is occurring (i.e., a flare area). This makes it possible to acquire more accurate depth information even if a flare or the like occurs in the IR image.

[0179] (Variation 1) In the above embodiment, a filter such as a guided filter is used to generate the second depth information, but the second depth information may be generated using a learning model.

[0180] For example, deep learning, a learning process, may be used, as in a non-patent document (Shuran Song, Fisher Yu, Andy Zeng, Angel X. Chang, Manolis Savva, and Thomas Funkhouser, “Semantic Scene Completion from a Single Depth Image,” IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 190-198, 2017). That is, a learning model may be trained to output second depth information when a BW image and first depth information are input. The non-patent document proposes a network that, when depth information including a missing area and a color image are input, interpolates the missing area of ​​the depth information. The second depth estimation unit 111b in this modification provides an IR image, a BW image, and the first depth information to a network (i.e., a learning model) similar to that described in the non-patent document, and further provides the flare area detected by the flare detection unit 112 as a mask image of the missing area. This allows more accurate second depth information to be acquired from the network.

[0181] FIG. 20 is a block diagram showing an example of the functional configuration of the depth acquisition device 1 in this modified example.

[0182] The depth acquisition device 1 in this modification includes the components shown in FIG. 8, and further includes a learning model 104 formed of, for example, a neural network.

[0183] The second depth estimation unit 111b inputs three types of data, namely, an IR image, a BW image, and the first depth information, into the learning model 104, and generates the second depth information by using the flare area as the mask area to be corrected.

[0184] In training the learning model 104, a correct depth image is prepared in advance in addition to an IR image, a BW image, and the first depth information. Next, the IR image, the BW image, the first depth information, and a mask image specifying the flare region are provided as inputs to the learning model 104. The learning model 104 is then trained so that the output from the learning model 104 in response to the input matches the correct depth image. Note that the mask image is provided randomly during training. The second depth estimation unit 111b uses the learning model 104 that has been trained in this manner in advance. In other words, the second depth estimation unit 111b can acquire the second depth information output from the learning model 104 by inputting the IR image, the BW image, the first depth information, and the mask image specifying the flare region to the learning model 104.

[0185] In this manner, in this modification, the second depth estimation unit 111b estimates depth information indicating the depth at each position in the IR image, and corrects the depth at each position in the flare region indicated by the depth information by inputting the IR image, BW image, flare region, and the depth information into the learning model. Therefore, if the learning model is trained in advance so that the correct depth at each position in the flare region is output in response to the input of the IR image, BW image, flare region, and depth information, the depth information estimated from the IR image can be appropriately corrected. In other words, the depth at each position in the flare region indicated by the depth information can be appropriately corrected.

[0186] As described above, second depth estimation unit 111b may use deep learning. In this case, there is no need to directly output the flare region, and second depth information may be generated directly by deep learning.

[0187] FIG. 21 is a block diagram showing another example of the functional configuration of the depth acquisition device 1 in this modified example.

[0188] The depth acquisition device 1 in this modified example does not include the flare detection unit 112, the high-brightness area detection unit 116, the first edge detection unit 117IR, and the second edge detection unit 117BW, among the components shown in Figure 20, but includes the other components.

[0189] In training the training model 104, similar to the example shown in FIG. 20 , a correct depth image is prepared in advance in addition to an IR image, a BW image, and the first depth information. Next, the IR image, the BW image, and the first depth information are provided as inputs to the training model 104. The training model 104 is trained so that the output from the training model 104 in response to the input matches the correct depth image. As the training model 104, a VGG-16 network with added skip connections may be used, as described in non-patent literature (Caner Hazirbas, Laura Leal-Taixe, and Daniel Cremers C. Hazirbas, “Deep Depth From Focus”, In ArXiv preprint arXiv, 1704.01085, 2017.). The number of channels of the training model 104 is changed so that the IR image, the BW image, and the first depth information are provided as inputs to the training model 104. By using the learning model 104 that has been trained in this manner, the second depth estimation unit 111b can easily obtain the second depth information from the learning model 104 by inputting the IR image, the BW image, and the first depth information into the learning model 104.

[0190] That is, the depth acquisition device 1 shown in FIG. 21 includes a memory and a processor 110. Note that although the memory is not shown in FIG. 21, it may be included in the depth acquisition device 1 as shown in FIG. 5. The processor 110 acquires timing information indicating the timing at which the light source 101 irradiates the subject with infrared light. Next, the processor 110 acquires an IR image obtained by capturing an image of a scene including the subject using infrared light according to the timing indicated by the timing information and stored in the memory. Next, the processor 110 acquires a BW image obtained by capturing an image of substantially the same scene as the IR image using visible light, from substantially the same viewpoint and at substantially the same capturing time as the IR image, and stored in the memory. Then, the first depth estimation unit 111a of the processor 110 estimates depth information indicating the depth at each position within the IR image. The second depth estimation unit 111b inputs the IR image, the BW image, and the depth information into the learning model 104, thereby correcting the depth at each position within the flare region of the IR image indicated by the depth information.

[0191] Therefore, if the learning model 104 is trained in advance so that the correct depth at each position within the flare region of the IR image is output in response to the input of an IR image, a BW image, and depth information, the depth information estimated from the IR image can be appropriately corrected. In other words, the depth at each position within the flare region indicated by the depth information can be appropriately corrected without detecting the flare region.

[0192] (Variation 2) <Use of time direction> Here, the flare detection unit 112 may use information in the time direction to distinguish between a flare region and a non-flare region. Flare is a phenomenon that occurs inside the IR camera 102 due to the relationship between the subject and the light source 101, not due to the subject itself. Therefore, when the IR camera 102 moves, the shape of the flare region changes. Therefore, the flare detection unit 112 detects a candidate flare region from the IR image using the above-mentioned method and determines whether the shape of the candidate has changed from the flare region detected in the previous IR image. If the flare detection unit 112 determines that the shape has not changed, it may determine that the candidate is not a flare region but a non-flare region.

[0193] FIG. 22 is a flowchart showing the processing operation of the flare detection unit 112 in this modified example.

[0194] (Step S51) First, flare detection unit 112 determines whether or not a candidate flare region exists in the target frame. That is, flare detection unit 112 determines whether or not a flare region detected based on the flowcharts shown in Figures 16 to 19 described above is not the final flare region, but exists in the target frame as a candidate flare region. Note that the target frame is an IR image to be determined, i.e., an IR image in which the presence of a flare region is determined.

[0195] (Step S54) Here, if there is no candidate for a flare region in the target frame (No in step S51), the flare detection unit 112 determines that there is no flare in the target frame (that is, the IR image).

[0196] (Step S52) On the other hand, if a candidate flare region exists in the target frame (Yes in step S51), the flare detection unit 112 determines whether a flare region also exists in the frame before the target frame. The frame before the target frame is an IR image acquired by imaging with the IR camera 102 before the target frame.

[0197] (Step S55) Here, if no flare region exists in the frame preceding the target frame (No in step S52), flare detection unit 112 determines that the detected candidate flare region is a region caused by flare, that is, a flare region.

[0198] (Step S53) On the other hand, if a flare region exists in the frame preceding the target frame (Yes in step S52), flare detection unit 112 compares the shape of the candidate flare region in the target frame with the shape of the flare region in the previous frame. Here, if the shape of the candidate flare region in the target frame is similar to the shape of the flare region in the previous frame (Yes in step S53), flare detection unit 112 executes the process of step S54. That is, flare detection unit 112 updates the detected candidate flare region to a non-flare region and determines that no flare exists in the target frame (i.e., the IR image). On the other hand, if the shape of the candidate flare region in the target frame is not similar to the shape of the flare region in the previous frame (No in step S53), flare detection unit 112 executes the process of step S55. That is, flare detection unit 112 determines that the detected candidate flare region is a region caused by flare, i.e., a flare region.

[0199] In this way, the flare detection unit 112 in this modification utilizes information in the time direction. That is, the flare detection unit 112 utilizes the shapes of the flare region or its candidate in each frame acquired at a different time. This enables the flare region and the non-flare region to be distinguished with higher accuracy.

[0200] The flare detection unit 112 may determine a flare region for each of a plurality of neighboring frames, rather than for each frame. The neighboring frames are, for example, a plurality of IR images acquired consecutively over time by imaging using the IR camera 102. That is, the flare detection unit 112 may detect flare region candidates in each of the neighboring frames based on, for example, the flowcharts shown in FIGS. 16 to 19, and determine whether the candidates are flare regions. More specifically, the flare detection unit 112 compares the shapes of the flare region candidates in each frame, and if the shapes of the flare region candidates are substantially the same, determines that the candidates are not flare regions, i.e., non-flare regions. On the other hand, if the shapes of the flare region candidates are not similar, the flare detection unit 112 determines that the candidates are flare regions.

[0201] Alternatively, the flare detection unit 112 may determine whether the two shapes are similar by determining whether the similarity between the two shapes is equal to or greater than a threshold value. The similarity may be calculated as a correlation value between the two shapes, for example.

[0202] (Variation 3) <Using multiple original IR images> The depth acquisition device 1 in the above-described embodiment and its modifications 1 and 2 detects a flare area using an IR image and a BW image, but the BW image does not have to be used. The depth acquisition device 1 in this modification detects a flare area using multiple IR original images. The multiple IR original images are, for example, an infrared image obtained in a first exposure period and an infrared image obtained in a second exposure period shown in FIG. 3.

[0203] That is, in this modification, when the IR camera 102 acquires multiple infrared images at different times to estimate the first depth information using TOF or the like, the multiple infrared images are used to distinguish between flare regions and non-flare regions. In the following description, each of the multiple infrared images is referred to as an IR original image. It can be said that the above-mentioned IR image is composed of the multiple IR original images.

[0204] There are two types of depth estimation using TOF: direct TOF, which directly measures the arrival time of emitted light, and indirect TOF, which estimates depth from multiple IR original images obtained by different timings of light emission and reception. In this modification, the depth acquisition device 1 distinguishes between flare regions and non-flare regions from multiple IR original images acquired during indirect TOF.

[0205] The timing at which each of the multiple IR original images is obtained, i.e., the timing at which each of the multiple IR original images receives light, is different. Therefore, even if a flare occurs in a first IR original image among the multiple IR original images, it is highly likely that a flare does not occur in a second IR original image, which receives light at a different timing than the first IR original image. Therefore, the depth acquisition device 1 in this modified example distinguishes between flare areas and non-flare areas by comparing multiple IR original images acquired by changing the timing at which light is received. This allows the third depth image to approach the correct depth image shown in (d) of Figure 14.

[0206] [Specific processing flow of the depth acquisition device] FIG. 23 is a flowchart showing the overall processing operation of the depth acquisition device 1 in this modified example.

[0207] (Step S31a) First, the high-brightness region detection unit 116 detects high-brightness regions from the first original IR image.

[0208] (Step S32a) The first edge detection unit 117IR detects edges in the first original IR image.

[0209] (Step S33a) The second edge detector 117BW detects edges in the second original IR image instead of the BW image.

[0210] (Step S34a) The flare detection unit 112 detects a flare region in the IR image by comparing, for each of at least one high-brightness region in the first IR original image, an edge in the high-brightness region with an edge in a corresponding region in the second IR original image. That is, the flare detection unit 112 detects a high-brightness region as a flare region when the correlation value between the edge in the high-brightness region and the edge in the corresponding region in the second IR original image is less than a fourth threshold. This divides the IR image into at least one flare region and a non-flare region.

[0211] (Step S35) The first depth estimation unit 111a generates first depth information from the IR image using, for example, TOF.

[0212] (Step S36) The second depth estimation unit 111b generates second depth information indicating the depth of the flare region based on the first depth information of the IR image and the BW image.

[0213] (Step S37) The output unit 118 generates third depth information by replacing the depth of the flare region indicated by the first depth information with the depth indicated by the second depth information.

[0214] FIG. 24 is a flowchart showing the detailed processing of steps S31a to S34a in FIG.

[0215] (Step S41a) First, the high-brightness area detection unit 116 determines whether the brightness at each position in the first IR original image is equal to or greater than a fifth threshold. Here, the fifth threshold may be, for example, approximately 1500 if the first IR original image is a 12-bit gradation image. Of course, this fifth threshold may be a value that varies depending on the environmental conditions or the settings of the IR camera 102. For example, when a dark scene such as night is captured, the brightness of the entire first IR original image is low, so the fifth threshold may be a smaller value than when a bright scene is captured in the daytime. Furthermore, when the exposure time of the IR camera 102 is long, the brightness of the entire first IR original image is high, so the fifth threshold may be a larger value than when the exposure time is short.

[0216] (Step S42a) If it is determined that the brightness at any position is not equal to or greater than the fifth threshold (No in step S41a), the high-brightness region detection unit 116 determines that no flare occurs in the IR image constructed using the first original IR image (step S42). That is, the entire IR image is determined to be a non-flare region.

[0217] (Step S43a) On the other hand, if it is determined that the luminance at any position is equal to or greater than the fifth threshold (Yes in step S41a), the high-luminance region detection unit 116 divides the first IR original image into regions. That is, the high-luminance region detection unit 116 divides the first IR original image into at least one high-luminance region and a region other than the high-luminance region. This region division may be performed using a luminance-based technique such as SuperPixel.

[0218] (Step S44a) Next, the first edge detector 117IR and the second edge detector 117BW perform edge detection on the first original IR image and the second original IR image, respectively. The edge detection may utilize the Canny method, a Sobel filter, or the like.

[0219] (Step S45a) The flare detection unit 112 compares, for each of at least one high-brightness region in the first IR original image, an edge in that high-brightness region with an edge in a region of the second IR original image corresponding to that high-brightness region. That is, the flare detection unit 112 determines whether the correlation value between an edge in a high-brightness region in the first IR original image and an edge in a corresponding region in the second IR original image is equal to or greater than a fourth threshold. The correlation value is calculated by arranging the values ​​output by edge detection for each of the first IR original image and the second IR original image into a vector for each region and normalizing the dot product. That is, the flare detection unit 112 normalizes the dot product of a vector consisting of multiple values ​​obtained by edge detection in a high-brightness region in the first IR original image and a vector consisting of multiple values ​​obtained by edge detection in a region of the second IR original image corresponding to that high-brightness region. This calculates the correlation value for the high-brightness region.

[0220] (Step S46a) Here, if it is determined that the correlation value is not equal to or greater than the fourth threshold, i.e., is less than the fourth threshold (No in step S45a), the flare detection unit 112 determines that high-brightness region as a flare region. That is, because there is no edge correlation between the region in the first IR original image where flare or the like occurs and the corresponding region in the second IR original image due to the influence of flare or the like, the flare detection unit 112 determines that high-brightness region in the first IR original image as a flare region. That is, the flare detection unit 112 determines that high-brightness region in the IR image as a flare region. Note that the high-brightness region in the IR image is the same region as the high-brightness region in the first IR original image.

[0221] On the other hand, if flare detection unit 112 determines in step S45a that the correlation value is equal to or greater than the fourth threshold, that is, is not less than the fourth threshold (Yes in step S45a), it determines that no flare or the like has occurred in the high-luminance region. In other words, flare detection unit 112 determines that the high-luminance region is a non-flare region.

[0222] <Utilizing brightness correlation> In the above description, edges are used to distinguish between flare and non-flare regions, but edges do not necessarily have to be used for this distinction. For example, the correlation value between the luminance of the first IR original image and the second IR original image may be used. As described above, when no flare or the like occurs, there is a strong correlation between the first IR original image and the second IR original image, but in regions where a flare or the like occurs, the correlation becomes weak. Therefore, by utilizing the correlation between the luminance of the first IR original image and the second IR original image, it is possible to appropriately distinguish between flare regions.

[0223] Fig. 25 is a flowchart showing an example of processing instead of steps S31a to S34a in Fig. 23. That is, Fig. 25 is a flowchart showing processing for detecting a flare area using the correlation between the luminance of the first original IR image and the second original IR image. Note that in Fig. 25, the same steps as in Fig. 24 are given the same reference numerals, and detailed explanations will be omitted. Unlike the flowchart shown in Fig. 24, the flowchart shown in Fig. 25 does not include step S44a, and includes step S45b instead of step S45a.

[0224] (Step S45b) In step S45b, for each high-brightness region obtained by the region division in step S43a, the flare detection unit 112 calculates a correlation value between the luminance of each pixel in that high-brightness region and the luminance of each pixel in the region of the second IR original image corresponding to that high-brightness region. The correlation value is found by arranging the luminance of each pixel in each of the first and second IR original images into a vector for each region and normalizing the dot product value by the number of pixels. In other words, the flare detection unit 112 normalizes the dot product value between the vector consisting of the luminance of each pixel in the high-brightness region of the first IR original image and the vector consisting of the luminance of each pixel in the corresponding region of the second IR original image. This calculates the correlation value for that high-brightness region.

[0225] Here, when the correlation value is greater than or equal to the fourth threshold value, that is, not less than the fourth threshold value (Yes in step S45b), the flare detection unit 112 determines that no flare or the like has occurred in the high-luminance region (step S42a). On the other hand, when the correlation value is less than the fourth threshold value (No in step S45b), due to the influence of flare or the like, the correlation between the luminance of each pixel in the high-luminance region of the first IR original image and the luminance of each pixel in the corresponding region of the second IR original image is low. Therefore, in such a case, the flare detection unit 112 determines the high-luminance region as a flare region (step S46a).

[0226] That is, the image feature amounts in the respective regions of the first IR original image and the second IR original image used for detecting the flare region are, in the example shown in FIG. 24, edges included in the image in the region, but in the example shown in FIG. 25, the luminance in the region. Here, as described above, the correlation between the luminance in the flare region of the first IR original image and the luminance in the region of the second IR original image corresponding to the flare region tends to be low. Therefore, in the first IR original image, by detecting a region having a high luminance and a low correlation of the luminance as a flare region, the flare region can be detected more appropriately.

[0227] <Using CENSUS transform> Of course, the evaluation value for discriminating between the flare region and the non-flare region does not necessarily have to be the correlation value. For example, the aforementioned Hamming distance and CENSUS transform may be used.

[0228] FIG. 26 is a flowchart showing another example of the process instead of steps S31a to S34a in FIG. 23. That is, FIG. 26 is a flowchart showing the flare region detection process using the CENSUS transform of each of the first IR original image and the second IR original image. In FIG. 26, the same step as in FIG. 24 is denoted by the same reference numeral, and the detailed description thereof is omitted. The flowchart shown in FIG. 26 includes steps S44c and S45c instead of steps S44a and S45a, unlike the flowchart shown in FIG. 24.

[0229] (Step S44c) In step S44c, for each high-brightness region obtained by the region division in step S43a, the flare detection unit 112 performs a CENSUS transformation on the image of that high-brightness region in the first original IR image and the image of the corresponding region in the second original IR image, thereby generating a CENSUS-transformed image for the image of that high-brightness region in the first original IR image and a CENSUS-transformed image for the image of the corresponding region in the second original IR image.

[0230] (Step S45c) Next, in step S45c, the flare detection unit 112 calculates the Hamming distance between the CENSUS-converted image of the first IR original image calculated in step S44c and the CENSUS-converted image of the second IR original image. If the value of this Hamming distance normalized by the number of pixels in the high-luminance region is equal to or less than a sixth threshold (Yes in step S45c), the flare detection unit 112 determines that no flare or the like has occurred in the high-luminance region (step S42a). On the other hand, if the value of the normalized Hamming distance is greater than the sixth threshold (No in step S45c), the flare detection unit 112 determines that texture has disappeared in the image of the high-luminance region due to the influence of a flare or the like. As a result, the flare detection unit 112 determines that the high-luminance region is a flare region (step S46a).

[0231] That is, for each of at least one high-brightness region in the first IR original image having a brightness equal to or greater than a fifth threshold, the flare detection unit 112 obtains a first converted image by performing a CENSUS transform on the image in the high-brightness region. Then, the flare detection unit 112 obtains a second converted image by performing a CENSUS transform on the image in the region of the second IR original image corresponding to the high-brightness region. The first converted image and the second converted image are the CENSUS-converted images described above. Next, the flare detection unit 112 detects, as a flare region, a high-brightness region in which the Hamming distance between the first converted image and the second converted image exceeds a sixth threshold, among the at least one high-brightness region. Thus, even when using a CENSUS transform, a flare region can be appropriately detected.

[0232] As described above, in the depth acquisition device 1 of this embodiment and its modified examples, even if there is a flare area in the IR image, the appropriate depth at each position within the flare area can be acquired by using an image of the corresponding area in the BW image.

[0233] In each of the above embodiments, each component may be configured with dedicated hardware or may be realized by executing a software program suitable for each component. Each component may be realized by a program execution unit such as a CPU or processor reading and executing a software program recorded on a recording medium such as a hard disk or semiconductor memory. Here, the software that realizes the depth acquisition device of the above embodiments and modifications causes a computer to execute each step included in any of the flowcharts in Figures 6, 7, 15 to 19, and 22 to 26.

[0234] While the depth acquisition device according to one or more aspects has been described above based on the embodiment and its modifications, the present disclosure is not limited to the embodiment and its modifications. As long as it does not deviate from the spirit of the present disclosure, various modifications conceivable by a person skilled in the art to the embodiment and its modifications, and configurations constructed by combining the components of the embodiment and its modifications may also be included within the scope of the present disclosure.

[0235] In addition, in this disclosure, all or part of the units, devices, or all or part of the functional blocks in the block diagrams shown in FIGS. 1, 4, 5, 8, 20, and 21 may be implemented by one or more electronic circuits, including a semiconductor device, a semiconductor integrated circuit (IC), or an LSI (large scale integration). The LSI or IC may be integrated into a single chip or may be configured by combining multiple chips. For example, functional blocks other than memory elements may be integrated into a single chip. Although the terms LSI and IC are used here, the term may be changed depending on the degree of integration, and may be called a system LSI, a VLSI (very large scale integration), or an ULSI (ultra large scale integration). A field programmable gate array (FPGA), which is programmable after LSI fabrication, or a reconfigurable logic device, which can reconfigure the connections within the LSI or set up circuit partitions within the LSI, may also be used for the same purpose.

[0236] Furthermore, all or part of the functions or operations of a unit, device, or part of a device can be implemented by software processing. In this case, the software is recorded on one or more non-transitory recording media such as ROMs, optical disks, hard disk drives, etc., and when the software is executed by a processor, the software causes the processor and peripheral devices to perform specific functions within the software. A system or device may include one or more non-transitory recording media on which the software is recorded, a processor, and necessary hardware devices, such as interfaces. [Industrial Applicability]

[0237] The present disclosure is applicable to a depth acquisition device that acquires depth from an image obtained by capturing, and can be used as, for example, an in-vehicle device. [Explanation of symbols]

[0238] 1 Depth acquisition device 10, 101 light source 20 Solid-state imaging device 21 1st pixel (IR) 22 2nd pixel (BW) 30 Processing circuit 50 Diffuser 60 lenses 70 Bandpass Filter 102 IR camera 103 BW Camera 104 Learning Model 110 processors 111 Depth estimation unit 111a First depth estimation unit 111b Second depth estimation unit 112 Flare detection unit 113 Light emission timing acquisition unit 114 IR image acquisition unit 115 BW image acquisition unit 116 High-brightness area detection unit 117IR First edge detection unit 117BW Second edge detection unit 118 Output section 200 memory

Claims

1. a light source that irradiates a subject with light; a solid-state image sensor that captures a first image of the subject and a second image using light reflected by the subject from the irradiated light; a flare detection unit that detects a flare area using subject information related to the subject output by the solid-state imaging device; an output unit that generates and outputs output information according to the detected flare region; Equipped with the solid-state imaging device includes a plurality of first pixels used for the first imaging and a plurality of second pixels different from the plurality of first pixels used for the second imaging, the first image captured by the plurality of first pixels and the second image captured by the plurality of second pixels are images of substantially the same viewpoint, imaging time, and scene; Imaging device.

2. The irradiation light is infrared light. The imaging device according to claim 1 .

3. The solid-state imaging device is acquiring a visible light image by the first image capture of the subject; acquiring an infrared image by the second imaging based on the infrared light; The imaging device according to claim 2 .

4. a processor that acquires timing information indicating a timing at which the light source irradiates the subject with the infrared light; the infrared image is obtained by capturing an image of a scene including the subject based on infrared light in accordance with the timing indicated by the timing information; the visible light image is obtained by imaging based on visible light of substantially the same scene as the infrared image, from substantially the same viewpoint and at substantially the same time as the infrared image; Detecting the flare region based on the object information including the infrared image; estimating a depth of the flare region based on the infrared image, the visible light image, and the flare region; The imaging device according to claim 3 .

5. The processor: In estimating the depth of the flare region, estimating first depth information indicating a depth at each position within the infrared image; correcting the depth at each position within the flare region indicated by the first depth information based on the visible light image, thereby estimating second depth information indicating a corrected depth at each position within the flare region; further generating third depth information indicating a depth at each position outside the flare region of the infrared image indicated by the first depth information and a depth at each position within the flare region of the infrared image indicated by the second depth information. The imaging device according to claim 4 .

6. The flare detection unit detects the flare region by: detecting a region of the infrared image having a brightness equal to or greater than a first threshold as the flare region; The imaging device according to claim 4 .

7. The flare detection unit detects the flare region by: detecting, as the flare region, a region in the infrared image that has a brightness equal to or greater than a first threshold and satisfies a predetermined condition; the predetermined condition is a condition that a correlation value between an image feature amount in a region of the infrared image and an image feature amount in a region of the visible light image corresponding to the region is less than a second threshold value; The imaging device according to claim 4 .

8. Image feature amounts in the respective regions of the infrared image and the visible light image are an edge included in the image within the region, The imaging device according to claim 7 .

9. Image feature amounts in the respective regions of the infrared image and the visible light image are is the luminance within the region, The imaging device according to claim 7 .

10. A light source that irradiates an object with infrared light; a solid-state image sensor that captures a first image of the subject and a second image using light reflected by the subject from the irradiated light; a flare detection unit that detects a flare area using subject information related to the subject output by the solid-state imaging device; an output unit that generates and outputs output information according to the detected flare region; a processor for acquiring timing information indicating a timing at which the light source irradiates the subject with the infrared light; The solid-state imaging device is acquiring a visible light image by the first image capture of the subject; acquiring an infrared image by the second imaging based on the infrared light; the infrared image is obtained by capturing an image of a scene including the subject based on infrared light in accordance with the timing indicated by the timing information; the visible light image is obtained by imaging based on visible light of substantially the same scene as the infrared image, from substantially the same viewpoint and at substantially the same time as the infrared image; The flare detection unit Detecting the flare region based on the object information including the infrared image; The processor: estimating a depth of the flare region based on the infrared image, the visible light image, and the flare region; The flare detection unit detects the flare region by: For each of at least one high-intensity region in the infrared image having an intensity equal to or greater than a first threshold, (i) obtaining a first converted image by performing a CENSUS conversion on the image in the high-brightness region; (ii) obtaining a second converted image by performing CENSUS conversion on an image in a region of the visible light image corresponding to the high-brightness region; detecting, as the flare region, a high-luminance region in which a Hamming distance between the first converted image and the second converted image exceeds a third threshold value among at least one of the high-luminance regions; Imaging device.

11. A light source that irradiates an object with infrared light; a solid-state image sensor that captures a first image of the subject and a second image using light reflected by the subject from the irradiated light; a flare detection unit that detects a flare area using subject information related to the subject output by the solid-state imaging device; an output unit that generates and outputs output information according to the detected flare region; a processor for acquiring timing information indicating a timing at which the light source irradiates the subject with the infrared light; The solid-state imaging device is acquiring a visible light image by the first image capture of the subject; acquiring an infrared image by the second imaging based on the infrared light; the infrared image is obtained by capturing an image of a scene including the subject based on infrared light in accordance with the timing indicated by the timing information; the visible light image is obtained by imaging based on visible light of substantially the same scene as the infrared image, from substantially the same viewpoint and at substantially the same time as the infrared image; The flare detection unit Detecting the flare region based on the object information including the infrared image; The processor: estimating a depth of the flare region based on the infrared image, the visible light image, and the flare region; The processor, in estimating the depth of the flare region, Estimating depth information indicating a depth at each position within the infrared image; correcting the depth at each position within the flare region indicated by the depth information by inputting the infrared image, the visible light image, the flare region, and the depth information into a learning model; Imaging device.

12. a memory for storing the infrared image and the visible light image; acquiring the infrared image stored in the memory, wherein the infrared image is obtained by imaging based on infrared light; acquiring a visible light image stored in the memory, wherein the visible light image is obtained by imaging based on visible light at substantially the same viewpoint and imaging time as the infrared image; Detecting a region where a flare is projected as the flare region based on the subject information including the infrared image; estimating a depth of the flare region based on the visible light image; The imaging device according to claim 3 .

13. Irradiate the subject with light, a solid-state imaging device performs a first image capture of the subject and a second image capture using light reflected by the subject from the irradiated light; detecting a flare region using object information relating to the object output by the first image pickup and the second image pickup; generating and outputting output information according to the detected flare region; the solid-state imaging device includes a plurality of first pixels used for the first imaging and a plurality of second pixels different from the plurality of first pixels used for the second imaging, the first image captured by the plurality of first pixels and the second image captured by the plurality of second pixels are images of substantially the same viewpoint, imaging time, and scene; Imaging method.

Citation Information

Patent Citations

  • Range finder, ranging method, and program therefor

    JP2011064498A

  • Surrounding state recognition apparatus

    JP2011257956A

  • Imaging apparatus

    JP2016208470A

  • Position estimation system, position estimation method, and position estimation program

    JP2017067503A

  • Image capture device and image capture method

    WO2014174765A1