JP2012022716A - Apparatus, method and program for processing three-dimensional image, and three-dimensional imaging apparatus - Google Patents
Apparatus, method and program for processing three-dimensional image, and three-dimensional imaging apparatus Download PDFInfo
- Publication number
- JP2012022716A JP2012022716A JP2011232129A JP2011232129A JP2012022716A JP 2012022716 A JP2012022716 A JP 2012022716A JP 2011232129 A JP2011232129 A JP 2011232129A JP 2011232129 A JP2011232129 A JP 2011232129A JP 2012022716 A JP2012022716 A JP 2012022716A
- Authority
- JP
- Japan
- Prior art keywords
- image
- corresponding points
- points
- feature points
- target 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.)
- Abandoned
Links
Images
Landscapes
- Image Processing (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は立体画像処理装置、方法及びプログラム並びに立体撮像装置に係り、特に複数の撮像ユニットの設置姿勢、ズーム率等のばらつきに起因する複数の画像間の画角のばらつきを幾何学的に補正する技術に関する。 The present invention relates to a stereoscopic image processing apparatus, method and program, and a stereoscopic imaging apparatus, and in particular, geometrically corrects a variation in angle of view between a plurality of images caused by a variation in installation posture, zoom ratio, and the like of a plurality of imaging units. Related to technology.
1台のカメラに複数の撮像ユニットを備えた、いわゆる複眼カメラは、同一被写体を複数の視点から撮像することができるため、被写体の3次元情報の取得などに用いられる。映像観賞の分野においては、各撮像ユニットから得られた視差のある画像を用い、レンチキュラーレンズシートを利用したプリントなどの3次元映像の観賞媒体が存在し、それら媒体向けの画像入力手段として複眼カメラが用いられている。 A so-called compound eye camera that includes a plurality of imaging units in one camera is capable of capturing the same subject from a plurality of viewpoints, and is therefore used for acquiring three-dimensional information of the subject. In the field of video viewing, there are 3D video viewing media such as prints using lenticular lens sheets using parallax images obtained from each imaging unit, and a compound eye camera as image input means for these media Is used.
前述の通り複眼カメラは、複数の撮像ユニットから構成されているため、各撮像ユニットのレンズ、撮像素子などの特性のばらつき、あるいは撮像ユニットをマウントする際に撮像ユニットごとに設置姿勢にばらつきがあると、良好な視差画像が得られない。特に、後者のばらつきは、正確な視差情報の取得には大きな影響を与えるため、3次元映像の立体感、見やすさなどが損なわれないためにも、撮像ユニットの設置姿勢のばらつきを抑制することが重要である。 As described above, since a compound eye camera is composed of a plurality of imaging units, there are variations in characteristics of lenses, imaging elements, etc. of each imaging unit, or in installation postures for each imaging unit when mounting the imaging unit. As a result, a good parallax image cannot be obtained. In particular, the latter variation greatly affects the acquisition of accurate parallax information, so that the three-dimensional appearance and visibility of the 3D image are not impaired, and the variation in the installation posture of the imaging unit is suppressed. is important.
図11(A)に示すように被写体(人物)を2つの撮像ユニットにより撮像した場合、図11(B)に示すような理想的な視差画像(視差に起因して被写体が水平方向にずれ、カメラの姿勢ばらつきがない視差画像)を得ることは難しく、実際に得られる視差画像は視差だけでなく、撮像ユニットの姿勢に起因する画像のずれが生じる(図11(C))。 When a subject (person) is imaged by two imaging units as shown in FIG. 11A, an ideal parallax image as shown in FIG. 11B (the subject is shifted in the horizontal direction due to parallax, It is difficult to obtain a parallax image having no camera posture variation), and the actually obtained parallax image has not only a parallax, but also an image shift caused by the posture of the imaging unit (FIG. 11C).
複眼カメラ製造の過程において、上記ばらつきが発生しないよう撮像ユニットを高精度にマウントすることが望ましいが、精度を求めるがゆえに生産性の低下、作業工数の増加などといった問題が発生する。 In the process of manufacturing a compound eye camera, it is desirable to mount the imaging unit with high accuracy so that the above-mentioned variation does not occur. However, since accuracy is required, problems such as a decrease in productivity and an increase in man-hours occur.
このような課題に対して、従来、複眼カメラにて撮影された画像を幾何学的に変形させることで、撮像ユニット間の幾何学的な特性差を吸収する方法が提案されている(特許文献1、2)。 In order to solve such problems, conventionally, a method has been proposed in which an image captured by a compound eye camera is geometrically deformed to absorb a geometric characteristic difference between imaging units (Patent Literature). 1, 2).
特許文献1に記載の方法は、複数台のカメラの位置や向きのずれから生じる射影歪みを補正するために、各カメラで撮影された画像をそれぞれ同一平面上に投影し、各カメラの画像を同一平面上の画像に補正するようにしている。
In the method described in
また、特許文献2に記載の方法は、2つの撮像部により被写体を同時に撮影した際に生じる画角のずれのうち、撮像部の姿勢・ズーム率の差に起因するものを補正することを目的とし、各撮像部から得られた画像間で対応点検出を行い、各画像の対応点が一致するような幾何補正パラメータを算出し、それを用いて画像を変形するようにしている。
In addition, the method described in
しかしながら、特許文献1に記載の方法は、各画像を強制的に同一平面上に投影する画像処理を行うため、投影後の画像間に生じる視差は、意図しない不適切なものとなる問題がある。
However, since the method described in
一方、特許文献2に記載の方法は、2つの画像間の対応点が一致するように画像を変形させるため、本来残したい視差に起因する画角ずれも補正されてしまい、視差の情報が失われるという問題がある。
On the other hand, since the method described in
本発明はこのような事情に鑑みてなされたもので、複数の撮像ユニットの設置姿勢、ズーム率等のばらつきに起因する複数の画像間の画角のばらつきを幾何変形により吸収する際に、本来画像間に生じるべき視差による画角ずれを残すように幾何変形することができ、これにより理想的な視差画像を得ることができる立体画像処理装置、方法及びプログラム並びに立体撮像装置を提供することを目的とする。 The present invention has been made in view of such circumstances, and when the variation in the angle of view between the plurality of images due to the variation in the installation posture and the zoom rate of the plurality of imaging units is absorbed by the geometric deformation, To provide a stereoscopic image processing device, method and program, and a stereoscopic imaging device that can be geometrically deformed so as to leave a field angle shift due to parallax that should occur between images, and thereby obtain an ideal parallax image. Objective.
前記目的を達成するために本発明の一の態様に係る立体画像処理装置は、複数の視点から同一被写体を撮影した複数の画像を取得する画像取得手段と、前記取得した複数の画像のうちの所定の画像を基準画像として選択し、前記基準画像以外の画像を対象画像として選択し、前記基準画像と対象画像との間で特徴が略一致する複数の組の対応点を検出する対応点検出手段と、前記同じ組に含まれる特徴点と対応点の、前記複数の視点の視差方向と直交する方向のy座標のみが略一致するように前記対象画像を幾何変形する画像変形手段と、を備えたことを特徴としている。 In order to achieve the above object, a stereoscopic image processing apparatus according to an aspect of the present invention includes an image acquisition unit that acquires a plurality of images obtained by capturing the same subject from a plurality of viewpoints, Corresponding point detection that selects a predetermined image as a reference image, selects an image other than the reference image as a target image, and detects a plurality of sets of corresponding points whose features substantially match between the reference image and the target image And image deformation means for geometrically deforming the target image so that only the y-coordinates of the feature points and the corresponding points included in the same set substantially coincide with each other in the direction orthogonal to the parallax directions of the plurality of viewpoints. It is characterized by having prepared.
本発明の一の態様に係る発明によれば、複数の視点から同一被写体を撮影した複数の画像のうちの所定の画像(基準画像)と前記基準画像以外の画像(対象画像)のそれぞれの対応点間の変位のうち、前記複数の視点の視差方向と直交する方向の成分を略ゼロにするという拘束条件を設けている。即ち、前記検出した複数の組の対応点のうちの一方の対応点のxy座標値と、他方の対応点のxy座標値とのうち、前記複数の視点の視差方向と直交する方向のy座標のみが略一致するように前記対象画像を幾何変形することで、本来、基準画像と対象画像間に生じるべき視差による画角ずれを残しつつ、視差方向と直交する方向の画角ずれを補正することができ、理想的な視差画像を得ることができる。 According to the invention of one aspect of the present invention, correspondence between a predetermined image (reference image) and images other than the reference image (target image) among a plurality of images obtained by photographing the same subject from a plurality of viewpoints. Among the displacements between the points, a constraint condition is set such that the component in the direction orthogonal to the parallax direction of the plurality of viewpoints is made substantially zero. That is, the y coordinate in the direction orthogonal to the parallax direction of the plurality of viewpoints among the xy coordinate value of one of the corresponding points of the plurality of sets of detected points and the xy coordinate value of the other corresponding point. By geometrically deforming the target image so that only the two substantially match each other, the angle of view in the direction orthogonal to the parallax direction is corrected while leaving the angle of view due to the parallax that should originally occur between the reference image and the target image. And an ideal parallax image can be obtained.
本発明の他の態様に係る立体画像処理方法は、複数の視点から同一被写体を撮影した複数の画像を取得する画像取得工程と、前記取得した複数の画像のうちの所定の画像を基準画像として選択し、前記基準画像以外の画像を対象画像として選択し、前記基準画像と対象画像との間で特徴が略一致する複数の組の対応点を検出する対応点検出工程と、前記同じ組に含まれる特徴点と対応点の、前記複数の視点の視差方向と直交する方向のy座標のみが略一致するように前記対象画像を幾何変形する画像変形工程と、を含むことを特徴としている。 A stereoscopic image processing method according to another aspect of the present invention includes an image acquisition step of acquiring a plurality of images obtained by photographing the same subject from a plurality of viewpoints, and using a predetermined image among the acquired plurality of images as a reference image. A corresponding point detecting step for selecting a plurality of corresponding points whose features substantially match between the reference image and the target image, and selecting the image other than the reference image as a target image; And an image deformation step of geometrically deforming the target image so that only the y-coordinates of the included feature points and corresponding points in the direction orthogonal to the parallax directions of the plurality of viewpoints substantially coincide with each other.
本発明の更に他の態様に係る立体画像処理プログラムは、複数の視点から同一被写体を撮影した複数の画像を取得する画像取得機能と、前記取得した複数の画像のうちの所定の画像を基準画像として選択し、前記基準画像以外の画像を対象画像として選択し、前記基準画像と対象画像との間で特徴が略一致する複数の組の対応点を検出する対応点検出機能と、前記同じ組に含まれる特徴点と対応点の、前記複数の視点の視差方向と直交する方向のy座標のみが略一致するように前記対象画像を幾何変形する、立体画像処理プロセスをコンピュータに実行させることを特徴としている。 A stereoscopic image processing program according to still another aspect of the present invention includes an image acquisition function for acquiring a plurality of images obtained by photographing the same subject from a plurality of viewpoints, and a predetermined image among the acquired plurality of images as a reference image. A corresponding point detection function for selecting a plurality of corresponding points whose features substantially match between the reference image and the target image, and selecting the image other than the reference image as a target image; Causing the computer to execute a stereoscopic image processing process in which the target image is geometrically deformed so that only the y-coordinates of the feature points and corresponding points in the direction orthogonal to the parallax directions of the plurality of viewpoints substantially coincide with each other. It is a feature.
本発明の更に他の態様に係る立体画像処理プログラムは、複数の視点から同一被写体を撮影した複数の画像を取得し、前記取得した複数の画像のうちの所定の画像を基準画像として選択し、前記基準画像以外の画像を対象画像として選択し、前記基準画像から複数の特徴点を、前記対象画像から対応点を検出して、同じ組に含まれる特徴点と対応点の特徴が略一致するような特徴点と対応点の組を生成し、前記同じ組に含まれる特徴点と対応点について、前記複数の視点の視差方向と直交する方向のy座標のみが略一致するように前記対象画像を幾何変形するための幾何変形パラメータを推定し、前記推定した幾何変形パラメータに基づいて前記対象画像を幾何変形する、立体画像処理プロセスをコンピュータに実行させることを特徴としている。 A stereoscopic image processing program according to still another aspect of the present invention acquires a plurality of images obtained by photographing the same subject from a plurality of viewpoints, selects a predetermined image from the plurality of acquired images as a reference image, An image other than the reference image is selected as a target image, a plurality of feature points are detected from the reference image, and corresponding points are detected from the target image, and the features of the corresponding points and the features of the corresponding points substantially match. A set of such feature points and corresponding points is generated, and for the feature points and corresponding points included in the same set, only the y-coordinates in the direction orthogonal to the parallax directions of the plurality of viewpoints substantially match. A computer is caused to execute a stereoscopic image processing process that estimates a geometric deformation parameter for geometrically deforming the image, and geometrically deforms the target image based on the estimated geometric deformation parameter. That.
本発明の更に他の態様に係る立体撮像装置は、上記立体画像処理装置と、複数の視点位置にそれぞれ配置され、該視点位置から同一被写体をそれぞれ撮像する複数の撮像ユニットと、を備え、前記画像取得手段は、前記複数の撮像ユニットによってそれぞれ撮像された複数の画像を取得することを特徴としている。 A stereoscopic imaging apparatus according to still another aspect of the present invention includes the stereoscopic image processing apparatus, and a plurality of imaging units that are respectively arranged at a plurality of viewpoint positions and respectively capture the same subject from the viewpoint positions, The image acquisition means acquires a plurality of images respectively captured by the plurality of imaging units.
本発明によれば、複数の視点から同一被写体を撮影した複数の画像のうちの所定の画像(基準画像)と前記基準画像以外の画像(対象画像)のそれぞれの対応点間の変位のうち、前記複数の視点の視差方向と直交する方向の成分を略ゼロにするという拘束条件を設けた上で、対象画像を幾何変形するようにしたため、本来画像間に生じるべき視差による画角ずれを残しつつ、視差方向と直交する方向の画角ずれを補正することができ、理想的な視差画像を得ることができる。 According to the present invention, among the displacements between corresponding points of a predetermined image (reference image) and a non-reference image (target image) among a plurality of images obtained by photographing the same subject from a plurality of viewpoints, Since the target image is geometrically deformed with a constraint condition that the component in the direction orthogonal to the parallax direction of the plurality of viewpoints is set to substantially zero, the view angle deviation due to the parallax that should originally occur between the images remains. On the other hand, it is possible to correct a field angle shift in a direction orthogonal to the parallax direction, and an ideal parallax image can be obtained.
以下、添付図面に従って本発明に係る立体画像処理装置、方法及びプログラム並びに立体撮像装置の好ましい実施の形態について説明する。 Preferred embodiments of a stereoscopic image processing apparatus, method and program, and stereoscopic imaging apparatus according to the present invention will be described below with reference to the accompanying drawings.
[立体撮像装置の全体構成]
図1は本発明に係る立体撮像装置の全体構成を示すブロック図である。
[Overall configuration of stereoscopic imaging apparatus]
FIG. 1 is a block diagram showing the overall configuration of a stereoscopic imaging apparatus according to the present invention.
同図に示すように立体撮像装置10は、6台の撮像ユニット1〜6を備えており、同一の被写体を6視点から撮影した6枚の画像(視差画像)を取得し、所定の形式の記録用画像データとして記録する装置である。
As shown in the figure, the
中央処理装置(CPU12)には、制御バス16を介して撮像ユニット1〜6及び発光部18が接続されるとともに、メインメモリ20、デジタル信号処理部22、積算部24、圧縮伸張処理部26、外部記録部28、表示部30、対応点検出部32、幾何変形部34、及び幾何変形パラメータ推定部36が接続されており、CPU12は、操作部14からの操作入力に基づき所定の制御プログラムに従って立体撮像装置10全体の動作を統括制御する制御手段として機能する。
The central processing unit (CPU 12) is connected with the
また、撮像ユニット1〜6、メインメモリ20、デジタル信号処理部22、積算部24、圧縮伸張処理部26、外部記録部28、表示部30、対応点検出部32、幾何変形部34、及び幾何変形パラメータ推定部36は、それぞれデータバス38を介して接続されている。
In addition, the
撮像ユニット1〜6は、それぞれ図2に示すように同一の構成を有するものであり、撮影レンズ40、絞り41、IRカットフィルタ42、光学ローパスフィルタ43、撮像素子(CCD)44、A/D変換器45、レンズ駆動部46、絞り駆動部47、及びCCD駆動部48から構成されている。
Each of the
撮影レンズ40は、フォーカスレンズ、ズームレンズ等を含み、レンズ駆動部46に駆動されて光軸に沿って前後に移動する。CPU12は、レンズ駆動部46の駆動を制御することにより、フォーカスレンズの位置を制御して被写体に焦点が合うように焦点調節を行うとともに、操作部14からのズーム指令に応じてズームレンズの位置を制御してズーミングを行う。
The taking
絞り41は、例えば、アイリス絞りで構成されており、絞り駆動部47に駆動されて動作する。CPU12は、絞り駆動部47を介して絞り41の開口量(絞り値)を制御し、CCD44への入射光量を制御する。
The
CCD44は、2次元のカラーCCD固体撮像素子により構成されている。CCD44の受光面には、多数のフォトダイオードが2次元的に配列されており、各フォトダイオードには所定の配列でカラーフィルタが配置されている。撮影レンズ40、絞り41、IRカットフィルタ42、及び光学ローパスフィルタ43を介してCCD受光面上に結像された被写体の光学像は、このフォトダイオードによって入射光量に応じた信号電荷に変換される。各フォトダイオードに蓄積された信号電荷は、CPU12の指令に従ってCCD駆動部48から与えられる駆動パルスに基づいて信号電荷に応じた電圧信号(画像信号)としてCCD44から順次読み出される。CCD44は、電子シャッタ機能を備えており、フォトダイオードへの電荷蓄積時間を制御することにより、露光時間(シャッタ速度)が制御される。尚、本実施形態では、撮像素子としてCCD44を用いているが、CMOSセンサ等の他の構成の撮像素子を用いることもできる。
The
CCD44から読み出された画像信号は、A/D変換器45によりデジタル信号に変換された後、データバス38を介して一旦、メインメモリ20に格納される。
The image signal read from the
上記構成の撮像ユニット1〜6は、図3に示すように立体撮像装置10の装置本体に対して水平方向に、かつ所定の間隔(所定の基線長)で配置されており、更に各撮像ユニット1〜6の撮影レンズの光軸が一点で交差するように輻輳角(各光軸のなす角度)が調整されて配置されている。
As shown in FIG. 3, the
CPU12は、各撮像ユニット1〜6を同期させて駆動する。即ち、各撮影レンズ40は、常に同じ被写体にピントが合うように焦点調整が行われ、常に同じ焦点距離(ズーム倍率)に設定される。また、常に同じ入射光量(絞り値)となるように絞り41が調整される。
The
操作部14は、シャッタボタン、電源スイッチ、モードダイヤル、十字ボタン、ズームボタン等の公知の操作入力手段を含んでいる。シャッタボタンは、いわゆる「半押し」と「全押し」とからなる2段ストローク式のスイッチで構成されている。撮影モード時には、シャッタボタンが半押しされると、撮影準備処理(即ち、AE(Automatic Exposure:自動露出)、AF(Auto Focus:自動焦点合わせ)、AWB(Automatic White Balance:自動ホワイトバランス))が行われ、シャッタボタンが全押しされると、画像の撮影・記録処理が行われる。 The operation unit 14 includes known operation input means such as a shutter button, a power switch, a mode dial, a cross button, and a zoom button. The shutter button is composed of a two-stage stroke type switch composed of so-called “half press” and “full press”. When the shutter button is pressed halfway in the shooting mode, shooting preparation processing (that is, AE (Automatic Exposure), AF (Auto Focus), AWB (Automatic White Balance)) is performed. When the shutter button is fully pressed, image capturing / recording processing is performed.
発光部18は、例えば、放電管(キセノン管)により構成され、暗い被写体を撮影する場合や逆光時等に必要に応じて発光される。
The
メインメモリ20は、CPU12によるプログラムの実行時におけるワークエリアとして、また、撮像ユニット1〜6により撮像され取得されたデジタル画像信号を一時保持する記憶手段として使用される。
The
デジタル信号処理部22は、ホワイトバランス調整回路、階調変換処理回路(例えば、ガンマ補正回路)、同時化回路(単板CCDのカラーフィルタ配列に伴う色信号の空間的なズレを補間して色信号を同時式に変換する処理回路)、輪郭補正回路、輝度・色差信号生成回路等を含む画像処理手段として機能し、メインメモリ20に格納されたR、G、Bの画像データに対して所定の信号処理を行う。即ち、R、G、Bの画像信号は、デジタル信号処理部22において輝度信号(Y信号)及び色差信号(Cr、Cb信号)からなるYUV信号に変換されるとともに、階調変換処理(例えば、ガンマ補正)等の所定の処理が施される。デジタル信号処理部22により処理された画像信号はメインメモリ20に格納される。
The digital signal processing unit 22 interpolates a spatial shift of the color signal associated with the color filter array of the single-chip CCD by interpolating a white balance adjustment circuit, a gradation conversion processing circuit (for example, a gamma correction circuit), and a synchronization circuit (color). A processing circuit that converts signals simultaneously), a contour correction circuit, a luminance / color difference signal generation circuit, and the like, and functions as image processing means for R, G, and B image data stored in the
積算部24は、シャッタボタンの半押し時に取り込まれる画像信号に基づいてAF制御に必要な焦点評価値を算出したり、AE制御に必要な被写体輝度を算出する。CPU12は、AF制御時には積算部24により算出される焦点評価値が極大となる位置をサーチし、その位置にフォーカスレンズを移動させることにより、被写体(主要被写体)への焦点合わせを行い、AE制御時には積算部24により算出された被写体輝度に基づいて適正な露光量を得るための露出設定を行う。即ち、撮影感度、絞り値、シャッタ速度、フラッシュ発光の要否を設定する。
The accumulating
圧縮伸張処理部26は、CPU12からの指令に従い、入力された画像データに圧縮処理を施し、所定形式の圧縮画像データを生成する。例えば、静止画に対してはJPEG規格に準拠した圧縮処理が施され、動画に対してはMPEG2やMPEG4、H.264規格に準拠した圧縮処理が施される。また、圧縮伸張処理部26は、CPU12からの指令に従い、入力された圧縮画像データに伸張処理を施し、非圧縮の画像データを生成する。
The compression /
外部記録部28は、上記圧縮伸張処理部26により生成されたJPEG形式等の画像データを格納した画像ファイルをメモリカード等の着脱自在な外部記録媒体に記録し、又は外部記録媒体から画像ファイルの読み出しを行う。
The
表示部30は、例えば、カラー液晶パネルを備えた表示装置により構成され、撮影済み画像を表示するための画像表示部として使用されるとともに、各種設定時にGUIとして使用される。また、表示部30は、撮影モード時に画角を確認するための電子ファインダとして利用される。表示部30の表面には、かまぼこ状のレンズ群を有したいわゆるレンチキュラレンズが配置されており、複数の視点の画像(視差画像)による3次元画像(3D画像)の再生モード時には、外部記録部28から読み出された視差画像が表示され、ユーザは立体視が可能となる。
The
図4(A)に示すように撮像ユニット1〜6から得られる6枚の画像は、理想的には各画像間には視差のみによる被写体のずれが生じるが、実際は、図4(B)に示すように視差に加えて撮像ユニット1〜6の姿勢やズーム倍率のばらつきに因って被写体のずれが生じる。
As shown in FIG. 4 (A), the six images obtained from the
対応点検出部32、幾何変形部34、及び幾何変形パラメータ推定部36は、画像を幾何変形させて上記被写体のずれを補正する本発明の特徴部分であり、以下、図5に示すフローチャートを参照しながら説明する。
The corresponding
<立体画像処理の全体的な流れ>
図5は本発明に係る立体画像処理の全体の流れを示すフローチャートである。
<Overall flow of stereoscopic image processing>
FIG. 5 is a flowchart showing the overall flow of stereoscopic image processing according to the present invention.
[ステップS10]
視差画像の撮像時には、6台の撮像ユニット1〜6により同一被写体が撮像され、得られた6枚の画像が記録される。この際、各画像はデジタル信号処理部22により前述した各種の信号処理が施された後、メインメモリ20に一時的に格納される。尚、外部記録部28により外部記録媒体に記録するようにしてもよい。
[Step S10]
When a parallax image is captured, the same subject is imaged by the six
[ステップS12]
メインメモリ20に格納された6枚の画像のうち、所定の1枚の画像(この実施の形態では、撮像ユニット3から得られた画像)が基準画像として設定され、その設定された基準画像がメインメモリ20から読み出される。尚、この実施の形態では、撮像ユニット3から得られた画像を基準画像として設定するようにしたが、これに限らず、6枚の画像のうち、いずれの画像を基準画像に設定してもよい。
[Step S12]
Of the six images stored in the
[ステップS14]
前記設定された基準画像以外の5画像のうち所定の1画像が対象画像として選択され、その選択された対象画像がメインメモリ20から読み出される。
[Step S14]
One predetermined image among the five images other than the set reference image is selected as a target image, and the selected target image is read from the
[ステップS16]
対応点検出部32は、前記設定された基準画像と前記選択された対象画像との間で特徴が略一致する複数の組の対応点を検出する。
[Step S16]
The corresponding
対応点検出部32による対応点検出については、従来から様々な手法が提案されている。本発明はその手法には限定されないが、例えば、ブロックマッチング法、KLT法(Tomasi & Kanade,1991,Detection and Tracking of Point Features)、SIFT(Scale Invariant Feature Transform)などの従来技術を用いることができる。
Various methods have been proposed for detecting corresponding points by the corresponding
尚、この実施の形態では、便宜上、対応点検出部32により検出された各組(ペア)の対応点のうち、基準画像から検出された対応点を特徴点と称す。
In this embodiment, for convenience, the corresponding points detected from the reference image among the corresponding points of each pair (pair) detected by the corresponding
[ステップS18]
幾何変形パラメータ推定部36は、前記特徴点と対応点の複数の組の座標値に基づいて射影変換パラメータを推定・算出する。尚、このステップS18の詳細については後述する。
[Step S18]
The geometric deformation
[ステップS20]
前記射影変換パラメータが正常なものとして推定されたかを判別し、正常の場合(「yes」の場合)には、ステップS22に遷移し、正常でない場合(「no」の場合)には、ステップS22を飛ばしてステップS24に遷移する。
[Step S20]
It is determined whether the projective transformation parameter is estimated as normal. If normal (in the case of “yes”), the process proceeds to step S22. If not normal (in the case of “no”), step S22 is performed. And the process proceeds to step S24.
[ステップS22]
幾何変形部34は、正常に推定された射影変換パラメータに基づいて対象画像を射影変換する。射影変換後の画像は、外部記録部28にて外部記録媒体に記録される。
[Step S22]
The
[ステップS24]
前記基準画像と5枚の対象画像の全ての画像間において、上記ステップS14〜S22の処理が終了したか否かが判別される。終了していない場合にはステップS14に遷移し、ここで他の対象画像の選択が行われ、終了した場合には、本立体画像処理を終了させる。
[Step S24]
It is determined whether or not the processing in steps S14 to S22 has been completed between all of the reference image and all five target images. If not completed, the process proceeds to step S14, where another target image is selected. If completed, the stereoscopic image processing is terminated.
<射影変換パラメータ推定の流れ>
次に、複数の特徴点と対応点の組に基づいて射影変換パラメータを推定する手順について説明する。
<Projection transformation parameter estimation flow>
Next, a procedure for estimating projective transformation parameters based on a set of a plurality of feature points and corresponding points will be described.
ここで、射影変換式は、次式の通りである。 Here, the projective transformation formula is as follows.
射影変換パラメータは、[数1]式中のa、b、s、c、d、t、p、qの8個のパラメータを指す。また、(x,y)、(X,Y)は、それぞれ射影変換前後の座標値を示す。 The projective transformation parameters indicate eight parameters a, b, s, c, d, t, p, and q in the formula [1]. Further, (x, y) and (X, Y) indicate coordinate values before and after projective transformation, respectively.
図6(A)は基準画像から抽出された特徴点(●)を基準画像上に重畳した図であり、図6(B)は対象画像から検出された対応点(○)を対象画像上に重畳した図である。 FIG. 6A is a diagram in which feature points (●) extracted from the reference image are superimposed on the reference image, and FIG. 6B is a diagram illustrating corresponding points (◯) detected from the target image on the target image. FIG.
また、図6(C)には、それぞれ対応する特徴点と対応点とを結ぶベクトルが示されている。尚、図6において、特徴点A(x1,y1)と対応点A’(x2,y2)とは、ある1組の特徴点と対応点を示している。 In FIG. 6C, vectors connecting the corresponding feature points and the corresponding points are shown. In FIG. 6, a feature point A (x1, y1) and a corresponding point A ′ (x2, y2) indicate a certain set of feature points and corresponding points.
本来、特徴点と対応点は、同じ高さ(=y座標値が略同じ)になるはずであるが、撮像ユニット1〜6の姿勢、ズーム率のばらつきに起因して被写体のずれが生じているため、特徴点Aと対応点A’の高さ(y座標値)は一致していない。
Originally, the feature points and the corresponding points should be the same height (= y coordinate values are substantially the same), but subject displacement occurs due to variations in the orientation and zoom rate of the
そこで、本発明は射影変換パラメータを推定するに当たっては、特徴点と対応点を結ぶ線分(以下、「ベクトル」という)が略水平になる(つまり、特徴点と対応点のy座標値が略一致する)ことを1つの拘束条件とする。この拘束条件は、6つの撮像ユニット1〜6が装置本体に水平に設置されていることに基づく。もし、複数の撮像ユニットが垂直に設置されている場合には、ベクトルが垂直になるという仮定を置く必要がある。要は、複数の視点の視差方向と直交する方向の座標値が略一致するという拘束条件を設ける。
Therefore, according to the present invention, in estimating the projective transformation parameter, a line segment connecting the feature point and the corresponding point (hereinafter referred to as “vector”) is substantially horizontal (that is, the y-coordinate value of the feature point and the corresponding point is approximately equal). Is a constraint condition. This constraint condition is based on the fact that the six
図7は本発明に係るパラメータ推定の概念を示す図である。 FIG. 7 is a diagram showing the concept of parameter estimation according to the present invention.
図7に示すように、特徴点と対応点のずれ(同図の複合ベクトル)を生じさせる要因を分離して考えると、「視差」と「撮像ユニットの姿勢等のばらつき」とがある。同図からも分かるように、複合ベクトルのy成分には、視差の影響はなく、撮像ユニットの姿勢等のばらつきによる成分のみが現れる。 As shown in FIG. 7, when the factors that cause the deviation between the feature points and the corresponding points (composite vectors in FIG. 7) are considered separately, there are “parallax” and “variation in the posture of the imaging unit”. As can be seen from the figure, the y component of the composite vector is not affected by parallax, and only the component due to variations in the orientation of the imaging unit appears.
そこで、本発明はベクトルのy成分からカメラ姿勢等に関連する射影変換パラメータを推定・算出する。 Therefore, the present invention estimates and calculates a projective transformation parameter related to the camera posture and the like from the y component of the vector.
<射影変換パラメータ推定の処理フロー>
図8及び図9は本発明に係る射影変換パラメータの推定手順の一例を示すフローチャートである。
<Projection transformation parameter estimation processing flow>
8 and 9 are flowcharts showing an example of the projection transformation parameter estimation procedure according to the present invention.
[ステップS100]
基準画像から抽出した特徴点と対象画像から検出した各特徴点に対応する対応点のペア(組)の全ての組数をN組とした場合、このN組の特徴点の座標(x,y)と対応点の座標(X,Y)を読み込む。i番目(1≦i≦N)の組の特徴点の座標を(xi,yi)、対応点の座標を(Xi,Yi)とする。
[Step S100]
When the number of pairs of feature points extracted from the reference image and corresponding points corresponding to each feature point detected from the target image is N, the coordinates (x, y) of the N feature points ) And the coordinates (X, Y) of the corresponding point. The coordinates of feature points of the i-th (1 ≦ i ≦ N) set are (xi, yi), and the coordinates of corresponding points are (Xi, Yi).
[ステップS102]
対応点検出部32によって得られた特徴点と対応点の組の数が少ない場合は、射影変換パラメータの推定ができないため、ペア数Nに対する閾値処理を行う。
[Step S102]
When the number of pairs of feature points and corresponding points obtained by the corresponding
即ち、特徴点と対応点の組の数Nに対する閾値TH1を設け、以下の条件分岐を行う。 That is, a threshold value TH1 is provided for the number N of pairs of feature points and corresponding points, and the following conditional branching is performed.
IF N<TH1 →パラメータの推定に失敗したというフラグを立て推定を終了する(図9のステップS124)。 IF N <TH1 → A flag indicating that the parameter estimation has failed is set and the estimation is terminated (step S124 in FIG. 9).
ELSE →パラメータの推定を続行する。 ELSE → Continue parameter estimation.
尚、射影変換パラメータを推定するためには、最低5つの組の座標値が必要であるため、前記閾値TH1は、5以上の所定の値とする。 Note that in order to estimate the projective transformation parameter, at least five sets of coordinate values are required, and thus the threshold value TH1 is set to a predetermined value of 5 or more.
[ステップS104]
反復回数irandとパラメータ信頼度の最大値n_vote_maxを初期化する(両者ともに0にする)。
[Step S104]
The number of iterations iland and the parameter reliability maximum value n_vote_max are initialized (both are set to 0).
[ステップS106]
特徴点と対応点のN組のうち、5つの組をランダムに選択する。5組のランダムな選択は、乱数を使用して行うことができる。
[Step S106]
Of the N sets of feature points and corresponding points, five sets are randomly selected. Five sets of random selections can be made using random numbers.
[ステップS108]
ステップS106で選択された5組の特徴点と対応点の座標値(5つの特徴点のxy座標値と、5つの対応点のy座標値)に基づいて、5組の特徴点と対応点のy座標値を一致させるための射影変換パラメータを算出する。
[Step S108]
Based on the coordinate values of the five sets of feature points and corresponding points selected in step S106 (the xy coordinate values of the five feature points and the y coordinate value of the five corresponding points), Projective transformation parameters for matching y-coordinate values are calculated.
前述の[数1]式に示したように、y方向に関する射影変換パラメータは、c、d、t、p、qの5つであるため、5つの点の座標値を[数1]式に代入して得られる5つ式による連立方程式を解けば、一意にパラメータ(c、d、t、p、q)を算出することができる。 As shown in the above [Equation 1], there are five projective transformation parameters in the y direction, c, d, t, p, and q. Therefore, the coordinate values of the five points are expressed in [Equation 1]. By solving simultaneous equations of five formulas obtained by substitution, parameters (c, d, t, p, q) can be calculated uniquely.
[ステップS110]
前記算出されたパラメータ(c、d、t、p、q)を代入した射影変換式に、全ての点の組(N組)を当てはめ、以下の条件式1を満たす点の数n_voteを計数する。
[Step S110]
A set of all points (N sets) is applied to the projective transformation expression into which the calculated parameters (c, d, t, p, q) are substituted, and the number n_vote of points satisfying the following
この条件式1の意図するところは、5つの点の組から定めた射影変換パラメータにより、その他の点の組のy座標値が一致したかどうかを判断することにある。つまり、N本あるベクトルのうち、いくつのベクトルが水平になったかを表すのが、n_voteの値である。このn_voteが大きければ大きいほど、該射影変換パラメータの信頼度が高いと判断できる。
The intent of
[ステップS112]
ステップS110で算出した数n_voteと、信頼度最大値n_vote_maxとを比較し、n_voteがn_vote_maxよりも大きい場合(n_vote>n_vote_max)には、ステップS114に遷移し、小さい場合(n_vote≦n_vote_max)には、ステップS118に遷移する。
[Step S112]
The number n_vote calculated in step S110 is compared with the reliability maximum value n_vote_max. If n_vote is larger than n_vote_max (n_vote> n_vote_max), the process proceeds to step S114, and if smaller (n_vote ≦ n_vote_max), The process proceeds to step S118.
[ステップS114]
前記算出されたパラメータ(c、d、t、p、q)を、中間パラメータ(c_tmp、d_tmp、t_tmp、p_tmp、q_tmp)として一時記憶するとともに、n_voteを最大値n_vote_maxとして一時記憶する。
[Step S114]
The calculated parameters (c, d, t, p, q) are temporarily stored as intermediate parameters (c_tmp, d_tmp, t_tmp, p_tmp, q_tmp), and n_vote is temporarily stored as a maximum value n_vote_max.
射影変換パラメータを推定する際は、以下に説明するようにステップS106からステップS118の処理を既定回数nrand繰り返し行うが、そのうち最もn_voteが大きくなったときのパラメータが、最も信頼度が高いと考えられる。そのため、前回の信頼度n_voteをn_vote_maxとして保持しておき、今回の信頼度が前回の信頼度よりも大きくなる場合に、各パラメータを更新していく。 When estimating the projective transformation parameters, the processing from step S106 to step S118 is repeated nrand for a predetermined number of times as described below, and the parameter when n_vote becomes the largest is considered to have the highest reliability. . Therefore, the previous reliability n_vote is held as n_vote_max, and each parameter is updated when the current reliability is greater than the previous reliability.
[ステップS116]
信頼度最大値n_vote_maxの全ての組の数Nに対する比率(n_vote_max/N)を求め、この比率に対する閾値処理を行う。
[Step S116]
A ratio (n_vote_max / N) of the reliability maximum value n_vote_max with respect to the number N of all pairs is obtained, and threshold processing is performed on this ratio.
即ち、予め設定した閾値TH2により、以下の条件分岐を行う。 That is, the following conditional branch is performed according to a preset threshold value TH2.
IF n_vote_max/N<TH2 →パラメータの推定を続行する。 IF n_vote_max / N <TH2 → Parameter estimation is continued.
ELSE →パラメータの反復推定を終了し、最終の射影変換パラメータの算出に遷移する(図9のステップS126)。 ELSE → The parameter iterative estimation is terminated, and the process proceeds to the calculation of the final projective transformation parameter (step S126 in FIG. 9).
尚、前記閾値TH2は、1よりも小さい1近傍の値として設定することができる。 The threshold value TH2 can be set as a value near 1 that is smaller than 1.
信頼度最大値n_vote_maxは、N個の点の組のうち、推定されたパラメータによる射影変換によりy座標値が略一致する点の組の数であるから、n_vote_max/Nは、全ての点の組の数Nに対する適正に補正される点の数の割合を示す。従ってn_vote_max/NがTH2以上の場合は、推定されたパラメータは十分信頼できるとして、パラメータの反復推定を終了し、最終の射影変換パラメータの算出に移行する。一方、n_vote_max/NがTH2未満の場合は、パラメータの反復推定を続行する。 Since the maximum reliability value n_vote_max is the number of points in which the y coordinate values are substantially the same among the N points as a result of projective transformation using the estimated parameters, n_vote_max / N is the set of all points. The ratio of the number of points corrected appropriately to the number N of Therefore, when n_vote_max / N is greater than or equal to TH2, it is assumed that the estimated parameter is sufficiently reliable, and the iterative estimation of the parameter is terminated, and the process proceeds to calculation of the final projective transformation parameter. On the other hand, when n_vote_max / N is less than TH2, iterative parameter estimation is continued.
[ステップS118]
パラメータを反復推定した反復回数irandが、既定回数nrandより大きいか否かを判別する。反復回数irandが既定回数nrand以下の場合(「no」の場合)には、ステップS120に遷移し、既定回数nrandよりも大きい場合((「yes」の場合)には、ステップS122に遷移する。既定回数nrandとしては、画像中の特徴点と対応点の組の数Nにもよるが、1000から10000回程度が考えられる。
[Step S118]
It is determined whether or not the number of iterations iland that iteratively estimates the parameter is greater than the predetermined number of times nrand. If the number of iterations irand is less than or equal to the predetermined number of times nrand (in the case of “no”), the process proceeds to step S120. If the number of iterations irand is greater than the predetermined number of times nrand (in the case of “yes”), the process proceeds to step S122. As the predetermined number of times nrand, although it depends on the number N of pairs of feature points and corresponding points in the image, about 1000 to 10,000 times can be considered.
[ステップS120]
反復回数irandを1だけインクリメントし、ステップS106に遷移する。
[Step S120]
The iteration number iland is incremented by 1, and the process proceeds to step S106.
[ステップS122]
反復回数irandが既定回数nrandよりも大きくなった場合には、ステップS114にて保持されている現在の信頼度最大値n_vote_maxの全ての組の数Nに対する比率(n_vote_max/N)を求め、この比率に対する閾値処理を行う。
[Step S122]
When the number of iterations iland is larger than the predetermined number nrand, the ratio (n_vote_max / N) of the current reliability maximum value n_vote_max held in step S114 to the number N of all pairs is obtained, and this ratio Threshold processing for is performed.
即ち、予め設定した閾値TH3により、以下の条件分岐を行う。 That is, the following conditional branching is performed according to a preset threshold value TH3.
IF n_vote_max/N<TH3 →パラメータの推定に失敗したというフラグを立て推定を終了する(図9のステップS124)。 IF n_vote_max / N <TH3 → A flag indicating that the parameter estimation has failed is set and the estimation is terminated (step S124 in FIG. 9).
ELSE →パラメータの反復推定を終了し、最終の射影変換パラメータを算出するためのステップ(図9のステップS126)に遷移する。 ELSE → The parameter iterative estimation is terminated, and the process proceeds to a step (step S126 in FIG. 9) for calculating the final projective transformation parameter.
尚、前記閾値TH3は、ステップS114の閾値TH2よりも小さい値であることは言うまでもない。 Needless to say, the threshold value TH3 is smaller than the threshold value TH2 in step S114.
[ステップS124(図9)]
前述したように、特徴点と対応点の組の数Nが閾値TH1未満の場合(ステップS102)、又は推定したパラメータの信頼度が低い場合(n_vote_max/N<TH3)に、射影変換パラメータの推定に失敗したという推定失敗フラグを立て、射影変換パラメータの推定を終了させる。
[Step S124 (FIG. 9)]
As described above, when the number N of pairs of feature points and corresponding points is less than the threshold TH1 (step S102) or when the reliability of the estimated parameter is low (n_vote_max / N <TH3), the projection transformation parameter is estimated. An estimation failure flag indicating that the process failed has been set, and the projection transformation parameter estimation is terminated.
[ステップS126]
ステップS114で保持した中間パラメータ(c_tmp、d_tmp、t_tmp、p_tmp、q_tmp)を代入した射影変換式に、全ての点の組(N組)を当てはめ、N組から以下の条件式2を満たす組のみを残す(条件式2を満たさない組を排除する)。
[Step S126]
All sets of points (N sets) are applied to the projective transformation formula substituted with the intermediate parameters (c_tmp, d_tmp, t_tmp, p_tmp, q_tmp) held in step S114, and only the sets satisfying the following
これにより、信頼度の高い特徴点と対応点の組のみを残すことができる。 Thereby, it is possible to leave only a pair of feature points and corresponding points with high reliability.
[ステップS128]
上記条件式2を満たした点の組のみを用い、最小自乗法による最終的なパラメータの推定を行う。ここで、条件式2を満たした点の組の数をnとすると、最小自乗法によるパラメータ推定は、次式の評価関数J2が最小となるようにパラメータを推定する。
[Step S128]
The final parameter estimation is performed by the method of least squares using only a set of points satisfying the
尚、評価関数J2は、評価関数J1と等価なものである。 The evaluation function J2 is equivalent to the evaluation function J1.
具体的には、次式に示すように、評価関数J2を各パラメータ(c、d、t、p、q)で偏微分して得られる5つの式それぞれを0とおき、これら5つの式により連立方程式を解けば、パラメータ(c、d、t、p、q)が求められる。 Specifically, as shown in the following equation, each of five equations obtained by partial differentiation of the evaluation function J2 with each parameter (c, d, t, p, q) is set to 0, and these five equations are used. If the simultaneous equations are solved, parameters (c, d, t, p, q) can be obtained.
以上の連立方程式を解くことで、最終のパラメータ(c、d、t、p、q)が得られる。 The final parameters (c, d, t, p, q) can be obtained by solving the above simultaneous equations.
[ステップS130]
次に、8個の射影変換パラメータ(a、b、s、c、d、t、p、q)のうち、前記推定したパラメータ(c、d、t、p、q)以外の射影変換先のx座標値を決定するために必要な残りのパラメータ(a,b,s)を決定する。
[Step S130]
Next, among the eight projective transformation parameters (a, b, s, c, d, t, p, q), projection transformation destinations other than the estimated parameters (c, d, t, p, q) are selected. The remaining parameters (a, b, s) necessary to determine the x coordinate value are determined.
ここで、パラメータsは、x方向(視差の生じる方向)の平行移動量に相当するパラメータである。視差量が未知で、sを一意に定めることはできないため、s=0とする。 Here, the parameter s is a parameter corresponding to the amount of parallel movement in the x direction (direction in which parallax occurs). Since the amount of parallax is unknown and s cannot be uniquely determined, s = 0 is set.
一方、パラメータa,bの算出は、例えば、次のようにする。 On the other hand, the parameters a and b are calculated as follows, for example.
今、図10に示すような座標系を考える。原点Oから距離1のところに画像面があるとし、画像面上の各点を、射影面上に射影する、つまり、P1の点をP2に写すことを考える。
Consider a coordinate system as shown in FIG. Assume that the image plane is at a
ここで、画像面と射影面のなす角度をθ、射影面をx’軸上にとる。また、射影面とz軸(画像の奥行き方向)の交点をO’とし、x’軸上の原点とする。 Here, the angle between the image plane and the projection plane is θ, and the projection plane is on the x ′ axis. Further, the intersection point of the projection plane and the z axis (the depth direction of the image) is defined as O ′, and the origin on the x ′ axis.
P1のx座標値をx、x’軸で考えたときのP2のx座標値をx’とすると、以下の式が成り立つ。 When the x coordinate value of P1 is x and the x coordinate value of P2 when x 'axis is considered as x' axis, the following equation is established.
これを一般化し、射影面がx軸となす角度をθx,y軸(図10上で紙面と直交する方向の軸)となす角度をθyとすれば、以下の式が得られる。 If this is generalized and the angle between the projection plane and the x-axis is θx, and the angle between the y-axis (axis in the direction orthogonal to the paper surface in FIG. 10) is θy, the following equation is obtained.
上記[数7]式上で、(x,y)は画像面上の座標値、(x',y')は射影面上での座標値である。また、wとhはそれぞれ画像の幅と高さを表しており、画像の幅と高さについて規格化している。この操作は、撮像ユニットの光軸の方向を調整していることに該当する。 In the above [Expression 7], (x, y) is a coordinate value on the image plane, and (x ′, y ′) is a coordinate value on the projection plane. W and h represent the width and height of the image, respectively, and the width and height of the image are normalized. This operation corresponds to adjusting the direction of the optical axis of the imaging unit.
続いて、射影面上に射影された画像に対して、回転とスケール変化、平行移動を行う。この操作は、撮像ユニットのズーム率や、光軸の回転を調整していることに該当する。ここで、回転角度をθ0、ズームに起因するスケール変化率をk、平行移動量を(s',t')とすると、以下の式が成り立つ。 Subsequently, rotation, scale change, and parallel movement are performed on the image projected on the projection plane. This operation corresponds to adjusting the zoom rate of the imaging unit and the rotation of the optical axis. Here, when the rotation angle is θ 0 , the scale change rate due to zoom is k, and the parallel movement amount is (s ′, t ′), the following equation is established.
上記[数8]式に[数7]式を代入すると、以下の式が得られる。 Substituting [Expression 7] into [Expression 8] gives the following expression.
これを射影変換式([数1]式)と比較すると、以下の関係が導かれる。 When this is compared with the projective transformation equation (Equation 1), the following relationship is derived.
上記[数10]式において、既にc、d、t、p、qは既知であるため、これらの式からθx、θy、θ0、kを求めることができ、これらのθx、θy、θ0、kからa,bを算出することができる。ただし、上述したようにs=s’=0としてa、bを算出する。 In the above [Equation 10] where already c, d, t, p, since q is known, [theta] x from these equations, [theta] y, it is possible to obtain the theta 0, k, these [theta] x, [theta] y, theta 0 , K, a and b can be calculated. However, as described above, a and b are calculated with s = s ′ = 0.
[ステップS132]
以上の手順により、8個の射影変換パラメータ(a、b、s、c、d、t、p、q)の推定・算出が終了すると、推定成功フラグを立て、射影変換パラメータの推定を終了させる。
[Step S132]
When the estimation / calculation of the eight projective transformation parameters (a, b, s, c, d, t, p, q) is completed by the above procedure, the estimation success flag is set and the estimation of the projective transformation parameters is finished. .
尚、この実施の形態では、[数3]式に示した条件を満たした点の組のみを用い、最小自乗法により最終的なパラメータの推定を行うようにしたが、これに限らず、前記中間パラメータをそのまま使用するようにしてもよい。 In this embodiment, the final parameter estimation is performed by the least square method using only a set of points satisfying the condition shown in [Equation 3]. However, the present invention is not limited to this. Intermediate parameters may be used as they are.
<その他>
以上の推定手法によれば、特徴点を射影変換するための射影変換パラメータが算出される。つまり、得られた射影変換パラメータは、基準画像を変形させるためのものと言える。本来、算出すべきパラメータは、対象画像を変形させるためのパラメータであるが、そうしていないことには以下の理由がある。
<Others>
According to the above estimation method, the projective transformation parameter for projective transformation of the feature point is calculated. That is, it can be said that the obtained projective transformation parameter is for deforming the reference image. Originally, the parameter to be calculated is a parameter for deforming the target image, but the reason for not doing so is as follows.
通常、入力された画像を変形して出力する際には、出力画像の各画素位置が入力画像上でどこに位置するかを計算する。これは、入力画像の各画素が出力画像上でどこに位置するかを計算していくと、データのない領域が発生してしまうことを回避するための一般的な手法である。つまり、対象画像を変形するために必要となるパラメータは、実際のところ、特徴点を変換するためのパラメータで良い。 Normally, when an input image is transformed and output, the position of each pixel position of the output image is calculated on the input image. This is a general method for avoiding the occurrence of an area without data when calculating where each pixel of the input image is located on the output image. That is, the parameters necessary for deforming the target image may actually be parameters for converting the feature points.
また、この実施の形態では、画像の幾何変形の手法として、射影変換を用いたが、ヘルマート変換や、アフィン変換などの幾何変形を用いることも当然可能である。その場合、パラメータの推定方法が射影変換の場合と比較して若干異なる。例えば、ヘルマート変換式は、次式のように表される。 In this embodiment, the projective transformation is used as a method of geometric deformation of the image. However, it is naturally possible to use geometric transformation such as Helmat transformation or affine transformation. In that case, the parameter estimation method is slightly different from that in the case of projective transformation. For example, the Helmat transform equation is expressed as the following equation.
射影変換パラメータの推定方法と同様の考え方をするならば、Yを求める5つのパラメータ(c、d、t、p、q)を5組の特徴点と対応点を用いて算出していたところを、3組の特徴点と対応点を用いて、[数11]式のYを求めるためのパラメータ(a、b、t)を推定するように変更すればよい。また、最小自乗法による最終的なパラメータの推定を行う場合には、評価関数Jを次式のようにすればよい。 If the same idea as the method for estimating projective transformation parameters is used, the five parameters (c, d, t, p, q) for obtaining Y are calculated using five sets of feature points and corresponding points. What is necessary is just to change so that the parameter (a, b, t) for calculating | requiring Y of [Formula 11] may be estimated using three sets of feature points and corresponding points. Further, when final parameter estimation is performed by the method of least squares, the evaluation function J may be expressed by the following equation.
尚、ヘルマート変換式では、[数11]式に示したように、Xを求めるパラメータにもa、bが含まれているため、Yを定めるパラメータを推定しさえすれば、Xを定めるパラメータも必然と得られることになる。また、射影変換の場合と同様、Xに対する平行移動成分であるパラメータsについては、s=0として考えればよい。その他の幾何変形を行う場合も同様の考え方でその幾何変形用のパラメータを推定することが可能である。 In the Helmart transform equation, as shown in [Equation 11], the parameters for determining X include a and b. Therefore, if the parameters for determining Y are estimated, the parameters for determining X are also determined. It will inevitably be obtained. As in the case of projective transformation, the parameter s, which is a translation component for X, can be considered as s = 0. In the case of performing other geometric deformation, it is possible to estimate the parameters for the geometric deformation based on the same concept.
また、この実施の形態の立体撮像装置は、6つの撮像ユニットを有する複眼カメラであるが、撮像ユニットの数は2以上あればよく、この実施の形態のものに限定されず、更に撮像ユニットが複数備わった複眼カメラに限らず、単眼のカメラが複数台備わったカメラシステムにおいても本発明を適用することができる。 In addition, the stereoscopic imaging apparatus of this embodiment is a compound eye camera having six imaging units, but the number of imaging units only needs to be two or more, and is not limited to that of this embodiment. The present invention can be applied to a camera system including a plurality of monocular cameras as well as a plurality of compound eye cameras.
更に、本発明に係る立体画像処理は、立体撮像装置によって行う場合に限らず、視差画像の撮影機能を持たないパーソナルコンピュータ等で行うようにしてもよい。この場合、従来の複眼カメラ等によって撮影された複数の画像(視差画像)をパーソナルコンピュータ等に取り込むようにすればよい。また、本発明は、理想的な視差画像を得るための幾何変形処理を行う機能を、パーソナルコンピュータに実現させるプログラムとして提供することも可能である。 Furthermore, the stereoscopic image processing according to the present invention is not limited to being performed by a stereoscopic imaging apparatus, and may be performed by a personal computer or the like that does not have a parallax image capturing function. In this case, a plurality of images (parallax images) taken by a conventional compound eye camera or the like may be taken into a personal computer or the like. The present invention can also provide a program for causing a personal computer to implement a function of performing geometric deformation processing for obtaining an ideal parallax image.
また、本発明は上述した実施の形態に限定されず、本発明の精神を逸脱しない範囲で種々の変形が可能であることは言うまでもない。 Moreover, it goes without saying that the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the spirit of the present invention.
1〜6…撮像ユニット、10…立体撮像装置、12…中央処理装置(CPU)、20…メインメモリ、22…デジタル信号処理部、28…外部記録部、30…表示部、32…対応点検出部、34…幾何変形部、36…幾何変形パラメータ推定部
DESCRIPTION OF SYMBOLS 1-6 ... Imaging unit, 10 ... Stereoscopic imaging device, 12 ... Central processing unit (CPU), 20 ... Main memory, 22 ... Digital signal processing part, 28 ... External recording part, 30 ... Display part, 32 ...
Claims (5)
前記取得した複数の画像のうちの所定の画像を基準画像として選択し、前記基準画像以外の画像を対象画像として選択し、前記基準画像から複数の特徴点を、前記対象画像から対応点を検出して、同じ組に含まれる特徴点と対応点の特徴が略一致するような特徴点と対応点の組を生成する対応点検出手段と、
前記同じ組に含まれる特徴点と対応点の、前記複数の視点の視差方向と直交する方向のy座標のみが略一致するように前記対象画像を幾何変形する画像変形手段と、
を備える立体画像処理装置。 Image acquisition means for acquiring a plurality of images taken of the same subject from a plurality of viewpoints;
A predetermined image of the plurality of acquired images is selected as a reference image, an image other than the reference image is selected as a target image, a plurality of feature points are detected from the reference image, and corresponding points are detected from the target image. A corresponding point detecting means for generating a set of feature points and corresponding points such that the features of the corresponding points and the corresponding points included in the same set substantially match;
Image deformation means for geometrically deforming the target image so that only the y-coordinates of the feature points and corresponding points included in the same set substantially coincide with each other in a direction orthogonal to the parallax direction of the plurality of viewpoints;
A stereoscopic image processing apparatus comprising:
前記取得した複数の画像のうちの所定の画像を基準画像として選択し、前記基準画像以外の画像を対象画像として選択し、前記基準画像から複数の特徴点を、前記対象画像から対応点を検出して、同じ組に含まれる特徴点と対応点の特徴が略一致するような特徴点と対応点の組を生成する対応点検出工程と、
前記同じ組に含まれる特徴点と対応点の、前記複数の視点の視差方向と直交する方向のy座標のみが略一致するように前記対象画像を幾何変形する画像変形工程と、
を備える立体画像処理方法。 An image acquisition step of acquiring a plurality of images obtained by photographing the same subject from a plurality of viewpoints;
A predetermined image of the plurality of acquired images is selected as a reference image, an image other than the reference image is selected as a target image, a plurality of feature points are detected from the reference image, and corresponding points are detected from the target image. A corresponding point detecting step for generating a set of feature points and corresponding points such that the features of the corresponding points and the features of the corresponding points substantially match,
An image deformation step of geometrically deforming the target image so that only y-coordinates of the feature points and corresponding points included in the same set substantially coincide with each other in a direction orthogonal to the parallax directions of the plurality of viewpoints;
A stereoscopic image processing method comprising:
前記取得した複数の画像のうちの所定の画像を基準画像として選択し、前記基準画像以外の画像を対象画像として選択し、前記基準画像から複数の特徴点を、前記対象画像から対応点を検出して、同じ組に含まれる特徴点と対応点の特徴が略一致するような特徴点と対応点の組を生成し、
前記同じ組に含まれる特徴点と対応点の、前記複数の視点の視差方向と直交する方向のy座標のみが略一致するように前記対象画像を幾何変形する、
立体画像処理プロセスをコンピュータに実行させるための立体画像処理プログラム。 Acquire multiple images of the same subject from multiple viewpoints,
A predetermined image of the plurality of acquired images is selected as a reference image, an image other than the reference image is selected as a target image, a plurality of feature points are detected from the reference image, and corresponding points are detected from the target image. Then, a set of feature points and corresponding points such that feature points included in the same set and features of corresponding points substantially match,
Geometrically deforming the target image so that only the y-coordinates of the feature points and corresponding points included in the same set substantially coincide with each other in the direction orthogonal to the parallax direction of the plurality of viewpoints
A stereoscopic image processing program for causing a computer to execute a stereoscopic image processing process.
前記取得した複数の画像のうちの所定の画像を基準画像として選択し、前記基準画像以外の画像を対象画像として選択し、前記基準画像から複数の特徴点を、前記対象画像から対応点を検出して、同じ組に含まれる特徴点と対応点の特徴が略一致するような特徴点と対応点の組を生成し、
前記同じ組に含まれる特徴点と対応点について、前記複数の視点の視差方向と直交する方向のy座標のみが略一致するように前記対象画像を幾何変形するための幾何変形パラメータを推定し、
前記推定した幾何変形パラメータに基づいて前記対象画像を幾何変形する、
立体画像処理プロセスをコンピュータに実行させるための立体画像処理プログラム。 Acquire multiple images of the same subject from multiple viewpoints,
A predetermined image of the plurality of acquired images is selected as a reference image, an image other than the reference image is selected as a target image, a plurality of feature points are detected from the reference image, and corresponding points are detected from the target image. Then, a set of feature points and corresponding points such that feature points included in the same set and features of corresponding points substantially match,
Estimating geometric deformation parameters for geometrically deforming the target image so that only the y-coordinates in the direction orthogonal to the parallax directions of the plurality of viewpoints substantially match with respect to the feature points and corresponding points included in the same set;
Geometrically deforming the target image based on the estimated geometric deformation parameters;
A stereoscopic image processing program for causing a computer to execute a stereoscopic image processing process.
複数の視点位置にそれぞれ配置され、前記視差方向に沿う視点位置から同一被写体をそれぞれ撮像する複数の撮像ユニットと、を備え、
前記画像取得手段は、前記複数の撮像ユニットによってそれぞれ撮像された複数の画像を取得する、立体撮像装置。 A stereoscopic image processing apparatus according to claim 1;
A plurality of imaging units that are respectively arranged at a plurality of viewpoint positions and respectively image the same subject from the viewpoint positions along the parallax direction,
The three-dimensional imaging device, wherein the image acquisition means acquires a plurality of images respectively captured by the plurality of imaging units.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011232129A JP2012022716A (en) | 2011-10-21 | 2011-10-21 | Apparatus, method and program for processing three-dimensional image, and three-dimensional imaging apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011232129A JP2012022716A (en) | 2011-10-21 | 2011-10-21 | Apparatus, method and program for processing three-dimensional image, and three-dimensional imaging apparatus |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008303227A Division JP4852591B2 (en) | 2008-11-27 | 2008-11-27 | Stereoscopic image processing apparatus, method, recording medium, and stereoscopic imaging apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2012022716A true JP2012022716A (en) | 2012-02-02 |
Family
ID=45776883
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2011232129A Abandoned JP2012022716A (en) | 2011-10-21 | 2011-10-21 | Apparatus, method and program for processing three-dimensional image, and three-dimensional imaging apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2012022716A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018195270A (en) * | 2017-05-22 | 2018-12-06 | 日本電信電話株式会社 | Local feature expression learning device and method |
| CN112102335A (en) * | 2020-09-15 | 2020-12-18 | 佛山显扬科技有限公司 | Binocular three-dimensional imaging method and system based on novel speckle feature coding |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH11259633A (en) * | 1998-03-12 | 1999-09-24 | Fuji Heavy Ind Ltd | Adjusting device of stereoscopic camera |
| JPH11259632A (en) * | 1998-03-12 | 1999-09-24 | Fuji Heavy Ind Ltd | Adjusting device of stereoscopic camera |
| JP2002324234A (en) * | 2001-02-23 | 2002-11-08 | Sharp Corp | Method and apparatus for correcting partial distortion of a stereoscopic image |
| JP2003187261A (en) * | 2001-12-14 | 2003-07-04 | Canon Inc | Three-dimensional image generation device, three-dimensional image generation method, three-dimensional image processing device, three-dimensional image capturing and displaying system, three-dimensional image processing method, and storage medium |
| JP2004004842A (en) * | 2002-05-21 | 2004-01-08 | Sharp Corp | Apparatus and method for aligning structures |
| JP2005100407A (en) * | 2003-09-24 | 2005-04-14 | Seiko Epson Corp | System and method for creating a panoramic image from a plurality of source images |
| JP2005353047A (en) * | 2004-05-13 | 2005-12-22 | Sanyo Electric Co Ltd | Three-dimensional image processing method and three-dimensional image processor |
| JP2006285415A (en) * | 2005-03-31 | 2006-10-19 | Sony Corp | Image processing method, apparatus and program |
-
2011
- 2011-10-21 JP JP2011232129A patent/JP2012022716A/en not_active Abandoned
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH11259633A (en) * | 1998-03-12 | 1999-09-24 | Fuji Heavy Ind Ltd | Adjusting device of stereoscopic camera |
| JPH11259632A (en) * | 1998-03-12 | 1999-09-24 | Fuji Heavy Ind Ltd | Adjusting device of stereoscopic camera |
| JP2002324234A (en) * | 2001-02-23 | 2002-11-08 | Sharp Corp | Method and apparatus for correcting partial distortion of a stereoscopic image |
| JP2003187261A (en) * | 2001-12-14 | 2003-07-04 | Canon Inc | Three-dimensional image generation device, three-dimensional image generation method, three-dimensional image processing device, three-dimensional image capturing and displaying system, three-dimensional image processing method, and storage medium |
| JP2004004842A (en) * | 2002-05-21 | 2004-01-08 | Sharp Corp | Apparatus and method for aligning structures |
| JP2005100407A (en) * | 2003-09-24 | 2005-04-14 | Seiko Epson Corp | System and method for creating a panoramic image from a plurality of source images |
| JP2005353047A (en) * | 2004-05-13 | 2005-12-22 | Sanyo Electric Co Ltd | Three-dimensional image processing method and three-dimensional image processor |
| JP2006285415A (en) * | 2005-03-31 | 2006-10-19 | Sony Corp | Image processing method, apparatus and program |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2018195270A (en) * | 2017-05-22 | 2018-12-06 | 日本電信電話株式会社 | Local feature expression learning device and method |
| CN112102335A (en) * | 2020-09-15 | 2020-12-18 | 佛山显扬科技有限公司 | Binocular three-dimensional imaging method and system based on novel speckle feature coding |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4852591B2 (en) | Stereoscopic image processing apparatus, method, recording medium, and stereoscopic imaging apparatus | |
| JP6585006B2 (en) | Imaging device and vehicle | |
| JP6405243B2 (en) | Focus detection apparatus and control method thereof | |
| US8593531B2 (en) | Imaging device, image processing method, and computer program | |
| JP5814692B2 (en) | Imaging apparatus, control method therefor, and program | |
| JP2019510234A (en) | Depth information acquisition method and apparatus, and image acquisition device | |
| JP6289017B2 (en) | Imaging apparatus, control method therefor, program, and storage medium | |
| JP7195801B2 (en) | Image processing device and its control method, distance detection device, imaging device, program | |
| JP2013123123A (en) | Stereo image generation device, stereo image generation method and computer program for stereo image generation | |
| US20120307132A1 (en) | Imaging module, imaging apparatus, image processing apparatus, and image processing method | |
| CN115314697B (en) | Image processing device and method, camera device and control method thereof, and storage medium | |
| JP2019062340A (en) | Image blurring correction apparatus and control method | |
| JP7121269B2 (en) | ranging camera | |
| JP2022173069A (en) | IMAGE PROCESSING DEVICE AND METHOD, IMAGING DEVICE AND CONTROL METHOD THEREOF, PROGRAM, STORAGE MEDIUM | |
| JP2019168479A (en) | Controller, imaging device, method for control, program, and, and storage medium | |
| JP6648916B2 (en) | Imaging device | |
| JP2012022716A (en) | Apparatus, method and program for processing three-dimensional image, and three-dimensional imaging apparatus | |
| JP5925109B2 (en) | Image processing apparatus, control method thereof, and control program | |
| JP6381206B2 (en) | Image processing apparatus, control method thereof, and program | |
| JP2018205008A (en) | Camera calibration apparatus and camera calibration method | |
| JP6486453B2 (en) | Image processing apparatus, image processing method, and program | |
| CN111292380A (en) | Image processing method and device | |
| JP2016099432A (en) | Focus detection apparatus and method, program, and storage medium | |
| TWI906985B (en) | Dual-lens electronic apparatus and image consistency improvement method thereof | |
| JP2021057825A (en) | Signal processing apparatus and method, and imaging apparatus |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20111124 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120720 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120724 |
|
| A762 | Written abandonment of application |
Free format text: JAPANESE INTERMEDIATE CODE: A762 Effective date: 20120912 |
