JP2015052986A - Three-dimensional restoration device, program, and method - Google Patents

Three-dimensional restoration device, program, and method Download PDF

Info

Publication number
JP2015052986A
JP2015052986A JP2013186260A JP2013186260A JP2015052986A JP 2015052986 A JP2015052986 A JP 2015052986A JP 2013186260 A JP2013186260 A JP 2013186260A JP 2013186260 A JP2013186260 A JP 2013186260A JP 2015052986 A JP2015052986 A JP 2015052986A
Authority
JP
Japan
Prior art keywords
dimensional
curve
control point
point group
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2013186260A
Other languages
Japanese (ja)
Inventor
ティ ズイン ティ
Di Zwin Di
ティ ズイン ティ
裕光 濱
Hiromitsu Hama
裕光 濱
匡通 森阪
Tadamichi Morisaka
匡通 森阪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Osaka University NUC
Osaka City University
Original Assignee
Osaka University NUC
Osaka City University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Osaka University NUC, Osaka City University filed Critical Osaka University NUC
Priority to JP2013186260A priority Critical patent/JP2015052986A/en
Publication of JP2015052986A publication Critical patent/JP2015052986A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a three-dimensional restoration device, program and method capable of easily performing the three-dimensional restoration of a curve from a plurality of two-dimensional images by the intuitive operation of a user.SOLUTION: A display control part 24A allows a display part to display first and second two-dimensional images. A first plotting part 24B allows a user to freely plot a first two-dimensional curve overlapped with the first two-dimensional image on the display part, and a second plotting part 24C allows the user to freely plot a second two-dimensional curve corresponding to the first two-dimensional curve overlapped with the second two-dimensional image on the display part. A first specification part 24D specifies a first control point group as the control point group of the first two-dimensional curve or its approximation curve, and a second specification part 24E specifies a second control point group as the control point group of the second two-dimensional curve or its approximation curve. A three dimensional restoration part 24F calculates the three-dimensional positions of the first and second control point groups on the basis of a correspondence relationship between the first control point group and the second control point group, and restores a three-dimensional curve on the basis of the result.

Description

本発明は、複数枚の二次元画像から曲線の三次元復元を行うための三次元復元装置、プログラム及び方法に関し、特に、二次元画像上において認識の困難な仮想線を三次元復元するのに適した三次元復元装置、プログラム及び方法に関する。   The present invention relates to a three-dimensional restoration apparatus, program, and method for three-dimensional restoration of a curve from a plurality of two-dimensional images, and more particularly to three-dimensional restoration of virtual lines that are difficult to recognize on a two-dimensional image. The present invention relates to a suitable three-dimensional restoration apparatus, program, and method.

従来より、ステレオ視の原理に基づいて、異なる角度から撮影された左右の二次元画像を用いて被写体の三次元形状を復元することが行われている。ステレオ視では、左右の二次元画像上における対応点を特定することができれば、この点の三次元座標を求めることが可能になる。また、因子分解法による三次元復元も公知であり、因子分解法でも、異なる角度から撮影された複数枚の二次元画像上における対応点が特定されることで、その点の三次元座標を求めることができる。対応点は、エッジ検出やコーナー検出法等の様々な公知の方法により、コンピュータにより特徴点として自動抽出することが可能である。また、特許文献1では、左右の二次元画像上において互いに対応する曲線上のいくつかの点をユーザに入力させることが提案されている。この方法によれば、計算負荷を下げつつ、三次元曲線を復元することができる。   Conventionally, based on the principle of stereo vision, a three-dimensional shape of a subject is restored using left and right two-dimensional images taken from different angles. In stereo viewing, if a corresponding point on the left and right two-dimensional images can be identified, the three-dimensional coordinates of this point can be obtained. In addition, three-dimensional reconstruction by factorization is also known, and even in factorization, corresponding points on a plurality of two-dimensional images taken from different angles are specified, and the three-dimensional coordinates of the points are obtained. be able to. Corresponding points can be automatically extracted as feature points by a computer by various known methods such as edge detection and corner detection. Further, Patent Document 1 proposes that a user input several points on curves corresponding to each other on the left and right two-dimensional images. According to this method, the three-dimensional curve can be restored while reducing the calculation load.

特開平11−213162号公報Japanese Patent Laid-Open No. 11-213162

しかしながら、ユーザが以上のような点を指定することが困難な場合がある。例えば、模様の少ない又は全くない滑らかな表面を持つ被写体を捉えた二次元画像であれば、ユーザは、どこに指定すべき点があるのか理解できない。勿論、このような二次元画像であれば、コンピュータによる自動抽出も困難である。具体的な例を挙げると、イルカの体長を計測しようとするときには、図1に示すような仮想線L1を三次元復元し、仮想線L1の長さを計測する方法が考えられる。しかしながら、このような仮想線L1を三次元復元すべく、二次元画像上で仮想線L1上の点をいくつか特定しようとしても、始点及び終点以外を認識することはほぼ不可能である。そうすると、結局、仮想線L1を正しく三次元復元することが困難となり、イルカの体長を計測することはできない。   However, it may be difficult for the user to designate the above points. For example, in the case of a two-dimensional image capturing a subject having a smooth surface with little or no pattern, the user cannot understand where to specify. Of course, with such a two-dimensional image, automatic extraction by a computer is also difficult. As a specific example, when the body length of a dolphin is to be measured, a method of three-dimensionally restoring the virtual line L1 as shown in FIG. 1 and measuring the length of the virtual line L1 can be considered. However, even if it is attempted to specify some points on the virtual line L1 on the two-dimensional image in order to restore such a virtual line L1 three-dimensionally, it is almost impossible to recognize other than the start point and the end point. As a result, it becomes difficult to restore the virtual line L1 correctly in three dimensions, and the body length of the dolphin cannot be measured.

本発明は、ユーザの直感的な操作により、複数枚の二次元画像から認識の困難な仮想線の三次元復元を容易に行うことが可能な三次元復元装置、プログラム及び方法を提供することを目的とする。   The present invention provides a three-dimensional restoration apparatus, program, and method capable of easily performing three-dimensional restoration of a virtual line that is difficult to recognize from a plurality of two-dimensional images by a user's intuitive operation. Objective.

本発明の第1観点に係る三次元復元装置は、表示制御部と、第1描画部と、第2描画部と、第1特定部と、第2特定部と、三次元復元部とを備える。前記表示制御部は、被写体を異なる角度から撮影することにより得られた第1二次元画像及び第2二次元画像を表示部上に表示させる。前記第1描画部は、前記表示部上で前記第1二次元画像に重ねて第1二次元曲線をユーザに自由に描画させる。前記第2描画部は、前記表示部上で前記第2二次元画像に重ねて前記第1二次元曲線に対応する第2二次元曲線をユーザに自由に描画させる。前記第1特定部は、前記第1二次元曲線又は前記第1二次元曲線の近似曲線の制御点群である第1制御点群を特定する。前記第2特定部は、前記第2二次元曲線又は前記第2二次元曲線の近似曲線の制御点群である第2制御点群を特定する。前記三次元復元部は、前記第1制御点群と前記第2制御点群との対応関係に基づいて、前記第1制御点群及び前記第2制御点群の三次元位置を求め、その結果に基づいて、三次元曲線を復元する。   A three-dimensional restoration apparatus according to a first aspect of the present invention includes a display control unit, a first drawing unit, a second drawing unit, a first specifying unit, a second specifying unit, and a three-dimensional restoring unit. . The display control unit displays a first 2D image and a second 2D image obtained by photographing the subject from different angles on the display unit. The first drawing unit allows the user to freely draw the first two-dimensional curve so as to overlap the first two-dimensional image on the display unit. The second drawing unit allows a user to freely draw a second 2D curve corresponding to the first 2D curve by overlapping the second 2D image on the display unit. The first specifying unit specifies a first control point group that is a control point group of the first two-dimensional curve or an approximate curve of the first two-dimensional curve. The second specifying unit specifies a second control point group that is a control point group of the second two-dimensional curve or an approximate curve of the second two-dimensional curve. The three-dimensional restoration unit obtains a three-dimensional position of the first control point group and the second control point group based on a correspondence relationship between the first control point group and the second control point group, and the result To restore the 3D curve.

ここでは、表示部上に二次元画像を表示するとともに、この表示部上の二次元画像に重ねて二次元曲線をユーザに自由に描画させることができる。すなわち、ユーザは、三次元復元したい曲線全体を、二次元画像上において背景の像を参考にしながら指定することができる。また、ユーザは、こうして二次元曲線を指定しながら、二次元画像上に重ねて表示されるこの二次元曲線を目で見て確認することができる。従って、ユーザは、自身の意図を正しく反映した曲線を直感的な操作により指定することができる。なお、以上の描画の操作は、異なる角度から撮影された複数枚の二次元画像に対してそれぞれ受け付けられる。   Here, a two-dimensional image can be displayed on the display unit, and a two-dimensional curve can be freely drawn on the user by superimposing the two-dimensional image on the display unit. That is, the user can specify the entire curve to be restored three-dimensionally with reference to the background image on the two-dimensional image. In addition, the user can visually confirm the two-dimensional curve displayed superimposed on the two-dimensional image while designating the two-dimensional curve in this way. Therefore, the user can specify a curve that correctly reflects his / her intention by an intuitive operation. Note that the above drawing operations are accepted for a plurality of two-dimensional images taken from different angles.

そして、複数枚の二次元画像上において互いに対応する二次元曲線が描画されると、各二次元曲線の制御点群が特定され、これらの制御点群の対応関係に基づいて、三次元曲線が復元される。なお、ユーザがフリーハンド等で二次元曲線を指定した場合には、ユーザにより描画された二次元曲線が厳密な意味では制御点を有さないので、当該二次元曲線を制御点を有する曲線に近似した後、制御点が求められる。制御点を有する曲線とは、例えば、ベジェ曲線やB−スプライン曲線等である。   Then, when two-dimensional curves corresponding to each other are drawn on a plurality of two-dimensional images, control point groups for each two-dimensional curve are specified, and based on the correspondence between these control point groups, the three-dimensional curve is Restored. When the user designates a two-dimensional curve by freehand or the like, since the two-dimensional curve drawn by the user does not have a control point in a strict sense, the two-dimensional curve is changed to a curve having a control point. After the approximation, control points are determined. The curve having control points is, for example, a Bezier curve or a B-spline curve.

以上のとおり、ここでは、二次元画像を表示する表示部上で、二次元画像に重ねて、三次元復元したい曲線全体をユーザに自由に描画させることができる。従って、ユーザは、三次元復元したい曲線を直感的な操作により自由に指定することができ、複数枚の二次元画像から曲線の三次元復元を容易に行うことができる。特に、三次元復元したい曲線が、二次元画像上において元々は存在しておらず、認識の困難な仮想線であったとしても、ここでは、このような曲線を二次元画像上において直感的に指定することができる。上述した図1のイルカの例で言うと、仮想線L1上で始点及び終点以外の点を指定することは困難であるが、仮想線L1全体であれば、背景の像及び自身の描画した線を目で見て確認しながら把握することが可能であり、仮想線L1の指定が可能になる。また、ここでは、三次元復元の対象となる部位が制御点を有する曲線により指定されるため、滑線化効果が得られ、安全性の向上や誤差に対する許容性の拡大が期待される。   As described above, here, the user can freely draw the entire curve desired to be three-dimensionally restored on the two-dimensional image on the display unit that displays the two-dimensional image. Therefore, the user can freely specify a curve to be restored three-dimensionally by intuitive operation, and can easily perform the three-dimensional restoration of a curve from a plurality of two-dimensional images. In particular, even if the curve to be restored three-dimensionally does not originally exist on the two-dimensional image and is a virtual line that is difficult to recognize, here, such a curve is intuitively displayed on the two-dimensional image. Can be specified. In the example of the dolphin in FIG. 1 described above, it is difficult to specify points other than the start point and the end point on the virtual line L1, but if the entire virtual line L1, the background image and the line drawn by itself are used. Can be grasped while visually checking, and the virtual line L1 can be designated. In addition, since the part to be subjected to the three-dimensional reconstruction is designated by a curve having control points, a smoothing effect can be obtained, and an improvement in safety and an increase in tolerance for errors are expected.

本発明の第2観点に係る三次元復元装置は、第1観点に係る三次元復元装置であって、前記三次元曲線の長さを算出する算出部をさらに備える。ここでは、複数枚の二次元画像上においてサイズの計測の対象となる曲線をユーザに自由に描画させることにより、容易に被写体のサイズを知りたい部分を指定し、これを算出することができる。特に、イルカの例のように滑らかな表面上の曲線長を算出する場合には、三次元復元の対象となる部位が制御点を有する曲線により指定される本装置では、三次元復元時に計算誤差が吸収され、精度を向上させることができる。   A three-dimensional restoration device according to a second aspect of the present invention is the three-dimensional restoration device according to the first aspect, further comprising a calculation unit that calculates the length of the three-dimensional curve. Here, by allowing a user to freely draw a curve whose size is to be measured on a plurality of two-dimensional images, it is possible to easily specify and calculate a portion where the size of the subject is to be known. In particular, when calculating the curve length on a smooth surface as in the case of dolphins, in this device in which the part to be three-dimensionally restored is specified by a curve having control points, a calculation error occurs during three-dimensional restoration. Can be absorbed and accuracy can be improved.

本発明の第3観点に係る三次元復元プログラムは、被写体を異なる角度から撮影することにより得られた第1二次元画像及び第2二次元画像を表示部上に表示させるステップと、前記表示部上の前記第1二次元画像に重ねて第1二次元曲線をユーザに自由に描画させるステップと、前記表示部上の前記第2二次元画像に重ねて前記第1二次元曲線に対応する第2二次元曲線をユーザに自由に描画させるステップと、前記第1二次元曲線又は前記第1二次元曲線の近似曲線の制御点群である第1制御点群を特定するステップと、前記第2二次元曲線又は前記第2二次元曲線の近似曲線の制御点群である第2制御点群を特定するステップと、前記第1制御点群と前記第2制御点群との対応関係に基づいて、前記第1制御点群及び前記第2制御点群の三次元位置を求め、その結果に基づいて、三次元曲線を復元するステップとをコンピュータに実行させる。ここでは、第1観点と同様の効果を奏することができる。   A three-dimensional restoration program according to a third aspect of the present invention includes a step of displaying a first 2D image and a second 2D image obtained by photographing a subject from different angles on a display unit, and the display unit A step of allowing a user to freely draw a first 2D curve superimposed on the first 2D image, and a second corresponding to the first 2D curve superimposed on the second 2D image on the display unit. A step of allowing a user to freely draw a two-dimensional curve; a step of specifying a first control point group which is a control point group of the first two-dimensional curve or an approximate curve of the first two-dimensional curve; A step of specifying a second control point group that is a control point group of a two-dimensional curve or an approximate curve of the second two-dimensional curve, and a correspondence relationship between the first control point group and the second control point group , The first control point group and the second control point group It determined the three-dimensional position, on the basis of the result, to perform the steps in the computer to restore the three-dimensional curve. Here, the same effect as the first aspect can be achieved.

本発明の第4観点に係る三次元復元プログラムは、第3観点に係る三次元復元プログラムであって、前記三次元曲線の長さを算出するステップをさらにコンピュータに実行させる。ここでは、第2観点と同様の効果を奏することができる。   A three-dimensional restoration program according to a fourth aspect of the present invention is a three-dimensional restoration program according to a third aspect, further causing a computer to execute a step of calculating the length of the three-dimensional curve. Here, the same effect as the second aspect can be achieved.

本発明の第5観点に係る三次元復元方法は、認識の困難な仮想線に沿って被写体の三次元形状を復元する方法であって、前記被写体を異なる角度から撮影することにより得られた第1二次元画像及び前記第2二次元画像をコンピュータに取り込むステップと、前記コンピュータが、前記第1二次元画像及び前記第2二次元画像を表示部上に表示させるステップと、ユーザが、前記表示部上の前記第1二次元画像に重ねて、前記仮想線をなぞるような第1二次元曲線を自由に描画し、前記第1二次元曲線を前記コンピュータに入力するステップと、ユーザが、前記表示部上の前記第2二次元画像に重ねて、前記仮想線をなぞるような第2二次元曲線を自由に描画し、前記第2二次元曲線を前記コンピュータに入力するステップと、前記コンピュータが、前記第1二次元曲線又は前記第1二次元曲線の近似曲線の制御点群である第1制御点群を特定するステップと、前記コンピュータが、前記第2二次元曲線又は前記第2二次元曲線の近似曲線の制御点群である第2制御点群を特定するステップと、前記コンピュータが、前記第1制御点群と前記第2制御点群との対応関係に基づいて、前記第1制御点群及び前記第2制御点群の三次元位置を求め、その結果に基づいて、三次元曲線を復元するステップとを備える。ここでは、第1観点と同様の効果を奏することができる。   A three-dimensional restoration method according to a fifth aspect of the present invention is a method for restoring a three-dimensional shape of a subject along a virtual line that is difficult to recognize, and is obtained by photographing the subject from different angles. A step of capturing one two-dimensional image and the second two-dimensional image into a computer; a step of causing the computer to display the first two-dimensional image and the second two-dimensional image on a display unit; A step of freely drawing a first two-dimensional curve that traces the virtual line over the first two-dimensional image on a section, and inputting the first two-dimensional curve to the computer; A step of freely drawing a second 2D curve that traces the virtual line on the second 2D image on the display unit, and inputting the second 2D curve to the computer; Specifying a first control point group that is a control point group of the first two-dimensional curve or an approximate curve of the first two-dimensional curve; and the computer, the second two-dimensional curve or the second A step of identifying a second control point group which is a control point group of an approximate curve of a two-dimensional curve, and the computer based on a correspondence relationship between the first control point group and the second control point group. Obtaining three-dimensional positions of one control point group and the second control point group, and restoring a three-dimensional curve based on the result. Here, the same effect as the first aspect can be achieved.

また、ユーザが第1二次元曲線及び第2二次元曲線を自由に描画するステップ、コンピュータが第1制御点及び第2制御点を特定するステップ、及び、コンピュータが三次元曲線を復元するステップを複数回繰り返すことで、すなわち、三次元復元の対象となる曲線を複数本に分割して処理することで、ユーザの意図をより正確に反映した曲線を再現することができる。   In addition, the user freely draws the first 2D curve and the second 2D curve, the computer specifies the first control point and the second control point, and the computer restores the 3D curve. By repeating a plurality of times, that is, by dividing and processing a curve to be subjected to three-dimensional restoration into a plurality of lines, a curve that more accurately reflects the user's intention can be reproduced.

本発明の第6観点に係る三次元復元方法は、第5観点に係る三次元復元方法であって、 前記コンピュータが、前記三次元曲線の長さを計算するステップをさらに備える。ここでは、第2観点と同様の効果を奏することができる。   A three-dimensional restoration method according to a sixth aspect of the present invention is the three-dimensional restoration method according to the fifth aspect, wherein the computer further includes a step of calculating a length of the three-dimensional curve. Here, the same effect as the second aspect can be achieved.

本発明によれば、二次元画像を表示する表示部上で、二次元画像に重ねて、三次元復元したい曲線全体をユーザに自由に描画させることができる。従って、ユーザは、三次元復元したい曲線を直感的な操作により自由に指定することができ、複数枚の二次元画像から曲線の三次元復元を容易に行うことができる。特に、三次元復元したい曲線が、二次元画像上において元々は存在しておらず、認識の困難な仮想線であったとしても、ここでは、このような曲線を二次元画像上において直感的に指定することができる。また、ここでは、三次元復元の対象となる部位が制御点を有する曲線により指定されるため、滑線化効果が得られ、安全性の向上や誤差に対する許容性の拡大が期待される。   ADVANTAGE OF THE INVENTION According to this invention, on the display part which displays a two-dimensional image, a user can freely draw the whole curve which he wants to restore | restore three-dimensionally on a two-dimensional image. Therefore, the user can freely specify a curve to be restored three-dimensionally by intuitive operation, and can easily perform the three-dimensional restoration of a curve from a plurality of two-dimensional images. In particular, even if the curve to be restored three-dimensionally does not originally exist on the two-dimensional image and is a virtual line that is difficult to recognize, here, such a curve is intuitively displayed on the two-dimensional image. Can be specified. In addition, since the part to be subjected to the three-dimensional reconstruction is designated by a curve having control points, a smoothing effect can be obtained, and an improvement in safety and an increase in tolerance for errors are expected.

計測の対象となるイルカを示す図。The figure which shows the dolphin used as the object of a measurement. 本発明の一実施形態に係る三次元復元装置(三次元復元システム)の概略構成図。1 is a schematic configuration diagram of a three-dimensional restoration apparatus (three-dimensional restoration system) according to an embodiment of the present invention. コンピュータの概略構成図。The schematic block diagram of a computer. 三次元計測処理の流れを示すフローチャート。The flowchart which shows the flow of a three-dimensional measurement process. 二次元曲線をユーザに描画させるための描画画面を示す図。The figure which shows the drawing screen for making a user draw a two-dimensional curve. 二次元曲線が描画された描画画面を示す図。The figure which shows the drawing screen on which the two-dimensional curve was drawn. 三次元復元の原理を示す図。The figure which shows the principle of three-dimensional reconstruction. 性能評価に用いた実験設備を示す図。The figure which shows the experimental equipment used for performance evaluation. 三次元復元装置の他の用途を説明する図。The figure explaining the other use of a three-dimensional decompression | restoration apparatus.

以下、図面を参照しつつ、本発明の一実施形態に係る三次元復元装置、プログラム及び方法について説明する。   Hereinafter, a three-dimensional restoration apparatus, program, and method according to an embodiment of the present invention will be described with reference to the drawings.

<1.概略構成>
図2は、本実施形態に係る三次元復元装置である三次元復元システム1の概略構成図である。三次元復元システム1は、撮影システム10と、コンピュータ20とを備え、撮影システム10により異なる角度から撮影された複数枚の二次元画像(以下、2D画像)をコンピュータ20で処理することにより、被写体の三次元形状を復元する。具体的には、コンピュータ20は、2D画像上に認識可能に又は認識困難に捉えられた曲線の三次元復元を行うことができる。コンピュータ20は、三次元復元したい曲線全体をユーザに描画させることで、対話的にユーザの意図を把握する。
<1. Schematic configuration>
FIG. 2 is a schematic configuration diagram of a three-dimensional restoration system 1 which is a three-dimensional restoration apparatus according to the present embodiment. The three-dimensional restoration system 1 includes a photographing system 10 and a computer 20, and a plurality of two-dimensional images (hereinafter referred to as 2D images) photographed from different angles by the photographing system 10 are processed by the computer 20, whereby the subject Restore the three-dimensional shape of. Specifically, the computer 20 can perform a three-dimensional restoration of a curve captured on a 2D image so as to be recognizable or difficult to recognize. The computer 20 interactively grasps the user's intention by causing the user to draw the entire curve to be three-dimensionally restored.

本実施形態の三次元復元システム1は、水中を自由に動き回るイルカの体長を計測するのに適したシステムである。イルカの体長を計測するには、例えば、図1に示すような線L1の長さを計測する必要があるが、イルカは、模様の少ない又は全くない滑らかな体表面を有する動物である。従って、線L1は、イルカを撮影した2D画像上において、画像処理により自動抽出することが困難であり、また、元々は存在しておらず、人が目で見て認識するにも困難な仮想線である。かといって、2D画像上でこの仮想線L1を認識できるようにするために、イルカの体表面にマーカーを貼付することは実際的ではない。また、イルカに着色レーザー光線を照射しつつ2D画像を撮影することも、レーザー光線のイルカへの影響が未知であるため、できれば避けたい。この点、本実施形態の三次元復元システム1は、このような侵襲的な方法ではなく、単にイルカを撮影した複数枚の2D画像から、イルカの体長、すなわち、仮想線L1の長さを非侵襲計測することが可能である。以下、三次元復元システム1の構成及び動作について詳細に説明する。   The three-dimensional restoration system 1 of the present embodiment is a system suitable for measuring the length of a dolphin that freely moves around in water. In order to measure the body length of a dolphin, for example, it is necessary to measure the length of a line L1 as shown in FIG. 1, but the dolphin is an animal having a smooth body surface with little or no pattern. Accordingly, the line L1 is a virtual image that is difficult to automatically extract by image processing on a 2D image obtained by photographing a dolphin, is not originally present, and is difficult for a human to visually recognize. Is a line. However, it is not practical to attach a marker to the body surface of the dolphin so that the virtual line L1 can be recognized on the 2D image. Also, taking a 2D image while irradiating a colored laser beam on a dolphin is not recommended because the influence of the laser beam on the dolphin is unknown. In this respect, the three-dimensional restoration system 1 of the present embodiment is not such an invasive method, and the body length of the dolphin, that is, the length of the virtual line L1 is not determined from a plurality of 2D images obtained by simply photographing the dolphin. It is possible to measure invasively. Hereinafter, the configuration and operation of the three-dimensional restoration system 1 will be described in detail.

<2.撮影システム>
図2に示すように、撮影システム10は、水中を自由に動き回るイルカを撮影することができるように、水中に設置された防水仕様の複数台のカメラ11A,11B,・・・を備える。従って、撮影システム10は、同じシーンを様々な角度から撮影することができる。カメラ11A,11B,・・・の相対的な位置関係は既知であり、カメラ11A,11B,・・・の焦点距離も既知である。カメラ11A,11B,・・・は、ハードディスクやフラッシュメモリ等の不揮発性の記憶装置13に接続されている。
<2. Shooting system>
As shown in FIG. 2, the photographing system 10 includes a plurality of waterproof cameras 11A, 11B,... Installed in the water so as to photograph a dolphin that moves freely in the water. Therefore, the photographing system 10 can photograph the same scene from various angles. The relative positional relationship between the cameras 11A, 11B,... Is known, and the focal lengths of the cameras 11A, 11B,. The cameras 11A, 11B,... Are connected to a nonvolatile storage device 13 such as a hard disk or a flash memory.

カメラ11A,11B,・・・は、動画を撮影可能であり、これらの動画は、外部からのトリガー信号を基準として同期が取られており、通信線12を介して記憶装置13に送られる。一方、記憶装置13は、複数台のカメラ11A,11B,・・・から送られてくる複数の動画に含まれるフレームを、同期を取りながら蓄積してゆく。すなわち、記憶装置13内では、複数台のカメラ11A,11B,・・・により同時刻に撮影されたフレームどうしが、互いに関連付けられている。なお、同時刻に撮影されたフレームどうしを関連付ける方法は、これに限られず、例えば、カメラ11A,11B,・・・の設定時刻を合わせておき、各カメラで動画データに撮影時刻の情報を付加するようにしてもよい。   The cameras 11 </ b> A, 11 </ b> B,... Can take moving images, and these moving images are synchronized with reference to an external trigger signal and are sent to the storage device 13 via the communication line 12. On the other hand, the storage device 13 accumulates frames included in a plurality of moving images sent from a plurality of cameras 11A, 11B,. That is, in the storage device 13, frames taken at the same time by a plurality of cameras 11A, 11B,... Are associated with each other. Note that the method of associating frames shot at the same time is not limited to this. For example, the setting times of the cameras 11A, 11B,... You may make it do.

<3.コンピュータ>
コンピュータ20は、ハードウェアとしては、汎用のパーソナルコンピュータであり、本実施形態に係る三次元復元プログラムである三次元復元プログラム2Aがインストールされている。三次元復元プログラム2Aは、コンピュータ20に後述する処理を実行させるプログラムであり、CD−ROM、USBメモリ等のコンピュータで読み取り可能な記録媒体70から読み出され、又はインターネットやLAN等の通信ネットワークを介して別の装置からダウンロードされ、インストールされる。なお、コンピュータ20は、後述する画像処理を実行することが可能な限り、ハードウェアとしての形態は問われず、例えば、スマートフォンやPDA等の機器であってもよい。
<3. Computer>
The computer 20 is a general-purpose personal computer as hardware, and is installed with a 3D restoration program 2A which is a 3D restoration program according to the present embodiment. The three-dimensional restoration program 2A is a program for causing the computer 20 to execute processing to be described later, read from a computer-readable recording medium 70 such as a CD-ROM or USB memory, or a communication network such as the Internet or a LAN. Downloaded from another device and installed. The computer 20 is not limited to hardware as long as it can execute image processing to be described later, and may be a device such as a smartphone or a PDA.

図3に示すように、コンピュータ20は、表示部21、入力部22、記憶部23、制御部24及び通信部25を備えている。これらの部21〜25は、互いにバス線8を介して接続されており、適宜、相互に通信可能である。   As shown in FIG. 3, the computer 20 includes a display unit 21, an input unit 22, a storage unit 23, a control unit 24, and a communication unit 25. These units 21 to 25 are connected to each other via the bus line 8 and can communicate with each other as appropriate.

表示部21は、液晶ディスプレイ等の表示装置であり、後述する画面等をユーザに対し表示する。また、入力部22は、マウス、キーボード、タッチパネル及びタッチパッド等で構成されており、コンピュータ20に対するユーザからの操作を受け付ける入力装置である。   The display unit 21 is a display device such as a liquid crystal display, and displays a screen or the like to be described later to the user. The input unit 22 includes a mouse, a keyboard, a touch panel, a touch pad, and the like, and is an input device that receives an operation from the user on the computer 20.

記憶部23は、ハードディスクやフラッシュメモリ等の不揮発性の記憶装置であり、三次元復元プログラム2Aが格納されている。制御部24は、CPU、ROM及びRAM等で構成されており、記憶部23内に格納されている三次元復元プログラム2Aを読み出して実行することにより、仮想的に表示制御部24A、第1描画部24B、第2描画部24C、第1特定部24D、第2特定部24E、三次元復元部24F、算出部24G及びキャリブレーション部24Hとして動作する。各部24A〜24Hの動作の詳細については、後述する。   The storage unit 23 is a non-volatile storage device such as a hard disk or a flash memory, and stores a three-dimensional restoration program 2A. The control unit 24 includes a CPU, a ROM, a RAM, and the like, and reads and executes the three-dimensional restoration program 2A stored in the storage unit 23, thereby virtually displaying the display control unit 24A and the first drawing. The unit 24B, the second drawing unit 24C, the first specifying unit 24D, the second specifying unit 24E, the three-dimensional restoration unit 24F, the calculation unit 24G, and the calibration unit 24H operate. Details of the operation of each of the units 24A to 24H will be described later.

通信部25は、コンピュータ20をインターネットやLAN等の通信ネットワークに接続する他、ハードディスクやフラッシュメモリ等の外部記憶装置との間でデータ通信する通信インターフェースとして機能する。従って、通信部25は、記憶装置13内に蓄積されている上述の動画データを取得し、記憶部23内に取り込むことができる。   The communication unit 25 functions as a communication interface for data communication with an external storage device such as a hard disk or a flash memory, in addition to connecting the computer 20 to a communication network such as the Internet or a LAN. Therefore, the communication unit 25 can acquire the above-described moving image data stored in the storage device 13 and take it into the storage unit 23.

<4.三次元計測方法>
以下、三次元復元システム1によりイルカの体長を三次元計測する方法について、詳細に説明する。
<4. Three-dimensional measurement method>
Hereinafter, a method for three-dimensionally measuring the length of a dolphin using the three-dimensional restoration system 1 will be described in detail.

まず、カメラ11A,11B,・・・により、イルカが水中を自由に泳ぎ回る様子が動画として撮影され、記憶装置13内に保存される。その後、記憶装置13内の動画データは、コンピュータ20に取り込まれ、記憶部23内に保存される。   First, the camera 11 </ b> A, 11 </ b> B,... Is photographed as a moving image of the dolphin swimming freely in the water and stored in the storage device 13. Thereafter, the moving image data in the storage device 13 is captured by the computer 20 and stored in the storage unit 23.

以上の準備が終了すると、コンピュータ20により、図4のフローチャートに従って、三次元計測処理が実行される。まず、ユーザは、記憶部23内の動画データを表示部21上で再生し、これを見ながら、イルカの体長の計測に適した左右一対の2D画像を選択する(ステップS1)。左右一対の2D画像とは、同じタイミングで異なるカメラにより異なる角度から撮影されたフレームの対である。なお、上述したように、カメラ11A,11B,・・・により同時刻に撮影されたフレームどうしは、互いに関連付けられている。従って、ユーザの選択を容易にすべく、コンピュータ20はユーザに対し、どれが同じタイミングで撮影されたフレームであるかを示すことができる。例えば、カメラ11A,11B,・・・のそれぞれにより撮影された動画を、表示制御部24Aが表示部21上で同期を取りながら同時に再生させることで、これを示すことができる。また、ここで選択されるべき2D画像とは、典型的には図5に示すような画像であり、すなわち、イルカが身体の中心線がU字形となる体勢を取っているタイミングで、イルカ全体を概ね腹側から捉えた画像である。なお、イルカは、尾びれを背中側に折り返し、身体の中心線がS字形となる体勢を取ることもあるが、よりシンプルなU字形の体勢のシーンの画像が選択されることが好ましい。しかしながら、S字形の体勢でのイルカの2D画像からであっても、U字形の場合と同じく、体長を計測することは可能である。   When the above preparation is completed, the computer 20 executes the three-dimensional measurement process according to the flowchart of FIG. First, the user reproduces the moving image data in the storage unit 23 on the display unit 21, and selects a pair of left and right 2D images suitable for measuring the body length of the dolphin while watching this (step S1). A pair of left and right 2D images is a pair of frames taken from different angles with different cameras at the same timing. As described above, frames taken at the same time by the cameras 11A, 11B,... Are associated with each other. Accordingly, in order to facilitate the user's selection, the computer 20 can indicate to the user which are the frames taken at the same timing. For example, this can be shown by causing the display control unit 24A to simultaneously reproduce the moving images taken by the cameras 11A, 11B,... On the display unit 21 while synchronizing them. In addition, the 2D image to be selected here is typically an image as shown in FIG. 5, that is, at the timing when the dolphin is in a posture where the center line of the body is U-shaped. Is an image that is generally captured from the ventral side. The dolphin may take a posture in which the tail fin is folded back and the center line of the body is S-shaped, but it is preferable that a scene image of a simpler U-shaped posture is selected. However, even from a 2D image of a dolphin with an S-shaped posture, it is possible to measure the body length as in the case of the U-shape.

