JP7200002B2 - Image processing device, imaging device, image processing method, program, and storage medium - Google Patents
Image processing device, imaging device, image processing method, program, and storage medium Download PDFInfo
- Publication number
- JP7200002B2 JP7200002B2 JP2019030595A JP2019030595A JP7200002B2 JP 7200002 B2 JP7200002 B2 JP 7200002B2 JP 2019030595 A JP2019030595 A JP 2019030595A JP 2019030595 A JP2019030595 A JP 2019030595A JP 7200002 B2 JP7200002 B2 JP 7200002B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- subject
- distance
- images
- position information
- 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.)
- Active
Links
Images
Landscapes
- Studio Devices (AREA)
- Image Analysis (AREA)
Description
本発明は、被写体の速度を取得する画像処理装置、画像処理装置を備える撮像装置、画像処理方法、プログラム、および記憶媒体に関する。 The present invention relates to an image processing device that obtains the velocity of a subject, an imaging device that includes the image processing device, an image processing method, a program, and a storage medium.
撮影した被写体までの距離を検出し、撮影画像中の被写体像に対応する被写体の実際の移動速度を計測する電子カメラが提案されている(特許文献1)。また、距離センサで検出した被写体までの距離とジャイロセンサで検出したパンニング角度とに基づいて被写体の移動速度を求める撮像装置が提案されている(特許文献2)。 An electronic camera has been proposed that detects the distance to a photographed subject and measures the actual moving speed of the subject corresponding to the subject image in the photographed image (Patent Document 1). Further, an imaging apparatus has been proposed that obtains the moving speed of a subject based on the distance to the subject detected by a distance sensor and the panning angle detected by a gyro sensor (Patent Document 2).
様々な物体が被写体となり得る上に、被写体を撮像する環境も多岐に亘る。そのため、被写体の運動の様子によっては、被写体の速度を精度良く取得することが困難である場合がある。例えば、被写体が低い速度でカメラに向かって移動しているような場合には、フレーム間における被写体の移動距離が短いので、取得した被写体速度の精度が低いことがある。 Various objects can be subjects, and the environment in which the subjects are imaged is also diverse. Therefore, it may be difficult to accurately acquire the speed of the subject depending on the motion of the subject. For example, when the subject is moving toward the camera at a low speed, the accuracy of the obtained subject speed may be low because the subject moves a short distance between frames.
以上の事情に鑑み、本発明の目的は、撮像画像内の被写体像に対応する被写体の速度を高精度に取得できる画像処理装置、画像処理装置を備える撮像装置、画像処理方法、プログラム、および記憶媒体を提供することにある。 In view of the above circumstances, an object of the present invention is to provide an image processing apparatus capable of obtaining with high accuracy the velocity of a subject corresponding to a subject image in a captured image, an imaging apparatus provided with the image processing apparatus, an image processing method, a program, and a memory. It is to provide a medium.
上記目的を達成するために、本発明の画像処理装置は、複数の撮像画像に含まれる基準画像内の被写体像に対応する被写体像を含む複数の対応画像を複数の前記撮像画像から選択する追跡部と、前記基準画像および前記対応画像の各々について、当該基準画像または当該対応画像を取得した取得装置と当該被写体像に対応する被写体との距離に関する距離情報を取得する距離取得部と、前記基準画像および前記対応画像の各々について前記被写体の位置に関する位置情報を取得し、前記距離情報と前記位置情報とを用いて前記基準画像を基準とした前記被写体の3次元位置情報を取得する位置取得部と、前記対応画像の各々に関する信頼度に基づいて選択された複数の前記対応画像における前記3次元位置情報を用いて前記被写体像に対応する被写体の速度を取得する速度取得部と、を備える。 To achieve the above object, the image processing apparatus of the present invention provides a tracking method that selects a plurality of corresponding images including a subject image corresponding to a subject image in a reference image included in a plurality of captured images from a plurality of the captured images. a distance acquisition unit configured to acquire, for each of the reference image and the corresponding image, distance information relating to a distance between an acquisition device that acquired the reference image or the corresponding image and a subject corresponding to the subject image; A position acquisition unit that acquires position information regarding the position of the subject for each of the image and the corresponding image, and acquires three-dimensional position information of the subject with reference to the reference image using the distance information and the position information. and a speed acquisition unit that acquires the speed of the subject corresponding to the subject image using the three-dimensional position information in the plurality of corresponding images selected based on the reliability of each of the corresponding images.
本発明によれば、撮像画像内の被写体像に対応する被写体の速度を高精度に取得できる。 According to the present invention, the velocity of the subject corresponding to the subject image in the captured image can be obtained with high accuracy.
以下、本発明の実施形態について添付図面を参照しながら詳細に説明する。以下に説明される実施形態は本発明を実現可能な構成の一例に過ぎない。以下の実施形態は、本発明が適用される装置の構成や各種条件に応じて適宜修正または変更することが可能である。したがって、本発明の範囲は以下の実施形態に記載される構成によって限定されるものではない。 BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The embodiments described below are merely examples of configurations that can implement the present invention. The following embodiments can be appropriately modified or changed according to the configuration of the device to which the present invention is applied and various conditions. Therefore, the scope of the invention is not limited by the configurations described in the following embodiments.
本実施形態の撮像装置1は、本発明に係る画像処理装置を含む。本実施形態の撮像装置1は、デジタルスチルカメラ、デジタルビデオカメラ、監視カメラ、工業用カメラ、医療用カメラ等の種々の電子カメラ装置に適用することが可能である。また、本実施形態の撮像装置1を、スマートフォン、タブレット端末等の撮像機能を有する種々の情報処理装置に適用することも可能である。 The imaging device 1 of this embodiment includes an image processing device according to the present invention. The imaging device 1 of this embodiment can be applied to various electronic camera devices such as digital still cameras, digital video cameras, surveillance cameras, industrial cameras, and medical cameras. Also, the imaging device 1 of the present embodiment can be applied to various information processing devices having an imaging function, such as smartphones and tablet terminals.
<撮像装置の構成>
図1は、本発明の実施形態に係る撮像装置1の構成を模式的に示すブロック図である。撮像装置1は、結像光学系10、撮像素子11、制御部12、画像処理装置13、記憶部14、入力部15、表示部16、および通信部17を有する。
<Structure of Imaging Device>
FIG. 1 is a block diagram schematically showing the configuration of an imaging device 1 according to an embodiment of the invention. The imaging device 1 has an imaging
結像光学系10は、複数のレンズ群(不図示)を有する撮影レンズであって、被写体の像を撮像素子11上に結像させる。結像光学系10は、撮像装置1に対して着脱可能であってもよいし、撮像装置1と一体であってもよい。着脱可能である場合、結像光学系10は撮像装置1が有する構成要素ではないと理解し得る。撮像素子11から所定距離だけ離れた位置に結像光学系10の射出瞳101が存在する。本明細書において、z軸は、結像光学系10の光軸102と平行の関係にある。また、x軸およびy軸は、互いに直交すると共に、それぞれz軸および光軸に直交する。
The imaging
撮像素子11は、CMOS(相補型金属酸化膜半導体)やCCD(電荷結合素子)等を含むイメージセンサであって、撮像面位相差測距方式(像面位相差方式)による測距機能を有する。撮像素子11は、結像光学系10を介して撮像素子11上に結像した被写体像を光電変換することによって、被写体像に対応する画像信号を生成し出力する。
The imaging device 11 is an image sensor including a CMOS (complementary metal oxide semiconductor), a CCD (charge-coupled device), or the like, and has a range-finding function by an imaging plane phase difference ranging method (image plane phase difference method). . The imaging device 11 photoelectrically converts a subject image formed on the imaging device 11 via the imaging
制御部12は、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)等の素子を含む制御装置であって、撮像装置1の各部を制御する。制御部12は、例えば、オートフォーカス(AF)による自動焦点合わせ、フォーカス位置の変更、F値(絞り)の変更、および画像の取込みに関する制御、並びに記憶部14、入力部15、表示部16、および通信部17に対する制御を行う。
The
画像処理装置13は、画像処理に関する種々の処理を実行する論理回路である。画像処理装置13は、画像生成部130、メモリ131、追跡部132、距離取得部133、位置取得部134、および速度取得部135を有する。画像生成部130は、撮像素子11が出力する画像信号に対して、ノイズ除去、デモザイキング、輝度信号変換、収差補正、ホワイトバランス調整、色補正などの信号処理を実行して撮像画像(映像データ)を生成する。メモリ131は、画像生成部130が出力した撮像画像を蓄積する。追跡部132は、速度取得の対象である被写体像を含む複数の撮像画像を選択し、被写体像の画像上の位置を追跡する。距離取得部133は、測距機能を有する撮像装置1によって得られた撮像画像に写っている被写体像に対応する被写体と撮像装置1との距離に関する距離情報を、後述する視差量に基づいて取得(算出)する。位置取得部134は、撮像画像に写っている被写体像の位置に関する位置情報および撮像画像を取得したときの撮像装置1の位置および姿勢を示す運動情報を取得(算出)する。以上の運動情報は、撮像装置1が備える不図示のジャイロセンサおよび加速度センサから位置取得部134に供給されると好適である。以上の距離情報と位置情報と運動情報とは、対応する撮像画像と関連付けられてメモリ131に記憶されると好適である。また、位置取得部134は、以上の距離情報と位置情報と運動情報とに基づいて、各時刻における被写体像の3次元位置情報を取得(算出)する。速度取得部135は、後述する信頼度に基づいて選択された撮像画像の3次元位置情報を用いて被写体像に対応する被写体の速度を取得(算出)する。なお、画像処理装置13は、上記した処理を実現するプログラムを格納したメモリと以上のプログラムを実行するCPUとで構成されていてもよい。
The
記憶部14は、フラッシュメモリ等の不揮発性の記憶媒体であって、撮像装置1にて取得された撮像画像(映像データ)、撮像情報、センサデータ、中間データ、撮像装置1で使用されるパラメータ等を記憶する。撮像情報は、撮像画像に関連付けられその撮像画像の撮像条件を示す情報である。記憶部14は、高速に読取り/書込みが可能であると共に容量の大きい記憶媒体であることが好ましい。
The
入力部15は、例えばダイヤル、ボタン、スイッチ等によって構成される操作インターフェイスであって、ユーザによる情報入力や設定変更に用いられる。表示部16は、液晶ディスプレイや有機ELディスプレイ等の表示手段であって、ユーザに対する情報、例えば、メモリ131に蓄積されている撮像画像、撮影時の構図、各種の設定画面、およびメッセージ情報等を表示する。なお、入力部15と表示部16とを兼ねるタッチパネルが採用されてもよい。
The
通信部17は、有線または無線によって撮像装置1と他の装置とを接続する通信インターフェイスであって、撮像画像、被写体位置、被写体速度等の情報を他の装置と送受信することが可能である。
The
<撮像素子の構成>
図2は、本発明の実施形態に係る撮像面位相差測距方式に対応した撮像素子11の説明図である。撮像素子11は、x軸方向およびy軸方向に亘って(すなわち、xy平面上に)配置された複数の画素を有する。図2(a)の画素断面図に示すように、各画素は、マイクロレンズ201、カラーフィルタ202、および1対の光電変換部203A、203Bを有する。各画素には、カラーフィルタ202の波長帯域に応じたRGB(Red, Green, Blue)の分光特性が付与される。複数のカラーフィルタ202は、例えば、ベイヤー配列等の配色パターン(不図示)に従って配置されている。基板204内に形成される光電変換部203A、203Bは、検出対象の波長帯域についての感度を有している。各画素には、不図示の配線が接続されている。各画素から出力された画素信号は、不図示の画素信号処理部に供給されて処理され、画像信号として撮像素子11から出力される。なお、上記した複数の画素は、xy平面に配置されていなくてもよい。
<Structure of image sensor>
FIG. 2 is an explanatory diagram of the imaging device 11 compatible with the imaging surface phase difference ranging method according to the embodiment of the present invention. The imaging element 11 has a plurality of pixels arranged over the x-axis direction and the y-axis direction (that is, on the xy plane). As shown in the pixel cross-sectional view of FIG. 2A, each pixel has a
図2(b)は、光軸102と撮像素子11との交点(中心像高)から見た結像光学系10の射出瞳101を示す図である。射出瞳101は、相異なる瞳領域である第1瞳領域210と第2瞳領域220とに分割される。射出瞳101と各光電変換部203とは各マイクロレンズ201によって共役の関係にある。第1瞳領域210を主として通過した第1光束が光電変換部203Aに入射し、第2瞳領域220を主として通過した第2光束が光電変換部203Bに入射する。光電変換部203A,203Bは、それぞれ、入射した光束を光電変換してA画像(A画像信号)およびB画像(B画像信号)を取得し、画像処理装置13へと出力する。画像処理装置13は、入力されたA画像およびB画像に対して種々の画像処理(画像生成、測距演算等)を実行し、実行結果を必要に応じて記憶部14に記憶させる。画像処理装置13は、A画像とB画像とを加算して加算後の画像情報(撮像信号)を取得することができる。また、画像処理装置13の距離取得部133は、以下のようにA画像とB画像との相関演算を実行してデフォーカス量ひいては被写体までの距離を取得(算出)することができる。
FIG. 2B is a diagram showing the
図2(b)は、第1瞳領域210の重心位置(第1重心位置211)と第2瞳領域220の重心位置(第2重心位置221)とを示す。本実施形態において、第1重心位置211は、射出瞳101の中心から第1軸200(x軸)に沿って偏心(移動)している。一方、第2重心位置221は、射出瞳101の中心から第1軸200に沿って第1重心位置211とは逆方向に偏心(移動)している。図2(b)において、第1重心位置211と第2重心位置221とを結ぶ方向が瞳分割方向に相当し、第1重心位置211と第2重心位置221との距離(重心間距離)が基線長222に相当する。
FIG. 2B shows the center-of-gravity position of the first pupil region 210 (first center-of-gravity position 211) and the center-of-gravity position of the second pupil region 220 (second center-of-gravity position 221). In this embodiment, the first center-of-
A画像およびB画像の位置は、デフォーカスによって瞳分割方向(本例ではx軸方向)に対してそれぞれ変化する。これらの画像間の相対的な位置変化量、すなわち、A画像とB画像との視差(位相差)量は、デフォーカス量(ピントのズレ量)に応じた値を示す。以上の視差量は、A画像およびB画像の局所領域同士の相関演算を所定領域内にて実行し、最も類似度の高い位置の差分に応じて算出される。相関値の算出方式としては、例えば、一般的に用いられるSAD(Sum of Absolute Difference)法やSSD(Sum of Squared Difference)法を採用し得る。以上のように算出された視差量は、基線長を用いた幾何学的関係(例えば、三角測量の原理)に基づいてデフォーカス量に換算できる。デフォーカス量は、結像光学系10の結像関係に基づいて被写体距離に変換できる。なお、以上の視差量に対して、所定の変換係数を乗算することによってデフォーカス量または被写体距離を取得する構成が採用されてもよい。以上のように、撮像面位相差測距機能を有する撮像素子11を用いて撮像装置1(注目画素)から被写体までの距離を取得することができる。
The positions of the A image and the B image respectively change with respect to the pupil division direction (x-axis direction in this example) due to defocus. The amount of relative positional change between these images, that is, the amount of parallax (phase difference) between the A image and the B image indicates a value corresponding to the amount of defocus (the amount of defocus). The amount of parallax described above is calculated according to the difference between the positions with the highest degree of similarity by executing the correlation calculation between the local regions of the A image and the B image within a predetermined region. As a method for calculating the correlation value, for example, a generally used SAD (Sum of Absolute Difference) method or SSD (Sum of Squared Difference) method can be adopted. The amount of parallax calculated as described above can be converted into the amount of defocus based on a geometric relationship (for example, the principle of triangulation) using the baseline length. The defocus amount can be converted into an object distance based on the imaging relationship of the imaging
<速度取得処理フロー>
図3は、本実施形態における速度取得処理のフローチャートである。本実施形態の画像処理装置13は、撮像装置1が撮影し記録した映像中の被写体の速度を以下のように取得(算出)する。
<Speed acquisition processing flow>
FIG. 3 is a flow chart of speed acquisition processing in this embodiment. The
ステップS301において、撮像装置1のユーザが、入力部15を操作して速度取得の対象である映像401を選択する。図4(a)に示すように、記憶部14に記憶されている選択可能な映像401が、表示部16の表示領域に3行3列に亘って表示されている。映像401は、例えば、撮像面測距機能を有する撮像装置1の撮像素子11を用いて取得された動画ファイル(映像データ)であって、測距に用いられる撮像情報が関連付けられた複数の撮像画像(複数のフレーム)を含んでいる。なお、映像401は、動画に限定されず、例えば、時系列的に取得され相対取得時刻が明らかな複数の静止画像であってもよい。
In step S301, the user of the imaging device 1 operates the
ステップS302において、ステップS301にて選択された映像401から速度算出の対象(追跡対象)である被写体像が含まれる基準フレーム(基準画像)Fbが選択される。より具体的には、ユーザが、図4(b)に示すように表示部16に表示された映像401を参照しながら入力部15を操作して基準フレームFbを選択する。ユーザは、スクロールバー402を操作することで任意の時刻に対応するフレームFを表示部16に表示させることができる。被写体が撮像装置1に向かって移動している場合、撮像装置1のより近くに被写体が位置するフレームFを基準フレームFbとして選択すると好適である。被写体が撮像画像において相対的に大きく表示されるからであり、また、測距精度が被写体までの距離に影響されるからである。測距精度は測距方式に応じて変化するものの、一般的に、測距された距離には被写体距離に対して数%程度の誤差が含まれる。
In step S302, a reference frame (reference image) Fb including a subject image that is a target (tracking target) for velocity calculation is selected from the
なお、ステップS302において、ユーザの選択によらずに、追跡部132が、撮像画像に関連付けられた撮像情報が示す撮像条件によって定まる測距精度に基づいて基準フレームFbを選択してもよい。測距精度に影響する撮像条件として、結像光学系10の焦点距離、絞り値(F値)、被写体までの距離が例示される。以上の構成によれば、客観的なパラメータである撮像条件に基づいて、速度取得のために適切な基準フレームFbが選択され得る。
Note that in step S302, the
次いで、ユーザが、入力部15を操作して速度取得の対象である基準フレームFb内(基準画像内)の被写体像を特定する。ユーザは、例えば、被写体像を囲む矩形領域403を直接特定することで被写体像(被写体領域)を指定したり、被写体像上または近傍の一点を特定することで自動的に設定される矩形領域403によって被写体像(被写体領域)を指定したりできる。また、ユーザの選択によらずに、追跡部132が一般物体認識処理によって被写体像(被写体領域)を指定する構成も採用可能である。
Next, the user operates the
ステップS303において、追跡部132が、ステップS302にて指定された被写体像を基準フレームFbの前後の時刻に亘る複数のフレームFにおいて追跡する。具体的には、図4(c)に示すように、追跡部132は、基準フレームFb内の被写体像(被写体領域)をテンプレートとして用いたテンプレートマッチングによって、テンプレートとの類似度が所定閾値より高い領域を有するフレーム(撮像画像)Fを選択する。すなわち、追跡部132は、被写体像の類似度に基づいてフレームFを選択する。以上の構成によれば、指定された被写体像に類似する画像領域を有するフレームFが適切に選択される。以上のように選択されたフレームFは、基準フレームFb内の指定された被写体像に対応する被写体像を含むので、以後、「対応フレーム(対応画像)F」と称する場合がある。また、以降、基準フレームFbに対応する時刻よりも前の時刻の対応フレームFを「対応フレームFs」と称し、基準フレームFbに対応する時刻よりも後の時刻の対応フレームFを「対応フレームFe」と称する場合がある。追跡部132は、基準フレームFbの前後に対応フレームFが検出されなくなると追跡処理を終了する。
In step S303, the
ステップS304において、位置取得部134が、基準フレームFbにおける撮像装置1の撮像位置(基準撮像位置)を基準として、対応フレームFsから対応フレームFeに亘る被写体の3次元位置を再構成する。より具体的には以下の通りである。
In step S304, the
距離取得部133が、基準フレームFbおよび対応フレームFs~Feの各々について、指定された被写体像に対応する被写体と撮像装置1との距離(被写体距離)に関する距離情報を取得(算出)する。距離取得部133は、被写体領域(図4(b)の矩形領域403)に相当する各画素について、図2を参照して前述した手法に基づいて距離を算出し、算出された複数の距離に関する統計値(中央値、平均値等)を被写体の代表距離として取得すると好適である。
The
位置取得部134が、基準フレームFbおよび対応フレームFs~Feの各々について、被写体領域である矩形領域403の中心を指定された被写体の位置に関する位置情報である代表位置として取得(算出)する。そして、以上の各フレームFs~Feについて被写体の代表3次元位置(Xi,Yi,Zi)(i=Fs~Fe)を求める。
The
次いで、位置取得部134が、基準フレームFbを撮像した際の撮像装置1の撮像位置(基準撮像位置)に対する各フレームFs~Feの運動情報を取得する。運動情報は、基準撮像位置に対する撮像装置1の撮像位置の位置および姿勢の変化を示す情報である。位置取得部134は、メモリ131に記憶されている、各フレームFs~Feに関連付けられたジャイロセンサおよび加速度センサからの出力情報に基づいて、運動情報を示す回転R(例えば、回転行列)および並進T(例えば、並進ベクトル)を求める。そして、位置取得部134が、各フレームFs~Feの被写体の代表3次元位置を、基準フレームFbからの撮像装置1の位置および姿勢の変化の逆演算であるR-1とT-1とを適用して、基準フレームFbを基準とする3次元座標系に変換する。
Next, the
図5は、ステップS304の3次元位置再構成の説明図である。図5(a)の左列は、時刻t1~t4において撮像装置1が被写体を撮像している様子を示し、右列は、時刻t1~t4において撮像された撮像画像を示す。本例では、撮像装置1と被写体との距離が最も近い時刻t3のフレームFが基準フレームFbとして選択されている。対応フレームFs~Fe(時刻t1,t2,t4に相当)は追跡部132が被写体を追跡し得たフレームFである。図5(b)は、位置取得部134が、対応フレームFs~Feについて取得された代表距離と変換後の代表3次元位置とに基づいて、基準フレームFbを基準として再構成した被写体の3次元位置を示す。図5(b)は、再構成された被写体の3次元位置を上方から俯瞰した図である。また、図5(b)は、基準フレームFbおよび対応フレームFs~Fe(すなわち、時刻t1~t4)における被写体の3次元位置と、他の時刻の対応フレームFにおける被写体の3次元位置とで示される移動軌跡を示している。
FIG. 5 is an explanatory diagram of the three-dimensional position reconstruction in step S304. The left column of FIG. 5(a) shows how the imaging device 1 captures images of the subject at times t1 to t4, and the right column shows captured images captured at times t1 to t4. In this example, the frame F at the time t3 when the distance between the imaging device 1 and the subject is the shortest is selected as the reference frame Fb. Corresponding frames Fs to Fe (corresponding to times t1, t2, and t4) are frames F in which the
ステップS305,S306において、速度取得部135が、被写体の速度の取得に用いる対応フレームFを信頼度Cに基づいて選択し、選択した対応フレームFにおける被写体の3次元位置情報に基づいて被写体の速度を取得(算出)する。被写体距離や撮像条件に関するパラメータである信頼度Cの例を以下に説明する。
In steps S305 and S306, the
信頼度Cの第1の例は、判断対象である対応フレームF(以下、対象フレームFaと称する)における被写体距離(すなわち、撮像装置1と被写体との距離)Daと基準フレームFbにおける被写体距離Dbとの差分値Df(Df=|Da-Db|)である。速度取得部135は、閾値δ1(第1閾値)を上回る差分値Df(Df>δ1)を示す対象フレームFa、を被写体の速度の取得に用いるべき対応フレームFとして選択する。閾値δ1は距離分解能であって、撮像条件および被写体距離によって定まる値である。以上の構成によれば、基準フレームFbに対して距離分解能以下の位置にある被写体像を含む対応フレームFに基づいて精度の低い被写体速度が取得されることが抑制される。なお、本例の差分値Dfは、特定の方向(例えば、X方向、Y方向、Z方向のいずれか)における被写体距離Dの差分値であってもよいし、3次元的に算出された被写体距離Dの差分値であってもよい。
A first example of the reliability C is the subject distance (that is, the distance between the imaging device 1 and the subject) Da in the corresponding frame F (hereinafter referred to as the target frame Fa) to be judged and the subject distance Db in the reference frame Fb. is a difference value Df (Df=|Da-Db|). The
信頼度Cの第2の例は、対象フレームFaの運動情報によって示される変化量Vである。撮像装置1の位置および姿勢の変化が大きいほど、変化量Vも増大する。変化量Vは、回転Rによって示されてもよく、並進Tによって示されてもよく、回転Rと並進Tとに基づいて得られる総合的な変化値によって示されてもよい。速度取得部135は、閾値δ2(第2閾値)を下回る変化量V(V<δ2)を示す対象フレームFaを、被写体の速度の取得に用いるべき対応フレームFとして選択する。以上の構成によれば、撮像装置1が不連続的または急激に動いた時点(すなわち、被写体が相対的に速く動いた時点)の対応フレームFに基づいて精度の低い被写体速度が取得されることが抑制される。
A second example of the reliability C is the amount of change V indicated by the motion information of the target frame Fa. As the change in the position and orientation of the imaging device 1 increases, the amount of change V also increases. The change amount V may be indicated by the rotation R, the translation T, or a total change value obtained based on the rotation R and the translation T. The
速度取得部135は、ステップS305,S306のループを繰り返すことによって、各対応フレームFs~Feに対しての選択処理および速度取得処理を実行する。すなわち、未処理の対応フレームFs~Feが存在している場合(ステップS306:No)、ステップS305の処理が繰り返し実行されて各対応フレームFs~Feについての速度取得が実行される。全ての対応フレームFs~FeについてステップS305の処理が終了すると(ステップS306:Yes)、ステップS307が実行される。
The
ステップS307において、速度取得部135は、ステップS305,S306において速度取得の対象として選択されなかった対応フレームFにおける被写体速度を、被写体の速度が取得された対応フレームFに基づく補完処理によって取得する。
In step S307, the
なお、ステップS305~S307によって取得された各対応フレームFにおける被写体速度は、速度取得部135がメタデータとして映像データ内に記録すると好適である。また、表示部16が映像401を表示する際に、各対応フレームFにおける被写体速度がその対応フレームF内の被写体像の近傍に表示されると好適である。
It should be noted that the subject speed in each corresponding frame F obtained in steps S305 to S307 is preferably recorded in the video data by the
以上に説明したように、測距機能を有する撮像装置1が取得した被写体像を含む映像データ(複数のフレームF)から取得した被写体距離と被写体の3次元位置とに基づいて、被写体速度を精度よく取得(算出)することが可能である。また、以上の実施形態では、信頼度Cが低いフレーム(撮像画像)を被写体速度の取得に用いないので、取得される被写体速度がより高精度となる。 As described above, the object velocity can be accurately calculated based on the object distance and the three-dimensional position of the object obtained from the video data (plurality of frames F) including the object image obtained by the imaging device 1 having the distance measuring function. It is possible to obtain (calculate) well. In addition, in the above embodiment, frames (captured images) with low reliability C are not used to acquire the subject velocity, so the acquired subject velocity is more accurate.
さらに、以上の構成においては、撮像装置1の位置および姿勢を示す運動情報に基づいて被写体の3次元位置を取得(算出)する。したがって、撮像装置1を移動させながら取得した映像データ(例えば、被写体像が画面の略中央に位置し続けるような観賞用の映像データ)からも、被写体速度を精度よく取得(算出)することが可能である。 Furthermore, in the above configuration, the three-dimensional position of the subject is obtained (calculated) based on motion information indicating the position and orientation of the imaging device 1 . Therefore, it is possible to accurately acquire (calculate) the subject velocity even from video data acquired while moving the imaging device 1 (for example, viewing video data in which the subject image is continuously positioned substantially at the center of the screen). It is possible.
<変形例>
以上の各実施形態は多様に変形される。具体的な変形の態様を以下に例示する。以上の実施形態および以下の例示から任意に選択された2以上の態様は、相互に矛盾しない限り適宜に併合され得る。
<Modification>
Each of the above embodiments can be modified in various ways. Specific modification modes are exemplified below. Two or more aspects arbitrarily selected from the above embodiments and the following examples can be combined as appropriate as long as they do not contradict each other.
上記した実施形態は、撮像装置1を移動させながら取得した観賞用の映像データに対しても被写体速度を精度よく取得するという課題を、撮像装置1の位置および姿勢を示す運動情報に基づいて被写体の3次元位置を取得するという構成によって解決している。しかしながら、位置および姿勢の変化が少ない撮像装置1(例えば、監視カメラ)においては、以上の課題は存在しないので、運動情報を用いずに被写体の3次元情報(ひいては被写体速度)が取得されてもよい。本変形例の構成によれば、位置取得部134が運動情報を取得しなくてよいので、画像処理装置13の構成をより簡素にすることができる。
The above-described embodiment solves the problem of accurately obtaining the subject velocity for viewing video data obtained while moving the image capturing apparatus 1, based on the motion information indicating the position and orientation of the image capturing apparatus 1. is solved by the configuration of acquiring the three-dimensional position of However, since the above problem does not exist in the imaging device 1 (for example, a monitoring camera) whose position and posture change little, even if the three-dimensional information of the subject (and thus the subject velocity) is acquired without using the motion information, good. According to the configuration of this modification, the
上記した実施形態においては、撮像装置1によって取得された映像(撮像画像)を撮像装置1に含まれる画像処理装置13が処理することによって被写体速度が取得される。しかしながら、画像処理装置13が撮像装置1から独立した別個の装置であってもよい。すなわち、独立した画像処理装置13が、他の取得装置によって取得された映像(撮像画像)を上記のように処理して被写体速度を取得してもよい。
In the above-described embodiment, the
画像処理装置13は、任意の映像(撮像画像)に対して上記した速度取得処理を実行することができる。例えば、撮像装置1に記憶された映像に対して上記処理を実行してもよいし、撮像装置1に記憶される前の映像に対して上記処理を実行することもできる。
The
画像処理装置13の各機能ブロックは、算術的な演算によって各値(距離、位置、運動情報、3次元位置、速度等)を算出してもよいし、入力と出力とを予め関連付けて記憶したテーブル等のデータセットを参照することによって各値を取得してもよい。
Each functional block of the
上記した実施形態においては、位置取得部134が各対応フレームFについて取得した被写体の3次元位置に基づいて、速度取得部135が被写体速度を取得している。本変形例の速度取得部135は、図5(c)に示すように、被写体の3次元位置によって示される被写体の移動軌跡を平滑化し、平滑化後の移動軌跡を用いて被写体の速度を取得することができる。以上の平滑化処理は、例えば、移動平均処理やスプライン処理によって実現される。本変形例の構成によれば、被写体の3次元位置の誤差や変動を低減できるので、被写体速度をより精度よく取得することが可能である。
In the above-described embodiment, the
上記した実施形態においては、被写体の3次元位置に基づいて被写体速度が算定されている。しかしながら、図5(a)のように被写体が撮像装置1に対して平面的に移動する映像については、図5(b),(c)のような上から俯瞰したような座標系、すなわち、地上からの高さを省略した座標系で速度を算出してもよい。換言すると、速度取得部135は、被写体の3次元位置情報が示す3次元位置を2次元平面上にマッピングし、マッピング後の2次元位置に基づいて被写体の速度を取得してもよい。上記のマッピングは、省略したい次元のデータを用いないことによって実現されてもよいし、被写体の3次元位置をマッピングすべき2次元平面を求め、その2次元平面に対する被写体の3次元位置の投影によって実現されてもよい。以上の構成によれば、主たる移動方向でない次元が省略された座標系にて被写体速度を取得するので、被写体位置の誤差を抑制でき、ひいては速度取得の精度を向上させることが可能である。また、3次元演算の処理量が低減されるので、画像処理装置13における処理負荷の低減も図られる。
In the above-described embodiment, the object speed is calculated based on the three-dimensional position of the object. However, for an image in which the subject moves two-dimensionally with respect to the imaging device 1 as shown in FIG. The speed may be calculated using a coordinate system that omits the height from the ground. In other words, the
以上の2次元平面へのマッピングは、ユーザからの指定に基づいて実行されてもよいし、速度取得部135による判定に基づいて実行されてもよい。例えば、速度取得部135が、対応フレームFs~Feにおける3次元位置のうち1つの次元(例えば、鉛直方向の次元)における変動量Flが閾値δ3(第3閾値)を下回る(Fl<δ3)か否かを判定する。そして、変動量Flが閾値δ3を下回る場合、速度取得部135が、その1つの次元以外の2つの次元に相当する2次元平面(例えば、前後左右平面)上にマッピングを実行すると好適である。以上の構成によれば、2次元平面へのマッピングの要否が自動的に判定されるので、ユーザの利便性が向上する。
The mapping onto the two-dimensional plane described above may be performed based on the user's designation, or may be performed based on the determination by the
他に、速度取得部135が、基準フレームFb内の被写体像にパターン認識を実行してもよい。速度取得部135は、パターン認識によって被写体像が分類された物体種別(カテゴリ)が平面上を移動する可能性の高い物体(例えば、「人間」「自動車」)を示す特定カテゴリに相当する場合に、上記したマッピングを実行すると好適である。種々の手法を、以上のパターン認識に適用可能である。例えば、速度取得部135は、上記した特定カテゴリに属する学習データ(特定カテゴリがラベル付けされた学習データ)をニューラルネットワークに入力して学習させた学習済みモデルを用いて、被写体像に対するパターン認識を実行しても良い。以上の構成によれば、3次元位置とは異なる被写体自体の性質に基づいてマッピングの要否を判定することが可能である。
Alternatively, the
被写体像は、複数のフレームFにおいて写り方が変化し得る。したがって、ステップS303において、テンプレートマッチングの最中に類似度が相対的に低下した場合に、追跡部132が、マッチングされた被写体像を新たなテンプレートとして用いて(すなわち、テンプレートを更新して)更新処理を継続してもよい。他に、追跡部132が、一般物体認識処理または深層学習によるパターン認識処理によって検出したフレームF内の検出物体像と基準フレームFbのテンプレートとの類似性に基づいて追跡処理を実行してもよい。
The subject image may vary in how it is captured in a plurality of frames F. FIG. Therefore, in step S303, when the similarity is relatively lowered during template matching, the
上記した実施形態のステップS304で、距離取得部133が、矩形領域403の一部、例えば、中心点を含む一部領域、所定間隔をおいて連続する複数領域、端部に位置するエッジ領域を選択し、選択した領域に相当する画素から代表距離を求めてもよい。
In step S304 of the above-described embodiment, the
以上、本発明の好ましい実施の形態について説明したが、本発明は上述した実施の形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。例えば、本発明は、上述の実施の形態の1以上の機能を実現するプログラムを、ネットワークや記憶媒体を介してシステムや装置に供給し、そのシステム又は装置のコンピュータの1つ以上のプロセッサがプログラムを読み出して実行する処理でも実現可能である。以上の記憶媒体は、コンピュータ読み取り可能な記憶媒体である。また、本発明は、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 Although preferred embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments, and various modifications and changes are possible within the scope of the gist thereof. For example, the present invention supplies a program that implements one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and one or more processors of a computer of the system or device executes the program. It is also possible to implement the process of reading and executing the The above storage medium is a computer-readable storage medium. The invention can also be implemented by a circuit (eg, an ASIC) that implements one or more functions.
1 撮像装置(取得装置)
10 結像光学系
11 撮像素子
12 制御部
13 画像処理装置
130 画像生成部
132 追跡部
133 距離取得部
134 位置取得部
135 速度取得部
1 Imaging device (acquisition device)
REFERENCE SIGNS
Claims (14)
前記基準画像および前記対応画像の各々について、当該基準画像または当該対応画像を取得した取得装置と当該被写体像に対応する被写体との距離に関する距離情報を取得する距離取得部と、
前記基準画像および前記対応画像の各々について前記被写体の位置に関する位置情報を取得し、前記距離情報と前記位置情報とを用いて前記基準画像を基準とした前記被写体の3次元位置情報を取得する位置取得部と、
前記対応画像の各々に関する信頼度に基づいて選択された複数の前記対応画像における前記3次元位置情報を用いて前記被写体像に対応する被写体の速度を取得する速度取得部と、を備えることを特徴とする画像処理装置。 a tracking unit that selects, from the plurality of captured images, a plurality of corresponding images including a subject image corresponding to a subject image in a reference image included in the plurality of captured images;
a distance acquisition unit that acquires, for each of the reference image and the corresponding image, distance information regarding a distance between an acquisition device that acquired the reference image or the corresponding image and a subject corresponding to the subject image;
position information relating to the position of the subject is obtained for each of the reference image and the corresponding image, and three-dimensional position information of the subject relative to the reference image is obtained using the distance information and the position information; an acquisition unit;
a speed acquisition unit that acquires the speed of the subject corresponding to the subject image using the three-dimensional position information in the plurality of corresponding images selected based on the reliability of each of the corresponding images. image processing device.
前記速度取得部は、前記差分値が第1閾値を上回る前記対応画像を選択する、ことを特徴とする請求項1に記載の画像処理装置。 The reliability is a difference value between the distance between the acquisition device and the subject in each of the plurality of corresponding images and the distance between the acquisition device and the subject in the reference image,
2. The image processing apparatus according to claim 1, wherein the speed acquisition unit selects the corresponding images in which the difference value exceeds a first threshold.
前記速度取得部は、前記変化量が第2閾値を下回る前記対応画像を選択する、ことを特徴とする請求項3に記載の画像処理装置。 The reliability is the amount of change indicated by the exercise information,
4. The image processing apparatus according to claim 3, wherein the speed acquisition unit selects the corresponding images in which the amount of change is less than a second threshold.
前記被写体像に対応する画像信号を出力する撮像素子を備え、
前記画像処理装置は、前記画像信号に対して信号処理を実行して前記撮像画像を取得する、ことを特徴とする撮像装置。 An imaging device comprising the image processing device according to any one of claims 1 to 10,
An imaging device that outputs an image signal corresponding to the subject image,
An imaging apparatus, wherein the image processing apparatus acquires the captured image by performing signal processing on the image signal.
前記基準画像および前記対応画像の各々について、当該基準画像または当該対応画像を取得した取得装置と当該被写体像に対応する被写体との距離に関する距離情報を取得する工程と、
前記基準画像および前記対応画像の各々について前記被写体の位置に関する位置情報を取得し、前記距離情報と前記位置情報とを用いて前記基準画像を基準とした前記被写体の3次元位置情報を取得する工程と、
前記対応画像の各々に関する信頼度に基づいて選択された複数の前記対応画像における前記3次元位置情報を用いて前記被写体像に対応する被写体の速度を取得する工程と、を備えることを特徴とする画像処理方法。 a step of selecting a plurality of corresponding images from the plurality of captured images, including a subject image corresponding to a subject image in a reference image included in the plurality of captured images;
obtaining, for each of the reference image and the corresponding image, distance information relating to the distance between an acquisition device that acquired the reference image or the corresponding image and a subject corresponding to the subject image;
a step of acquiring position information regarding the position of the subject for each of the reference image and the corresponding image, and acquiring three-dimensional position information of the subject relative to the reference image using the distance information and the position information; When,
and obtaining the velocity of the subject corresponding to the subject image using the three-dimensional position information in the plurality of corresponding images selected based on the reliability of each of the corresponding images. Image processing method.
前記基準画像および前記対応画像の各々について、当該基準画像または当該対応画像を取得した取得装置と当該被写体像に対応する被写体との距離に関する距離情報を取得する工程と、
前記基準画像および前記対応画像の各々について前記被写体の位置に関する位置情報を取得し、前記距離情報と前記位置情報とを用いて前記基準画像を基準とした前記被写体の3次元位置情報を取得する工程と、
前記対応画像の各々に関する信頼度に基づいて選択された複数の前記対応画像における前記3次元位置情報を用いて前記被写体像に対応する被写体の速度を取得する工程と、を備える画像処理方法をコンピュータに実行させる、ことを特徴とするプログラム。 a step of selecting a plurality of corresponding images from the plurality of captured images, including a subject image corresponding to a subject image in a reference image included in the plurality of captured images;
obtaining, for each of the reference image and the corresponding image, distance information relating to the distance between an acquisition device that acquired the reference image or the corresponding image and a subject corresponding to the subject image;
a step of acquiring position information regarding the position of the subject for each of the reference image and the corresponding image, and acquiring three-dimensional position information of the subject relative to the reference image using the distance information and the position information; When,
obtaining the velocity of the subject corresponding to the subject image using the three-dimensional position information in the plurality of corresponding images selected based on the reliability of each of the corresponding images. A program characterized by causing a
前記基準画像および前記対応画像の各々について、当該基準画像または当該対応画像を取得した取得装置と当該被写体像に対応する被写体との距離に関する距離情報を取得する工程と、
前記基準画像および前記対応画像の各々について前記被写体の位置に関する位置情報を取得し、前記距離情報と前記位置情報とを用いて前記基準画像を基準とした前記被写体の3次元位置情報を取得する工程と、
前記対応画像の各々に関する信頼度に基づいて選択された複数の前記対応画像における前記3次元位置情報を用いて前記被写体像に対応する被写体の速度を取得する工程と、を備える画像処理方法をコンピュータに実行させるプログラムを格納したコンピュータ読み取り可能な記憶媒体。 a step of selecting a plurality of corresponding images from the plurality of captured images, including a subject image corresponding to a subject image in a reference image included in the plurality of captured images;
obtaining, for each of the reference image and the corresponding image, distance information relating to the distance between an acquisition device that acquired the reference image or the corresponding image and a subject corresponding to the subject image;
a step of acquiring position information regarding the position of the subject for each of the reference image and the corresponding image, and acquiring three-dimensional position information of the subject relative to the reference image using the distance information and the position information; When,
obtaining the velocity of the subject corresponding to the subject image using the three-dimensional position information in the plurality of corresponding images selected based on the reliability of each of the corresponding images. A computer-readable storage medium that stores a program to be executed by
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019030595A JP7200002B2 (en) | 2019-02-22 | 2019-02-22 | Image processing device, imaging device, image processing method, program, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019030595A JP7200002B2 (en) | 2019-02-22 | 2019-02-22 | Image processing device, imaging device, image processing method, program, and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020134399A JP2020134399A (en) | 2020-08-31 |
JP7200002B2 true JP7200002B2 (en) | 2023-01-06 |
Family
ID=72278341
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019030595A Active JP7200002B2 (en) | 2019-02-22 | 2019-02-22 | Image processing device, imaging device, image processing method, program, and storage medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7200002B2 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2580516B2 (en) | 1992-12-01 | 1997-02-12 | 工業技術院長 | Real-time three-dimensional motion measuring apparatus and method |
JP4269908B2 (en) | 2003-11-25 | 2009-05-27 | カシオ計算機株式会社 | Electronic camera, electronic camera control program |
JP5337905B2 (en) | 2011-12-26 | 2013-11-06 | 公益財団法人日本交通管理技術協会 | Speed measurement system, speed measurement method and program |
-
2019
- 2019-02-22 JP JP2019030595A patent/JP7200002B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2580516B2 (en) | 1992-12-01 | 1997-02-12 | 工業技術院長 | Real-time three-dimensional motion measuring apparatus and method |
JP4269908B2 (en) | 2003-11-25 | 2009-05-27 | カシオ計算機株式会社 | Electronic camera, electronic camera control program |
JP5337905B2 (en) | 2011-12-26 | 2013-11-06 | 公益財団法人日本交通管理技術協会 | Speed measurement system, speed measurement method and program |
Also Published As
Publication number | Publication date |
---|---|
JP2020134399A (en) | 2020-08-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10070038B2 (en) | Image processing apparatus and method calculates distance information in a depth direction of an object in an image using two images whose blur is different | |
JP5868183B2 (en) | Imaging apparatus and imaging method | |
US9208396B2 (en) | Image processing method and device, and program | |
KR101233013B1 (en) | Image photographing device, distance computing method for the device, and focused image acquiring method | |
JP6223169B2 (en) | Information processing apparatus, information processing method, and program | |
JP2015036632A (en) | Distance measuring device, imaging apparatus, and distance measuring method | |
JP7451120B2 (en) | Image processing device, image processing method, imaging device, program | |
JP7378219B2 (en) | Imaging device, image processing device, control method, and program | |
US9413952B2 (en) | Image processing apparatus, distance measuring apparatus, imaging apparatus, and image processing method | |
JP2022000695A (en) | Imaging device | |
US11593958B2 (en) | Imaging device, distance measurement method, distance measurement program, and recording medium | |
JP2016001853A (en) | Image processing system, imaging device, control method, and program | |
JP2017138199A (en) | Image processing device, imaging device, and image processing method | |
JP2019168479A (en) | Controller, imaging device, method for control, program, and, and storage medium | |
JP2013246052A (en) | Distance measuring apparatus | |
JP7307592B2 (en) | Measuring device, imaging device, control method and program | |
JP7200002B2 (en) | Image processing device, imaging device, image processing method, program, and storage medium | |
JP2020194454A (en) | Image processing device and image processing method, program, and storage medium | |
JP2016066995A (en) | Image deviation amount calculation device, imaging device and image deviation amount calculation method | |
JP6728020B2 (en) | Image processing apparatus, image processing method and program | |
JP6171110B2 (en) | Focus control device, focus control method, focus control program, lens device, imaging device | |
JP2015203756A (en) | Parallax amount calculation device, distance calculation device, imaging apparatus, and parallax amount calculation method | |
JP6619217B2 (en) | Microscope system and control method thereof | |
JP7113327B1 (en) | Imaging device | |
JP7346021B2 (en) | Image processing device, image processing method, imaging device, program and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220218 |
|
TRDD | Decision of grant or rejection written | ||
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20221117 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20221122 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20221221 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7200002 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |