JP2020051991A - Depth acquisition device, depth acquisition method, and program - Google Patents

Depth acquisition device, depth acquisition method, and program Download PDF

Info

Publication number
JP2020051991A
JP2020051991A JP2018184090A JP2018184090A JP2020051991A JP 2020051991 A JP2020051991 A JP 2020051991A JP 2018184090 A JP2018184090 A JP 2018184090A JP 2018184090 A JP2018184090 A JP 2018184090A JP 2020051991 A JP2020051991 A JP 2020051991A
Authority
JP
Japan
Prior art keywords
depth
subject
infrared light
intensity
reliability
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2018184090A
Other languages
Japanese (ja)
Inventor
信彦 若井
Nobuhiko Wakai
信彦 若井
佐藤 智
Satoshi Sato
智 佐藤
吾妻 健夫
Takeo Azuma
健夫 吾妻
吉岡 康介
Kosuke Yoshioka
康介 吉岡
清水 規貴
Noritaka Shimizu
規貴 清水
良直 河合
Yoshinao Kawai
良直 河合
高明 天田
Takaaki Amada
高明 天田
陽子 川合
Yoko Kawai
陽子 川合
猛 村井
Takeshi Murai
猛 村井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Intellectual Property Management Co Ltd
Original Assignee
Panasonic Intellectual Property Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Intellectual Property Management Co Ltd filed Critical Panasonic Intellectual Property Management Co Ltd
Priority to JP2018184090A priority Critical patent/JP2020051991A/en
Publication of JP2020051991A publication Critical patent/JP2020051991A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a depth acquisition device with which it is possible to accurately acquire the depth to a subject.SOLUTION: This depth acquisition device 1 comprises a memory 200 and a processor 110a. The processor 110a acquires a visible light image generated by imaging a subject based on visible light and preserved in the memory 200, acquires the intensity of infrared light measured by receiving infrared light reflected by the subject and preserved in the memory 200, calculates a first depth that is the distance to the subject on the basis of the visible light image, calculates a second depth that is the distance to the subject on the basis of the intensity of the infrared light, calculates a first reliability mask that represents the reliability of the first depth by a multi-value, calculates a second reliability mask that represents the reliability of the second depth by a multi-value, and calculates an integrated depth by integrating the first and second depths on the basis of the first and second reliability masks.SELECTED DRAWING: Figure 4

Description

本開示は、被写体までの距離を奥行きとして取得する奥行取得装置などに関する。   The present disclosure relates to a depth acquisition device that acquires a distance to a subject as depth.

従来、被写体までの距離を測定する測距装置が提案されている(例えば、特許文献1参照)。この測距装置は、光源と撮像部とを備える。光源は被写体に光を照射する。撮像部は、その被写体で反射された反射光を撮像する。そして、測距装置は、その撮像によって得られた画像の各画素値を、被写体までの距離に変換することによって、その被写体までの距離を測定する。つまり、測距装置は、撮像部によって得られた画像の奥行きを取得する。   2. Description of the Related Art Conventionally, a distance measuring device for measuring a distance to a subject has been proposed (for example, see Patent Document 1). This distance measuring device includes a light source and an imaging unit. The light source emits light to the subject. The imaging unit captures the light reflected by the subject. Then, the distance measuring device measures the distance to the subject by converting each pixel value of the image obtained by the imaging into a distance to the subject. That is, the distance measuring device acquires the depth of the image obtained by the imaging unit.

特開2011−64498号公報JP 2011-64498 A

しかしながら、上記特許文献1の測距装置では、奥行きを正確に取得することができないという課題がある。   However, the distance measuring device disclosed in Patent Document 1 has a problem that the depth cannot be accurately obtained.

そこで、本開示は、被写体までの距離である奥行きを正確に取得することができる奥行取得装置を提供する。   Thus, the present disclosure provides a depth acquisition device that can accurately acquire the depth that is the distance to a subject.

本開示の一態様に係る奥行取得装置は、メモリと、プロセッサとを備え、前記プロセッサは、可視光に基づく被写体の撮像によって生成され、前記メモリに保存されている可視光画像を取得し、光源から照射されて前記被写体によって反射された赤外光を受光することによって計測され、前記メモリに保存されている前記赤外光の強度を取得し、前記可視光画像に基づいて、前記被写体までの距離である第1奥行きを算出し、前記赤外光の強度に基づいて、前記被写体までの距離である第2奥行きを算出し、前記第1奥行きの信頼性を多値で表す第1信頼性マスクを算出し、前記第2奥行きの信頼性を多値で表す第2信頼性マスクを算出し、前記第1信頼性マスクおよび前記第2信頼性マスクに基づいて、前記第1奥行きおよび前記第2奥行きを統合することによって統合奥行きを算出する。   A depth acquisition device according to an aspect of the present disclosure includes a memory, and a processor, wherein the processor acquires a visible light image generated by imaging a subject based on visible light and stored in the memory, It is measured by receiving the infrared light radiated from and reflected by the subject, acquires the intensity of the infrared light stored in the memory, and, based on the visible light image, Calculating a first depth that is a distance, calculating a second depth that is a distance to the subject based on the intensity of the infrared light, and expressing the reliability of the first depth in multiple values. Calculating a mask, calculating a second reliability mask representing the reliability of the second depth in multiple values, and calculating the first depth and the second depth mask based on the first reliability mask and the second reliability mask. 2 depth Calculating the integration depth by integrating.

なお、これらの包括的または具体的な態様は、システム、方法、集積回路、コンピュータプログラムまたはコンピュータ読み取り可能なCD−ROMなどの記録媒体で実現されてもよく、システム、方法、集積回路、コンピュータプログラムおよび記録媒体の任意な組み合わせで実現されてもよい。また、記録媒体は、非一時的な記録媒体であってもよい。   Note that these comprehensive or specific aspects may be realized by a recording medium such as a system, a method, an integrated circuit, a computer program or a computer-readable CD-ROM, and the system, the method, the integrated circuit, and the computer program. And any combination of recording media. Further, the recording medium may be a non-transitory recording medium.

本開示の奥行取得装置は、被写体までの距離である奥行きを正確に取得することができる。本開示の一態様における更なる利点および効果は、明細書および図面から明らかにされる。かかる利点および/または効果は、いくつかの実施の形態並びに明細書および図面に記載された特徴によってそれぞれ提供されるが、1つまたはそれ以上の同一の特徴を得るために必ずしも全てが提供される必要はない。   The depth acquisition device according to the present disclosure can accurately acquire the depth that is the distance to the subject. Further advantages and advantages of one aspect of the present disclosure will be apparent from the description and drawings. Such advantages and / or advantages are each provided by some embodiments and by the features described in the specification and drawings, but are not necessarily all provided to obtain one or more of the same features. No need.

図1は、実施の形態における奥行取得装置のハードウェア構成を示すブロック図である。FIG. 1 is a block diagram illustrating a hardware configuration of the depth acquisition device according to the embodiment. 図2は、実施の形態における固体撮像素子が有する画素アレイを示す模式図である。FIG. 2 is a schematic diagram illustrating a pixel array included in the solid-state imaging device according to the embodiment. 図3は、実施の形態おける、光源の発光素子の発光タイミングと、固体撮像素子の第1画素の露光タイミングとの関係を示すタイミング図である。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. 図4は、実施の形態おける奥行取得装置の機能構成の一例を示すブロック図である。FIG. 4 is a block diagram illustrating an example of a functional configuration of the depth acquisition device according to the embodiment. 図5は、実施の形態おけるIR強度取得部によって取得される赤外光の強度の一例を示す図である。FIG. 5 is a diagram illustrating an example of the intensity of infrared light acquired by the IR intensity acquisition unit according to the embodiment. 図6は、実施の形態おけるIR強度取得部によって取得される赤外光の強度の他の例を示す図である。FIG. 6 is a diagram illustrating another example of the intensity of infrared light acquired by the IR intensity acquisition unit according to the embodiment. 図7は、実施の形態おけるIR強度取得部によって取得される赤外光の強度と、バックグラウンドノイズとの一例を示す図である。FIG. 7 is a diagram illustrating an example of the intensity of infrared light acquired by the IR intensity acquisition unit and background noise according to the embodiment. 図8は、信頼性が低い赤外光の強度のパターンを示す図である。FIG. 8 is a diagram illustrating a pattern of the intensity of infrared light having low reliability. 図9は、信頼性が高い赤外光の強度のパターンを示す図である。FIG. 9 is a diagram illustrating a pattern of infrared light intensity with high reliability. 図10は、実施の形態におけるIR信頼性マスクの算出方法の一例を示す図である。FIG. 10 is a diagram illustrating an example of a method of calculating an IR reliability mask according to the embodiment. 図11は、実施の形態における奥行取得装置の処理動作を示すフローチャートである。FIG. 11 is a flowchart illustrating a processing operation of the depth acquisition device according to the embodiment. 図12は、実施の形態における奥行取得装置による信頼性マスクの算出の詳細な処理動作を示すフローチャートである。FIG. 12 is a flowchart illustrating a detailed processing operation of calculating a reliability mask by the depth acquisition device according to the embodiment. 図13は、実施の形態の変形例における奥行取得装置の機能構成の一例を示すブロック図である。FIG. 13 is a block diagram illustrating an example of a functional configuration of a depth acquisition device according to a modification of the embodiment.

(本開示の基礎となった知見)
本発明者は、「背景技術」の欄において記載した、特許文献1の測距装置に関し、以下の問題が生じることを見出した。
(Knowledge underlying the present disclosure)
The present inventor has found that the following problems occur with respect to the distance measuring device of Patent Document 1 described in the section of “Background Art”.

特許文献1の測距装置は、上述のように、光源から被写体に光を照射し、光が照射された被写体を撮像することによって画像を取得し、その画像の奥行きを測定する。この奥行きの測定には、ToF(Time of Flight)が用いられる。このような測距装置では、測距精度を向上させるために、互いに異なる撮像条件の撮像が行われる。つまり、測距装置は、所定の撮像条件にしたがって撮像を行い、その撮像結果に応じて、その所定の撮像条件と異なる撮像条件を設定する。そして、測距装置は、その設定された撮像条件にしたがって再び撮像を行う。   As described above, the distance measuring device of Patent Literature 1 irradiates a subject with light from a light source, captures an image of the subject irradiated with the light, acquires an image, and measures the depth of the image. For measuring the depth, a time of flight (ToF) is used. In such a distance measuring device, imaging under different imaging conditions is performed in order to improve ranging accuracy. That is, the distance measuring device performs imaging according to the predetermined imaging condition, and sets an imaging condition different from the predetermined imaging condition according to the imaging result. Then, the distance measuring device performs imaging again according to the set imaging conditions.

しかしながら、上記特許文献1の測距装置は、撮像条件を変更しても、照射光に対する反射率が低い被写体までの距離である奥行きを正しく測定することが難しい。   However, it is difficult for the distance measuring device of Patent Document 1 to correctly measure the depth, which is the distance to a subject having low reflectance with respect to irradiation light, even when imaging conditions are changed.

このような問題を解決するために、本開示の一態様に係る奥行取得装置は、メモリと、プロセッサとを備え、前記プロセッサは、可視光に基づく被写体の撮像によって生成され、前記メモリに保存されている可視光画像を取得し、光源から照射されて前記被写体によって反射された赤外光を受光することによって計測され、前記メモリに保存されている前記赤外光の強度を取得し、前記可視光画像に基づいて、前記被写体までの距離である第1奥行きを算出し、前記赤外光の強度に基づいて、前記被写体までの距離である第2奥行きを算出し、前記第1奥行きの信頼性を多値で表す第1信頼性マスクを算出し、前記第2奥行きの信頼性を多値で表す第2信頼性マスクを算出し、前記第1信頼性マスクおよび前記第2信頼性マスクに基づいて、前記第1奥行きおよび前記第2奥行きを統合することによって統合奥行きを算出する。例えば、前記第1信頼性マスクおよび前記第2信頼性マスクはそれぞれ、0以上1以下の係数であり、前記統合奥行きの算出では、前記第1信頼性マスクおよび前記第2信頼性マスクを、前記第1奥行きに対する重み係数および前記第2奥行きに対する重み係数としてそれぞれ用いた、前記第1奥行きと第2奥行きとの重み付け加算によって、前記統合奥行きを算出してもよい。   In order to solve such a problem, a depth acquisition device according to an aspect of the present disclosure includes a memory and a processor, wherein the processor is generated by imaging a subject based on visible light, and is stored in the memory. Acquiring the visible light image, measuring the intensity of the infrared light emitted from the light source and receiving the infrared light reflected by the object, and acquiring the intensity of the infrared light stored in the memory. A first depth that is a distance to the subject is calculated based on the light image, a second depth that is a distance to the subject is calculated based on the intensity of the infrared light, and the reliability of the first depth is calculated. A first reliability mask expressing multiplicity is calculated, a second reliability mask expressing multiplicity of the second depth reliability is calculated, and the first reliability mask and the second reliability mask are calculated. On the basis of, Calculating the integration depth by integrating serial first depth and said second depth. For example, each of the first reliability mask and the second reliability mask is a coefficient of 0 or more and 1 or less. In the calculation of the integrated depth, the first reliability mask and the second reliability mask The integrated depth may be calculated by weighted addition of the first depth and the second depth, which are used as a weighting factor for the first depth and a weighting factor for the second depth, respectively.

これにより、被写体に反射された赤外光の強度に基づいて、その被写体までの距離として第2奥行きが算出されるだけでなく、可視光画像に基づく第1奥行きも、その被写体までの距離として算出される。そして、これらの第1奥行きと第2奥行きとが、第1信頼性マスクおよび第2信頼性マスクに基づいて統合される。したがって、被写体における赤外光の反射率が低いために、その赤外光の強度に基づいて算出された第2奥行きの信頼性が低くても、第1奥行きを用いて、その第2奥行きを補正し、統合奥行きとして算出することができる。言い換えれば、第2奥行きが欠損していても、第1奥行きでその欠損を補うことができる。その結果、最終的に算出される奥行きの信頼性または精度を向上することができる。   Thereby, not only is the second depth calculated as the distance to the subject based on the intensity of the infrared light reflected by the subject, but also the first depth based on the visible light image is calculated as the distance to the subject. Is calculated. Then, the first depth and the second depth are integrated based on the first reliability mask and the second reliability mask. Therefore, even if the reliability of the second depth calculated based on the intensity of the infrared light is low because the reflectance of the infrared light on the subject is low, the second depth is calculated using the first depth. It can be corrected and calculated as an integrated depth. In other words, even if the second depth is missing, the first depth can compensate for the missing. As a result, the reliability or accuracy of the finally calculated depth can be improved.

また、第1信頼性マスクおよび第2信頼性マスクはそれぞれ多値であるため、第1奥行きと第2奥行きとの統合を精細に行うことができ、適切な統合奥行きを算出することができる。   Further, since the first reliability mask and the second reliability mask are each multi-valued, it is possible to precisely integrate the first depth and the second depth, and to calculate an appropriate integrated depth.

また、前記赤外光の受光は、赤外光に基づく撮像によって行われ、前記可視光に基づく撮像と、前記赤外光に基づく撮像とでは、撮像対象のシーンと、撮像の視点および時刻とが実質的に同一であってもよい。   Further, the reception of the infrared light is performed by imaging based on infrared light. In the imaging based on the visible light and the imaging based on the infrared light, a scene to be imaged, a viewpoint and time of imaging, and May be substantially the same.

これにより、可視光に基づく撮像によって得られる可視光画像の各画素と、赤外光に基づく撮像によって得られる赤外光画像の各画素とを適切に対応付けることができる。したがって、互いに対応する第1奥行きと第2奥行きとを用いて、統合奥行きを高い精度で算出することができる。   This makes it possible to appropriately associate each pixel of the visible light image obtained by imaging based on visible light with each pixel of the infrared light image obtained by imaging based on infrared light. Therefore, the integrated depth can be calculated with high accuracy using the first depth and the second depth corresponding to each other.

ここで、実質的に同一の視点および時刻で撮像した実質的に同一のシーンの画像の一例としては、同一撮像素子の異なる画素で撮像された画像である。このような画像は、ベイヤー配列のカラーフィルタで撮像されたカラー画像の赤、緑および青の各チャンネル画像と同様のものであり、各画像の画角、視点および撮像時刻はほぼ等しい。つまり、実質的に同一の視点および時刻で撮像した実質的に同一のシーンの画像は、撮像された各画像において、被写体の画像上での位置が2画素以上、異ならない。例えば、シーンに可視光と赤外成分を有する点光源が存在し、可視光画像において1画素のみが高輝度に撮像されている場合、赤外光画像においても可視光画像で撮像されている画素位置に対応する画素の2画素より近傍に点光源が撮像される。また、実質的に同一の時刻の撮像とは、撮像時刻の差が1フレーム以下で等しいことを示している。   Here, an example of an image of substantially the same scene captured at substantially the same viewpoint and time is an image captured by different pixels of the same image sensor. Such an image is similar to each of the red, green, and blue channel images of a color image captured by the color filter of the Bayer array, and the angle of view, viewpoint, and imaging time of each image are substantially equal. That is, images of substantially the same scene captured at substantially the same viewpoint and time do not differ by more than two pixels in the position of the subject in each captured image. For example, if a scene has a point light source having visible light and infrared components, and only one pixel is captured with high brightness in the visible light image, the pixel captured in the visible light image is also used in the infrared light image. The point light source is imaged near two pixels of the pixel corresponding to the position. Further, “imaging at substantially the same time” indicates that the difference between the imaging times is equal in one frame or less.

また、前記メモリから取得される前記赤外光の強度は、前記光源から照射されて前記被写体に反射された赤外光が撮像素子によって受光されるときに、互いに異なる少なくとも3回のタイミングでの前記撮像素子の露光によって計測された少なくとも3つの強度からなり、前記第2奥行きの算出では、前記少なくとも3つの強度に基づいて前記第2奥行きを算出してもよい。   Further, the intensity of the infrared light acquired from the memory is at least three times different from each other when the infrared light emitted from the light source and reflected by the subject is received by the image sensor. In the calculation of the second depth, the second depth may be calculated based on the at least three intensities, the second depth being calculated from at least three intensities measured by exposure of the image sensor.

これにより、ToFを用いて第2奥行きを高い精度で算出することができる。   Thus, the second depth can be calculated with high accuracy using ToF.

また、前記第1信頼性マスクの算出では、1から前記第2信頼性マスクを減算することによって前記第1信頼性マスクを算出してもよい。   In the calculation of the first reliability mask, the first reliability mask may be calculated by subtracting the second reliability mask from one.

これにより、第1信頼性マスクを可視光画像から算出する場合と比較してその算出の負荷を低減することができる。   This makes it possible to reduce the calculation load as compared with the case where the first reliability mask is calculated from the visible light image.

また、前記統合奥行きの算出では、前記第2信頼性マスクが閾値以上である場合には、前記第2奥行きを前記統合奥行きとして算出してもよい。   In the calculation of the integrated depth, the second depth may be calculated as the integrated depth when the second reliability mask is equal to or larger than a threshold value.

これにより、第2信頼性マスクが閾値以上の場合には、第2奥行きの信頼性が十分に高く、第1奥行きと第2奥行きとを統合させる必要がない。したがって、このような場合には、第2奥行きを統合奥行きとして算出することによって、統合のための処理を省くことができ、処理負荷の低減を図ることができる。   Accordingly, when the second reliability mask is equal to or larger than the threshold, the reliability of the second depth is sufficiently high, and there is no need to integrate the first depth and the second depth. Therefore, in such a case, by calculating the second depth as the integrated depth, the processing for integration can be omitted, and the processing load can be reduced.

また、前記統合奥行きの算出では、前記第2奥行きを算出することができない場合には、前記第1奥行きを前記統合奥行きとして算出してもよい。   Further, in the calculation of the integrated depth, when the second depth cannot be calculated, the first depth may be calculated as the integrated depth.

例えば、空などの無限遠が被写体として扱われる場合などには、第2奥行きを適切に算出することができない。したがって、このような場合に、第1奥行きを統合奥行きとして算出することによって、第2奥行きの欠損を第1奥行きで簡単に補うことができる。   For example, when infinity such as the sky is treated as a subject, the second depth cannot be appropriately calculated. Therefore, in such a case, by calculating the first depth as the integrated depth, the loss of the second depth can be easily compensated for by the first depth.

また、前記第2信頼性マスクの算出では、前記少なくとも3つの強度のうちの最大の強度と最小の強度との比に基づいて、前記第2信頼性マスクを算出してもよい。   In the calculation of the second reliability mask, the second reliability mask may be calculated based on a ratio between a maximum intensity and a minimum intensity of the at least three intensities.

少なくとも3の強度のうちの最大の強度を信号強度として見なすことができ、最小の強度をノイズ強度として見なすことができる。したがって、最大の強度と最小の強度との比、すなわちSN比に基づいて第2信頼性マスクが算出されるため、その第2信頼性マスクを適切に算出することができる。   The largest of the at least three intensities can be considered as signal strength, and the smallest can be considered as noise strength. Therefore, since the second reliability mask is calculated based on the ratio between the maximum intensity and the minimum intensity, that is, the SN ratio, the second reliability mask can be appropriately calculated.

また、本開示の他の態様に係る奥行取得装置は、メモリと、プロセッサとを備え、前記プロセッサは、可視光に基づく被写体の撮像によって生成され、前記メモリに保存されている可視光画像を取得し、光源から照射されて前記被写体によって反射された赤外光を受光することによって計測され、前記メモリに保存されている前記赤外光の強度を取得し、前記可視光画像に基づいて、前記被写体までの距離である第1奥行きを算出し、前記赤外光の強度に基づいて、前記被写体までの距離である第2奥行きを算出し、前記可視光画像、前記赤外光の強度、前記第1奥行きおよび前記第2奥行きを、学習モデルに入力することによって、前記第1奥行きと前記第2奥行きとが統合された統合奥行きを、前記学習モデルから取得してもよい。   Further, a depth acquisition device according to another aspect of the present disclosure includes a memory, and a processor, wherein the processor acquires a visible light image generated by imaging a subject based on visible light and stored in the memory. The infrared light emitted from the light source and reflected by the subject is measured by receiving the infrared light, the intensity of the infrared light stored in the memory is obtained, and based on the visible light image, A first depth that is a distance to the subject is calculated, and a second depth that is a distance to the subject is calculated based on the intensity of the infrared light, the visible light image, the intensity of the infrared light, By inputting the first depth and the second depth to a learning model, an integrated depth obtained by integrating the first depth and the second depth may be obtained from the learning model.

これにより、可視光画像、赤外光の強度、第1奥行きおよび第2奥行きの入力に対して、正解の統合奥行きが出力されるように、学習モデルに予め学習させておけば、第1信頼性マスクおよび第2信頼性マスクを算出することなく、適切な統合奥行きを簡単に取得することができる。   Accordingly, if the learning model is trained in advance so that a correct integrated depth is output in response to the input of the visible light image, the intensity of the infrared light, the first depth, and the second depth, the first reliability is obtained. The appropriate integrated depth can be easily obtained without calculating the reliability mask and the second reliability mask.

なお、これらの包括的または具体的な態様は、システム、方法、集積回路、コンピュータプログラムまたはコンピュータ読み取り可能なCD−ROMなどの記録媒体で実現されてもよく、システム、方法、集積回路、コンピュータプログラムまたは記録媒体の任意な組み合わせで実現されてもよい。また、記録媒体は、非一時的な記録媒体であってもよい。   Note that these comprehensive or specific aspects may be realized by a recording medium such as a system, a method, an integrated circuit, a computer program or a computer-readable CD-ROM, and the system, the method, the integrated circuit, and the computer program. Alternatively, it may be realized by an arbitrary combination of recording media. Further, the recording medium may be a non-transitory recording medium.

以下、実施の形態について、図面を参照しながら具体的に説明する。   Hereinafter, embodiments will be specifically described with reference to the drawings.

なお、以下で説明する実施の形態は、いずれも包括的または具体的な例を示すものである。以下の実施の形態で示される数値、形状、材料、構成要素、構成要素の配置位置及び接続形態、ステップ、ステップの順序などは、一例であり、本開示を限定する主旨ではない。また、以下の実施の形態における構成要素のうち、最上位概念を示す独立請求項に記載されていない構成要素については、任意の構成要素として説明される。   Each of the embodiments described below shows a comprehensive or specific example. Numerical values, shapes, materials, constituent elements, arrangement positions and connection forms of constituent elements, steps, order of steps, and the like shown in the following embodiments are merely examples, and do not limit the present disclosure. In addition, among the components in the following embodiments, components not described in the independent claims indicating the highest concept are described as arbitrary components.

また、各図は、模式図であり、必ずしも厳密に図示されたものではない。また、各図において、同じ構成部材については同じ符号を付している。   In addition, each drawing is a schematic diagram, and is not necessarily strictly illustrated. In each drawing, the same components are denoted by the same reference numerals.

(実施の形態)
[ハードウェア構成]
図1は、実施の形態に係る奥行取得装置1のハードウェア構成を示すブロック図である。本実施の形態における奥行取得装置1は、赤外光(または近赤外線光)に基づく画像と、可視光に基づく画像とを、実質的に同一のシーンに対する撮像であって、かつ、実質的に同一の視点および時刻での撮像によって取得することができるハードウェア構成を有する。なお、実質的に同一とは、本開示における効果を奏し得る程度に同一であることを意味する。
(Embodiment)
[Hardware configuration]
FIG. 1 is a block diagram illustrating a hardware configuration of the depth acquisition device 1 according to the embodiment. The depth acquisition device 1 according to the present embodiment captures an image based on infrared light (or near infrared light) and an image based on visible light for substantially the same scene, and substantially It has a hardware configuration that can be obtained by imaging at the same viewpoint and time. In addition, substantially the same means that they are the same to the extent that the effects of the present disclosure can be obtained.

図1に示されるように、奥行取得装置1は、光源10と、固体撮像素子20と、処理回路30と、拡散板50と、レンズ60と、バンドパスフィルタ70とを含んで構成される。   As shown in FIG. 1, the depth acquisition device 1 includes a light source 10, a solid-state imaging device 20, a processing circuit 30, a diffusion plate 50, a lens 60, and a bandpass filter 70.

光源10は、照射光を照射する。より具体的には、光源10は、処理回路30で生成された発光信号によって示されるタイミングで、被写体に照射する照射光を発光する。   The light source 10 emits irradiation light. More specifically, the light source 10 emits irradiation light to irradiate the subject at a timing indicated by the light emission signal generated by the processing circuit 30.

光源10は、例えば、コンデンサ、駆動回路、及び発光素子を含んで構成され、コンデンサに蓄積された電気エネルギーで発光素子を駆動することで発光する。発光素子は、一例として、レーザダイオード、発光ダイオード等により実現される。なお、光源10は、1種類の発光素子を含む構成であっても構わないし、目的に応じた複数種類の発光素子を含む構成であっても構わない。   The light source 10 includes, for example, a capacitor, a driving circuit, and a light emitting element, and emits light by driving the light emitting element with electric energy stored in the capacitor. The light emitting element is realized by, for example, a laser diode, a light emitting diode, or the like. The light source 10 may be configured to include one type of light emitting element, or may be configured to include a plurality of types of light emitting elements according to the purpose.

以下では、発光素子は、例えば、近赤外線光を発光するレーザダイオード、または、近赤外線光を発光する発光ダイオード等である。しかしながら、光源10が照射する照射光は、近赤外線光に限定される必要はない。光源10が照射する照射光は、例えば、近赤外線光以外の周波数帯の赤外光(赤外線光ともいう)であっても構わない。以下、本実施の形態では、光源10が照射する照射光を赤外光として説明するが、その赤外光は、近赤外線光であってもよく、近赤外線光以外の周波数帯の赤外光であってもよい。   Hereinafter, the light emitting element is, for example, a laser diode that emits near infrared light, a light emitting diode that emits near infrared light, or the like. However, the irradiation light emitted by the light source 10 need not be limited to near-infrared light. The irradiation light emitted by the light source 10 may be, for example, infrared light in a frequency band other than near-infrared light (also referred to as infrared light). Hereinafter, in the present embodiment, the irradiation light emitted from the light source 10 will be 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. It may be.

固体撮像素子20は、被写体を撮像して露光量を示す撮像信号を出力する。より具体的には、固体撮像素子20は、処理回路30で生成された露光信号によって示されるタイミングで露光を行い、露光量を示す撮像信号を出力する。   The solid-state imaging device 20 captures an image of a subject and outputs an imaging signal indicating an exposure amount. More specifically, the solid-state imaging device 20 performs exposure at a timing indicated by the exposure signal generated by the processing circuit 30, and outputs an imaging signal indicating an exposure amount.

固体撮像素子20は、照射光が被写体により反射した反射光を用いて撮像する第1画素と、被写体を撮像する第2画素とがアレイ状に配置されてなる画素アレイを有する。固体撮像素子20は、例えば、必要に応じて、カバーガラス、ADコンバータ等のロジック機能を有していても構わない。   The solid-state imaging device 20 has a pixel array in which a first pixel that captures an image using reflected light of irradiation light reflected by a subject and a second pixel that captures an image of the subject are arranged in an array. For example, the solid-state imaging device 20 may have a logic function such as a cover glass and an AD converter as needed.

以下では、照射光と同様に、反射光は、赤外光であるとして説明するが、反射光は、照射光が被写体により反射した光であれば、赤外光に限定される必要はない。   Hereinafter, similar to the irradiation light, the description will be made on the assumption that the reflected light is infrared light. However, the reflected light does not need to be limited to the infrared light as long as the irradiation light is light reflected by the subject.

図2は、固体撮像素子20が有する画素アレイ2を示す模式図である。   FIG. 2 is a schematic diagram illustrating the pixel array 2 included in the solid-state imaging device 20.

図2に示されるように、画素アレイ2は、照射光が被写体により反射した反射光を用いて撮像する第1画素21(IR画素)と、被写体を撮像する第2画素22(BW画素)とが列単位で交互に並ぶように、アレイ状に配置されて構成される。   As shown in FIG. 2, the pixel array 2 includes a first pixel 21 (IR pixel) that captures an image using reflected light of irradiation light reflected by the subject, and a second pixel 22 (BW pixel) that captures an image of the subject. Are arranged in an array so that are alternately arranged in column units.

また、図2では、画素アレイ2において、第2画素22と第1画素21が行方向に隣接するように並べられ、行方向のストライプ状に並ぶように配置されているが、これに限定されず、複数行置き(一例として、2行置き)に配置されていてもよい。つまり、第2画素22が行方向に隣接するように並べられる第1の行と第1画素21が行方向に隣接するように並べられる第2の行は、M行置き(Mは自然数)に交互に配置されてもよい。更に、第2画素22が行方向に隣接するように並べられる第1の行と第1画素21が行方向に隣接するように並べられる第2の行は、異なる行置き(第1の行はN行、第2の行はL行を交互に繰り返す(NとLは、異なる自然数))に配置されていてもよい。   Further, in FIG. 2, in the pixel array 2, the second pixels 22 and the first pixels 21 are arranged so as to be adjacent to each other in the row direction, and are arranged so as to be arranged in a stripe shape in the row direction. Instead, they may be arranged every other row (for example, every other row). That is, the first row in which the second pixels 22 are arranged adjacent to each other in the row direction and the second row in which the first pixels 21 are arranged adjacent to each other in the row direction are arranged every M rows (M is a natural number). They may be arranged alternately. Further, the first row in which the second pixels 22 are arranged adjacent to each other in the row direction and the second row in which the first pixels 21 are arranged adjacent to each other in the row direction are different row intervals (the first row is different). The N rows and the second rows may be arranged such that L rows are alternately repeated (N and L are different natural numbers).

第1画素21は、例えば、反射光である赤外光に感度を有する赤外光画素で実現される。第2画素22は、例えば、可視光に感度を有する可視光画素で実現される。   The first pixel 21 is realized by, for example, an infrared light pixel having sensitivity to infrared light that is reflected light. The second pixel 22 is realized by, for example, a visible light pixel having sensitivity to visible light.

赤外光画素は、例えば、赤外光のみを透過させる光学フィルタ(IRフィルタともいう)、マイクロレンズ、光電変換部としての受光素子、および、受光素子で生成された電荷を蓄積する蓄積部等を含んで構成される。したがって、画素アレイ2に含まれる複数の赤外光画素(すなわち第1画素21)から出力される撮像信号によって、赤外光の輝度を示す画像が表現される。この赤外光の画像を、以下、IR画像または赤外光画像ともいう。   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 serving as a photoelectric conversion unit, and a storage unit that stores charges generated by the light receiving element. It is comprised including. Therefore, an image indicating the luminance of the infrared light is expressed by the imaging signals output from the plurality of infrared light pixels (that is, the first pixels 21) included in the pixel array 2. Hereinafter, this infrared light image is also referred to as an IR image or an infrared light image.

また、可視光画素は、例えば、可視光のみを透過させる光学フィルタ(BWフィルタともいう)、マイクロレンズ、光電変換部としての受光素子、および、受光素子で変換された電荷を蓄積する蓄積部等を含んで構成される。したがって、可視光画素、すなわち第2画素22は、輝度および色差を示す撮像信号を出力する。つまり、画素アレイ2に含まれる複数の第2画素22から出力される撮像信号によって、可視光の輝度および色差を示すカラー画像が表現される。なお、可視光画素の光学フィルタは、可視光と赤外光との双方を透過させても構わないし、可視光のうち、赤(R)、緑(G)、または青(B)等の特定の波長帯域の光だけを透過させても構わない。   The visible light pixel includes, for example, an optical filter (also referred to as a BW filter) that transmits only visible light, a microlens, a light receiving element as a photoelectric conversion unit, and a storage unit that accumulates charges converted by the light receiving element. It is comprised including. Therefore, the visible light pixel, that is, the second pixel 22 outputs an imaging signal indicating luminance and color difference. That is, a color image indicating the luminance and color difference of visible light is represented by the imaging signals 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 the visible light and the infrared light, and may specify the visible light such as red (R), green (G), or blue (B). May be transmitted.

また、可視光画素は、可視光の輝度のみを検出してもよい。この場合には、可視光画素、すなわち第2画素22は、輝度を示す撮像信号を出力する。したがって、画素アレイ2に含まれる複数の第2画素22から出力される撮像信号によって、可視光の輝度を示す白黒の画像、言い換えればモノクロの画像が表現される。このモノクロの画像を、以下、BW画像ともいう。なお、上述のカラー画像およびBW画像を総称して、可視光画像ともいう。   Further, the visible light pixel may detect only the luminance of the visible light. In this case, the visible light pixel, that is, the second pixel 22 outputs an imaging signal indicating luminance. Therefore, a monochrome image indicating the luminance of visible light, in other words, a monochrome image, is represented by the imaging signals output from the plurality of second pixels 22 included in the pixel array 2. Hereinafter, this monochrome image is also referred to as a BW image. The above-described color image and BW image are collectively referred to as a visible light image.

再び図1に戻って、奥行取得装置1の説明を続ける。   Returning to FIG. 1 again, the description of the depth acquisition device 1 will be continued.

処理回路30は、固体撮像素子20によって出力された撮像信号を用いて、被写体に係る被写体情報を演算する。   The processing circuit 30 calculates subject information on the subject using the imaging signal output by the solid-state imaging device 20.

処理回路30は、例えば、マイクロコンピュータ等の演算処理装置によって構成される。マイクロコンピュータは、プロセッサ(マイクロプロセッサ)、メモリ等を含み、メモリに格納された駆動プログラムがプロセッサにより実行されることで、発光信号および露光信号を生成する。なお、処理回路30は、FPGAまたはISP等を用いてもよく、1つのハードウェアから構成されても、複数のハードウェアから構成されてもかまわない。   The processing circuit 30 is configured by an arithmetic processing device such as a microcomputer, for example. The microcomputer includes a processor (microprocessor), a memory, and the like, and generates a light emission signal and an exposure signal by executing a driving program stored in the memory by the processor. Note that the processing circuit 30 may use an FPGA, an ISP, or the like, and may be configured by one piece of hardware or a plurality of pieces of hardware.

処理回路30は、例えば、固体撮像素子20の第1画素21からの撮像信号を用いて行うToF測距方式により、被写体までの距離を算出する。   The processing circuit 30 calculates the distance to the subject by, for example, a ToF distance measurement method performed using an imaging signal from the first pixel 21 of the solid-state imaging device 20.

以下、図面を参照しながら、処理回路30が行うToF測距方式による被写体までの距離の算出について説明する。   Hereinafter, the calculation of the distance to the subject by the ToF ranging method performed by the processing circuit 30 will be described with reference to the drawings.

図3は、処理回路30が、ToF測距方式を用いて被写体までの距離の算出を行う際における、光源10の発光素子の発光タイミングと、固体撮像素子20の第1画素21の露光タイミングとの関係を示すタイミング図である。   FIG. 3 shows 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 device 20 when the processing circuit 30 calculates the distance to the subject using the ToF ranging method. FIG. 4 is a timing chart showing the relationship of FIG.

図3において、Tpは光源10の発光素子が照射光を発光する発光期間であり、Tdは、光源10の発光素子が照射光を発光してから、その照射光が被写体により反射した反射光が、固体撮像素子20に戻ってくるまでの遅延時間である。そして、第1露光期間は、光源10が照射光を発光する発光期間と同じタイミングとなっており、第2露光期間は、第1露光期間の終了時点から、発光期間Tpが経過するまでのタイミングとなっている。   In FIG. 3, Tp is a light emission period in which the light emitting element of the light source 10 emits irradiation light, and Td is a reflection light in which the irradiation light is reflected by the subject after the light emitting element of the light source 10 emits irradiation light. , The delay time before returning to the solid-state imaging device 20. The first exposure period has the same timing as the light emission period in which the light source 10 emits the irradiation light, and the second exposure period has the timing from the end of the first exposure period to the elapse of the light emission period Tp. It has become.

図3において、q1は、第1露光期間内における反射光による、固体撮像素子20の第1画素21における露光量の総量を示し、q2は、第2露光期間内における反射光による、固体撮像素子20の第1画素21における露光量の総量を示す。   In FIG. 3, q1 indicates the total amount of exposure of the first pixel 21 of the solid-state imaging device 20 due to the reflected light within the first exposure period, and q2 indicates the solid-state imaging device due to the reflected light within the second exposure period. 20 shows the total amount of exposure in the first pixel 21 of FIG.

光源10の発光素子による照射光の発光と、固体撮像素子20の第1画素21による露光とを、図3に示されるタイミングで行うことで、被写体までの距離dは、光速をcとして、以下の(式1)で表すことができる。   The emission of the irradiation light by the light emitting element of the light source 10 and the exposure by the first pixel 21 of the solid-state imaging device 20 are performed at the timing shown in FIG. (Equation 1).

d=c×Tp/2×q2/(q1+q2) ・・・(式1)   d = c × Tp / 2 × q2 / (q1 + q2) (formula 1)

このため、処理回路30は、(式1)を利用することで、固体撮像素子20の第1画素21からの撮像信号を用いて、被写体までの距離を算出することができる。   Therefore, 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 by using (Equation 1).

また、固体撮像素子20の複数の第1画素21は、第1露光期間および第2露光期間の終了後に、第3露光期間Tpだけ露光してもよい。複数の第1画素21は、この第3露光期間Tpにおいて得られる露光量によって、反射光以外のノイズを検出することができる。つまり、処理回路30は、上記(式1)において、第1露光期間の露光量q1および第2露光期間の露光量q2のそれぞれからノイズを削除することによって、より正確に、被写体までの距離dを算出することができる。   Further, the plurality of first pixels 21 of the solid-state imaging device 20 may be exposed for a third exposure period Tp after the first exposure period and the second exposure period have ended. The plurality of first pixels 21 can detect noise other than reflected light based on the exposure amount obtained in the third exposure period Tp. That is, the processing circuit 30 removes noise from each of the exposure amount q1 in the first exposure period and the exposure amount q2 in the second exposure period in the above (Equation 1), thereby more accurately determining the distance d to the subject. Can be calculated.

再び図1に戻って、奥行取得装置1の説明を続ける。   Returning to FIG. 1 again, the description of the depth acquisition device 1 will be continued.

処理回路30は、例えば、固体撮像素子20の第2画素22からの撮像信号を用いて、被写体の検知、及び被写体までの距離の算出を行ってもよい。   The processing circuit 30 may detect a subject and calculate a distance to the subject, for example, using an imaging signal from the second pixel 22 of the solid-state imaging device 20.

すなわち、処理回路30は、固体撮像素子20の複数の第2画素22によって撮像された可視光画像に基づいて、被写体の検知、及び被写体までの距離の算出を行ってもよい。ここで、被写体の検知は、例えば、被写体の特異点のエッジ検出によりパターン認識で形状の判別を行うことで実現してもよいし、事前に学習した学習モデルを利用してDeep Learningなどの処理により実現してもかまわない。また、被写体までの距離の算出は、世界座標変換を用いて行ってもよい。もちろん、可視光画像だけでなく、第1画素21によって撮像された赤外光の輝度や距離情報を利用してマルチモーダルな学習処理により被写体の検知を実現してもよい。   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 detection of the subject may be realized by, for example, determining the shape by pattern recognition by detecting the edge of a singular point of the subject, or processing such as Deep Learning using a learning model learned in advance. It may be realized by. The calculation of the distance to the subject may be performed using world coordinate transformation. Of course, the detection of the subject may be realized by a multi-modal learning process using not only the visible light image but also the luminance and distance information of the infrared light captured by the first pixel 21.

処理回路30は、発光するタイミングを示す発光信号と、露光するタイミングを示す露光信号とを生成する。そして、処理回路30は、生成した発光信号を光源10へ出力し、生成した露光信号を固体撮像素子20へ出力する。   The processing circuit 30 generates a light emission signal indicating a light emission timing and an exposure signal indicating an exposure timing. Then, the processing circuit 30 outputs the generated light emission signal to the light source 10 and outputs the generated exposure signal to the solid-state imaging device 20.

処理回路30は、例えば、所定の周期で光源10を発光させるように発光信号を生成して出力し、所定の周期で固体撮像素子20を露光させるように露光信号を生成して出力することで、奥行取得装置1に、所定のフレームレートによる連続撮像を実現させてもよい。また、処理回路30は、例えばプロセッサ(マイクロプロセッサ)、メモリ等を含み、メモリに格納された駆動プログラムがプロセッサにより実行されることで、発光信号および露光信号を生成する。   The processing circuit 30 generates and outputs an emission signal so as to cause the light source 10 to emit light at a predetermined cycle, and generates and outputs an exposure signal so as to expose the solid-state imaging device 20 at a predetermined cycle. Alternatively, the depth acquisition device 1 may realize continuous imaging at a predetermined frame rate. Further, the processing circuit 30 includes, for example, a processor (microprocessor), a memory, and the like, and generates a light emission signal and an exposure signal by executing a driving program stored in the memory by the processor.

拡散板50は、照射光の強度分布と角度を調整する。また、強度分布の調整では、拡散板50は、光源10からの照射光の強度分布を一様にする。なお、図1に示す例では、奥行取得装置1は、拡散板50を備えるが、この拡散板50を備えていなくてもよい。   The diffusion plate 50 adjusts the intensity distribution and angle of the irradiation light. In adjusting the intensity distribution, the diffusion plate 50 makes the intensity distribution of the irradiation light from the light source 10 uniform. In the example illustrated in FIG. 1, the depth acquisition device 1 includes the diffusion plate 50, but does not have to include the diffusion plate 50.

レンズ60は、奥行取得装置1の外部から入る光を、固体撮像素子20の画素アレイ2の表面に集光する光学レンズである。   The lens 60 is an optical lens that condenses light entering from outside the depth acquisition device 1 on the surface of the pixel array 2 of the solid-state imaging device 20.

バンドパスフィルタ70は、反射光である赤外光と、可視光とを透過させる光学フィルタである。   The band-pass filter 70 is an optical filter that transmits infrared light that is reflected light and visible light.

上記構成の奥行取得装置1は、輸送機器に搭載されて利用される。例えば、奥行取得装置1は、路面を走行する車両に搭載されて利用される。なお、奥行取得装置1が搭載される輸送機器は、必ずしも車両に限定される必要はない。奥行取得装置1は、例えば、オートバイ、ボート、飛行機等といった、車両以外の輸送機器に搭載されて利用されても構わない。   The depth acquisition device 1 having the above configuration is used by being mounted on a transportation device. For example, the depth acquisition device 1 is used by being mounted on a vehicle traveling on a road surface. The transport equipment on which the depth acquisition device 1 is mounted is not necessarily limited to a vehicle. The depth acquisition device 1 may be used by being mounted on a transportation device other than a vehicle, such as a motorcycle, a boat, and an airplane.

[奥行取得装置の機能構成]
本実施の形態における奥行取得装置1は、図1に示すハードウェア構成によって、IR画像とBW画像とを、実質的に同一のシーンに対する撮像であって、かつ、実質的に同一の視点および時刻の撮像によって取得する。そして、奥行取得装置1は、そのIR画像から得られる、そのIR画像内の各位置における奥行きと、そのBW画像から得られる、そのBW画像内の各位置における奥行きとを統合することによって、その各位置における統合奥行きを算出する。なお、本実施の形態において、IR画像は、各画素位置における赤外光の強度を示す。したがって、そのIR画像の取得は、固体撮像素子20の各第1画素21が赤外光を受光することによって計測された赤外光の強度の取得を意味する。
[Function Configuration of Depth Acquisition Device]
The depth acquisition device 1 according to the present embodiment uses the hardware configuration shown in FIG. 1 to capture an IR image and a BW image for substantially the same scene, and has substantially the same viewpoint and time. Is acquired by imaging. Then, the depth acquisition device 1 integrates the depth at each position in the IR image obtained from the IR image and the depth at each position in the BW image obtained from the BW image to obtain the depth. The integrated depth at each position is calculated. In the present embodiment, the IR image indicates the intensity of infrared light at each pixel position. Therefore, acquisition of the IR image means acquisition of the intensity of infrared light measured by each first pixel 21 of the solid-state imaging device 20 receiving infrared light.

図4は、奥行取得装置1の機能構成の一例を示すブロック図である。   FIG. 4 is a block diagram illustrating an example of a functional configuration of the depth acquisition device 1.

奥行取得装置1は、光源101と、IRカメラ102と、BWカメラ103と、プロセッサ110aと、メモリ200とを備える。なお、本実施の形態における奥行取得装置1は、光源101、IRカメラ102およびBWカメラ103を備えているが、これらの構成要素を備えず、プロセッサ110aおよびメモリ200のみを備えていてもよい。   The depth acquisition device 1 includes a light source 101, an IR camera 102, a BW camera 103, a processor 110a, and a memory 200. The depth acquisition device 1 according to the present embodiment includes the light source 101, the IR camera 102, and the BW camera 103, but may not include these components, and may include only the processor 110a and the memory 200.

光源101は、図1に示す光源10および拡散板50から構成されていてもよく、発光することによって赤外光を被写体に照射する。   The light source 101 may be composed of the light source 10 and the diffusion plate 50 shown in FIG. 1, and emits infrared light to a subject by emitting light.

IRカメラ102は、赤外光カメラともいい、図1に示す固体撮像素子20の複数の第1画素21、レンズ60およびバンドパスフィルタ70から構成されていてもよい。このようなIRカメラ102は、光源101が被写体に赤外光を照射するタイミングに応じて、その被写体を含むシーンの赤外光に基づく撮像を行うことによって、IR画像を取得する。   The IR camera 102 is also called an infrared light camera, and may be configured by the plurality of first pixels 21 of the solid-state imaging device 20 shown in FIG. Such an IR camera 102 acquires an IR image by performing imaging based on infrared light of a scene including the subject in accordance with the timing at which the light source 101 irradiates the subject with infrared light.

BWカメラ103は、可視光カメラともいい、図1に示す固体撮像素子20の複数の第2画素22、レンズ60およびバンドパスフィルタ70から構成されていてもよい。このようなBWカメラ103は、IR画像と実質的に同一のシーンの可視光に基づく撮像であって、そのIR画像と実質的に同一の視点および同一の時刻での撮像を行うことによって、可視光画像(具体的にはBW画像)を取得する。   The BW camera 103 is also called a visible light camera, and may be configured by the plurality of second pixels 22, the lens 60, and the bandpass filter 70 of the solid-state imaging device 20 illustrated in FIG. Such a BW camera 103 is an imaging based on visible light of a scene that is substantially the same as an IR image, and performs imaging at substantially the same viewpoint and at the same time as the IR image. An optical image (specifically, a BW image) is acquired.

メモリ200は、IRカメラ102による撮像によって得られたIR画像と、BWカメラ103による撮像によって得られたBW画像とを格納するための記録媒体である。なお、このようなメモリ200は、具体的には、ROM(Read Only Memory)、RAM(Random access memory)またはSSD(solid state drive)などであってもよく、不揮発性または揮発性であってもよい。また、メモリ200は、ハードディスクであってもよい。   The memory 200 is a recording medium for storing an IR image obtained by imaging by the IR camera 102 and a BW image obtained by imaging by the BW camera 103. Note that, specifically, such a memory 200 may be a ROM (Read Only Memory), a RAM (Random Access Memory), a solid state drive (SSD), or the like, and may be nonvolatile or volatile. Good. Further, the memory 200 may be a hard disk.

プロセッサ110aは、メモリ200からIR画像およびBW画像を取得し、IR画像から算出される奥行きと、BW画像から算出される奥行きとを統合する。このようなプロセッサ110aは、発光制御部113と、IR強度取得部114と、BW画像取得部115と、BW奥行算出部111aと、IR奥行算出部111bと、統合奥行算出部111cと、信頼性マスク算出部112とを備える。   The processor 110a acquires the IR image and the BW image from the memory 200, and integrates the depth calculated from the IR image and the depth calculated from the BW image. The processor 110a includes a light emission control unit 113, an IR intensity acquisition unit 114, a BW image acquisition unit 115, a BW depth calculation unit 111a, an IR depth calculation unit 111b, an integrated depth calculation unit 111c, And a mask calculation unit 112.

発光制御部113は、光源101を制御する。つまり、発光制御部113は、上述の発光信号を光源101に出力することによって、その光源101を発光させる。これにより、光源101から赤外光が被写体に照射され、その被写体によって反射された光である反射光がIRカメラ102に入射する。   The light emission control unit 113 controls the light source 101. That is, the light emission control unit 113 causes the light source 101 to emit light by outputting the above light emission signal to the light source 101. As a result, the subject is irradiated with infrared light from the light source 101, and reflected light, which is light reflected by the subject, enters the IR camera 102.

BW画像取得部115は、BWカメラ103からメモリ200を介してBW画像を取得する。つまり、BW画像取得部115は、可視光に基づく被写体の撮像によって生成され、メモリ200に保存されているBW画像を取得する。   The BW image acquisition unit 115 acquires a BW image from the BW camera 103 via the memory 200. That is, the BW image acquisition unit 115 acquires a BW image generated by imaging a subject based on visible light and stored in the memory 200.

IR強度取得部114は、IRカメラ102からメモリ200を介してIR画像を取得する。ここで、IR画像の各画素は、その画素の位置において受光された赤外光の強度を画素値(具体的には輝度)として示す。したがって、IR強度取得部114は、IR画像を取得することによって、赤外光の強度を取得する。つまり、IR強度取得部114は、光源101から照射されて被写体によって反射された赤外光を受光することによって計測され、メモリ200に保存されている赤外光の強度を取得する。   The IR intensity acquisition unit 114 acquires an IR image from the IR camera 102 via the memory 200. Here, each pixel of the IR image indicates the intensity of infrared light received at the position of the pixel as a pixel value (specifically, luminance). Therefore, the IR intensity acquisition unit 114 acquires the intensity of infrared light by acquiring an IR image. That is, the IR intensity acquisition unit 114 measures the intensity of the infrared light emitted from the light source 101 and reflected by the subject, and acquires the intensity of the infrared light stored in the memory 200.

BW奥行算出部111aは、BW画像取得部115によって取得されたBW画像に基づいて、被写体までの距離であるBW奥行きを算出する。なお、このBW奥行算出部111aは、第1奥行算出部に相当する。   The BW depth calculation unit 111a calculates a BW depth, which is a distance to a subject, based on the BW image acquired by the BW image acquisition unit 115. The BW depth calculation unit 111a corresponds to a first depth calculation unit.

IR奥行算出部111bは、IR強度取得部114によって取得された赤外光の強度に基づいて、被写体までの距離であるIR奥行きを算出する。なお、このIR奥行算出部111bは、第2奥行算出部に相当する。   The IR depth calculation unit 111b calculates the IR depth, which is the distance to the subject, based on the intensity of the infrared light acquired by the IR intensity acquisition unit 114. The IR depth calculator 111b corresponds to a second depth calculator.

信頼性マスク算出部112は、BW奥行きの信頼性を多値で表すBW信頼性マスクを算出し、さらに、IR奥行きの信頼性を多値で表すIR信頼性マスクを算出する。   The reliability mask calculation unit 112 calculates a BW reliability mask representing the BW depth reliability in multiple values, and further calculates an IR reliability mask representing the IR depth reliability in multiple values.

統合奥行算出部111cは、BW信頼性マスクおよびIR信頼性マスクに基づいて、BW奥行きおよびIR奥行きを統合することによって統合奥行きを算出する。   The integrated depth calculation unit 111c calculates an integrated depth by integrating the BW depth and the IR depth based on the BW reliability mask and the IR reliability mask.

このような本実施の形態における奥行取得装置1では、被写体に反射された赤外光の強度に基づいて、その被写体までの距離としてIR奥行きが算出されるだけでなく、BW画像に基づくBW奥行きも、その被写体までの距離として算出される。そして、これらのBW奥行きとIR奥行きとが、BW信頼性マスクおよびIR信頼性マスクに基づいて統合される。したがって、被写体における赤外光の反射率が低いために、その赤外光の強度に基づいて算出されたIR奥行きの信頼性が低くても、BW奥行きを用いて、そのIR奥行きを補正し、統合奥行きとして算出することができる。言い換えれば、IR奥行きが欠損していても、BW奥行きでその欠損を補うことができる。その結果、最終的に算出される被写体までの奥行きの信頼性または精度を向上することができる。   In the depth acquiring device 1 according to the present embodiment, not only the IR depth is calculated as the distance to the subject based on the intensity of the infrared light reflected by the subject, but also the BW depth based on the BW image. Is calculated as the distance to the subject. Then, the BW depth and the IR depth are integrated based on the BW reliability mask and the IR reliability mask. Therefore, even if the reliability of the IR depth calculated based on the intensity of the infrared light is low due to the low reflectance of the infrared light on the subject, the IR depth is corrected using the BW depth, It can be calculated as an integrated depth. In other words, even if the IR depth is missing, the BW depth can compensate for the missing. As a result, the reliability or accuracy of the depth to the subject finally calculated can be improved.

また、BW信頼性マスクおよびIR信頼性マスクはそれぞれ多値であるため、BW奥行きとIR奥行きとの統合を精細に行うことができ、適切な統合奥行きを算出することができる。   Further, since the BW reliability mask and the IR reliability mask are each multi-valued, it is possible to precisely integrate the BW depth and the IR depth, and to calculate an appropriate integrated depth.

また、本実施の形態では、赤外光の受光は、赤外光に基づく撮像によって行われ、可視光に基づく撮像と、赤外光に基づく撮像とでは、撮像対象のシーンと、撮像の視点および時刻とが実質的に同一である。これにより、可視光に基づく撮像によって得られるBW画像の各画素と、赤外光に基づく撮像によって得られるIR画像の各画素とを適切に対応付けることができる。したがって、互いに対応するBW奥行きとIR奥行きとを用いて、統合奥行きを高い精度で算出することができる。   In the present embodiment, the infrared light is received by imaging based on infrared light. In the imaging based on visible light and the imaging based on infrared light, the scene to be imaged and the viewpoint of the imaging are different. And the time are substantially the same. This makes it possible to appropriately associate each pixel of the BW image obtained by imaging based on visible light with each pixel of the IR image obtained by imaging based on infrared light. Therefore, the integrated depth can be calculated with high accuracy using the mutually corresponding BW depth and IR depth.

[赤外光の強度]
図5は、IR強度取得部114によって取得される赤外光の強度の一例を示す。
[Infrared light intensity]
FIG. 5 shows an example of the intensity of the infrared light acquired by the IR intensity acquisition unit 114.

本実施の形態におけるIRカメラ102に用いられる固体撮像素子20は、光源101から照射されて被写体に反射された赤外光を受光する。ここで、光源101から照射される赤外光はパルス光であるが、被写体に反射された赤外光の強度は、その反射または内部散乱などによって、図5の(a)に示すように、時間方向に広がる。   The solid-state imaging device 20 used in the IR camera 102 according to the present embodiment receives infrared light emitted from the light source 101 and reflected by the subject. Here, the infrared light emitted from the light source 101 is pulse light, and the intensity of the infrared light reflected by the subject is reflected or internally scattered as shown in FIG. Spread in the time direction.

本実施の形態におけるIR強度取得部114は、固体撮像素子20に反射光を受光させるときには、光源101が赤外光を照射するタイミングに応じて、上述の露光信号を固体撮像素子20に出力する。その結果、その固体撮像素子20は、互いに異なる少なくとも3回のタイミングで露光される。なお、そのタイミングを露光タイミングともいう。また、本実施の形態では、その露光タイミングは3回である。   When causing the solid-state imaging device 20 to receive reflected light, the IR intensity acquisition unit 114 in the present embodiment outputs the above-described exposure signal to the solid-state imaging device 20 according to the timing at which the light source 101 irradiates infrared light. . As a result, the solid-state imaging device 20 is exposed at least three different times. The timing is also referred to as exposure timing. In this embodiment, the exposure timing is three times.

固体撮像素子20は、反射光である赤外光を受光する場合、その3回の露光タイミングによって、図5の(a)に示すように、区間T1と、区間T1に後続する区間T2と、区間T2に後続する区間T3とのそれぞれで赤外光を受光する。なお、区間T1、T2およびT3はそれぞれ互いに異なる露光タイミングに露光される区間であって、これらの区間の時間間隔は同一である。この時間間隔は、測定対象の距離の範囲に基づいて定められる。例えば、主となる被写体までの距離Lが15m、光速cを3×10m/sとすると、反射光が理想的に返ってくる時間trは、tr=2L/c=100nsとなる。したがって、測定対象の反射光が理想的に返って来る時間100nsを、上述の時間間隔に用いることで、反射光を受光することが可能となる。なお、この時間間隔は、一例であり、反射光が受光されれば距離を算出できるため、厳密にその時間間隔を用いる必要はない。 When the solid-state imaging device 20 receives the infrared light that is the reflected light, the solid-state imaging device 20 receives a section T1 and a section T2 subsequent to the section T1 as shown in FIG. Infrared light is received in each of the section T3 following the section T2. The sections T1, T2 and T3 are sections exposed at different exposure timings, and the time intervals of these sections are the same. This time interval is determined based on the range of the distance to be measured. For example, if the distance L to the main subject is 15 m and the light speed c is 3 × 10 8 m / s, the time tr in which the reflected light returns ideally is tr = 2 L / c = 100 ns. Therefore, the reflected light can be received by using the time 100 ns at which the reflected light of the measurement target ideally returns in the above-mentioned time interval. Note that this time interval is an example, and the distance can be calculated if the reflected light is received. Therefore, it is not necessary to use the time interval exactly.

被写体がIRカメラ102に近い場合、固体撮像素子20によって受光される反射光の強度は、区間T1〜T3の中で最も早い区間T1において大きく、時間の経過とともに減少する。被写体との距離と反射光強度の関係については後述する。なお、固体撮像素子20には、背景光がバックグラウンドノイズとして何れの区間にも受光されている。また、区間T3において受光される赤外光の多くは、光源101に基づく反射光ではなくバックグラウンドノイズである。   When the subject is close to the IR camera 102, the intensity of the reflected light received by the solid-state imaging device 20 is large in the earliest section T1 of the sections T1 to T3 and decreases with time. The relationship between the distance to the subject and the reflected light intensity will be described later. Note that the solid-state imaging device 20 receives background light as background noise in any section. Most of the infrared light received in the section T3 is not reflected light from the light source 101 but background noise.

ここで、被写体とIRカメラ102との距離の遠近について説明する。赤外光を発光した時刻を0とし、区間T1の中央の時刻をT1Mとすると、時刻0から時刻T1Mまでの時間で光が伝播する距離LMはLM=c×T1Mである。ある画素に着目すると、その画素に対応する被写体までの距離がLM/2より小さい場合、被写体とIRカメラ102との距離は近いことを意味する。一方、その画素に対応する被写体までの距離がLM/2より大きい場合、被写体とIRカメラ102との距離は遠いことを意味する。言い換えると、区間T1の露光時間に反射光のピークがすでに通過した場合が近く、まだ通過していない場合が遠い。したがって、区間T1において、反射光のピークがすでに通過した場合、区間T2と区間T3で反射光の強度は増加することはない。一方、被写体までの距離が遠い場合、区間T1において、まだピークが到達していなため、区間T2および区間T3にかけて反射光の強度のピークが接近、あるいは、到達するため、区間T1で観測された反射光の強度よりも大きい強度が区間T2で観測され、区間T3で区間T2よりも大きい強度が観測される。但し、反射光の時間方向の広がりが上述の時間間隔以下であり、区間T2で反射光のピークが観測された場合、区間T3で観測される反射光の強度は区間T2より小さくなる。   Here, the distance between the subject and the IR camera 102 will be described. Assuming that the time when the infrared light is emitted is 0 and the time at the center of the section T1 is T1M, the distance LM that the light propagates in the time from time 0 to time T1M is LM = c × T1M. Focusing on a certain pixel, if the distance to the subject corresponding to the pixel is smaller than LM / 2, it means that the distance between the subject and the IR camera 102 is short. On the other hand, if the distance to the subject corresponding to the pixel is larger than LM / 2, it means that the distance between the subject and the IR camera 102 is long. In other words, the case where the peak of the reflected light has already passed during the exposure time of the section T1 is near, and the case where it has not passed yet is far. Therefore, when the peak of the reflected light has already passed in the section T1, the intensity of the reflected light does not increase in the sections T2 and T3. On the other hand, when the distance to the subject is long, since the peak has not yet reached in the section T1, the peak of the intensity of the reflected light approaches or reaches the section T2 and the section T3. An intensity higher than the intensity of the reflected light is observed in the section T2, and an intensity higher than the section T2 is observed in the section T3. However, when the spread of the reflected light in the time direction is equal to or less than the above-described time interval, and the peak of the reflected light is observed in the section T2, the intensity of the reflected light observed in the section T3 is smaller than that in the section T2.

このように、本実施の形態では、IR強度取得部114によってメモリ200から取得される赤外光の強度は、光源101から照射されて被写体に反射された赤外光が固体撮像素子20によって受光されるときに、互いに異なる少なくとも3回のタイミングでの固体撮像素子20の露光によって計測された少なくとも3つの強度からなる。   As described above, in the present embodiment, the intensity of the infrared light acquired from the memory 200 by the IR intensity acquisition unit 114 is such that the infrared light emitted from the light source 101 and reflected by the subject is received by the solid-state imaging device 20. At least three intensities measured by exposure of the solid-state imaging device 20 at at least three different timings.

また、固体撮像素子20の各第1画素21は、図5の(b)に示すように、それぞれの区間における反射光(すなわち赤外光)の強度の累積値を、その区間に対応する時刻での赤外光の強度として出力する。つまり、固体撮像素子20は、区間T1における赤外光の強度の累積値を、時刻t1における赤外光の強度として出力する。同様に、固体撮像素子20は、区間T2およびT3における赤外光の強度の累積値を、時刻t2および時刻t3における赤外光の強度としてそれぞれ出力する。IR強度取得部114は、このような3つの区間のそれぞれでの赤外光の強度の累積値を、互いに異なる3回のタイミングでの固体撮像素子20の露光によって計測された3つの強度として取得する。   Further, as shown in FIG. 5B, each first pixel 21 of the solid-state imaging device 20 calculates the accumulated value of the intensity of the reflected light (that is, the infrared light) in each section by the time corresponding to the section. Is output as the intensity of the infrared light at. That is, the solid-state imaging device 20 outputs the cumulative value of the intensity of the infrared light in the section T1 as the intensity of the infrared light at the time t1. Similarly, the solid-state imaging device 20 outputs the cumulative value of the infrared light intensity in the sections T2 and T3 as the infrared light intensity at time t2 and time t3, respectively. The IR intensity acquisition unit 114 acquires the accumulated value of the intensity of the infrared light in each of the three sections as three intensities measured by exposure of the solid-state imaging device 20 at three different timings. I do.

なお、時刻t1、t2およびt3は、区間T1、T2およびT3のそれぞれにおける中間の時刻であって、互いに異なる露光タイミングとして扱われてもよい。また、これらの時刻は、光源101から赤外光が照射された時点からの経過時間を示す。さらに、以下の説明では、露光タイミングにおいて受光または取得される赤外光の強度は、その露光タイミングに対応する区間での赤外光の強度の累積値を意味する。   Note that the times t1, t2, and t3 are intermediate times in each of the sections T1, T2, and T3, and may be treated as different exposure timings. These times indicate the elapsed time from the time when the light source 101 emits infrared light. Further, in the following description, the intensity of the infrared light received or acquired at the exposure timing means a cumulative value of the intensity of the infrared light in a section corresponding to the exposure timing.

図6は、IR強度取得部114によって取得される赤外光の強度の他の例を示す。   FIG. 6 shows another example of the intensity of the infrared light acquired by the IR intensity acquisition unit 114.

被写体がIRカメラ102に近い場合、図6の(a)に示すように、固体撮像素子20から出力される赤外光の強度は、露光タイミングt1において最も大きく、その後の露光タイミングt2では小さく、さらに後の露光タイミングt3では最も小さい。なお、露光タイミングt3における赤外光の強度は、バックグラウンドノイズの強度に近い。   When the subject is close to the IR camera 102, as shown in FIG. 6A, the intensity of the infrared light output from the solid-state imaging device 20 is largest at the exposure timing t1, and is small at the subsequent exposure timing t2. It is the smallest at the later exposure timing t3. Note that the intensity of the infrared light at the exposure timing t3 is close to the intensity of the background noise.

逆に、被写体がIRカメラ102から遠い場合、図6の(b)に示すように、固体撮像素子20から出力される赤外光の強度は、露光タイミングt1において最も小さく、その後の露光タイミングt2では大きく、さらに後の露光タイミングt3では最も大きい。なお、露光タイミングt1における赤外光の強度は、バックグラウンドノイズの強度に近い。   Conversely, when the subject is far from the IR camera 102, as shown in FIG. 6B, the intensity of the infrared light output from the solid-state imaging device 20 is the smallest at the exposure timing t1, and the subsequent exposure timing t2 Is larger at the later exposure timing t3. Note that the intensity of the infrared light at the exposure timing t1 is close to the intensity of the background noise.

[IR奥行きの算出方法]
図7は、IR強度取得部114によって取得される赤外光の強度と、バックグラウンドノイズとの一例を示す。
[Method of calculating IR depth]
FIG. 7 illustrates an example of the intensity of the infrared light acquired by the IR intensity acquiring unit 114 and the background noise.

上述のように、パルス光を用いた測距方法はToF(Time of Flight: 飛行時間法)と呼ばれる。このToFでは、パルス光が照射されてから、被写体によって反射され、そのパルス光の反射光が観測されるまでの時間に基づいて、その被写体までの距離である奥行きを算出する。奥行きをLとし、光速をcとし、経過時間をΔtとすると、その奥行きは、理想的にはL=cΔt/2によって算出される。なおパルス光は反射されるので、光路は奥行きの2倍である。   As described above, the distance measurement method using pulsed light is called ToF (Time of Flight). In this ToF, the depth, which is the distance to the subject, is calculated based on the time from the irradiation of the pulse light to the reflection by the subject until the reflected light of the pulse light is observed. Assuming that the depth is L, the speed of light is c, and the elapsed time is Δt, the depth is ideally calculated by L = cΔt / 2. Since the pulse light is reflected, the optical path is twice the depth.

距離分解能を高めるには、短い時間で多数の露光を行い、どの露光タイミングで反射光が観測されたかを調べればよい。しかし、露光時間が短いと受光の強度が低下する。すなわち、SN比が低下し、算出される奥行きの信頼性が低下する。   In order to increase the distance resolution, a large number of exposures may be performed in a short time, and it may be determined at which exposure timing the reflected light is observed. However, if the exposure time is short, the intensity of the received light decreases. That is, the SN ratio decreases, and the reliability of the calculated depth decreases.

このため、本実施の形態では、少ない露光回数、すなわち3回の露光で反射光を観測する。また、本実施の形態では、パルス光として赤外光を用いるが、環境光(すなわち背景光)にも赤外成分が含まれる。したがって、図7に示すように、常に背景光の強度Ibackがバックグラウンドノイズとして観測される。この背景光は、全ての露光タイミングのそれぞれにおいて取得される赤外光に、同じ強度だけ含まれると考えられる。したがって、互いに異なる露光タイミングにおいて取得される赤外光の強度の差を使うことで、背景光の影響を除去できる。   Therefore, in the present embodiment, reflected light is observed with a small number of exposures, that is, three exposures. In the present embodiment, although infrared light is used as pulse light, ambient light (that is, background light) also includes an infrared component. Therefore, as shown in FIG. 7, the intensity Iback of the background light is always observed as background noise. This background light is considered to be included by the same intensity in the infrared light acquired at each of all the exposure timings. Therefore, the influence of the background light can be removed by using the difference in the intensity of the infrared light obtained at different exposure timings.

3つの露光タイミングにおいて取得される赤外光の強度から距離を算出する方法は、複数ある。単純な例では、IR奥行算出部111bは、各露光タイミングにおいて取得された赤外光のうち、強度が最小の赤外光を背景光と見なし、その最小の赤外光以外の赤外光の強度から、背景光の強度を除く。これによって、背景光の影響を受けていない赤外光の強度を取得することができる。具体的には、図7に示すように、IR奥行算出部111bは、露光タイミングt3で取得された赤外光の強度I3を、背景光の強度Ibackと見なす。そして、IR奥行算出部111bは、露光タイミングt1で取得された赤外光の強度I1から背景光の強度Ibackとして強度I3を除き、露光タイミングt3で取得された赤外光の強度I2から背景光の強度Ibackとして強度I3を除く。これにより、時刻t1およびt2のそれぞれにおいて、背景光の影響を受けていない赤外光の強度が算出される。   There are a plurality of methods for calculating the distance from the intensity of infrared light acquired at three exposure timings. In a simple example, the IR depth calculation unit 111b regards the infrared light having the minimum intensity as the background light among the infrared lights acquired at each exposure timing, and determines the infrared light other than the minimum infrared light. Exclude background light intensity from intensity. This makes it possible to acquire the intensity of the infrared light that is not affected by the background light. Specifically, as shown in FIG. 7, the IR depth calculation unit 111b regards the intensity I3 of the infrared light acquired at the exposure timing t3 as the intensity Iback of the background light. Then, the IR depth calculation unit 111b removes the intensity I3 as the background light intensity Iback from the intensity I1 of the infrared light acquired at the exposure timing t1, and calculates the background light from the intensity I2 of the infrared light acquired at the exposure timing t3. The intensity I3 is excluded as the intensity Iback. Thus, at each of the times t1 and t2, the intensity of the infrared light not affected by the background light is calculated.

ここで、図7に示す例の場合、IR奥行算出部111bは、最大の強度I1の赤外光が受光された露光タイミングt1までの経過時間を、ToFの経過時間Δtに用いてもよい。また、IR奥行算出部111bは、最大の強度I1の赤外光が受光された露光タイミングt1と、強度I1の次に大きい強度I2の赤外光が受光された露光タイミングt2とを用いて、ToFの経過時間Δtを算出してもよい。   Here, in the example shown in FIG. 7, the IR depth calculation unit 111b may use the elapsed time until the exposure timing t1 when the infrared light having the maximum intensity I1 is received as the elapsed time Δt of the ToF. Further, the IR depth calculation unit 111b uses the exposure timing t1 at which the infrared light having the maximum intensity I1 is received and the exposure timing t2 at which the infrared light having the intensity I2 next to the intensity I1 is received. The elapsed time Δt of ToF may be calculated.

例えば、赤外光の強度I1と強度I2とが等しい場合、IR奥行算出部111bは、露光タイミングt1とt2との中間のタイミングまでの経過時間を、ToFの経過時間Δtとして算出してもよい。つまり、IR奥行算出部111bは、強度I1と強度I2とを重み係数とする、露光タイミングt1とt2との加重平均から、経過時間Δtを算出してもよい。   For example, when the intensity I1 of the infrared light is equal to the intensity I2, the IR depth calculation unit 111b may calculate the elapsed time up to an intermediate timing between the exposure timings t1 and t2 as the elapsed time Δt of the ToF. . That is, the IR depth calculation unit 111b may calculate the elapsed time Δt from a weighted average of the exposure timings t1 and t2 using the intensity I1 and the intensity I2 as weighting factors.

[赤外光の強度の信頼性]
また、光源101が発光しているときの赤外光のパルスの出力は一定とみなせる。したがって、固体撮像素子20において観測される反射光の強度は、図6に示すように単調減少したり、または単調増加することが期待される。しかし、実際には、その強度が単調増加も単調減少もしない場合がある。なお、本実施の形態における単調増加または単調減少には、その強度が変化しない状態は含まれない。
[Reliability of infrared light intensity]
The output of the infrared light pulse when the light source 101 emits light can be regarded as constant. Therefore, the intensity of the reflected light observed in the solid-state imaging device 20 is expected to monotonously decrease or monotonically increase as shown in FIG. However, in practice, the intensity may not monotonically increase or decrease. Note that the monotonous increase or the monotone decrease in the present embodiment does not include a state where the intensity does not change.

具体的には、赤外光の強度I1、I2およびI3の時間変化のパターンには、上述の単調増加および単調減少以外に、例えば以下の3つのパターン1、パターン2およびパターン3がある。   More specifically, in addition to the above-described monotone increase and monotone decrease, there are, for example, the following three patterns 1, pattern 2, and pattern 3 in the time-varying patterns of the infrared light intensities I1, I2, and I3.

パターン1では、観測される強度I1、I2およびI3が等しい(すなわち、I1=I2=I3)。このようなパターン1では、これらの強度は全て背景光の強度Ibackと見なせ、反射光が観測されなかったと考えられる。例えば、被写体が空などの無限遠、または反射しにくい物体であるときに、そのパターン1の状態が起こり得る。あるいは、被写体が、鏡面または一部の道路標識など、反射率が極めて高い物体であるときに、全ての露光タイミングにおいて、反射光の強度が固体撮像素子20の入力上限を越える(すなわち飽和する)。その結果、強度I1、I2およびI3の全てが同じ値の最大強度Imaxとなる。   In pattern 1, the observed intensities I1, I2, and I3 are equal (ie, I1 = I2 = I3). In such a pattern 1, all of these intensities can be regarded as the intensity Iback of the background light, and it is considered that no reflected light was observed. For example, when the subject is an object at infinity such as the sky or hardly reflected, the state of the pattern 1 can occur. Alternatively, when the subject is an object having an extremely high reflectance such as a mirror surface or some road signs, the intensity of the reflected light exceeds the upper limit of the input of the solid-state imaging device 20 (ie, saturates) at all exposure timings. . As a result, all of the intensities I1, I2 and I3 have the same maximum intensity Imax.

パターン2では、露光タイミングt2における強度I2が最小となる。このようなパターン2の状態は、光源101以外の外光の明るさが変化することによって(例えば、赤外成分を含む光を放つライトが点灯したことによって)、背景光が一定でないときに生じる。   In pattern 2, the intensity I2 at the exposure timing t2 is minimum. Such a state of the pattern 2 occurs when the background light is not constant due to a change in the brightness of external light other than the light source 101 (for example, a light emitting light including an infrared component being turned on). .

パターン3では、強度I1が最大であって、強度I2および強度I3が同じである、あるいは、強度I3が最大であって、強度I1および強度I2が同じである。つまり、固体撮像素子20は、露光タイミングt1で反射光を受光し、露光タイミングt2およびt3では背景光のみを受光する。すなわち、I1>I2=I3=Ibackが満たされている。あるいは、固体撮像素子20は、露光タイミングt3で反射光を受光し、露光タイミングt1およびt2では背景光のみを受光する。すなわち、I3>I1=I2=Ibackが満たされている。また、前述したように、反射光の時間方向の広がりが露光時間間隔以下であり、区間T2で反射光のピークが観測された場合(I2が最大)、区間T3で観測される反射光の強度は区間T2より小さくなる。これらの強度は、期待される正常な強度であり、算出される奥行きは信頼できる。   In pattern 3, the intensity I1 is the maximum and the intensity I2 and the intensity I3 are the same, or the intensity I3 is the maximum and the intensity I1 and the intensity I2 are the same. That is, the solid-state imaging device 20 receives the reflected light at the exposure timing t1, and receives only the background light at the exposure timings t2 and t3. That is, I1> I2 = I3 = Iback is satisfied. Alternatively, the solid-state imaging device 20 receives the reflected light at the exposure timing t3, and receives only the background light at the exposure timings t1 and t2. That is, I3> I1 = I2 = Iback is satisfied. Further, as described above, when the spread of the reflected light in the time direction is equal to or less than the exposure time interval and the peak of the reflected light is observed in the section T2 (I2 is maximum), the intensity of the reflected light observed in the section T3 Becomes smaller than the section T2. These intensities are expected normal intensities and the calculated depth is reliable.

以上のように、3つの露光タイミングでの赤外光の強度のパターンが、パターン1かパターン2の場合、その3つの露光タイミングの強度は、想定された受光強度でなく、それらの強度に基づいて算出されるIR奥行きの信頼性も低い。   As described above, when the pattern of the intensity of the infrared light at the three exposure timings is the pattern 1 or the pattern 2, the intensity of the three exposure timings is not based on the assumed light receiving intensity but based on those intensities. The reliability of the calculated IR depth is also low.

図8は、信頼性が低い赤外光の強度のパターンを示す。   FIG. 8 shows an infrared light intensity pattern with low reliability.

例えば、図8の(a)に示すように、露光タイミングt1での赤外光の強度I1と、露光タイミングt2での赤外光の強度I2と、露光タイミングt3での赤外光の強度I3とが同じであるパターンは、上述のパターン1に相当する。この場合には、被写体から反射される赤外光が弱すぎる、または強すぎる。例えば、被写体がIRカメラ102から無限遠にあるために、背景光である赤外光のみがノイズとしてIRカメラ102の固体撮像素子20に受光されている。または、固体撮像素子20に受光される赤外光の強度が飽和している。したがって、これらの赤外光の強度に基づいて算出されるIR奥行きの信頼性は低い。   For example, as shown in FIG. 8A, the intensity I1 of the infrared light at the exposure timing t1, the intensity I2 of the infrared light at the exposure timing t2, and the intensity I3 of the infrared light at the exposure timing t3. Are the same as pattern 1 described above. In this case, the infrared light reflected from the subject is too weak or too strong. For example, since the subject is at infinity from the IR camera 102, only the infrared light that is the background light is received as noise by the solid-state imaging device 20 of the IR camera 102. Alternatively, the intensity of the infrared light received by the solid-state imaging device 20 is saturated. Therefore, the reliability of the IR depth calculated based on the intensity of the infrared light is low.

また、図8の(b)に示すように、露光タイミングt2での赤外光の強度I2が、露光タイミングt1での赤外光の強度I1、および露光タイミングt3での赤外光の強度I3の何れよりも小さいパターンも、上述のパターン2に相当する。この場合には、外光の変化の影響によって、被写体から反射される赤外光を適切に受光することができていないため、これらの赤外光の強度に基づいて算出されるIR奥行きの信頼性は低い。   Further, as shown in FIG. 8B, the intensity I2 of the infrared light at the exposure timing t2 is the intensity I1 of the infrared light at the exposure timing t1, and the intensity I3 of the infrared light at the exposure timing t3. A pattern smaller than any of the above corresponds to the above-described pattern 2. In this case, since the infrared light reflected from the subject cannot be appropriately received due to the influence of the change of the external light, the reliability of the IR depth calculated based on the intensity of the infrared light is not obtained. Sex is low.

図9は、信頼性が高い赤外光の強度のパターンを示す。   FIG. 9 shows a pattern of infrared light intensity with high reliability.

例えば、図9の(a)に示すように、時間経過とともに赤外光の強度I1、I2およびI3が単調減少するパターンは、被写体がIRカメラ102に近い場合に想定されるパターンである。したがって、これらの赤外光の強度I1、I2およびI3に基づいて算出される奥行きの信頼性は高い。同様に、図9の(c)に示すように、時間経過とともに赤外光の強度I1、I2およびI3が単調増加するパターンは、被写体がIRカメラ102から遠い場合に想定されるパターンである。したがって、これらの赤外光の強度I1、I2およびI3に基づいて算出される奥行きの信頼性は高い。   For example, as shown in FIG. 9A, a pattern in which the intensity I1, I2, and I3 of the infrared light monotonically decreases with time is a pattern assumed when the subject is close to the IR camera 102. Therefore, the reliability of the depth calculated based on the infrared light intensities I1, I2, and I3 is high. Similarly, as shown in FIG. 9C, a pattern in which the infrared light intensities I1, I2, and I3 monotonically increase with time is a pattern assumed when the subject is far from the IR camera 102. Therefore, the reliability of the depth calculated based on the infrared light intensities I1, I2, and I3 is high.

また、図9の(b)に示すように、露光タイミングt1での赤外光の強度I1が最大であって、露光タイミングt2での赤外光の強度I2、および露光タイミングt3での赤外光の強度I3が同じであるパターンは、上述のパターン3に相当する。このようなパターンも、被写体がIRカメラ102から近い場合に想定されるパターンである。つまり、露光タイミングt1において、被写体に反射された赤外光が受光され、露光タイミングt2およびt3では、その反射光ではなく背景光が受光されていると想定される。したがって、これらの赤外光の強度I1、I2およびI3に基づいて算出される奥行きの信頼性は高い。   Also, as shown in FIG. 9B, the intensity I1 of the infrared light at the exposure timing t1 is the maximum, the intensity I2 of the infrared light at the exposure timing t2, and the intensity of the infrared light at the exposure timing t3. A pattern having the same light intensity I3 corresponds to the above-described pattern 3. Such a pattern is also assumed when the subject is close to the IR camera 102. That is, it is assumed that the infrared light reflected by the subject is received at the exposure timing t1, and that the background light is received instead of the reflected light at the exposure timings t2 and t3. Therefore, the reliability of the depth calculated based on the infrared light intensities I1, I2, and I3 is high.

また、図9の(d)に示すように、露光タイミングt2での赤外光の強度I2が、露光タイミングt1での赤外光の強度I1、および露光タイミングt3での赤外光の強度I3の何れよりも大きいパターンは、上述のパターン3に含まれる。このような図9の(d)に示すパターンは、反射光の時間方向の広がりが露光時間間隔以下であり、区間T2で反射光のピークが観測された場合に想定されるパターンである。しがって、これらの赤外光の強度I1、I2およびI3に基づいて算出される奥行きの信頼性は高い。   As shown in FIG. 9D, the intensity I2 of the infrared light at the exposure timing t2 is the intensity I1 of the infrared light at the exposure timing t1, and the intensity I3 of the infrared light at the exposure timing t3. Patterns larger than any of the above are included in the above-described pattern 3. The pattern shown in FIG. 9D is a pattern assumed when the spread of the reflected light in the time direction is equal to or less than the exposure time interval and the peak of the reflected light is observed in the section T2. Therefore, the reliability of the depth calculated based on these infrared light intensities I1, I2, and I3 is high.

このように、赤外光の強度I1、I2およびI3のパターンから、それらの赤外光の強度の信頼性を判断することができる。したがって、本実施の形態におけるIR奥行算出部111bは、赤外光の強度の信頼性が低い場合には、その赤外光の強度に基づいて算出されるIR奥行きも信頼性が低いことが明らかであるため、そのIR奥行きを算出しなくてもよい。   Thus, from the patterns of the infrared light intensities I1, I2, and I3, the reliability of the infrared light intensities can be determined. Therefore, when the reliability of the intensity of the infrared light is low, the IR depth calculation unit 111b according to the present embodiment clearly shows that the reliability of the IR depth calculated based on the intensity of the infrared light is also low. Therefore, the IR depth need not be calculated.

[IR信頼性マスクの算出方法]
図10は、IR信頼性マスクの算出方法の一例を示す。
[Method of calculating IR reliability mask]
FIG. 10 shows an example of a method of calculating an IR reliability mask.

信頼性マスク算出部112は、IR信頼性マスクを算出するときには、3つの露光タイミングにおいて得られる赤外光の強度I1、I2およびI3のうちの最大値と最小値とを用いる。つまり、信頼性マスク算出部112は、それらの強度のうちの最大値をシグナル強度として用い、それらの強度のうちの最小値をノイズ強度として用いることによって、SN比(signal-noise ratio)を算出する。そして、信頼性マスク算出部112は、そのSN比を正規化することによって、そのSN比を、0以上1以下の数値を示す多値のIR信頼性マスクに変換する。   When calculating the IR reliability mask, the reliability mask calculation unit 112 uses the maximum value and the minimum value of the infrared light intensities I1, I2, and I3 obtained at three exposure timings. That is, the reliability mask calculation unit 112 calculates the SN ratio (signal-noise ratio) by using the maximum value of the intensities as the signal intensity and using the minimum value of the intensities as the noise intensity. I do. Then, the reliability mask calculation unit 112 converts the SN ratio into a multi-valued IR reliability mask indicating a numerical value of 0 or more and 1 or less by normalizing the SN ratio.

例えば、図10の(a)および(b)に示すように、3つの露光タイミングにおいて得られる赤外光の強度I1、I2およびI3のうちの最大値は強度I1であり、最小値は強度I3である。したがって、信頼性マスク算出部112は、強度I1をシグナル強度として用い、強度I3をノイズ強度として用いることによって、SN比を算出する。   For example, as shown in FIGS. 10A and 10B, the maximum value of the infrared light intensities I1, I2, and I3 obtained at three exposure timings is the intensity I1, and the minimum value is the intensity I3. It is. Therefore, the reliability mask calculation unit 112 calculates the SN ratio by using the intensity I1 as the signal intensity and using the intensity I3 as the noise intensity.

具体的には、図10の(a)に示す場合、信頼性マスク算出部112は、強度I1をシグナル強度S1として用い、強度I3をノイズ強度N1として用いることによって、SN比r1をr1=S1/N1によって算出する。同様に、図10の(b)に示す場合、信頼性マスク算出部112は、強度I1をシグナル強度S2として用い、強度I3をノイズ強度N2として用いることによって、SN比r2をr2=S2/N2によって算出する。   More specifically, in the case shown in FIG. 10A, the reliability mask calculation unit 112 uses the intensity I1 as the signal intensity S1 and uses the intensity I3 as the noise intensity N1, thereby setting the SN ratio r1 to r1 = S1. / N1. Similarly, in the case shown in FIG. 10B, the reliability mask calculation unit 112 uses the intensity I1 as the signal intensity S2 and the intensity I3 as the noise intensity N2, and thereby sets the SN ratio r2 to r2 = S2 / N2. Is calculated by

ここで、図10の(a)に示す例では、図10の(b)に示す例よりも、SN比が大きい。その結果、図10の(a)に示す赤外光の強度I1、I2およびI3に基づいて算出されるIR奥行きの方が、図10の(b)に示す赤外光の強度I1、I2およびI3に基づいて算出されるIR奥行きよりも信頼性が高い。つまり、SN比は、赤外光の強度から算出されるIR奥行きの信頼度を示していると言える。   Here, the example shown in FIG. 10A has a larger SN ratio than the example shown in FIG. 10B. As a result, the IR depth calculated based on the infrared light intensities I1, I2, and I3 shown in FIG. 10A is better than the infrared light intensities I1, I2, and I2 shown in FIG. The reliability is higher than the IR depth calculated based on I3. In other words, it can be said that the SN ratio indicates the reliability of the IR depth calculated from the intensity of the infrared light.

したがって、本実施の形態における信頼性マスク算出部112は、上述のように、SN比を正規化することによって、そのSN比を、0以上1以下の数値を示す多値のIR信頼性マスクに変換する。例えば、信頼性マスク算出部112は、反射率の高い被写体によって反射される赤外光の強度を用いたSN比、すなわち最大と想定されるSN比が1に正規化されるように、実際に観測される赤外光の強度に基づくSN比を正規化してもよい。   Therefore, the reliability mask calculation unit 112 according to the present embodiment normalizes the SN ratio to convert the SN ratio into a multi-valued IR reliability mask indicating a numerical value of 0 or more and 1 or less as described above. Convert. For example, the reliability mask calculation unit 112 actually calculates the S / N ratio using the intensity of infrared light reflected by the subject having a high reflectance, that is, the S / N ratio assumed to be the maximum, to 1 The SN ratio based on the intensity of the observed infrared light may be normalized.

このように、本実施の形態では、信頼性マスク算出部112は、少なくとも3つの赤外光の強度のうちの最大の強度と最小の強度との比に基づいて、IR信頼性マスクを算出する。これにより、IR信頼性マスクを適切に算出することができる。   As described above, in the present embodiment, the reliability mask calculation unit 112 calculates the IR reliability mask based on the ratio between the maximum intensity and the minimum intensity of the at least three infrared light intensities. . As a result, the IR reliability mask can be appropriately calculated.