ユーザによる左右一対の2D画像の選択が終わると、表示制御部24Aは、表示部21上に図5に示すような描画画面W1を表示する(ステップS2)。描画画面W1は、ステップS1で選択された左右一対の2D画像(以下、2D画像41,42)を上下又は左右に並べて同時に表示する。   When the user finishes selecting the pair of left and right 2D images, the display control unit 24A displays a drawing screen W1 as shown in FIG. 5 on the display unit 21 (step S2). The drawing screen W1 displays a pair of left and right 2D images (hereinafter referred to as 2D images 41 and 42) selected in step S1 in the vertical and horizontal directions and displays them simultaneously.

第1描画部24Bは、描画画面W1の2D画像41上において二次元直線(以下、2D直線)及び二次元曲線(以下、2D曲線)を自由に描画する操作をユーザから受け付けている。同様に、第2描画部24Cも、描画画面W1の2D画像42上において2D直線及び2D曲線を描画する操作をユーザから受け付けている。この描画の操作は、様々な方法で実現し得るが、例えば、マウスの移動方向やタッチパッド上での指の移動方向といった、ユーザの指示した操作方向に沿って直線及び曲線が描画されるようにすることが、直感的で好ましい。また、本実施形態では、2D直線及び2D曲線は、フリーハンドで描画可能に構成されている。   The first drawing unit 24B accepts an operation for freely drawing a two-dimensional straight line (hereinafter referred to as 2D straight line) and a two-dimensional curve (hereinafter referred to as 2D curved line) on the 2D image 41 of the drawing screen W1. Similarly, the second drawing unit 24C also receives an operation for drawing a 2D straight line and a 2D curve on the 2D image 42 on the drawing screen W1 from the user. This drawing operation can be realized by various methods. For example, a straight line and a curve are drawn along the operation direction instructed by the user, such as the moving direction of the mouse or the moving direction of the finger on the touch pad. It is intuitive and preferable. In the present embodiment, the 2D straight line and the 2D curve are configured to be drawn freehand.

ユーザは、この機能を用いて、図6に示すように、2D画像41,42上のそれぞれにおいて、2D直線45,46及び2D曲線43,44を組み合わせて、イルカの体長を表す仮想線L1を描画する(ステップS3)。すなわち、殆ど変形しないイルカの頭部側では、仮想線L1を直線45,46で描画し、フレキシブルに変形する尾びれ側では、仮想線L1を曲線43,44として描画する。このとき、ユーザは、2D直線45,46どうしが互いに対応しており、また、2D曲線43,44どうしが互いに対応していることを、コンピュータ20に入力する。例えば、図6に示すように、対応する線を同じ線種で描画することで、2D画像41,42間での線43〜46の対応関係を指定することができる。以上より、ステップS3では、ユーザにより、現実世界において同じ一本の仮想線L1の、2D画像41,42上における投影線が描画されることになる。また、このとき、ユーザは、直線45,46と曲線43,44との切替点をどこにするかについては、背景の2D画像41,42に写る他の特徴点(例えば、胸びれの位置等)を参考に判断する。   Using this function, the user combines the 2D straight lines 45 and 46 and the 2D curves 43 and 44 on the 2D images 41 and 42, respectively, as shown in FIG. Drawing is performed (step S3). That is, on the head side of the dolphin that hardly deforms, the virtual line L1 is drawn as straight lines 45 and 46, and on the tail fin side that flexibly deforms, the virtual line L1 is drawn as curves 43 and 44. At this time, the user inputs to the computer 20 that the 2D straight lines 45 and 46 correspond to each other and that the 2D curves 43 and 44 correspond to each other. For example, as shown in FIG. 6, the correspondence between the lines 43 to 46 between the 2D images 41 and 42 can be specified by drawing the corresponding lines with the same line type. As described above, in step S3, the user draws a projection line on the 2D images 41 and 42 of the same virtual line L1 in the real world. At this time, the user determines where the switching points between the straight lines 45 and 46 and the curves 43 and 44 are other feature points (for example, the position of the chest fin) reflected in the background 2D images 41 and 42. Judge with reference to.

2D画像41,42上に仮想線L1は写ってはいないが、ユーザは、背景の像を参考にしながら、仮想線L1全体を描画することができる。具体的には、ユーザは、イルカの全体的な輪郭線や、胸びれ、鼻先、尾びれ等の位置を見て、仮想線L1の位置を想像しながら、2D直線45,46及び2D曲線43,44を指定する。また、描画部24B,24Cは、ユーザの指定した2D直線45,46及び2D曲線43,44を、リアルタイムに描画画面W1上の2D画像41,42に重ねて表示させる。従って、ユーザは、2D直線45,46及び2D曲線43,44を描画しながら、リアルタイムに自分の描画した線43〜46を2D画像41,42上で目で見て確認することができる。さらに、描画部24B,24Cは、ユーザにより描画された2D直線45,46及び2D曲線43,44を修正する操作もユーザから受け付けており、この修正も、リアルタイムに2D画像41,42上に反映される。従って、ユーザは、試行錯誤しながら、仮想線L1に対応する適切な2D直線45,46及び2D曲線43,44を直感的に指定することができる。   Although the virtual line L1 is not shown on the 2D images 41 and 42, the user can draw the entire virtual line L1 while referring to the background image. Specifically, the user looks at the overall outline of the dolphin and the positions of the chest fin, the tip of the nose, the tail fin, etc., and imagines the position of the virtual line L1, and the 2D straight lines 45 and 46 and the 2D curve 43 Specify 44. In addition, the drawing units 24B and 24C display the 2D straight lines 45 and 46 and 2D curves 43 and 44 specified by the user on the 2D images 41 and 42 on the drawing screen W1 in real time. Accordingly, the user can visually confirm the drawn lines 43 to 46 on the 2D images 41 and 42 in real time while drawing the 2D straight lines 45 and 46 and the 2D curves 43 and 44. Furthermore, the drawing units 24B and 24C accept operations from the user for correcting the 2D straight lines 45 and 46 and 2D curves 43 and 44 drawn by the user, and this correction is also reflected on the 2D images 41 and 42 in real time. Is done. Accordingly, the user can intuitively specify the appropriate 2D straight lines 45 and 46 and 2D curves 43 and 44 corresponding to the virtual line L1 through trial and error.

仮想線L1の描画が終了すると、処理はステップS4に進む。なお、仮想線L1の描画の終了のタイミングは、ユーザが描画画面W1上の決定ボタンB1を押す等することにより認識される。ステップS4では、第1特定部24Dが、ユーザがフリーハンドで描画した2D曲線43を二次元の3次ベジェ曲線に近似する。また、第1特定部24Dは、2D画像41内におけるこの3次ベジェ曲線の4つの制御点の二次元座標PL0=(xL0,yL0),PL1=(xL1,yL1),PL2=(xL2,yL2),PL3=(xL3,yL3)を導出する。同様に、第2特定部24Eが、ユーザがフリーハンドで描画した2D曲線44を二次元の3次ベジェ曲線に近似する。また、第2特定部24Eは、2D画像42内におけるこの3次ベジェ曲線の4つの制御点の二次元座標PR0=(xR0,yR0)PR1=(xR1,yR1),PR2=(xR2,yR2),PR3=(xR3,yR3)を導出する。なお、(PL0,PR0),(PL1,PR1),(PL2,PR2),(PL3,PR3)は、この組み合わせのとおりに異なる2D画像41,42上において互いに対応しており、(PL0,PR0)は始点、(PL3,PR3)は終点である。この対応関係は、コンピュータ20により自動的に認識される。 When the drawing of the virtual line L1 ends, the process proceeds to step S4. Note that the end timing of drawing of the virtual line L1 is recognized when the user presses the enter button B1 on the drawing screen W1. In step S4, the first specifying unit 24D approximates the 2D curve 43 drawn freehand by the user to a two-dimensional cubic Bezier curve. Further, the first specifying unit 24D has two-dimensional coordinates P L0 = (x L0 , y L0 ), P L1 = (x L1 , y L1 ) of the four control points of the cubic Bezier curve in the 2D image 41, P L2 = (x L2 , y L2 ) and P L3 = (x L3 , y L3 ) are derived. Similarly, the second specifying unit 24E approximates the 2D curve 44 drawn freehand by the user to a two-dimensional cubic Bezier curve. In addition, the second specifying unit 24E has two-dimensional coordinates P R0 = (x R0 , y R0 ) P R1 = (x R1 , y R1 ), P of the four control points of this cubic Bezier curve in the 2D image 42. R2 = ( xR2 , yR2 ) and PR3 = ( xR3 , yR3 ) are derived. Note that (P L0 , P R0 ), (P L1 , P R1 ), (P L2 , P R2 ), and (P L3 , P R3 ) correspond to each other on different 2D images 41 and 42 according to this combination. (P L0 , P R0 ) is the start point, and (P L3 , P R3 ) is the end point. This correspondence is automatically recognized by the computer 20.

具体的には、ステップS4では、まず、ベジェ曲線の始点PL0,PR0及び終点PL3,PR3が制御点として検出される。また、ベジェ曲線では、これらの始点PL0,PR0及び終点PL3,PR3における接線上にその他の制御点PL1,PR1,PL2,PR2が存在するため、この拘束条件の下で制御点PL1,PR1,PL2,PR2の座標の初期値が設定され、学習が進められる。従って、ステップS4では、高速かつ高精度に制御点PL0〜PL3,PR0〜PR3を求めることができる。 Specifically, in step S4, first, the start points P L0 and P R0 and the end points P L3 and P R3 of the Bezier curve are detected as control points. In the Bezier curve, other control points P L1 , P R1 , P L2 , and P R2 exist on the tangent lines at the start points P L0 and P R0 and the end points P L3 and P R3 . The initial values of the coordinates of the control points P L1 , P R1 , P L2 , P R2 are set and learning proceeds. Therefore, in step S4, the control points P L0 to P L3 and P R0 to P R3 can be obtained at high speed and with high accuracy.

また、本実施形態では、制御点PL1,PR1,PL2,PR2の座標の初期値は、ユーザとの対話により設定される。具体的には、特定部24D,24Eが、ユーザがフリーハンドで描画した2D曲線43,44の仮の近似曲線、及び、この仮の近似曲線の制御点を導出し、表示制御部24Aが、この仮の近似曲線及び仮の制御点を2D画像41,42上に表示させる。特定部24D,24Eは、2D画像41,42上において仮の制御点を自由に移動させる操作をユーザから受け付け、実際にユーザが点を移動させると、当該点の移動後の位置に合わせて仮の近似曲線を再計算する。再計算された仮の近似曲線は、表示制御部24Aにより、リアルタイムに2D画像41,42上に表示される。そして、ユーザは、様々な方向に仮の制御点を移動させながら、目視により自身が描画した2D曲線43,44と仮の近似曲線とが一定程度近いものになったと判断した段階で、その旨をコンピュータ20に入力する。そして、特定部24D,24Eは、この入力が行われたタイミングでの仮の制御点の位置を学習のための初期値に設定し、最終的な制御点の位置を探索する。 In the present embodiment, the initial values of the coordinates of the control points P L1 , P R1 , P L2 , P R2 are set by interaction with the user. Specifically, the specifying units 24D and 24E derive temporary approximate curves of the 2D curves 43 and 44 drawn by the user freehand and control points of the temporary approximate curves, and the display control unit 24A The temporary approximate curve and the temporary control point are displayed on the 2D images 41 and 42. The specifying units 24D and 24E receive an operation for freely moving a temporary control point on the 2D images 41 and 42 from the user, and when the user actually moves the point, the temporary unit 24D and 24E are temporarily moved according to the moved position of the point. Recalculate the approximate curve of. The recalculated temporary approximate curve is displayed on the 2D images 41 and 42 in real time by the display control unit 24A. Then, when the user determines that the 2D curves 43 and 44 drawn by himself / herself are visually approximated while moving the temporary control points in various directions, the fact is close. Is input to the computer 20. Then, the specifying units 24D and 24E set the position of the temporary control point at the timing when the input is performed as an initial value for learning, and search for the position of the final control point.

