JP6157436B2 - Alignment apparatus and program - Google Patents
Alignment apparatus and program Download PDFInfo
- Publication number
- JP6157436B2 JP6157436B2 JP2014226966A JP2014226966A JP6157436B2 JP 6157436 B2 JP6157436 B2 JP 6157436B2 JP 2014226966 A JP2014226966 A JP 2014226966A JP 2014226966 A JP2014226966 A JP 2014226966A JP 6157436 B2 JP6157436 B2 JP 6157436B2
- Authority
- JP
- Japan
- Prior art keywords
- part model
- axis
- region
- amount
- rotation
- 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
- Closed-Circuit Television Systems (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Description
本発明は、人物の姿勢推定等のために、対象物の部位形状を模した部位モデルを画像から抽出した対象物領域に位置合わせする位置合わせ装置及びプログラムに関する。 The present invention relates to an alignment apparatus and a program for aligning a part model imitating a part shape of an object to an object region extracted from an image for estimating a posture of a person.
画像上の人物の姿勢を推定する場合に、画像から抽出した人物領域に頭と胴、上腕、前腕、上肢、下肢の形状を模した部位モデルを位置合わせして当てはめることが行われる。従来、部位モデルの位置合わせは、画像上で各部位モデルを複数通りに微小量ずつ回転及び平行移動させて人物全体の姿勢モデルを生成しては人物領域全体との重なりを評価する処理を反復的に繰り返して実現していた。 When estimating the posture of a person on the image, a part model imitating the shape of the head, torso, upper arm, forearm, upper limb, and lower limb is aligned and applied to the human region extracted from the image. Conventionally, the positioning of the part model is performed by rotating and translating each part model by a plurality of small amounts on the image to generate a posture model of the entire person and then evaluating the overlap with the entire person area. It was realized repeatedly.
特許文献1に示されるような従来技術では姿勢推定のために行う部位モデルの位置合わせに要する演算量が膨大となるため、実時間処理の実現が困難であった。
In the prior art as disclosed in
従来技術にて演算量が多くなる要因の一つとして、人物領域全体に対して複数の部位モデルの位置合わせを一度に行っていることが挙げられる。この点、人物領域に対して部位モデルを一つずつ順次に位置合わせすれば、先行して位置合わせした部位により後続して位置合わせする部位の配置に拘束条件を課すことができるため演算量を効果的に減らすことが可能となる。しかしながら従来技術においては部位モデルを一つずつ順次に位置合わせする仕組みが無かった。 One factor that increases the amount of calculation in the prior art is that a plurality of part models are aligned at once with respect to the entire person region. In this regard, if the part models are sequentially aligned with respect to the person region one by one, it is possible to impose a constraint condition on the arrangement of the parts to be subsequently aligned by the previously aligned parts. It can be effectively reduced. However, in the prior art, there is no mechanism for sequentially aligning the site models one by one.
従来技術にて演算量が多くなる要因のもう一つとして、各反復において部位モデルを複数通りに微小量ずつ回転及び平行移動させて人物領域との重なりが最も大きくなる回転量と平行移動量を試行錯誤的に求めていることが挙げられる。各反復における部位モデルの配置に対して人物領域との重なりが最も大きくなる回転量及び平行移動量を決定論的に算出して試行錯誤を排除できれば反復回数を効果的に減らすことが可能となる。しかしながら、決定論的な回転量を算出するために有効なアルゴリズムが無かった。 Another factor that increases the amount of computation in the prior art is to rotate and translate the part model by a small amount in multiple ways at each iteration to determine the amount of rotation and translation that maximizes the overlap with the human area. It is mentioned that it is determined by trial and error. It is possible to effectively reduce the number of iterations if trial and error can be eliminated by deterministically calculating the amount of rotation and the amount of parallel movement with the largest overlap with the human region with respect to the arrangement of the part model in each iteration. . However, there is no effective algorithm for calculating the deterministic rotation amount.
本発明は上記問題を鑑みてなされたものであり、対象物の一部である部位の形状を模した部位モデルを、画像から抽出した対象物領域に少ない演算量で高精度に位置合わせできる位置合わせ装置及びプログラムを提供することを目的とする。 The present invention has been made in view of the above problem, and a position model that imitates the shape of a part that is a part of an object can be accurately aligned with the object area extracted from the image with a small amount of calculation. An object of the present invention is to provide a matching device and a program.
本発明に係る位置合わせ装置は、二次元又は三次元の処理対象空間における、所定対象物を抽出した対象物領域に、前記所定対象物を構成する部位の形状を模した部位モデルを位置合わせする位置合わせ装置であって、前記部位モデルの形状及び慣性主軸を記憶する記憶手段と、前記部位モデルと前記対象物領域とが重複領域を生じる位置に前記部位モデルを初期配置する初期配置手段と、前記重複領域の慣性主軸を推定して、前記部位モデルの慣性主軸の向きを前記重複領域の慣性主軸に近づける前記部位モデルの回転量を算出し、かつ前記重複領域を増加させる前記部位モデルの平行移動量を算出する移動量算出手段と、前記部位モデルを前記回転量だけ回転させ、かつ前記平行移動量だけ平行移動させる配置更新手段と、前記移動量算出手段及び前記配置更新手段による処理を予め定めた終了条件が満たされるまで反復させる反復制御手段と、を有する。 The alignment apparatus according to the present invention aligns a part model imitating the shape of a part constituting the predetermined object in a target object region in which the predetermined target is extracted in a two-dimensional or three-dimensional processing target space. An alignment device, the storage means for storing the shape of the part model and the principal axis of inertia, and the initial placement means for initially arranging the part model at a position where the part model and the object region generate an overlapping area; Estimating the inertial principal axis of the overlapping area, calculating the amount of rotation of the part model to bring the direction of the inertial principal axis of the part model closer to the inertial principal axis of the overlapping area, and increasing the overlap area A movement amount calculating means for calculating a movement amount; a layout updating means for rotating the part model by the rotation amount and translating the part model by the parallel movement amount; and the movement amount calculation. Having a repetition control means for repeated until the end conditions predetermined processing by means and the placement updating means is satisfied.
他の本発明に係る位置合わせ装置において、前記処理対象空間は三次元であり、前記移動量算出手段は、三次元の前記部位モデルが有する三つの慣性主軸のうちの二つを座標軸とする三通りの平面に前記重複領域の慣性主軸を投影し、前記三通りの平面のそれぞれにおいて、前記回転量の当該平面と直交する軸の回りの成分を、当該平面の座標軸に設定された前記部位モデルの慣性主軸の一方と当該平面に投影した前記重複領域の慣性主軸とのなす角度に応じて算出する。 In another alignment apparatus according to the present invention, the processing target space is three-dimensional, and the movement amount calculating means is a three-dimensional coordinate axis having two of the three principal axes of inertia of the three-dimensional part model. The region model in which the principal axis of inertia of the overlapping region is projected onto a plane of the street, and the component around the axis perpendicular to the plane of the rotation amount is set as the coordinate axis of the plane in each of the three planes Is calculated according to an angle formed by one of the principal axes of inertia and the principal axis of inertia of the overlapping region projected onto the plane.
さらに他の本発明に係る位置合わせ装置において、前記移動量算出手段は、前記重複領域を前記部位モデルの慣性主軸の方向に並ぶ複数の部分領域に分割し、当該複数の部分領域の重心の並びを近似する直線であり前記重複領域の重心を通る直線を前記重複領域の慣性主軸と推定する。 In still another alignment apparatus according to the present invention, the movement amount calculation means divides the overlap region into a plurality of partial regions arranged in the direction of the principal axis of the part model, and arranges the centers of gravity of the plurality of partial regions. And a straight line passing through the center of gravity of the overlapping region is estimated as the inertial principal axis of the overlapping region.
さらに他の本発明に係る位置合わせ装置において、前記移動量算出手段は、前記重複領域を前記部位モデルの慣性主軸に直交する直線又は平面で2つの部分領域に分割し、当該各部分領域及び前記重複領域それぞれの重心を通る直線を前記重複領域の慣性主軸と推定する。 In still another alignment apparatus according to the present invention, the movement amount calculation unit divides the overlapping region into two partial regions by a straight line or a plane orthogonal to the principal axis of inertia of the part model, and each of the partial regions and the A straight line passing through the center of gravity of each overlapping region is estimated as the inertial principal axis of the overlapping region.
本発明に係るプログラムは、二次元又は三次元の処理対象空間における、所定対象物を抽出した対象物領域に、前記所定対象物を構成する部位の形状を模して予め定められた部位モデルを位置合わせする処理をコンピュータに行わせるためのプログラムであって、当該コンピュータに、前記部位モデルと前記対象物領域とが重複領域を生じる位置に前記部位モデルを初期配置させ、前記重複領域の慣性主軸を推定して、前記部位モデルの慣性主軸の向きを前記重複領域の慣性主軸に近づける前記部位モデルの回転量を算出し、当該回転量だけ前記部位モデルを回転させる処理、及び前記重複領域を増加させる前記部位モデルの平行移動量を算出し、当該平行移動量だけ前記部位モデルを平行移動させる処理を予め定めた終了条件が満たされるまで反復させる。 The program according to the present invention provides a predetermined part model imitating a shape of a part constituting the predetermined object in a target area in which the predetermined target is extracted in a two-dimensional or three-dimensional processing target space. A program for causing a computer to perform alignment processing, wherein the computer initially arranges the part model at a position where the part model and the object area generate an overlapping area, and the inertia main axis of the overlapping area To calculate the amount of rotation of the part model that brings the direction of the principal axis of inertia of the part model closer to the principal axis of inertia of the overlapping area, and the process of rotating the part model by the amount of rotation and increasing the overlapping area The amount of translation of the part model to be calculated is calculated, and a process for translating the part model by the amount of translation is satisfied in advance. In be repeated.
本発明によれば、対象物の一部である部位の形状を模した部位モデルを、画像から抽出した対象物領域に少ない演算量で高精度に位置合わせできる位置合わせ装置が得られる。 ADVANTAGE OF THE INVENTION According to this invention, the position alignment apparatus which can align the site | part model imitating the shape of the site | part which is a part of target object with the small amount of calculations to the target object area extracted from the image with high precision is obtained.
以下、本発明の実施の形態(以下実施形態という)である姿勢推定装置について、図面に基づいて説明する。実施形態に係る姿勢推定装置は人物を姿勢推定の対象物とし、監視空間を撮影した監視画像に基づいて抽出された人物領域に、人物の部位の形状を模した部位モデルを位置合わせする。そして、位置合わせした部位モデルの一致度や配置に基づいて人物の姿勢を推定する。 Hereinafter, an attitude estimation apparatus according to an embodiment of the present invention (hereinafter referred to as an embodiment) will be described with reference to the drawings. The posture estimation apparatus according to the embodiment uses a person as an object for posture estimation, and aligns a part model imitating the shape of the part of the person with a person region extracted based on a monitoring image obtained by photographing the monitoring space. Then, the posture of the person is estimated based on the degree of coincidence and arrangement of the aligned part models.
[第一の実施形態]
本発明の第一の実施形態に係る姿勢推定装置1は姿勢推定に際し、監視画像から抽出した二次元の人物領域に二次元の部位モデルを位置合わせする。
[First embodiment]
At the time of posture estimation, the
図1は姿勢推定装置1の概略のブロック構成図である。姿勢推定装置1は撮影部2、記憶部3、画像処理部4及び出力部5を含んで構成される。撮影部2、記憶部3及び出力部5は画像処理部4と接続される。
FIG. 1 is a schematic block diagram of the
撮影部2は、監視空間を撮影する監視カメラであり、撮影した監視画像を画像処理部4に入力する。
The
記憶部3は、ROM(Read Only Memory)、RAM(Random Access Memory)、ハードディスク等の記憶装置であり、画像処理部4で使用されるプログラム及びデータや、画像処理部4が生成する各種データなどを記憶する。記憶部3はこれらプログラム、データを画像処理部4との間で入出力する。
The
画像処理部4はCPU(Central Processing Unit)、DSP(Digital Signal Processor)、MCU(Micro Control Unit)等のプロセッサ及びその周辺回路で構成される。例えば、画像処理部4は、記憶部3に格納されたプログラムに基づいて動作するコンピュータにより構成される。画像処理部4は後述する各手段として動作し、監視画像から人物の姿勢を推定し出力部5に出力する。
The
出力部5は推定された人物姿勢をユーザに示す表示装置などである。
The
図2は姿勢推定装置1の概略の機能ブロック図である。なお、図2では撮影部2及び出力部5は図示を省略している。画像処理部4は対象物領域抽出手段40、初期配置手段41、移動量算出手段42、配置更新手段43、反復制御手段44及び姿勢推定手段45として動作する。このうち、初期配置手段41、移動量算出手段42、配置更新手段43及び反復制御手段44が本発明に係る位置合わせ装置10として機能する。また記憶部3は位置合わせ装置10で用いる情報を記憶する記憶手段30として機能する。具体的には記憶手段30は部位モデル情報300を記憶する。
FIG. 2 is a schematic functional block diagram of the
対象物領域抽出手段40は監視画像から対象物領域として人物の領域を、例えば監視画像と予め用意した背景画像との差分処理などにより抽出する。抽出により得られる差分画像においては、例えば、人物領域内の画素値が“1”、人物領域外の画素値が“0”に設定されることで人物領域が表示される。
The object
位置合わせ装置10は人物領域が表示された差分画像を二次元の処理対象空間とし、当該処理対象空間にて人物領域中の目的部位に部位モデルを位置合わせする。以下、本実施形態の二次元の処理対象空間を処理対象画像と称する。本実施形態においては人物の頭部と胴体部分を併せて一つの目的部位とし、姿勢推定装置1は位置合わせ装置10によって処理対象画像上にて楕円形の部位モデルを人物領域の頭部及び胴体部分に位置合わせすることで上半身の姿勢推定を行う。この位置合わせ処理では、部位モデルを初期位置に配置し、当該部位モデルを回転及び平行移動させる配置更新を反復して行い、目的部位への部位モデルの配置の収束を図る。よって楕円形の長軸の一方端を頭頂部と一致させ、他方端を臀部と一致させることを目標とした位置合わせがなされる。
The
部位モデル情報300は部位モデルを定義する情報であり、部位モデルの形状や向きを表す情報を含む。部位モデルは位置合わせの対象とされる部位の形状をモデル化した二次元形状である。部位モデルの形状は基本的に、軸対称、中心対称などの制限はなく目的部位に合わせた任意の二次元形状とすることができるが、本実施形態では楕円形とする。
The
ここで、処理対象画像の座標系を、例えば、右手系の直交座標系XYで定義する。なお、処理対象画像と監視画像とは基本的に同じ座標系とすることができる。また部位モデルに固定された座標系をローカル座標系とし、例えば、右手系の直交座標系xyで定義する。 Here, the coordinate system of the processing target image is defined by a right-handed orthogonal coordinate system XY, for example. Note that the processing target image and the monitoring image can be basically the same coordinate system. The coordinate system fixed to the part model is defined as a local coordinate system, and is defined by, for example, a right-handed orthogonal coordinate system xy.
ローカル座標系は部位モデル60とする楕円形が次式で表されるように設定される。
(x2/Rx2)+(y2/Ry2)=1
The local coordinate system is set so that an ellipse as the
(X 2 / Rx 2) + (
ここで、Rx<Ryとする。すなわち部位モデル60はy軸方向に長半径Ry、x軸方向に短半径Rxを有する楕円形である。また楕円形の中心cがローカル座標系の原点となる。よってy軸とx軸とが部位モデル60の慣性主軸、原点が部位モデル60の重心に設定されている。
Here, Rx <Ry. That is, the
なお、部位モデル60を任意形状とする場合には、当該形状の主成分分析の第一主成分、第二主成分の軸をそれぞれy軸、x軸と定めることができる。
When the
処理対象空間が二次元である本実施形態では監視カメラと目的部位との位置関係によって人物領域における目的部位の見た目の形状が変わる。このことに対応するために形状が異なる複数(M通り)の部位モデル60を表す部位モデル情報300が候補として用意される。例えば、部位モデル60としてRx,Ryの組み合わせが異なる複数の楕円形を部位モデル情報300に用意することができる。または、画像処理部4は、対象物領域抽出手段40により抽出された人物領域の大きさなどに応じて複数通りの部位モデル60を生成し記憶手段30に格納する。
In the present embodiment in which the processing target space is two-dimensional, the appearance of the target part in the person region changes depending on the positional relationship between the monitoring camera and the target part. In order to cope with this,
図3は部位モデル60が処理対象画像の座標系に存在する状態を示す模式図である。部位モデル60の姿勢は、処理対象画像の座標系で記述されたローカル座標系の座標軸及び原点により記述される。すなわち、部位モデル60の平行移動は処理対象画像の座標系でのローカル座標系の原点(点c)の移動によって記述され、部位モデル60の回転は処理対象画像の座標系でのローカル座標系のx軸,y軸の向きの変化によって記述される。
FIG. 3 is a schematic diagram showing a state in which the
初期配置手段41は、処理対象画像に部位モデルとして配置される楕円形の初期位置を決定する。例えば、人物の直立姿勢を基本姿勢と考え、初期位置における楕円形の向きはy軸の向きが監視画像における鉛直方向となるように設定する。本実施形態では処理対象画像は監視画像と同じ座標系としており、y軸の向きはY軸の向きとなるように設定される。また、当該楕円形の位置は、処理対象画像における人物領域の位置に基づいて設定することができる。例えば、楕円形の中心(つまりローカル座標系の原点)の処理対象画像の座標系におけるX座標は人物領域のX軸方向における位置に対応させることができる。一方、楕円形の中心の処理対象画像の座標系におけるY座標は、楕円形と人物領域とが重複領域を生じ、かつ楕円形の最上部が人物領域の最上部よりも少し高い位置になるように設定する。 The initial arrangement means 41 determines an elliptical initial position arranged as a part model in the processing target image. For example, an upright posture of a person is considered as a basic posture, and the elliptical direction at the initial position is set so that the y-axis direction is the vertical direction in the monitoring image. In this embodiment, the processing target image has the same coordinate system as the monitoring image, and the direction of the y axis is set to be the direction of the Y axis. Further, the position of the ellipse can be set based on the position of the person area in the processing target image. For example, the X coordinate in the coordinate system of the processing target image at the center of the ellipse (that is, the origin of the local coordinate system) can be made to correspond to the position of the person region in the X axis direction. On the other hand, the Y coordinate in the coordinate system of the processing target image at the center of the ellipse is such that the ellipse and the person area overlap, and the top of the ellipse is slightly higher than the top of the person area. Set to.
ちなみに、楕円形と人物領域とが重複領域を有するように初期設定する理由は、後述するように移動量算出手段42が当該重複領域の重心を利用して部位モデル60の回転量及び平行移動量を求めるからである。また、部位モデル60を人物領域、つまり人の身長よりも高い位置に初期設定する理由は、本実施形態では部位モデル60を人物の上半身をなす頭部及び胴体部分に位置合わせすることに関係している。位置合わせ装置10における部位モデル60の回転・平行移動の反復処理の収束判定は部位モデル60と人物領域との重複領域の大きさに基づいてなされ、例えば、重複領域が上半身、下半身のいずれであるかに関係なく収束したと判定され得る。そのため、部位モデル60の初期位置を人物領域の下寄りに設定すると、楕円形の頂点が頭頂部に一致しない状態で収束してしまう可能性が高くなる。この可能性を低くするために、部位モデル60の最上部を人物領域の最上部よりも高く初期設定する。
Incidentally, the reason for initial setting so that the ellipse and the person area have overlapping areas is that the movement amount calculation means 42 uses the center of gravity of the overlapping area and the amount of rotation and the parallel movement amount of the
図4は部位モデル60の初期位置の高さについての上述の条件を説明する模式図である。図4(a)は部位モデル60の最上部が人の身長よりも高い位置になるように初期設定した場合である。状態(a−1)は初期設定時、状態(a−2)は収束過程、状態(a−3)は収束した最終結果を示している。状態(a−3)では、楕円形の長手方向の一方端は頭頂部、他方端は臀部に位置しており部位モデル60は人物領域62における目的とする部位である頭部及び胴体部分に好適に位置合わせされている。一方、図4(b)は部位モデル60の最上部が人の身長よりも低い位置になるように初期設定した場合であり、状態(b−1)は初期設定時、状態(b−2)は収束過程、状態(b−3)は収束した最終結果を示している。この場合、部位モデル60の頂点の位置が頭頂部や臀部に収束せず、人物領域62のうちの意図しない部位に部位モデル60の位置が収束している。
FIG. 4 is a schematic diagram for explaining the above-described conditions for the height of the initial position of the
移動量算出手段42は、部位モデルのローカル座標系の原点の平行移動量とx軸又はy軸の回転量とを算出する。本実施形態では平行移動量をミーンシフト(mean shift)法により求める。図5はミーンシフト法による平行移動量の算出方法を説明する模式図である。本実施形態では移動量算出手段42は例えば、部位モデル60内に存在する人物領域、つまり部位モデル60と人物領域62との重複領域の重心gを求める。図5では図5(a)の状態での当該重心gに“●”を印している。そして、移動量算出手段42はローカル座標系の原点が位置する楕円中心cから重心gに向かうベクトルを平行移動量として算出する。図5(b)は図5(a)の状態にて算出された平行移動量だけ部位モデル60を移動させた状態を示しており、楕円中心cを示す“×”印が“●”印の位置に移動している。
The movement amount calculation means 42 calculates the parallel movement amount of the origin of the local coordinate system of the part model and the rotation amount of the x axis or the y axis. In the present embodiment, the parallel movement amount is obtained by a mean shift method. FIG. 5 is a schematic diagram for explaining a method of calculating the parallel movement amount by the mean shift method. In the present embodiment, the movement amount calculation means 42 obtains, for example, a person area existing in the
図6は移動量算出手段42によるローカル座標系の回転量の算出方法を説明する模式図である。図6(a)は回転量の算出対象とする状態での人物領域62と部位モデル60との配置例である。本実施形態では、部位モデル60の慣性主軸を、部位モデル60と人物領域62との重複領域の慣性主軸に近づけるように回転量θを決定する。移動量算出手段42は部位モデルの慣性主軸のうち回転操作を行うための基準軸とするものを設定し、当該基準軸に対応する重複領域の慣性主軸を推定して基準軸に対する目標軸とする。そして、基準軸の向きを目標軸に近づける部位モデル60の回転量θを算出する。
FIG. 6 is a schematic diagram for explaining a method of calculating the rotation amount of the local coordinate system by the movement amount calculation means 42. FIG. 6A shows an arrangement example of the
本実施形態では直交する2つの慣性主軸のうち慣性モーメントが最小となるものを基準軸Lとする。この場合、楕円形である部位モデル60において基準軸Lとする慣性主軸は楕円形の長軸に一致する。なお、ローカル座標系のy軸も当該長軸に一致するように設定されている。
In the present embodiment, the reference axis L is the one of the two inertial main axes that are orthogonal to each other and has the minimum moment of inertia. In this case, in the
また本実施形態では重複領域の慣性主軸を推定し、当該慣性主軸の近似直線を目標軸とする。具体的には、移動量算出手段42は部位モデル60と人物領域62との重複領域の重心gを求める。重心gを通り主軸Lに直交する分割直線Pにより重複領域を2つの領域に分割する。当該2つの領域を分割領域A,Bと呼ぶことにする。移動量算出手段42は分割領域A,Bそれぞれの重心(部分重心と呼ぶ)ga,gbを求める。図6(b)には部分重心ga,gbをそれぞれ“■”,“▲”で示している。本実施形態では重複領域の慣性主軸の近似としてga,g,gbを通る直線を用いる。この部位モデル60の基準軸Lの方向に並ぶ2つの部分領域A,Bの重心を通る直線の方向に部位モデル60の基準軸を合わせれば、重複領域が大きくなることが期待できる。そこで、移動量算出手段42は当該直線を目標軸とし、回転量θとして当該直線と軸Lとがなす角度を算出する。直線Lに平行で重心gを通る直線をL’とすると、移動量算出手段42はgとgaとを結ぶ線分と直線L’とがなす角θa、及びgとgbとを結ぶ線分と直線L’とがなす角θbを求め、θaとθbの平均値を回転量θとする。
In this embodiment, the inertia main axis of the overlapping region is estimated, and an approximate straight line of the inertia main axis is set as the target axis. Specifically, the movement amount calculating means 42 obtains the center of gravity g of the overlapping area between the
なお、ここでは重複領域のピクセル数が少ない場合等において計算誤差の影響を小さくすることなどを考慮してθaとθbとを平均しているが原理的にはga,g,gbは一直線に並び、θaとθbとは当該直線と直線L’とにより形成される対頂角であり等しくなるので、θa,θbのいずれか一方を回転量θとすることもできる。また、重複領域のピクセル数が少ない場合における重心座標の計算精度の低下に対して、重複領域のピクセル数に応じて回転量を減じるなど、過剰な回転による振動や発散を防止する構成としてもよい。 Here, θa and θb are averaged in consideration of reducing the influence of calculation error when the number of pixels in the overlapping region is small, but in principle, ga, g, and gb are arranged in a straight line. , Θa and θb are the vertical angles formed by the straight line and the straight line L ′ and are equal to each other, so that either one of θa and θb can be set as the rotation amount θ. In addition, it may be configured to prevent vibration and divergence due to excessive rotation, such as reducing the rotation amount according to the number of pixels in the overlapping area, in response to a decrease in the calculation accuracy of the barycentric coordinates when the number of pixels in the overlapping area is small. .
図6(c)は、部位モデル60を角度θだけ回転させ主軸Lの向きを重複領域の主軸の近似方向に変えた状態を示している。ここでは重心gを中心に部位モデル60を回転させた状態を示している。
FIG. 6C shows a state where the
配置更新手段43は、部位モデル60を移動量算出手段42で求めた平行移動量だけ平行移動させ、移動量算出手段42で求めた回転量だけ回転させることで部位モデル60の配置を更新する。すなわち、求めた平行移動量だけローカル座標系の原点を平行移動させ、また、求めた回転量だけローカル座標系を回転させる。ここで、回転中心をローカル座標系の原点(楕円中心c)とすれば、平行移動の操作と回転の操作とは独立した操作となり処理の順序依存性がなくなり、どちらを先に実行しても同じ配置に更新される。
The
反復制御手段44は移動量算出手段42及び配置更新手段43による一回の配置更新が行われるごとに、部位モデル60に位置合わせ処理の終了条件を満たすか否かを判定する。例えば、一回の平行移動量及び回転量が予め定めたしきい値以下に収束したことを終了条件とすることができる。反復制御手段44は終了条件が満たされるまで、移動量算出手段42及び配置更新手段43による処理を繰り返させ、終了条件が満たされると、位置合わせされた部位モデル60の配置を部位モデル情報300に記憶させる。
The
なお、終了条件は上述の例に限られない。例えば、部位モデル60の中に含まれる人物領域の面積の割合RINが予め定めた一定値β以上であることを終了条件としてもよい。ここでβの値は例えば0.95など、好適に位置合わせがなされたことが期待できる値とする。また、反復処理が無限ループに陥ることを想定して、所定の反復回数を超えた場合は反復処理を打ち切防止するように終了条件を定めることもできる。
The end condition is not limited to the above example. For example, the end condition may be that the ratio R IN of the area of the person region included in the
姿勢推定手段45は位置合わせされた部位モデル60の配置に基づいて監視画像に写る人物の姿勢を推定する。
The posture estimation means 45 estimates the posture of the person shown in the monitoring image based on the position of the aligned
図7は本実施形態の姿勢推定装置1の概略の動作を示すフロー図である。姿勢推定装置1は監視空間に人がいない状態にて起動され、当該状態にて撮影部2により監視空間を撮影し背景画像を取得する(ステップS2)。なお、姿勢推定装置1の動作中において背景画像を適宜更新することもできる。取得した背景画像は記憶部3に保存する。
FIG. 7 is a flowchart showing a schematic operation of the
撮影部2は監視空間を例えば、一定時間ごとに撮影する(ステップS4)。撮影された画像は監視画像として画像処理部4に入力される。
The
画像処理部4において対象物領域抽出手段40は記憶部3に記憶された背景画像を用いて監視画像に対し背景差分処理を行い、位置合わせ装置10における処理対象画像として、人物領域が抽出された差分画像を生成する(ステップS6)。当該差分画像は例えば、監視画像における人物領域が画素値“1”、それ以外の領域が画素値“0”である二値化画像である。
In the
位置合わせ装置10は記憶手段30に記憶されたM通りの部位モデル情報300それぞれについて位置合わせ処理を行う。画像処理部4は部位モデル情報300の種類を示すインデックスIを初期値“1”に設定し(ステップS8)、インデックスIを1ずつインクリメントしてM通りの部位モデル60それぞれについて位置合わせ装置10による位置合わせ処理を実行する。
The
位置合わせ装置10はI番目の部位モデル情報300を記憶手段30から読み出し(ステップS10)、初期配置手段41によりI番目の部位モデル情報300が表す部位モデル60を、既に述べたように人物領域に基づいて設定される初期位置に配置して(ステップS12)、当該部位モデル60の配置を反復的に更新して人物領域の目的とする部位に位置合わせする処理(ステップS14〜S20)を開始する。
The
当該反復処理では、移動量算出手段42が現在の部位モデル60と人物領域との重複領域に基づいて上述のように部位モデル60の平行移動量及び回転量を算出し(ステップS14)、配置更新手段43が移動量算出手段42の算出結果に基づいて部位モデル60を新たな配置へ更新する(ステップS16)。具体的には部位モデル60の位置を示す楕円中心c、及び部位モデル60の姿勢(向き)を示すy軸の処理対象画像の座標系での向きが更新され、部位モデル情報300に記憶される。
In the iterative process, the movement amount calculation means 42 calculates the parallel movement amount and the rotation amount of the
反復制御手段44は配置更新手段43による一回の更新処理が完了するごとに、反復処理を制御するための処理を行う(ステップS18,S20)。例えば、移動量算出手段42により算出された平行移動量と回転量とをそれぞれ反復の収束を判定するしきい値と比較し(ステップS18)、いずれかがしきい値を超えている場合は反復を繰り返し(ステップS20にて「No」の場合)、両方ともしきい値以下となった場合は収束したとして反復を終了する(ステップS20にて「Yes」の場合)。また、反復回数に上限回数を予め定め、当該回数を超えた場合も反復を終了してもよい。 The iterative control means 44 performs a process for controlling the iterative process every time one update process by the arrangement updating means 43 is completed (steps S18 and S20). For example, the parallel movement amount and the rotation amount calculated by the movement amount calculation means 42 are respectively compared with threshold values for determining the convergence of iteration (step S18), and if either exceeds the threshold value, the iteration is repeated. Is repeated (in the case of “No” in step S20), and if both are equal to or less than the threshold value, the iteration is terminated as being converged (in the case of “Yes” in step S20). In addition, an upper limit may be set in advance as the number of iterations, and the iteration may be terminated when the number of iterations is exceeded.
反復制御手段44はI番目の部位モデル60について反復が終了すると、部位モデル60の人物領域への一致度を計算する(ステップS22)。例えば、一致度として、部位モデル60の中に含まれる人物領域の面積SINを部位モデル60の面積で除した値RINを用いることができる。また、人物領域の全体の面積Sに対する部位モデル60外の残余面積(S−SIN)の比の値ROUTを、その値が小さいほど一致度が高いことを示す指標値として用いることもできる。算出された一致度を示す値は部位モデル情報300に記憶される。
When the iteration for the I-
位置合わせ装置10は位置合わせ処理が完了した部位モデル60が最後の、つまりM番目のものでなければ(ステップS24にて「No」の場合)、インデックスIをインクリメントして(ステップS26)次の部位モデル60についての位置合わせ処理(ステップS10〜S22)を行う。
The
一方、M通りの全部位モデル60について位置合わせ処理が完了すると(ステップS24にて「Yes」の場合)、姿勢推定手段45は部位モデル情報300に記憶された各部位モデル60についての一致度を比較し、最も好適に人物領域の目的部位に適合した部位モデル60を選択し人物の姿勢を推定する(ステップS28)。
On the other hand, when the alignment process is completed for all M part body models 60 (in the case of “Yes” in step S24), the
画像処理部4は監視画像が得られるたびに(ステップS4)、上述したステップS6〜S28の処理を行う。
Every time a monitoring image is obtained (step S4), the
本実施形態では平行移動量の算出にミーンシフト法を用いている。これにより、部位モデル60と人物領域62との位置関係に基づいて、好適な平行移動量が一意的に定まるので、例えば、一定の微小量ずつ平行移動を行うよりも、人物領域62に対する部位モデル60の位置合わせが効率的に行われる。
In this embodiment, the mean shift method is used for calculating the parallel movement amount. Thereby, since a suitable amount of parallel movement is uniquely determined based on the positional relationship between the
さらに、本実施形態では回転量の算出について、各反復処理にて、重複領域の慣性主軸を推定した直線に部位モデル60の慣性主軸を合わせるように回転量を決定する。この手法は平行移動におけるミーンシフト法と同様、部位モデル60と人物領域62との位置関係に基づいて、好適な回転量が一意的に定まるので部位モデル60の人物領域62に対する位置合わせが効率的に行われる。
Furthermore, in the present embodiment, with respect to the calculation of the rotation amount, the rotation amount is determined so that the inertial main axis of the
部位モデル60と人物領域62との重複領域の慣性主軸を推定する方法は上記実施形態以外のやり方とすることもできる。
The method of estimating the inertial principal axis of the overlapping region between the
例えば、重複領域について主成分分析を行って慣性主軸を求めることができる。具体的には、処理対象画像における重複領域のピクセルの分布について得られる主成分分析の第一成分が重複領域の慣性主軸となる。そこで、上記実施形態で位置合わせの基準軸に採用している部位モデル60の最小慣性モーメントの慣性主軸を、重複領域について主成分分析で求めた最小慣性モーメントの慣性主軸に合わせるように部位モデル60の回転量を算出する構成とすることができる。
For example, a principal component analysis can be performed on the overlapping region to obtain the principal axis of inertia. Specifically, the first component of the principal component analysis obtained for the pixel distribution of the overlapping region in the processing target image becomes the inertial principal axis of the overlapping region. Therefore, the
また、上述の実施形態では重複領域の慣性主軸を推定するに際して、部位モデル60の慣性主軸Lに直交する分割直線Pにより重複領域を二つの領域に分割したが、重複領域を軸Lの方向に並ぶ三つ以上の部分領域に分割し、当該複数の部分領域の重心の並びを近似する直線であり重複領域の重心gを通る直線Qを重複領域の慣性主軸と推定することもできる。具体的には、Lに直交する複数の直線で重複領域を三つ以上に分割し各分割領域の部分重心を求める。そして、重複領域の重心gを通るという拘束条件の下で、最小二乗法などにより部分重心の分布を近似する直線を求め、これを直線Qとすることができる。なお、部分重心の分布を近似する直線を求める際には、各部分重心に対応する分割領域の大きさを重みとして考慮する重み付き最小二乗法とする。
In the above embodiment, when estimating the inertial principal axis of the overlap region, the overlap region is divided into two regions by the dividing line P orthogonal to the inertial principal axis L of the
なお、上記実施形態では、人物の上半身が起きている状態を想定して初期位置における部位モデル60の楕円形の長軸(y軸)の向きをY軸の向きに設定した。これにより重複領域も比較的に縦長になり易く、上述のy軸に直交する直線Pで重複領域を分割する手法で重複領域について求めた軸は、部位モデル60について設定した慣性主軸と同様、慣性モーメントが最小の慣性主軸を近似するものであることが期待でき、部位モデル60が好適に目的とする人物の頭部及び胴体に位置合わせされ得る。
In the above embodiment, assuming that the upper body of the person is standing, the direction of the elliptical long axis (y-axis) of the
一方、人物の上半身の傾きが大きい場合など、重複領域が縦長にならないことも想定される。このような場合には上述のy軸に直交する直線Pで重複領域を分割する手法で求めた重複領域の軸は慣性モーメントが最小ではない慣性主軸に近い向きとなり、意図しない姿勢に部位モデル60が収束するかもしれない。これを避けるために、同じ部位モデル60について初期配置での向きを複数通り設定し、各姿勢について反復処理を行って一致度を求め、最大の一致度を与える姿勢と当該一致度を部位モデル情報300に記憶し、姿勢推定手段45で利用する構成としてもよい。
On the other hand, it is also assumed that the overlapping area does not become vertically long when the upper body of the person has a large inclination. In such a case, the axis of the overlapping area obtained by the above-described method of dividing the overlapping area by the straight line P orthogonal to the y-axis is oriented close to the inertial main axis where the moment of inertia is not minimum, and the
[第二の実施形態]
本発明の第二の実施形態について以下、第一の実施形態と同様の構成要素には同一の符号を付すと共に、共通する事柄については説明を省略し、第一の実施形態との相違点について主に説明する。
[Second Embodiment]
In the following description of the second embodiment of the present invention, the same components as those in the first embodiment are denoted by the same reference numerals, explanations of common matters are omitted, and differences from the first embodiment are described. Mainly explained.
第二の実施形態に係る姿勢推定装置1は姿勢推定に際し、監視画像から求めた三次元の人物領域に三次元の部位モデルを位置合わせする。すなわち、第一の実施形態は二次元空間での位置合わせであったのに対し、本実施形態は三次元空間での位置合わせである点が基本的な相違点である。本実施形態では処理対象空間の座標系をワールド座標系とし、右手系の直交座標系XYZで定義する。また部位モデル60に固定されたローカル座標系を右手系の直交座標系xyzで定義する。
At the time of posture estimation, the
本実施形態の構成は、第一の実施形態の図1及び図2に示すものと基本的に同じであり、これらの図を援用する。 The configuration of the present embodiment is basically the same as that shown in FIGS. 1 and 2 of the first embodiment, and these figures are incorporated.
撮影部2は複数のカメラであり、それらが撮影する監視画像から監視空間にいる人物の立体形状を視体積交差法などにより求めることができるように配置される。例えば、各カメラは魚眼レンズを装着し、天井から真下向きに設置される。
The photographing
これら複数のカメラの内部パラメータ及び外部パラメータは予めのキャリブレーションにより計測され、カメラパラメータとして記憶部3に記憶される。なお、外部パラメータによりワールド座標系における各カメラの位置・姿勢が表され、ワールド座標系XYZの位置を各カメラの撮影面座標系uvに変換(投影)したり、各カメラの撮影面座標系uvの位置をワールド座標系XYZに変換(逆投影)したりすることが可能となる。
The internal parameters and external parameters of the plurality of cameras are measured by calibration in advance and stored in the
対象物領域抽出手段40は、各カメラの監視画像について背景差分処理を行い人物のシルエットを表す差分画像を生成する。対象物領域抽出手段40は記憶部3に記憶されたカメラパラメータを用いて差分画像をワールド座標系に逆投影する。この逆投影により、カメラ位置を頂点とする錐体の空間である視体積が定義される。対象物領域抽出手段40は全カメラの視体積が交差する空間(積空間)を算出する。この積空間は人物の三次元の概略形状を表し、これが本実施形態における人物領域となる。なお、第一の実施形態では人物領域はピクセルの集合として扱うことができた。これと同様、本実施形態では人物領域はボクセルの集合として扱うことができる。
The object
本実施形態では処理対象空間として、監視空間に対応して設定され三次元の人物領域が配置された仮想的な空間を定義する。処理対象空間と監視空間とは共通のワールド座標系XYZで定義される。 In the present embodiment, a virtual space in which a three-dimensional person area set corresponding to the monitoring space is arranged is defined as the processing target space. The processing target space and the monitoring space are defined by a common world coordinate system XYZ.
位置合わせ装置10は人物領域が配置された処理対象空間にて、三次元の部位モデルを人物領域中の目的部位に位置合わせすることで人物の姿勢推定を行う。この位置合わせ処理では、部位モデルを初期位置に配置し、当該部位モデルを回転及び平行移動させる配置更新を反復して行い、目的部位への部位モデルの配置の収束を図る。なお、本実施形態では第一の実施形態と同様、人物の頭部と胴体部分とを併せて一つの目的部位とし、扁平楕円体(以下、単に楕円体と称する。)の部位モデルを位置合わせするものとする。よって楕円体の長軸の一方端を頭頂部に一致させ、他方端を臀部に一致させることを目標とした位置合わせがなされる。
The
部位モデルの形状は基本的に目的部位に合わせた任意の三次元形状とすることができるが、本実施形態ではローカル座標系で次式で表される楕円体とする。
(x2/Rx2)+(y2/Ry2)+(z2/Rz2)=1
The shape of the part model can basically be an arbitrary three-dimensional shape that matches the target part, but in this embodiment, it is an ellipsoid represented by the following expression in the local coordinate system.
(X 2 / Rx 2) + (
ここで、Rx<Ry<Rzとする。すなわち部位モデル60はz軸方向に長半径Rzを有する三軸不等楕円体である。ちなみに当該楕円体のx軸方向が人の前後方向、y軸方向が胴体の脇方向、z軸方向が身長方向に対応する。また楕円体の中心cがローカル座標系の原点となる。
Here, Rx <Ry <Rz. That is, the
記憶手段30には部位モデル60として楕円体の部位モデル情報300が記憶される。本実施形態では第一の実施形態とは異なり三次元空間内で位置合わせを行うので、三次元の対象物を二次元画像に投影することに伴う、人物の姿勢に応じた目的部位の形状の変化は生じない。そのため、部位モデル60は人物の頭部及び胴体部分の代表的な形状を表す一種類だけとすることができる。
The storage means 30 stores ellipsoidal
図8は部位モデル60がワールド座標系に存在する状態を示す模式図である。部位モデル60の姿勢は、ワールド座標系で記述されたローカル座標系の座標軸及び原点により記述される。すなわち、部位モデル60の平行移動はワールド座標系でのローカル座標系の原点(点c)の移動によって記述され、部位モデル60の回転はワールド座標系でのローカル座標系のx軸,y軸,z軸の向きの変化によって記述される。
FIG. 8 is a schematic diagram showing a state in which the
初期配置手段41は、処理対象空間に部位モデルとして配置される楕円体の初期位置を決定する。例えば、人物の直立姿勢を基本姿勢と考え、初期位置における楕円体の向きはz軸の向きが処理対象空間における鉛直方向、つまりZ軸方向となるように設定する。また、楕円体のx軸、y軸は人物領域の水平断面形状、つまりXY平面に沿った形状に応じて設定することができる。具体的には部位モデルのx軸、y軸はそれぞれおおよそ人物領域の短手方向、長手方向になるように設定することができる。 The initial placement means 41 determines an initial position of an ellipsoid placed as a part model in the processing target space. For example, the upright posture of the person is considered as the basic posture, and the orientation of the ellipsoid at the initial position is set so that the direction of the z axis is the vertical direction in the processing target space, that is, the Z axis direction. Further, the x-axis and y-axis of the ellipsoid can be set according to the horizontal cross-sectional shape of the person area, that is, the shape along the XY plane. Specifically, the x-axis and y-axis of the part model can be set so as to be approximately in the short direction and the long direction of the person region, respectively.
また、楕円体の位置は、処理対象空間における人物領域の位置に基づいて設定することができる。例えば、楕円体の中心(つまりローカル座標系の原点)のワールド座標系におけるX,Y座標は人物領域のX,Y軸方向における位置に対応させることができる。一方、楕円体の中心のワールド座標系におけるZ座標は、第一の実施形態と同じ理由から、楕円体と人物領域とが重複領域を生じ、かつ楕円体の最上部が人物領域の最上部よりも少し高い位置になるように設定する。 The position of the ellipsoid can be set based on the position of the person area in the processing target space. For example, the X and Y coordinates in the world coordinate system at the center of the ellipsoid (that is, the origin of the local coordinate system) can be made to correspond to the positions of the person region in the X and Y axis directions. On the other hand, the Z coordinate in the world coordinate system at the center of the ellipsoid is the same as in the first embodiment, and the ellipsoid and the person area overlap with each other, and the uppermost part of the ellipsoid is higher than the uppermost part of the person area. Also set it to a slightly higher position.
移動量算出手段42は、部位モデルのローカル座標系の原点の平行移動量とx軸、y軸及びz軸それぞれを中心とした回転量θx,θy,θzとを算出する。平行移動量はミーンシフト法により求める。 The movement amount calculation means 42 calculates the parallel movement amount of the origin of the local coordinate system of the part model and the rotation amounts θx, θy, θz about the x axis, the y axis, and the z axis, respectively. The amount of translation is determined by the mean shift method.
回転量θx,θy,θzそれぞれの計算手法は、第一の実施形態で説明した二次元の部位モデル60の回転量の計算手法を三次元に拡張したものである。第一の実施形態では、xy平面に直交する軸を回転軸とし、その回りの回転量θを求めた。その際、部位モデル60を表す楕円形の長軸を基準軸とし、重複領域の重心gを通り当該基準軸に直交する直線Pで重複領域を2つの領域を分割領域A,Bに分割し、分割領域A,Bそれぞれの重心ga,gb及び重複領域全体の重心gの並ぶ方向と基準軸の方向とのなす角をθとして求めた。これに対し本実施形態では、x,y,z軸それぞれを回転軸として選択し、当該回転軸に直交する平面(投影平面)内での回転量を求める。その際、投影平面のそれぞれにおいて楕円体である部位モデル60を回転軸方向から見た楕円形の長軸を基準軸とし、重複領域の重心gを通り当該基準軸に直交する平面Pで重複領域を2つの領域を分割領域A,Bに分割し、分割領域A,Bそれぞれの重心ga,gb及び重複領域全体の重心gを投影平面に投影した点ga’,gb’,g’の並ぶ方向と基準軸の方向とのなす角を選択した回転軸の回りの回転量とする。ここで、特に第一の実施形態との相違として、本実施形態では重複領域、分割領域は三次元の領域であり、第一の実施形態の分割直線Pに代えて分割平面Pを用いて重複領域を分割すること、及び重心g、部分重心ga,gbは三次元空間で定義される点であることが挙げられる。
The calculation methods for the rotation amounts θx, θy, and θz are three-dimensional extensions of the calculation method for the rotation amount of the two-
図9はRx<Ry<Rzである場合の回転軸ごとの基準軸、分割平面P、分割領域A,Bの設定規則を表形式に表した模式図である。また、図10はx軸を回転軸とした場合の回転量の求め方を説明する模式図であり、図10(a)は部位モデル60及び分割平面Pの斜視図、図10(b)はx軸方向からの投影図である。同様に図11はy軸を回転軸とした場合、また図12はz軸を回転軸とした場合の回転量の求め方をそれぞれ説明する模式図である。なお、図10〜図12では人物領域は表示を省略し、また、部位モデル60と人物領域との重複領域にハッチングを付している。
FIG. 9 is a schematic diagram showing the setting rules for the reference axis, the division plane P, and the division areas A and B for each rotation axis when Rx <Ry <Rz. FIG. 10 is a schematic diagram for explaining how to obtain the rotation amount when the x axis is the rotation axis. FIG. 10A is a perspective view of the
例えば、x軸を回転軸とした場合は図10に示すように、移動量算出手段42はz軸を基準軸に設定し、分割平面Pとしてxy平面に平行な平面を重心gを通る位置に設定する。移動量算出手段42は当該分割平面Pにより設定される分割領域A,Bそれぞれの重心(部分重心)ga,gbを求め、当該部分重心ga,gbをyz平面に投影した点ga’,gb’を求める。移動量算出手段42は重複領域の慣性主軸をyz平面に投影した直線の近似としてga’,g’,gb’を通る直線を用い、当該直線と基準軸であるz軸とがなす角度を回転量θxとする。例えば、基準軸に平行で重心投影点g’を通る直線をL’とし、g’とga’とを結ぶ線分と直線L’とがなす角θa、g’とgb’とを結ぶ線分と直線L’とがなす角θbを求め、θaとθbの平均値を回転量θxとする。 For example, when the x axis is the rotation axis, as shown in FIG. 10, the movement amount calculating means 42 sets the z axis as the reference axis and sets a plane parallel to the xy plane as the division plane P at a position passing through the center of gravity g. Set. The movement amount calculating means 42 obtains centroids (partial centroids) ga and gb of the divided areas A and B set by the division plane P, and points ga ′ and gb ′ obtained by projecting the partial centroids ga and gb on the yz plane. Ask for. The movement amount calculation means 42 uses a straight line passing through ga ′, g ′, and gb ′ as an approximation of a straight line obtained by projecting the principal axis of inertia of the overlapping region onto the yz plane, and rotates the angle formed by the straight line and the reference z axis. Let it be the quantity θx. For example, let L ′ be a straight line parallel to the reference axis and passing through the center-of-gravity projection point g ′, and a line segment connecting the angles θa, g ′ and gb ′ formed by the line segment connecting g ′ and ga ′ and the straight line L ′. The angle θb formed by the straight line L ′ is obtained, and the average value of θa and θb is defined as the rotation amount θx.
移動量算出手段42によるy軸を回転軸とした場合の回転量θy、z軸を回転軸とした場合の回転量θzの算出方法は、上述の回転量θxの算出方法から類推される通りであり説明を省略する。 The calculation method of the rotation amount θy when the movement amount calculation means 42 uses the y axis as the rotation axis and the rotation amount θz when the z axis serves as the rotation axis are as inferred from the calculation method of the rotation amount θx described above. There is no explanation.
ここで、x軸を回転軸とした場合、及びy軸を回転軸とした場合の基準軸であるz軸は部位モデル60の最小慣性モーメントを与える慣性主軸であり、この点で第一の実施形態と共通している。一方、z軸を回転軸とした場合の基準軸であるy軸は、xy平面での部位モデル60の断面の楕円形の長軸である点で第一の実施形態と共通するが、当該y軸は部位モデル60の最小慣性モーメントを与える慣性主軸ではない点で第一の実施形態と相違する。部位モデル60である楕円体においてz軸が最小慣性モーメントの慣性主軸、x軸が最大慣性モーメントの慣性主軸であり、y軸はそれらの中間の慣性モーメントを与える慣性主軸である。基本的には、x軸、y軸の回りの回転量θx,θyは部位モデル60が表す人物の身長方向を定め、z軸の回りの回転量θzは部位モデル60が表す人物の前後又は左右方向を定める。
Here, when the x-axis is the rotation axis and the y-axis is the rotation axis, the reference z-axis is the inertia main axis that gives the minimum moment of inertia of the
このように移動量算出手段42は三次元の部位モデル60が有する三つの慣性主軸のうちの二つを座標軸とする三通りの平面のそれぞれにおいて座標軸の一方を基準軸とし、基準軸に対応して推定された重複領域の慣性主軸を当該平面に投影し、回転量の当該平面と直交する軸の回りの成分を、基準軸と当該平面に投影した重複領域の慣性主軸とのなす角度に応じて算出する。これにより少ない演算量で決定論的に回転量を算出できる。
As described above, the movement amount calculation means 42 corresponds to the reference axis with one of the coordinate axes as a reference axis in each of three planes having two of the three principal axes of inertia of the three-
なお、第一の実施形態で述べたθの算出方法の変形例は本実施形態においても適用できる。 Note that the modified example of the θ calculation method described in the first embodiment can also be applied to this embodiment.
本実施形態も第一の実施形態で述べたように、部位モデル60の人物領域62に対する好適な姿勢の探索が効率的に行われる効果が得られる。ちなみに、反復演算に従来手法である最急降下法を用いて部位モデルの好適な位置を求めることができるが、当該手法は、三次元空間での並進と回転とを合わせた六つの自由度ごとの部位モデルの姿勢パラメータのそれぞれに対して、部位モデルと人物領域との一致度の勾配を求めることでパラメータの修正量を求めるものであり、勾配の計算のコストが高い。本実施形態及び第一の実施形態により説明した本発明は、このような高計算コストの勾配計算を必要としないので、当該従来手法に比べて位置合わせの速度が向上し得る。
As described in the first embodiment, this embodiment also has an effect of efficiently searching for a suitable posture with respect to the
配置更新手段43は、移動量算出手段42で求めた平行移動量及び回転量に従い部位モデル60の位置・姿勢を修正する。ここで、部位モデル60の慣性主軸を直線ga−gbのように重複領域に設定される目標軸に合わせる回転操作を上述のようにx,y,z各軸の回りの回転量θx,θy,θzに分解すると誤差が生じ得る。つまり、x,y,z各軸の回りに回転量θx,θy,θzずつ回転させても部位モデル60の慣性主軸は重複領域の目標軸に一般には完全に一致しない。しかし、反復処理により部位モデル60の姿勢を好適な向きに収束させることができる。なお、回転を行う軸の順序により最終的な回転結果に差が生じ得る。この点を考慮して、回転を行う軸の順序は反復処理中には一定に保つ。例えば、x軸、y軸、z軸の順番に回転することとする。すなわち、はじめにx軸の回りに回転し(ローカル座標系のy軸及びz軸がx軸を中心に回転する)、その結果の座標系に対して次にy軸の回りに回転し(ローカル座標系のx軸、z軸がy軸を中心に回転する)、さらにその結果の座標系に対してz軸の回りに回転する(ローカル座標系のx軸、y軸がz軸を中心に回転する)。
The
なお、平行移動の操作と回転の操作との順序に関しては、回転中心をローカル座標系の原点(楕円体中心c)とすれば、どちらを先に実行しても同じ位置・姿勢に修正される。 As for the order of the translation operation and the rotation operation, if the rotation center is the origin (ellipsoid center c) of the local coordinate system, it is corrected to the same position and orientation regardless of which is executed first. .
図13は本実施形態の姿勢推定装置1の概略の動作を示すフロー図である。背景画像撮影(ステップS50)及び撮影(ステップS52)は複数のカメラそれぞれについて行われる。各カメラでのそれらの処理は第一の実施形態のステップS2,S4と基本的に同じである。
FIG. 13 is a flowchart showing a schematic operation of the
第一の実施形態の人物領域抽出処理(ステップS6)では監視画像と背景画像との差分画像を生成し、これを二次元の処理対象空間として設定したのに対し、本実施形態の人物領域抽出処理(ステップS54)は三次元の処理対象空間を設定する。具体的には、対象物領域抽出手段40はカメラごとに、ステップS50にて撮影され記憶部3に保存された背景画像と、ステップS52にて撮影された監視画像とから差分画像を生成し、当該カメラごとの差分画像を逆投影して、視体積交差法により三次元の人物領域を生成し、また当該人物領域が配置された三次元の処理対象空間を設定する(ステップS54)。
In the human region extraction process (step S6) of the first embodiment, a difference image between the monitoring image and the background image is generated and set as a two-dimensional processing target space, whereas the human region extraction of this embodiment is performed. In the processing (step S54), a three-dimensional processing target space is set. Specifically, the object
位置合わせ装置10は部位モデル情報300を記憶手段30から読み出し、初期配置手段41により当該部位モデル情報300が表す部位モデル60を人物領域に基づいて設定される初期位置に配置して(ステップS56)、当該部位モデル60の配置を反復的に更新する位置合わせ処理(ステップS58〜S64)を行う。
The
当該反復処理では、移動量算出手段42が現在の部位モデル60と人物領域との重複領域に基づいて上述のように部位モデル60の平行移動量及び回転量を算出し(ステップS58)、配置更新手段43が移動量算出手段42の算出結果に基づいて部位モデル60の中心c及び向きを更新し部位モデル情報300に記憶する(ステップS60)。本実施形態では部位モデル60の向きは、回転量として算出されたθx,θy,θzだけxyz各軸の回りについて変更される。
In the iterative process, the movement amount calculation means 42 calculates the parallel movement amount and the rotation amount of the
反復制御手段44は配置更新手段43による一回の更新処理が完了するごとに、反復処理の終了条件が満たされたか否かを判断し(ステップS62)、満たされるまで移動量算出手段42及び配置更新手段43による処理(ステップS58,S60)を繰り返させる(ステップS64にて「No」の場合)。
Each time the
反復制御手段44は反復処理が終了すると(ステップS64にて「Yes」の場合)、部位モデル60の人物領域への一致度を計算する(ステップS66)。例えば、一致度として、部位モデル60の中に含まれる人物領域の体積(ボクセル数)VINを部位モデル60の体積(ボクセル数)で除した値RINを用いることができる。また、人物領域の全体の体積Vに対する部位モデル60外の残余体積(V−VIN)の比の値ROUTを、その値が小さいほど一致度が高いことを示す指標値として用いることもできる。算出された一致度を示す値は部位モデル情報300に記憶される。
When the iterative process is completed (“Yes” in step S64), the
姿勢推定手段45は人物領域の目的部位に適合した部位モデル60の配置に基づいて人物の姿勢を推定する。
The posture estimation means 45 estimates the posture of the person based on the arrangement of the
画像処理部4は監視画像が得られるたびに(ステップS52)、上述したステップS54〜S66の処理を行う。
Every time a monitoring image is obtained (step S52), the
上記各実施形態においては、人の姿勢を推定したが、対象物は人に限らず犬、猫、椅子など複数の部位から構成される種々の物体に適用できる。また、例えば、対象物を「鞄を所持した人」、部位を「鞄」とし、鞄の位置を特定するなど、姿勢推定に限らず部位の位置検出に適用することもできる。 In each of the above embodiments, the posture of a person is estimated. However, the object is not limited to a person, but can be applied to various objects including a plurality of parts such as a dog, a cat, and a chair. Further, for example, it is possible to apply not only to posture estimation but also to position detection of a part, such as specifying “the person who possesses the eyelid” as the object and “鞄” as the part and specifying the position of the eyelid.
1 姿勢推定装置、2 撮影部、3 記憶部、4 画像処理部、5 出力部、10 位置合わせ装置、30 記憶手段、40 対象物領域抽出手段、41 初期配置手段、42 移動量算出手段、43 配置更新手段、44 反復制御手段、45 姿勢推定手段、60 部位モデル、62 人物領域。
DESCRIPTION OF
Claims (5)
前記部位モデルの形状及び慣性主軸を記憶する記憶手段と、
前記部位モデルと前記対象物領域とが重複領域を生じる位置に前記部位モデルを初期配置する初期配置手段と、
前記重複領域の慣性主軸を推定して、前記部位モデルの慣性主軸の向きを前記重複領域の慣性主軸に近づける前記部位モデルの回転量を算出し、かつ前記重複領域を増加させる前記部位モデルの平行移動量を算出する移動量算出手段と、
前記部位モデルを前記回転量だけ回転させ、かつ前記平行移動量だけ平行移動させる配置更新手段と、
前記移動量算出手段及び前記配置更新手段による処理を予め定めた終了条件が満たされるまで反復させる反復制御手段と、
を有することを特徴とする位置合わせ装置。 In a two-dimensional or three-dimensional processing target space, an alignment device that aligns a part model imitating the shape of a part constituting the predetermined object with an object region from which the predetermined object is extracted,
Storage means for storing the shape and inertial principal axis of the part model;
An initial placement means for initially placing the part model at a position where the part model and the object region generate an overlapping area;
Estimating the inertial principal axis of the overlapping area, calculating the amount of rotation of the part model to bring the direction of the inertial principal axis of the part model closer to the inertial principal axis of the overlapping area, and increasing the overlap area A movement amount calculating means for calculating a movement amount;
An arrangement updating means for rotating the part model by the rotation amount and translating by the translation amount;
Repetitive control means for repeating the processing by the movement amount calculating means and the arrangement updating means until a predetermined end condition is satisfied,
An alignment apparatus comprising:
前記移動量算出手段は、三次元の前記部位モデルが有する三つの慣性主軸のうちの二つを座標軸とする三通りの平面に前記重複領域の慣性主軸を投影し、前記三通りの平面のそれぞれにおいて、前記回転量の当該平面と直交する軸の回りの成分を、当該平面の座標軸に設定された前記部位モデルの慣性主軸の一方と当該平面に投影した前記重複領域の慣性主軸とのなす角度に応じて算出すること、
を特徴とする請求項1に記載の位置合わせ装置。 The processing target space is three-dimensional,
The movement amount calculating means projects the inertial principal axes of the overlap region onto three planes having two of the three principal axes of the three-dimensional part model as coordinate axes, and each of the three planes An angle between a component of the rotation amount around an axis orthogonal to the plane and an inertia main axis of the region model set on the coordinate axis of the plane and the inertia main axis of the overlapping region projected on the plane To calculate according to
The alignment apparatus according to claim 1.
前記部位モデルと前記対象物領域とが重複領域を生じる位置に前記部位モデルを初期配置させ、
前記重複領域の慣性主軸を推定して、前記部位モデルの慣性主軸の向きを前記重複領域の慣性主軸に近づける前記部位モデルの回転量を算出し、当該回転量だけ前記部位モデルを回転させる処理、及び前記重複領域を増加させる前記部位モデルの平行移動量を算出し、当該平行移動量だけ前記部位モデルを平行移動させる処理を予め定めた終了条件が満たされるまで反復させること、
を特徴とするプログラム。 A computer performs processing for aligning a predetermined part model imitating the shape of the part constituting the predetermined object with the target object region in which the predetermined target is extracted in a two-dimensional or three-dimensional processing target space A program for causing the computer to
Initially placing the part model at a position where the part model and the object region generate an overlapping region,
A process of estimating the inertia principal axis of the overlapping region, calculating the amount of rotation of the part model that brings the direction of the inertia principal axis of the region model closer to the inertia principal axis of the overlapping region, and rotating the part model by the amount of rotation; And calculating the amount of translation of the part model for increasing the overlapping region, and repeating the process of translating the part model by the amount of translation until a predetermined end condition is satisfied,
A program characterized by
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014226966A JP6157436B2 (en) | 2014-11-07 | 2014-11-07 | Alignment apparatus and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014226966A JP6157436B2 (en) | 2014-11-07 | 2014-11-07 | Alignment apparatus and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2016091407A JP2016091407A (en) | 2016-05-23 |
| JP6157436B2 true JP6157436B2 (en) | 2017-07-05 |
Family
ID=56019760
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2014226966A Active JP6157436B2 (en) | 2014-11-07 | 2014-11-07 | Alignment apparatus and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6157436B2 (en) |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2627483B2 (en) * | 1994-05-09 | 1997-07-09 | 株式会社エイ・ティ・アール通信システム研究所 | Attitude detection apparatus and method |
| JP3401512B2 (en) * | 1999-03-26 | 2003-04-28 | 株式会社国際電気通信基礎技術研究所 | Moving object tracking device |
| JP2004354320A (en) * | 2003-05-30 | 2004-12-16 | Mitsubishi Electric Engineering Co Ltd | Recognition verification system for imaging object |
| US8135209B2 (en) * | 2005-07-19 | 2012-03-13 | Nec Corporation | Articulated object position and posture estimation device, method and program |
-
2014
- 2014-11-07 JP JP2014226966A patent/JP6157436B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2016091407A (en) | 2016-05-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6433149B2 (en) | Posture estimation apparatus, posture estimation method and program | |
| JP6370038B2 (en) | Position and orientation measurement apparatus and method | |
| JP5299231B2 (en) | Calibration device | |
| US20220198834A1 (en) | Skeleton recognition method, storage medium, and information processing device | |
| JP2019534510A5 (en) | ||
| CN110827342A (en) | Three-dimensional human body model reconstruction method, storage device, and control device | |
| CN112401369B (en) | Body parameter measurement method, system, device, chip and medium based on human body reconstruction | |
| JP2013539147A5 (en) | ||
| JP6324025B2 (en) | Information processing apparatus and information processing method | |
| CN110020600B (en) | Method for generating a data set for training a face alignment model | |
| CN111862299A (en) | Human body three-dimensional model construction method, device, robot and storage medium | |
| JP2014002033A (en) | Image process device and image process method | |
| CN111062966B (en) | Method for optimizing camera tracking based on L-M algorithm and polynomial interpolation | |
| CN106570907B (en) | Camera calibration method and device | |
| JP2015219868A (en) | Information processor, information processing method and program | |
| JP2022092528A (en) | 3D posture estimation device, method and program | |
| JP6636894B2 (en) | Camera information correction device, camera information correction method, and camera information correction program | |
| JP2021173724A (en) | Analyzer, analysis method, program, and calibration method | |
| KR102018951B1 (en) | Method for calibrating posture of lower body using wearable sensors, and computer readable medium for performing the method | |
| US20240420416A1 (en) | Method and system for three-dimensional reconstruction, and storage medium | |
| KR20190055419A (en) | Camera pose vector calibration method for generating 3d information | |
| KR102150172B1 (en) | Relative movement based motion recognition method and apparatus | |
| JP6157436B2 (en) | Alignment apparatus and program | |
| JP2003323603A (en) | Stereo matching method, three-dimensional measuring method, three-dimensional measuring device, stereo matching method program, and three-dimensional measuring program | |
| CN119048718A (en) | Augmented reality three-dimensional registration method and electronic equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160427 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170511 |
|
| 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: 20170523 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170606 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6157436 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |