[go: up one dir, main page]

JP2011160354A - Image processing device, image processing method, and program therefor - Google Patents

Image processing device, image processing method, and program therefor Download PDF

Info

Publication number
JP2011160354A
JP2011160354A JP2010022429A JP2010022429A JP2011160354A JP 2011160354 A JP2011160354 A JP 2011160354A JP 2010022429 A JP2010022429 A JP 2010022429A JP 2010022429 A JP2010022429 A JP 2010022429A JP 2011160354 A JP2011160354 A JP 2011160354A
Authority
JP
Japan
Prior art keywords
image data
divided image
divided
correction
subject
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010022429A
Other languages
Japanese (ja)
Inventor
Takashi Hanamoto
貴志 花本
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2010022429A priority Critical patent/JP2011160354A/en
Publication of JP2011160354A publication Critical patent/JP2011160354A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Circuits (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Studio Devices (AREA)

Abstract

【課題】複数の分割画像データ間のつなぎあわせの精度を向上させ、従来よりも高精度なパノラマ画像データを生成する。
【解決手段】画像処理装置は、被写体の全景画像データを取得し(ステップS201)、被写体の分割画像データを取得する(ステップS202)。そして、画像処理装置は、各分割画像データと、当該分割画像データに対応する領域の前記全景画像データとの差分を算出し(ステップS206)、差分に応じた補正処理を各分割画像データに対して実行する(ステップS207)。次に画像処理装置は、補正後の各分割画像データを合成してパノラマ画像データを生成する(ステップS212)。
【選択図】図5
An object of the present invention is to improve the accuracy of splicing between a plurality of divided image data and generate panoramic image data with higher accuracy than before.
An image processing apparatus acquires panoramic image data of a subject (step S201) and acquires divided image data of the subject (step S202). Then, the image processing apparatus calculates a difference between each divided image data and the whole-view image data in an area corresponding to the divided image data (step S206), and performs a correction process according to the difference on each divided image data. (Step S207). Next, the image processing apparatus generates panoramic image data by combining the corrected divided image data (step S212).
[Selection] Figure 5

Description

本発明は、複数の画像データを用いてパノラマ画像データを生成するための技術に関するものである。   The present invention relates to a technique for generating panoramic image data using a plurality of image data.

従来、複数の画像の画像データを用いてパノラマ合成処理を実行するものとしては、合成対象の複数の画像データ間での対応点を抽出し、対応点同士を結ぶことで合成する技術が知られている(例えば、特許文献1参照)。また、予め被写体の全景を撮影しておくことで、被写体の部分画像に対応する複数の画像データの大まかな位置を自動的に決定する技術も存在する(例えば、特許文献2参照)。   Conventionally, as a technique for executing panorama synthesis processing using image data of a plurality of images, a technique for extracting corresponding points between a plurality of image data to be combined and combining the corresponding points is known. (For example, refer to Patent Document 1). In addition, there is a technique for automatically determining a rough position of a plurality of pieces of image data corresponding to a partial image of a subject by photographing an entire view of the subject in advance (see, for example, Patent Document 2).

特開2000−312287号公報JP 2000-312287 A 特開平5−130339号公報Japanese Patent Laid-Open No. 5-130339

しかしながら、特許文献1に開示されるような対応点を抽出する手法では、パノラマ合成に失敗するケースも存在する。これは、ある特定のパターン(模様)が連続する被写体を撮影した際に起こりうる。つまり、撮影画像データに同じようなパターンが複数存在するため、撮影した2枚の画像データ間で対応点の相関が取れなくなる。そのため、間違った対応点同士をつないでしまい、パノラマ画像データが大きく歪んでしまうという課題があった。また、特許文献2に開示される手法を用いて、各撮影画像データの配置が決まっても、被写体を斜め方向から撮影する際の歪みや樽型ひずみや糸巻き型ひずみのようなレンズの歪みがあるため、精度よく合成することは難しい。   However, in the method of extracting corresponding points as disclosed in Patent Document 1, there is a case where panorama synthesis fails. This can occur when a subject in which a specific pattern (pattern) continues is photographed. That is, since there are a plurality of similar patterns in the captured image data, the correlation between corresponding points cannot be obtained between the two captured image data. For this reason, there is a problem in that the corresponding corresponding points are connected to each other and the panoramic image data is greatly distorted. In addition, even when the arrangement of each captured image data is determined using the method disclosed in Patent Document 2, there is a distortion of a lens such as a barrel distortion or a pincushion distortion when an object is photographed from an oblique direction. Therefore, it is difficult to synthesize accurately.

そこで、本発明の目的は、複数の分割画像データ間のつなぎあわせの精度を向上させ、従来よりも高精度なパノラマ画像データを生成することにある。   Therefore, an object of the present invention is to improve the accuracy of joining between a plurality of divided image data, and to generate panoramic image data with higher accuracy than before.

本発明に係る画像処理装置は、被写体の全景画像データを取得する第1の取得手段と、前記被写体の分割画像データを取得する第2の取得手段と、前記第2の取得手段により取得された各分割画像データと、当該分割画像データに対応する領域の前記全景画像データとの差分値を算出する算出手段と、前記算出手段により算出された差分値に応じた補正処理を前記各分割画像データに対して実行する補正手段と、前記補正手段により補正された前記各分割画像データを合成してパノラマ画像データを生成する生成手段とを有することを特徴とする。   The image processing apparatus according to the present invention is acquired by a first acquisition unit that acquires panoramic image data of a subject, a second acquisition unit that acquires divided image data of the subject, and the second acquisition unit. A calculation unit that calculates a difference value between each divided image data and the panoramic image data in an area corresponding to the divided image data, and a correction process according to the difference value calculated by the calculation unit And a generating unit that generates panoramic image data by combining the divided image data corrected by the correcting unit.

本発明によれば、被写体の全景画像データを用いることで、複数の分割画像データ間のつなぎあわせの精度を向上させることが可能となり、従来よりも高精度なパノラマ画像データを生成することができる。   According to the present invention, by using the panoramic image data of the subject, it is possible to improve the accuracy of joining between a plurality of divided image data, and it is possible to generate panoramic image data with higher accuracy than before. .

第1の実施形態に係る画像処理装置のシステム構成を示すブロック図である。1 is a block diagram illustrating a system configuration of an image processing apparatus according to a first embodiment. パノラマ画像の撮影動作の概略を説明するための図である。It is a figure for demonstrating the outline of imaging | photography operation | movement of a panoramic image. パノラマ画像の撮影動作の概略を説明するための図である。It is a figure for demonstrating the outline of imaging | photography operation | movement of a panoramic image. パース補正処理及びメッシュ補正処理の概要を説明するための図である。It is a figure for demonstrating the outline | summary of a perspective correction process and a mesh correction process. パース補正処理及びメッシュ補正処理の概要を説明するための図である。It is a figure for demonstrating the outline | summary of a perspective correction process and a mesh correction process. パース補正処理及びメッシュ補正処理において、最適なパラメータを検出する手法について説明するための図である。It is a figure for demonstrating the method of detecting the optimal parameter in a perspective correction process and a mesh correction process. パース補正処理及びメッシュ補正処理において、最適なパラメータを検出する手法について説明するための図である。It is a figure for demonstrating the method of detecting the optimal parameter in a perspective correction process and a mesh correction process. 第1の実施形態におけるパノラマ画像データ合成処理を示すフローチャートである。It is a flowchart which shows the panoramic image data synthetic | combination process in 1st Embodiment. 全景画像データと分割画像データとの差分値を求めても、全景画像データが拡大された状態なので十分な精度が得られない現象を説明するための図である。It is a figure for demonstrating the phenomenon in which sufficient accuracy cannot be obtained even if it calculates | requires the difference value of whole view image data and divided image data, since the whole view image data is in the state expanded. 第2の実施形態におけるパノラマ画像データの合成処理を示すフローチャートである。It is a flowchart which shows the synthesis process of the panoramic image data in 2nd Embodiment. プロジェクタ投影システムの概略を説明するための図である。It is a figure for demonstrating the outline of a projector projection system. 第3の実施形態におけるパノラマ画像データの合成処理を示すフローチャートである。It is a flowchart which shows the synthesis process of the panorama image data in 3rd Embodiment. エッジ抽出処理の結果を示す図である。It is a figure which shows the result of an edge extraction process. 第4の実施形態におけるパノラマ画像データの合成処理の概略を説明するための図である。It is a figure for demonstrating the outline of the synthesizing process of the panorama image data in 4th Embodiment. 第4の実施形態におけるパノラマ画像データの合成処理を示すフローチャートである。It is a flowchart which shows the synthesis | combination process of the panorama image data in 4th Embodiment.

以下、本発明を適用した好適な実施形態を、添付図面を参照しながら詳細に説明する。   DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments to which the invention is applied will be described in detail with reference to the accompanying drawings.

先ず、第1の実施形態について説明する。本実施形態では、全景画像データを基にパノラマ画像データを生成する手法について説明する。   First, the first embodiment will be described. In the present embodiment, a method for generating panoramic image data based on full-view image data will be described.

図1は、第1の実施形態に係る画像処理装置のシステム構成を示すブロック図である。入力装置101は、ユーザからの指示やデータを入力する装置であり、キーボードやマウス等のポインティングシステムを含む。表示装置102は、GUI等を表示する装置であり、通常はCRTや液晶ディスプレイ等のモニタを表す。蓄積装置103は、画像データやプログラムを蓄積する装置であり、通常はハードディスクが用いられる。104は、CPUであり、上述した各構成の処理の全てに関わる制御を実行する。RAM106は、その処理に必要なプログラム、データ、作業領域等をCPU104に提供する。また、以降のフローチャートの処理に必要な制御プログラムは、蓄積装置103に格納されているものとし、一旦RAM106に読み込まれてから実行される。カメラ装置105は、デジタルカメラ等と接続し、入力画像データを取得する。なお、システム構成については、上記以外にも様々な構成要素が存在するが、説明は省略する。   FIG. 1 is a block diagram illustrating a system configuration of the image processing apparatus according to the first embodiment. The input device 101 is a device for inputting instructions and data from a user, and includes a pointing system such as a keyboard and a mouse. The display device 102 is a device that displays a GUI or the like, and usually represents a monitor such as a CRT or a liquid crystal display. The storage device 103 is a device for storing image data and programs, and normally a hard disk is used. Reference numeral 104 denotes a CPU, which executes control related to all the processes of the above-described components. The RAM 106 provides programs, data, work areas, and the like necessary for the processing to the CPU 104. Further, it is assumed that the control program necessary for the processing of the subsequent flowcharts is stored in the storage device 103, and is once executed after being read into the RAM. The camera device 105 is connected to a digital camera or the like and acquires input image data. As for the system configuration, there are various components other than the above, but a description thereof will be omitted.

図2−1及び図2−2は、パノラマ画像の撮影動作の概略を説明するための図である。図2−1(a)は、パノラマ画像データを生成する際の被写体を示している。本実施形態では、図2−1(a)のような絵画を対象とした、高解像度パノラマ画像データを生成することとする。図2−1(b)は、図2−1(a)に示す被写体の全景画像を撮影する方法を表している。この場合、被写体全域がカメラの画角に収まるようにカメラを被写体から離れた位置に設置するか、カメラのレンズを広角よりのレンズに交換して撮影する。図2−1(c)は分割画像を撮影する方法を表している。先ず、被写体の中央部分を捉えるようにカメラを設置する。そして、被写体の必要な領域を撮影できるようにレンズの望遠を調整するか、レンズの交換を行って撮影を行う。このときの画角は、作成したいパノラマ画像データの解像度に依存する。パノラマ画像データの解像度が高い場合、撮影時の分割数が増加する。そのため、画角を小さくする必要がある。逆にパノラマ画像データの解像度が低い場合、撮影時の分割数は少なくてよいので画角は大きくする。次にカメラを2つの回転軸に沿って回転させる。実際にはカメラを回転可能な旋回台に設置して旋回台を回転させることにより、カメラを回転させる。旋回台には回転計が設置されているため、カメラの回転角度も取得できる。カメラの回転により、被写体の中央部分のみでなく、被写体全域を撮影できるようになる。具体的には、被写体の左上から撮影を始め、徐々に回転させながら、被写体全域の撮影を行う。このときの回転角は、前述した撮影時の分割数に依存し、分割数が少ない場合、回転角は大きくなり、分割数が多い場合、回転角は小さくなる。このとき、隣接する分割画像同士でオーバーラップ領域(重複領域)ができるように回転角を調整しておく。調整の具体例を以下に示す。   FIGS. 2A and 2B are diagrams for explaining an outline of the panoramic image shooting operation. FIG. 2-1 (a) shows a subject when generating panoramic image data. In the present embodiment, high-resolution panoramic image data for a picture as shown in FIG. FIG. 2-1 (b) shows a method for capturing a panoramic image of the subject shown in FIG. 2-1 (a). In this case, the camera is placed at a position away from the subject so that the entire area of the subject is within the angle of view of the camera, or the camera lens is replaced with a lens with a wider angle. FIG. 2-1 (c) shows a method for capturing a divided image. First, a camera is installed so as to capture the center of the subject. Then, the telephoto of the lens is adjusted so that the necessary area of the subject can be photographed, or the lens is exchanged for photographing. The angle of view at this time depends on the resolution of the panoramic image data to be created. When the resolution of panoramic image data is high, the number of divisions at the time of shooting increases. Therefore, it is necessary to reduce the angle of view. Conversely, when the resolution of panoramic image data is low, the number of divisions at the time of shooting may be small, so the angle of view is increased. Next, the camera is rotated along two rotation axes. Actually, the camera is rotated by installing the camera on a rotatable turntable and rotating the turntable. Since the turntable is equipped with a tachometer, the rotation angle of the camera can also be acquired. By rotating the camera, it is possible to photograph not only the central part of the subject but also the entire subject. Specifically, shooting is started from the upper left of the subject, and the entire subject is shot while gradually rotating. The rotation angle at this time depends on the number of divisions at the time of shooting described above. When the number of divisions is small, the rotation angle is large, and when the number of divisions is large, the rotation angle is small. At this time, the rotation angle is adjusted so that overlapping regions (overlapping regions) are formed between adjacent divided images. A specific example of adjustment is shown below.

ここでは、例として所望のパノラマ画像データの解像度が7000×5000であり、カメラの解像度が3000×3000、且つオーバーラップ領域として、分割画像データの1/3を用いる場合を考える。このとき、2枚の分割画像データを横方向に合成すると、図2−2(d)のように分割画像データ301及び302が1/3(1000ピクセル)だけ重なり、オーバーラップ領域303ができる。この結果、合成画像データのサイズは5000×3000になる。このサイズに基づいて分割数を計算すると、分割結果304のように、分割画像数は6枚となる。また、本実施形態では、カメラを回転させることで、被写体全域の撮影を行うが、カメラ自体がレール等によって、上下左右に平行移動するような撮影システムでも構わないし、被写体が平行移動するようなシステムでも構わない。図2−2(a)は、図2−1(b)の方法を用いて全景画像の撮影を行った結果である。この場合、樽型歪みや糸巻き型歪みと呼ばれるレンズの歪みがあるので、その歪みは既存の手法を用いて予め補正しておく。なお、全景画像を一枚の画像データに収めているので、全景画像データの解像度は分割画像データの解像度に比べて高くはない。   Here, as an example, consider the case where the desired panoramic image data resolution is 7000 × 5000, the camera resolution is 3000 × 3000, and 1/3 of the divided image data is used as the overlap region. At this time, when the two pieces of divided image data are combined in the horizontal direction, the divided image data 301 and 302 overlap each other by 1/3 (1000 pixels) as shown in FIG. As a result, the size of the composite image data is 5000 × 3000. When the number of divisions is calculated based on this size, the number of divided images is six as in the division result 304. In this embodiment, the entire area of the subject is photographed by rotating the camera. However, an imaging system in which the camera itself translates vertically and horizontally by a rail or the like may be used. It does not matter even if it is a system. FIG. 2-2 (a) shows the result of taking a panoramic image using the method of FIG. 2-1 (b). In this case, since there is lens distortion called barrel distortion or pincushion distortion, the distortion is corrected in advance using an existing method. It should be noted that since the panoramic image is stored in one piece of image data, the resolution of the panoramic image data is not higher than the resolution of the divided image data.

図2−2(b)は、図2−1(c)の方法を用いて分割画像の撮影を行った結果を示している。縦横それぞれ3分割で撮影された分割画像を示す。各分割画像データは、全景画像データと同様にレンズ歪みが発生しているため、既存の手法を用いて予め補正しておく必要がある。また、図2−2(c)の右図に示すように、各分割画像データでは縦線や横線が斜め方向に歪んだ現象が見られる。これは、カメラの回転により、被写体を斜め方向から撮影しているためである。また、被写体とカメラが平行に設置できていない場合にもこのような歪みが発生する。このような歪みを補正する処理をパース補正と呼び、パース補正を行うことにより、分割された複数の画像を精度よく合成することができる。また、パース補正のみでは、補正しきれない被写体の微小な動きの影響を取り除くため、各分割画像データをメッシュ分割し、メッシュを微小変形させるメッシュ補正処理も実行する必要がある。   FIG. 2-2 (b) shows the result of taking a divided image using the method of FIG. 2-1 (c). A divided image taken in three vertical and horizontal divisions is shown. Since each piece of divided image data has a lens distortion similar to the whole-view image data, it is necessary to correct in advance using an existing method. Further, as shown in the right diagram of FIG. 2-2 (c), in each divided image data, a phenomenon in which vertical lines and horizontal lines are distorted in an oblique direction is seen. This is because the subject is photographed from an oblique direction by rotating the camera. Such distortion also occurs when the subject and the camera cannot be installed in parallel. A process for correcting such distortion is called a parse correction. By performing the parse correction, a plurality of divided images can be synthesized with high accuracy. Further, in order to remove the influence of the minute movement of the subject that cannot be corrected only by the perspective correction, it is necessary to execute mesh correction processing for dividing each divided image data into meshes and minutely deforming the mesh.

図3−1及び図3−2は、パース補正処理及びメッシュ補正処理の概要を説明するための図である。図3−1(a)は、パース補正処理を表している。403は被写体であり、カメラ401で被写体403を撮影する場合を考える。カメラ401は、斜め方向から被写体403を撮影している。このときの画像データの画素位置と被写体位置との関係は、以下の式1で表すことができる。
ImagePos(X,Y)=Screen(Proj*View*Pos(x,y,z))・・・式1
ここで、Pos(x,y,z)は被写体の3次元的な位置を示している。Viewは視点変換行列であり、カメラ401の位置、撮影方向を示す。Projは、3次元から2次元への射影行列であり、カメラの画角を示す。Screen()は、座標系を変換するのに用いられる関数である。X、Yは、画像データの2次元的な配置を示しており、整数値で表される。402は仮想カメラであり、被写体403に対して正面方向に設置されている。仮想カメラ402で撮影される画像データの再現を図ることにより、パース補正処理を実施できる。仮想カメラ402においても、画像データの画素位置と被写体位置との関係を、以下の式2で表すことができる。
ImageVPos(X,Y)=Screen(Proj*ViewV*Pos(x,y,z))・・・式2
ViewVは視点変換行列であり、仮想カメラ402の位置、撮影方向を示す。ViewV以外のパラメータは式1と同じである。ここで、式1と式2とをマージすることにより、
ImageVPos(X,Y)=Func(ImagePos(X0,Y0))・・・式3
が得られる。Func()は、ImageVPos()とImagePos()とを対応付ける関数であり、式1及び式2より得られる。X0、Y0は、X、Yに対応するカメラ401の画像データの座標であり、実数値をとる。これで、ImagePos(X0,Y0)の画素値がわかれば、ImageVPos(X,Y)の画素値を設定できる。即ち、仮想カメラ402の撮像画像データを再現することができる。このとき、X0,Y0は実数値であるので、画素値を取得する場合は実数値間において補間処理が必要となる。
FIGS. 3A and 3B are diagrams for explaining the outline of the perspective correction process and the mesh correction process. FIG. 3A illustrates the perspective correction process. Reference numeral 403 denotes a subject, and a case where the subject 401 is photographed by the camera 401 is considered. The camera 401 is photographing the subject 403 from an oblique direction. The relationship between the pixel position of the image data and the subject position at this time can be expressed by the following Expression 1.
ImagePos (X, Y) = Screen (Proj * View * Pos (x, y, z)) Equation 1
Here, Pos (x, y, z) indicates the three-dimensional position of the subject. View is a viewpoint conversion matrix and indicates the position of the camera 401 and the shooting direction. Proj is a projection matrix from 3D to 2D, and indicates the angle of view of the camera. Screen () is a function used to convert the coordinate system. X and Y indicate a two-dimensional arrangement of image data and are represented by integer values. A virtual camera 402 is installed in the front direction with respect to the subject 403. The perspective correction process can be performed by reproducing the image data captured by the virtual camera 402. Also in the virtual camera 402, the relationship between the pixel position of the image data and the subject position can be expressed by the following Expression 2.
ImageVPos (X, Y) = Screen (Proj * ViewV * Pos (x, y, z)) Equation 2
ViewV is a viewpoint conversion matrix, and indicates the position and shooting direction of the virtual camera 402. Parameters other than ViewV are the same as those in Equation 1. Here, by merging Equation 1 and Equation 2,
ImageVPos (X, Y) = Func (ImagePos (X 0 , Y 0 ))...
Is obtained. Func () is a function that associates ImageVPos () with ImagePos (), and is obtained from Equation 1 and Equation 2. X 0 and Y 0 are the coordinates of the image data of the camera 401 corresponding to X and Y, and take real values. Now, if the pixel value of ImagePos (X 0 , Y 0 ) is known, the pixel value of ImageVPos (X, Y) can be set. That is, the captured image data of the virtual camera 402 can be reproduced. At this time, since X 0 and Y 0 are real values, interpolation processing is required between the real values when obtaining pixel values.

図3−1(b)において、カメラ画像データ404は、カメラ401で撮影された画像データである。図中において被写体領域であるグレーの領域が台形状に歪んでいる。これを、式3を用いて、仮想カメラ402により撮影される撮影画像データを再現した結果が仮想カメラ画像データ405である。被写体領域の歪みが補正されていることがわかる。理論的には、レンズ補正、パース補正が行われれば、画像データの合成は分割画像データを配置するだけで可能になる。しかし、実際には旋回台の回転誤差等が原因で、そのまま合成することはできない。そのため、パース補正時のカメラ回転角度等のパラメータを、最適な値に修正する必要がある。更に、被写体の微小な動きの影響を取り除くため、図3−2(a)に示すメッシュ補正が必要となる。メッシュ補正は、各分割画像データを微小変形させる処理である。分割画像データを細かいメッシュ状に分け、メッシュの各格子点を任意の方向に移動させることにより、合成時の細かいずれを補正する。図3−2(b)は、分割画像の撮影位置を取得する方法を示している。カメラと被写体との距離がLで、カメラの回転度数が横方向にθ、縦方向にφであるとする。このとき、分割画像の中心は点(L×tanθ,L×tanφ)を向いているため、これらの値を用いて撮影位置を決定することができる。また同時に、全景画像との位置の対応付けを行うこともできる。   In FIG. 3B, camera image data 404 is image data captured by the camera 401. In the figure, the gray region which is the subject region is distorted in a trapezoidal shape. The virtual camera image data 405 is obtained by reproducing the captured image data photographed by the virtual camera 402 using Expression 3. It can be seen that the distortion of the subject area is corrected. Theoretically, if lens correction and perspective correction are performed, image data can be synthesized simply by arranging divided image data. However, in actuality, it cannot be synthesized as it is because of a rotation error of the swivel base. Therefore, it is necessary to correct parameters such as the camera rotation angle at the time of perspective correction to optimum values. Furthermore, in order to remove the influence of the minute movement of the subject, the mesh correction shown in FIG. The mesh correction is a process for minutely deforming each divided image data. The divided image data is divided into fine meshes, and each lattice point of the mesh is moved in an arbitrary direction to correct a fine shift at the time of synthesis. FIG. 3-2 (b) shows a method for acquiring the shooting position of the divided image. It is assumed that the distance between the camera and the subject is L, and the rotational frequency of the camera is θ in the horizontal direction and φ in the vertical direction. At this time, since the center of the divided image faces the point (L × tan θ, L × tan φ), the photographing position can be determined using these values. At the same time, it is possible to associate the position with the panoramic image.

図4−1及び図4−2は、パース補正処理及びメッシュ補正処理において、最適なパラメータを検出する手法について説明するための図である。処理全体の流れとしては、初めにパース補正で大まかな補正を行い、次にメッシュ補正で微調整を行う流れとなる。そのため先ず図4−1において、CPU104はパース補正の最適パラメータを決定する。分割画像データ1102と、分割画像データ1102に対応する全景画像データ1101とがあった場合を考える。まず、CPU104は、旋回台の回転計から得られたカメラの回転角度や、レーザ測定等により取得した被写体とカメラとの距離情報をパラメータとして入力し、分割画像データ1102に対してパース補正を実行し、分割画像データ1104を生成する。そして、CPU104は、分割画像データ1104と全景画像データ1101との差分をとった、差分画像データ1103を生成する。差分画像データ1103において、黒い領域は差分値が0、黒以外の領域は差分値が0でないことを示している。理論上はパース補正を行うことにより、差分画像データは全て黒い領域になるはずである。しかし、実際には旋回台の精度が悪い場合などは、回転角度にずれが生じるため、黒以外の領域も発生する。そのため、ずれが生じた分の回転に対して修正する必要がある。そこで、CPU104は、旋回台の回転計から得られたカメラの回転角度に対し、その前後に回転角度が振れるようにパラメータを変更させ、ずれを補正していく。   FIGS. 4A and 4B are diagrams for explaining a technique for detecting an optimum parameter in the perspective correction process and the mesh correction process. As a flow of the entire processing, first, rough correction is performed by the perspective correction, and then fine adjustment is performed by the mesh correction. Therefore, first in FIG. 4A, the CPU 104 determines the optimum parameter for the perspective correction. Consider a case where there are divided image data 1102 and panoramic image data 1101 corresponding to the divided image data 1102. First, the CPU 104 inputs the rotation angle of the camera obtained from the tachometer of the swivel base and the distance information between the subject and the camera acquired by laser measurement or the like as parameters, and executes the perspective correction on the divided image data 1102. Then, divided image data 1104 is generated. Then, the CPU 104 generates difference image data 1103 obtained by taking the difference between the divided image data 1104 and the panoramic image data 1101. In the difference image data 1103, the black area indicates that the difference value is 0, and the non-black area indicates that the difference value is not 0. Theoretically, by performing the parse correction, the difference image data should be all black areas. However, in reality, when the accuracy of the swivel base is poor, the rotational angle is shifted, so that a region other than black also occurs. Therefore, it is necessary to correct the rotation for the amount of deviation. Therefore, the CPU 104 corrects the deviation by changing the parameter so that the rotation angle of the camera obtained from the tachometer tachometer varies before and after the rotation angle.

先ず、CPU104は、ある変更したパラメータを用いて、分割画像データ1102に対してパース補正を実行し、分割画像データ1105を生成する。同時に、CPU104は、分割画像データ1105と全景画像データ1101との差分をとった、差分画像データ1106を生成する。すると、差分画像データ1106は、差分画像データ1103と比較すると黒い領域が増えていることがわかる。つまり、差分値の総和が差分画像データ1106の方が小さくなっている。後は、パラメータを変えながらパース補正を繰り返し、差分値の総和が一番小さくなるパラメータを決定すれば、回転角度のずれを修正できる。大抵の場合は、この状態で差分画像データは全て黒い領域になる。しかし、被写体が空調の風等により、微小に動いている場合には、パース補正を行っても黒以外の領域が発生することがある。そのため、図4−2のようなメッシュ補正を実施する。左図がメッシュ補正前で、全景画像データと分割画像データとを重ねた状態である。また、縦線と横線が交わる各点がメッシュの格子点となっており、各格子点の位置は分割画像データの位置から計算できる。左図では、分割画像データの輪郭1107と全景画像データの輪郭1108とにずれがある。そのため、この状態で差分画像データを生成すると、差分値の総和は大きくなる。そこで、輪郭がずれている箇所の近くのメッシュの格子点1109を右図のように移動させると、分割画像データと全景画像データの輪郭が一致するようになる。つまり、差分値の総和が小さくなる。このように、各メッシュの格子点を動かしながら、差分値の総和が最も小さくなる格子点位置を決定すれば、被写体が微小に動いている影響を補正できる。このようにして、各補正の差分値が最小になるように調整すると、合成の精度を向上させることができる。   First, the CPU 104 performs perspective correction on the divided image data 1102 using a certain changed parameter, and generates divided image data 1105. At the same time, the CPU 104 generates difference image data 1106 by taking the difference between the divided image data 1105 and the panoramic image data 1101. Then, it can be seen that the difference image data 1106 has more black areas than the difference image data 1103. That is, the difference image data 1106 has a smaller sum of difference values. After that, it is possible to correct the rotational angle deviation by repeating the perspective correction while changing the parameters, and determining the parameter with the smallest sum of the difference values. In most cases, the difference image data is all black in this state. However, when the subject is moving minutely due to air-conditioning wind or the like, an area other than black may occur even if the perspective correction is performed. Therefore, mesh correction as shown in FIG. The left figure shows a state in which the panoramic image data and the divided image data are superimposed before mesh correction. Each point where the vertical line and the horizontal line intersect is a mesh lattice point, and the position of each lattice point can be calculated from the position of the divided image data. In the left figure, there is a difference between the contour 1107 of the divided image data and the contour 1108 of the full-view image data. Therefore, if difference image data is generated in this state, the sum of the difference values becomes large. Therefore, when the mesh lattice point 1109 near the portion where the contour is shifted is moved as shown in the right figure, the contours of the divided image data and the whole-view image data coincide. That is, the sum of the difference values is reduced. In this way, by moving the grid points of each mesh and determining the grid point position where the sum of the difference values is minimized, the influence of the subject moving slightly can be corrected. In this way, the adjustment accuracy can be improved by adjusting so that the difference value of each correction is minimized.

図5は、本実施形態におけるパノラマ画像データ合成処理を示すフローチャートである。ステップS201において、CPU104は、図2−1で説明した手法により全景画像の撮影をカメラ装置105に実行させる。全景画像データはカメラ装置105から入力され、RAM106上に展開される。このときCPU104は全景画像データに対してレンズ歪み補正を実施する。ステップS202において、CPU104は所望のパノラマ画像データの解像度から分割数Nを決定し、図2−1で説明した手法によりN枚分の分割画像データの撮影を行う。分割画像データ群もカメラ装置105から入力され、RAM106上に展開される。このときCPU104は分割画像データに対してレンズ歪み補正を実施する。ステップS203において、CPU104は実施する補正処理を決定する。補正処理としてはパース補正処理、メッシュ補正処理があり、パース補正処理で大まかな補正を行い、メッシュ補正処理で微調整を行う流れとなる。そのため、1回目の処理はパース補正処理を選択し、2回目の処理はメッシュ補正処理を選択することになる。ステップS204において、CPU104はRAM106上に変数iを生成し、0に初期化する。また、CPU104は各補正に用いるパラメータもここで初期化する。例えばパース補正の場合に用いられるパラメータは、カメラ位置(XC,YC,ZC)、カメラと被写体との距離L、カメラの回転角(θ,φ)であり、撮影時にレーザ距離計や回転計等で測定した測定値が存在する。さらに、CPU104は、測定値から各パラメータを変化させる範囲を決めておき、その最小値で各パラメータを初期化しておく。メッシュ補正の場合も、各メッシュの座標値(Xm,Ym,Zm)がパラメータであるので、CPU104は撮影時のパラメータから変化する範囲を決めておき、最小値で初期化しておく。また、CPU104は、同時に各パラメータに対し、それぞれ一定のインクリメント値を決めておく。なお、ステップS201は第1の取得手段の処理例であり、ステップS202は第2の取得手段の処理例である。 FIG. 5 is a flowchart showing the panoramic image data synthesis process in the present embodiment. In step S <b> 201, the CPU 104 causes the camera device 105 to capture a panoramic image using the method described with reference to FIG. 2A. The panoramic image data is input from the camera device 105 and developed on the RAM 106. At this time, the CPU 104 performs lens distortion correction on the full-view image data. In step S202, the CPU 104 determines the division number N from the resolution of the desired panoramic image data, and shoots N pieces of divided image data using the method described with reference to FIG. The divided image data group is also input from the camera device 105 and developed on the RAM 106. At this time, the CPU 104 performs lens distortion correction on the divided image data. In step S203, the CPU 104 determines a correction process to be performed. The correction process includes a parse correction process and a mesh correction process. A rough correction is performed by the parse correction process, and a fine adjustment is performed by the mesh correction process. Therefore, the first process selects the perspective correction process, and the second process selects the mesh correction process. In step S204, the CPU 104 generates a variable i on the RAM 106 and initializes it to 0. The CPU 104 also initializes parameters used for each correction here. For example, parameters used in the perspective correction are the camera position (X C , Y C , Z C ), the distance L between the camera and the subject, and the rotation angle (θ, φ) of the camera. There are measured values measured with a tachometer or the like. Further, the CPU 104 determines a range in which each parameter is changed from the measured value, and initializes each parameter with the minimum value. Also in the case of mesh correction, since the coordinate values (X m , Y m , Z m ) of each mesh are parameters, the CPU 104 determines a changing range from the parameters at the time of shooting and initializes them with a minimum value. In addition, the CPU 104 determines a fixed increment value for each parameter at the same time. Step S201 is a processing example of the first acquisition unit, and step S202 is a processing example of the second acquisition unit.

ステップS205において、CPU104はi番目の分割画像データに対し、指定されたパラメータを用いてステップS203で選択した補正処理を行う。補正結果は、RAM106上の別の領域に保管される。ステップS206において、CPU104は補正処理を行ったi番目の分割画像データと、それに対応する全景画像データの部分領域との差分値を計算する。このとき、図3−2(b)のように、分割画像データの撮影領域を求めることで、分割画像データと全景画像データとの対応を取ることができる。全景画像データと分割画像データでは解像度が異なるので、差分値が計算できるように、CPU104は全景画像データを分割画像データに合わせて拡大しておく。そして、CPU104は画素毎の差分値を足し合わせて差分値の総和を取り、RAM106上に保管しておく。なお、ステップS205は補正手段の処理例であり、ステップS206は算出手段の処理例である。   In step S205, the CPU 104 performs the correction process selected in step S203 on the i-th divided image data using the designated parameters. The correction result is stored in another area on the RAM 106. In step S <b> 206, the CPU 104 calculates a difference value between the i-th divided image data subjected to the correction process and the corresponding partial area of the entire scene image data. At this time, as shown in FIG. 3B, by obtaining the shooting area of the divided image data, it is possible to take correspondence between the divided image data and the full view image data. Since the resolution is different between the panoramic image data and the divided image data, the CPU 104 enlarges the panoramic image data according to the divided image data so that a difference value can be calculated. Then, the CPU 104 adds the difference values for each pixel, takes the sum of the difference values, and stores it on the RAM 106. Step S205 is a processing example of the correction unit, and step S206 is a processing example of the calculation unit.

ステップS207において、CPU104は各補正で用いるパラメータに対し、変化する範囲内の全てのパラメータで差分値が計算されたかを判断する。Yesの場合は、ステップS208に進み、Noの場合は、ステップS205に戻り、CPU104は各補正処理のパラメータに対し、ステップS204で算出したインクリメント値を足し合わせ、再度補正処理を実行する。ステップS208において、CPU104はステップS206で計算した差分値の中から最小のものを選択し、その際の補正パラメータを最適パラメータとして決定する。ステップS209において、CPU104はiを1インクリメントし、ステップS210に進む。ステップS210において、CPU104は全分割画像データに対し、補正処理を行ったかどうかを判断する。Yesの場合は、ステップS211に進み、Noの場合は、ステップS205に戻り、CPU104は次の分割画像データを処理する。ステップS211において、CPU104はパース補正処理、メッシュ補正処理の全ての処理を行ったかどうかを判断する。Yesの場合は、ステップS212に進み、Noの場合は、ステップS203に戻り、CPU104は次の補正処理に移る。ステップS212において、CPU104は全ての分割画像データに対して最適パラメータ群を用いて全ての補正処理を行う。そして、CPU104は補正後の各分割画像データ群をつなぎあわせ、パノラマ画像データを生成する。ここでのつなぎあわせ処理は、単純に分割画像データ群を重ね合わせるだけでよく、図3−2(b)のように、CPU104は分割画像データの撮影領域を求め、その位置に分割画像データを重ねていく。以上説明した処理制御を行うことで、高精度なパノラマ画像データを合成することが可能となる。なお、ステップS212は生成手段の処理例である。   In step S207, the CPU 104 determines whether difference values have been calculated for all parameters within the changing range with respect to the parameters used for each correction. If Yes, the process proceeds to step S208. If No, the process returns to step S205, and the CPU 104 adds the increment value calculated in step S204 to each correction process parameter, and executes the correction process again. In step S208, the CPU 104 selects the smallest one from the difference values calculated in step S206, and determines a correction parameter at that time as an optimum parameter. In step S209, the CPU 104 increments i by 1, and proceeds to step S210. In step S210, the CPU 104 determines whether correction processing has been performed on all the divided image data. If Yes, the process proceeds to step S211. If No, the process returns to step S205, and the CPU 104 processes the next divided image data. In step S <b> 211, the CPU 104 determines whether all processing of the perspective correction process and the mesh correction process has been performed. If Yes, the process proceeds to step S212. If No, the process returns to step S203, and the CPU 104 proceeds to the next correction process. In step S212, the CPU 104 performs all correction processes on all the divided image data using the optimum parameter group. Then, the CPU 104 connects the corrected divided image data groups to generate panoramic image data. The stitching process here can be performed simply by superimposing the divided image data groups. As shown in FIG. 3B, the CPU 104 obtains the shooting area of the divided image data and puts the divided image data at that position. Repeat. By performing the processing control described above, it is possible to synthesize high-accuracy panoramic image data. Step S212 is a processing example of the generation unit.

なお、本実施形態では、取りうる全てのパラメータを用いて各補正処理を実行し、その中から最適なパラメータを決定しているが、例えば、遺伝的アルゴリズム等を用いて効率的に最適なパラメータを決定することもできる。また、被写体として絵画等の文化物を用いて説明したが、一般的な広視野の風景等を用いて実現しても同様の効果を得ることができる。   In the present embodiment, each correction process is executed using all possible parameters, and the optimum parameter is determined from among them. For example, the optimum parameter is efficiently used using a genetic algorithm or the like. Can also be determined. In addition, although the description has been made using a cultural object such as a picture as a subject, the same effect can be obtained even if it is realized using a general wide-view landscape.

次に、第2の実施形態について説明する。本実施形態では、パノラマ合成処理を繰り返すことによって、精度と解像度を向上させる手法について説明する。本実施形態のシステム構成、画像の撮影方法及び画像の補正方法については、第1の実施形態と同じであるため、説明を省略する。   Next, a second embodiment will be described. In the present embodiment, a method for improving accuracy and resolution by repeating panorama synthesis processing will be described. Since the system configuration, the image capturing method, and the image correction method of the present embodiment are the same as those of the first embodiment, description thereof will be omitted.

具体的に、3000×2000ピクセルの解像度で撮影可能なカメラを用いて、30000×20000ピクセルのパノラマ画像データを生成する場合を考える。ここでは説明の簡単のため、オーバーラップ領域は考えないものとする。このとき、単純に考えれば、分割数は10×10の100となるが、全景画像データは3000×2000ピクセルの解像度で撮影されるため、分割画像データに比べると解像度が1/10になってしまう。この状態で、全景画像データと分割画像データとの差分値を求めても、全景画像データは10倍に拡大された状態なので十分な精度が出ない。   Specifically, let us consider a case where 30000 × 20000 pixel panoramic image data is generated using a camera capable of photographing at a resolution of 3000 × 2000 pixels. Here, for simplicity of explanation, the overlap region is not considered. At this time, if considered simply, the number of divisions is 10 × 10, but since the panoramic image data is captured with a resolution of 3000 × 2000 pixels, the resolution is 1/10 compared to the divided image data. End up. In this state, even if the difference value between the panoramic image data and the divided image data is obtained, the panoramic image data has been enlarged ten times, so that sufficient accuracy cannot be obtained.

この現象について図6を用いて説明する。まず、分割画像データ1201と、それに対応する全景画像データ1203とがあった場合を考える。ここで、両画像データの差分値を計算するには、分割画像データ1201を拡大し、両画像データのサイズを合わせる必要がある。そこで、CPU104は分割画像データ1201を拡大し、分割拡大画像データ1202を得るが、分割拡大画像データ1202は、拡大処理のためエッジがつぶれてしまい、全景画像データ1203と直接比較するのは難しい。そこでCPU104は、先ず分割数を2×2の4として、パノラマ合成データP(0)を生成する。この場合、差分値の計算においても、全景画像データの拡大率は2倍なので精度上の問題はほとんどない。次にCPU104は、生成したP(0)を全景画像データとして用いて、分割数16(4×4)のパノラマ合成処理を行い、パノラマ合成データP(1)を得る。この場合、前回と同様に、全景画像データP(0)の拡大率は2倍なので、精度上の問題はない。次にCPU104は、生成したP(1)を全景画像データとして用いて、分割数64(8×8)のパノラマ合成処理を行い、パノラマ合成データP(2)を得る。この場合も、前回と同様に、全景画像データP(1)の拡大率は2倍なので精度上の問題はない。最後にCPU104は、生成したP(2)を全景画像データとして用いて、分割数100(10×10)のパノラマ合成処理を行い、パノラマ合成データP(3)を得る。P(3)がこの場合における最終出力パノラマ画像データとなり、解像度と精度を向上させることができる。   This phenomenon will be described with reference to FIG. First, consider the case where there is divided image data 1201 and corresponding panoramic image data 1203. Here, in order to calculate the difference value between the two image data, it is necessary to enlarge the divided image data 1201 and to match the sizes of the two image data. Therefore, the CPU 104 enlarges the divided image data 1201 and obtains divided enlarged image data 1202. However, the edge of the divided enlarged image data 1202 is crushed due to enlargement processing, and it is difficult to directly compare with the whole-view image data 1203. Therefore, the CPU 104 first generates panorama composite data P (0) by setting the number of divisions to 4 (2 × 2). In this case, even in the calculation of the difference value, there is almost no problem in accuracy because the enlargement ratio of the whole-view image data is twice. Next, the CPU 104 uses the generated P (0) as the panoramic image data, performs panorama synthesis processing with a division number of 16 (4 × 4), and obtains panorama synthesis data P (1). In this case, as in the previous case, there is no problem in accuracy because the enlargement rate of the panoramic image data P (0) is twice. Next, the CPU 104 uses the generated P (1) as the panoramic image data, performs panorama synthesis processing with a division number of 64 (8 × 8), and obtains panorama synthesis data P (2). In this case as well, there is no problem in accuracy because the enlargement ratio of the panoramic image data P (1) is twice as in the previous case. Finally, the CPU 104 uses the generated P (2) as the panoramic image data, performs panorama synthesis processing with a division number of 100 (10 × 10), and obtains panorama synthesis data P (3). P (3) is the final output panoramic image data in this case, and the resolution and accuracy can be improved.

図7は、上述した第2の実施形態における処理をまとめて示したフローチャートである。ステップS501において、第1の実施形態と同様に、CPU104は被写体の全景画像データの撮影をカメラ装置105に実行させる。ステップS502において、CPU104はパノラマ合成処理の実行回数Mと、それぞれの合成処理における分割数N(i)を決定する。上記の例では、Mが4で、N(i)=[4,16,64,100]となる。ステップS503において、CPU104は変数iを0に初期化する。ステップS504において、CPU104はi番目の分割画像データの撮影を行う。ここでN(i)枚の画像データを取得する。ステップS505において、CPU104は、撮影した分割画像データを用いて、第1の実施形態と同様の手法でパノラマ画像データP(i)を生成する。ステップS506において、CPU104は全景画像データをP(i)と差し替える。ステップS507において、CPU104はiを1インクリメントする。ステップS508において、CPU104はi=M−1かどうかの判断を行う。Yesの場合は処理を終了し、最終的なパノラマ合成データとして、P(M−1)が得られる。Noの場合は、ステップS504に戻り、処理を続行する。以上説明した処理制御を行うことで、より高精度且つ高解像度なパノラマ画像データを合成することが可能となる。なお、ステップS506は差替え手段の処理例である。   FIG. 7 is a flowchart collectively showing the processes in the second embodiment described above. In step S501, as in the first embodiment, the CPU 104 causes the camera device 105 to capture the panoramic image data of the subject. In step S502, the CPU 104 determines the number M of executions of the panorama synthesis process and the division number N (i) in each synthesis process. In the above example, M is 4 and N (i) = [4, 16, 64, 100]. In step S503, the CPU 104 initializes a variable i to 0. In step S504, the CPU 104 captures the i-th divided image data. Here, N (i) pieces of image data are acquired. In step S505, the CPU 104 generates panoramic image data P (i) using the captured divided image data by the same method as in the first embodiment. In step S506, the CPU 104 replaces the panoramic image data with P (i). In step S507, the CPU 104 increments i by 1. In step S508, the CPU 104 determines whether i = M-1. In the case of Yes, the process is terminated, and P (M−1) is obtained as final panorama composite data. In No, it returns to step S504 and continues a process. By performing the processing control described above, it is possible to synthesize panoramic image data with higher accuracy and higher resolution. Step S506 is a processing example of the replacement unit.

次に、第3の実施形態について説明する。本実施形態では、プロジェクタを用いてパノラマ画像データを生成する手法について説明する。本実施形態のシステム構成、画像の撮影方法及び画像の補正方法については、第1の実施形態と同様であるため、説明を省略する。   Next, a third embodiment will be described. In this embodiment, a method for generating panoramic image data using a projector will be described. Since the system configuration, the image capturing method, and the image correction method of the present embodiment are the same as those of the first embodiment, description thereof will be omitted.

図8は、プロジェクタ投影システムの概略を説明するための図である。パノラマ合成等の画像処理を実行する情報端末605に、パノラマ画像投影用のプロジェクタ603と、投影結果をキャプチャするためのキャプチャカメラ604とが接続されている。また、プロジェクタ603からの投影結果は、被写体601に重ねるように投影領域602に投影する。このとき、プロジェクタのレンズ性能や設置誤差に起因する、投影時の歪みを修正するためキャリブレーション処理を行っておく。   FIG. 8 is a diagram for explaining the outline of the projector projection system. A panorama image projection projector 603 and a capture camera 604 for capturing a projection result are connected to an information terminal 605 that executes image processing such as panorama synthesis. Further, the projection result from the projector 603 is projected onto the projection area 602 so as to overlap the subject 601. At this time, calibration processing is performed in order to correct distortion at the time of projection caused by the lens performance of the projector and installation errors.

図9は、本実施形態のパノラマ画像データの合成処理を示すフローチャートである。ステップS901において、情報端末605のCPU104は所望のパノラマ画像データの解像度から分割数Nを決定し、図2−1及び図2−2で説明した手法でN枚分の分割画像データの撮影を行う。撮影された分割画像データはカメラ装置105から入力され、情報端末605のRAM106上に展開される。ステップS902において、CPU104はRAM106上に変数iを生成し、0に初期化する。また、CPU104はパース補正処理、メッシュ補正処理の各補正処理に対し、パラメータを初期値に設定する。さらに、CPU104は各補正のパラメータに対し、それぞれ一定のインクリメント値を設定しておく。初期化処理については、第1の実施形態で説明しているため、詳細は省略する。ステップS903において、CPU104は分割画像データ群を合成し、パノラマ画像データをRAM106上に生成する。このときの処理を具体的に説明する。   FIG. 9 is a flowchart showing panorama image data synthesis processing according to this embodiment. In step S901, the CPU 104 of the information terminal 605 determines the division number N from the resolution of the desired panoramic image data, and shoots N pieces of divided image data using the method described with reference to FIGS. . The captured divided image data is input from the camera device 105 and developed on the RAM 106 of the information terminal 605. In step S902, the CPU 104 generates a variable i on the RAM 106 and initializes it to 0. Further, the CPU 104 sets parameters to initial values for each of the correction processes of the perspective correction process and the mesh correction process. Further, the CPU 104 sets a fixed increment value for each correction parameter. Since the initialization process has been described in the first embodiment, the details are omitted. In step S <b> 903, the CPU 104 combines the divided image data groups and generates panoramic image data on the RAM 106. The process at this time will be specifically described.

まず、CPU104は各補正の指定されたパラメータを用いて補正処理を行う。そして、図3−2(b)のように、CPU104は分割画像データの撮影領域を取得し、その位置に分割画像データを単純に重ね合わせる。これによって、パノラマ合成データを生成することができる。ステップS904において、CPU104は生成したパノラマ画像データを、プロジェクタ603を用いて被写体に投影する。ステップS905において、CPU104は投影結果をキャプチャカメラ604を用いて撮影し、キャプチャ画像データを得る。ステップS906において、CPU104はキャプチャ画像データに対してエッジ抽出処理を行う。エッジ抽出処理は、例えばラプラシアンフィルタやハイパスフィルタ等を用いる。このときの結果を図10(a)に示す。ステップS907において、CPU104はエッジ比較処理を行う。これは、あるエッジの近辺を走査し、類似するエッジを検出する。エッジの類似度としては、エッジをn次曲線に近似した際のパラメータや、エッジを細かい線分に分割した際のそれぞれの傾きと長さ等を用いる。   First, the CPU 104 performs correction processing using the specified parameters for each correction. Then, as shown in FIG. 3B, the CPU 104 acquires the shooting area of the divided image data, and simply superimposes the divided image data on the position. Thereby, panorama synthesis data can be generated. In step S <b> 904, the CPU 104 projects the generated panoramic image data onto the subject using the projector 603. In step S905, the CPU 104 captures the projection result using the capture camera 604, and obtains captured image data. In step S906, the CPU 104 performs edge extraction processing on the captured image data. For example, a Laplacian filter or a high-pass filter is used for the edge extraction process. The result at this time is shown in FIG. In step S907, the CPU 104 performs edge comparison processing. This scans the vicinity of an edge and detects similar edges. As the edge similarity, a parameter when the edge is approximated to an nth-order curve, each inclination and length when the edge is divided into fine line segments, and the like are used.

ここで、例えば図10(b)に示すように、エッジ701及びエッジ702が検出されたとする。このとき、CPU104は2本のエッジの距離を計算し、エッジ間距離703を算出する。CPU104はこの処理を全エッジに対し実行し、その総和値を求める。ステップS908において、CPU104は各補正で用いるパラメータに対し、変化する範囲内の全てのパラメータでエッジ総和値が計算されたかを判断する。Yesの場合は、ステップS909に進み、Noの場合は、ステップS903に戻り、CPU104は各補正処理のパラメータに対し、ステップS902で算出したインクリメント値を加え、再度パノラマ合成処理を実行する。ステップS909において、CPU104はステップS907で計算したエッジ総和値の中から最小のものを選択し、その際の補正パラメータを最適パラメータとして決定する。ステップS910において、CPU104はiを1インクリメントし、ステップS911に進む。ステップS911において、CPU104は全分割画像データに対し、各補正処理を行ったかどうか(i=N−1かどうか)を判断する。Yesの場合はステップS912に進み、Noの場合は、ステップS903に戻り、次の分割画像データを処理する。ステップS912において、CPU104は各分割画像データに対し、最適パラメータ群を用いて各補正処理を行い、パノラマ合成データを生成する。   Here, for example, as shown in FIG. 10B, it is assumed that an edge 701 and an edge 702 are detected. At this time, the CPU 104 calculates the distance between the two edges and calculates the distance 703 between the edges. The CPU 104 executes this process for all the edges and obtains the sum value. In step S908, the CPU 104 determines whether or not the edge total value has been calculated for all parameters within the changing range with respect to the parameters used for each correction. If Yes, the process proceeds to step S909. If No, the process returns to step S903, and the CPU 104 adds the increment value calculated in step S902 to the parameters of each correction process, and executes the panorama synthesis process again. In step S909, the CPU 104 selects the smallest one from the total edge values calculated in step S907, and determines a correction parameter at that time as an optimum parameter. In step S910, the CPU 104 increments i by 1, and proceeds to step S911. In step S911, the CPU 104 determines whether each correction process has been performed on all the divided image data (i = N−1). If yes, the process proceeds to step S912. If no, the process returns to step S903 to process the next divided image data. In step S912, the CPU 104 performs each correction process on each divided image data using the optimum parameter group, and generates panorama composite data.

以上説明した処理制御を行うことで、高精度なパノラマ画像データを合成することが可能となる。さらに、実際の被写体上に合成結果を投影するので、被写体に対する忠実再現度が一見してわかる。   By performing the processing control described above, it is possible to synthesize high-accuracy panoramic image data. Furthermore, since the synthesis result is projected onto the actual subject, the faithful reproducibility for the subject can be seen at a glance.

次に、第4の実施形態について説明する。本実施形態では、プロジェクタの投影領域を変化させることによって、精度と解像度を向上させる手法について説明する。本実施形態のシステム構成、画像の撮影方法及び画像の補正方法については、第1の実施形態と同様であるため、説明を省略する。   Next, a fourth embodiment will be described. In this embodiment, a method for improving accuracy and resolution by changing the projection area of the projector will be described. Since the system configuration, the image capturing method, and the image correction method of the present embodiment are the same as those of the first embodiment, description thereof will be omitted.

3000×2000ピクセルの解像度で投影可能なプロジェクタを用いて、30000×20000ピクセルのパノラマ画像データを生成する場合を考える。ここでは、分かりやすいようにオーバーラップ領域は考えないものとする。単純に、被写体全域にプロジェクタで投影を行った場合、投影画像の解像度は3000×2000ピクセルのため、生成後のパノラマ画像データに比べると解像度が1/10になってしまう。この状態でエッジ間の距離を求めても、投影画像は10倍に拡大された状態なので十分な精度が出ない。この現象については第2の実施形態と同様であるので、詳細な説明は省略する。そこで、CPU104はプロジェクタの投影領域を、10×10の100個の領域に分割する。そして、CPU104は、それぞれの領域において、対応するパノラマ画像データの一部を投影する。この様子を、図11(a)に示す。プロジェクタ803は、投影領域802を絞り込んで投影している。このとき、投影する画像は、図11(b)のように、パノラマ画像データ805の中の投影領域802に対応する領域である投影画像806となる。あとは、投影領域を上下左右に移動しながら、投影画像を変化させ、第3の実施形態と同様の処理を繰り返す。   Consider a case where panoramic image data of 30000 × 20000 pixels is generated using a projector capable of projecting at a resolution of 3000 × 2000 pixels. Here, it is assumed that the overlap region is not considered for easy understanding. Simply, when the projection is performed on the entire object by the projector, the resolution of the projected image is 3000 × 2000 pixels, so that the resolution is 1/10 compared to the generated panoramic image data. Even if the distance between the edges is obtained in this state, the projection image is magnified 10 times, so that sufficient accuracy cannot be obtained. Since this phenomenon is the same as in the second embodiment, a detailed description thereof is omitted. Therefore, the CPU 104 divides the projection area of the projector into 100 areas of 10 × 10. Then, the CPU 104 projects a part of the corresponding panoramic image data in each area. This is shown in FIG. The projector 803 narrows down and projects the projection area 802. At this time, the image to be projected is a projection image 806 which is an area corresponding to the projection area 802 in the panoramic image data 805 as shown in FIG. After that, the projected image is changed while moving the projection area up, down, left, and right, and the same processing as in the third embodiment is repeated.

図12は、上述した第4の実施形態における処理をまとめて示したフローチャートである。ステップS1001において、CPU104はパノラマ合成処理nの分割数Nと、それに対応するプロジェクタ投影領域R(i)を設定する。ステップS1002において、CPU104は変数iを0に初期化する。ステップS1003において、CPU104は分割画像データの撮影をカメラ装置105に実行させる。ここで、N枚の分割画像データを取得する。ステップS1004において、CPU104は撮影した分割画像データを用いて、パノラマ画像データを生成する。ステップS1005において、CPU104は投影領域R(i)に対応するパノラマ画像データの一部を、プロジェクタに投影する。ステップS1006において、CPU104は第3の実施形態と同様の各補正処理を行う。ステップS1007において、CPU104はiを1インクリメントする。ステップS1008において、CPU104はi=N−1かどうかの判断を行う。Yesの場合は処理を終了し、最終的なパノラマ画像データが得られる。Noの場合は、ステップS1005に戻り、処理を続行する。   FIG. 12 is a flowchart collectively showing the processes in the above-described fourth embodiment. In step S1001, the CPU 104 sets the division number N of the panorama synthesis process n and the projector projection area R (i) corresponding thereto. In step S1002, the CPU 104 initializes a variable i to 0. In step S <b> 1003, the CPU 104 causes the camera device 105 to capture the divided image data. Here, N pieces of divided image data are acquired. In step S1004, the CPU 104 generates panoramic image data using the captured divided image data. In step S1005, the CPU 104 projects a part of the panoramic image data corresponding to the projection area R (i) onto the projector. In step S1006, the CPU 104 performs each correction process similar to that in the third embodiment. In step S1007, the CPU 104 increments i by 1. In step S1008, the CPU 104 determines whether i = N−1. In the case of Yes, the process is terminated and final panoramic image data is obtained. In No, it returns to step S1005 and continues a process.

以上説明した処理制御を行うことで、より高精度且つ高解像度なパノラマ画像データを合成することが可能となる。さらに、実際の被写体上に合成結果を投影するので、被写体に対する忠実再現度が一見してわかる。   By performing the processing control described above, it is possible to synthesize panoramic image data with higher accuracy and higher resolution. Furthermore, since the synthesis result is projected onto the actual subject, the faithful reproducibility for the subject can be seen at a glance.

また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。   The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (6)

被写体の全景画像データを取得する第1の取得手段と、
前記被写体の分割画像データを取得する第2の取得手段と、
前記第2の取得手段により取得された各分割画像データと、当該分割画像データに対応する領域の前記全景画像データとの差分値を算出する算出手段と、
前記算出手段により算出された差分値に応じた補正処理を前記各分割画像データに対して実行する補正手段と、
前記補正手段により補正された前記各分割画像データを合成してパノラマ画像データを生成する生成手段とを有することを特徴とする画像処理装置。
First acquisition means for acquiring panoramic image data of a subject;
Second acquisition means for acquiring divided image data of the subject;
Calculation means for calculating a difference value between each divided image data acquired by the second acquisition means and the whole-view image data in an area corresponding to the divided image data;
Correction means for executing correction processing according to the difference value calculated by the calculation means for each of the divided image data;
An image processing apparatus comprising: generating means for generating panoramic image data by combining the divided image data corrected by the correcting means.
前記パノラマ画像データを前記全景画像データと差し替える差替え手段を更に有し、
前記第2の取得手段は、前記差替え手段により差し替えされた前記パノラマ画像データを分割した分割画像データを取得することを特徴とする請求項1に記載の画像処理装置。
A replacement means for replacing the panoramic image data with the panoramic image data;
The image processing apparatus according to claim 1, wherein the second acquisition unit acquires divided image data obtained by dividing the panoramic image data replaced by the replacement unit.
前記補正手段は、前記算出手段により算出される差分値が最小となる補正処理を前記各分割画像データに対して実行することを特徴とする請求項1又は2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the correction unit executes a correction process that minimizes a difference value calculated by the calculation unit for each of the divided image data. 前記算出手段は、前記第2の取得手段により取得された前記各分割画像データのエッジと、当該分割画像データに対応する領域の前記全景画像データのエッジとを抽出し、抽出したエッジ間の距離を差分値として算出することを特徴とする請求項1乃至3の何れか1項に記載の画像処理装置。   The calculation means extracts the edge of each divided image data acquired by the second acquisition means and the edge of the panoramic image data of the area corresponding to the divided image data, and the distance between the extracted edges The image processing apparatus according to claim 1, wherein the difference is calculated as a difference value. 画像処理装置による画像処理方法であって、
被写体の全景画像データを取得する第1の取得ステップと、
前記被写体の分割画像データを取得する第2の取得ステップと、
前記第2の取得ステップにより取得された各分割画像データと、当該分割画像データに対応する領域の前記全景画像データとの差分値を算出する算出ステップと、
前記算出ステップにより算出された差分値に応じた補正処理を前記各分割画像データに対して実行する補正ステップと、
前記補正ステップにより補正された前記各分割画像データを合成してパノラマ画像データを生成する生成ステップとを含むことを特徴とする画像処理方法。
An image processing method by an image processing apparatus,
A first acquisition step of acquiring panoramic image data of a subject;
A second acquisition step of acquiring divided image data of the subject;
A calculation step of calculating a difference value between each of the divided image data acquired by the second acquisition step and the whole-view image data of an area corresponding to the divided image data;
A correction step of executing correction processing corresponding to the difference value calculated in the calculation step for each of the divided image data;
And a generating step of generating panoramic image data by combining the divided image data corrected in the correcting step.
被写体の全景画像データを取得する第1の取得ステップと、
前記被写体の分割画像データを取得する第2の取得ステップと、
前記第2の取得ステップにより取得された各分割画像データと、当該分割画像データに対応する領域の前記全景画像データとの差分値を算出する算出ステップと、
前記算出ステップにより算出された差分値に応じた補正処理を前記各分割画像データに対して実行する補正ステップと、
前記補正ステップにより補正された前記各分割画像データを合成してパノラマ画像データを生成する生成ステップとをコンピュータに実行させるためのプログラム。
A first acquisition step of acquiring panoramic image data of a subject;
A second acquisition step of acquiring divided image data of the subject;
A calculation step of calculating a difference value between each of the divided image data acquired by the second acquisition step and the whole-view image data of an area corresponding to the divided image data;
A correction step of executing correction processing corresponding to the difference value calculated in the calculation step for each of the divided image data;
A program for causing a computer to execute a generation step of generating panoramic image data by combining the divided image data corrected in the correction step.
JP2010022429A 2010-02-03 2010-02-03 Image processing device, image processing method, and program therefor Pending JP2011160354A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010022429A JP2011160354A (en) 2010-02-03 2010-02-03 Image processing device, image processing method, and program therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010022429A JP2011160354A (en) 2010-02-03 2010-02-03 Image processing device, image processing method, and program therefor

Publications (1)

Publication Number Publication Date
JP2011160354A true JP2011160354A (en) 2011-08-18

Family

ID=44591895

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010022429A Pending JP2011160354A (en) 2010-02-03 2010-02-03 Image processing device, image processing method, and program therefor

Country Status (1)

Country Link
JP (1) JP2011160354A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017152931A (en) * 2016-02-24 2017-08-31 株式会社Tbwa Hakuhodo Photographing system and program
JP2017200118A (en) * 2016-04-28 2017-11-02 中国電力株式会社 Obstacle confirmation device and obstacle confirmation method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017152931A (en) * 2016-02-24 2017-08-31 株式会社Tbwa Hakuhodo Photographing system and program
JP2017200118A (en) * 2016-04-28 2017-11-02 中国電力株式会社 Obstacle confirmation device and obstacle confirmation method

Similar Documents

Publication Publication Date Title
JP5906028B2 (en) Image processing apparatus and image processing method
JP6568223B2 (en) Projection device, projection method, and projection program
JP4010754B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium
KR100914211B1 (en) Distortion image correction device and method
JP5445461B2 (en) Pixel position correspondence specifying system, pixel position correspondence specifying method, and pixel position correspondence specifying program
TWI387935B (en) Image generation method, program therefor, and storage medium for storing the program
EP2138976A2 (en) Synthesis of a panoramic high-resolution image from multiple images
JP2012185808A (en) Image processing device, image processing method, computer program and imaging apparatus
JP5984493B2 (en) Image processing apparatus, image processing method, imaging apparatus, and program
JP6253280B2 (en) Imaging apparatus and control method thereof
JP2009037301A (en) Generation method of free viewpoint image by local region segmentation
JP4871820B2 (en) Video display system and parameter generation method for the system
JP6594170B2 (en) Image processing apparatus, image processing method, image projection system, and program
JP2014010783A (en) Image processing apparatus, image processing method, and program
JP5566199B2 (en) Image processing apparatus, control method therefor, and program
JP2005063041A (en) Three-dimensional modeling apparatus, method, and program
JP5151922B2 (en) Pixel position correspondence specifying system, pixel position correspondence specifying method, and pixel position correspondence specifying program
JP2011160354A (en) Image processing device, image processing method, and program therefor
JP2008003683A (en) Image generating apparatus and method, and recording medium
JP5340021B2 (en) Image processing apparatus, image processing method, and program
JP6972089B2 (en) Image processing equipment, image processing methods, and programs
JP7541862B2 (en) Image processing device and image processing method
JP6320165B2 (en) Image processing apparatus, control method therefor, and program
JP2018191050A (en) Image processing apparatus, image processing method, and program
JP2017162313A (en) Image processing device, image processing method and program