なお、イルカの体表面等の滑らかな表面に沿った曲線長が計測の対象となる場合には、あまり高次のベジェ曲線への近似を行うと、かえって精度の低下を招くことがある。従って、ステップS4では、3次ベジェ曲線への近似が行われる。低次のベジェ曲線を用いることは、被写体を滑らかな曲線でモデル化することになり、イルカの体表面等の滑らかな表面に沿った曲線長の計測に適している。   When a curve length along a smooth surface such as the body surface of a dolphin is to be measured, if the approximation to a higher order Bezier curve is performed, the accuracy may be reduced. Accordingly, in step S4, approximation to a cubic Bezier curve is performed. Using a low-order Bezier curve models a subject with a smooth curve, and is suitable for measuring a curve length along a smooth surface such as the body surface of a dolphin.

続くステップS5では、三次元復元部24Fが、2D曲線43の近似曲線である二次元の3次ベジェ曲線及び2D曲線44の近似曲線である二次元の3次ベジェ曲線を、三次元の3次ベジェ曲線(以下、3D復元曲線)に変換する。具体的には、三次元復元部24Fは、ステレオ視の原理に基づいて、3D復元曲線の4つの制御点の世界座標系(XYZ空間)での三次元座標P0=(x0,y0,z0),P1=(x1,y1,z1),P2=(x2,y2,z2),P3=(x3,y3,z3)を導出する。この三次元復元の演算は、2D画像41上の制御点PL0,PL1,PL2,PL3と2D画像42上の制御点PR0,PR1,PR2,PR3との対応関係に基づいて行われる。すなわち、P0の三次元座標は、2つの制御点PL0,PR0の二次元座標から、P1の三次元座標は、2つの制御点PL1,PR1の二次元座標から、P2の三次元座標は、2つの制御点PL2,PR2の二次元座標から、P3の三次元座標は、2つの制御点PL3,PR3の二次元座標からそれぞれ導出される。また、この三次元復元の演算には、カメラ11A,11B,・・・の相対的な位置関係及び焦点距離が用いられるが、これらの値は、記憶部23内に予め格納されているものとする。 In subsequent step S5, the three-dimensional reconstruction unit 24F converts a two-dimensional cubic Bezier curve that is an approximate curve of the 2D curve 43 and a two-dimensional cubic Bezier curve that is an approximate curve of the 2D curve 44 into a three-dimensional cubic. Convert to a Bezier curve (hereinafter referred to as 3D reconstruction curve). Specifically, the three-dimensional reconstruction unit 24F has a three-dimensional coordinate P 0 = (x 0 , y 0 ) in the world coordinate system (XYZ space) of the four control points of the 3D reconstruction curve based on the principle of stereo vision. , Z 0 ), P 1 = (x 1 , y 1 , z 1 ), P 2 = (x 2 , y 2 , z 2 ), P 3 = (x 3 , y 3 , z 3 ). This three-dimensional restoration calculation is based on the correspondence between the control points P L0 , P L1 , P L2 , and P L3 on the 2D image 41 and the control points P R0 , P R1 , P R2 , and P R3 on the 2D image 42. Based on. That is, the three-dimensional coordinates of P 0 from two control points the two-dimensional coordinates of P L0, P R0, three-dimensional coordinates of P 1 from the two dimensional coordinates of the control points P L1, P R1, P 2 Are derived from the two-dimensional coordinates of the two control points P L2 and P R2 , and the three-dimensional coordinate of P 3 is derived from the two-dimensional coordinates of the two control points P L3 and P R3 . In addition, the relative positional relationship and the focal length of the cameras 11A, 11B,... Are used for the calculation of the three-dimensional restoration, and these values are stored in the storage unit 23 in advance. To do.

ステップS5における三次元復元の詳細なアルゴリズムについて、図7を参照しつつ説明する。以下では、簡単のため、PL0=(xL0,yL0)及びPR0=(xR0,yR0)からP0=(x0,y0,z0)を算出する場合を説明するが、残りのPL1,PL2,PL3についても同様である。いま、2D画像41はカメラ11Aにより撮影されたものとし、カメラ11Aの焦点距離をf1とする。また、2D画像42はカメラ11Bにより撮影されたものとし、カメラ11Bの焦点距離をf2とする。さらに、カメラ11A,11Bの位置(より正確には、イメージセンサーの中心の位置)は、XYZ空間内で相対的に(Dx,Dy,Dz)離れているものとする。XYZ空間内の原点はどこに定めてもいいが、ここでは、カメラAの位置を原点(0,0,0)とする。この場合、XYZ空間内において、カメラ11Bの位置の座標は、(Dx,Dy,Dz)となる。なお、カメラ11Bの位置の座標を(Dx,0,0)と設定し、計算を簡単化することもできる。 A detailed algorithm of the three-dimensional restoration in step S5 will be described with reference to FIG. In the following, for simplicity, a case will be described in which P 0 = (x 0 , y 0 , z 0 ) is calculated from P L0 = (x L0 , y L0 ) and P R0 = (x R0 , y R0 ). The same applies to the remaining P L1 , P L2 , and P L3 . Now, it is assumed that the 2D image 41 is taken by the camera 11A, and the focal length of the camera 11A is f1. Further, the 2D image 42 is taken by the camera 11B, and the focal length of the camera 11B is f2. Further, it is assumed that the positions of the cameras 11A and 11B (more precisely, the position of the center of the image sensor) are relatively (Dx, Dy, Dz) apart in the XYZ space. The origin in the XYZ space may be determined anywhere, but here, the position of the camera A is the origin (0, 0, 0). In this case, in the XYZ space, the coordinates of the position of the camera 11B are (Dx, Dy, Dz). The coordinates of the position of the camera 11B can be set as (Dx, 0, 0) to simplify the calculation.

点PL0は、カメラ11Aの真正面に存在する仮想スクリーン面SC1内において、座標(xL0,yL0)の位置に投影されている。また、カメラ11Aの位置(0,0,0)から仮想スクリーン面SC1までの距離D1は、焦点距離f1から換算される。従って、三次元復元部24Fは、xL0,yL0及びf1の値に基づいて、XYZ空間内における点PL0の三次元方向ベクトル(XL0,YL0,ZL0)を算出することができる。同様に、点PR0は、カメラ11Bの真正面に存在する仮想スクリーン面SC2内において、座標(xR0,yR0)の位置に投影されている。また、カメラ11Bの位置(Dx,Dy,Dz)から仮想スクリーン面SC2までの距離D2は、焦点距離f2から換算される。従って、三次元復元部24Fは、xR0,yR0,f2,Dx,Dy及びDzの値に基づいて、XYZ空間内における点PR0の三次元方向ベクトル(XR0,YR0,ZR0)を算出することができる。 The point P L0 is projected at a position of coordinates (x L0 , y L0 ) in the virtual screen surface SC1 existing in front of the camera 11A. Further, the distance D1 from the position (0, 0, 0) of the camera 11A to the virtual screen surface SC1 is converted from the focal length f1. Therefore, the three-dimensional reconstruction unit 24F can calculate the three-dimensional direction vector (X L0 , Y L0 , Z L0 ) of the point P L0 in the XYZ space based on the values of x L0 , y L0 and f1. . Similarly, the point P R0 is projected at the position of the coordinates (x R0 , y R0 ) in the virtual screen surface SC2 existing in front of the camera 11B. Further, the distance D2 from the position (Dx, Dy, Dz) of the camera 11B to the virtual screen surface SC2 is converted from the focal length f2. Therefore, the three-dimensional reconstruction unit 24F uses the three-dimensional direction vector (X R0 , Y R0 , Z R0 ) of the point P R0 in the XYZ space based on the values of x R0 , y R0 , f2, Dx, Dy, and Dz. Can be calculated.

続いて、三次元復元部24Fは、カメラ11Aの位置(0,0,0)を始点として三次元方向ベクトルPL0=(XL0,YL0,ZL0)を持つ直線U1と、カメラ11Bの位置(Dx,Dy,Dz)を始点として三次元方向ベクトルPR1=(XR0,YR0,ZR0)を持つ直線U2とを算出する。そして、理論上は、これらの2本の直線U1,U2の交点が、点P0=(x0,y0,z0)となる。しかしながら、通常、三次元復元部24Fにより算出された直線U1,U2は、誤差によりねじれの位置にあり、交わらない。従って、ここでは、三次元復元部24Fは、直線U1,U2上の最短距離となる2点間の中点の三次元座標を算出し、これをP0=(x0,y0,z0)とする。 Subsequently, the three-dimensional reconstruction unit 24F includes a straight line U1 having a three-dimensional direction vector P L0 = (X L0 , Y L0 , Z L0 ) starting from the position (0, 0, 0) of the camera 11A and the camera 11B. A straight line U2 having a three-dimensional direction vector P R1 = (X R0 , Y R0 , Z R0 ) starting from the position (Dx, Dy, Dz) is calculated. Theoretically, the intersection of these two straight lines U1 and U2 is the point P 0 = (x 0 , y 0 , z 0 ). However, normally, the straight lines U1 and U2 calculated by the three-dimensional restoration unit 24F are in a twisted position due to an error and do not intersect. Accordingly, here, the three-dimensional reconstruction unit 24F calculates the three-dimensional coordinates of the midpoint between the two points that are the shortest distances on the straight lines U1 and U2, and this is calculated as P 0 = (x 0 , y 0 , z 0). ).

続くステップS6では、算出部24Gが、ステップS5で導出された3D復元曲線の長さを算出する。具体的には、3D復元曲線(x(t),y(t),z(t))は、ステップS5で導出された4つの制御点の三次元座標P0=(x0,y0,z0),P1=(x1,y1,z1),P2=(x2,y2,z2),P3=(x3,y3,z3)を用いて、以下のとおり表される。tは、0≦t≦1を満たす媒介変数である。
In subsequent step S6, the calculation unit 24G calculates the length of the 3D restoration curve derived in step S5. Specifically, the 3D reconstruction curve (x (t), y (t), z (t)) is obtained by using the three-dimensional coordinates P 0 = (x 0 , y 0 , 4) of the four control points derived in step S5. z 0 ), P 1 = (x 1 , y 1 , z 1 ), P 2 = (x 2 , y 2 , z 2 ), P 3 = (x 3 , y 3 , z 3 ) It is expressed as follows. t is a parameter that satisfies 0 ≦ t ≦ 1.

3D復元曲線の長さT1は、以下の式で表される。以下の積分値を算出するため、本実施形態では、シンプソン法が利用される。
The length T1 of the 3D restoration curve is expressed by the following equation. In this embodiment, the Simpson method is used to calculate the following integral value.

続くステップS7では、第1特定部24Dが、ユーザがフリーハンドで描画した2D直線45の始点PL4の二次元座標(xL4,yL4)及び終点PL5の二次元座標(xL5,yL5)を、2D画像41内において導出する。同様に、第2特定部24Eが、ユーザがフリーハンドで描画した2D直線46の始点PR4の二次元座標(xR4,yR4)及び終点PR5の二次元座標(xR5,yR5)を、2D画像42内において導出する。 In subsequent step S7, the first specifying unit 24D performs two-dimensional coordinates (x L4 , y L4 ) of the start point P L4 and 2D coordinates (x L5 , y of the end point P L5 ) of the 2D straight line 45 drawn freehand by the user. L5 ) is derived in the 2D image 41. Similarly, the second specific portion 24E is, two-dimensional coordinates of the starting point P R4 of 2D linear 46 drawn by the user freehand (x R4, y R4) and two-dimensional coordinates of the end point P R5 (x R5, y R5 ) Are derived in the 2D image 42.

続くステップS8では、三次元復元部24Fが、2D直線45,46を三次元の直線(以下、3D復元直線)に変換する。具体的には、三次元復元部24Fは、ステレオ視の原理に基づいて、3D復元曲線の始点及び終点の世界座標系(XYZ空間)での三次元座標P4=(x4,y4,z4),P5=(x5,y5,z5)を導出する。P4の三次元座標は、互いに対応する2つの始点PL4,PR4の二次元座標から、P5の三次元座標は、互いに対応する2つの終点PL5,PR5の二次元座標からそれぞれ導出される。また、この三次元復元の演算には、カメラ11A,11B,・・・の相対的な位置関係及び焦点距離が用いられる。基本的な原理は、ステップS5と同様であるため、ここでは詳細な説明を省略する。なお、ユーザが直線の終点P5と曲線の始点P0が重なるように指定していた場合には、終点P5の三次元座標の導出の演算は、省略され得る。 In subsequent step S8, the three-dimensional restoration unit 24F converts the 2D straight lines 45 and 46 into three-dimensional straight lines (hereinafter referred to as 3D restored straight lines). Specifically, the three-dimensional reconstruction unit 24F, based on the principle of stereo vision, 3D coordinates P 4 = (x 4 , y 4 , 3D) in the world coordinate system (XYZ space) of the start point and end point of the 3D reconstruction curve. z 4 ), P 5 = (x 5 , y 5 , z 5 ) is derived. Three-dimensional coordinates of P 4 from the corresponding two dimensional coordinates of the starting point P L4, P R4 together, the three-dimensional coordinates of P 5, respectively from the corresponding two dimensional coordinate of the end point P L5, P R5 together Derived. In addition, the relative positional relationship and the focal length of the cameras 11A, 11B,. Since the basic principle is the same as that in step S5, detailed description is omitted here. If the user has specified that the end point P 5 of the straight line and the start point P 0 of the curve overlap, the calculation for deriving the three-dimensional coordinates of the end point P 5 may be omitted.

続くステップS9では、算出部24Gが、ステップS8で導出された3D復元直線の長さを算出する。具体的には、3D復元直線の長さT2は、始点P4の三次元座標(x4,y4,z4)及び終点P5の三次元座標(x5,y5,z5)を用いて、以下のとおり表される。
In subsequent step S9, the calculation unit 24G calculates the length of the 3D restoration straight line derived in step S8. Specifically, the length T2 of the 3D restoration straight, three-dimensional coordinates of the start point P 4 (x 4, y 4 , z 4) and three-dimensional coordinates of the end point P 5 (x 5, y 5 , z 5) And is represented as follows:

続くステップS10では、算出部24Gが、ステップS6で算出された3D復元曲線の長さT1と、ステップS9で算出された3D復元直線の長さT2を合算することで、仮想線L1の長さを算出する。その後、仮想線L1の長さは、計算結果として記憶部23内に保存されるとともに、表示制御部24Aにより表示部21上に表示される(ステップS11)。   In the subsequent step S10, the calculating unit 24G adds the length T1 of the 3D restoration curve calculated in step S6 and the length T2 of the 3D restoration line calculated in step S9, so that the length of the virtual line L1 is obtained. Is calculated. Thereafter, the length of the virtual line L1 is stored in the storage unit 23 as a calculation result and displayed on the display unit 21 by the display control unit 24A (step S11).

<5.キャリブレーション>
以上のとおり、コンピュータ20は、描画画面W1上でユーザが任意に指定した線の三次元空間内での長さを計測することができる。コンピュータ20には、この三次元計測の精度を向上させるためのキャリブレーション機能が搭載されている。このキャリブレーションでは、三次元計測の演算に用いられるパラメータであるカメラ11A,11B,・・・の相対的な位置関係が補正される。
<5. Calibration>
As described above, the computer 20 can measure the length in the three-dimensional space of the line arbitrarily designated by the user on the drawing screen W1. The computer 20 is equipped with a calibration function for improving the accuracy of the three-dimensional measurement. In this calibration, the relative positional relationship between the cameras 11A, 11B,..., Which are parameters used for the calculation of the three-dimensional measurement, is corrected.

具体的には、カメラ11A,11B,・・・で矩形状の平板を撮影し、この画像データをコンピュータ20の記憶部23内に取り込む。そして、表示制御部24Aが、カメラ11A,11B,・・・で撮影された複数枚の画像を表示部21上に表示する。キャリブレーション部24Hは、表示部21上に表示された各画像上において、ユーザに平板の4つのコーナーの座標を指定させる。続いて、キャリブレーション部24Hは、これらの画像の中から選択される2枚の画像に対し、これらの2枚の画像を撮影した2台のカメラの相対的な位置関係を変数として、ユーザにより指定された4つのコーナーが同一平面上に乗るように最適化を行う。そして、キャリブレーション部24Hは、こうして得られた最適解を、カメラの相対的な位置関係の補正値として記憶部23内に保存する。   Specifically, a rectangular flat plate is photographed by the cameras 11A, 11B,... And the image data is taken into the storage unit 23 of the computer 20. Then, the display control unit 24A displays a plurality of images taken by the cameras 11A, 11B,. The calibration unit 24H causes the user to specify the coordinates of the four corners of the flat plate on each image displayed on the display unit 21. Subsequently, the calibration unit 24H uses the relative positional relationship between the two cameras that have captured these two images as variables for two images selected from these images. Optimization is performed so that the specified four corners are on the same plane. The calibration unit 24H stores the optimal solution thus obtained in the storage unit 23 as a correction value for the relative positional relationship of the cameras.

カメラ11A,11B,・・・の相対的な位置関係は少しずつ狂っていくことが予想されるが、定期的に以上のキャリブレーションを行うことで、三次元計測の精度を維持することができる。   Although the relative positional relationship between the cameras 11A, 11B,... Is expected to be gradually changed, the accuracy of three-dimensional measurement can be maintained by performing the above calibration periodically. .

<6.性能評価>
以上の三次元計測方法及びキャリブレーション方法の効果を評価するべく、図8に示す実験設備を用いて、以下の実験を行った。まず、2台のカメラ15,16をそれぞれの光軸A1,A2が平行になるように、水平な机上に配置した。このとき、2台のカメラ15,16の中心間距離を、メジャーで測定して50.00cmに設定した。また、全長42.00cmのフレキシブルな素材からなる棒部材を用意し、これをU字状に折り曲げ、U字部材50を作成した。そして、このU字部材50を平板上に載せて、カメラ15,16から165cm程度間隔を空けて、カメラ15,16の前に配置した。このとき、U字部材50を載せた平板を、カメラ15,16を載せた机面に対し僅かに傾くように配置した。
<6. Performance evaluation>
In order to evaluate the effects of the above three-dimensional measurement method and calibration method, the following experiment was performed using the experimental equipment shown in FIG. First, the two cameras 15 and 16 were placed on a horizontal desk so that the optical axes A1 and A2 were parallel to each other. At this time, the distance between the centers of the two cameras 15 and 16 was measured with a measure and set to 50.00 cm. Further, a bar member made of a flexible material having a total length of 42.00 cm was prepared, and this was bent into a U-shape to create a U-shaped member 50. Then, this U-shaped member 50 was placed on a flat plate and arranged in front of the cameras 15 and 16 with an interval of about 165 cm from the cameras 15 and 16. At this time, the flat plate on which the U-shaped member 50 was placed was disposed so as to be slightly inclined with respect to the desk surface on which the cameras 15 and 16 were placed.

以上の環境下で、2台のカメラ15,16によりU字部材50を撮影し、本実施形態の三次元計測方法でU字部材50の長さを三次元計測したところ、42.85cmという結果が得られた。すなわち、誤差は、42.85cm−42.00cm=0.85cm(2.0%)となった。なお、この三次元計測では、カメラ15,16の相対的な位置関係を、左右方向に50.00cm、かつ、上下方向に0.00cm離れているものとした。   Under the above environment, the U-shaped member 50 is photographed by the two cameras 15 and 16, and the length of the U-shaped member 50 is three-dimensionally measured by the three-dimensional measuring method of the present embodiment. As a result, the result is 42.85 cm. was gotten. That is, the error was 42.85 cm-42.00 cm = 0.85 cm (2.0%). In this three-dimensional measurement, the relative positional relationship between the cameras 15 and 16 is assumed to be 50.00 cm in the left and right direction and 0.00 cm in the vertical direction.

その後、本実施形態のキャリブレーション方法で、カメラ15,16の相対的な位置関係を補正した。具体的には、ホワイトボードをカメラ15,16で撮影し、得られた2枚の画像上で手作業によりホワイトボードの4つのコーナーの座標を指定した。その結果、これらのカメラの相対的な位置関係は、左右方向に49.06cm、かつ、上下方向に0.043cm離れているものとして補正された。そして、直前に行った三次元計測で用いられた2D画像及びユーザの描画した2D曲線を流用しつつ、カメラ15,16の相対的な位置関係のパラメータのみを補正後の値に変更して、U字部材50の長さを再計算したところ、42.75cmとの結果が得られた。すなわち、誤差は、42.75cm−42.00cm=0.75cm(1.8%)となり、キャリブレーションの効果が確認された。   Thereafter, the relative positional relationship between the cameras 15 and 16 was corrected by the calibration method of the present embodiment. Specifically, the whiteboard was photographed with the cameras 15 and 16, and the coordinates of the four corners of the whiteboard were designated manually on the two obtained images. As a result, the relative positional relationship between these cameras was corrected as being 49.06 cm in the left-right direction and 0.043 cm in the vertical direction. And while diverting the 2D image used in the 3D measurement performed immediately before and the 2D curve drawn by the user, only the parameters of the relative positional relationship of the cameras 15 and 16 are changed to the corrected values, When the length of the U-shaped member 50 was recalculated, a result of 42.75 cm was obtained. That is, the error was 42.75 cm-42.00 cm = 0.75 cm (1.8%), and the calibration effect was confirmed.

