JP7300895B2 - Image processing device, image processing method, program, and storage medium - Google Patents
Image processing device, image processing method, program, and storage medium Download PDFInfo
- Publication number
- JP7300895B2 JP7300895B2 JP2019100724A JP2019100724A JP7300895B2 JP 7300895 B2 JP7300895 B2 JP 7300895B2 JP 2019100724 A JP2019100724 A JP 2019100724A JP 2019100724 A JP2019100724 A JP 2019100724A JP 7300895 B2 JP7300895 B2 JP 7300895B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- image processing
- specific object
- information
- attribute 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
- Length Measuring Devices By Optical Means (AREA)
- Image Analysis (AREA)
Description
本発明は、画像中の物体の属性情報を推定する技術に関する。 The present invention relates to technology for estimating attribute information of an object in an image.
野生動物の観測や家畜の成長管理において、物体の寸法(体積)や質量を直接計測することが困難な場合があり、非接触に動物の属性情報を取得することが求められる。 In the observation of wild animals and the growth management of livestock, it is sometimes difficult to directly measure the size (volume) and mass of objects, and non-contact acquisition of animal attribute information is required.
非接触で物体表面の形状計測を行う方法としてパターン投影法、多眼撮影法、TOF(Time of Flight)法などが知られている。非接触で計測した表面形状から体積を推定する方法として特許文献1が提案されている。特許文献1では、農作物の体積推定方法として光切断法を用いた表面形状計測に加え、農作物の陰面を接地面まで体積としたうえで補正係数によって体積の補正を行い、近似的に体積を推定する方法が提案されている。 A pattern projection method, a multi-view photographing method, a TOF (Time of Flight) method, and the like are known as methods for non-contact shape measurement of an object surface. Patent Document 1 proposes a method for estimating a volume from a surface shape measured without contact. In Patent Document 1, in addition to surface shape measurement using the light section method as a method for estimating the volume of crops, the hidden surface of the crop is assumed to be the volume up to the ground surface, and then the volume is corrected by the correction coefficient to estimate the volume approximately. A method to do so is proposed.
農作物のような静止物体に対し、動物は動きがありその動きを制御することは困難である。動物の寸法などの属性情報を取得するには動物の姿勢を知ることが必要となる。特許文献2では、撮像装置を用いて撮影した画像から特徴点を抽出し、予め学習して取得した特徴量と比較することで対象物体の姿勢を推定する方法が提案されている。 It is difficult to control the movement of animals as compared to stationary objects such as crops. In order to obtain attribute information such as animal dimensions, it is necessary to know the animal's posture. Patent Document 2 proposes a method of estimating the orientation of a target object by extracting feature points from an image captured using an imaging device and comparing them with feature amounts acquired through learning in advance.
特許文献1では、計測対象物体の背面形状は計測または推定を行っておらず、おおよその体積を推定することは可能であるが、対象物体の3次元的な形状を得ることができないため、体積や質量の推定精度が低下してしまう。 In Patent Document 1, the back surface shape of the object to be measured is not measured or estimated. and the accuracy of mass estimation decreases.
野生動物の観測や家畜の成長管理において、動物を対象とする場合は対象物体の姿勢を制御することは困難であり、撮像画像から対象動物の全長を推定する場合、異なる姿勢では推定結果も異なる。特許文献2では、対象物体を認識するために予め学習した特徴点との比較により対象物体の姿勢を推定して対象物体を認識しているが、対象物体の属性情報(寸法・形状・体積・質量など)の推定は行っていない。 In the observation of wild animals and the growth management of livestock, it is difficult to control the posture of the target object when the target is an animal. . In Patent Document 2, a target object is recognized by estimating the orientation of the target object by comparing with pre-learned feature points for recognizing the target object. (mass, etc.) are not estimated.
本発明は、上記課題に鑑みてなされ、その目的は、画像中の物体の属性情報を推定できる技術を実現することである。 SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and an object thereof is to realize a technique capable of estimating attribute information of an object in an image.
上記課題を解決し、目的を達成するために、本発明の画像処理装置は、被写体を撮像した撮像画像から前記被写体の深度方向の距離分布を示した深度情報を生成する深度生成手段と、前記撮像画像から特定の物体の領域を検出する物体検出手段と、前記特定の物体の姿勢を推定する姿勢推定手段と、前記撮像画像および前記深度情報における前記特定の物体の姿勢を当該特定の物体の属性情報の推定に適した特定の姿勢に変換する姿勢変換手段と、前記姿勢が変換された撮像画像と深度情報と画像の撮影条件とから前記特定の物体の属性情報を推定する属性情報推定手段と、を有する。 In order to solve the above problems and achieve the object, an image processing apparatus of the present invention includes: depth generation means for generating depth information indicating a distance distribution of a subject from a captured image of the subject; object detection means for detecting an area of a specific object from a captured image; posture estimation means for estimating a posture of the specific object; Attitude transforming means for transforming into a specific pose suitable for estimating attribute information; and attribute information estimating means for estimating attribute information of the specific object from the taken image whose pose has been transformed, depth information, and imaging conditions of the image. and have
本発明によれば、画像中の物体の属性情報を推定することが可能となる。 According to the present invention, it is possible to estimate attribute information of an object in an image.
以下、添付図面を参照して実施形態を詳しく説明する。尚、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. In addition, the following embodiments do not limit the invention according to the scope of claims. Although multiple features are described in the embodiments, not all of these multiple features are essential to the invention, and multiple features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same or similar configurations are denoted by the same reference numerals, and redundant description is omitted.
[実施形態1]以下、実施形態1について説明する。
以下では、画像処理装置の一例としての、被写体の距離分布を示す深度情報を取得可能なデジタルカメラに、本発明を適用した実施形態の例を説明する。しかし、本発明は、撮像画像と撮像画像に対応する深度情報と画像の撮影条件とに基づいて物体の属性情報寸法・形状・体積・質量など)を推定することが可能な任意の機器に適用可能である。
[Embodiment 1] Embodiment 1 will be described below.
An example of an embodiment in which the present invention is applied to a digital camera capable of acquiring depth information indicating the distance distribution of a subject as an example of an image processing apparatus will be described below. However, the present invention can be applied to any device capable of estimating object attribute information (size, shape, volume, mass, etc.) based on a captured image, depth information corresponding to the captured image, and image capturing conditions. It is possible.
<デジタルカメラの構成>まず、図1を参照して、本実施形態のデジタルカメラ100の構成および機能について説明する。
<Construction of Digital Camera> First, the construction and functions of a
撮像光学系10は、デジタルカメラ100が有する撮影レンズであり、被写体の光学像を撮像素子11上に形成する。撮像光学系10は、光軸102上に並んだ不図示の複数のレンズで構成され、撮像素子11から所定距離離れた位置に射出瞳101を有する。なお、本明細書において、光軸102と平行な方向をz方向または深度方向とし、光軸102と直交し、撮像素子11の水平方向と平行な方向をx方向、撮像素子11の垂直方向と平行な方向をy方向として定義する、あるいは軸を設けるものとする。
The imaging
撮像素子11は、例えばCCD(電荷結合素子)やCMOSセンサ(相補型金属酸化膜半導体)である。撮像素子11は、撮像光学系10を介して撮像面に形成された被写体像を光電変換し、該被写体像に係る画像信号を出力する。また、本実施形態では撮像素子11は、後述するように撮像面位相差測距方式の測距機能を有しており、撮像画像に加えて、撮像装置から被写体までの距離(被写体距離)を示す距離情報を生成して出力可能である。
The
制御部12は、例えばCPUやマイクロプロセッサなどの制御装置であり、デジタルカメラ100が備える各ブロックの動作を制御する。制御部12は、例えば、撮像時のオートフォーカス(AF:自動焦点合わせ)、フォーカス位置の変更、F値(絞り)の変更、画像の取り込み、記憶部14や入力部15、表示部16、通信部17の制御を行う。
The
画像処理装置13は、デジタルカメラ100が有する各種の画像処理を実現するブロックである。図示されるように画像処理装置13は、画像生成部130、深度生成部131、物体検出部132、姿勢推定部133、姿勢変換部134、属性情報推定部135の画像処理ブロックと、画像処理の作業領域として用いられるメモリ136とを有している。画像処理装置13は、論理回路を用いて構成することができる。また、別の形態として、中央演算処理装置(CPU)と演算処理プログラムを格納するメモリとから構成してもよい。
The
画像生成部130は、撮像素子11から出力された画像信号のノイズ除去、デモザイキング、輝度信号変換、収差補正、ホワイトバランス調整、色補正などの各種信号処理を行う。画像生成部130から出力される画像データ(撮像画像)はメモリ136に蓄積され、物体検出部132および表示部16に用いられる。
The
深度生成部131は、後述する撮像素子11が有する測距用画素に係り得られた信号を基づいて、深度情報の分布を表す深度画像を生成する。ここで、深度画像は、各画素に格納される値が、該画素に対応する撮像画像の領域に存在する被写体の被写体距離である2次元の情報である。
The
物体検出部132は、画像生成部130により生成された撮像画像を用いて、該撮像画像に含まれる、予め計測対象となる物体を検出し、撮像画像中の位置・大きさを特定する。予め計測対象となる物体の種類が指定されていない場合は、物体検出部132において種類を特定する。なお、本実施形態では、対象物体は人間以外の動物であるものとする。
The
姿勢推定部133は、物体検出部132によって検出された物体領域において、対象物体の姿勢を予め学習して取得し記憶部14に格納されている情報を利用して推定する。
The
姿勢変換部134は、姿勢推定部133で推定された対象物体について、鑑賞用画像および深度画像における対象物体の姿勢を属性情報の推定に適した特定の姿勢に変換する。特定の姿勢は対象物体により異なり、予め指定された物体の種類、または物体検出部132で特定した物体情報に基づき、予め記憶部14および/またはメモリ136に格納されている姿勢情報から決定する。
The
属性情報推定部135は、姿勢変換部134で対象物体の姿勢が特定の姿勢に変換された鑑賞用画像と深度画像とから対象物体の属性情報として寸法・形状・体積・質量の少なくとも1つを推定する。寸法推定では、対象物体により寸法を計測する位置が異なる。よって、予め指定された物体の種類または物体検出部132で特定した物体の種類に基づき予め記憶部14および/またはメモリ136に格納されている寸法計測のための情報を利用して推定を行う。形状推定では、姿勢変換した深度画像により表面形状を取得し、物体検出部132で特定した物体の種類に応じて、予め記憶部14および/またはメモリ136に格納されている対象物体の3次元形状データを参照して推定を行う。体積推定では、形状推定により求められた対象物体の3次元形状と撮影パラメータから推定を行う。質量推定では、体積推定により求められた体積と対象物体に応じた密度情報を利用して推定を行う。密度情報は予め物体ごとに計測しておき、記憶部14に格納されている。
The attribute
記憶部14は、撮像された画像データ、各ブロックの動作の過程で生成された中間データ、画像処理装置13やデジタルカメラ100の動作において参照されるパラメータなどが記録される不揮発性の記録媒体である。記憶部14は、処理の実現にあたり許容される処理性能が担保されるものであれば、高速に読み書きでき、かつ、大容量の記録媒体であればどのようなものであってもよく、例えば、フラッシュメモリなどが望ましい。
The
入力部15は、例えば、ダイヤル、ボタン、スイッチ、タッチパネルなどの、デジタルカメラ100に対してなされた情報入力や設定変更の操作入力を検出するユーザインターフェイスである。入力部15は、なされた操作入力を検出すると、対応する制御信号を制御部12に出力する。
The
表示部16は、例えば、液晶ディスプレイや有機ELなどの表示装置である。表示部16は、撮像画像をスルー表示することによる撮影時の構図確認や、各種設定画面やメッセージ情報の報知に用いられる。本実施形態では表示部16は、物体の検出結果、形状・体積・質量など推定結果などの表示も行う。
The
通信部17は、デジタルカメラ100が備える、外部との情報送受信を実現する通信インタフェースである。通信部17は、得られた撮像画像や深度情報、被写体の属性情報(寸法・形状・体積・質量)の推定結果などを他の装置に送出可能に構成されていてよい。
The
<撮像素子の構成>次に、図1(b)、(c)を参照して、本実施形態の撮像素子11の詳細構成について説明する。
<Structure of Imaging Device> Next, the detailed structure of the
撮像素子11は、図1(b)に示されるように、異なるカラーフィルタが適用された2行×2列の画素群110が複数連結して配列されることで構成されている。拡大図示されるように、画素群110は、赤(R)、緑(G)、青(B)のカラーフィルタが配置されており、各画素(光電変換素子)からは、R、G、Bのいずれかの色情報を示した画像信号が出力される。なお、本実施形態では一例として、カラーフィルタが、図示されるような分布担っているものとして説明するが、本発明の実施がこれに限られるものではないことは容易に理解されよう。
As shown in FIG. 1B, the
本実施形態の撮像素子11は、撮像面位相差測距方式の測距機能を実現すべく、1つの画素(光電変換素子)は、撮像素子11の水平方向に係る、図1(b)のI-I’断面において、複数の光電変換部が並んで構成される。より詳しくは、図1(c)に示されるように、各画素は、マイクロレンズ111およびカラーフィルタ112を含む導光層113と、第1の光電変換部115および第2の光電変換部116を含むと、で構成されている。
In the
導光層113において、マイクロレンズ111は、画素へ入射した光束を第1の光電変換部115および第2の光電変換部116に効率よく導くよう構成されている。またカラーフィルタ112は、所定の波長帯域の光を通過させるものであり、上述したR、G、Bのいずれかの波長帯の光のみを通過させ、後段の第1の光電変換部115および第2の光電変換部116に導く。
In the
受光層114には、受光した光をアナログ画像信号に変換する2つの光電変換部(第1の光電変換部115と第2の光電変換部116)が設けられており、これら2つの光電変換部から出力された2種類の信号が測距に用いられる。即ち、撮像素子11の各画素は、同様に水平方向に並んだ2つの光電変換部を有しており、全画素のうちの第1の光電変換部115から出力された信号で構成された画像信号と、第2の光電変換部116から出力された信号で構成される画像信号が用いられる。換言すれば、第1の光電変換部115と第2の光電変換部116とは、画素に対してマイクロレンズ111を介して入光する光束を、それぞれ部分的に受光する。故に、最終的に得られる2種類の画像信号は、撮像光学系10の射出瞳の異なる領域を通過した光束に係る瞳分割画像群となる。ここで、各画素で第1の光電変換部115と第2の光電変換部116とが光電変換した画像信号を合成したものは、画素に1つの光電変換部のみが設けられている態様において該1つの光電変換部から出力される画像信号(鑑賞用)と等価である。
The light-receiving
このような構造を有することで、本実施形態の撮像素子11は、鑑賞用画像信号と測距用画像信号(2種類の瞳分割画像)とを出力することが可能となっている。なお、本実施形態では、撮像素子11の全ての画素が2つの光電変換部を備え、高密度な深度情報を出力可能に構成されているものであるとして説明するが、本発明の実施はこれに限られるものではない。
With such a structure, the
<撮像面位相差測距方式の測距原理>
ここで、本実施形態のデジタルカメラ100で行われる、第1の光電変換部115および第2の光電変換部116から出力された瞳分割画像群に基づいて、被写体距離を導出する原理について、図2を参照して説明する。
<Ranging principle of imaging surface phase difference ranging method>
Here, the principle of deriving the subject distance based on the group of pupil-divided images output from the first
図2(a)は、撮像光学系10の射出瞳101と、撮像素子11中の画素の第1の光電変換部115に受光する光束を示した概略図である。図2(b)は同様に第2の光電変換部116に受光する光束を示した概略図である。
FIG. 2A is a schematic diagram showing the
図2(a)および(b)に示したマイクロレンズ111は、射出瞳101と受光層114とが光学的に共役関係になるように配置されている。撮像光学系10の射出瞳101を通過した光束は、マイクロレンズ111により集光されて第1の光電変換部115または第2の光電変換部116に導かれる。この際、第1の光電変換部115と第2の光電変換部116にはそれぞれ図2(a)および(b)に示される通り、異なる瞳領域を通過した光束を主に受光する。第1の光電変換部115には第1の瞳領域210を通過した光束、第2の光電変換部116には第2の瞳領域220を通過した光束となる。
The microlenses 111 shown in FIGS. 2A and 2B are arranged such that the
撮像素子11が備える複数の第1の光電変換部115は、第1の瞳領域210を通過した光束を主に受光し、第1の画像信号を出力する。また、同時に撮像素子11が備える複数の第2の光電変換部116は、第2の瞳領域220を通過した光束を主に受光し、第2の画像信号を出力する。第1の画像信号から第1の瞳領域210を通過した光束が撮像素子11上に形成する像の強度分布を得ることができる。また、第2の画像信号から第2の瞳領域220を通過した光束が、撮像素子11上に形成する像の強度分布を得ることができる。
A plurality of first
第1の画像信号と第2の画像信号間の相対的な位置ズレ量(所謂、視差量)は、デフォーカス量に応じた値となる。視差量とデフォーカス量との関係について、図2(c)、(d)、(e)を用いて説明する。図2(c)、(d)、(e)は本実施形態の撮像素子11、撮像光学系10について説明した概略図である。図中の符号211は、第1の瞳領域210を通過する第1の光束を示し、符号221は第2の瞳領域220を通過する第2の光束を示す。
A relative positional deviation amount (so-called parallax amount) between the first image signal and the second image signal has a value corresponding to the defocus amount. The relationship between the amount of parallax and the amount of defocus will be described with reference to FIGS. 2(c), (d), and (e) are schematic diagrams explaining the
図2(c)は合焦時の状態を示しており、第1の光束211と第2の光束221が撮像素子11上で収束している。このとき、第1の光束211により形成される第1の画像信号と第2の光束221により形成される第2の画像信号間との視差量は0となる。図2(d)は像側でz軸の負方向にデフォーカスした状態を示している。この時、第1の光束により形成される第1の画像信号と第2の信号により形成される第2の画像信号との視差量は0とはならず、負の値を有する。図2(e)は、像側でz軸の正方向にデフォーカスした状態を示している。この時、第1の光束により形成される第1の画像信号と第2の光束により形成される第2の画像信号との視差量は正の値を有する。図2(d)と図2(e)の比較から、デフォーカス量の正負に応じて、位置ズレの方向が入れ替わることが分かる。また、デフォーカス量に応じて、撮像光学系の結像関係(幾何関係)に従って位置ズレが生じることが分かる。第1の画像信号と第2の画像信号との位置ズレである視差量は、後述する領域ベースのマッチング手法により検出することができる。
FIG. 2C shows a state at the time of focusing, in which the first
<属性情報推定処理>次に、図3(a)のフローチャートを用いて、本実施形態のデジタルカメラ100において実行される撮像画像から対象物体の属性情報を推定する処理について説明する。なお、図3(a)のフローチャートに対応する処理は、制御部12が、例えば記憶部14に記憶されている対応する処理プログラムを読み出し、不図示の揮発性メモリに展開して実行し、デジタルカメラ100の各部を制御することにより実現することができる。後述する図8および図9でも同様である。
<Attribute Information Estimation Processing> Next, the processing for estimating the attribute information of the target object from the captured image executed by the
S301で、制御部12は、計測対象となる物体の選択を行う。撮影時に表示部16に計測を行う物体の一覧を表示し、入力部15によってユーザが所望の物体を選択できるようにする。これにより物体の種類の推定を省略することができ、誤認識を防止することができる。ここでは、入力部15と表示部16を別体に構成しているが、タッチパネルなどにより表示部16が入力部15の機能を持つように構成してもよい。図4は計測対象の物体一覧の表示例を示している。図4では、動物の分類と、分類ごとの詳細な動物の種類が選択可能に表示され、ユーザは表示された選択肢のいずれかを選択すればよい。撮影対象が予め用意された物体の種類に当てはまらない場合は、例えば、図4に示すように「その他」の選択肢を表示し、一般的なパラメータを用いて属性情報推定を行えばよい。
In S301, the
S302で、制御部12は、設定された焦点位置、絞り、露光時間などの撮像設定にて撮像を行うよう処理する。より詳しくは、制御部12は、撮像素子11に撮像を行わせ、得られた撮像画像を画像処理装置13に伝送させ、メモリ136に記憶するよう制御する。ここで、撮像画像は、撮像素子11が有する第1の光電変換部115のみから出力された信号で構成された画像信号S1と、第2の光電変換部116のみから出力された信号で構成された画像信号S2の2種類であるものとする。
In S302, the
S303で、画像処理装置13は、得られた撮像画像から鑑賞用画像と深度画像とを生成する。より詳しくは、画像処理装置13のうちの画像生成部130は、まず画像信号S1と画像信号S2の各画素の画素値を加算することで、1つのベイヤー配列画像を生成する。画像生成部130は、該ベイヤー配列画像について、R、G、B各色の画像のデモザイキング処理を行い、鑑賞用画像を生成する。なお、デモザイキング処理は、撮像素子上に配置されたカラーフィルタに応じて行われるものであり、デモザイキング方法についていずれの方式が用いられるものであってもよいことは言うまでもない。このほか、画像生成部130は、ノイズ除去、輝度信号変換、収差補正、ホワイトバランス調整、色補正などの処理を行い、最終的な鑑賞用画像を生成してメモリ136に格納する。
In S303, the
<深度画像生成処理>
一方、深度画像については、深度生成部131が生成に係る処理を行う。ここで、深度画像生成に係る処理について、図3(b)のフローチャートを用いて説明する。
<Depth image generation processing>
On the other hand, the depth image is generated by the
S311で、深度生成部131は、画像信号S1および画像信号S2について、光量補正処理を行う。撮像光学系10の周辺画角ではヴィネッティングにより、第1の瞳領域210と第2の瞳領域220の形状が異なることに起因し、画像信号S1と画像信号S2の間では、光量バランスが崩れている。従って、本ステップにおいて、深度生成部131は、例えば、予め記憶部14および/またはメモリ136に格納されている光量補正値を用いて、画像信号S1と画像信号S2の光量補正を行う。
In S311, the
S312で、深度生成部131は、撮像素子11における変換時に生じたノイズを低減する処理を行う。具体的には深度生成部131は、画像信号S1と画像信号S2に対して、フィルタ処理を適用することで、ノイズ低減を実現する。一般に、空間周波数が高い高周波領域ほどSN比が低くなり、相対的にノイズ成分が多くなる。従って、深度生成部131は、空間周波数が高いほど、通過率が低減するローパスフィルタを適用する処理を行う。なお、S311における光量補正は、撮像光学系10の製造誤差などによっては望ましい結果とはならないため、深度生成部131は、直流成分を遮断し、かつ、高周波成分の通過率が低いバンドパスフィルタを適用することが望ましい。
In S<b>312 , the
S313で、深度生成部131は、画像信号S1と画像信号S2に基づいて、これらの画像間の視差量を導出する。具体的には、深度生成部131は、画像信号S1内に、代表画素情報に対応した注目点と、該注目点を中心とする照合領域とを設定する。照合領域は、例えば、注目点を中心とした一辺が所定長さを有する正方領域などの矩形領域であってよい。次に深度生成部131は、画像信号S2内に参照点を設定し、該参照点を中心とする参照領域を設定する。参照領域は、上述した照合領域と同一の大きさおよび形状を有する。深度生成部131は、参照点を順次移動させながら、画像信号S1の照合領域内に含まれる画像と、画像信号S2の参照領域内に含まれる画像との相関度を導出し、最も相関度が高い参照点を、画像信号S2における、注目点に対応する対応点として特定する。このようにして特定された対応点と注目点との相対的な位置ズレ量が、注目点における視差量となる。
In S313, the
深度生成部131は、このように注目点を代表画素情報に従って順次変更しながら視差量を算出することで、該代表画素情報によって定められた複数の画素位置における視差量を導出する。本実施形態では簡単のため、鑑賞用画像と同一の解像度で深度情報を得るべく、視差量を計算する画素位置(代表画素情報に含まれる画素群)は、鑑賞用画像と同数になるよう設定されているものとする。なお、相関度の導出方法として、NCC(Normalized Cross-Correlation)やSSD(Sum of Squared Difference)、SAD(Sum of Absolute Difference)などの方法を用いてよい。
The
また、導出された視差量は、所定の変換係数を用いることで、撮像素子11から撮像光学系10の焦点までの距離であるデフォーカス量に変換することができる。ここで、所定の変換係数K、デフォーカス量をΔLとすると、視差量dは、以下の式1によって、デフォーカス量に変換できる。
Also, the derived amount of parallax can be converted into a defocus amount, which is the distance from the
(式1)
ΔL=K×d
さらに、デフォーカス量ΔLを幾何光学におけるレンズの公式である以下の式2を用いることで、被写体距離に変換することができる。
(式2)
1/A+1/B=1/F
ここで、Aは物面から撮像光学系10の主点までの距離(被写体距離)、Bは撮像光学系10の主点から像面までの距離、Fは撮像光学系10の焦点距離を指すものとする。即ち、該レンズの公式において、Bの値がデフォーカス量ΔLから導出することができるため、撮像時の焦点距離の設定に基づき、被写体から物面までの距離Aを導出することができる。
(Formula 1)
ΔL=K×d
Furthermore, the defocus amount ΔL can be converted into the object distance by using the following equation 2, which is a lens formula in geometrical optics.
(Formula 2)
1/A+1/B=1/F
Here, A is the distance (subject distance) from the object plane to the principal point of the imaging
深度生成部131は、このように導出した被写体距離を画素値とする2次元情報を構成し、深度画像としてメモリ136に格納する。
The
一方、S304で、物体検出部132は、対象物体領域の検出を行う。物体検出部132は、S301で選択された対象物体の種類に基づき、事前に学習して取得し記憶部14に格納された情報を利用して対象物体領域を特定し、特定した領域の輪郭に沿って対象物体を抽出する。この場合、深度画像を利用して対象物体領域の抽出を補助することも可能である。抽出した対象物体領域以外は特定または一定の値とし、対象物体領域のみが残された物体抽出画像を生成する。深度画像においても同様に対象物体領域以外は特定または一定の値に置き換え、対象物体領域のみが有効な値を持つ物体抽出深度画像を生成する。物体抽出画像および物体抽出深度画像はメモリ136に記憶され、以降の処理に利用される。対象物体領域を抽出するための学習方法には、例えばDeep Learningなど、様々な機械学習を利用することができるが、特定の方法に限定されず、どのような方法を用いてもよい。
On the other hand, in S304, the
S305で、姿勢推定部133は、物体抽出画像における対象物体の姿勢推定を行う。姿勢推定部133は、S304における対象物体領域の検出結果から、物体抽出画像中の領域内における特徴点の抽出を行い、事前に学習して取得し記憶部14に格納されている3次元形状の特徴点データを利用して姿勢の推定を行う。さらに物体抽出深度画像を利用することでより詳細な姿勢変化を推定することが可能となる。姿勢推定では、主に物体抽出画像を利用して対象物体としての動物の頭部や胴体、脚、尾といった部位がどこに位置しているか、頭部がどちらを向いているかといった情報を推定する。また、対象物体全体の撮影方向から見た向きは胴体の向きによって判定可能である。胴体の向きの判定には物体抽出深度画像を利用する。物体抽出深度画像から各画素における法線方向を算出し、上記胴体位置の情報を利用して胴体部分の法線方向を取得する。動物の胴体は曲面であるため法線方向は一定ではない。よって主成分分析などを行い、主たる法線方向を算出する。この主たる法線方向と垂直な面を対象物体の向きを表す平面として推定する。例えば、図5に示すように対象動物の胴体の中心を通り頭部から尾までを垂直に切断する平面Pvおよび水平に切断する平面Phを推定し、後述の姿勢変換に利用する。
In S305, the
本実施形態では、対象物体領域検出と姿勢推定を別の処理としたが、機械学習を利用することで対象物体領域検出と物体の姿勢推定を同時に行ってもよい。 In the present embodiment, target object region detection and orientation estimation are performed separately, but target object region detection and object orientation estimation may be performed simultaneously using machine learning.
S306で、姿勢変換部134は、S305で推定された対象物体の姿勢を利用して、対象物体の物体抽出画像での姿勢変換および物体抽出深度画像での姿勢変換を行う。例えば、物体抽出画像から物体の属性情報として動物の寸法を推定する場合、動物に種類によって計測しやすい特定の姿勢がある。例えば、哺乳類の場合は図6に示すように撮影した画像(図6(a))を変換し側面から撮影された画像(図6(b))にすることでその全長La・頭胴長Lb・体高Lcといった寸法の計測が容易となる。
In S306, the
鳥類・魚類なども側面からの撮像画像となるように変換するのがよい。鳥類の場合は図6(c)に示すように全長Laや翼長Ldなどの寸法を計測する。ただし、図6(d)のように翼を広げた鳥類の場合は、上方から俯瞰した画像となるように変換するのが望ましく、翼開長Leを計測する。また、爬虫類・両生類・昆虫などの節足動物も情報からの俯瞰した画像となるのが望ましい。ただし、どのような動物においても撮影された画像における対象物体の姿勢に応じて、側面からの画像または上方からの画像に適宜変換するのが望ましい。 Birds and fishes should also be converted so that they are captured from the side. In the case of birds, dimensions such as total length La and wing length Ld are measured as shown in FIG. 6(c). However, in the case of birds with spread wings as shown in FIG. 6(d), it is desirable to convert the image into an image viewed from above, and the wing span Le is measured. In addition, it is desirable that arthropods such as reptiles, amphibians, and insects should also be a bird's-eye view image based on the information. However, for any animal, it is desirable to appropriately convert the image to an image from the side or an image from above, depending on the posture of the target object in the photographed image.
ここでの姿勢変換は基本的には幾何変換による画像の変換を行う。哺乳類の場合を例にすると、上記姿勢推定において推定された動物の姿勢を示す垂直切断平面Pvを利用し、この平面の法線が撮影装置1に対して垂直となるように回転角を算出する。得られた回転角から回転行列Rを生成し、以下の式3のように物体抽出画像および物体抽出深度画像を回転変換させることで図6(a)であった対象動物の姿勢を図6(b)のような姿勢に変換する。
(式3)
Pは変換前の画像上の位置(x、y、z)を意味し、P’は変換後の画像上の位置である。変換により欠落した画素位置の情報は周辺の画素の情報から補間することで欠落のない変換画像を生成する。
Attitude transformation here basically transforms an image by geometric transformation. Taking the case of mammals as an example, the vertical cutting plane Pv representing the animal's posture estimated in the posture estimation is used, and the rotation angle is calculated so that the normal to this plane is perpendicular to the photographing device 1. . A rotation matrix R is generated from the obtained rotation angles, and the object extraction image and the object extraction depth image are rotationally transformed as shown in Equation 3 below, so that the posture of the target animal shown in FIG. b) to transform the pose.
(Formula 3)
P means the position (x, y, z) on the image before transformation, and P' is the position on the image after transformation. Information on pixel positions that are missing due to conversion is interpolated from information on surrounding pixels to generate a conversion image without missing points.
このように、姿勢変換された物体抽出画像および物体抽出深度画像がメモリ136に記憶され、以降の処理に利用される。本実施形態では、回転行列を利用した姿勢変換を例に説明したが、回転以外に平行移動、拡大縮小などを加えた変換を利用することもできる。姿勢変換を行うことで後述する属性情報推定のために予め計測保持しておくデータを減らすことができる利点もある。
In this way, the object extraction image and the object extraction depth image whose orientation has been changed are stored in the
S307で、属性情報推定部135は、対象物体の属性情報の推定を行う。属性情報とは、対象物体の寸法・形状・体積・質量を表し、属性情報推定ではこれらのうち少なくとも1つを推定する。
In S307, the attribute
まず属性情報の1つである寸法推定について説明する。寸法推定では、姿勢変換された物体抽出画像を表示部16に表示し、ユーザが入力部15により表示された画像中の動物において所望の計測位置を指定する。指定方法としては2箇所を指定する方法(図7(a))、3箇所以上を指定してそれぞれの間を線形的に接続したり(図7(b))、多項式を用いて接続したりする方法、ユーザが計測したい部分をなぞる方法(図7(c))を用いる。図7(a)では、2点P1およびP2を指定し、2点間の水平の長さを計測する場合を示す。他にも垂直方向の長さを計測する場合や2点間のユークリッド距離を計測する場合を指定できるようにするのが望ましい。図7(b)では4点P1~P4を指定し各点の間を直線で繋いだ例を示している。他にもスプライン曲線などを用いて各点間を補間してその長さを計測してもよい。図7(c)は図中のP1からP2までユーザがなぞった曲線の長さを計測する例である。このように様々な計測位置の指定方法と指定区間の計測方法があるが、2箇所の指定では直線のみの計測となり簡便な計測が可能な一方で、3箇所以上の指定もしくはなぞることによって曲線の長さも計測可能となり計測の自由度が向上する。特に、曲線による計測は、姿勢変換において所望の姿勢に変換できなかった場合の計測に効果がある。例えば、図6(e)に示すようにヘビの全長Laの計測など直線に伸びている状態が困難な動物の計測に効果がある。
First, dimension estimation, which is one of the attribute information, will be described. In dimension estimation, an object extraction image whose posture has been changed is displayed on the
計測点指定後の長さの計測は、指定された計測位置間の画素数をカウントすることで画像中の画素単位またはサブ画素単位で計測される。この場合の計測値は像空間における長さである。計測された画素単位の長さを実際の物体空間での長さに変換するために、まず撮像素子11の1画素サイズの大きさから像空間での国際単位系の長さに変換する。次に撮影パラメータを利用して撮影倍率Mを求め、計測された像空間での長さと撮影倍率Mの積をとることで物体空間での実際の長さを算出する。
After the measurement points are specified, the length is measured in units of pixels or sub-pixels in the image by counting the number of pixels between the specified measurement positions. The measurement in this case is the length in image space. In order to convert the measured length in pixel units into the actual length in the object space, first, the size of one pixel of the
撮影倍率Mは撮影時のパラメータである撮像光学系10の焦点距離F、対象物体距離Zを利用して以下の式4により算出できる。
(式4)
M=Z/F
対象物体距離Zは、撮像光学系10に含まれるフォーカレンズの位置と対応するフォーカス距離を予め計測しておき、撮影時のフォーカスレンズ位置を検出して対応するフォーカス距離を対象物体距離Zとして取得する。
The photographing magnification M can be calculated by the following equation 4 using the focal length F of the imaging
(Formula 4)
M=Z/F
For the target object distance Z, the focus distance corresponding to the position of the focus lens included in the imaging
続いて属性情報の1つである形状推定について説明する。形状推定は対象物体の3次元形状を推定する。S301で選択された物体の種類の情報、S306で生成された姿勢変換された物体抽出画像および物体抽出深度画像を利用して行う。姿勢変換された物体抽出深度画像は、デジタルカメラ100から対象物体までの距離に依存した値になっているため、対象物体までの距離を差し引くことでデジタルカメラ100から見た対象物体面の深度画像(=形状)が算出される。以降の説明では、計測された対象物体のある特定の一面を表面とするものとする。一度の撮影では対象物体の特定の一面形状のみが計測可能で、撮影方向から見えない反対の面は計測することができない。対象物体の反対面を推定するにあたり、予め計測対象となる複数の物体の3次元形状を計測し、参照3次元形状を記憶部14および/またはメモリ136に格納しておく。格納しておく参照3次元形状は、物体ごとに平均的な1つの3次元形状でもよいが、反対面の推定精度を向上させるために複数の3次元形状を保持しておくことが望ましい。参照3次元形状は、ボクセル単位のデータまたは、国際単位系で表現されたデータのいずれであってもよいが、参照3次元形状データの単位によって以下の変換処理が変更される。ここでボクセルは、1画素をxyz方向に拡張した3次元の画素サイズを意味する。また、国際単位系のデータは物体側での対象物体のサイズを国際単位系で計測したものを意味する。上記算出された対象物体の表面の形状情報において、深度情報(Z方向)は国際単位系であるが、対象物体のXY方向の大きさは画素単位となっている。参照3次元形状のデータ単位に応じて深度情報をボクセル単位に変更、または対象物体のXY方向の大きさを国際単位系に変更する。ボクセル単位および国際単位系の変換は、前述のように撮影パラメータを利用して撮影倍率Mを求め、式4を利用して変換する。
Next, shape estimation, which is one piece of attribute information, will be described. Shape estimation estimates the three-dimensional shape of the target object. This is performed using information on the type of object selected in S301, and the object extraction image and the object extraction depth image generated in S306 and subjected to attitude transformation. Since the object extraction depth image after attitude conversion has a value that depends on the distance from the
次に参照3次元形状と検出した対象物体の大きさが同じになるように、参照3次元形状を変換する。その後、対象物体の表面形状と大きさ変換した参照3次元形状との位置のマッチング処理が行われる。マッチング処理によって計測された表面形状が、参照3次元形状においてどの面に対応するかを決定する。同時に、計測されていない対象物体の反対面が参照3次元形状において特定される。この特定された参照3次元形状における反対面を、計測された対象物体の表面形状と合成することで対象物体の3次元形状が推定される。複数の異なる参照3次元形状を格納した場合は、最も計測形状と合致する参照3次元形状から反対面を推定する。 Next, the reference three-dimensional shape is transformed so that the size of the reference three-dimensional shape and the detected target object are the same. After that, position matching processing is performed between the surface shape of the target object and the size-converted reference three-dimensional shape. It is determined which surface in the reference three-dimensional shape the surface shape measured by the matching process corresponds to. At the same time, the opposite face of the target object that has not been measured is identified in the reference 3D shape. The three-dimensional shape of the target object is estimated by synthesizing the opposite surface of the specified reference three-dimensional shape with the measured surface shape of the target object. When a plurality of different reference three-dimensional shapes are stored, the opposite surface is estimated from the reference three-dimensional shape that best matches the measured shape.
3次元形状の推定精度をさらに向上させるために、計測した表面形状と参照3次元形状の合致面との形状の差を算出し、算出した差を参照3次元形状の反対面に加減算することで形状を補正し推定反対面とする。または、形状の厚みに対する上記差の量を算出し、反対面の形状の厚みに応じて補正量を変更してもよい。 In order to further improve the accuracy of 3D shape estimation, the difference between the measured surface shape and the matching surface of the reference 3D shape is calculated, and the calculated difference is added to or subtracted from the opposite surface of the reference 3D shape. Correct the shape and assume the opposite side. Alternatively, the amount of the difference with respect to the thickness of the shape may be calculated, and the correction amount may be changed according to the thickness of the shape of the opposite surface.
対象物体の大きさに対して、物体空間における1画素サイズが大きい場合、推定された3次元形状は段差のある不正確な形状となる。よって撮像素子11の画素数が多いことが望ましく、撮影時に物体が画面に対してできるだけ大きく占めるように撮影するのが望ましい。画素単位の段差を低減するために、補間処理を適用することでより滑らかな形状に変更し、さらにはポリゴンデータとしてもよい。
If the size of one pixel in the object space is larger than the size of the target object, the estimated three-dimensional shape becomes an inaccurate shape with steps. Therefore, it is desirable that the number of pixels of the
次に、属性情報の1つである体積推定について説明する。体積推定では、上記形状推定で推定された3次元形状を用いて体積を算出する。推定された体積がボクセル単位データの場合、推定された3次元形状中のボクセル数をカウントし、ボクセルの一辺の長さを、式4を利用することで物体空間での体積を推定する。推定された体積が既に物体空間における国際単位系で表現されたデータの場合は、推定された3次元形状内を積分することで体積を推定する。なお、推定される体積は、画像処理にてベースとなる単位体積要素(正規格子単位)であるボクセル基準で導出されてもよいし、現実世界における実寸大の寸法基準で導出されるものであってもよい。 Next, volume estimation, which is one of attribute information, will be described. In volume estimation, the volume is calculated using the three-dimensional shape estimated in the shape estimation. When the estimated volume is voxel unit data, the number of voxels in the estimated three-dimensional shape is counted, and the length of one side of the voxel is estimated using Equation 4 to estimate the volume in the object space. If the estimated volume is data already expressed in the International System of Units in the object space, the volume is estimated by integrating within the estimated three-dimensional shape. Note that the estimated volume may be derived based on the voxel standard, which is a unit volume element (regular grid unit) that is the base in image processing, or may be derived based on the actual size standard in the real world. may
次に、属性情報の1つである質量推定について説明する。質量推定では、上記体積推定で導出された対象物体の体積と、記憶部14および/またはメモリ136に格納されている対象物体の密度情報とを乗算することで対象物体の質量を推定する。密度情報は対象物体に対して一様としてもよいが、より高精度に質量を推定するために部位ごとに異なる情報を保持して利用することもできる。対象物体の骨格分析などを用いて部位ごと、例えば、頭部、胴体、腕、脚などに分割し、それぞれ異なる密度情報を用いて質量推定を行う。なお、本実施形態では、対象物体の密度情報を用いて質量を算出したが、これに限らず、対象物体の比重量の情報を予め記憶部14および/またはメモリ136に格納しておき、推定された対象物体の3次元形状の体積を乗算することで重量を推定してもよい。
Next, mass estimation, which is one of attribute information, will be described. In the mass estimation, the mass of the target object is estimated by multiplying the volume of the target object derived by the volume estimation and the density information of the target object stored in the
S308で、制御部12は、S307で推定された属性情報を表示部16に表示すると共に、記憶部14に記憶する。S307で推定された属性情報は、S303で生成された鑑賞用画像のメタデータとして深度画像と関連付けて記録することが望ましい。
In S<b>308 , the
以上説明したように、本実施形態によれば、撮像画像から生成される深度画像と、画像が撮影された条件とから画像中の物体の属性情報を推定することが可能となる。詳しくは、深度画像と、物体の領域検出、姿勢推定、姿勢変換のための事前に学習し取得した情報、予め計測した形状、撮影パラメータおよび質量比を用いることで、対象物体の属性情報を推定できる。 As described above, according to this embodiment, it is possible to estimate the attribute information of an object in an image from the depth image generated from the captured image and the conditions under which the image was captured. Specifically, the attribute information of the target object is estimated by using the depth image, the information learned and acquired in advance for object region detection, pose estimation, and pose transformation, the shape measured in advance, the shooting parameters, and the mass ratio. can.
[実施形態2]次に、実施形態2について説明する。 [Embodiment 2] Next, Embodiment 2 will be described.
実施形態1では、ユーザが計測対象物体の選択を行っていた。これに対し、実施形態2は、ユーザにおる計測対象物体の選択入力がないところが実施形態1と相違する。なお、実施形態2において、デジタルカメラ100の構成や機能は、実施形態1の図1や図3と同様であり、実施形態1の属性情報推定処理と相違する点を中心に説明する。
In the first embodiment, the user selects the object to be measured. In contrast, the second embodiment differs from the first embodiment in that the user does not input the selection of the object to be measured. In the second embodiment, the configuration and functions of the
図8は、実施形態2の属性情報推定処理を示し、実施形態1の図3の処理と同一の処理には同一のステップ番号を付して示している。 FIG. 8 shows the attribute information estimation process of the second embodiment, and the same step numbers are given to the same processes as the processes of FIG. 3 of the first embodiment.
S801で、図3のS302と同様に、制御部12は、設定された焦点位置、絞り、露光時間などの撮像設定にて撮像を行うよう処理する。
In S801, as in S302 of FIG. 3, the
S802で、図3のS303と同様に、画像生成部130は、鑑賞用画像と深度画像を生成する。
In S802, the
S803で、物体検出部132は、被写体の認識を行う。被写体認識・領域検出は、予め機械学習によって取得した物体の分類・種類の情報に基づき、画像中の物体の識別および位置・輪郭の抽出を行い、物体抽出画像を生成する。抽出した位置・輪郭情報を深度画像にも適用し、深度生成部131により物体抽出深度画像を生成する。機械学習は特定の方法に限定されず、どのような方法を用いてもよい。
In S803, the
S804で、姿勢推定部133および姿勢変換部134は、S803で識別および抽出した物体の姿勢推定および姿勢変換を行う。ここで、画像処理装置13の姿勢推定部133および姿勢変換部134が行うS804の処理の詳細を図9のフローチャートを用いて説明する。
In S804,
姿勢推定部133は、S8041において、S803で生成された物体抽出深度画像から、デジタルカメラ100から対象物体の基準位置までの距離を差し引くことで対象物体の撮影方向から見た表面の形状を取得する。基準位置は、デジタルカメラ100から対象物体までの最も近い位置で設定してもよいし、最も遠い位置で設定してもよく、特に限定するものではない。
In S8041, the
S8042で、姿勢推定部133は、S8041で得られた対象物体の表面形状と、予め記憶部14に格納されている対象物体の3次元形状とを比較し、同じ大きさになるようにいずれか一方の大きさを変更する。その後の属性情報推定を考慮した場合、予め記憶部14および/またはメモリ136に格納されている3次元形状の大きさを対象物体の表面形状の大きさに合わせるのが望ましく、変換係数を予め記憶部14および/またはメモリ136に記憶しておくことが望ましい。
In S8042, the
S8043で、姿勢推定部133は、S8041で取得した対象物体の表面形状と、予め記憶部14および/またはメモリ136に格納されている3次元形状とのマッチング処理を行い、対象物体を撮影している方向を特定する。この方法は、撮影した物体の姿勢が予め記憶部14および/またはメモリ136に格納されている属性情報が取得しやすい姿勢と類似した姿勢であって、撮影方向が異なる場合に有効である。一方、対象物体の姿勢が予め記憶部14および/またはメモリ136に格納されている姿勢と大きく異なる場合は、マッチング処理における評価値(マッチングスコア)が低下する。よって、S8044においてマッチングスコアを閾値と比較する。S8044においてマッチングスコアが閾値より高い場合は、S8045で対象物体の向きを表す撮影面が特定される。マッチングスコアが閾値より低い場合は、S8046で対象物体の関節部位および骨格の特定を行う。この特定も予め学習して取得した情報を利用して行う。
In S8043, the
S8047で、姿勢変換部134は、予め用意された3次元形状における骨格位置との違いを算出し、関節位置を支点に関節位置より先端方向部分の部位を回転させて、基準となる姿勢に類似するように表面形状を変換する。例えば、座った状態の牛を撮影した場合、大腿部、飛節、前膝などの脚部の関節位置や長さ、回転角を推定し、関節を回転の支点として回転させて立ち上がった状態の推定画像を生成する。変換された表面形状を再びS8043のマッチング処理に入力し、再度対象物体の向きを表す撮影面の特定を行う。
In S8047, the
S8048で、姿勢変換部134は、S8045で特定された撮影面情報に基づき、図3のS306と同様に、対象物体を側面から撮影したように、物体抽出画像および表面形状に対して幾何変換を利用して姿勢変換する。変換された物体抽出画像および表面形状はメモリ136に記憶され、以降の処理に利用される。
In S8048, based on the imaging plane information specified in S8045, the
図8の説明に戻り、S805で、図3のS307と同様に、属性情報推定部135により対象物体の属性情報の推定を行う。S805で推定された属性情報は、表示部16に表示されるとともに記憶部14に記憶される。推定された属性情報は、S802で生成された鑑賞用画像のメタデータとして深度画像と共に記憶することが望ましい。
Returning to the description of FIG. 8, in S805, the attribute
ここで、S805の属性情報推定がS307と相違するところを説明する。 Here, the difference between attribute information estimation in S805 and S307 will be described.
属性情報の1つである寸法推定について、実施形態1では、ユーザが計測位置を指定し、指定された位置で寸法を計測していた。これに対して、実施形態2では、画像処理装置13が、S803で得られた物体の識別結果により物体の種類を特定し、必要な寸法情報(全長・頭胴長・体高など)から寸法の計測位置を決定する。そして、S8046と同様に事前に学習して取得した情報を利用して骨格認識を行い、S803の被写体認識で得られた輪郭情報を利用して計測位置を特定する。
Regarding dimension estimation, which is one of the attribute information, in the first embodiment, the user designates the measurement position and measures the dimension at the designated position. On the other hand, in the second embodiment, the
属性情報の1つである形状推定については、S804の姿勢推定・変換で生成した表面形状と、予め記憶部14および/またはメモリ136に格納されている3次元形状の大きさを合わせるための変換係数を利用する。変換係数を利用して記憶部14に記憶されている3次元形状の大きさを変換し、計測対象物体の表面形状以外の背面部分を、大きさが変換された3次元形状から取得する。計測対象物体の表面形状と3次元形状から取得した背面形状とを合成することで計測対象物体の3次元形状を生成する。合成にあたり、接続部分は滑らかになるように平滑化処理を行う。
For shape estimation, which is one of the attribute information, transformation for matching the size of the surface shape generated by posture estimation/transformation in S804 and the three-dimensional shape stored in advance in the
属性情報の1つである体積および質量の推定については、対象物体の体毛を考慮した推定を行う。実施形態1では体毛を考慮しておらず、体毛も同じ密度として質量の算出を行っていたため、実際の質量と推定された質量との誤差が大きくなる場合がある。また、羊毛生産などにおいては、体毛体積のみの推定が必要な場合もある。 The estimation of the volume and mass, which are one of the attribute information, is made in consideration of the body hair of the target object. In the first embodiment, body hair is not taken into account and the mass is calculated with the same density as the body hair. Therefore, the error between the actual mass and the estimated mass may increase. Also, in wool production, etc., it may be necessary to estimate only the volume of body hair.
以上説明したように、本実施形態によれば、実施形態1の処理に加え、体毛量を推定し補正を行う。体毛量の推定には、まずジョイントバイラテラルフィルタやガイデットフィルターなどを利用してマッチング処理を行い、アルファマットを算出する。アルファマットが1以下の領域を体毛領域としてその厚みを算出し、推定した3次元形状から体毛領域を除いた体積を算出する。同様に質量推定についても、体毛領域を除いた体積を利用して、物体の種類ごとに格納されている密度情報を乗算することで体毛領域を除いた質量を推定する。または、体毛を含めた体積と体毛を除いた体積から体毛領域のみの体積を算出し、体毛の密度情報を利用して体毛質量を推定し、体毛を除いた質量との和をとることで、体毛の密度の違いを考慮した質量推定を行う。 As described above, according to the present embodiment, in addition to the processing of the first embodiment, the amount of body hair is estimated and corrected. In estimating the amount of body hair, matching processing is first performed using a joint bilateral filter, a guided filter, or the like, and an alpha matte is calculated. A region with an alpha matte of 1 or less is treated as a hair region, and its thickness is calculated, and a volume obtained by excluding the hair region from the estimated three-dimensional shape is calculated. Similarly, for mass estimation, the volume excluding the hair region is used and the density information stored for each type of object is multiplied to estimate the mass excluding the hair region. Alternatively, by calculating the volume of only the hair region from the volume including the hair and the volume excluding the hair, estimating the hair mass using the density information of the hair, and taking the sum of the mass excluding the hair, Perform mass estimation considering differences in hair density.
[他の実施形態]
本実施形態では、撮像素子11が撮像面位相差測距方式の光電変換素子を有し、鑑賞用画像と深度画像とを取得できるものとして説明したが、本発明の実施において、深度情報の取得はこれに限られるものではない。深度情報は、例えば両眼の撮像装置や複数の異なる撮像装置から得られた複数枚の撮像画像に基づいて、ステレオ測距方式で取得するものであってもよい。あるいは、例えば光照射部と撮像装置を用いたステレオ測距方式や、TOF(Time of Flight)方式と撮像装置の組み合わせによる方式などを用いて取得するものであってもよい。
[Other embodiments]
In the present embodiment, the
実施形態1と実施形態2の属性情報推定処理はそれぞれの実施形態に限定するものではなく、同じ情報を用いる処理を入れ替えても実現可能である。 The attribute information estimation processing of Embodiments 1 and 2 is not limited to each embodiment, and can be implemented by replacing the processing using the same information.
また、本実施形態として適用可能な画像処理装置は、デジタルスチルカメラ、デジタルビデオカメラ、車載カメラ、携帯電話やスマートフォンなどを含む。 Image processing apparatuses that can be applied as the present embodiment include digital still cameras, digital video cameras, vehicle-mounted cameras, mobile phones, smart phones, and the like.
また、本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 Further, 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 in the computer of the system or device executes the program. It can also be realized by a process of reading and executing. It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.
本発明は、撮像装置を利用した非接触での物体の属性情報推定であり、例えば、簡易的な家畜の成長記録、動物園での動物の健康管理、野生動物の遠方からの属性取得などメジャーや質量計による計測が困難な状況において有用である。 The present invention is a non-contact object attribute information estimation using an imaging device. It is useful in situations where it is difficult to measure with a mass meter.
発明は上記実施形態に制限されるものではなく、発明の精神および範囲から離脱することなく、様々な変更および変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the embodiments described above, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the claims are appended to make public the scope of the invention.
100…デジタルカメラ、12…制御部、13…画像処理装置、130…画像生成部、131…深度生成部、132…物体検出部、133…姿勢推定部、134…姿勢変換部、135…属性情報推定部
DESCRIPTION OF
Claims (24)
前記撮像画像から特定の物体の領域を検出する物体検出手段と、
前記特定の物体の姿勢を推定する姿勢推定手段と、
前記撮像画像および前記深度情報における前記特定の物体の姿勢を当該特定の物体の属性情報の推定に適した特定の姿勢に変換する姿勢変換手段と、
前記姿勢が変換された撮像画像と深度情報と画像の撮影条件とから前記特定の物体の属性情報を推定する属性情報推定手段と、を有することを特徴とする画像処理装置。 Depth generation means for generating depth information indicating the distance distribution of the subject in the depth direction from a captured image of the subject;
an object detection means for detecting an area of a specific object from the captured image;
posture estimation means for estimating the posture of the specific object;
attitude transformation means for transforming the attitude of the specific object in the captured image and the depth information into a specific attitude suitable for estimating attribute information of the specific object ;
and attribute information estimation means for estimating attribute information of the specific object from the captured image whose attitude has been changed, depth information, and image capturing conditions.
前記姿勢変換手段は、前記平面を基準として前記撮像画像および前記深度情報に対して幾何変換を行うことを特徴とする請求項6に記載の画像処理装置。 The posture estimating means calculates a main normal direction of the body of the specific object and obtains a plane perpendicular to the normal direction,
7. The image processing apparatus according to claim 6, wherein said attitude transformation means performs geometric transformation on said captured image and said depth information with reference to said plane.
前記属性情報推定手段は、前記指定手段により指定された前記特定の物体の計測位置の寸法を算出することを特徴とする請求項9に記載の画像処理装置。 further comprising designating means for designating the measurement position of the specific object;
10. The image processing apparatus according to claim 9, wherein said attribute information estimating means calculates dimensions of the measurement position of said specific object specified by said specifying means.
前記深度生成手段は、前記撮像素子により撮像された異なる視差を持つ画像から深度情報を生成することを特徴とする請求項1から17のいずれか1項に記載の画像処理装置。 The image processing device is an imaging device having an imaging element that captures an image,
18. The image processing apparatus according to any one of claims 1 to 17, wherein said depth generating means generates depth information from images having different parallaxes captured by said imaging element.
物体検出手段が、前記撮像画像から特定の物体の領域を検出するステップと、
姿勢推定手段が、前記特定の物体の姿勢を推定するステップと、
姿勢変換手段が、前記撮像画像および前記深度情報における前記特定の物体の姿勢を当該特定の物体の属性情報の推定に適した特定の姿勢に変換するステップと、
属性情報推定手段が、前記姿勢が変換された撮像画像と深度情報と画像の撮影条件とから前記特定の物体の属性情報を推定するステップと、を有することを特徴とする画像処理方法。 a step in which the depth generating means generates depth information indicating a distance distribution of the subject in the depth direction from the captured image of the subject;
an object detection means detecting an area of a specific object from the captured image;
a pose estimating means estimating the pose of the particular object;
a step of transforming the pose of the specific object in the captured image and the depth information into a specific pose suitable for estimating attribute information of the specific object ;
An image processing method, wherein attribute information estimating means estimates attribute information of the specific object from the captured image whose attitude has been changed, depth information, and photographing conditions of the image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019100724A JP7300895B2 (en) | 2019-05-29 | 2019-05-29 | Image processing device, image processing method, program, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019100724A JP7300895B2 (en) | 2019-05-29 | 2019-05-29 | Image processing device, image processing method, program, and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020194454A JP2020194454A (en) | 2020-12-03 |
JP7300895B2 true JP7300895B2 (en) | 2023-06-30 |
Family
ID=73548724
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019100724A Active JP7300895B2 (en) | 2019-05-29 | 2019-05-29 | Image processing device, image processing method, program, and storage medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7300895B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102624925B1 (en) * | 2021-01-22 | 2024-01-15 | 박지환 | Method and device for machine learning based livestock weight prediction |
CN113628117B (en) * | 2021-08-24 | 2024-01-26 | 凌云光技术股份有限公司 | Depth image rotation transformation method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003250382A (en) | 2002-02-25 | 2003-09-09 | Matsushita Electric Works Ltd | Method for monitoring growing state of aquatic life, and device for the same |
JP2014044078A (en) | 2012-08-24 | 2014-03-13 | Univ Of Miyazaki | Body weight estimation device and body weight estimation method, for animal body |
-
2019
- 2019-05-29 JP JP2019100724A patent/JP7300895B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003250382A (en) | 2002-02-25 | 2003-09-09 | Matsushita Electric Works Ltd | Method for monitoring growing state of aquatic life, and device for the same |
JP2014044078A (en) | 2012-08-24 | 2014-03-13 | Univ Of Miyazaki | Body weight estimation device and body weight estimation method, for animal body |
Also Published As
Publication number | Publication date |
---|---|
JP2020194454A (en) | 2020-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7043085B2 (en) | Devices and methods for acquiring distance information from a viewpoint | |
EP3190781B1 (en) | Autofocus method, device and electronic apparatus | |
CN108052878B (en) | Face recognition device and method | |
JP4915859B2 (en) | Object distance deriving device | |
TWI555379B (en) | An image calibrating, composing and depth rebuilding method of a panoramic fish-eye camera and a system thereof | |
JP6007178B2 (en) | 3D imaging system | |
JP5762211B2 (en) | Image processing apparatus, image processing method, and program | |
JP6305053B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
US20110249117A1 (en) | Imaging device, distance measuring method, and non-transitory computer-readable recording medium storing a program | |
CN110009672A (en) | Promote ToF depth image processing method, 3D rendering imaging method and electronic equipment | |
CN107077743A (en) | System and method for the dynamic calibration of array camera | |
WO2014044126A1 (en) | Coordinate acquisition device, system and method for real-time 3d reconstruction, and stereoscopic interactive device | |
JP7378219B2 (en) | Imaging device, image processing device, control method, and program | |
CN103986854A (en) | Image processing apparatus, image capturing apparatus, and control method | |
JP7300895B2 (en) | Image processing device, image processing method, program, and storage medium | |
JP6418770B2 (en) | Image processing apparatus, imaging apparatus, image processing method, program, and storage medium | |
CN114359406A (en) | Calibration of auto-focusing binocular camera, 3D vision and depth point cloud calculation method | |
JP2014010783A (en) | Image processing apparatus, image processing method, and program | |
JP2015046019A (en) | Image processing device, imaging device, imaging system, image processing method, program, and storage medium | |
JP2015188251A (en) | Image processing system, imaging apparatus, image processing method, and program | |
JP6039301B2 (en) | IMAGING DEVICE, IMAGING SYSTEM, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM | |
KR20120002723A (en) | Device and method for recognizing person by using 3 dimensional image information | |
JP2015019346A (en) | Parallax image generator | |
CN110705487B (en) | Palm print acquisition equipment and method and image acquisition device thereof | |
JP2016134661A (en) | Image processing method, image processor, imaging device, program, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20210103 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210113 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220530 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230310 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230421 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20230522 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230620 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7300895 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |