JP2009168536A - Three-dimensional shape measuring device and method, three-dimensional shape regenerating device and method, and program - Google Patents

Three-dimensional shape measuring device and method, three-dimensional shape regenerating device and method, and program Download PDF

Info

Publication number
JP2009168536A
JP2009168536A JP2008005234A JP2008005234A JP2009168536A JP 2009168536 A JP2009168536 A JP 2009168536A JP 2008005234 A JP2008005234 A JP 2008005234A JP 2008005234 A JP2008005234 A JP 2008005234A JP 2009168536 A JP2009168536 A JP 2009168536A
Authority
JP
Japan
Prior art keywords
dimensional
dimensional shape
data
dimensional data
display
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.)
Abandoned
Application number
JP2008005234A
Other languages
Japanese (ja)
Inventor
Kazu Mishiba
数 三柴
Mikio Watanabe
幹夫 渡辺
Norihisa Sudo
徳久 須藤
Tomonori Masuda
智紀 増田
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.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2008005234A priority Critical patent/JP2009168536A/en
Publication of JP2009168536A publication Critical patent/JP2009168536A/en
Abandoned legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To make a display speed and precision of a three-dimensional shape compatible when generating three-dimensional data. <P>SOLUTION: A three-dimensional data generating part 30 generates the three-dimensional data from image data obtained by imaging an object with imaging parts 21A, 21B. Then, first and second three-dimensional data different in precision are generated. For an example, the first three-dimensional data is the tree-dimensional data for display, and the second three-dimensional data is the three-dimensional data for recording. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、撮影により取得した画像データから被写体の3次元形状を表す3次元データを生成する3次元形状測定装置および方法、生成された3次元データを再生するための3次元形状再生装置および方法、並びに3次元形状測定方法および3次元形状再生方法をコンピュータに実行させるためのプログラムに関するものである。   The present invention relates to a three-dimensional shape measuring apparatus and method for generating three-dimensional data representing a three-dimensional shape of a subject from image data acquired by photographing, and a three-dimensional shape reproducing apparatus and method for reproducing the generated three-dimensional data. , And a program for causing a computer to execute a three-dimensional shape measurement method and a three-dimensional shape reproduction method.

異なる位置に設けられた2台以上のカメラを用いて被写体を撮像し、これにより取得された複数の画像(基準カメラによる基準画像および参照カメラによる参照画像)の間で対応する画素である対応点を探索し(ステレオマッチング)、互いに対応する基準画像上の画素と、参照画像上の画素との位置の差(視差)に三角測量の原理を適用することにより、基準カメラまたは参照カメラから当該画素に対応する被写体上の点までの距離を計測して、被写体の3次元形状を表す3次元データを生成する手法が提案されている(特許文献1参照)。   Corresponding points that are pixels corresponding to a plurality of images (a reference image by a reference camera and a reference image by a reference camera) obtained by capturing an image of a subject using two or more cameras provided at different positions (Stereo matching) and applying the triangulation principle to the position difference (parallax) between the corresponding pixel on the reference image and the pixel on the reference image, the pixel from the reference camera or reference camera A method has been proposed in which the distance to a point on the subject corresponding to is measured to generate three-dimensional data representing the three-dimensional shape of the subject (see Patent Document 1).

このような手法においては、3次元データにより被写体の3次元形状を仮想的な2次元平面に投影して、メッシュモデルやボリュームモデル等の3次元画像として表すことができ、また必要に応じて3次元形状を回転、移動したり、ズーム倍率を変更したりして、3次元形状の仮想的な視点も指定できるため、被写体の3次元形状を認識することが容易となる。
特開2005−17262号公報
In such a method, a three-dimensional shape of a subject can be projected on a virtual two-dimensional plane using three-dimensional data, and can be represented as a three-dimensional image such as a mesh model or a volume model. Since the virtual viewpoint of the three-dimensional shape can be specified by rotating and moving the three-dimensional shape or changing the zoom magnification, it becomes easy to recognize the three-dimensional shape of the subject.
JP 2005-17262 A

ところで、3次元形状を表す3次元データを生成するに際しては、測定精度および解像度等が高いことが求められている。その一方で、3次元形状を表示する場合には、高速で表示することが求められる。しかしながら、上記特許文献1に記載された手法においては、記録用と表示用とで同一の3次元データを用いてるため、記録のために表示速度を低下させるか、表示のために測定精度等を低下させるかして3次元データを生成するしかなかった。   By the way, when generating three-dimensional data representing a three-dimensional shape, it is required to have high measurement accuracy and resolution. On the other hand, when displaying a three-dimensional shape, it is required to display at high speed. However, in the method described in Patent Document 1, since the same three-dimensional data is used for recording and for display, the display speed is reduced for recording or the measurement accuracy for display is reduced. There was no choice but to generate 3D data.

本発明は上記事情に鑑みなされたものであり、3次元データを生成するに際し、3次元形状の表示速度と精度とを両立できるようにすることを目的とする。   The present invention has been made in view of the above circumstances, and an object of the present invention is to make it possible to achieve both display speed and accuracy of a three-dimensional shape when generating three-dimensional data.

本発明による3次元形状測定装置は、被写体を異なる位置から撮影することにより取得した複数の画像をそれぞれ表す複数の画像データを取得する画像データ取得手段と、
前記複数の画像データから、前記被写体の3次元形状を表す3次元データを生成する3次元データ生成手段であって、精度が異なる第1および第2の3次元データを生成する3次元データ生成手段とを備えたことを特徴とするものである。
A three-dimensional shape measuring apparatus according to the present invention includes an image data acquisition unit that acquires a plurality of image data respectively representing a plurality of images acquired by photographing a subject from different positions;
3D data generating means for generating 3D data representing the 3D shape of the subject from the plurality of image data, wherein the 3D data generating means generates first and second 3D data having different accuracy. It is characterized by comprising.

「精度が異なる」とは、算出した3次元形状の正確さが異なることを意味し、具体的には、3次元形状の測定精度、3次元形状の解像度、3次元形状を生成するための演算方法等の少なくとも1つが異なることを意味する。このため、精度が低い方の第1の3次元データは、精度が高い方の第2の3次元データと比較して、高速に生成することができることとなる。   “Different accuracy” means that the accuracy of the calculated three-dimensional shape is different. Specifically, the measurement accuracy of the three-dimensional shape, the resolution of the three-dimensional shape, and the calculation for generating the three-dimensional shape It means that at least one of the methods or the like is different. For this reason, the first three-dimensional data with lower accuracy can be generated at a higher speed than the second three-dimensional data with higher accuracy.

なお、本発明による3次元形状測定装置においては、前記第1の3次元データの生成のための演算方法を決定する演算方法決定手段をさらに備えるものとし、
前記3次元データ生成手段を、該決定された演算方法により前記第1の3次元データを生成する手段としてもよい。
In the three-dimensional shape measuring apparatus according to the present invention, the apparatus further includes calculation method determining means for determining a calculation method for generating the first three-dimensional data.
The three-dimensional data generation means may be means for generating the first three-dimensional data by the determined calculation method.

また、本発明による3次元形状測定装置においては、前記演算方法決定手段を、前記3次元形状を表示する表示手段の解像度、該表示手段の前記3次元形状の表示速度および前記撮像手段の出力形式の少なくとも1つに基づいて、前記演算方法を決定する手段としてもよい。   Further, in the three-dimensional shape measuring apparatus according to the present invention, the calculation method determining means includes the resolution of the display means for displaying the three-dimensional shape, the display speed of the three-dimensional shape of the display means, and the output format of the imaging means. The calculation method may be determined based on at least one of the following.

また、本発明による3次元形状測定装置においては、前記第1の3次元データにより表される前記被写体の3次元形状を表示手段に表示するに際し、該3次元形状の表示パラメータの指定を受け付けるパラメータ指定手段と、
前記指定された表示パラメータにより前記第1の3次元データにより表される前記3次元形状を前記表示手段に表示する表示制御手段とをさらに備えるものとしてもよい。
In the three-dimensional shape measuring apparatus according to the present invention, when displaying the three-dimensional shape of the subject represented by the first three-dimensional data on the display means, the parameter for accepting designation of the display parameter of the three-dimensional shape. Designation means;
Display control means for displaying the three-dimensional shape represented by the first three-dimensional data on the display means according to the designated display parameter may be further provided.

また、本発明による3次元形状測定装置においては、前記第1の3次元データにより表される前記被写体の3次元形状を表示手段に表示するに際し、該3次元形状の表示パラメータの指定を受け付けるパラメータ指定手段と、
前記表示パラメータに応じて前記第1の3次元データの演算方法を決定する演算方法決定手段とをさらに備えるものとし、
前記3次元データ生成手段を、該決定された演算方法により前記第1の3次元データを生成する手段としてもよい。
In the three-dimensional shape measuring apparatus according to the present invention, when displaying the three-dimensional shape of the subject represented by the first three-dimensional data on the display means, the parameter for accepting designation of the display parameter of the three-dimensional shape. Designation means;
A calculation method determining means for determining a calculation method of the first three-dimensional data according to the display parameter;
The three-dimensional data generation means may be means for generating the first three-dimensional data by the determined calculation method.

また、本発明による3次元形状測定装置においては、前記3次元データ生成手段を、段階的に精度が異なる複数の3次元データを低い精度から順次生成し、該生成の途中段階の3次元データを前記第1の3次元データとして出力する手段としてもよい。   Further, in the three-dimensional shape measuring apparatus according to the present invention, the three-dimensional data generation means sequentially generates a plurality of three-dimensional data having different accuracy in stages from a low accuracy, and generates the three-dimensional data in the middle of the generation. It is good also as a means to output as said 1st three-dimensional data.

また、本発明による3次元形状測定装置においては、前記3次元データ生成手段を、前記第1の3次元データを生成する第1の手段と、前記第2の3次元データを生成する第2の手段とを備えてなるものとしてもよい。   In the three-dimensional shape measuring apparatus according to the present invention, the three-dimensional data generation means includes a first means for generating the first three-dimensional data and a second means for generating the second three-dimensional data. It is good also as what comprises a means.

本発明による3次元形状再生装置は、本発明による表示パラメータを指定する3次元形状測定装置により取得された前記第2の3次元データおよび前記表示パラメータを取得するデータ取得手段と、
前記表示パラメータに基づいて前記第2の3次元データにより表される3次元形状を表示する表示手段とを備えたことを特徴とするものである。
A three-dimensional shape reproduction apparatus according to the present invention comprises: the second three-dimensional data acquired by the three-dimensional shape measurement apparatus that designates display parameters according to the present invention; and data acquisition means for acquiring the display parameters;
And display means for displaying a three-dimensional shape represented by the second three-dimensional data based on the display parameter.

本発明による3次元形状測定方法は、被写体を異なる位置から撮影することにより取得した複数の画像をそれぞれ表す複数の画像データを取得し、
前記複数の画像データから、前記被写体の3次元形状を表す3次元データを生成するに際し、精度が異なる第1および第2の3次元データを生成することを特徴とするものである。
The three-dimensional shape measurement method according to the present invention acquires a plurality of image data respectively representing a plurality of images acquired by photographing a subject from different positions,
When generating three-dimensional data representing the three-dimensional shape of the subject from the plurality of image data, first and second three-dimensional data having different accuracy are generated.

なお、本発明による3次元形状測定方法においては、前記第1の3次元データにより表される前記被写体の3次元形状を表示手段に表示するに際し、該3次元形状の表示パラメータの指定を受け付け、
前記指定された表示パラメータにより前記第1の3次元データにより表される前記3次元形状を前記表示手段に表示するようにしてもよい。
In the three-dimensional shape measurement method according to the present invention, when the three-dimensional shape of the subject represented by the first three-dimensional data is displayed on the display means, designation of display parameters for the three-dimensional shape is accepted,
The three-dimensional shape represented by the first three-dimensional data may be displayed on the display unit by the designated display parameter.

本発明による3次元形状再生方法は、本発明による表示パラメータを指定する3次元形状測定方法により取得された前記第2の3次元データおよび前記表示パラメータを取得し、
前記表示パラメータに基づいて前記第2の3次元データにより表される3次元形状を表示することを特徴とするものである。
The three-dimensional shape reproduction method according to the present invention acquires the second three-dimensional data and the display parameter acquired by the three-dimensional shape measurement method specifying the display parameter according to the present invention,
A three-dimensional shape represented by the second three-dimensional data is displayed based on the display parameter.

なお、本発明による3次元形状測定方法および3次元形状再生方法をコンピュータに実行させるためのプログラムとして提供してもよい。   In addition, you may provide as a program for making a computer perform the three-dimensional shape measuring method and three-dimensional shape reproduction | regeneration method by this invention.

本発明によれば、被写体の3次元形状を表す3次元データを生成するに際し、精度が異なる第1および第2の3次元データが生成される。このため、3次元形状を表示する場合には、精度が低い第1の3次元データを使用すれば、高速に3次元形状を表示することができる。また、精度が高い第2の3次元データを記録用に使用すれば、後で時間のあるときにそれを表示して、精度の高い3次元形状を利用することができる。   According to the present invention, when generating three-dimensional data representing a three-dimensional shape of a subject, first and second three-dimensional data having different accuracy are generated. For this reason, when displaying a three-dimensional shape, if the first three-dimensional data with low accuracy is used, the three-dimensional shape can be displayed at high speed. Further, if the second 3D data with high accuracy is used for recording, it can be displayed later when time is available, and a highly accurate 3D shape can be used.

また、第1の3次元データの生成のための演算方法を決定することにより、必要に応じた精度の第1の3次元データを生成することができ、その結果、適切な精度の第1の3次元データを出力することができる。   In addition, by determining the calculation method for generating the first three-dimensional data, it is possible to generate the first three-dimensional data with the accuracy required, and as a result, the first three-dimensional data with the appropriate accuracy can be generated. Three-dimensional data can be output.

この場合、表示手段の解像度に基づいて演算方法を決定することにより、第1の3次元データを表示手段に表示するのに適した精度を有するものとすることができる。   In this case, by determining the calculation method based on the resolution of the display means, it is possible to have accuracy suitable for displaying the first three-dimensional data on the display means.

またこの場合、表示手段の3次元形状の表示速度に基づいて演算方法を決定することにより、表示速度に間に合う可能な限り高い精度により第1の3次元データを生成することができるため、第1の3次元データを表示手段に表示するのに適した精度を有するものとすることができる。   In this case, since the calculation method is determined based on the display speed of the three-dimensional shape of the display means, the first three-dimensional data can be generated with the highest possible accuracy in time for the display speed. It is possible to have accuracy suitable for displaying the three-dimensional data on the display means.

またこの場合、撮像手段の出力形式に基づいて演算方法を決定することにより、出力形式に適した精度の第1の3次元データを出力することができる。   In this case, by determining the calculation method based on the output format of the imaging means, it is possible to output the first three-dimensional data with an accuracy suitable for the output format.

また、第1の3次元データにより表される被写体の3次元形状を表示手段に表示するに際し、3次元形状の表示パラメータの指定を受け付け、指定された表示パラメータにより第1の3次元データにより表される3次元形状を表示することにより、所望とする表示の態様にて3次元形状を表示することができる。   Further, when displaying the three-dimensional shape of the subject represented by the first three-dimensional data on the display means, the designation of the display parameter of the three-dimensional shape is accepted, and the first three-dimensional data is represented by the designated display parameter. By displaying the three-dimensional shape, the three-dimensional shape can be displayed in a desired display mode.

また、表示パラメータに応じて第1の3次元データの演算方法を決定することにより、表示される3次元形状についてのみ表示パラメータに基づいて表示のための演算が行われるため、演算量を低減することができる。   Further, by determining the calculation method of the first three-dimensional data according to the display parameter, calculation for display is performed based on the display parameter only for the three-dimensional shape to be displayed, thereby reducing the calculation amount. be able to.

また、段階的に精度が異なる複数の3次元データを低い精度から順次生成し、生成の途中段階の3次元データを第1の3次元データとして出力することにより、第1および第2の3次元データを生成する専用の手段を設ける必要がなくなるため、装置のコストを低減することができる。   Also, the first and second three-dimensional data are generated by sequentially generating a plurality of three-dimensional data having different accuracy in stages from a low accuracy, and outputting the three-dimensional data in the middle of generation as the first three-dimensional data. Since it is not necessary to provide a dedicated means for generating data, the cost of the apparatus can be reduced.

また、第1の3次元データを生成する手段と、第2の3次元データを生成する手段とを別個に備えることにより、それぞれの3次元データの生成を効率よく行うことができる。   Further, by separately providing means for generating the first three-dimensional data and means for generating the second three-dimensional data, it is possible to efficiently generate the respective three-dimensional data.

以下、図面を参照して本発明の実施形態について説明する。図1は本発明の第1の実施形態による3次元形状測定装置および3次元形状再生装置を適用したステレオカメラ1の内部構成を示す概略ブロック図である。図1に示すように第1の実施形態によるステレオカメラ1は、2つの撮像部21A,21B、撮像制御部22、画像処理部23、圧縮/伸長処理部24、フレームメモリ25、メディア制御部26、内部メモリ27、および表示制御部28を備える。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a schematic block diagram showing an internal configuration of a stereo camera 1 to which a three-dimensional shape measuring apparatus and a three-dimensional shape reproducing apparatus according to a first embodiment of the present invention are applied. As shown in FIG. 1, the stereo camera 1 according to the first embodiment includes two imaging units 21A and 21B, an imaging control unit 22, an image processing unit 23, a compression / decompression processing unit 24, a frame memory 25, and a media control unit 26. An internal memory 27 and a display control unit 28.

図2は撮像部21A,21Bの構成を示す図である。図2に示すように、撮像部21A,21Bは、レンズ10A,10B、絞り11A,11B、シャッタ12A,12B、CCD13A,13B、アナログフロントエンド(AFE)14A,14BおよびA/D変換部15A,15Bをそれぞれ備える。   FIG. 2 is a diagram illustrating the configuration of the imaging units 21A and 21B. As shown in FIG. 2, the imaging units 21A and 21B include lenses 10A and 10B, diaphragms 11A and 11B, shutters 12A and 12B, CCDs 13A and 13B, analog front ends (AFE) 14A and 14B, and an A / D conversion unit 15A. 15B is provided.

レンズ10A,10Bは、被写体に焦点を合わせるためのフォーカスレンズ、ズーム機能を実現するためのズームレンズ等の複数の機能別レンズにより構成され、不図示のレンズ駆動部によりその位置が調整される。なお、本実施形態においては焦点位置は固定されているものとする。   The lenses 10A and 10B are composed of a plurality of functional lenses such as a focus lens for focusing on a subject and a zoom lens for realizing a zoom function, and their positions are adjusted by a lens driving unit (not shown). In the present embodiment, the focal position is assumed to be fixed.

絞り11A,11Bは、不図示の絞り駆動部により、AE処理により得られる絞り値データに基づいて絞り径の調整が行われる。なお、本実施形態においては絞り値データは固定されているものとする。   In the diaphragms 11A and 11B, the diaphragm diameter is adjusted based on the diaphragm value data obtained by the AE process by a diaphragm driving unit (not shown). In the present embodiment, it is assumed that the aperture value data is fixed.

シャッタ12A,12Bはメカニカルシャッタであり、不図示のシャッタ駆動部により、AE処理により得られるシャッタスピードに応じて駆動される。なお、本実施形態においてはシャッタスピードは固定されているものとする。   The shutters 12A and 12B are mechanical shutters, and are driven by a shutter driving unit (not shown) according to the shutter speed obtained by the AE process. In this embodiment, the shutter speed is assumed to be fixed.

CCD13A,13Bは、多数の受光素子を2次元的に配列した光電面を有しており、被写体光がこの光電面に結像して光電変換されてアナログ撮像信号が取得される。また、CCD13A,13Bの前面にはR,G,B各色のフィルタが規則的に配列されたカラーフィルタが配設されている。   The CCDs 13A and 13B have a photoelectric surface in which a large number of light receiving elements are two-dimensionally arranged, and subject light is imaged on the photoelectric surface and subjected to photoelectric conversion to obtain an analog imaging signal. In addition, color filters in which R, G, and B color filters are regularly arranged are arranged on the front surfaces of the CCDs 13A and 13B.

AFE14A,14Bは、CCD13A,13Bから出力されるアナログ撮像信号に対して、アナログ撮像信号のノイズを除去する処理、およびアナログ撮像信号のゲインを調節する処理(以下アナログ処理とする)を施す。   The AFEs 14A and 14B perform processing for removing noise of the analog imaging signal and processing for adjusting the gain of the analog imaging signal (hereinafter referred to as analog processing) for the analog imaging signals output from the CCDs 13A and 13B.

A/D変換部15A,15Bは、AFE14A,14Bによりアナログ処理が施されたアナログ撮像信号をデジタル信号に変換する。なお、撮像部21A,21BのCCD13A,13Bにおいて取得され、デジタル信号に変換されることにより得られる画像データは、画素毎にR,G,Bの濃度値を持つRAWデータである。なお、撮像部21Aにより取得される画像データにより表される画像を基準画像G1、撮像部21Bにより取得される画像データにより表される画像を参照画像G2とする。   The A / D converters 15A and 15B convert the analog imaging signals subjected to analog processing by the AFEs 14A and 14B into digital signals. Note that image data obtained by the CCDs 13A and 13B of the imaging units 21A and 21B and converted into digital signals is RAW data having R, G, and B density values for each pixel. The image represented by the image data acquired by the imaging unit 21A is referred to as a standard image G1, and the image represented by the image data acquired by the imaging unit 21B is referred to as a reference image G2.

撮像制御部22は、レリーズボタンの押下前は、スルー画像表示のために例えば30fpsのように所定のフレームレートにて撮影を行い、レリーズボタンが押下されると、記録のための撮影を行うよう、撮像部21A,21Bを制御する。なお、撮像制御部22は撮像部21A,21Bに設けられていてもよい。   The imaging control unit 22 shoots at a predetermined frame rate, for example, 30 fps for displaying a through image before the release button is pressed, and performs shooting for recording when the release button is pressed. The imaging units 21A and 21B are controlled. The imaging control unit 22 may be provided in the imaging units 21A and 21B.

なお、本実施形態においては、焦点位置、絞り値データおよびシャッタスピードは固定されているが、AF処理およびAE処理を行って、撮影の都度、焦点位置、絞り値データおよびシャッタスピードを設定するようにしてもよい。   In this embodiment, the focus position, aperture value data, and shutter speed are fixed, but AF processing and AE processing are performed to set the focus position, aperture value data, and shutter speed each time shooting is performed. It may be.

画像処理部23は、撮像部21A,21Bが取得したデジタルの画像データに対して、画像データの感度分布のばらつきおよび光学系の歪みを補正する補正処理を施すとともに、2つの画像を並行化するための並行化処理を施す。さらに、並行化処理後の画像に対してホワイトバランスを調整する処理、階調補正、シャープネス補正、および色補正等の画像処理を施す。なお、画像処理部23における処理後の基準画像および参照画像についても、処理前の参照符号G1,G2を用いるものとする。   The image processing unit 23 performs correction processing for correcting variations in sensitivity distribution of the image data and distortion of the optical system on the digital image data acquired by the imaging units 21A and 21B, and parallelizes the two images. For parallel processing. Further, image processing such as white balance adjustment processing, gradation correction, sharpness correction, and color correction is performed on the image after the parallel processing. Note that reference codes G1 and G2 before processing are also used for the standard image and the reference image after processing in the image processing unit 23.

圧縮/伸長処理部24は、レリーズボタンの押下後に取得され、画像処理部23によって処理が施された基準画像G1および参照画像G2を表す画像データ対して、例えば、JPEG等の圧縮形式で圧縮処理を施し、後述するように生成された3次元データと併せて3次元画像ファイルを生成する。この3次元画像ファイルは、基準画像G1、参照画像G2および3次元データを含むものとなる。また、この3次元画像ファイルには、Exifフォーマット等に基づいて、撮影日時等の付帯情報が記述されたヘッダが付与される。   The compression / decompression processing unit 24 compresses image data representing the base image G1 and the reference image G2 obtained after the release button is pressed and processed by the image processing unit 23 in a compression format such as JPEG. The three-dimensional image file is generated together with the three-dimensional data generated as described later. This three-dimensional image file includes a standard image G1, a reference image G2, and three-dimensional data. The 3D image file is provided with a header in which incidental information such as the shooting date and time is described based on the Exif format or the like.

フレームメモリ25は、撮像部21A,21Bが取得した基準画像G1および参照画像G2の画像データに対して、前述の画像処理部23が行う処理を含む各種処理を行う際に使用する作業用メモリである。   The frame memory 25 is a working memory used when performing various processes including the processes performed by the image processing unit 23 on the image data of the base image G1 and the reference image G2 acquired by the imaging units 21A and 21B. is there.

メディア制御部26は、記録メディア29にアクセスして3次元画像ファイルの書き込みと読み込みの制御を行う。   The media control unit 26 accesses the recording medium 29 and controls writing and reading of the 3D image file.

内部メモリ27は、ステレオカメラ1において設定される各種定数、およびCPU36が実行するプログラム等を記憶する。   The internal memory 27 stores various constants set in the stereo camera 1, programs executed by the CPU 36, and the like.

表示制御部28は、フレームメモリ25に格納された画像データおよび3次元データをモニタ20に表示させたり、記録メディア29に記録されている画像をモニタ20に表示させたりするためのものである。なお、本実施形態においては、モニタ20はタッチパネルとなっており、撮影者がモニタ20に触れることにより、モニタ20から各種指示をステレオカメラ1に対して行うことができるようになっている。   The display control unit 28 is for displaying image data and three-dimensional data stored in the frame memory 25 on the monitor 20 and displaying an image recorded on the recording medium 29 on the monitor 20. In the present embodiment, the monitor 20 is a touch panel, and various instructions can be given from the monitor 20 to the stereo camera 1 when the photographer touches the monitor 20.

また、ステレオカメラ1は、3次元データ生成部30を備える。   In addition, the stereo camera 1 includes a three-dimensional data generation unit 30.

3次元データ生成部30は、ステレオマッチングの手法を用いて3次元データを生成する。このため、3次元データ生成部30は、図3に示すように、基準画像G1上のある画素Paに写像される実空間上の点は、点P1,P2,P3というように点O1からの視線上に複数存在するため、実空間上の点P1 ,P2 ,P3 等の写像である直線(エピポーラ線)上に、画素Paに対応する参照画像R上の画素Pa′が存在するという事実に基づいて、基準画像G1と参照画像G2との対応点を参照画像G2上において探索する。なお、図3において点O1は基準カメラとなる撮像部21Aの視点、点O2は参照カメラとなる撮像部21Bの視点である。ここで、視点とは撮像部21A,21Bの光学系の焦点である。また、対応点の探索は、画像処理が施された基準画像G1および参照画像G2を用いてもよいが、画像処理前の並行化処理のみが施された基準画像G1および参照画像G2を用いることが好ましい。以降では、対応点の探索は画像処理前の基準画像G1および参照画像G2を用いるものとして説明する。   The three-dimensional data generation unit 30 generates three-dimensional data using a stereo matching technique. For this reason, as shown in FIG. 3, the three-dimensional data generation unit 30 points in the real space mapped to a certain pixel Pa on the reference image G1 from the point O1, such as points P1, P2, and P3. Since there are a plurality of lines on the line of sight, there is a pixel Pa ′ on the reference image R corresponding to the pixel Pa on a straight line (epipolar line) that is a map of the points P1, P2, P3, etc. in the real space. Based on the reference image G2, the corresponding point between the base image G1 and the reference image G2 is searched. In FIG. 3, a point O1 is a viewpoint of the imaging unit 21A that is a reference camera, and a point O2 is a viewpoint of the imaging unit 21B that is a reference camera. Here, the viewpoint is the focal point of the optical system of the imaging units 21A and 21B. The search for corresponding points may use the base image G1 and the reference image G2 that have been subjected to image processing, but use the base image G1 and the reference image G2 that have been subjected only to the parallel processing before the image processing. Is preferred. In the following description, it is assumed that the search for corresponding points uses the base image G1 and the reference image G2 before image processing.

具体的には、3次元データ生成部30は、対応点の探索を行う際に、あらかじめ定められた相関ウィンドウWをエピポーラ線に沿って移動し、各移動位置において基準画像G1および参照画像G2の相関ウィンドウW内の画素についての相関を算出し、参照画像G2上の相関が最大となる位置における相関ウィンドウWの中心画素を、基準画像G1上の画素Paに対応する対応点とする。なお、相関を評価するための相関評価値としては、差分絶対値和および差分2乗和の逆数等を用いることができる。この場合、相関評価値が小さいほど、相関が大きいものとなる。   Specifically, when searching for corresponding points, the three-dimensional data generation unit 30 moves a predetermined correlation window W along the epipolar line, and the reference image G1 and the reference image G2 are moved at each movement position. The correlation for the pixels in the correlation window W is calculated, and the central pixel of the correlation window W at the position where the correlation on the reference image G2 is maximized is taken as the corresponding point corresponding to the pixel Pa on the standard image G1. As the correlation evaluation value for evaluating the correlation, the sum of absolute differences, the reciprocal of the sum of squared differences, or the like can be used. In this case, the smaller the correlation evaluation value, the larger the correlation.

図4は並行化処理後の基準画像および参照画像の位置関係を説明するための図である。図4に示すように、撮像部21A,21Bにおける基準画像G1および参照画像G2が得られる面となる画像面は、撮像部21A,21Bの光軸との交点を原点とする。また、画像面上における撮像部21A,21Bの座標系をそれぞれ(u,v)、(u′,v′)とする。ここで、並行化処理により撮像部21A,21Bの光軸は平行となるため、画像面におけるu軸およびu′軸は同一直線上において同一方向を向くこととなる。また、並行化処理により、参照画像G2上におけるエピポーラ線は、u′軸に平行なものとなるため、基準画像G1上におけるu軸も、参照画像G2のエピポーラ線の方向と一致することとなる。   FIG. 4 is a diagram for explaining the positional relationship between the base image and the reference image after the parallel processing. As shown in FIG. 4, the image plane that is the plane from which the standard image G1 and the reference image G2 are obtained in the imaging units 21A and 21B has an origin at the intersection with the optical axis of the imaging units 21A and 21B. In addition, the coordinate systems of the imaging units 21A and 21B on the image plane are (u, v) and (u ′, v ′), respectively. Here, since the optical axes of the imaging units 21A and 21B are made parallel by the parallel processing, the u axis and the u ′ axis on the image plane face the same direction on the same straight line. Further, since the epipolar line on the reference image G2 becomes parallel to the u ′ axis by the parallel processing, the u axis on the standard image G1 also coincides with the direction of the epipolar line of the reference image G2. .

ここで、撮像部21A,21Bの焦点距離をf、基線長をbとする。なお、焦点距離fおよび基線長bはキャリブレーションパラメータとしてあらかじめ算出されて内部メモリ27に記憶されている。このとき、3次元空間上における位置を表す距離データ(X,Y,Z)は、撮像部21Aの座標系を基準とすると、下記の式(1)〜(3)により表される。   Here, it is assumed that the focal lengths of the imaging units 21A and 21B are f and the base line length is b. The focal length f and the baseline length b are calculated in advance as calibration parameters and stored in the internal memory 27. At this time, the distance data (X, Y, Z) representing the position in the three-dimensional space is expressed by the following formulas (1) to (3) based on the coordinate system of the imaging unit 21A.

X=b・u/(u−u′) (1)
Y=b・v/(u−u′) (2)
Z=b・f/(u−u′) (3)
ここでu−u′は、撮像部21A,21Bの画像面上における投影点の横方向のずれ量(視差)である。
X = b · u / (u−u ′) (1)
Y = b · v / (u−u ′) (2)
Z = b · f / (u−u ′) (3)
Here, u−u ′ is the amount of deviation (parallax) in the horizontal direction of the projection point on the image plane of the imaging units 21A and 21B.

このようにして距離データ(X,Y,Z)を3次元空間において複数算出することにより、その3次元空間に含まれる被写体の3次元形状を表すことができ、複数の距離データの集合が3次元データV0となる。ここで、距離データX,Yはその画素の位置を表す位置情報であり、距離データZは距離を表す情報である。なお、距離データは基準画像G1および参照画像G2の共通する範囲においてのみ算出される。   By calculating a plurality of distance data (X, Y, Z) in the three-dimensional space in this way, the three-dimensional shape of the subject included in the three-dimensional space can be represented, and a set of a plurality of distance data is 3 It becomes the dimension data V0. Here, the distance data X and Y are position information indicating the position of the pixel, and the distance data Z is information indicating the distance. The distance data is calculated only in the common range of the base image G1 and the reference image G2.

3次元データ生成部30は、求めた対応点を用いて、上記式(1)〜(3)により、撮像部21A,21Bから被写体までの距離を表す距離データ(X,Y,Z)を3次元空間上において複数算出し、算出した複数の距離データ(X,Y,Z)からなる、被写体Hの3次元形状を表す3次元データV0を生成する。なお、本実施形態においては、被写体の3次元形状はメッシュモデルにより表すものとし、3次元データV0はメッシュモデルにて3次元形状を表すものとする。また、メッシュモデルに代えてボリュームモデルにより表すようにしてもよい。   The three-dimensional data generation unit 30 uses the obtained corresponding points to calculate 3 distance data (X, Y, Z) representing the distance from the imaging units 21A, 21B to the subject by the above formulas (1) to (3). A plurality of values are calculated in the dimension space, and three-dimensional data V0 representing the three-dimensional shape of the subject H, which is composed of the calculated plurality of distance data (X, Y, Z), is generated. In the present embodiment, the three-dimensional shape of the subject is represented by a mesh model, and the three-dimensional data V0 is represented by a mesh model. Further, a volume model may be used instead of the mesh model.

ここで、本実施形態においては、3次元データ生成部30は、図5に示すように、粗密探索法、サブピクセル位置推定およびオクルージョン補間を行って3次元データを生成する。以下、粗密探索法、サブピクセル位置推定およびオクルージョン補間について説明する。まず、粗密探索法について説明する。図6は粗密探索法を説明するための図である。   Here, in the present embodiment, the three-dimensional data generation unit 30 generates three-dimensional data by performing a coarse / fine search method, subpixel position estimation, and occlusion interpolation, as shown in FIG. The coarse / fine search method, subpixel position estimation, and occlusion interpolation will be described below. First, the coarse / fine search method will be described. FIG. 6 is a diagram for explaining the coarse / fine search method.

3次元データ生成部30は、まず、基準画像G1および参照画像G2のそれぞれから段階的に解像度が異なる解像度基準画像および解像度参照画像を生成する。具体的には、基準画像G1,参照画像G2の画素数が640×480画素の場合、160×120画素の低解像度基準画像G1″,低解像度参照画像G2″、320×240画素の中解像度基準画像G1′,中解像度参照画像G2′を生成する。なお、元の640×480画素の画像を高解像度基準画像G1,高解像度参照画像G2とする。ここで、解像度はこのように3段階に限定されるものではなく、2段階あるいは4段階以上としてもよい。   First, the three-dimensional data generation unit 30 generates a resolution standard image and a resolution reference image having different resolutions stepwise from the standard image G1 and the reference image G2. Specifically, when the number of pixels of the standard image G1 and the reference image G2 is 640 × 480 pixels, the medium resolution standard of the 160 × 120 pixel low resolution standard image G1 ″, the low resolution reference image G2 ″, and 320 × 240 pixels. An image G1 ′ and a medium resolution reference image G2 ′ are generated. The original image of 640 × 480 pixels is referred to as a high resolution standard image G1 and a high resolution reference image G2. Here, the resolution is not limited to three stages as described above, and may be two stages or four or more stages.

そして、3次元データ生成部30は、まず、図6に示すように低解像度基準画像G1″および低解像度参照画像G2″間において対応点を探索する。そして探索した対応点について、中解像度参照画像G2′における低解像度参照画像G2″に対応する部分を含む領域においてのみ、対応点を探索する。すなわち、図6に示すように、低解像度参照画像G2″において低解像度基準画像G1″の点P10に対応する対応点P11を探索した場合、中解像度参照画像G2′においては、対応点P11に対応する点P12を含む所定範囲の領域A1においてのみ中解像度基準画像G1′の点P10に対応する対応点を探索する。さらに、図6に示すように、中解像度参照画像G2′において対応点P12を探索した場合、高解像度参照画像G2においては、対応点P12に対応する点P13を含む所定範囲の領域A2においてのみ高解像度基準画像G1の点P10に対応する対応点を探索する。   Then, the three-dimensional data generation unit 30 first searches for corresponding points between the low resolution standard image G1 ″ and the low resolution reference image G2 ″ as shown in FIG. The searched corresponding points are searched for only in a region including a portion corresponding to the low resolution reference image G2 ″ in the medium resolution reference image G2 ′. That is, as shown in FIG. 6, the low resolution reference image G2 is searched. When the corresponding point P11 corresponding to the point P10 of the low resolution standard image G1 "is searched for in", the medium resolution reference image G2 'has the medium resolution only in the region A1 in the predetermined range including the point P12 corresponding to the corresponding point P11. Corresponding points corresponding to the point P10 of the reference image G1 ′ are searched for.When the corresponding point P12 is searched for in the medium resolution reference image G2 ′ as shown in FIG. A corresponding point corresponding to the point P10 of the high-resolution reference image G1 is searched only in a predetermined area A2 including the point P13 corresponding to P12.

そして、3次元データ生成部30は、中高解像度の参照画像において対応点を探索する毎に、中解像度および高解像度の3次元データV0′,V0を生成する。なお、低解像度の3次元データは第1の実施形態においては生成しないものとする。ここで、3次元データ生成部30は、中解像度の3次元データV0′を表示用の3次元データとして出力し、高解像度の3次元データV0を記録用の3次元データとして出力する。なお、3次元データ生成部30は、レリーズボタンを押下された場合に高解像度の3次元データV0の生成を行い、レリーズボタンの押下前は、中解像度の3次元データV0′の生成までのみを行う。したがって、中解像度の3次元データV0′がスルー画像としてモニタ20に表示される。   The three-dimensional data generation unit 30 generates medium-resolution and high-resolution three-dimensional data V0 ′ and V0 each time a corresponding point is searched for in a medium-high resolution reference image. Note that low-resolution three-dimensional data is not generated in the first embodiment. Here, the three-dimensional data generation unit 30 outputs the medium-resolution three-dimensional data V0 ′ as display three-dimensional data, and outputs the high-resolution three-dimensional data V0 as recording three-dimensional data. The three-dimensional data generation unit 30 generates high-resolution three-dimensional data V0 when the release button is pressed. Before the release button is pressed, only the generation of medium-resolution three-dimensional data V0 ′ is performed. Do. Accordingly, the medium resolution three-dimensional data V0 ′ is displayed on the monitor 20 as a through image.

また、対応点を探索する際に、相関ウィンドウWは各解像度の参照画像G2上において、1画素ずつ移動させて対応点を探索することを基本とするが、対応点の探索精度を向上させるためには、1画素未満の移動位置における対応点の位置を推定することが好ましい。このような対応点の探索位置の推定は、サブピクセル位置推定と称される。以下、サブピクセル位置推定について説明する。   Further, when searching for corresponding points, the correlation window W is basically searched for corresponding points by moving one pixel at a time on the reference image G2 of each resolution, but in order to improve the accuracy of searching for corresponding points. It is preferable to estimate the position of the corresponding point at the moving position of less than one pixel. Such estimation of the corresponding point search position is referred to as sub-pixel position estimation. Hereinafter, subpixel position estimation will be described.

図7はサブピクセル位置推定の手法を説明するための図である。なお、ここでは説明を簡単にするために、画素位置を1次元で示すものとする。また、図7においては、横軸は画素位置を、縦軸は相関評価値を示す。また、図7においては相関評価値が小さいほど相関が大きいものとする。   FIG. 7 is a diagram for explaining a method of subpixel position estimation. Here, in order to simplify the description, the pixel positions are shown in a one-dimensional manner. In FIG. 7, the horizontal axis indicates the pixel position, and the vertical axis indicates the correlation evaluation value. In FIG. 7, it is assumed that the smaller the correlation evaluation value, the larger the correlation.

図7に示すように、4つの画素位置x1,x2,x3,x4における相関評価値がそれぞれy1,y2,y3,y4であったとすると、相関が最も大きいのは画素位置x4であるため、サブピクセル位置推定を行わない場合、対応点は画素位置x4となる。しかしながら、各点を通る2次曲線L1を考慮すると、最も相関が大きくなるのは画素位置x3と画素位置x4の間の位置xsとなる。サブピクセル位置推定の手法は、このように相関評価値と画素位置との関係から、相関が最も大きくなる位置を、より精度を向上させるために画素位置間において推定する手法である。   As shown in FIG. 7, if the correlation evaluation values at the four pixel positions x1, x2, x3, and x4 are y1, y2, y3, and y4, respectively, the pixel position x4 has the largest correlation. When pixel position estimation is not performed, the corresponding point is the pixel position x4. However, considering the quadratic curve L1 passing through each point, the position where the correlation is greatest is the position xs between the pixel position x3 and the pixel position x4. The sub-pixel position estimation method is a method for estimating the position where the correlation is greatest between the pixel positions in order to further improve the accuracy based on the relationship between the correlation evaluation value and the pixel position.

なお、第1の実施形態においては、高解像度基準画像G1,高解像度参照画像G2を用いた対応点の探索時にのみサブピクセル位置推定を行うものとする。   In the first embodiment, it is assumed that subpixel position estimation is performed only when searching for corresponding points using the high-resolution standard image G1 and the high-resolution reference image G2.

次いで、オクルージョン補間について説明する。図8に示すように、被写体Hの形状によっては、撮像部21Aからは臨むことができるが撮像部21Bからは臨むことができない隠れ点K0が存在する場合がある。このような隠れ点K0については、距離データ(X,Y,Z)を算出することができないため、被写体Hにおける領域B1は3次元データを算出することができない。なお、このような領域はオクルージョン領域と称される、このため、3次元データ生成部30は、オクルージョン領域については、オクルージョン領域の周囲の距離データ(X,Y,Z)を用いて、その位置の距離データ(X,Y,Z)を推定する。例えば、図9に示すように、被写体Hのオクルージョン領域B1については、オクルージョン領域B1の両端にある位置P20,P21の距離データを用いて、補間演算によりオクルージョン領域B1の距離データを算出する。なお、補間演算としては線形補間および高次補間等公知の種々の手法を用いることができる。   Next, occlusion interpolation will be described. As shown in FIG. 8, depending on the shape of the subject H, there may be a hidden point K0 that can be seen from the imaging unit 21A but cannot be seen from the imaging unit 21B. For such a hidden point K0, the distance data (X, Y, Z) cannot be calculated, so that the area B1 in the subject H cannot calculate three-dimensional data. Such an area is referred to as an occlusion area. For this reason, the three-dimensional data generation unit 30 uses the distance data (X, Y, Z) around the occlusion area to determine the position of the occlusion area. Distance data (X, Y, Z) is estimated. For example, as shown in FIG. 9, for the occlusion area B1 of the subject H, the distance data of the occlusion area B1 is calculated by interpolation using the distance data of the positions P20 and P21 at both ends of the occlusion area B1. Note that various known methods such as linear interpolation and higher-order interpolation can be used as the interpolation calculation.

なお、本実施形態においては、高解像度基準画像G1,高解像度参照画像G2を用いての3次元データV0の生成時にのみオクルージョン領域の補間を行うものとする。   In the present embodiment, the occlusion region is interpolated only when the three-dimensional data V0 is generated using the high resolution standard image G1 and the high resolution reference image G2.

CPU36は、入出力部37からの信号に応じてステレオカメラ1の各部を制御する。また、入出力部37からのモード切替指示により、ステレオカメラ1の動作モードを、撮影モードおよび再生モードに切り替える。   The CPU 36 controls each unit of the stereo camera 1 in accordance with a signal from the input / output unit 37. Further, the operation mode of the stereo camera 1 is switched between the photographing mode and the reproduction mode in response to a mode switching instruction from the input / output unit 37.

入出力部37は、各種インターフェース並びに撮影者が操作可能なスイッチ、レリーズボタンおよび操作ボタン等を備えてなるものである。なお、後述するトラックボールも備えてなるものである。   The input / output unit 37 includes various interfaces, a switch that can be operated by the photographer, a release button, an operation button, and the like. Note that a trackball described later is also provided.

データバス38は、ステレオカメラ1を構成する各部およびCPU36に接続されており、ステレオカメラ1における各種データおよび各種情報のやり取りを行う。   The data bus 38 is connected to each part constituting the stereo camera 1 and the CPU 36, and exchanges various data and various information in the stereo camera 1.

次いで、第1の実施形態において行われる処理について説明する。図10は第1の実施形態において行われる処理を示すフローチャートである。ステレオカメラ1の電源がオンとされ、動作モードが撮影モードに切り替えられることによりCPU36が処理を開始し、撮像部21A,21Bが被写体を撮影して、基準画像G1,参照画像G2の画像データを取得する(ステップST1)。次いで、3次元データ生成部30が、低解像度および中解像度の基準画像G1″,G1′、参照画像G2″,G2′を生成し、上述したように粗密探索法による対応点の探索を行い、中解像度の表示用3次元データV0′を生成する(ステップST2)。   Next, processing performed in the first embodiment will be described. FIG. 10 is a flowchart showing processing performed in the first embodiment. When the power of the stereo camera 1 is turned on and the operation mode is switched to the shooting mode, the CPU 36 starts processing, the imaging units 21A and 21B capture the subject, and the image data of the reference image G1 and the reference image G2 is obtained. Obtain (step ST1). Next, the three-dimensional data generation unit 30 generates low- and medium-resolution standard images G1 ″ and G1 ′ and reference images G2 ″ and G2 ′, and searches for corresponding points by the coarse / fine search method as described above. Medium resolution display three-dimensional data V0 'is generated (step ST2).

そして、CPU36からの指示により、表示制御部28が表示用3次元データV0′により表される3次元形状の画像である3次元画像をモニタ20に表示する(ステップST3)。   In response to an instruction from the CPU 36, the display control unit 28 displays a three-dimensional image, which is a three-dimensional image represented by the display three-dimensional data V0 ', on the monitor 20 (step ST3).

図11は3次元画像の表示を説明するためのステレオカメラ1の背面図である。図11に示すようにステレオカメラ1の背面には、モニタ20、トラックボール40、ズームインボタン41、ズームアウトボタン42が設けられている。なお、トラックボール40、ズームインボタン41およびズームアウトボタン42は、入出力部37の一部である。図11に示すように、モニタ20には表示用の3次元データV0′により表されるメッシュモデルの3次元画像G10が表示されている。なお、3次元画像G10は、3次元データV0′を、仮想的に設定した2次元平面に投影したものである。また3次元画像G10の左側には、視点のXYZ軸周りの回転量、原点からの移動量およびズーム倍率が表示され、3次元画像G10の右側には、3次元空間の座標が示されている。   FIG. 11 is a rear view of the stereo camera 1 for explaining display of a three-dimensional image. As shown in FIG. 11, a monitor 20, a trackball 40, a zoom-in button 41, and a zoom-out button 42 are provided on the rear surface of the stereo camera 1. The trackball 40, the zoom-in button 41, and the zoom-out button 42 are part of the input / output unit 37. As shown in FIG. 11, a three-dimensional image G10 of the mesh model represented by the display three-dimensional data V0 ′ is displayed on the monitor 20. The three-dimensional image G10 is obtained by projecting the three-dimensional data V0 ′ onto a virtually set two-dimensional plane. On the left side of the three-dimensional image G10, the rotation amount of the viewpoint around the XYZ axes, the movement amount from the origin, and the zoom magnification are displayed, and on the right side of the three-dimensional image G10, the coordinates of the three-dimensional space are shown. .

撮影者はトラックボール40を用いて、所望とする視点から見たものとなるように、表示された3次元画像G10をXYZ軸周りに回転することができる。また、モニタ20に触れ、触れた部分をモニタ20上において移動することにより、視点の位置を変更することができる。また、ズームインボタン41およびズームアウトボタン42を用いて、表示される3次元画像G10のズーム倍率を変更することができる。   The photographer can use the trackball 40 to rotate the displayed three-dimensional image G10 around the XYZ axes so as to be viewed from a desired viewpoint. Further, the position of the viewpoint can be changed by touching the monitor 20 and moving the touched portion on the monitor 20. Further, the zoom magnification of the displayed three-dimensional image G10 can be changed using the zoom-in button 41 and the zoom-out button 42.

なお、このように変更した視点の回転位置、移動位置およびズーム倍率は表示パラメータとして、後述するように生成された記録用の3次元データV0と併せて3次元画像ファイルに含められる。具体的には、3次元画像ファイルのヘッダに表示パラメータを記述することにより、表示パラメータが3次元画像ファイルに含められる。   It should be noted that the rotation position, movement position, and zoom magnification of the viewpoint thus changed are included as display parameters in the 3D image file together with the 3D data V0 for recording generated as described later. Specifically, the display parameters are included in the 3D image file by describing the display parameters in the header of the 3D image file.

次いで、CPU36が視点位置およびズーム倍率の変更指示がなされたか否かを判定し(ステップST4)、ステップST4が否定されるとステップST6に進む。ステップST4が肯定されると、視点位置およびズーム倍率を変更して3次元画像G10を再表示する(ステップST5)。   Next, the CPU 36 determines whether or not an instruction to change the viewpoint position and zoom magnification is made (step ST4), and if step ST4 is negative, the process proceeds to step ST6. If step ST4 is affirmed, the viewpoint position and zoom magnification are changed and the three-dimensional image G10 is displayed again (step ST5).

次いで、CPU36はレリーズボタンが押下されたか否かを判定し(ステップST6)、ステップST6が否定されるとステップST1に戻る。ステップST6が肯定されると、3次元データ生成部30が、高解像度の基準画像G1,参照画像G2を用いて、サブピクセル位置推定およびオクルージョン補間を行って、記録用の3次元データV0を生成する(ステップST7)。そして、CPU36からの指示により、圧縮/伸長処理部24が、3次元データV0、表示パラメータ、基準画像G1、参照画像G2の画像データから3次元画像ファイルを生成する(ステップST8)。さらに、CPU36からの指示により、メディア制御部26が3次元画像ファイルを記録メディア29に記録し(ステップST9)、処理を終了する。   Next, the CPU 36 determines whether or not the release button has been pressed (step ST6), and if step ST6 is negative, the process returns to step ST1. If step ST6 is positive, the three-dimensional data generation unit 30 performs subpixel position estimation and occlusion interpolation using the high-resolution standard image G1 and reference image G2, and generates three-dimensional data V0 for recording. (Step ST7). Then, in response to an instruction from the CPU 36, the compression / decompression processing unit 24 generates a three-dimensional image file from the three-dimensional data V0, display parameters, standard image G1, and reference image G2 image data (step ST8). Further, in response to an instruction from the CPU 36, the media control unit 26 records the three-dimensional image file on the recording medium 29 (step ST9), and ends the process.

次いで、記録された3次元画像ファイルの再生時の処理について説明する。図12は第1の実施形態において3次元画像ファイルの再生時に行われる処理を示すフローチャートである。ステレオカメラ1の動作モードが再生モードに切り替えられることによりCPU36が処理を開始し、再生する3次元画像ファイルの選択を受け付ける(ステップST11)。なお、3次元画像ファイルの選択は、記録メディア29に記録されている3次元画像ファイルの一覧をモニタ20に表示し、撮影者による一覧からの所望とする3次元画像ファイルの選択の指示を受け付けることにより行えばよい。   Next, processing at the time of reproducing the recorded three-dimensional image file will be described. FIG. 12 is a flowchart showing processing performed when a three-dimensional image file is played back in the first embodiment. When the operation mode of the stereo camera 1 is switched to the reproduction mode, the CPU 36 starts processing and accepts selection of a three-dimensional image file to be reproduced (step ST11). The selection of the 3D image file is performed by displaying a list of 3D image files recorded on the recording medium 29 on the monitor 20 and accepting an instruction to select a desired 3D image file from the list by the photographer. You can do that.

次いで、CPU36は、3次元画像ファイルに含まれる表示パラメータを用いて3次元画像を再生するか否かの選択、すなわち撮影時の表示パラメータの使用の有無の選択を受け付ける(ステップST12)。これは例えば図13に示すように選択画面50をモニタ20に表示し、撮影者によるYESボタン51またはNOボタン52の選択を受け付けることにより行えばよい。   Next, the CPU 36 accepts selection of whether or not to reproduce the 3D image using the display parameters included in the 3D image file, that is, selection of whether or not to use the display parameters at the time of shooting (step ST12). This may be performed, for example, by displaying the selection screen 50 on the monitor 20 as shown in FIG. 13 and accepting the selection of the YES button 51 or the NO button 52 by the photographer.

次いで、撮影時の表示パラメータの使用が選択されたか否かを判定し(ステップST13)、ステップST13が肯定されると、3次元画像ファイルのヘッダに記述された表示パラメータを取得し(ステップST14)、3次元画像ファイルに格納されている3次元データV0により表される3次元画像を、取得したパラメータに基づく視点位置およびズーム倍率によりモニタ20に表示し(ステップST15)、処理を終了する。なお、ステップST13が否定された場合は、あらかじめ定められたデフォルトの表示パラメータを取得し(ステップST16)、ステップST15の処理に進む。   Next, it is determined whether or not the use of display parameters at the time of photographing is selected (step ST13). When step ST13 is affirmed, display parameters described in the header of the three-dimensional image file are acquired (step ST14). The three-dimensional image represented by the three-dimensional data V0 stored in the three-dimensional image file is displayed on the monitor 20 based on the viewpoint position and zoom magnification based on the acquired parameters (step ST15), and the process is terminated. If step ST13 is negative, a predetermined default display parameter is acquired (step ST16), and the process proceeds to step ST15.

なお、3次元画像の表示の態様は図11に示すものと同様である。この際、撮影時と同様に、視点の回転位置、移動位置およびズーム倍率の変更を受け付けるようにしてもよい。また、基準画像G1および参照画像G2の再生の指示を受け付けて、図14に示すように基準画像G1および参照画像G2をモニタ20に表示するようにしてもよい。   The display mode of the three-dimensional image is the same as that shown in FIG. At this time, as in the case of shooting, changes in the rotation position, movement position, and zoom magnification of the viewpoint may be accepted. Alternatively, the instruction to reproduce the standard image G1 and the reference image G2 may be received, and the standard image G1 and the reference image G2 may be displayed on the monitor 20 as shown in FIG.

このように、第1の実施形態によれば、表示用の中解像度の3次元データV0′と、記録用の高解像度の3次元データV0とを生成するようにしたため、中解像度の3次元データV0′により、高速に3次元画像G10をモニタ20表示することができる。また、記録される3次元データV0は、解像度が高くまたサブピクセル位置推定およびオクルージョン補間を行っているため、測定精度が高いものとなっている。このため、撮影後の時間のあるときに3次元データV0により表される3次元画像を再生することにより、精度の高い3次元形状を利用することができる。   As described above, according to the first embodiment, the medium-resolution three-dimensional data V0 ′ for display and the high-resolution three-dimensional data V0 for recording are generated. With V0 ′, the three-dimensional image G10 can be displayed on the monitor 20 at high speed. In addition, the recorded three-dimensional data V0 has high resolution and high measurement accuracy because subpixel position estimation and occlusion interpolation are performed. Therefore, it is possible to use a highly accurate three-dimensional shape by reproducing a three-dimensional image represented by the three-dimensional data V0 when there is a time after shooting.

また、3次元画像の再生の際に、撮影時に使用した表示パラメータを使用することにより、撮影時と同様の視点位置およびズーム倍率により3次元画像を表示することができる。また、この際に、撮影時に使用した表示パラメータの使用の有無の選択を受け付けているため、3次元データV0の再生時における表示態様についての撮影者の意図を反映させることができる。   In addition, when the 3D image is reproduced, the 3D image can be displayed with the same viewpoint position and zoom magnification as those used during the shooting by using the display parameters used during the shooting. At this time, since selection of whether or not to use the display parameter used at the time of photographing is accepted, it is possible to reflect the photographer's intention regarding the display mode at the time of reproducing the three-dimensional data V0.

次いで、本発明の第2の実施形態について説明する。図15は本発明の第1の実施形態による3次元形状測定装置および3次元形状再生装置を適用したステレオカメラ1の内部構成を示す概略ブロック図である。なお、第2の実施形態において第1の実施形態と同一の構成については同一の参照番号を付与し、ここでは詳細な説明は省略する。第2の実施形態によるステレオカメラ1Aは、3次元データ生成部30が表示用の3次元データの生成に使用する演算方式を決定するための演算方式決定部31を備えた点が第1の実施形態と異なる。なお、第2の実施形態における3次元データ生成部30は、演算方式決定部31の決定結果に応じて、低解像度および中解像度の3次元データV0″,V0′を生成する際にも、サブピクセル位置推定およびオクルージョン補間を行う場合があるものとする。   Next, a second embodiment of the present invention will be described. FIG. 15 is a schematic block diagram showing an internal configuration of the stereo camera 1 to which the three-dimensional shape measuring apparatus and the three-dimensional shape reproducing apparatus according to the first embodiment of the present invention are applied. In the second embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and detailed description thereof is omitted here. The stereo camera 1A according to the second embodiment is provided with an arithmetic method determining unit 31 for determining an arithmetic method used by the three-dimensional data generating unit 30 to generate three-dimensional data for display. Different from form. Note that the three-dimensional data generation unit 30 in the second embodiment also generates sub-resolution and medium resolution three-dimensional data V0 ″ and V0 ′ according to the determination result of the calculation method determination unit 31. Assume that pixel position estimation and occlusion interpolation may be performed.

ここで、演算方式決定部31は、モニタ20の解像度、モニタ20の3次元画像の再生に要する速度、撮像部21A,21Bの出力形式、および表示パラメータに応じて演算方式を決定するものである。   Here, the calculation method determination unit 31 determines the calculation method according to the resolution of the monitor 20, the speed required for reproducing the three-dimensional image of the monitor 20, the output formats of the imaging units 21A and 21B, and the display parameters. .

次いで、第2の実施形態において行われる処理について説明する。なお、第2の実施形態において行われる処理は、第1の実施形態において、撮影後に表示用3次元データを生成するまでの間において行われ、決定された演算方式に基づいて表示用3次元データを生成する点を除いて、行われる処理は第1の実施形態と同一である。このため、以降の説明においては、演算方式を決定する処理についてのみ説明する。まず、モニタ20の解像度に応じた演算方式の決定の処理を第1の処理として説明する。図16は第2の実施形態において行われる演算方式決定の第1の処理を示すフローチャートである。   Next, processing performed in the second embodiment will be described. Note that the processing performed in the second embodiment is performed in the first embodiment until the generation of the display three-dimensional data after shooting, and the display three-dimensional data based on the determined calculation method. The processing performed is the same as that of the first embodiment except for generating. For this reason, in the following description, only the process for determining the calculation method will be described. First, the process of determining the calculation method according to the resolution of the monitor 20 will be described as the first process. FIG. 16 is a flowchart showing a first process for determining an arithmetic method performed in the second embodiment.

まず、演算方式決定部31が、モニタ20の解像度を取得する(ステップST21)。そして、3次元データ生成部30が探索する対応点の位置が1画素ずれた場合の、モニタ20上における対応点のずれ量を算出する(ステップST22)。ここで、算出したずれ量がモニタ20の1画素以下であれば、表示される3次元画像には差は生じないため、サブピクセル位置推定を行う必要がない。   First, the calculation method determination unit 31 acquires the resolution of the monitor 20 (step ST21). Then, the shift amount of the corresponding point on the monitor 20 when the position of the corresponding point searched by the three-dimensional data generation unit 30 is shifted by one pixel is calculated (step ST22). Here, if the calculated shift amount is equal to or less than one pixel of the monitor 20, there is no difference in the displayed three-dimensional image, so there is no need to perform subpixel position estimation.

このため、演算方式決定部31は、探索する対応点の位置が1画素ずれた場合の、モニタ20上における対応点のずれ量がモニタの1画素以下であるか否かを判定し(ステップST23)、ステップST23が肯定されると、サブピクセル位置推定を行わない演算方式を選択し(ステップST24)、処理を終了する。一方、ステップST23が否定されると、サブピクセル位置推定を行う演算方式を選択し(ステップST25)、処理を終了する。   Therefore, the calculation method determination unit 31 determines whether or not the shift amount of the corresponding point on the monitor 20 is equal to or smaller than one pixel of the monitor when the position of the corresponding point to be searched is shifted by one pixel (step ST23). ) If step ST23 is affirmed, a calculation method that does not perform sub-pixel position estimation is selected (step ST24), and the process ends. On the other hand, if step ST23 is negative, a calculation method for performing subpixel position estimation is selected (step ST25), and the process is terminated.

これにより、3次元画像の表示に反映されないサブピクセル位置推定のための演算を行う必要がなくなるため、表示用の3次元データの生成の速度を向上させることができる。   This eliminates the need to perform a calculation for sub-pixel position estimation that is not reflected in the display of the three-dimensional image, thereby improving the speed of generating the three-dimensional data for display.

次いで、モニタ20の3次元画像の再生に要する時間に応じた演算方式の決定の処理を第2の処理として説明する。図17は第2の実施形態において行われる演算方式決定の第2の処理を示すフローチャートである。なお、第2の処理は、一旦、上記第1の実施形態と同様に表示用の3次元データV0′を生成した後の、2回目以降の表示用の3次元データの生成時に行われる。   Next, the processing for determining the calculation method according to the time required to reproduce the three-dimensional image on the monitor 20 will be described as the second processing. FIG. 17 is a flowchart showing the second processing of the calculation method determination performed in the second embodiment. Note that the second process is performed at the time of generating the display three-dimensional data for the second and subsequent times after generating the display three-dimensional data V0 ′ once as in the first embodiment.

まず、演算方式決定部31が、前回の処理において生成した表示用の3次元データのデータ量を取得する(ステップST31)。そして、取得した3次元データのデータ量から、スルー画像表示時の1フレームの表示に要する時間Tfを算出する(ステップST32)。なお、1フレームの表示に要する時間とは、3次元データを仮想的に設定した2次元平面に投影して2次元の表示用の3次元画像をモニタ20に表示するまでに要する時間である。   First, the calculation method determination part 31 acquires the data amount of the three-dimensional data for display produced | generated in the last process (step ST31). Then, a time Tf required to display one frame at the time of displaying a through image is calculated from the data amount of the acquired three-dimensional data (step ST32). The time required to display one frame is the time required to project 3D data onto a virtually set 2D plane and display a 2D display 3D image on the monitor 20.

ここで、本実施形態においては、粗密探索法においてN段階の解像度の基準画像および参照画像から対応点を探索しているため、対応点を探索して3次元データを算出するのに必要な段階毎の演算時間Tiを算出する(ステップST33)。なお、本実施形態においてはN=3であるため、i=1〜3となる。次いで、対応点探索の段階iを初期値に設定し(i=1、ステップST34)、i段目までの演算に要する時間が1フレームの表示に要する時間を上回っているか否かを判定する(Ti>Tf:ステップST35)。   Here, in the present embodiment, since the corresponding points are searched from the standard image and the reference image having N levels of resolution in the coarse / fine search method, the steps necessary to search the corresponding points and calculate the three-dimensional data. The calculation time Ti for each is calculated (step ST33). In this embodiment, since N = 3, i = 1 to 3. Next, the corresponding point search stage i is set to an initial value (i = 1, step ST34), and it is determined whether or not the time required to calculate up to the i-th stage exceeds the time required to display one frame ( Ti> Tf: Step ST35).

ステップST35が肯定されると、i>1であるか否かを判定し(ステップST36)、ステップST36が肯定されると、i=i−1として(ステップST37)、i段目に算出する3次元データを表示用の3次元データに決定し(ステップST38)、処理を終了する。なお、ステップST36が否定されるとステップST38の処理に進む。   If step ST35 is affirmed, it is determined whether or not i> 1 (step ST36). If step ST36 is affirmed, i = i-1 (step ST37), and calculation is performed at the i-th stage 3 The three-dimensional data is determined as display three-dimensional data (step ST38), and the process is terminated. If step ST36 is negative, the process proceeds to step ST38.

ステップST35が否定されると、i=Nであるか否かを判定し(ステップST39)、ステップST39が否定されると、i=i+1として(ステップST40)、ステップST35に戻る。なお、ステップST39が肯定されるとステップST38の処理に進む。   If step ST35 is negative, it is determined whether i = N (step ST39). If step ST39 is negative, i = i + 1 (step ST40) and the process returns to step ST35. If step ST39 is affirmed, the process proceeds to step ST38.

これにより、表示可能なフレームレート内において可能な限り精度の高い表示用の3次元データを生成することができる。   This makes it possible to generate three-dimensional data for display with the highest possible accuracy within the displayable frame rate.

次いで、撮像部21A,21Bの出力形式に応じた演算方式の決定の処理を、第3の処理として説明する。図18は第2の実施形態において行われる演算方式決定の第3の処理を示すフローチャートである。   Next, the process of determining the calculation method according to the output format of the imaging units 21A and 21B will be described as a third process. FIG. 18 is a flowchart showing a third process of the calculation method determination performed in the second embodiment.

まず、演算方式決定部31が、撮像部21A,21Bの出力形式が、画素混合出力であるか否かを判定する(ステップST51)。ステップST51が肯定されると、基準画像G1および参照画像G2の画像データのすべてのデータを、3次元データの算出のために使用する演算方式(第1の演算方式とする)に決定し(ステップST52)、処理を終了する。   First, the calculation method determination unit 31 determines whether or not the output format of the imaging units 21A and 21B is a pixel mixed output (step ST51). If step ST51 is affirmed, all the data of the image data of the base image G1 and the reference image G2 are determined as a calculation method (first calculation method) to be used for calculation of three-dimensional data (step 1). ST52), the process ends.

ステップST51が否定されると、撮像部21A,21Bの出力形式が、インターレース出力であるか否かを判定する(ステップST53)。ステップST53が肯定されると、基準画像G1および参照画像G2の画像データの奇数フィールドまたは偶数フィールドのみのデータを、3次元データの算出のために使用する演算方式(第2の演算方式とする)に決定し(ステップST54)、処理を終了する。   If step ST51 is negative, it is determined whether the output format of the imaging units 21A and 21B is an interlaced output (step ST53). If step ST53 is affirmed, an arithmetic method that uses only the odd-numbered field or even-numbered field data of the image data of the base image G1 and the reference image G2 to calculate three-dimensional data (the second arithmetic method). (Step ST54), and the process ends.

ステップST53が否定されると、画素混合出力およびインターレース出力のいずれの形式でもないことから、演算時間を短縮するために、データを間引いて3次元データを算出する演算方式に決定し(ステップST55)、処理を終了する。   If step ST53 is negative, neither the pixel mixed output nor the interlaced output is used, so in order to shorten the calculation time, a calculation method for thinning out data and calculating three-dimensional data is determined (step ST55). The process is terminated.

これにより、撮像部21A,21Bの出力形式に応じて、可能な限り測定精度および解像度が高い表示用の3次元データを生成することができる。   Thereby, according to the output format of imaging part 21A, 21B, the three-dimensional data for a display with as high a measurement precision and resolution as possible can be produced | generated.

次いで、表示パラメータに応じた演算方式の決定の処理を第4の処理として説明する。図19は第2の実施形態において行われる演算方式決定の第4の処理を示すフローチャートである。なお、第4の処理は、一旦、上記第1の実施形態と同様に表示用の3次元データV0′を生成した後の、2回目以降の表示用の3次元データの生成時に行われる。   Next, the process of determining the calculation method according to the display parameter will be described as a fourth process. FIG. 19 is a flowchart showing a fourth process for determining the calculation method performed in the second embodiment. Note that the fourth processing is performed at the time of generating the display three-dimensional data for the second and subsequent times after generating the display three-dimensional data V0 ′ once as in the first embodiment.

まず、演算方式決定部31が、現在の表示パラメータを取得する(ステップST61)。そして、現在表示中の3次元データにより表される3次元画像において、メッシュモデルを構成する面のうち、表示されない面(すなわちオクルージョンとなる面)を検出する(ステップST62)。そして、メッシュを構成する各対応点から、表示されない面のみを構成する非表示対応点を検出する(ステップST63)。そして、演算方式決定部31が、非表示対応点を次回の3次元データ生成時におけるステレオマッチングの対象から除外し(ステップST64)、処理を終了する。   First, the calculation method determination unit 31 acquires the current display parameter (step ST61). Then, in the three-dimensional image represented by the currently displayed three-dimensional data, a surface that is not displayed (that is, a surface that becomes occlusion) is detected among the surfaces constituting the mesh model (step ST62). And the non-display corresponding point which comprises only the surface which is not displayed is detected from each corresponding point which comprises a mesh (step ST63). Then, the calculation method determination unit 31 excludes the non-display corresponding point from the target of stereo matching at the time of generating the next three-dimensional data (step ST64), and the process ends.