<7.特徴>
上記実施形態では、コンピュータ20は、表示部21上に表示される2D画像41,42に重ねて、三次元復元したい曲線L1全体をユーザに自由に描画させる。従って、ユーザは、三次元復元したい曲線L1を直感的な操作により指定することができ、複数枚の2D画像41,42から曲線L1の三次元復元を容易に行うことができる。特に、上記実施形態では、計測の対象がイルカの体長であり、三次元復元したい曲線L1が2D画像41,42上において認識の困難な仮想線であるにも関わらず、このような曲線L1を2D画像41,42上において直感的に指定することができる。
<7. Features>
In the above-described embodiment, the computer 20 overlaps the 2D images 41 and 42 displayed on the display unit 21 and allows the user to freely draw the entire curve L1 to be three-dimensionally restored. Therefore, the user can specify the curve L1 to be restored three-dimensionally by intuitive operation, and can easily perform the three-dimensional restoration of the curve L1 from the plurality of 2D images 41 and 42. In particular, in the above embodiment, the object of measurement is the body length of the dolphin, and the curve L1 to be three-dimensionally restored is a virtual line that is difficult to recognize on the 2D images 41 and 42. It can be specified intuitively on the 2D images 41 and 42.

<8.変形例>
以上、本発明の一実施形態について説明したが、本発明は上記実施形態に限定されるものではなく、その趣旨を逸脱しない限りにおいて、種々の変更が可能である。例えば、以下の変更が可能である。また、以下の変形例の要旨は、適宜組み合わせることができる。
<8. Modification>
As mentioned above, although one Embodiment of this invention was described, this invention is not limited to the said embodiment, A various change is possible unless it deviates from the meaning. For example, the following changes can be made. Moreover, the gist of the following modifications can be combined as appropriate.

<8−1>
上記実施形態では、2枚の2D画像から三次元復元を行う方法を説明した。しかしながら、3枚以上の2D画像の中から2枚の2D画像の組を複数組作成し、各組に対して2D直線及び2D曲線を三次元復元し、それぞれの結果を平均して最終結果としてもよい。また、複数枚の2D画像を同時に使用して、因子分解法により2D曲線を三次元復元してもよい。なお、因子分解法が用いられる場合には、撮影に用いられるカメラ11A,11B,・・・の相対的な位置関係が未知であってもよい。焦点距離等のその他のパラメータに関しても同様である。本発明では、複数枚の2D画像上における対応点を求めた後、この対応点を用いて三次元復元を行う方法は特に問われず、上述したステレオ視や因子分解法は、例示である。
<8-1>
In the above-described embodiment, a method for performing three-dimensional restoration from two 2D images has been described. However, two or more sets of 2D images are created from 3 or more 2D images, and 2D straight lines and 2D curves are three-dimensionally restored for each set, and the respective results are averaged as the final result. Also good. Further, a 2D curve may be restored three-dimensionally by a factorization method using a plurality of 2D images simultaneously. When the factorization method is used, the relative positional relationship between the cameras 11A, 11B,... Used for photographing may be unknown. The same applies to other parameters such as focal length. In the present invention, the method for performing the three-dimensional restoration using the corresponding points after obtaining the corresponding points on a plurality of 2D images is not particularly limited, and the above-described stereo vision and factorization method are examples.

<8−2>
2D曲線は、3次ベジェ曲線ではなく、2次ベジェ曲線に近似されてもよいし、4次以上のベジェ曲線に近似されてもよい。ただし、イルカの体表面のような滑らかな表面に沿った曲線の長さを計測するのであれば、滑線化の効果が得られるため、低次のベジェ曲線を用いることが好ましく、経験的には3次が最適である。また、ベジェ曲線でなく、B−スプライン曲線等、制御点を有する様々な曲線(パラメトリックな自由曲線)に近似するようにしてもよい。
<8-2>
The 2D curve may be approximated to a quadratic Bezier curve instead of a cubic Bezier curve, or may be approximated to a quadratic or higher order Bezier curve. However, if the length of a curve along a smooth surface such as the body surface of a dolphin is measured, it is preferable to use a low-order Bezier curve because the effect of smoothing is obtained. The third order is optimal. Further, it may be approximated to various curves (parametric free curves) having control points such as B-spline curves instead of Bezier curves.

<8−3>
上記実施形態では、直線と曲線を組み合わせて三次元復元を行ったが、曲線と曲線を組み合わせて三次元復元を行ってもよいし、1本の曲線のみを三次元復元してもよい。図4のフローチャートに示す処理は、特にイルカの体長の計測に適した処理であり、計測の対象によっては、適宜変更可能である。また、同じくイルカの体長を計測する場合であっても、必ずしも直線と曲線とを組み合わせて三次元復元を行う必要はなく、曲線と曲線を組み合わせて三次元復元を行ってもよいし、1本の曲線のみを三次元復元してもよい。また、三次元復元したい直線及び/又は曲線をユーザが複数回指定するようにしてもよいし、或いは、ユーザが入力した直線及び/又は曲線をコンピュータ20が自動的に複数本に分割するようにしてもよい。後者の例では、例えば、ユーザが1本の曲線を指定するとともに、さらに手動で分割の基準となる特徴点をコンピュータ20に指定し、それらの点の位置に基づいて、コンピュータ20がユーザの指定した曲線を自動的に複数本に分割するようにしてもよい。
<8-3>
In the above embodiment, the three-dimensional reconstruction is performed by combining a straight line and a curve. However, the three-dimensional reconstruction may be performed by combining the curve and the curve, or only one curve may be restored three-dimensionally. The process shown in the flowchart of FIG. 4 is a process particularly suitable for measuring the body length of a dolphin, and can be appropriately changed depending on the measurement target. Similarly, even when measuring the body length of a dolphin, it is not always necessary to perform a three-dimensional reconstruction by combining a straight line and a curve, and a three-dimensional reconstruction may be performed by combining a curve and a curve. Only the curve may be restored three-dimensionally. Further, the user may designate a straight line and / or curve to be restored three-dimensionally, or the computer 20 may automatically divide the straight line and / or curve input by the user into a plurality of lines. May be. In the latter example, for example, the user designates a single curve, and further manually designates feature points as a reference for division in the computer 20, and the computer 20 designates the user based on the positions of these points. The curved line may be automatically divided into a plurality of lines.

<8−4>
上記実施形態では、ユーザにフリーハンドで2D曲線を描画させるように構成されていたが、2D曲線の描画の態様はこれに限定されない。例えば、描画部24B,24Cが、ユーザの操作に応じてベジェ曲線を描画するように構成されていてもよい。この場合、ユーザの描画する2D曲線は常にベジェ曲線となるため、ユーザの描画した2D曲線をベジェ曲線に近似するステップS4における処理を省略することができる。また、この場合には、描画部24B,24Cが、ベジェ曲線を描画する時点で制御点の二次元座標を算出しているため、特定部24D,24Eは、描画部24B,24Cの算出の結果を流用して、制御点の二次元座標を特定すればよい。
<8-4>
In the above embodiment, the 2D curve is configured to be drawn freehand by the user, but the 2D curve drawing mode is not limited to this. For example, the drawing units 24B and 24C may be configured to draw a Bezier curve in accordance with a user operation. In this case, since the 2D curve drawn by the user is always a Bezier curve, the processing in step S4 for approximating the 2D curve drawn by the user to the Bezier curve can be omitted. In this case, since the drawing units 24B and 24C calculate the two-dimensional coordinates of the control points at the time of drawing the Bezier curve, the specifying units 24D and 24E obtain the calculation results of the drawing units 24B and 24C. Can be used to specify the two-dimensional coordinates of the control points.

<8−5>
上記実施形態の三次元復元システム1は、イルカの体長の計測に用いられたが、曲線のサイズ及び形状を計測する様々な場面に応用することができる。例えば、魚の生態調査に応用し、図9(A)の例のように、魚の体長や、胴回り、背びれ等の様々な部位のサイズ及び形状を三次元計測することができる。また、背びれはギザギザの輪郭線を有しているが、ユーザは、このギザギザの輪郭線に厳密に沿うことなく、背びれの長さ方向に沿った仮想線を直感的に描画することで、背びれの大まかなサイズ及び形状を計測することができる。また、背びれのとげの先端を結ぶ仮想曲線と、とげの根本を通る仮想曲線を三次元復元し、これらを比較することで、とげの長さやとげの並ぶ間隔を算出することも可能である。図9(B)には、ギザギザな輪郭線を有する葉が示されているが、この例でも同様に、葉のサイズ及び形状を計測することができる。図9(C)の例では、上の歯の下端を通る仮想曲線と下の歯の上端を通る仮想曲線とを三次元復元し、これらを比較することで、噛み合わせを評価することができる。また、このような曲線の曲率から歯並びを評価することも可能であるし、歯茎に沿って曲線を描画することで、歯茎全体の大きさを評価することもできる。このように、実際には2D画像上に存在しない仮想線を三次元復元することが可能な上記実施形態の三次元復元方法は、様々な場面に応用することができる。
<8-5>
The three-dimensional restoration system 1 of the above embodiment is used for measuring the body length of a dolphin, but can be applied to various scenes in which the size and shape of a curve are measured. For example, the present invention can be applied to a fish ecology survey, and the size and shape of various parts such as the fish body length, girth, and dorsal fin can be measured three-dimensionally as shown in the example of FIG. In addition, the dorsal fin has a jagged outline, but the user can draw a virtual line along the length of the dorsal fin, without strictly following the jagged outline, thereby providing a dorsal fin. The approximate size and shape can be measured. It is also possible to calculate the length of the thorns and the spacing between the thorns by three-dimensionally restoring the virtual curve connecting the tip of the spine thorn and the virtual curve passing through the root of the thorn and comparing them. FIG. 9B shows a leaf having a jagged outline, but in this example as well, the size and shape of the leaf can be measured. In the example of FIG. 9C, the virtual curve passing through the lower end of the upper tooth and the virtual curve passing through the upper end of the lower tooth are three-dimensionally restored, and the meshing can be evaluated by comparing them. . In addition, it is possible to evaluate the tooth arrangement from the curvature of such a curve, and it is also possible to evaluate the size of the entire gum by drawing a curve along the gum. As described above, the three-dimensional restoration method of the above embodiment that can three-dimensionally restore virtual lines that do not actually exist on the 2D image can be applied to various scenes.

また、コンピュータ20は、上記実施形態の三次元復元方法で3D復元曲線を複数本導出し、これらを比較することで、2D画像に捉えられた被写体どうしが二次元的ではなく、三次元的に類似しているか否かを判断することができる。従って、多数の画像の中から、類似した立体形状の物体を含む画像を検索することも可能である。この用途によれば、著作物の類似品や模倣品等を発見したり、工業製品のデザインのチェックを行うことができる。   In addition, the computer 20 derives a plurality of 3D restoration curves by the three-dimensional restoration method of the above-described embodiment, and compares them, so that the subjects captured in the 2D image are not two-dimensionally but three-dimensionally. It can be determined whether or not they are similar. Therefore, it is possible to search for an image including a similar three-dimensional object from a large number of images. According to this application, it is possible to find similar products or counterfeits of copyrighted works, and to check the design of industrial products.

また、上記実施形態の三次元復元方法は、曲線の長さだけでなく、曲線の集合体である曲面の面積の測定にも応用することができる。   In addition, the three-dimensional restoration method of the above embodiment can be applied not only to the measurement of the length of a curve, but also the measurement of the area of a curved surface that is an aggregate of curves.