なお、信頼性マスク算出部112は、SN比の代わりに、常用対数log(S/N)または自然対数In(S/N)を用い、そのlog(S/N)などを正規化することによって、IR信頼性マスクを算出してもよい。なお、Sは、上述のように3つの赤外光の強度I1、I2およびI3のうちの最大値であり、Nは、それらのうちの最小値である。また、このようなIR信頼性マスクは、固体撮像素子20に含まれる複数の第1画素21のそれぞれについて、その第1画素21によって受光される赤外光に対して算出される。   The reliability mask calculation unit 112 uses the common logarithm log (S / N) or natural logarithm In (S / N) instead of the SN ratio, and normalizes the log (S / N) and the like. , IR reliability masks may be calculated. Note that S is the maximum value among the three infrared light intensities I1, I2, and I3 as described above, and N is the minimum value among them. Such an IR reliability mask is calculated for each of the plurality of first pixels 21 included in the solid-state imaging device 20 with respect to the infrared light received by the first pixels 21.

[BW奥行きの算出方法]
BW奥行算出部111aは、BW画像に基づいて、被写体までの距離であるBW奥行きを算出する。具体的には、BW奥行算出部111aは、SLAM(Simultaneous Localization and Mapping)によってBW奥行きを算出する(非特許文献: M. W. M. Gamini Dissanayake, Steven Clark, Hugh F. Durrant-Whyte, A Solution to the Simultaneous Localization and Map Building (SLAM) Problem, IEEE Transactions on Robotics and Automation, Vol. 17, No. 3, 2001)。つまり、奥行取得装置1が車両に搭載され、その車両が移動している場合、BW奥行算出部111aは、BWカメラ103が移動しながら撮像することによって得られた、互いに異なる時間フレームの2枚のBW画像を用いてBW奥行きを算出する。このようなSLAMによって、単眼カメラであるBWカメラ103でもステレオ測距することが可能となり、被写体の奥行きをBW奥行きとして算出することができる。なお、被写体の三次元位置と自己位置とを同時に推定する手法は、一般にSLAMと呼ばれるが、特に、本実施の形態のように、BW画像のみを用いる手法は、Visual SLAMとも呼ばれる。
[Method of calculating BW depth]
The BW depth calculation unit 111a calculates a BW depth, which is a distance to a subject, based on the BW image. Specifically, the BW depth calculation unit 111a calculates the BW depth by SLAM (Simultaneous Localization and Mapping). and Map Building (SLAM) Problem, IEEE Transactions on Robotics and Automation, Vol. 17, No. 3, 2001). In other words, when the depth acquisition device 1 is mounted on a vehicle and the vehicle is moving, the BW depth calculation unit 111a obtains two different time frames obtained by imaging the BW camera 103 while moving. BW depth is calculated using the BW image. Such SLAM makes it possible to perform stereo ranging even with the BW camera 103 which is a monocular camera, and the depth of the subject can be calculated as the BW depth. Note that a method of simultaneously estimating the three-dimensional position and the self-position of the subject is generally referred to as SLAM. In particular, a method using only the BW image as in the present embodiment is also referred to as Visual SLAM.

[BW信頼性マスクの算出方法]
信頼性マスク算出部112は、BW画像取得部115によって取得されたBW画像に基づいてBW信頼性マスクを算出する。この場合、信頼性マスク算出部112は、BW画像の画素ごとに、その画素に対応するテクスチャ量を算出する。例えば、信頼性マスク算出部112は、BW画像の画素ごとに、その画素を含む領域内の輝度勾配の総和を、テクスチャ量として算出する。そして、信頼性マスク算出部112は、テクスチャ量を正規化することによって、そのテクスチャ量を、0以上1以下の数値を示す多値のBW信頼性マスクに変換する。例えば、信頼性マスク算出部112は、最大と想定されるテクスチャ量が1に正規化されるように、実際に取得されるBW画像に基づくテクスチャ量を正規化してもよい。
[Method of calculating BW reliability mask]
The reliability mask calculation unit 112 calculates a BW reliability mask based on the BW image acquired by the BW image acquisition unit 115. In this case, the reliability mask calculation unit 112 calculates, for each pixel of the BW image, a texture amount corresponding to the pixel. For example, the reliability mask calculation unit 112 calculates, for each pixel of the BW image, the sum of luminance gradients in a region including the pixel as a texture amount. Then, the reliability mask calculation unit 112 converts the texture amount into a multi-valued BW reliability mask indicating a numerical value of 0 or more and 1 or less by normalizing the texture amount. For example, the reliability mask calculation unit 112 may normalize the texture amount based on the actually acquired BW image so that the maximum assumed texture amount is normalized to 1.

または、信頼性マスク算出部112は、上述のように算出されたIR信頼性マスクを用いてBW信頼性マスクを算出してもよい。この場合、信頼性マスク算出部112は、1からIR信頼性マスクを減算することによって、BW信頼性マスクを算出する。これにより、BW信頼性マスクをBW画像から算出する場合と比較してその算出の負荷を低減することができる。   Alternatively, the reliability mask calculation unit 112 may calculate the BW reliability mask using the IR reliability mask calculated as described above. In this case, the reliability mask calculation unit 112 calculates the BW reliability mask by subtracting the IR reliability mask from 1. Accordingly, the calculation load can be reduced as compared with the case where the BW reliability mask is calculated from the BW image.

[統合奥行きの算出方法]
統合奥行算出部111cは、上述のように算出されたBW信頼性マスクおよびIR信頼性マスクに基づいて、BW奥行きおよびIR奥行きを統合することによって統合奥行きを算出する。
[Method of calculating integrated depth]
The integrated depth calculation unit 111c calculates the integrated depth by integrating the BW depth and the IR depth based on the BW reliability mask and the IR reliability mask calculated as described above.

例えば、BW信頼性マスクがBW画像から算出される場合、つまり、BW信頼性マスクとIR信頼性マスクとが独立に算出される場合、統合奥行算出部111cは、IR信頼性マスクと、BW信頼性マスクとの和が1になるように、それらの信頼性マスクを調整してもよい。具体的には、統合奥行算出部111cは、BW信頼性マスクWBWをWBW=WBW/(WBW+WIR)によって調整し、IR信頼性マスクWIRをWIR=WIR/(WBW+WIR)によって調整する。そして、統合奥行算出部111cは、統合奥行きDを、D=WBW×DBW+WIR×DIRによって算出する。ここで、DBWは、BW奥行算出部111aによって算出されたBW奥行きであり、DIRは、IR奥行算出部111bによって算出されたIR奥行きである。 For example, when the BW reliability mask is calculated from the BW image, that is, when the BW reliability mask and the IR reliability mask are calculated independently, the integrated depth calculation unit 111c determines the IR reliability mask and the BW reliability mask. The reliability masks may be adjusted so that the sum with the reliability mask is 1. Specifically, the integrated depth calculation unit 111c adjusts the BW reliability mask W BW by W BW = W BW / (W BW + W IR ), and adjusts the IR reliability mask W IR to W IR = W IR / (W BW + WIR ). Then, the integrated depth calculation unit 111c calculates the integrated depth D according to D = W BW × D BW + W IR × D IR . Here, DBW is the BW depth calculated by the BW depth calculator 111a, and DIR is the IR depth calculated by the IR depth calculator 111b.

つまり、BW信頼性マスクおよびIR信頼性マスクはそれぞれ、0以上1以下の係数である。そして、統合奥行算出部111cは、BW信頼性マスクおよびIR信頼性マスクを、BW奥行きに対する重み係数およびIR奥行きに対する重み係数としてそれぞれ用いた、BW奥行きとIR奥行きとの重み付け加算によって、統合奥行きを算出する。   That is, the BW reliability mask and the IR reliability mask each have a coefficient of 0 or more and 1 or less. Then, the integrated depth calculation unit 111c calculates the integrated depth by performing weighted addition of the BW depth and the IR depth using the BW reliability mask and the IR reliability mask as a weight coefficient for the BW depth and a weight coefficient for the IR depth, respectively. calculate.

また、BW信頼性マスクがIR信頼性マスクから算出される場合には、統合奥行算出部111cは、統合奥行きDを、D=(1−WIE)×DBW+WIR×DIRによって算出する。 When the BW reliability mask is calculated from the IR reliability mask, the integrated depth calculation unit 111c calculates the integrated depth D according to D = (1−W IE ) × D BW + W IR × D IR . .

[処理フロー]
図11は、本実施の形態における奥行取得装置1の処理動作を示すフローチャートである。
[Processing flow]
FIG. 11 is a flowchart illustrating a processing operation of the depth acquisition device 1 according to the present embodiment.

(ステップS110)
まず、奥行取得装置1のBWカメラ103は、可視光に基づく被写体の撮像を行うことによってBW画像を取得する。このBW画像は、メモリ200に保存される。したがって、プロセッサ110aのBW画像取得部115は、BWカメラ103からメモリ200を介してそのBW画像を取得する。
(Step S110)
First, the BW camera 103 of the depth acquisition device 1 acquires a BW image by imaging a subject based on visible light. This BW image is stored in the memory 200. Therefore, the BW image acquisition unit 115 of the processor 110a acquires the BW image from the BW camera 103 via the memory 200.

(ステップS120)
次に、IRカメラ102は、光源101から赤外光が照射された被写体の撮像を行うことによってIR画像を取得する。ここで、そのIR画像の各画素の輝度は、その赤外光の強度を示している。したがって、ステップS120では、IRカメラ102は、光源101から照射されて被写体によって反射された赤外光を受光することによってその赤外光の強度を取得する。また、このIR画像は、メモリ200に保存される。したがって、プロセッサ110aのIR強度取得部114は、IRカメラ102からメモリ200を介してそのIR画像を取得する。つまり、IR強度取得部114は、被写体によって反射された赤外光を受光することによって計測され、メモリ200に保存されている赤外光の強度を取得する。なお、この取得される赤外光の強度は、固体撮像素子20に含まれる各第1画素21によって計測された強度である。
(Step S120)
Next, the IR camera 102 acquires an IR image by capturing an image of a subject irradiated with infrared light from the light source 101. Here, the luminance of each pixel of the IR image indicates the intensity of the infrared light. Therefore, in step S120, the IR camera 102 receives the infrared light emitted from the light source 101 and reflected by the subject to acquire the intensity of the infrared light. The IR image is stored in the memory 200. Therefore, the IR intensity acquisition unit 114 of the processor 110a acquires the IR image from the IR camera 102 via the memory 200. That is, the IR intensity acquiring unit 114 acquires the intensity of the infrared light measured by receiving the infrared light reflected by the subject and stored in the memory 200. Note that the acquired intensity of the infrared light is an intensity measured by each first pixel 21 included in the solid-state imaging device 20.

(ステップS130)
次に、BW奥行算出部111aは、BW画像に基づいて、被写体までの距離であるBW奥行きを算出する。具体的には、BW奥行算出部111aは、SLAMによってBW奥行きを算出する。つまり、奥行取得装置1が車両に搭載され、その車両が移動している場合、BW奥行算出部111aは、BWカメラ103が移動しながら撮像することによって得られた、互いに異なる時間フレームの2枚のBW画像を用いてBW奥行きを算出する。
(Step S130)
Next, the BW depth calculation unit 111a calculates the BW depth, which is the distance to the subject, based on the BW image. Specifically, the BW depth calculation unit 111a calculates the BW depth using SLAM. In other words, when the depth acquisition device 1 is mounted on a vehicle and the vehicle is moving, the BW depth calculation unit 111a obtains two different time frames obtained by imaging the BW camera 103 while moving. BW depth is calculated using the BW image.

(ステップS140)
次に、IR奥行算出部111bは、ステップS120で取得された赤外光の強度に基づいて、被写体までの距離であるIR奥行きを算出する。つまり、IR奥行算出部111bは、3つの露光タイミングt1、t2およびt3において得られた赤外光の強度I1、I2およびI3を用いて経過時間Δtを算出し、ToFの手法にその経過時間Δtを適用することによって、IR奥行きを算出する。このIR奥行きは、IR画像の画素ごと、すなわち固体撮像素子20の第1画素21ごとに算出される。
(Step S140)
Next, the IR depth calculation unit 111b calculates the IR depth, which is the distance to the subject, based on the intensity of the infrared light acquired in step S120. That is, the IR depth calculation unit 111b calculates the elapsed time Δt using the infrared light intensities I1, I2, and I3 obtained at the three exposure timings t1, t2, and t3, and applies the elapsed time Δt to the ToF method. Is applied to calculate the IR depth. This IR depth is calculated for each pixel of the IR image, that is, for each first pixel 21 of the solid-state imaging device 20.

ここで、3つの露光タイミングt1、t2およびt3における赤外光の強度I1、I2およびI3の信頼性が低い場合には、IR奥行算出部111bは、それらの強度に基づいてIR奥行きを算出しなくてもよい。例えば、赤外光の強度の時間変化のパターンが、図8の(a)および(b)に示すパターンである場合、すなわち、上述のパターン1または2である場合、IR奥行算出部111bは、これらの赤外光の強度の信頼性が低いため、IR奥行きを算出しなくてもよい。   Here, when the reliability of the infrared light intensities I1, I2, and I3 at the three exposure timings t1, t2, and t3 is low, the IR depth calculator 111b calculates the IR depth based on those intensities. It is not necessary. For example, when the pattern of the temporal change in the intensity of the infrared light is the pattern shown in FIGS. 8A and 8B, that is, when the pattern is 1 or 2 described above, the IR depth calculation unit 111b Since the reliability of these infrared light intensities is low, it is not necessary to calculate the IR depth.

(ステップS150)
次に、信頼性マスク算出部112は、ステップS130で算出されたBW奥行きの信頼性を多値で表すBW信頼性マスクを算出し、ステップS140で算出されたIR奥行きの信頼性を多値で表すIR信頼性マスクを算出する。なお、BW信頼性マスクおよびIR信頼性マスクはそれぞれ、0以上1以下の数値である。
(Step S150)
Next, the reliability mask calculation unit 112 calculates a BW reliability mask representing the reliability of the BW depth calculated in step S130 in multiple values, and calculates the reliability of the IR depth calculated in step S140 in multiple values. The IR reliability mask to be represented is calculated. The BW reliability mask and the IR reliability mask each have a numerical value of 0 or more and 1 or less.

(ステップS160)
次に、統合奥行算出部111cは、ステップS150で算出されたBW信頼性マスクおよびIR信頼性マスクに基づいて、ステップS130およびS140で算出されたBW奥行きおよびIR奥行きを統合することによって統合奥行きを算出する。
(Step S160)
Next, the integrated depth calculation unit 111c integrates the BW depth and the IR depth calculated in steps S130 and S140 based on the BW reliability mask and the IR reliability mask calculated in step S150, thereby calculating the integrated depth. calculate.

また、統合奥行算出部111cは、IR信頼性マスクが閾値以上である場合には、IR奥行きを統合奥行きとして算出してもよい。つまり、IR信頼性マスクWIR≧閾値Thの場合、統合奥行きDは、D=DIRによって算出される。その他の場合、つまりIR信頼性マスクWIR<閾値Thの場合には、統合奥行きDは、D=WBW×DBW+WIR×DIRによって算出される。なお、閾値Thは、例えばTh=0.5である。 When the IR reliability mask is equal to or larger than the threshold, the integrated depth calculation unit 111c may calculate the IR depth as the integrated depth. That is, when IR reliability mask W IR ≧ threshold Th, integrated depth D is calculated by D = D IR . In other cases, that is, when the IR reliability mask W IR <the threshold Th, the integrated depth D is calculated by D = W BW × D BW + W IR × D IR . The threshold value Th is, for example, Th = 0.5.

これにより、IR信頼性マスクが閾値以上の場合には、IR奥行きの信頼性が十分に高く、BW奥行きとIR奥行きとを統合させる必要がない。したがって、このような場合には、IR奥行きを統合奥行きとして算出することによって、統合のための処理を省くことができ、処理負荷の低減を図ることができる。   Accordingly, when the IR reliability mask is equal to or larger than the threshold, the reliability of the IR depth is sufficiently high, and there is no need to integrate the BW depth and the IR depth. Therefore, in such a case, by calculating the IR depth as the integrated depth, the processing for integration can be omitted, and the processing load can be reduced.

また、統合奥行算出部111cは、IR奥行きを算出することができない場合には、統合奥行きとしてBW奥行きを算出してもよい。例えば、上述のように、赤外光の強度の時間変化のパターンが、図8の(a)および(b)に示すパターンである場合、すなわち、上述のパターン1または2である場合、IR奥行きが算出されない。このような場合には、統合奥行算出部111cは、統合奥行きDとしてBW奥行きDBWを算出する。 When the integrated depth calculation unit 111c cannot calculate the IR depth, the integrated depth calculation unit 111c may calculate the BW depth as the integrated depth. For example, as described above, when the pattern of the temporal change in the intensity of the infrared light is the pattern shown in FIGS. 8A and 8B, that is, when the pattern is the above-described pattern 1 or 2, the IR depth Is not calculated. In such a case, integration depth computing unit 111c calculates the BW depth D BW as an integrated depth D.

例えば、空などの無限遠が被写体として扱われる場合などには、IR奥行きを適切に算出することができない。したがって、このような場合に、BW奥行きを統合奥行きとして算出することによって、IR奥行きの欠損をBW奥行きで簡単に補うことができる。   For example, when infinity such as the sky is treated as a subject, the IR depth cannot be appropriately calculated. Therefore, in such a case, by calculating the BW depth as the integrated depth, the loss of the IR depth can be easily compensated for by the BW depth.

図12は、奥行取得装置1による信頼性マスクの算出の詳細な処理動作を示すフローチャートである。つまり、図12は、図11に示すステップS150の詳細な処理動作を示す。   FIG. 12 is a flowchart illustrating a detailed processing operation of calculating a reliability mask by the depth acquisition device 1. That is, FIG. 12 shows the detailed processing operation of step S150 shown in FIG.

