JP2015197374A - Three-dimensional shape estimation device and three-dimensional shape estimation method - Google Patents
Three-dimensional shape estimation device and three-dimensional shape estimation method Download PDFInfo
- Publication number
- JP2015197374A JP2015197374A JP2014075548A JP2014075548A JP2015197374A JP 2015197374 A JP2015197374 A JP 2015197374A JP 2014075548 A JP2014075548 A JP 2014075548A JP 2014075548 A JP2014075548 A JP 2014075548A JP 2015197374 A JP2015197374 A JP 2015197374A
- Authority
- JP
- Japan
- Prior art keywords
- image data
- dimensional shape
- reproduction model
- shape estimation
- parameter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Image Processing (AREA)
- Image Generation (AREA)
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
本発明は、物体の3次元形状を推定する技術に関する。 The present invention relates to a technique for estimating a three-dimensional shape of an object.
従来、物体の3次元形状を取得する技術として、被写体にマーカを付与した状態で複数の視点から被写体を撮像し、それぞれの撮像画像中のマーカの位置関係から形状を推定する技術がある。 Conventionally, as a technique for acquiring a three-dimensional shape of an object, there is a technique for imaging a subject from a plurality of viewpoints with a marker attached to the subject, and estimating the shape from the positional relationship of the markers in each captured image.
特許文献1では、被写体に干渉縞を発生させて異なる角度から複数回撮像を行い、干渉縞を等高線とみたてることで、奥行き、即ち3次元形状を推定する技術が開示されている。
また、特許文献2では、ステッピングモータの回転角度を制御しながらビデオカメラによって被写体を撮像する。これにより得られた各回転角度ごとの画像とステッピングモータの回転角度とに基づき、被写体の表面にある特徴点の動きを検出する。検出した特徴点の動きにより被写体の回転軸を検索し、この回転軸を元にして被写体の3次元形状情報を作成する技術が開示されている。
In
しかしながら、従来技術では、カメラを複数台使用するか、あるいは、1台のカメラを移動させながら複数視点からの撮像を行う必要があった。 However, in the prior art, it is necessary to use a plurality of cameras or perform imaging from a plurality of viewpoints while moving one camera.
本発明に係る3次元形状推定装置は、物体を撮像して得られた第一の画像データを取得する第一取得手段と、前記物体の3次元形状を示すパラメータを含む再現モデルを生成する生成手段と、前記再現モデルをコンピュータグラフィックスで再現して得られた第二の画像データを取得する第二取得手段と、前記第一の画像データと前記第二の画像データとを比較することにより、前記再現モデルのパラメータを調整する調整手段とを備える。 A three-dimensional shape estimation apparatus according to the present invention generates a reproduction model including first acquisition means for acquiring first image data obtained by imaging an object and a parameter indicating the three-dimensional shape of the object Means, second acquisition means for acquiring second image data obtained by reproducing the reproduction model by computer graphics, and comparing the first image data and the second image data Adjusting means for adjusting the parameters of the reproduction model.
本発明によれば、カメラを移動させることなく、1台の撮像装置で撮像した画像から物体の3次元形状を推定することが可能となる。 According to the present invention, it is possible to estimate the three-dimensional shape of an object from an image captured by one imaging device without moving the camera.
以下、添付の図面を参照して、本発明を好適な実施例に基づいて詳細に説明する。なお、以下の実施例において示す構成は一例にすぎず、本発明は図示された構成に限定されるものではない。 Hereinafter, the present invention will be described in detail based on preferred embodiments with reference to the accompanying drawings. In addition, the structure shown in the following Examples is only an example, and this invention is not limited to the structure shown in figure.
本実施例では、非剛性の物体の3次元形状を推定する手法について記述する。なお、本実施例では、非剛性物体として紙を用いた場合の処理について説明する。非剛体物体とは、3次元形状が変化する物体のことである。 In this embodiment, a method for estimating the three-dimensional shape of a non-rigid object will be described. In the present embodiment, processing when paper is used as the non-rigid object will be described. A non-rigid object is an object whose three-dimensional shape changes.
図1は、本実施例におけるシステムの構成例を示す図である。図1(a)は、本実施例の画像処理装置を含むシステム構成例を示す図である。本システムは、3次元形状推定装置であるメイン処理装置101と、カメラ装置102とを有する。様々な計算処理や、機器制御を行うメイン処理装置101に、紙を撮像するカメラ装置102が接続されている。カメラ装置102とメイン処理装置101とは、USB線(Universal Serial Bus)で接続されている。この接続線を用いて、メイン処理装置101からカメラ装置102への撮像命令信号の送信や、カメラ装置102からメイン処理装置101への撮像画像データの送信を行う。また、本システムにおいては台座103が設置され、その上に紙104を載せることができる。 FIG. 1 is a diagram illustrating a configuration example of a system in the present embodiment. FIG. 1A is a diagram illustrating a system configuration example including the image processing apparatus according to the present exemplary embodiment. This system includes a main processing device 101 that is a three-dimensional shape estimation device and a camera device 102. A camera apparatus 102 that captures paper is connected to a main processing apparatus 101 that performs various calculation processes and device control. The camera apparatus 102 and the main processing apparatus 101 are connected by a USB line (Universal Serial Bus). Using this connection line, an imaging command signal is transmitted from the main processing apparatus 101 to the camera apparatus 102, and captured image data is transmitted from the camera apparatus 102 to the main processing apparatus 101. In this system, a pedestal 103 is installed, and a paper 104 can be placed thereon.
図1(b)は、本実施例における座標系を示した図である。台座103の中心部を原点Oとし、x,y,zの座標系を構成している。なお、座標系はメートル単位である。 FIG. 1B is a diagram showing a coordinate system in the present embodiment. The center part of the pedestal 103 is the origin O, and an x, y, z coordinate system is configured. The coordinate system is in meters.
図2は、メイン処理装置101の構成例を示すブロック図である。メイン処理装置101は、CPU201、メインメモリ202、記憶装置203、GPU204、及びカメラ入力ボード205を有する。CPU201は、演算処理や各種プログラムの実行を行う。メインメモリ202は、処理に必要なプログラム、データ、作業領域などをCPU201に提供する。記憶装置203は、各種データ、プログラムを蓄積する装置で、通常は、ハードディスクが用いられる。GPU(Graphic processing unit)204は、CG(コンピュータグラフィックス)レンダリングを行う際に用いられる。GPU204は並列演算処理に特化しているため、CPU201よりも高速にレンダリングを実行できる。カメラ入力ボード205は、USB線でカメラ装置102と接続する基盤装置で、カメラ装置102に対し各種信号命令を送信する。また、カメラ入力ボード205はカメラ装置102から撮像画像データの受信も行う。
FIG. 2 is a block diagram illustrating a configuration example of the main processing device 101. The main processing device 101 includes a
図3は、紙104を簡易モデル化した概念図である。紙104は、再現モデル301に示すように、複数の頂点と複数の頂点で形成されるポリゴンとで構成されるメッシュ構造をとる。各頂点は3次元の座標値を持っており、これらの頂点座標により、紙の大きさや形、つまり3次元形状が決まる。 FIG. 3 is a conceptual diagram in which the paper 104 is simplified. As shown in the reproduction model 301, the paper 104 has a mesh structure composed of a plurality of vertices and polygons formed by the plurality of vertices. Each vertex has a three-dimensional coordinate value, and the size and shape of the paper, that is, the three-dimensional shape is determined by these vertex coordinates.
図4は、本実施例におけるCG再現の概要を示す図である。図4(a)は、図3で説明した紙の再現モデル301を、CG上で表示する手法を説明した図である。初めに、座標系を決定する必要があるが、これは、図1(b)の座標系をそのまま用いる。つまり、台座103と同じサイズで生成した、台座モデル403の中心を原点とするxyz座標系をとる。そこに、カメラ装置102と同じ位置に、仮想カメラ401をCG空間上に設置する。このとき、仮想カメラ401の画角はカメラ装置102と同じ値にしておく。次に、台座モデル403を台座103と同じサイズでCG上に設置する。そして、紙104と同じサイズ、同じ色、同じ模様、同じコンテンツの再現モデル301を、紙104と同じ位置に、CG上に設置する。このとき、図4(b)のように、球状の頂点は描画せず、4つの頂点に囲まれた四角形を、2つのポリゴン(三角形)に分割して表示処理を行う。これにより、より紙104に近い表示が行える。カメラやモデルなどの設置が完了すると、仮想カメラ401から見た映像のレンダリング処理を行う。レンダリング処理は、以下の式1に沿って実行される。
Image = Screen( Proj * View * Pos(x,y,z) ) 式1
式1において、Pos(x,y,z)は、各モデルのxyz座標系における位置を示す。Viewは、視点変換行列であり、仮想カメラ401の位置、撮像方向を示す。ここで、仮想カメラ401の位置、撮像方向は、カメラ装置102と合わせておく。Projは、3次元から2次元への射影行列であり、仮想カメラ401の画角と、クリップ領域を示す。ここで、仮想カメラ401の画角は、カメラ装置102と合わせておく。また、クリップ領域は、前方クリップ面404と、後方クリップ面405で囲まれた台形領域を表し、この領域のみがレンダリング対象となる。Screen()は、レンダリング結果を格納する画像データに合わせて座標系を変換する。以上の操作により、仮想カメラから見た映像を、画像データに変換することができる。なお、この他にも、CG画像をより実写画像に近付ける処理として、モデルに陰影をつけるライティング処理を行っても良い。このとき、実写環境とCG空間で、光源位置を合わせることにより、より実写に近いCG画像を生成できる。
FIG. 4 is a diagram showing an outline of CG reproduction in the present embodiment. FIG. 4A is a diagram illustrating a method for displaying the paper reproduction model 301 described in FIG. 3 on the CG. First, it is necessary to determine the coordinate system, and this uses the coordinate system of FIG. 1B as it is. That is, an xyz coordinate system having the origin of the center of the base model 403 generated with the same size as the base 103 is taken. There, the virtual camera 401 is installed on the CG space at the same position as the camera device 102. At this time, the angle of view of the virtual camera 401 is set to the same value as that of the camera device 102. Next, the base model 403 is installed on the CG with the same size as the base 103. Then, a reproduction model 301 having the same size, the same color, the same pattern, and the same content as the paper 104 is set on the CG at the same position as the paper 104. At this time, as shown in FIG. 4B, a spherical vertex is not drawn, and a quadrangle surrounded by four vertices is divided into two polygons (triangles) to perform display processing. Thereby, a display closer to the paper 104 can be performed. When the installation of the camera or model is completed, the video viewed from the virtual camera 401 is rendered. The rendering process is executed according to
Image = Screen (Proj * View * Pos (x, y, z))
In
図5は、本実施例における物体の3次元形状を推定する処理を行なうブロックの一例を示す図である。メイン処理装置101は、制御部506を有する。制御部506は、実写画像データ取得部501と、再現モデル生成部502と、CG画像データ生成部503と、比較部504と、パラメータ調整部505とを有する。本実施例において図5に示す各部に対応するプログラムが記憶装置203に格納されている。CPU201及びGPU204がこれらのプログラムをメインメモリ202上で実行することで、図5に示す各部として機能させる。
FIG. 5 is a diagram illustrating an example of a block that performs processing for estimating the three-dimensional shape of an object in the present embodiment. The main processing apparatus 101 has a
図6は、本実施例におけるメイン処理装置を用いて紙の3次元形状を取得するフローを示したフローチャートである。本処理に必要なプログラム等は、あらかじめ記憶装置203からメインメモリ202に展開されており、実行待機状態にあるものとする。また、紙104のサイズは、あらかじめデータとして与えているものとする。図5のブロック図と図6のフローチャートを用いて本実施例の処理を説明する。
FIG. 6 is a flowchart showing a flow of acquiring a three-dimensional shape of paper using the main processing apparatus in the present embodiment. It is assumed that a program or the like necessary for this processing is preliminarily developed from the
ステップS601で実写画像データ取得部501は、第一の画像データとして実写画像データを取得する。例えば、制御部506はカメラ装置102に対し撮像命令を送信し、撮像を実行させる。撮像が完了すると、制御部506はカメラ装置102に対し、画像取得命令を送信し、実写画像データを受信し、メインメモリ202に展開する。実写画像データ取得部501は、メインメモリに展開された実写画像データを取得する。なお、制御部506は、カメラ装置102におけるレンズの歪みを補正するためのレンズ補正処理も合わせて行う。実写画像データ取得部501は、メインメモリに展開された実写画像データを取得する。このときの実写画像の例を図7に示す。実写画像701には、変形した紙104や、台座103が撮像されている。
In step S601, the photographed image
ステップS602で再現モデル生成部502は、紙104のサイズに合わせ、再現モデル301をメインメモリ202上に構成する。この際に、再現モデル301を構成するメッシュの頂点数と各頂点座標の初期値も決定し、メインメモリ202上に記憶させておく。
In step S <b> 602, the reproduction
ステップS603で制御部506は、実写画像データとCG画像データとの誤差に対する閾値Thをメインメモリ202に設定する。Thの値が小さいほど3次元形状の推測精度は上がるが、解が収束しない可能性が高くなる。そのため、推測処理の最大試行回数N(第二の回数)を決めておく。また、試行回数を記録する変数nをメインメモリ202に生成する。
In step S <b> 603, the
ステップS604で制御部506は、頂点座標を変更する際の最大変更回数S(第一の回数)を入力する。以下で説明するように、初期に設定した頂点座標をある程度更新しても誤差が縮まらない場合、本実施例では頂点を追加する処理を行なう。そこで、このある程度更新する際の基準として最大変更回数Sを設定する。また、頂点座標の変更回数を記録する変数sをメインメモリ202に生成する。ステップS605で制御部506は、変数nを0に初期化する。ステップS606で制御部506は、変数sを0に初期化する。
In step S604, the
ステップS607でCG画像データ生成部503は、仮想カメラ視点からの第二の画像データであるCG画像データを生成する。CG画像データ生成部503は、レンダリングに必要なデータを取得する。レンダリングに必要なデータは、図4において説明した通りであり、記憶装置203から一旦メインメモリ202に読み込まれ、GPU204に転送され、GPU204によって機能されるCG画像データ生成部503が取得する。この際に、再現モデル301における各頂点座標も取得する。その後、図4において説明したように仮想カメラ401でCGレンダリングを行い、CG画像データを生成し、メインメモリ202上に展開する。このとき、CG画像データと実写画像データの画素数を一致させておく。生成したCG画像の例を、図7に示す。CG画像702では、実写画像701と同様に変形した再現モデル301や、台座モデル403がレンダリングされている。図7に例示したように、この時点のCG画像は、3次元形状が十分に再現されていない。以下では、実写画像とCG画像との差を少なくする再現モデルのパラメータを算出することで、3次元形状を推定できるようにする。
In step S607, the CG image
ステップS608で比較部は、ステップS601で生成した実写画像701を表す実写画像データと、S607で生成したCG画像702を表すCG画像データとの誤差Eを算出する。誤差Eの算出方法としては、画像データ間の二乗誤差を算出する。前述したように、再現モデル301には、紙104と同じサイズ、同じ色、同じ模様、同じコンテンツが設定されているため、差分を計算することで誤差を評価することができる。このとき、再現モデル301の頂点部分に相当する画像領域のみの差分値を算出することで、計算時間を短縮することもできる。 In step S608, the comparison unit calculates an error E between the real image data representing the real image 701 generated in step S601 and the CG image data representing the CG image 702 generated in step S607. As a calculation method of the error E, a square error between the image data is calculated. As described above, since the same size, the same color, the same pattern, and the same content as the paper 104 are set in the reproduction model 301, the error can be evaluated by calculating the difference. At this time, the calculation time can be shortened by calculating the difference value of only the image area corresponding to the vertex portion of the reproduction model 301.
ステップS609で比較部504は、誤差Eが所定の閾値Thより小さいかどうかを判定する。YESの場合は処理を終了し、NOの場合は、ステップS610へ進む。また、試行回数nが最大試行回数Nよりも大きい場合も処理を終了する。なお、試行回数がn>Nの条件で処理が終了した場合、試行した比較結果の中で最も誤差の小さい場合の頂点座標値を推測解とする。E<Thの条件で処理が終了した場合は、そのときの頂点座標値を推測解とする。
In step S609, the
ステップS610で比較部504は、頂点座標の変更回数sが最大変更回数Sより小さいかどうかを判定する。YESの場合はステップS611へと進み、NOの場合はステップS613へと進む。ステップS611で制御部506は、頂点座標の変更回数sを1だけインクリメントする。
In step S610, the
ステップS612でパラメータ調整部505は、再現モデル301の各頂点の3次元座標に対して新たな座標値を設定して座標位置を変更し、再びステップS607へと戻る。新たな座標値は乱数などを用いて決定する。ここで、紙のサイズや面積はあらかじめデータとして与えられているため、これらを拘束条件として新たな値の設定を行う。その後、新たな座標値に基づいてCG画像データを再生成し、前述の処理を繰り返すことになる。図8に頂点座標の変更の様子を示す。頂点座標の変更回数sが増えるに従って、各頂点の3次元座標がランダムに更新されていく。図8の例では、s=10となった時に、誤差Eが閾値Thを下回っているため、ステップS609の条件式において終了条件を満たすことになる。よって、この場合の推定値は、s=10の時の各頂点の座標値となる。この各頂点の座標値が紙の3次元形状を示すパラメータである。
In step S612, the
一方、頂点座標の変更回数sが最大変更回数S以上の場合、ステップS613で制御部は、試行回数nを1だけインクリメントする。 On the other hand, if the vertex coordinate change count s is equal to or greater than the maximum change count S, the control unit increments the trial count n by 1 in step S613.
ステップS614でパラメータ調整部505は、再現モデル301に対して頂点の追加を行い、再びステップS606へと戻る。図9に頂点の追加の様子を示す。このように、例えば各頂点の間にさらに頂点を追加する形で頂点の追加を行う。追加された各頂点の座標は他の座標同様にメインメモリ202に記憶する。そして、先に説明したように、追加された頂点を含む各頂点の座標を変更して誤差が少ない頂点の座標値を求める。
In step S614, the
このように、実写画像とCG画像を比較することにより、紙の3次元形状を取得することができる。 Thus, the three-dimensional shape of the paper can be acquired by comparing the photographed image and the CG image.
なお、本実施例では、ランダムに各頂点の座標を更新しながら推定解を探索する方法について説明したが、このような方法では収束に時間がかかることが予想される。そのため、遺伝的アルゴリズムのような探索アルゴリズムを用いて、より高速に推定解を求めるような方法を用いることも可能である。例えば、遺伝的アルゴリズムでは、各頂点の座標をそれぞれ個体と捉えて遺伝子表現することによって、推定を行うことができる。 In this embodiment, the method of searching for the estimated solution while updating the coordinates of each vertex at random is described. However, it is expected that such a method takes time for convergence. Therefore, it is also possible to use a method for obtaining an estimated solution at a higher speed using a search algorithm such as a genetic algorithm. For example, in the genetic algorithm, estimation can be performed by representing the coordinates of each vertex as an individual and expressing the gene.
実施例1では、画像データの全体像を用いて誤差を評価する例を説明した。実施例2では、誤差の評価を領域ごとに行うことによって、推定時間の短縮と3次元形状データのデータサイズ削減を行う方法について説明する。なお、装置等に関しては、実施例1と同じであるため説明は省略する。 In the first embodiment, the example in which the error is evaluated using the entire image data is described. In the second embodiment, a method for reducing the estimation time and reducing the data size of the three-dimensional shape data by performing error evaluation for each region will be described. Since the apparatus and the like are the same as those in the first embodiment, description thereof is omitted.
図10は、本実施例における評価領域の設定例を示す図である。図10に示すように、再現モデル301に対し、領域A、領域B、領域C、領域Dの4つの評価領域を設定する。本実施例では、実写画像データとCG画像データとの誤差を算出する際に、この評価領域ごとに誤差を算出し、評価を行う。なお、本実施例では領域の設定数は4つとして説明するが、もちろんこれに限るものではない。他の設定数、あるいは領域分割の仕方を使用しても構わない。 FIG. 10 is a diagram illustrating an example of setting the evaluation area in the present embodiment. As shown in FIG. 10, four evaluation areas of area A, area B, area C, and area D are set for the reproduction model 301. In the present embodiment, when calculating the error between the photographed image data and the CG image data, the error is calculated for each evaluation region and evaluated. In the present embodiment, the number of set areas is described as four. However, the present invention is not limited to this. Other setting numbers or region division methods may be used.
図11は、本実施例における紙の3次元形状を取得するフローを示したフローチャートである。本処理に必要なプログラム等は、あらかじめ記憶装置203からメインメモリ202に展開されており、実行待機状態にあるものとする。また、紙104のサイズは、あらかじめデータとして与えているものとする。
FIG. 11 is a flowchart showing a flow for acquiring the three-dimensional shape of the paper in this embodiment. It is assumed that a program or the like necessary for this processing is preliminarily developed from the
ステップS1101とステップS1102とは、図6のステップS601とS602と同じであるので、説明を省略する。 Steps S1101 and S1102 are the same as steps S601 and S602 in FIG.
ステップS1103で制御部506は、紙の再現モデルに対して図10に示すように評価領域を設定する。後述するステップS1109の誤差を算出するステップでは、ここで設定した評価領域ごとに誤差の計算を行うことになる。
In step S1103, the
ステップS1104からステップS1108までの処理は、ステップS603からS607までの処理と同じであるので、説明を省略する。 Since the processing from step S1104 to step S1108 is the same as the processing from step S603 to S607, description thereof will be omitted.
ステップS1109で比較部504は、ステップS1101で生成した実写画像データと、ステップS1108で生成したCG画像データに対して、ステップS1103で設定した評価領域ごとに誤差Eiを算出する。ここで、添え字のiは、評価領域のインデックスを示している。誤差Eiの算出方法としては、評価領域に対応する部分の画像データ間の二乗誤差を算出する。実施例1において説明したように、再現モデル301には、紙104と同じサイズ、同じ色、同じ模様、同じコンテンツが設定されているため、差分を計算することで誤差を評価することができる。このとき、再現モデル301の頂点部分に相当する画像領域のみの差分値を算出することで、計算時間を短縮することもできる。
In step S1109, the
ステップS1110で比較部504は、全ての評価領域に対して、誤差Eiが閾値Thより小さいかどうかを判定する。全ての評価領域においてこの条件を満たす場合は処理を終了し、満たさない場合は、ステップS1111へ進む。また、試行回数nが最大試行回数Nよりも大きい場合も処理を終了する。なお、試行回数がn>Nの条件で処理が終了した場合、試行した中で最も誤差の小さい頂点座標値を推測解とする。Ei<Thの条件で処理が終了した場合は、そのときの頂点座標値を推測解とする。
In step S1110, the
ステップS1111で比較部504は、頂点座標の変更回数sが最大変更回数Sより小さいかどうかを判定する。YESの場合はステップS1112へと進み、NOの場合はステップS1114へと進む。ステップS1112で制御部506は、頂点座標の変更回数sを1だけインクリメントする。
In step S <b> 1111, the
ステップS1113でパラメータ調整部505は、ステップS1110において、評価領域の誤差Eiが閾値Thよりも大きかった領域に対して、再現モデル301の各頂点の3次元座標に対して新たな座標値を設定し、再びステップS1108へと戻る。ステップS1110において、評価領域の誤差Eiが閾値Thよりも小さかった領域に対しては、各頂点座標の更新は行わない。新たな座標値は例えば乱数などを用いて決定する。ここで、紙のサイズや面積はあらかじめデータとして与えられているため、これらを拘束条件として新たな値の設定を行う。頂点座標更新処理の詳細については実施例1で説明したためここでは省略する。
In step S <b> 1113, the
ステップS1114で制御部506は、試行回数nを1だけインクリメントする。ステップS1115でパラメータ調整部505は、ステップS1110において、評価領域の誤差Eiが閾値Thよりも大きかった領域に対して、再現モデル301に対して頂点の追加を行い、再びステップS606へと戻る。ステップS1110において、評価領域の誤差Eiが閾値Thよりも小さかった領域に対しては、頂点の追加処理は行わない。追加された各頂点の座標は他の座標同様にメインメモリ202に記憶する。図12は、例として領域Bの誤差が閾値Thよりも大きかった場合の、頂点の追加結果を示す図である。
In step S1114, the
このように、評価領域を設定し、領域ごとに実写画像とCG画像を比較することにより、紙の3次元形状を高速に推定し、かつ3次元形状データのデータサイズを削減することができる。 In this way, by setting an evaluation region and comparing the photographed image and the CG image for each region, the three-dimensional shape of the paper can be estimated at high speed, and the data size of the three-dimensional shape data can be reduced.
なお、実施例1でも説明したように、推定解の探索方法として、遺伝的アルゴリズムのような探索アルゴリズムを用いてもよい。 As described in the first embodiment, a search algorithm such as a genetic algorithm may be used as the estimated solution search method.
本実施例では、時間的に連続して紙が動いた際の各フレームごとの紙の3次元形状を推定する場合に、推定時間を短縮する方法について説明する。なお、装置等に関しては、実施例1と同じであるため説明は省略する。 In this embodiment, a method for shortening the estimation time when estimating the three-dimensional shape of the paper for each frame when the paper moves continuously in time will be described. Since the apparatus and the like are the same as those in the first embodiment, description thereof is omitted.
時間的に連続して紙が動いた場合の各フレーム中の紙の3次元形状は、前後のフレームと相関が非常に高いことが予想される。そこで、本実施例では、先頭のフレームの3次元形状の推定処理には実施例1または2で説明した方法を用いる。そして、それ以降のフレームの推定処理には、図13に示すように再現モデル301の初期値に1つ前のフレームの推定結果を設定するという方法をとる。これにより推定時間の短縮を図る。なお、各フレームにおいて推定された3次元形状データはメインメモリ202に記憶されているものとする。
It is expected that the three-dimensional shape of the paper in each frame when the paper moves continuously in time has a very high correlation with the previous and subsequent frames. Therefore, in the present embodiment, the method described in the first or second embodiment is used for the process of estimating the three-dimensional shape of the first frame. In the subsequent frame estimation process, as shown in FIG. 13, the estimation result of the previous frame is set as the initial value of the reproduction model 301. This shortens the estimated time. It is assumed that the three-dimensional shape data estimated in each frame is stored in the
図14は、本実施例における時間的に連続した複数フレーム中の紙の3次元形状を推定するフローを示したフローチャートである。 FIG. 14 is a flowchart showing a flow for estimating the three-dimensional shape of paper in a plurality of temporally continuous frames in the present embodiment.
ステップS1401で制御部506は、メイン処理装置101からカメラ装置102に対し撮像命令を送信し、t番目のフレーム画像の撮像を実行させる。撮像が完了すると、制御部506はカメラ装置102に画像取得命令を送信し、t番目のフレームの実写画像データを受信し、メインメモリ202に展開する。制御部506は、カメラ装置102におけるレンズの歪みを補正するためのレンズ補正処理も合わせて行う。実写画像データ取得部501はt番目のフレーム画像を実写画像データとして取得する。
In step S1401, the
ステップS1402で制御部506は、メインメモリ202から、t−1番目のフレームの3次元形状の推定結果を取得する。
In step S1402, the
ステップS1403で再現モデル生成部502は、ステップS1402で取得したt−1番目のフレームの3次元形状の推定結果を、再現モデル301の各頂点の初期値として設定し、メインメモリ202上に構成する。
In step S1403, the reproduction
これ以降のステップは、実施例1の図4のフローチャートと同様であるため、説明を省略する。 The subsequent steps are the same as those in the flowchart of FIG.
このように、1つ前のフレームの3次元形状の推定結果を再現モデルの初期値として使用することによって、時間的に連続して紙が動いた際の各フレームごとの紙の3次元形状の推定時間を短縮することができる。 In this way, by using the estimation result of the three-dimensional shape of the previous frame as the initial value of the reproduction model, the three-dimensional shape of the paper for each frame when the paper moves continuously in time. The estimation time can be shortened.
<その他の実施例>
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
<Other examples>
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.
また、本実施形態の機能を実現するためのプログラムコードを、1つのコンピュータ(CPU、MPU)で実行する場合であってもよいし、複数のコンピュータが協働することによって実行する場合であってもよい。さらに、プログラムコードをコンピュータが実行する場合であってもよいし、プログラムコードの機能を実現するための回路等のハードウェアを設けてもよい。またはプログラムコードの一部をハードウェアで実現し、残りの部分をコンピュータが実行する場合であってもよい。 Further, the program code for realizing the function of the present embodiment may be executed by one computer (CPU, MPU), or may be executed by a plurality of computers cooperating. Also good. Further, the program code may be executed by a computer, or hardware such as a circuit for realizing the function of the program code may be provided. Alternatively, a part of the program code may be realized by hardware and the remaining part may be executed by a computer.
Claims (16)
前記物体の3次元形状を示すパラメータを含む再現モデルを生成する生成手段と、
前記再現モデルをコンピュータグラフィックスで再現して得られた第二の画像データを取得する第二取得手段と、
前記第一の画像データと前記第二の画像データとを比較することにより、前記再現モデルのパラメータを調整する調整手段と
を備える3次元形状推定装置。 First acquisition means for acquiring first image data obtained by imaging an object;
Generating means for generating a reproduction model including a parameter indicating the three-dimensional shape of the object;
Second acquisition means for acquiring second image data obtained by reproducing the reproduction model by computer graphics;
An apparatus for estimating a three-dimensional shape, comprising: adjusting means for adjusting parameters of the reproduction model by comparing the first image data and the second image data.
前記調整手段は、前記第一の画像データと前記第二の画像データとの間の差が前記閾値より小さくなく、かつ、前記比較の回数が第一の回数より少ない場合、前記頂点座標の座標位置を変更し、
前記生成手段は、前記変更された座標位置で再現モデルを再生成する請求項4に記載の3次元形状推定装置。 The parameter indicates vertex coordinates,
When the difference between the first image data and the second image data is not smaller than the threshold value and the number of comparisons is less than the first number, the adjusting means is configured to adjust the coordinates of the vertex coordinates. Change the position,
The three-dimensional shape estimation apparatus according to claim 4, wherein the generation unit regenerates a reproduction model at the changed coordinate position.
前記生成手段は、前記追加された頂点座標を含む頂点座標で再現モデルを再生成する請求項5に記載の3次元形状推定装置。 When the difference between the first image data and the second image data is not smaller than the threshold and the number of comparisons is not less than the first number, the adjustment means Add the number of
The three-dimensional shape estimation apparatus according to claim 5, wherein the generation unit regenerates a reproduction model with vertex coordinates including the added vertex coordinates.
前記生成手段は、前記追加されかつ変更された頂点座標の座標位置で再現モデルを再生成する請求項6に記載の3次元形状推定装置。 The adjusting means changes the coordinate position of the added vertex coordinate,
The three-dimensional shape estimation apparatus according to claim 6, wherein the generation unit regenerates a reproduction model at a coordinate position of the added and changed vertex coordinates.
前記調整手段は、前記評価領域ごとの画像データの比較により前記評価領域ごとにパラメータを調整する請求項1から10のいずれか一項に記載の3次元形状推定装置。 A setting means for setting an evaluation region for the reproduction model is further provided,
The three-dimensional shape estimation apparatus according to any one of claims 1 to 10, wherein the adjustment unit adjusts a parameter for each evaluation region by comparing image data for each evaluation region.
t番目のフレームにおいて物体を撮像して得られた第一の画像データを取得する第一取得手段と、
t−1番目のフレームの3次元形状を示すパラメータを含む再現モデルを生成する生成手段と、
前記再現モデルをコンピュータグラフィックスで再現して得られた第二の画像データを取得する第二取得手段と、
前記第一の画像データと前記第二の画像データとを比較することにより、前記再現モデルのパラメータを調整する調整手段と
を備える3次元形状推定装置。 A three-dimensional shape estimation apparatus for estimating a three-dimensional shape of an object in a plurality of temporally continuous frames,
first acquisition means for acquiring first image data obtained by imaging an object in the t-th frame;
generating means for generating a reproduction model including a parameter indicating the three-dimensional shape of the (t-1) th frame;
Second acquisition means for acquiring second image data obtained by reproducing the reproduction model by computer graphics;
An apparatus for estimating a three-dimensional shape, comprising: adjusting means for adjusting parameters of the reproduction model by comparing the first image data and the second image data.
前記物体の3次元形状を示すパラメータを含む再現モデルを生成する生成ステップと、
前記再現モデルをコンピュータグラフィックスで再現して得られた第二の画像データを取得する第二取得ステップと、
前記第一の画像データと前記第二の画像データとを比較することにより、前記再現モデルのパラメータを調整する調整ステップと
を備える3次元形状推定方法。 A first acquisition step of acquiring first image data obtained by imaging an object;
Generating a reproduction model including a parameter indicating a three-dimensional shape of the object;
A second acquisition step of acquiring second image data obtained by reproducing the reproduction model by computer graphics;
A three-dimensional shape estimation method comprising: an adjustment step of adjusting a parameter of the reproduction model by comparing the first image data and the second image data.
t番目のフレームにおいて物体を撮像して得られた第一の画像データを取得する第一ステップと、
t−1番目のフレームの3次元形状を示すパラメータを含む再現モデルを生成する生成ステップと、
前記再現モデルをコンピュータグラフィックスで再現して得られた第二の画像データを取得する第二取得ステップと、
前記第一の画像データと前記第二の画像データとを比較することにより、前記再現モデルのパラメータを調整する調整ステップと
を備える3次元形状推定方法。 A three-dimensional shape estimation method for estimating a three-dimensional shape of an object in a plurality of temporally continuous frames,
a first step of acquiring first image data obtained by imaging an object in a t-th frame;
a generation step of generating a reproduction model including a parameter indicating the three-dimensional shape of the (t-1) th frame;
A second acquisition step of acquiring second image data obtained by reproducing the reproduction model by computer graphics;
A three-dimensional shape estimation method comprising: an adjustment step of adjusting a parameter of the reproduction model by comparing the first image data and the second image data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014075548A JP2015197374A (en) | 2014-04-01 | 2014-04-01 | Three-dimensional shape estimation device and three-dimensional shape estimation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014075548A JP2015197374A (en) | 2014-04-01 | 2014-04-01 | Three-dimensional shape estimation device and three-dimensional shape estimation method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2015197374A true JP2015197374A (en) | 2015-11-09 |
Family
ID=54547159
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014075548A Pending JP2015197374A (en) | 2014-04-01 | 2014-04-01 | Three-dimensional shape estimation device and three-dimensional shape estimation method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2015197374A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018136632A (en) * | 2017-02-20 | 2018-08-30 | オムロン株式会社 | Shape estimating apparatus |
JP2019166614A (en) * | 2018-03-26 | 2019-10-03 | ファナック株式会社 | Working system |
JP2020042503A (en) * | 2018-09-10 | 2020-03-19 | 株式会社MinD in a Device | Three-dimensional symbol generation system |
-
2014
- 2014-04-01 JP JP2014075548A patent/JP2015197374A/en active Pending
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018136632A (en) * | 2017-02-20 | 2018-08-30 | オムロン株式会社 | Shape estimating apparatus |
CN110291358A (en) * | 2017-02-20 | 2019-09-27 | 欧姆龙株式会社 | Shape estimation device |
US11036965B2 (en) | 2017-02-20 | 2021-06-15 | Omron Corporation | Shape estimating apparatus |
CN110291358B (en) * | 2017-02-20 | 2022-04-05 | 欧姆龙株式会社 | Shape estimating device |
JP2019166614A (en) * | 2018-03-26 | 2019-10-03 | ファナック株式会社 | Working system |
CN110355579A (en) * | 2018-03-26 | 2019-10-22 | 发那科株式会社 | Work system |
US10775767B2 (en) | 2018-03-26 | 2020-09-15 | Fanuc Corporation | Machining system |
JP2020042503A (en) * | 2018-09-10 | 2020-03-19 | 株式会社MinD in a Device | Three-dimensional symbol generation system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10789765B2 (en) | Three-dimensional reconstruction method | |
EP2992508B1 (en) | Diminished and mediated reality effects from reconstruction | |
US9117310B2 (en) | Virtual camera system | |
KR102387891B1 (en) | Image processing apparatus, control method of image processing apparatus, and computer-readable storage medium | |
JP2018092580A (en) | Image generator and method | |
KR101181199B1 (en) | Stereoscopic image generation method of background terrain scenes, system using the same and recording medium for the same | |
US11315313B2 (en) | Methods, devices and computer program products for generating 3D models | |
JP6921686B2 (en) | Generator, generation method, and program | |
JP2009071844A (en) | Calibration processor, calibration processing method, and computer program | |
CN112561978B (en) | Training method of depth estimation network, depth estimation method of image and equipment | |
WO2019093457A1 (en) | Information processing device, information processing method and program | |
JP2019083402A (en) | Image processing apparatus, image processing system, image processing method, and program | |
JP2019128641A (en) | Image processing device, image processing method and program | |
JP2018113683A (en) | Image processing apparatus, image processing method, and program | |
JP2015197374A (en) | Three-dimensional shape estimation device and three-dimensional shape estimation method | |
KR20140010708A (en) | Apparatus and method for generating texture for three dimensional mesh model of target object | |
WO2021161878A1 (en) | Image processing device, image processing method, method of generating learned model, and program | |
EP3723365A1 (en) | Image processing apparatus, system that generates virtual viewpoint video image, control method of image processing apparatus and storage medium | |
JP6807034B2 (en) | Image processing device and image processing method | |
JP2017199285A (en) | Information processor, information processing method, program | |
CN111033575A (en) | Image processing device, display device, image transmission device, image processing method, control program, and recording medium | |
JP2023059069A (en) | Overhead line recognition device and overhead line recognition method | |
JP7271115B2 (en) | Image processing device, background image generation method and program | |
CA3169005A1 (en) | Face mesh deformation with detailed wrinkles | |
JP2022029239A (en) | Image processing apparatus, image processing method, and program |