<8−6>
上記実施形態では、キャリブレーション部24Hによりカメラ11A,11B,・・・の相対的な位置関係が補正されたが、同様の方法により、三次元計測の演算に用いられるその他のパラメータを補正してもよい。例えば、カメラ11A,11B,・・・の相対的な位置関係に代えて又は加えて、カメラ11A,11B,・・・の焦点距離やレンズ歪等を補正することができる。すなわち、キャリブレーション部24Hは、複数枚の2D画像に対し、カメラ11A,11B,・・・の焦点距離やレンズ歪等を変数として、ユーザにより指定された4つのコーナーが同一平面上に乗るように最適化を行えばよい。そして、キャリブレーション部24Hは、こうして得られた最適解を、カメラ11A,11B,・・・の焦点距離やレンズ歪等の補正値として記憶部23内に保存すればよい。
<8-6>
In the above embodiment, the relative positional relationship between the cameras 11A, 11B,... Is corrected by the calibration unit 24H, but other parameters used for the calculation of the three-dimensional measurement are corrected by the same method. Also good. For example, instead of or in addition to the relative positional relationship between the cameras 11A, 11B,..., The focal lengths, lens distortions, and the like of the cameras 11A, 11B,. That is, the calibration unit 24H makes the four corners designated by the user on the same plane with respect to a plurality of 2D images, using the focal lengths of the cameras 11A, 11B,. Can be optimized. And the calibration part 24H should just preserve | save the optimal solution obtained in this way in the memory | storage part 23 as correction values, such as a focal distance of a camera 11A, 11B, ..., and lens distortion.

<8−7>
上記実施形態では、カメラ11A,11B,・・・により動画撮影が行われたが、同期を取りながら複数枚の静止画を撮影してもよい。しかしながら、水中を自由に動き回るイルカ等を対象として三次元復元に適した複数枚の2D画像のセットを抽出するためには、動画撮影が好ましい。
<8-7>
In the above embodiment, the moving images are shot by the cameras 11A, 11B,..., But a plurality of still images may be shot while synchronizing. However, in order to extract a set of a plurality of 2D images suitable for three-dimensional reconstruction for dolphins and the like that move freely in water, moving image shooting is preferable.

1 三次元復元システム(三次元復元装置)
2A 三次元復元プログラム
11A,11B,・・・ カメラ
20 コンピュータ
21 表示部
1 Three-dimensional restoration system (three-dimensional restoration device)
2A Three-dimensional restoration program 11A, 11B, ... Camera 20 Computer 21 Display unit

Claims (6)

被写体を異なる角度から撮影することにより得られた第1二次元画像及び第2二次元画像を表示部上に表示させる表示制御部と、
前記表示部上の前記第1二次元画像に重ねて第1二次元曲線をユーザに自由に描画させる第1描画部と、
前記表示部上の前記第2二次元画像に重ねて前記第1二次元曲線に対応する第2二次元曲線をユーザに自由に描画させる第2描画部と、
前記第1二次元曲線又は前記第1二次元曲線の近似曲線の制御点群である第1制御点群を特定する第1特定部と、
前記第2二次元曲線又は前記第2二次元曲線の近似曲線の制御点群である第2制御点群を特定する第2特定部と、
前記第1制御点群と前記第2制御点群との対応関係に基づいて、前記第1制御点群及び前記第2制御点群の三次元位置を求め、その結果に基づいて、三次元曲線を復元する三次元復元部と
を備える、三次元復元装置。
A display control unit that displays on the display unit the first two-dimensional image and the second two-dimensional image obtained by photographing the subject from different angles;
A first drawing unit that allows a user to freely draw a first two-dimensional curve superimposed on the first two-dimensional image on the display unit;
A second drawing unit that allows a user to freely draw a second two-dimensional curve corresponding to the first two-dimensional curve superimposed on the second two-dimensional image on the display unit;
A first specifying unit that specifies a first control point group that is a control point group of the first two-dimensional curve or an approximate curve of the first two-dimensional curve;
A second specifying unit that specifies a second control point group that is a control point group of the second two-dimensional curve or an approximate curve of the second two-dimensional curve;
Based on the correspondence between the first control point group and the second control point group, a three-dimensional position of the first control point group and the second control point group is obtained, and based on the result, a three-dimensional curve is obtained. A three-dimensional restoration device comprising: a three-dimensional restoration unit that restores.
前記三次元曲線の長さを算出する算出部
をさらに備える、請求項1に記載の三次元復元装置。
The three-dimensional restoration apparatus according to claim 1, further comprising a calculation unit that calculates a length of the three-dimensional curve.
被写体を異なる角度から撮影することにより得られた第1二次元画像及び第2二次元画像を表示部上に表示させるステップと、
前記表示部上の前記第1二次元画像に重ねて第1二次元曲線をユーザに自由に描画させるステップと、
前記表示部上の前記第2二次元画像に重ねて前記第1二次元曲線に対応する第2二次元曲線をユーザに自由に描画させるステップと、
前記第1二次元曲線又は前記第1二次元曲線の近似曲線の制御点群である第1制御点群を特定するステップと、
前記第2二次元曲線又は前記第2二次元曲線の近似曲線の制御点群である第2制御点群を特定するステップと、
前記第1制御点群と前記第2制御点群との対応関係に基づいて、前記第1制御点群及び前記第2制御点群の三次元位置を求め、その結果に基づいて、三次元曲線を復元するステップと
をコンピュータに実行させる、三次元復元プログラム。
Displaying a first two-dimensional image and a second two-dimensional image obtained by photographing a subject from different angles on a display unit;
Allowing the user to freely draw a first 2D curve overlaid on the first 2D image on the display;
Allowing the user to freely draw a second 2D curve corresponding to the first 2D curve superimposed on the second 2D image on the display unit;
Identifying a first control point group that is a control point group of the first two-dimensional curve or an approximate curve of the first two-dimensional curve;
Identifying a second control point group which is a control point group of the second two-dimensional curve or an approximate curve of the second two-dimensional curve;
Based on the correspondence between the first control point group and the second control point group, a three-dimensional position of the first control point group and the second control point group is obtained, and based on the result, a three-dimensional curve is obtained. A three-dimensional restoration program for causing a computer to execute the step of restoring.
前記三次元曲線の長さを算出するステップ
をさらにコンピュータに実行させる、請求項3に記載の三次元復元プログラム。
The three-dimensional restoration program according to claim 3, further causing the computer to execute a step of calculating the length of the three-dimensional curve.
認識の困難な仮想線に沿って被写体の三次元形状を復元する方法であって、
前記被写体を異なる角度から撮影することにより得られた第1二次元画像及び前記第2二次元画像をコンピュータに取り込むステップと、
前記コンピュータが、前記第1二次元画像及び前記第2二次元画像を表示部上に表示させるステップと、
ユーザが、前記表示部上の前記第1二次元画像に重ねて、前記仮想線をなぞるような第1二次元曲線を自由に描画し、前記第1二次元曲線を前記コンピュータに入力するステップと、
ユーザが、前記表示部上の前記第2二次元画像に重ねて、前記仮想線をなぞるような第2二次元曲線を自由に描画し、前記第2二次元曲線を前記コンピュータに入力するステップと、
前記コンピュータが、前記第1二次元曲線又は前記第1二次元曲線の近似曲線の制御点群である第1制御点群を特定するステップと、
前記コンピュータが、前記第2二次元曲線又は前記第2二次元曲線の近似曲線の制御点群である第2制御点群を特定するステップと、
前記コンピュータが、前記第1制御点群と前記第2制御点群との対応関係に基づいて、前記第1制御点群及び前記第2制御点群の三次元位置を求め、その結果に基づいて、三次元曲線を復元するステップと
を備える、三次元復元方法。
A method for restoring a three-dimensional shape of a subject along a virtual line that is difficult to recognize,
Capturing the first two-dimensional image and the second two-dimensional image obtained by photographing the subject from different angles into a computer;
The computer displaying the first two-dimensional image and the second two-dimensional image on a display unit;
A user freely draws a first two-dimensional curve that traces the virtual line on the first two-dimensional image on the display unit, and inputs the first two-dimensional curve to the computer; ,
A user freely draws a second 2D curve that traces the virtual line on the second 2D image on the display unit, and inputs the second 2D curve to the computer; ,
The computer specifying a first control point group which is a control point group of the first two-dimensional curve or an approximate curve of the first two-dimensional curve;
The computer specifying a second control point group which is a control point group of the second two-dimensional curve or an approximate curve of the second two-dimensional curve;
The computer obtains a three-dimensional position of the first control point group and the second control point group based on a correspondence relationship between the first control point group and the second control point group, and based on the result. And a step of restoring a three-dimensional curve.
前記コンピュータが、前記三次元曲線の長さを計算するステップ
をさらに備える、
請求項5に記載の三次元復元方法。
The computer further comprises calculating a length of the three-dimensional curve;
The three-dimensional restoration method according to claim 5.
JP2013186260A 2013-09-09 2013-09-09 Three-dimensional restoration device, program, and method Pending JP2015052986A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013186260A JP2015052986A (en) 2013-09-09 2013-09-09 Three-dimensional restoration device, program, and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013186260A JP2015052986A (en) 2013-09-09 2013-09-09 Three-dimensional restoration device, program, and method

Publications (1)

Publication Number Publication Date
JP2015052986A true JP2015052986A (en) 2015-03-19

Family

ID=52701956

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013186260A Pending JP2015052986A (en) 2013-09-09 2013-09-09 Three-dimensional restoration device, program, and method

Country Status (1)

Country Link
JP (1) JP2015052986A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115375903A (en) * 2022-10-27 2022-11-22 天津大学 Method and system for obtaining reconstruction data for reconstructing teeth

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115375903A (en) * 2022-10-27 2022-11-22 天津大学 Method and system for obtaining reconstruction data for reconstructing teeth
CN115375903B (en) * 2022-10-27 2023-01-17 天津大学 Method and system for obtaining reconstruction data for reconstructing teeth

Similar Documents

Publication Publication Date Title
KR101556992B1 (en) 3d scanning system using facial plastic surgery simulation
KR101560508B1 (en) Method and arrangement for 3-dimensional image model adaptation
JP4950787B2 (en) Image processing apparatus and method
JP2015534637A5 (en)
CN107564049B (en) Faceform&#39;s method for reconstructing, device and storage medium, computer equipment
JPWO2016151691A1 (en) Image processing apparatus, image processing system, image processing method, and program
CN109740659B (en) Image matching method and device, electronic equipment and storage medium
KR101715325B1 (en) Method and system for providing Picture lay out drawings by using three dimensional scan technologies
EP4036863A1 (en) Human body model reconstruction method and reconstruction system, and storage medium
EP3756164B1 (en) Methods of modeling a 3d object, and related devices and computer program products
KR20200042781A (en) 3d model producing method and apparatus
KR101479838B1 (en) Method and apparatus for gernerating 3 dimension face image
JP2015052986A (en) Three-dimensional restoration device, program, and method
JP5307549B2 (en) Three-dimensional shape measuring method and apparatus
JP2019046096A (en) Information processing device and method thereof
JPWO2021192782A5 (en)
JP7321029B2 (en) CALIBRATION DEVICE AND ITS CONTROL METHOD, PROGRAM AND STORAGE MEDIUM
JP6545847B2 (en) Image processing apparatus, image processing method and program
JP2011118767A (en) Facial expression monitoring method and facial expression monitoring apparatus
JP6929037B2 (en) Information processing equipment, information processing methods, programs
JP2017085297A (en) Image processing apparatus, image processing method, and program
JP6458300B2 (en) Physical information acquisition device and physical information acquisition method
JP6704700B2 (en) Image processing apparatus, control method thereof, and program
JP4924747B2 (en) Standard model deformation method and modeling apparatus
JP7487266B2 (en) Image processing device, image processing method, and program