(ステップS151)
信頼性マスク算出部112は、まず、IR信頼性マスクを算出する。このときには、信頼性マスク算出部112は、固体撮像素子20に含まれる複数の第1画素21のそれぞれについて、その第1画素21によって計測された、3つの露光タイミングt1、t2およびt3における赤外光の強度I1、I2およびI3を取得する。
(Step S151)
First, the reliability mask calculation unit 112 calculates an IR reliability mask. At this time, the reliability mask calculation unit 112 calculates, for each of the plurality of first pixels 21 included in the solid-state imaging device 20, the infrared light at three exposure timings t1, t2, and t3 measured by the first pixel 21. The light intensity I1, I2 and I3 are obtained.

(ステップS152)
次に、信頼性マスク算出部112は、ステップS151で取得された赤外光の強度I1、I2およびI3に基づいて、図10に示すようにSN比を算出する。そして、信頼性マスク算出部112は、そのSN比を正規化することによって、それらの赤外光の強度に基づいてステップS140で算出されたIR奥行きの信頼性を多値で示すIR信頼性マスクを算出する。なお、IR信頼性マスクは、固体撮像素子20に含まれる複数の第1画素21のそれぞれに対して算出される。
(Step S152)
Next, the reliability mask calculation unit 112 calculates the SN ratio as shown in FIG. 10 based on the infrared light intensities I1, I2, and I3 acquired in step S151. Then, the reliability mask calculation unit 112 normalizes the S / N ratio, and thereby provides a multi-valued IR reliability mask indicating the reliability of the IR depth calculated in step S140 based on the intensity of the infrared light. Is calculated. The IR reliability mask is calculated for each of the plurality of first pixels 21 included in the solid-state imaging device 20.

(ステップS153)
次に、信頼性マスク算出部112は、BW信頼性マスクを算出する。このときには、信頼性マスク算出部112は、まず、BW画像に含まれる複数の画素のそれぞれについて、その画素に対応するテクスチャ量を算出する。例えば、信頼性マスク算出部112は、BW画像の画素ごとに、その画素を含む領域内の輝度勾配の総和を、テクスチャ量として算出する。
(Step S153)
Next, the reliability mask calculation unit 112 calculates a BW reliability mask. At this time, the reliability mask calculation unit 112 first calculates, for each of a plurality of pixels included in the BW image, a texture amount corresponding to the pixel. For example, the reliability mask calculation unit 112 calculates, for each pixel of the BW image, the sum of luminance gradients in a region including the pixel as a texture amount.

(ステップS154)
信頼性マスク算出部112は、BW画像に含まれる複数の画素のそれぞれについて、例えば、ステップS153で算出されたその画素に対応するテクスチャ量を正規化する。これによって、信頼性マスク算出部112は、ステップS130で算出されたその画素に対応するBW奥行きの信頼性を多値で示すBW信頼性マスクを算出する。
(Step S154)
For each of the plurality of pixels included in the BW image, the reliability mask calculation unit 112 normalizes, for example, the texture amount corresponding to the pixel calculated in step S153. Thus, the reliability mask calculation unit 112 calculates a BW reliability mask that indicates the reliability of the BW depth corresponding to the pixel calculated in step S130 in multiple values.

上述の例では、信頼性マスク算出部112は、BW画像に基づいてBW信頼性マスクを算出するが、上述のように、1からIR信頼性マスクを減算することによって、BW画像を用いずにBW信頼性マスクを算出してもよい。   In the above-described example, the reliability mask calculation unit 112 calculates the BW reliability mask based on the BW image. However, as described above, the reliability mask calculation unit 112 subtracts the IR reliability mask from 1 without using the BW image. A BW reliability mask may be calculated.

(変形例)
上記実施の形態では、統合奥行きの算出に、BW信頼性マスクおよびIR信頼性マスクなどの信頼性マスクを用いたが、その信頼性マスクを用いることなく、学習モデルを用いて統合奥行きを算出してもよい。
(Modification)
In the above embodiment, a reliability mask such as a BW reliability mask and an IR reliability mask is used for calculating the integrated depth, but the integrated depth is calculated using a learning model without using the reliability mask. You may.

図13は、本変形例における奥行取得装置1の機能構成の一例を示すブロック図である。なお、図13に示す構成要素のうち、図4に示す構成要素と同一の構成要素については、図4に示す構成要素と同一の符号を付し、詳細な説明を省略する。   FIG. 13 is a block diagram illustrating an example of a functional configuration of the depth acquisition device 1 according to the present modification. Note that among the components illustrated in FIG. 13, the same components as those illustrated in FIG. 4 are denoted by the same reference numerals as the components illustrated in FIG. 4, and detailed description will be omitted.

本変形例における奥行取得装置1は、図4に示すプロセッサ110aの代わりにプロセッサ100bを備え、さらに、学習モデル104を備える。   The depth acquisition device 1 according to the present modification includes a processor 100b instead of the processor 110a illustrated in FIG. 4, and further includes a learning model 104.

学習モデル104は、例えばニューラルネットワークであって、深層学習によって構成されている。例えば、この学習モデル104に入力される入力データには、BW画像と、そのBW画像から算出されたBW奥行きと、3つの露光タイミングのそれぞれにおける赤外光の強度と、それらの赤外光の強度に基づくIR画像と、それらの赤外光の強度から算出されたIR奥行きと、のうちの少なくとも2つの任意のデータを用いてもよい。この学習モデル104では、その少なくとも2つの任意のデータである入力データの組み合わせに対して、正解の統合奥行きが出力されるように、既に学習が行われている。なお、プロセッサ110bは、後述のとおり、信頼性マスク算出部112を備えていない。しかし、プロセッサ110bがこの信頼性マスク算出部112を備えている場合には、入力データとして、その信頼性マスク算出部112から出力されるBW信頼性マスクおよびIR信頼性マスクの少なくとも一方が用いられてもよい。なお、BW信頼性マスクおよびIR信頼性マスクだけが入力データとして用いられることはない。   The learning model 104 is, for example, a neural network, and is configured by deep learning. For example, input data input to the learning model 104 include a BW image, a BW depth calculated from the BW image, the intensity of infrared light at each of the three exposure timings, and the intensity of the infrared light. Any data of at least two of an IR image based on the intensity and an IR depth calculated from the intensity of the infrared light may be used. In the learning model 104, learning has been already performed so that a correct integrated depth is output for a combination of at least two pieces of input data that are arbitrary data. Note that the processor 110b does not include the reliability mask calculation unit 112 as described later. However, when the processor 110b includes the reliability mask calculation unit 112, at least one of the BW reliability mask and the IR reliability mask output from the reliability mask calculation unit 112 is used as input data. You may. Note that only the BW reliability mask and the IR reliability mask are not used as input data.

なお、深層学習を用いた画像補間技術は、非特許文献(Satoshi Iizuka, Edgar Simo-Serra and Hiroshi Ishikawa “Globally and Locally Consistent Image Completion”, ACM Transactions on Graphics, Vol. 36, No. 4, Article 107. Publication date: July 2017.)に開示されている。しかし、この非特許文献に用いられる学習モデルには、RGB画像と、欠損補間位置を示す二値マスクとが入力データとして入力され、その入力データに対して、欠損補間されたRGB画像が出力データとしてその学習モデルから出力される。   Image interpolation technology using deep learning is described in Non-Patent Documents (Satoshi Iizuka, Edgar Simo-Serra and Hiroshi Ishikawa “Globally and Locally Consistent Image Completion”, ACM Transactions on Graphics, Vol. 36, No. 4, Article 107). Publication date: July 2017.) However, in the learning model used in this non-patent document, an RGB image and a binary mask indicating a missing interpolation position are input as input data, and the RGB image subjected to the missing interpolation is output data based on the input data. Is output from the learning model.

プロセッサ100bは、図4に示す信頼性マスク算出部112を備えておらず、図4に示す統合奥行算出部111cの代わりに、統合奥行算出部111dを備える。   The processor 100b does not include the reliability mask calculation unit 112 illustrated in FIG. 4, but includes an integrated depth calculation unit 111d instead of the integrated depth calculation unit 111c illustrated in FIG.

統合奥行算出部111dは、上述の学習モデル104に対して上述の入力データを入力する。その結果、統合奥行算出部111dは、その入力データに対する出力データとして、統合奥行きを学習モデル104から取得する。   The integrated depth calculation unit 111d inputs the above-described input data to the above-described learning model 104. As a result, the integrated depth calculation unit 111d acquires the integrated depth from the learning model 104 as output data for the input data.

つまり、図13に示す奥行取得装置1は、メモリ200とプロセッサ110bとを備える。プロセッサ110bのBW画像取得部115は、BWカメラ103による可視光に基づく被写体の撮像によって生成され、メモリ200に保存されているBW画像を取得する。IR強度取得部114は、光源101から照射されて被写体によって反射された赤外光を受光することによって計測され、メモリ200に保存されている赤外光の強度を取得する。BW奥行算出部111aは、BW画像に基づいて、被写体までの距離であるBW奥行きを算出する。IR奥行算出部111bは、赤外光の強度に基づいて、被写体までの距離であるIR奥行きを算出する。統合奥行算出部111dは、BW画像、赤外光の強度、BW奥行きおよびIR奥行きを、学習モデル104に入力することによって、BW奥行きとIR奥行きとが統合された統合奥行きを、学習モデル104から取得する。   That is, the depth acquisition device 1 illustrated in FIG. 13 includes the memory 200 and the processor 110b. The BW image acquisition unit 115 of the processor 110b acquires a BW image generated by imaging the subject based on visible light by the BW camera 103 and stored in the memory 200. The IR intensity acquisition unit 114 acquires the intensity of the infrared light measured by receiving the infrared light emitted from the light source 101 and reflected by the subject, and stored in the memory 200. The BW depth calculation unit 111a calculates a BW depth, which is a distance to a subject, based on the BW image. The IR depth calculator 111b calculates an IR depth, which is a distance to a subject, based on the intensity of the infrared light. By inputting the BW image, the intensity of infrared light, the BW depth, and the IR depth to the learning model 104, the integrated depth calculation unit 111d calculates the integrated depth obtained by integrating the BW depth and the IR depth from the learning model 104. get.

これにより、BW画像、赤外光の強度、BW奥行きおよびIR奥行きの入力に対して、正解の統合奥行きが出力されるように、学習モデル104に予め学習させておけば、BW信頼性マスクおよびIR信頼性マスクを算出することなく、適切な統合奥行きを簡単に取得することができる。   Accordingly, if the learning model 104 is trained in advance so that a correct integrated depth is output with respect to the input of the BW image, the intensity of the infrared light, the BW depth, and the IR depth, the BW reliability mask and the An appropriate integrated depth can be easily obtained without calculating an IR reliability mask.

以上、本実施の形態およびその変形例における奥行取得装置1では、被写体における赤外光の反射率が低いために、その赤外光の強度に基づいて算出された第2奥行きの信頼性が低くても、第1奥行きを用いて、その第2奥行きを補正し、統合奥行きとして算出することができる。その結果、最終的に算出される被写体までの奥行きの信頼性または精度を向上することができる。   As described above, in the depth acquisition device 1 according to the present embodiment and its modification, since the reflectance of the subject with the infrared light is low, the reliability of the second depth calculated based on the intensity of the infrared light is low. However, it is possible to correct the second depth using the first depth and calculate the integrated depth. As a result, the reliability or accuracy of the depth to the subject finally calculated can be improved.

なお、上記各実施の形態において、各構成要素は、専用のハードウェアで構成されるか、各構成要素に適したソフトウェアプログラムを実行することによって実現されてもよい。各構成要素は、CPUまたはプロセッサなどのプログラム実行部が、ハードディスクまたは半導体メモリなどの記録媒体に記録されたソフトウェアプログラムを読み出して実行することによって実現されてもよい。ここで、上記実施の形態および変形例の奥行取得装置などを実現するソフトウェアは、図11および図12の何れかのフローチャートに含まれる各ステップをコンピュータに実行させる。   In each of the above embodiments, each component may be configured by 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 a processor reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory. Here, the software for realizing the depth acquisition device and the like of the above-described embodiment and the modified example causes a computer to execute each step included in any one of the flowcharts of FIGS. 11 and 12.

以上、一つまたは複数の態様に係る奥行取得装置について、実施の形態およびその変形例に基づいて説明したが、本開示は、この実施の形態およびその変形例に限定されるものではない。本開示の趣旨を逸脱しない限り、当業者が思いつく各種変形を本実施の形態および変形例に施したものや、実施の形態および変形例における構成要素を組み合わせて構築される形態も、本開示の範囲内に含まれてもよい。   As described above, the depth acquisition device according to one or more aspects has been described based on the embodiment and the modification thereof, but the present disclosure is not limited to the embodiment and the modification thereof. Unless departing from the gist of the present disclosure, various modifications conceivable by those skilled in the art may be applied to the present embodiment and the modification, and a form constructed by combining the components in the embodiment and the modification may be implemented by the present disclosure. It may be included in the range.

例えば、上記実施の形態およびその変形例では、IR強度取得部114は、IR画像を取得するが、IR画像を取得することなく、固体撮像素子20に含まれる各第1画素21が赤外光を受光することによって計測される赤外光の強度を取得してもよい。つまり、奥行取得装置1は、IR画像を生成しなくてもよい。   For example, in the above-described embodiment and its modified example, the IR intensity acquisition unit 114 acquires an IR image, but without acquiring an IR image, the first pixels 21 included in the solid-state imaging device 20 emit infrared light. May be acquired to obtain the intensity of the infrared light measured. That is, the depth acquisition device 1 does not need to generate an IR image.

また、IR強度取得部114は、互いに異なる3つの露光タイミングで計測された3つの赤外光の強度を取得し、その3つの赤外光の強度に基づいて、IR奥行きおよびIR信頼性マスクを算出する。しかし、その露光タイミングおよび赤外光の強度の数は、3つに限定されることなく、4つ以上であってもよい。   Further, the IR intensity acquisition unit 114 acquires the three infrared light intensities measured at three different exposure timings, and determines the IR depth and the IR reliability mask based on the three infrared light intensities. calculate. However, the number of the exposure timing and the intensity of the infrared light is not limited to three, and may be four or more.

また、本開示において、ユニット、デバイスの全部又は一部、又は図1、図4、および図13に示されるブロック図の機能ブロックの全部又は一部は、半導体装置、半導体集積回路(IC)、又はLSI(large scale integration)を含む一つ又は一つ以上の電子回路によって実行されてもよい。LSI又はICは、一つのチップに集積されてもよいし、複数のチップを組み合わせて構成されてもよい。例えば、記憶素子以外の機能ブロックは、一つのチップに集積されてもよい。ここでは、LSIやICと呼んでいるが、集積の度合いによって呼び方が変わり、システムLSI、VLSI(very large scale integration)、若しくはULSI(ultra large scale integration) と呼ばれるかもしれない。LSIの製造後にプログラムされる、Field Programmable Gate Array (FPGA)、又はLSI内部の接合関係の再構成又はLSI内部の回路区画のセットアップができるreconfigurable logic deviceも同じ目的で使うことができる。   Further, in the present disclosure, all or a part of a unit or a device, or all or a part of a functional block in the block diagrams illustrated in FIGS. 1, 4, and 13 includes a semiconductor device, a semiconductor integrated circuit (IC), Alternatively, it may be executed by one or more electronic circuits including an LSI (large scale integration). The LSI or IC may be integrated on a single chip, or may be configured by combining a plurality of chips. For example, functional blocks other than the storage element may be integrated on one chip. Here, although they are called LSIs or ICs, their names change depending on the degree of integration, and may be called system LSIs, VLSIs (very large scale integration), or ULSIs (ultra large scale integration). A Field Programmable Gate Array (FPGA), which is programmed after the manufacture of the LSI, or a reconfigurable logic device capable of reconfiguring junction relations inside the LSI or setting up circuit sections inside the LSI can also be used for the same purpose.

さらに、ユニット、装置、又は装置の一部の、全部又は一部の機能又は操作は、ソフトウェア処理によって実行することが可能である。この場合、ソフトウェアは一つ又は一つ以上のROM、光学ディスク、ハードディスクドライブ、などの非一時的記録媒体に記録され、ソフトウェアが、処理装置(processor)によって実行された場合に、ソフトウェアは、ソフトウェア内の特定の機能を、処理装置(processor)と周辺のデバイスに実行させる。システム又は装置は、ソフトウェアが記録されている一つ又は一つ以上の非一時的記録媒体、処理装置(processor)、及び必要とされるハードウェアデバイス、例えばインターフェース、を備えていても良い。   Furthermore, all or some of the functions or operations of the unit, the device, or a part of the device can be performed by software processing. In this case, the software is recorded on one or more non-transitory recording media such as ROM, optical disk, hard disk drive, etc., and when the software is executed by a processor, the software is Causes a processor and peripheral devices to perform certain functions. The system or apparatus may include one or more non-transitory storage media on which the software is recorded, a processor, and any required hardware devices, such as an interface.

本開示は、被写体までの距離である奥行きを取得する奥行取得装置に適用可能であり、例えば車載機器などとして利用可能である。   The present disclosure is applicable to a depth acquisition device that acquires a depth that is a distance to a subject, and can be used as, for example, an in-vehicle device.

1 奥行取得装置
10、101 光源
20 固体撮像素子
21 第1画素(IR)
22 第2画素(BW)
30 処理回路
50 拡散板
60 レンズ
70 バンドパスフィルタ
102 IRカメラ
103 BWカメラ
104 学習モデル
110a、110b プロセッサ
111a BW奥行算出部
111b IR奥行算出部
111c 統合奥行算出部
112 信頼性マスク算出部
113 発光制御部
114 IR強度取得部
115 BW画像取得部
200 メモリ
DESCRIPTION OF SYMBOLS 1 Depth acquisition device 10, 101 Light source 20 Solid-state image sensor 21 First pixel (IR)
22 Second pixel (BW)
Reference Signs List 30 processing circuit 50 diffuser 60 lens 70 bandpass filter 102 IR camera 103 BW camera 104 learning model 110a, 110b processor 111a BW depth calculation unit 111b IR depth calculation unit 111c integrated depth calculation unit 112 reliability mask calculation unit 113 emission control unit 114 IR intensity acquisition unit 115 BW image acquisition unit 200 Memory