これにより、モニタ20に表示される3次元形状についてのみ、ステレオマッチングが行われるため、演算量を低減でき、その結果、より高速に表示用の3次元データを生成することができる。   Thereby, since stereo matching is performed only for the three-dimensional shape displayed on the monitor 20, the amount of calculation can be reduced, and as a result, three-dimensional data for display can be generated at higher speed.

なお、第2の実施形態においては、モニタ20の解像度、モニタ20の3次元画像の再生に要する速度、撮像部21A,21Bの出力形式、および表示パラメータのうちの少なくとも1つに応じて演算方式を決定するようにしてもよい。この場合、これらのいずれに応じて演算方式を決定するかについては、撮影者が入出力部37を用いて入力するものとしてもよいが、あらかじめステレオカメラにおいて設定しておくようにしてもよい。   In the second embodiment, a calculation method is selected according to at least one of the resolution of the monitor 20, the speed required to reproduce the three-dimensional image on the monitor 20, the output format of the imaging units 21A and 21B, and the display parameters. May be determined. In this case, the photographer may be input using the input / output unit 37 to determine the calculation method depending on any of these, but may be set in the stereo camera in advance.

また、上記第1および第2の実施形態においては、3次元データ生成部30において、表示用および記録用の3次元データを生成しているが、図20に示す第3の実施形態によるステレオカメラ1Bのように、表示用の3次元データを生成する表示用3次元データ生成部32および記録用の3次元データを生成する記録用3次元データ生成部33を設けるようにしてもよい。   In the first and second embodiments, the three-dimensional data generating unit 30 generates three-dimensional data for display and recording. The stereo camera according to the third embodiment shown in FIG. As in 1B, a display three-dimensional data generation unit 32 that generates display three-dimensional data and a recording three-dimensional data generation unit 33 that generates recording three-dimensional data may be provided.

また、上記第1および第2の実施形態においては、表示用および記録用の3次元データの生成後に、精度を向上するために、再帰的に3次元データを生成し直したり、3次元形状を整えるためのスムージング処理を行うようにしてもよい。なお、第2の実施形態においては、再帰的な3次元データの生成およびスムージング処理の実行の有無について、演算方式決定部31が決定するようにしてもよい。   In the first and second embodiments, after the generation of the display and recording three-dimensional data, the three-dimensional data is recursively regenerated or the three-dimensional shape is changed in order to improve accuracy. You may make it perform the smoothing process for adjusting. In the second embodiment, the calculation method determination unit 31 may determine whether to generate recursive three-dimensional data and perform a smoothing process.

また、上記第1および第2の実施形態においては、3次元画像ファイルに基準画像および参照画像の画像データを含めているが、基準画像の画像データのみを含めてもよい。また、3次元画像ファイルに基準画像および参照画像の画像データを含めることなく、3次元データのみを含めてもよい。   In the first and second embodiments, the image data of the standard image and the reference image are included in the three-dimensional image file. However, only the image data of the standard image may be included. Further, only the 3D data may be included in the 3D image file without including the image data of the standard image and the reference image.

また、上記第1および第2の実施形態においては、2つの撮像部21A,21Bを設け、2つの撮像部21A,21Bのそれぞれにより取得した画像から3次元データを生成しているが、3以上の撮像部を設け、取得された3以上の画像データから3次元データを生成するようにしてもよい。   In the first and second embodiments, two imaging units 21A and 21B are provided, and three-dimensional data is generated from images acquired by the two imaging units 21A and 21B. The three-dimensional data may be generated from the acquired three or more image data.

なお、上記第1および第2の実施形態においては、本発明による3次元形状測定装置および3次元形状再生装置を撮像部21A,21Bを備えたステレオカメラに適用しているが、撮像部21A,21Bと3次元形状測定装置および3次元形状再生装置とを別個に設けるようにしてもよい。また、3次元形状測定装置および3次元形状再生装置を別個に設けるようにしてもよい。   In the first and second embodiments, the three-dimensional shape measuring apparatus and the three-dimensional shape reproducing apparatus according to the present invention are applied to a stereo camera including the imaging units 21A and 21B. 21B, the three-dimensional shape measuring device, and the three-dimensional shape reproducing device may be provided separately. Further, the three-dimensional shape measuring device and the three-dimensional shape reproducing device may be provided separately.

以上、本発明の実施形態について説明したが、コンピュータを、上記の3次元データ生成部30に対応する手段として機能させ、図10,12,16〜19に示すような処理を行わせるプログラムも、本発明の実施形態の1つである。また、そのようなプログラムを記録したコンピュータ読取り可能な記録媒体も、本発明の実施形態の1つである。   As mentioned above, although embodiment of this invention was described, the program which makes a computer function as a means corresponding to said three-dimensional data generation part 30, and performs a process as shown in FIG. It is one of the embodiments of the present invention. A computer-readable recording medium in which such a program is recorded is also one embodiment of the present invention.

本発明の第1の実施形態による3次元形状測定装置および3次元形状再生装置を適用したステレオカメラの内部構成を示す概略ブロック図1 is a schematic block diagram showing an internal configuration of a stereo camera to which a three-dimensional shape measuring apparatus and a three-dimensional shape reproducing apparatus according to a first embodiment of the present invention are applied. 撮像部の構成を示す図Diagram showing the configuration of the imaging unit ステレオマッチングを説明するための図Diagram for explaining stereo matching 並行化処理後の基準画像および参照画像の位置関係を説明するための図The figure for demonstrating the positional relationship of the reference | standard image after a parallelization process, and a reference image 3次元データ生成部における処理ブロック図Processing block diagram in the three-dimensional data generation unit 粗密探索法を説明するための図Diagram for explaining the coarse / fine search method サブピクセル位置推定の手法を説明するための図Diagram for explaining the method of subpixel position estimation 隠れ点を説明するための図Illustration for explaining hidden points オクルージョン補間を説明するための図Illustration for explaining occlusion interpolation 第1の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 1st Embodiment. 3次元画像の表示を説明するためのステレオカメラの背面図Rear view of stereo camera for explaining display of 3D image 第1の実施形態において再生時に行われる処理を示すフローチャートThe flowchart which shows the process performed at the time of reproduction | regeneration in 1st Embodiment 撮影時の表示パラメータを使用するか否かの選択画面を示す図The figure which shows the selection screen of whether to use the display parameter at the time of photography 基準画像および参照画像を表示した状態を示す図The figure which shows the state which displayed the reference | standard image and the reference image 本発明の第2の実施形態による3次元形状測定装置および3次元形状再生装置を適用したステレオカメラの内部構成を示す概略ブロック図The schematic block diagram which shows the internal structure of the stereo camera to which the 3D shape measuring apparatus and 3D shape reproduction | regeneration apparatus by the 2nd Embodiment of this invention are applied. 第2の実施形態において行われる演算方式決定の第1の処理を示すフローチャートThe flowchart which shows the 1st process of the calculation method determination performed in 2nd Embodiment. 第2の実施形態において行われる演算方式決定の第2の処理を示すフローチャートThe flowchart which shows the 2nd process of the calculation method determination performed in 2nd Embodiment. 第2の実施形態において行われる演算方式決定の第3の処理を示すフローチャートThe flowchart which shows the 3rd process of the calculation method determination performed in 2nd Embodiment. 第2の実施形態において行われる演算方式決定の第4の処理を示すフローチャートThe flowchart which shows the 4th process of the calculation method determination performed in 2nd Embodiment. 本発明の第3の実施形態による3次元形状測定装置および3次元形状再生装置を適用したステレオカメラの内部構成を示す概略ブロック図The schematic block diagram which shows the internal structure of the stereo camera to which the 3D shape measuring apparatus and 3D shape reproduction | regeneration apparatus by the 3rd Embodiment of this invention are applied.

符号の説明Explanation of symbols

1,1A,1B ステレオカメラ
21A,21B 撮像部
30 3次元データ生成部
31 演算方式決定部
32 表示用3次元データ生成部
33 記録用3次元データ生成部
1, 1A, 1B Stereo camera 21A, 21B Imaging unit 30 Three-dimensional data generation unit 31 Calculation method determination unit 32 Display three-dimensional data generation unit 33 Recording three-dimensional data generation unit

Claims (14)

被写体を異なる位置から撮影することにより取得した複数の画像をそれぞれ表す複数の画像データを取得する画像データ取得手段と、
前記複数の画像データから、前記被写体の3次元形状を表す3次元データを生成する3次元データ生成手段であって、精度が異なる第1および第2の3次元データを生成する3次元データ生成手段とを備えたことを特徴とする3次元形状測定装置。
Image data acquisition means for acquiring a plurality of image data respectively representing a plurality of images acquired by photographing a subject from different positions;
3D data generating means for generating 3D data representing the 3D shape of the subject from the plurality of image data, wherein the 3D data generating means generates first and second 3D data having different accuracy. And a three-dimensional shape measuring apparatus.
前記第1の3次元データの生成のための演算方法を決定する演算方法決定手段をさらに備え、
前記3次元データ生成手段は、該決定された演算方法により前記第1の3次元データを生成する手段であることを特徴とする請求項1記載の3次元形状測定装置。
A calculation method determining means for determining a calculation method for generating the first three-dimensional data;
2. The three-dimensional shape measuring apparatus according to claim 1, wherein the three-dimensional data generating means is means for generating the first three-dimensional data by the determined calculation method.
前記演算方法決定手段は、前記3次元形状を表示する表示手段の解像度、該表示手段の前記3次元形状の表示速度および前記撮像手段の出力形式の少なくとも1つに基づいて、前記演算方法を決定する手段であることを特徴とする請求項2記載の3次元形状測定装置。   The calculation method determining means determines the calculation method based on at least one of the resolution of the display means for displaying the three-dimensional shape, the display speed of the three-dimensional shape of the display means, and the output format of the imaging means. The three-dimensional shape measuring apparatus according to claim 2, wherein 前記第1の3次元データにより表される前記被写体の3次元形状を表示手段に表示するに際し、該3次元形状の表示パラメータの指定を受け付けるパラメータ指定手段と、
前記指定された表示パラメータにより前記第1の3次元データにより表される前記3次元形状を前記表示手段に表示する表示制御手段とをさらに備えたことを特徴とする請求項1から3のいずれか1項記載の3次元形状測定装置。
Parameter designation means for accepting designation of a display parameter of the three-dimensional shape when displaying the three-dimensional shape of the subject represented by the first three-dimensional data on a display means;
4. The display control unit according to claim 1, further comprising a display control unit that displays the three-dimensional shape represented by the first three-dimensional data on the display unit according to the designated display parameter. 3. The three-dimensional shape measuring apparatus according to item 1.
前記第1の3次元データにより表される前記被写体の3次元形状を表示手段に表示するに際し、該3次元形状の表示パラメータの指定を受け付けるパラメータ指定手段と、
前記表示パラメータに応じて前記第1の3次元データの演算方法を決定する演算方法決定手段とをさらに備え、
前記3次元データ生成手段は、該決定された演算方法により前記第1の3次元データを生成する手段であることを特徴とする請求項1記載の3次元形状測定装置。
Parameter designation means for accepting designation of a display parameter of the three-dimensional shape when displaying the three-dimensional shape of the subject represented by the first three-dimensional data on a display means;
A calculation method determining means for determining a calculation method of the first three-dimensional data according to the display parameter;
2. The three-dimensional shape measuring apparatus according to claim 1, wherein the three-dimensional data generating means is means for generating the first three-dimensional data by the determined calculation method.
前記3次元データ生成手段は、段階的に精度が異なる複数の3次元データを低い精度から順次生成し、該生成の途中段階の3次元データを前記第1の3次元データとして出力する手段であることを特徴とする請求項1から5のいずれか1項記載の3次元形状測定装置。   The three-dimensional data generation means is means for sequentially generating a plurality of three-dimensional data having different accuracy in stages from a low accuracy and outputting the intermediate three-dimensional data as the first three-dimensional data. The three-dimensional shape measuring apparatus according to any one of claims 1 to 5, wherein 前記3次元データ生成手段は、前記第1の3次元データを生成する第1の手段と、前記第2の3次元データを生成する第2の手段とを備えてなることを特徴とする請求項1から5のいずれか1項記載の3次元形状測定装置。   The three-dimensional data generation means includes first means for generating the first three-dimensional data and second means for generating the second three-dimensional data. The three-dimensional shape measuring apparatus according to any one of 1 to 5. 請求項4から7のいずれか1項記載の3次元形状測定装置により取得された前記第2の3次元データおよび前記表示パラメータを取得するデータ取得手段と、
前記表示パラメータに基づいて前記第2の3次元データにより表される3次元形状の画像を表示する表示手段とを備えたことを特徴とする3次元形状再生装置。
Data acquisition means for acquiring the second three-dimensional data and the display parameter acquired by the three-dimensional shape measuring apparatus according to any one of claims 4 to 7,
A three-dimensional shape reproducing apparatus comprising: display means for displaying an image having a three-dimensional shape represented by the second three-dimensional data based on the display parameter.
被写体を異なる位置から撮影することにより取得した複数の画像をそれぞれ表す複数の画像データを取得し、
前記複数の画像データから、前記被写体の3次元形状を表す3次元データを生成するに際し、精度が異なる第1および第2の3次元データを生成することを特徴とする3次元形状測定方法。
Obtaining a plurality of image data respectively representing a plurality of images obtained by photographing the subject from different positions;
A three-dimensional shape measuring method characterized by generating first and second three-dimensional data with different accuracy when generating three-dimensional data representing a three-dimensional shape of the subject from the plurality of image data.
前記第1の3次元データにより表される前記被写体の3次元形状を表示手段に表示するに際し、該3次元形状の表示パラメータの指定を受け付け、
前記指定された表示パラメータにより前記第1の3次元データにより表される前記3次元形状を前記表示手段に表示することを特徴とする請求項9記載の3次元形状測定方法。
When displaying on the display means the three-dimensional shape of the subject represented by the first three-dimensional data, designation of display parameters for the three-dimensional shape is accepted,
10. The three-dimensional shape measurement method according to claim 9, wherein the three-dimensional shape represented by the first three-dimensional data is displayed on the display means by the designated display parameter.
請求項10記載の3次元形状測定方法により取得された前記第2の3次元データおよび前記表示パラメータを取得し、
前記表示パラメータに基づいて前記第2の3次元データにより表される3次元形状を表示することを特徴とする3次元形状再生方法。
The second three-dimensional data and the display parameter acquired by the three-dimensional shape measurement method according to claim 10 are acquired,
A three-dimensional shape reproduction method, comprising: displaying a three-dimensional shape represented by the second three-dimensional data based on the display parameter.
被写体を異なる位置から撮影することにより取得した複数の画像をそれぞれ表す複数の画像データを取得する手順と、
前記複数の画像データから、前記被写体の3次元形状を表す3次元データを生成するに際し、精度が異なる第1および第2の3次元データを生成する手順とを有することを特徴とする3次元形状測定方法をコンピュータに実行させるためのプログラム。
A procedure for acquiring a plurality of image data respectively representing a plurality of images acquired by photographing a subject from different positions;
A step of generating first and second three-dimensional data having different accuracy when generating three-dimensional data representing the three-dimensional shape of the subject from the plurality of image data. A program for causing a computer to execute a measurement method.
前記第1の3次元データにより表される前記被写体の3次元形状を表示手段に表示するに際し、該3次元形状の表示パラメータの指定を受け付ける手順と、
前記指定された表示パラメータにより前記第1の3次元データにより表される前記3次元形状を前記表示手段に表示する手順とをさらに有することを特徴とする請求項12記載のプログラム。
A procedure for receiving designation of a display parameter of the three-dimensional shape when displaying the three-dimensional shape of the subject represented by the first three-dimensional data on a display unit;
13. The program according to claim 12, further comprising a step of displaying the three-dimensional shape represented by the first three-dimensional data on the display means by the designated display parameter.
請求項10記載の3次元形状測定方法により取得された前記第2の3次元データおよび前記表示パラメータを取得する手順と、
前記表示パラメータに基づいて前記第2の3次元データにより表される3次元形状を表示する手順とを有することを特徴とする3次元形状再生方法をコンピュータに実行させるためのプログラム。
A procedure for acquiring the second three-dimensional data and the display parameter acquired by the three-dimensional shape measurement method according to claim 10;
A program for causing a computer to execute a three-dimensional shape reproduction method, comprising: displaying a three-dimensional shape represented by the second three-dimensional data based on the display parameter.
JP2008005234A 2008-01-15 2008-01-15 Three-dimensional shape measuring device and method, three-dimensional shape regenerating device and method, and program Abandoned JP2009168536A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008005234A JP2009168536A (en) 2008-01-15 2008-01-15 Three-dimensional shape measuring device and method, three-dimensional shape regenerating device and method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008005234A JP2009168536A (en) 2008-01-15 2008-01-15 Three-dimensional shape measuring device and method, three-dimensional shape regenerating device and method, and program

Publications (1)

Publication Number Publication Date
JP2009168536A true JP2009168536A (en) 2009-07-30

Family

ID=40969880

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008005234A Abandoned JP2009168536A (en) 2008-01-15 2008-01-15 Three-dimensional shape measuring device and method, three-dimensional shape regenerating device and method, and program

Country Status (1)

Country Link
JP (1) JP2009168536A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011145149A (en) * 2010-01-14 2011-07-28 Yokogawa Electric Corp Measuring device
WO2014171438A1 (en) * 2013-04-19 2014-10-23 凸版印刷株式会社 Three-dimensional shape measurement device, three-dimensional shape measurement method, and three-dimensional shape measurement program
WO2014171418A1 (en) * 2013-04-19 2014-10-23 凸版印刷株式会社 Three-dimensional shape measurement device, three-dimensional shape measurement method, and three-dimensional shape measurement program
JP2019049572A (en) * 2018-12-26 2019-03-28 株式会社ニコン Imaging device, information processing device, and imaging system
US11151783B2 (en) 2014-09-03 2021-10-19 Nikon Corporation Image pickup device, information processing device, and image pickup system
US11151733B2 (en) 2016-03-09 2021-10-19 Nikon Corporation Detection device, information processing device, detection method, storage medium, and detection system
JP2022058770A (en) * 2020-03-03 2022-04-12 キヤノン株式会社 Image processing apparatus, image processing system, image processing method, and program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04203908A (en) * 1990-11-29 1992-07-24 Matsushita Electric Ind Co Ltd Method and apparatus for acquiring three-dimensional data
JP2001169308A (en) * 1999-12-06 2001-06-22 Mixed Reality Systems Laboratory Inc Depth information measurement instrument and composite reality exhibition system
JP2002056379A (en) * 2000-08-11 2002-02-20 Minolta Co Ltd Three-dimensional data generating device
JP2002197443A (en) * 2000-12-25 2002-07-12 Minolta Co Ltd Generator of three-dimensional form data
JP2002352271A (en) * 2001-05-28 2002-12-06 Olympus Optical Co Ltd Three-dimensional image acquisition device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04203908A (en) * 1990-11-29 1992-07-24 Matsushita Electric Ind Co Ltd Method and apparatus for acquiring three-dimensional data
JP2001169308A (en) * 1999-12-06 2001-06-22 Mixed Reality Systems Laboratory Inc Depth information measurement instrument and composite reality exhibition system
JP2002056379A (en) * 2000-08-11 2002-02-20 Minolta Co Ltd Three-dimensional data generating device
JP2002197443A (en) * 2000-12-25 2002-07-12 Minolta Co Ltd Generator of three-dimensional form data
JP2002352271A (en) * 2001-05-28 2002-12-06 Olympus Optical Co Ltd Three-dimensional image acquisition device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011145149A (en) * 2010-01-14 2011-07-28 Yokogawa Electric Corp Measuring device
WO2014171438A1 (en) * 2013-04-19 2014-10-23 凸版印刷株式会社 Three-dimensional shape measurement device, three-dimensional shape measurement method, and three-dimensional shape measurement program
WO2014171418A1 (en) * 2013-04-19 2014-10-23 凸版印刷株式会社 Three-dimensional shape measurement device, three-dimensional shape measurement method, and three-dimensional shape measurement program
CN105143816A (en) * 2013-04-19 2015-12-09 凸版印刷株式会社 Three-dimensional shape measurement device, three-dimensional shape measurement method, and three-dimensional shape measurement program
JPWO2014171438A1 (en) * 2013-04-19 2017-02-23 凸版印刷株式会社 3D shape measuring apparatus, 3D shape measuring method, and 3D shape measuring program
US9704255B2 (en) 2013-04-19 2017-07-11 Toppan Printing Co., Ltd. Three-dimensional shape measurement device, three-dimensional shape measurement method, and three-dimensional shape measurement program
US11151783B2 (en) 2014-09-03 2021-10-19 Nikon Corporation Image pickup device, information processing device, and image pickup system
US11151733B2 (en) 2016-03-09 2021-10-19 Nikon Corporation Detection device, information processing device, detection method, storage medium, and detection system
JP2019049572A (en) * 2018-12-26 2019-03-28 株式会社ニコン Imaging device, information processing device, and imaging system
JP2022058770A (en) * 2020-03-03 2022-04-12 キヤノン株式会社 Image processing apparatus, image processing system, image processing method, and program
JP7439146B2 (en) 2020-03-03 2024-02-27 キヤノン株式会社 Image processing system, image processing method and program

Similar Documents

Publication Publication Date Title
JP5754312B2 (en) Image processing apparatus, image processing method, and program
JP4886716B2 (en) Image processing apparatus and method, and program
JP5127787B2 (en) Compound eye photographing apparatus and control method thereof
JP2018513640A (en) Automatic panning shot generation
JP2010268441A (en) Image processor, imaging device, and image reproducing device
JP2012199752A (en) Image processing apparatus, image processing method, and program
JP2009147572A (en) Imaging apparatus
JP2009053748A (en) Image processing apparatus, image processing program, and camera
JP2009168536A (en) Three-dimensional shape measuring device and method, three-dimensional shape regenerating device and method, and program
JPWO2012002046A1 (en) Stereoscopic panorama image synthesis device, compound eye imaging device, and stereo panorama image synthesis method
JP5526233B2 (en) Stereoscopic image photographing apparatus and control method thereof
JP2010063067A (en) Image processing device and method, and program
JP2011114823A (en) Image processing apparatus, and imaging apparatus
WO2010032649A1 (en) Image display device and imaging apparatus
JP5144456B2 (en) Image processing apparatus and method, image reproducing apparatus and method, and program
JP2009258005A (en) Three-dimensional measuring device and three-dimensional measuring method
JP2017143354A (en) Image processing apparatus and image processing method
JP2013247543A (en) Imaging device, display device, image processing method and program
JP2008116663A (en) Imaging apparatus
JP2009044329A (en) Program, image processing method, and image processor
JP5363872B2 (en) Image correction apparatus and program thereof
JP6478587B2 (en) Image processing apparatus, image processing method and program, and imaging apparatus
JP6648916B2 (en) Imaging device
JP2013118472A (en) Image processing apparatus, imaging apparatus and image processing program
JP5744642B2 (en) Image processing apparatus, image processing method, and program.

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100707

RD15 Notification of revocation of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7435

Effective date: 20110418

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110909

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111004

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111130

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20120316