Claims (15)

メモリと、
プロセッサとを備え、
前記プロセッサは、
可視光に基づく被写体の撮像によって生成され、前記メモリに保存されている可視光画像を取得し、
光源から照射されて前記被写体によって反射された赤外光を受光することによって計測され、前記メモリに保存されている前記赤外光の強度を取得し、
前記可視光画像に基づいて、前記被写体までの距離である第1奥行きを算出し、
前記赤外光の強度に基づいて、前記被写体までの距離である第2奥行きを算出し、
前記第1奥行きの信頼性を多値で表す第1信頼性マスクを算出し、
前記第2奥行きの信頼性を多値で表す第2信頼性マスクを算出し、
前記第1信頼性マスクおよび前記第2信頼性マスクに基づいて、前記第1奥行きおよび前記第2奥行きを統合することによって統合奥行きを算出する、
奥行取得装置。
Memory and
With a processor,
The processor comprises:
Obtain a visible light image generated by imaging a subject based on visible light and stored in the memory,
It is measured by receiving the infrared light emitted from the light source and reflected by the subject, and acquires the intensity of the infrared light stored in the memory,
Calculating a first depth, which is a distance to the subject, based on the visible light image;
Based on the intensity of the infrared light, calculate a second depth that is a distance to the subject,
Calculating a first reliability mask representing the reliability of the first depth in multiple values;
Calculating a second reliability mask representing the reliability of the second depth in multiple values;
Calculating an integrated depth by integrating the first depth and the second depth based on the first reliability mask and the second reliability mask;
Depth acquisition device.
前記赤外光の受光は、赤外光に基づく撮像によって行われ、
前記可視光に基づく撮像と、前記赤外光に基づく撮像とでは、撮像対象のシーンと、撮像の視点および時刻とが実質的に同一である、
請求項1に記載の奥行取得装置。
The reception of the infrared light is performed by imaging based on the infrared light,
In the imaging based on the visible light and the imaging based on the infrared light, the scene to be imaged and the viewpoint and time of the imaging are substantially the same,
The depth acquisition device according to claim 1.
前記メモリから取得される前記赤外光の強度は、
前記光源から照射されて前記被写体に反射された赤外光が撮像素子によって受光されるときに、互いに異なる少なくとも3回のタイミングでの前記撮像素子の露光によって計測された少なくとも3つの強度からなり、
前記第2奥行きの算出では、
前記少なくとも3つの強度に基づいて前記第2奥行きを算出する、
請求項1または2に記載の奥行取得装置。
The intensity of the infrared light obtained from the memory,
When infrared light emitted from the light source and reflected by the subject is received by the image sensor, the image sensor includes at least three intensities measured by exposure of the image sensor at at least three different times,
In the calculation of the second depth,
Calculating the second depth based on the at least three intensities;
The depth acquisition device according to claim 1.
前記第1信頼性マスクおよび前記第2信頼性マスクはそれぞれ、0以上1以下の係数であり、
前記統合奥行きの算出では、
前記第1信頼性マスクおよび前記第2信頼性マスクを、前記第1奥行きに対する重み係数および前記第2奥行きに対する重み係数としてそれぞれ用いた、前記第1奥行きと第2奥行きとの重み付け加算によって、前記統合奥行きを算出する、
請求項1〜3の何れか1項に記載の奥行取得装置。
The first reliability mask and the second reliability mask each have a coefficient of 0 or more and 1 or less,
In the calculation of the integrated depth,
The weighted addition of the first depth and the second depth using the first reliability mask and the second reliability mask as a weighting factor for the first depth and a weighting factor for the second depth, respectively, Calculate the integrated depth,
The depth acquisition device according to claim 1.
前記第1信頼性マスクの算出では、
1から前記第2信頼性マスクを減算することによって前記第1信頼性マスクを算出する、
請求項4に記載の奥行取得装置。
In the calculation of the first reliability mask,
Calculating the first reliability mask by subtracting the second reliability mask from 1;
The depth acquisition device according to claim 4.
前記統合奥行きの算出では、
前記第2信頼性マスクが閾値以上である場合には、
前記第2奥行きを前記統合奥行きとして算出する、
請求項4または5に記載の奥行取得装置。
In the calculation of the integrated depth,
If the second reliability mask is greater than or equal to a threshold,
Calculating the second depth as the integrated depth,
The depth acquisition device according to claim 4.
前記統合奥行きの算出では、
前記第2奥行きを算出することができない場合には、
前記第1奥行きを前記統合奥行きとして算出する、
請求項1〜6の何れか1項に記載の奥行取得装置。
In the calculation of the integrated depth,
If the second depth cannot be calculated,
Calculating the first depth as the integrated depth,
The depth acquisition device according to claim 1.
前記第2信頼性マスクの算出では、
前記少なくとも3つの強度のうちの最大の強度と最小の強度との比に基づいて、前記第2信頼性マスクを算出する、
請求項3に記載の奥行取得装置。
In the calculation of the second reliability mask,
Calculating the second reliability mask based on a ratio between a maximum intensity and a minimum intensity of the at least three intensities;
The depth acquisition device according to claim 3.
メモリと、
プロセッサとを備え、
前記プロセッサは、
可視光に基づく被写体の撮像によって生成され、前記メモリに保存されている可視光画像を取得し、
光源から照射されて前記被写体によって反射された赤外光を受光することによって計測され、前記メモリに保存されている前記赤外光の強度を取得し、
前記可視光画像に基づいて、前記被写体までの距離である第1奥行きを算出し、
前記赤外光の強度に基づいて、前記被写体までの距離である第2奥行きを算出し、
前記可視光画像、前記赤外光の強度、前記第1奥行きおよび前記第2奥行きを、学習モデルに入力することによって、前記第1奥行きと前記第2奥行きとが統合された統合奥行きを、前記学習モデルから取得する、
奥行取得装置。
Memory and
With a processor,
The processor comprises:
Obtain a visible light image generated by imaging a subject based on visible light and stored in the memory,
It is measured by receiving the infrared light emitted from the light source and reflected by the subject, and acquires the intensity of the infrared light stored in the memory,
Calculating a first depth, which is a distance to the subject, based on the visible light image;
Based on the intensity of the infrared light, calculate a second depth that is a distance to the subject,
By inputting the visible light image, the intensity of the infrared light, the first depth and the second depth into a learning model, the integrated depth obtained by integrating the first depth and the second depth, Obtained from the learning model,
Depth acquisition device.
可視光に基づく被写体の撮像を行うことによって可視光画像を取得する可視光カメラと、
光源から照射されて前記被写体によって反射された赤外光を受光することによって前記赤外光の強度を取得する赤外光カメラと、
前記可視光画像に基づいて、前記被写体までの距離である第1奥行きを算出する第1奥行算出部と、
前記赤外光の強度に基づいて、前記被写体までの距離である第2奥行きを算出する第2奥行算出部と、
前記第1奥行きの信頼性を多値で表す第1信頼性マスクを算出し、前記第2奥行きの信頼性を多値で表す第2信頼性マスクを算出する信頼性マスク算出部と、
前記第1信頼性マスクおよび前記第2信頼性マスクに基づいて、前記第1奥行きおよび前記第2奥行きを統合することによって統合奥行きを算出する統合奥行算出部と、
を備える奥行取得装置。
A visible light camera that acquires a visible light image by performing imaging of a subject based on visible light,
An infrared light camera that obtains the intensity of the infrared light by receiving infrared light emitted from a light source and reflected by the subject,
A first depth calculation unit that calculates a first depth that is a distance to the subject based on the visible light image;
A second depth calculation unit that calculates a second depth that is a distance to the subject based on the intensity of the infrared light;
A reliability mask calculation unit that calculates a first reliability mask that represents the reliability of the first depth in multiple values, and calculates a second reliability mask that represents the reliability of the second depth in multiple values;
An integrated depth calculation unit that calculates an integrated depth by integrating the first depth and the second depth based on the first reliability mask and the second reliability mask;
A depth acquisition device comprising:
可視光に基づく被写体の撮像を行うことによって可視光画像を取得する可視光カメラと、
光源から照射されて前記被写体によって反射された赤外光を受光することによって前記赤外光の強度を取得する赤外光カメラと、
前記可視光画像に基づいて、前記被写体までの距離である第1奥行きを算出する第1奥行算出部と、
前記赤外光の強度に基づいて、前記被写体までの距離である第2奥行きを算出する第2奥行算出部と、
前記可視光画像、前記赤外光の強度、前記第1奥行きおよび前記第2奥行きを、学習モデルに入力することによって、前記第1奥行きと前記第2奥行きとが統合された統合奥行きを、前記学習モデルから取得する統合奥行算出部と、
を備える奥行取得装置。
A visible light camera that acquires a visible light image by performing imaging of a subject based on visible light,
An infrared light camera that obtains the intensity of the infrared light by receiving infrared light emitted from a light source and reflected by the subject,
A first depth calculation unit that calculates a first depth that is a distance to the subject based on the visible light image;
A second depth calculation unit that calculates a second depth that is a distance to the subject based on the intensity of the infrared light;
By inputting the visible light image, the intensity of the infrared light, the first depth and the second depth into a learning model, the integrated depth obtained by integrating the first depth and the second depth, An integrated depth calculation unit obtained from the learning model;
A depth acquisition device comprising:
被写体までの距離を奥行きとしてコンピュータが取得する奥行取得方法であって、
可視光に基づく被写体の撮像によって生成され、メモリに保存されている可視光画像を取得し、
光源から照射されて前記被写体によって反射された赤外光を受光することによって計測され、メモリに保存されている前記赤外光の強度を取得し、
前記可視光画像に基づいて、前記被写体までの距離である第1奥行きを算出し、
前記赤外光の強度に基づいて、前記被写体までの距離である第2奥行きを算出し、
前記第1奥行きの信頼性を多値で表す第1信頼性マスクを算出し、
前記第2奥行きの信頼性を多値で表す第2信頼性マスクを算出し、
前記第1信頼性マスクおよび前記第2信頼性マスクに基づいて、前記第1奥行きおよび前記第2奥行きを統合することによって統合奥行きを算出する、
奥行取得方法。
A depth acquisition method in which a computer acquires a distance to a subject as a depth,
Obtain a visible light image generated by imaging the subject based on the visible light and stored in the memory,
It is measured by receiving the infrared light emitted from the light source and reflected by the subject, and acquires the intensity of the infrared light stored in the memory,
Calculating a first depth, which is a distance to the subject, based on the visible light image;
Based on the intensity of the infrared light, calculate a second depth that is a distance to the subject,
Calculating a first reliability mask representing the reliability of the first depth in multiple values;
Calculating a second reliability mask representing the reliability of the second depth in multiple values;
Calculating an integrated depth by integrating the first depth and the second depth based on the first reliability mask and the second reliability mask;
How to get depth.
被写体までの距離を奥行きとしてコンピュータが取得する奥行取得方法であって、
可視光に基づく被写体の撮像によって生成され、メモリに保存されている可視光画像を取得し、
光源から照射されて前記被写体によって反射された赤外光を受光することによって計測され、メモリに保存されている前記赤外光の強度を取得し、
前記可視光画像に基づいて、前記被写体までの距離である第1奥行きを算出し、
前記赤外光の強度に基づいて、前記被写体までの距離である第2奥行きを算出し、
前記可視光画像、前記赤外光の強度、前記第1奥行きおよび前記第2奥行きを、学習モデルに入力することによって、前記第1奥行きと前記第2奥行きとが統合された統合奥行きを、前記学習モデルから取得する、
奥行取得方法。
A depth acquisition method in which a computer acquires a distance to a subject as a depth,
Obtain a visible light image generated by imaging the subject based on the visible light and stored in the memory,
It is measured by receiving the infrared light emitted from the light source and reflected by the subject, and acquires the intensity of the infrared light stored in the memory,
Calculating a first depth, which is a distance to the subject, based on the visible light image;
Based on the intensity of the infrared light, calculate a second depth that is a distance to the subject,
By inputting the visible light image, the intensity of the infrared light, the first depth and the second depth into a learning model, the integrated depth obtained by integrating the first depth and the second depth, Obtained from the learning model,
How to get depth.
被写体までの距離を奥行きとして取得するためのプログラムであって、
可視光に基づく被写体の撮像によって生成され、メモリに保存されている可視光画像を取得し、
光源から照射されて前記被写体によって反射された赤外光を受光することによって計測され、メモリに保存されている前記赤外光の強度を取得し、
前記可視光画像に基づいて、前記被写体までの距離である第1奥行きを算出し、
前記赤外光の強度に基づいて、前記被写体までの距離である第2奥行きを算出し、
前記第1奥行きの信頼性を多値で表す第1信頼性マスクを算出し、
前記第2奥行きの信頼性を多値で表す第2信頼性マスクを算出し、
前記第1信頼性マスクおよび前記第2信頼性マスクに基づいて、前記第1奥行きおよび前記第2奥行きを統合することによって統合奥行きを算出する、
ことをコンピュータに実行させるプログラム。
A program for acquiring a distance to a subject as a depth,
Obtain a visible light image generated by imaging the subject based on the visible light and stored in the memory,
It is measured by receiving the infrared light emitted from the light source and reflected by the subject, and acquires the intensity of the infrared light stored in the memory,
Calculating a first depth, which is a distance to the subject, based on the visible light image;
Based on the intensity of the infrared light, calculate a second depth that is a distance to the subject,
Calculating a first reliability mask representing the reliability of the first depth in multiple values;
Calculating a second reliability mask representing the reliability of the second depth in multiple values;
Calculating an integrated depth by integrating the first depth and the second depth based on the first reliability mask and the second reliability mask;
A program that causes a computer to do something.
被写体までの距離を奥行きとして取得するためのプログラムであって、
可視光に基づく被写体の撮像によって生成され、メモリに保存されている可視光画像を取得し、
光源から照射されて前記被写体によって反射された赤外光を受光することによって計測され、メモリに保存されている前記赤外光の強度を取得し、
前記可視光画像に基づいて、前記被写体までの距離である第1奥行きを算出し、
前記赤外光の強度に基づいて、前記被写体までの距離である第2奥行きを算出し、
前記可視光画像、前記赤外光の強度、前記第1奥行きおよび前記第2奥行きを、学習モデルに入力することによって、前記第1奥行きと前記第2奥行きとが統合された統合奥行きを、前記学習モデルから取得する、
ことをコンピュータに実行させるプログラム。
A program for acquiring a distance to a subject as a depth,
Obtain a visible light image generated by imaging the subject based on the visible light and stored in the memory,
It is measured by receiving the infrared light emitted from the light source and reflected by the subject, and acquires the intensity of the infrared light stored in the memory,
Calculating a first depth, which is a distance to the subject, based on the visible light image;
Based on the intensity of the infrared light, calculate a second depth that is a distance to the subject,
By inputting the visible light image, the intensity of the infrared light, the first depth and the second depth into a learning model, the integrated depth obtained by integrating the first depth and the second depth, Obtained from the learning model,
A program that causes a computer to do something.
JP2018184090A 2018-09-28 2018-09-28 Depth acquisition device, depth acquisition method, and program Pending JP2020051991A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018184090A JP2020051991A (en) 2018-09-28 2018-09-28 Depth acquisition device, depth acquisition method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018184090A JP2020051991A (en) 2018-09-28 2018-09-28 Depth acquisition device, depth acquisition method, and program

Publications (1)

Publication Number Publication Date
JP2020051991A true JP2020051991A (en) 2020-04-02

Family

ID=69996819

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018184090A Pending JP2020051991A (en) 2018-09-28 2018-09-28 Depth acquisition device, depth acquisition method, and program

Country Status (1)

Country Link
JP (1) JP2020051991A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950517A (en) * 2021-02-25 2021-06-11 浙江光珀智能科技有限公司 Method and device for fusing high dynamic range depth map and gray scale map of depth camera
CN113820695A (en) * 2021-09-17 2021-12-21 深圳市睿联技术股份有限公司 Ranging method and apparatus, terminal system, and computer-readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950517A (en) * 2021-02-25 2021-06-11 浙江光珀智能科技有限公司 Method and device for fusing high dynamic range depth map and gray scale map of depth camera
CN112950517B (en) * 2021-02-25 2023-11-03 浙江光珀智能科技有限公司 Fusion method and device of depth camera high dynamic range depth map and gray scale map
CN113820695A (en) * 2021-09-17 2021-12-21 深圳市睿联技术股份有限公司 Ranging method and apparatus, terminal system, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
JP6270813B2 (en) Motion sensor device having a plurality of light sources
JP7262021B2 (en) Depth Acquisition Device, Depth Acquisition Method and Program
JP5739174B2 (en) Distance information extraction method and optical apparatus employing the method
JP6990859B2 (en) Depth acquisition device, depth acquisition method and program
US10755417B2 (en) Detection system
US8768010B2 (en) Distance measuring apparatus, distance measuring method, and program
US9978148B2 (en) Motion sensor apparatus having a plurality of light sources
JP6161276B2 (en) Measuring apparatus, measuring method, and program
JP2023101522A (en) Imaging device, information processing device, imaging method, and program
JP2020003446A (en) Optical range finder
KR20150037366A (en) Method for decreasing noise of depth image, image processing apparatus and image generating apparatus using thereof
JP2020052001A (en) Depth acquisition device, depth acquisition method, and program
JP7450163B2 (en) Depth acquisition device, depth acquisition method and program
US20210231812A1 (en) Device and method
JP2020051991A (en) Depth acquisition device, depth acquisition method, and program
JP7149505B2 (en) Ranging method, ranging device, and program
US10955337B2 (en) Method of estimating optical physical property value distribution, computer-readable recording medium and optical physical property value distribution estimating apparatus
US20230386058A1 (en) Object information generation system, object information generation method, and object information generation program
WO2021059698A1 (en) Ranging device, method for controlling ranging device, and electronic apparatus