JP2013046270A - Image connecting device, photographing device, image connecting method, and image processing program - Google Patents

Image connecting device, photographing device, image connecting method, and image processing program Download PDF

Info

Publication number
JP2013046270A
JP2013046270A JP2011183286A JP2011183286A JP2013046270A JP 2013046270 A JP2013046270 A JP 2013046270A JP 2011183286 A JP2011183286 A JP 2011183286A JP 2011183286 A JP2011183286 A JP 2011183286A JP 2013046270 A JP2013046270 A JP 2013046270A
Authority
JP
Japan
Prior art keywords
image data
image
motion vector
tilt angle
spherical projection
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.)
Withdrawn
Application number
JP2011183286A
Other languages
Japanese (ja)
Inventor
Munenori Fukunishi
宗憲 福西
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.)
Olympus Corp
Original Assignee
Olympus Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Corp filed Critical Olympus Corp
Priority to JP2011183286A priority Critical patent/JP2013046270A/en
Publication of JP2013046270A publication Critical patent/JP2013046270A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To generate a panoramic composite image having joint portions where mismatch of connection of images is less conspicuous.SOLUTION: A plurality of developed image data 152, obtained by continuously photographing with a photographing device moved along a horizontal plane so as to draw an arc, are input in an image conversion processing part 122 together with camera posture data 154. A plurality of spherical-surface projected image data 158 are generated at the image conversion processing part 122 by projecting each of two-dimensional images based on the plurality of developed image data 152 on a virtual spherical surface having a pole axis as a reference axis by using a processing parameter determined on the basis of the camera posture data 154. A motion vector 160 between images based on the plurality of spherical-surface projected image data 158 is derived by a motion vector computing part 124. Motion compensation between the images based on the plurality of spherical-surface projected image data 158 is performed in accordance with the motion vector 160, and necessary parts are extracted from the plurality of spherical-surface projected image data 158 and connected so as to generate a panoramic composite image 162.

Description

本発明は、複数枚画像の貼り合せ技術、広画角なパノラマ画像の生成技術に関する。   The present invention relates to a technique for combining a plurality of images and a technique for generating a panoramic image having a wide angle of view.

カメラの向きを変えながら撮影して得た複数枚の画像を貼り合せることで広視野画像を生成するパノラマ合成技術がある。このとき、円筒変換や球面投影など仮想曲面への投影変換した画像を生成し、貼り合わせを行うことで、接合部での画像のずれを減じて滑らかに接合できることが知られている。円筒変換を用いたパノラマ合成処理として、特許文献1に開示されるものがある。球面投影を用いたパノラマ合成処理として、特許文献2に開示されるものがある。また近年では、撮影者を中心として弧を描くようにカメラを移動(スイング)させながら数十枚から百枚以上の画像を高速連写撮影し、得られた画像を短冊状に切出して貼り合せることでパノラマ画像を生成する技術も知られている(図8)。この先行技術文献として、特許文献3に開示されるものがある。   There is a panorama synthesis technique for generating a wide-field image by combining a plurality of images obtained by shooting while changing the direction of the camera. At this time, it is known that an image obtained by projection conversion to a virtual curved surface, such as cylindrical conversion or spherical projection, is generated and bonded, so that the image can be smoothly joined with reduced image shift at the joined portion. As a panorama composition process using cylindrical transformation, there is one disclosed in Patent Document 1. As a panorama synthesis process using spherical projection, there is one disclosed in Patent Document 2. Also, in recent years, several tens to hundreds of images are taken at high speed while moving (swinging) the camera around the photographer so as to draw an arc, and the resulting images are cut into strips and pasted together. Thus, a technique for generating a panoramic image is also known (FIG. 8). As this prior art document, there is one disclosed in Patent Document 3.

円筒変換の処理内容を図9に示す。円筒変換の処理とは、撮影して得られた画像データに基づく二次元の画像を円筒面状の仮想曲面に投影したかのような画像を得る処理である。以下では、撮像面上に形成される像を、この撮像面に接する円筒面状の仮想曲面へ投影する処理として説明する。この場合、仮想曲面の半径rは撮影レンズの実焦点距離とする。撮像面上の点を(s,t)とすると、s座標は実焦点距離rと入射角度θを用いて、

s=r・tanθ … (1)

と表すことができる。
The processing contents of the cylinder conversion are shown in FIG. The cylindrical conversion process is a process for obtaining an image as if a two-dimensional image based on image data obtained by photographing was projected onto a cylindrical virtual curved surface. Below, it demonstrates as a process which projects the image formed on an imaging surface to the cylindrical-surface-like virtual curved surface which touches this imaging surface. In this case, the radius r of the virtual curved surface is the actual focal length of the photographic lens. When the point on the imaging surface is (s, t), the s coordinate uses the actual focal length r and the incident angle θ,

s = r · tan θ (1)

It can be expressed as.

撮像面上の各点から円筒中心軸上の1点に集中するように光が進み、仮想曲面に達すると考え、その仮想曲面上に投影され、形成された像を平面に展開する。すると、上記の撮像面上の点(s,t)と対応する、仮想円筒面上の像を展開した平面上における座標位置(s’,t’)は、

s’=r・θ … (2)
t’=t・cosθ … (3)

と表すことができる。
The light travels from each point on the imaging surface so as to concentrate on one point on the central axis of the cylinder, and reaches a virtual curved surface, and is projected onto the virtual curved surface and the formed image is developed on a plane. Then, the coordinate position (s ′, t ′) on the plane where the image on the virtual cylindrical surface corresponding to the point (s, t) on the imaging surface is developed is

s ′ = r · θ (2)
t ′ = t · cos θ (3)

It can be expressed as.

画像を構成する画素の各座標値を、上述した式(1)、(2)、(3)を用いて変換することにより、撮像面上に形成される像を円筒面状の仮想曲面に投影し、それを展開したかのような画像を得ることができる。   Projecting an image formed on the imaging surface onto a virtual virtual curved surface by converting each coordinate value of the pixels constituting the image using the above-described equations (1), (2), and (3) And an image as if it were developed can be obtained.

続いて、球面投影の処理について図10を参照して説明する。球面投影の処理とは、撮影して得られた画像データに基づく二次元の画像を球面状の仮想曲面に投影したかのような画像を得る処理である。以下では、撮像面上に形成される像を、この撮像面に接する球面状の仮想曲面へ投影する処理として説明する。この場合、仮想曲面の半径rは撮影レンズの実焦点距離とする。まず、撮像面上の点を(s,t)とすると、実焦点距離をr、x軸回りの回転角度をθV、y軸回りの回転角度をθHとして、

s=r・tanθH … (4)
t=r・tanθV/cosθH … (5)

で表される。
Next, spherical projection processing will be described with reference to FIG. The spherical projection process is a process for obtaining an image as if a two-dimensional image based on image data obtained by photographing was projected onto a spherical virtual curved surface. Hereinafter, description will be given as a process of projecting an image formed on the imaging surface onto a spherical virtual curved surface in contact with the imaging surface. In this case, the radius r of the virtual curved surface is the actual focal length of the photographic lens. First, when the point on the imaging surface is (s, t), the actual focal length is r, the rotation angle about the x axis is θV, and the rotation angle about the y axis is θH.

s = r · tan θH (4)
t = r · tan θV / cos θH (5)

It is represented by

撮像面上の各点から球面の中心に集中するように光が進み、仮想曲面に達すると考える。そして、上記の撮像面上の点(s,t)と対応する点を球面状の仮想曲面上に投影し、それを正距円筒図法(緯度と経度が等間隔に直交する展開表示図法)で展開した後の平面座標(s’、t’)は、

s’=r・θH … (6)
t’=r・θV … (7)

で表される。
It is assumed that light travels from each point on the imaging surface so as to concentrate on the center of the spherical surface and reaches a virtual curved surface. Then, a point corresponding to the point (s, t) on the imaging surface is projected onto a spherical virtual curved surface, and this is projected by an equirectangular projection (development display projection in which latitude and longitude are orthogonal to each other at equal intervals). The plane coordinates (s ′, t ′) after expansion are

s ′ = r · θH (6)
t ′ = r · θV (7)

It is represented by

画像を構成する画素の各座標値を、上述した式(4)、(5)、(6)、(7)を用いて変換することにより、撮像面上に形成される像を球面状の仮想曲面に投影し、それを展開したかのような画像を得ることができる。   By converting the coordinate values of the pixels constituting the image using the above-described equations (4), (5), (6), and (7), the image formed on the imaging surface is converted into a spherical virtual image. It is possible to obtain an image as if it was projected onto a curved surface and developed.

図11(a)、図11(b)は、円筒変換・球面投影による効果を概念的に示したものである。撮影者を中心にカメラを回転させながら複数枚の画像を撮影した場合について考える。被写体像が画面中央に位置する場合と、画面の端部付近に位置する場合とで、撮像面に形成される像の大きさW1、W2を比較する。被写体像が画面の端部付近に位置する場合、撮像面上に形成される被写体像の大きさW2は、撮像面の中央に形成される場合の大きさW1に比して大きくなる。このように、撮像面上での位置の違いによって、同一被写体、同一撮影距離であっても被写体像の大きさが変化する。   FIG. 11A and FIG. 11B conceptually show the effects of cylindrical transformation and spherical projection. Consider a case where a plurality of images are photographed while rotating the camera around the photographer. The sizes W1 and W2 of the image formed on the imaging surface are compared between the case where the subject image is located at the center of the screen and the case where the subject image is located near the edge of the screen. When the subject image is located near the edge of the screen, the size W2 of the subject image formed on the imaging surface is larger than the size W1 when it is formed at the center of the imaging surface. As described above, the size of the subject image changes depending on the position on the imaging surface even when the subject is the same and the photographing distance is the same.

一方、円筒変換や球面投影のように、撮像面の画像を曲面に投影したかのように変換する処理を行うことで、撮像面上での位置に応じて被写体像の大きさが変動するのを抑制することができる。その様子が図11(a)、図11(b)で寸法W1’、W2’として示されている。寸法W1、W2の変動に比して、寸法W1’、W2’の変動が抑制されていることが見て取れる。   On the other hand, the size of the subject image varies depending on the position on the imaging surface by performing processing to convert the image on the imaging surface as if it was projected onto a curved surface, such as cylindrical transformation or spherical projection. Can be suppressed. This is shown as dimensions W1 'and W2' in FIGS. 11 (a) and 11 (b). It can be seen that fluctuations in the dimensions W1 'and W2' are suppressed compared to fluctuations in the dimensions W1 and W2.

図12の(a)から(d)には、図11の(a)、(b)に示される例に対応するものとして、実際に撮影して得られた画像と、それらの画像を処理して得られる画像の例とを示す。図12の(a)、(b)には、実際に撮影して得られた画像とその画像中の主要被写体を拡大したものが示される。図12(a)においては主要被写体としての椅子の像が画面中央寄りに位置する。図12(b)においては椅子の像が画面端部寄りに位置する。それぞれの図における椅子の拡大像において、背もたれ部分の幅寸法をW1、W2とすると、寸法W2が寸法W1よりも大きくなっている。   12 (a) to 12 (d) correspond to the examples shown in FIGS. 11 (a) and 11 (b), and images obtained by actually photographing and processing these images are processed. An example of an image obtained in this way is shown. FIGS. 12A and 12B show an image obtained by actually capturing an image and an enlarged main subject in the image. In FIG. 12A, the chair image as the main subject is located closer to the center of the screen. In FIG.12 (b), the image of a chair is located near the screen edge part. In the enlarged images of the chairs in the respective drawings, when the width dimensions of the backrest portion are W1 and W2, the dimension W2 is larger than the dimension W1.

図12(a)、図12(b)に示される画像を円筒変換した結果得られる画像を図12(c)、図12(d)に示す。これら図12(c)、(d)中における椅子の拡大像中、背もたれ部分の幅寸法W1’、W2’は略等しくなっている。つまり、図12(a)、(b)に示される像の寸法W1、W2の変動に比して、図12(c)、(d)に示される寸法W1’、W2’の変動が抑制されていることが見て取れる。   Images obtained as a result of cylindrical transformation of the images shown in FIGS. 12 (a) and 12 (b) are shown in FIGS. 12 (c) and 12 (d). In these magnified images of the chair in FIGS. 12C and 12D, the width dimensions W1 'and W2' of the backrest are substantially equal. That is, fluctuations in the dimensions W1 ′ and W2 ′ shown in FIGS. 12C and 12D are suppressed as compared with fluctuations in the dimensions W1 and W2 of the images shown in FIGS. 12A and 12B. You can see that.

以上より、撮影者を中心に円弧方向に沿ってカメラを移動しながら撮影して得た複数枚の画像を貼り合わせる場合、円筒変換や球面投影などの曲面投影処理を行うことで、画面内の位置によらず、被写体の大きさを略一定に揃えることが可能となる。したがって、比較的単純な縦横2軸方向の画像全体の位置合わせ処理をするだけで、画像を滑らかにつなぎ合わせることが可能となる。   From the above, when combining multiple images obtained by shooting while moving the camera along the arc direction around the photographer, by performing curved surface projection processing such as cylindrical transformation and spherical projection, Regardless of the position, the size of the subject can be made substantially constant. Therefore, it is possible to smoothly join the images only by performing a relatively simple alignment process for the entire image in the vertical and horizontal biaxial directions.

特許第3205571号公報Japanese Patent No. 3205571 特許第3817302号公報Japanese Patent No. 3817302 特開2007−174301号公報JP 2007-174301 A

以上に説明した画像のつなぎ合わせは、撮影時のカメラの姿勢によっては良好に機能しない場合がある。ここで、良好に機能しない例について説明する。撮影時にカメラを振る際、カメラの上下方向に沿う軸が、カメラを振る際の軸と平行でない場合、上述した画像のつなぎ合わせが良好に機能しない場合がある。例えば、山の頂上から下方に向かってカメラを俯瞰させた状態でカメラを水平方向に沿って振りながら連続撮影をした場合がこのような場合に相当する。あるいは、低いところから仰ぎ見るようにカメラの上下方向の向き(チルト角)を定め、その状態でカメラを水平方向に沿って振りながら連続撮影をする場合も同様である。本明細書では、連続撮影をしながらカメラを振る際の、カメラの移動軌跡を含む面をスイング面と称し、そのスイング面に対してカメラの撮影レンズの光軸が平行でないことをカメラチルトと称する。   The stitching of images described above may not function well depending on the posture of the camera at the time of shooting. Here, an example that does not function well will be described. When the camera is shaken at the time of shooting, if the axis along the vertical direction of the camera is not parallel to the axis when the camera is shaken, the above-described image stitching may not function well. For example, this is the case when continuous shooting is performed while swinging the camera along the horizontal direction with the camera looking down from the top of the mountain. Alternatively, the same applies to the case where the vertical direction (tilt angle) of the camera is determined so as to look up from a low place, and continuous shooting is performed while swinging the camera along the horizontal direction in that state. In this specification, a surface including the movement trajectory of the camera when the camera is shaken while performing continuous shooting is referred to as a swing surface, and that the optical axis of the camera photographing lens is not parallel to the swing surface is referred to as camera tilt. Called.

図13(a)、(b)には、カメラチルトの存在しない状態でカメラを振って得られる二枚の画像の例を示す。また、図13(c)、(d)には、下向きのカメラチルトが存在する状態でカメラを振って得られる二枚の画像の例を示す。図13(a)、(b)、(c)、(d)はいずれも球面投影したものを示している。   FIGS. 13A and 13B show examples of two images obtained by shaking the camera in the absence of camera tilt. FIGS. 13C and 13D show examples of two images obtained by shaking the camera in a state where a downward camera tilt exists. FIGS. 13 (a), (b), (c), and (d) all show spherical projections.

図13(a)、(b)に示される、カメラチルトの無い状態で撮影した画像では、画面内の上下方向の中間近傍に存在する、水平方向に延在する直線状の被写体像に歪曲が無い。一方、図13(c)、(d)に示される、下向きにカメラチルトのある状態で撮影した画像では、上で説明した被写体像に対応する部分(画面内の上下方向の中間近傍に存在する、水平方向に延在する直線状の被写体像)が中高の曲線状に歪曲している。その結果、同じ被写体を同じ撮影距離で撮影していても、画面内の位置に応じて被写体像の傾きや寸法等が変化する。   In the images shown in FIGS. 13A and 13B taken without camera tilt, the linear subject image extending in the horizontal direction and present in the vicinity of the middle in the vertical direction in the screen is distorted. No. On the other hand, in the images shown in FIGS. 13 (c) and 13 (d) taken with the camera tilt downward, the portion corresponding to the subject image described above exists in the vicinity of the middle in the vertical direction in the screen. , A straight subject image extending in the horizontal direction) is distorted into a medium-high curve. As a result, even if the same subject is shot at the same shooting distance, the tilt, size, etc. of the subject image change according to the position in the screen.

図13(c)、(d)に示される画像中から部分画像を切り出し、単純なXY2軸方向の位置合わせをしただけでつなぎ合わせると、上述した画面内の位置に応じた被写体像の歪みの変化により、不連続部を生じる場合がある。その様子が図14に示されている。図14は、つなぎ合わせの処理をして得られた画像の一部を拡大して示したものである。図14では、椅子の座面の側部縁端部分に不連続部G1が見られる。また、図中、向かって右側に位置する脚部の接地部近傍に不連続部G2が見られる。   When partial images are cut out from the images shown in FIGS. 13 (c) and 13 (d) and connected by simple alignment in the XY two-axis directions, the distortion of the subject image according to the position in the screen described above can be reduced. Changes may cause discontinuities. This is shown in FIG. FIG. 14 is an enlarged view of a part of an image obtained by the stitching process. In FIG. 14, the discontinuous part G1 is seen in the side edge part of the seat surface of the chair. In the drawing, a discontinuous portion G2 is seen in the vicinity of the ground contact portion of the leg portion located on the right side.

カメラチルトの存在する状態でカメラを水平面に沿うように振って撮影した画像を球面投影したときに上述した歪曲を生じるメカニズムについて、図15(a)、図15(b)を参照して説明する。ここではカメラを保持した撮影者が回動中心となるようにし、カメラを水平面上で円弧を描くように振りながら異なる位置(向き)で撮影をした場合を考える。また、被写体は被写界に存在する一つの点であるものとし、カメラのシャッタを開放状態にして、上述したようにカメラを振ったとき、撮像面上に形成される点の像(以下、「点像」と称する)の軌跡について考える。カメラのチルトがない場合、点像の位置は経度だけが変化する。従って、球面状の仮想曲面を正距円筒図法(緯度と経度が等間隔に直交する展開図法)で展開するかのように画像の座標変換を行うと、得られた画像の横軸方向(図10のS軸方向)の位置合わせをするだけで位置ずれを補正することができる。一方、カメラチルトの存在する状態でカメラを振って撮影した場合は、緯度も経度も変動する。図15(b)に示される例では、画像の左右方向の中心近傍において緯度が増すように画像の歪みを生じる。例えば水平線を含む景色を撮影しているものとして、その画像を球面状の仮想曲面に投影し、それをさらに正距円筒図法で展開すると、画像中、上下方向の中央よりも上側に水平線の像が位置すると、水平線の像は中高の(左右方向の中央近傍において上に盛り上がったような)歪みを生じる。   With reference to FIGS. 15A and 15B, a mechanism for causing the above-described distortion when an image captured by swinging the camera along a horizontal plane in the presence of camera tilt is spherically described. . Here, let us consider a case where the photographer holding the camera is positioned at the center of rotation and the camera is photographed at different positions (orientations) while swinging so as to draw an arc on a horizontal plane. Further, it is assumed that the subject is a single point existing in the object scene, and when the camera shutter is opened and the camera is shaken as described above, an image of a point formed on the imaging surface (hereinafter, referred to as “image”). Consider the trajectory of a “point image”. When the camera is not tilted, only the longitude of the position of the point image changes. Therefore, when the coordinate transformation of an image is performed as if a spherical virtual curved surface is developed by an equirectangular projection (development projection in which latitude and longitude are orthogonal to each other at equal intervals), the horizontal axis direction of the obtained image (see FIG. The positional deviation can be corrected only by positioning in the 10 S-axis direction). On the other hand, when shooting with a camera shake in the presence of camera tilt, both latitude and longitude fluctuate. In the example shown in FIG. 15B, the image is distorted so that the latitude increases in the vicinity of the center in the left-right direction of the image. For example, if you are shooting a scene that includes a horizontal line, project that image onto a spherical virtual curved surface, and then expand it with equirectangular projection, the image of the horizontal line above the center in the vertical direction in the image When is located, the image of the horizon produces a medium-high distortion (as if it swelled up near the center in the left-right direction).

以上より、上記の円筒変換や球面投影などの曲面投影を用いる従来技術では、撮影時にカメラの移動面(スイング面)に対してカメラのチルト方向の傾きがない場合は、単純な円筒変換や球面投影を行うことで画像を滑らかに接合することができるが、撮影時にスイング面に対してカメラのチルト方向の傾きがある場合は、単純な円筒変換や球面投影では画像に歪曲が発生してしまい、滑らかに接合することは困難となる。従来の技術では、このようなカメラのチルト方向傾きに起因した画像歪みを除去することについて、必ずしも十分な配慮がされていなかった。   As described above, in the conventional technique using curved surface projection such as cylindrical transformation or spherical projection described above, if there is no tilt in the tilt direction of the camera with respect to the moving plane (swing plane) of the camera at the time of shooting, simple cylindrical transformation or spherical By projecting, images can be smoothly joined, but if there is a tilt in the tilt direction of the camera with respect to the swing surface during shooting, the image will be distorted by simple cylindrical transformation or spherical projection. It becomes difficult to join smoothly. In the prior art, sufficient consideration has not always been given to removing such image distortion caused by tilting in the tilt direction of the camera.

本発明は、上記の課題に鑑みてなされたものであり、撮影時にカメラの移動面(スイング面)に対してカメラのチルト方向の傾きが存在する場合においても、画像貼り合わせにおける位置合わせ残差を抑制し、滑らかなパノラマ画像が得られるようにすることを目的とする。   The present invention has been made in view of the above-described problems. Even when there is a tilt in the tilt direction of the camera with respect to the moving plane (swing plane) of the camera at the time of shooting, the registration residual in image pasting It is an object to suppress smoothness and obtain a smooth panoramic image.

本発明の第1の態様に係る画像貼り合わせ装置は、水平面に沿い、弧を描くように撮影装置を移動させながら複数回の撮影動作を連続して行って得られた複数の画像データのそれぞれから部分画像データを切り出して貼り合わせ、パノラマ合成画像データを生成する。この画像貼り合わせ装置は、
前記複数の画像データを取得する画像取得部と、
前記複数回の撮影動作が前記撮影装置で行われる前または後、もしくは最中に検出された前記撮影装置のチルト方向の傾き角度であるチルト角度に関する情報を含むカメラ姿勢データを取得するカメラ姿勢データ取得部と、
前記カメラ姿勢データに含まれる前記チルト角度に関する情報に基づいて決定された処理パラメータを用い、前記複数の画像データに基づく二次元画像をそれぞれ基準軸を極軸とする仮想球面上に投影する処理をして複数の球面投影画像データを生成する画像変換処理部と、
前記複数の球面投影画像データに基づくそれぞれの画像間の動きベクトルを導出する動きベクトル演算処理部と、
前記複数の球面投影画像データに基づく各画像間の動き補償を前記動きベクトル演算処理部で導出された動きベクトルに基づいて行い、前記複数の球面投影画像データから必要部分を切り出して貼り合わせる処理をしてパノラマ合成画像データを生成する合成処理部と
を備える。
The image pasting apparatus according to the first aspect of the present invention includes a plurality of pieces of image data obtained by continuously performing a plurality of photographing operations while moving the photographing device so as to draw an arc along a horizontal plane. The partial image data is cut out and pasted together to generate panorama composite image data. This image pasting device
An image acquisition unit for acquiring the plurality of image data;
Camera posture data for acquiring camera posture data including information relating to a tilt angle that is a tilt angle in the tilt direction of the photographing device detected before, after, or during the time when the plurality of photographing operations are performed by the photographing device. An acquisition unit;
A process of projecting a two-dimensional image based on the plurality of image data onto a virtual sphere having a reference axis as a polar axis, using processing parameters determined based on information about the tilt angle included in the camera posture data. An image conversion processing unit for generating a plurality of spherical projection image data,
A motion vector arithmetic processing unit for deriving a motion vector between the images based on the plurality of spherical projection image data;
A process of performing motion compensation between images based on the plurality of spherical projection image data based on a motion vector derived by the motion vector calculation processing unit, and cutting out and pasting a necessary portion from the plurality of spherical projection image data And a synthesis processing unit that generates panorama synthesized image data.

本発明の第2の態様に係る撮影装置は、複数の画像データを合成してパノラマ合成画像データを生成可能で、
水平面に沿い、弧を描くように前記撮影装置が振られているときに複数回の撮影動作を連続して行い、複数の画像データを生成する撮像素子と、
前記複数回の撮影動作が前記撮像素子で行われる前または後、もしくは最中に、前記撮影装置のチルト方向の傾き角度であるチルト角度を計測し、前記チルト角度に関する情報を含むカメラ姿勢データを生成する姿勢検出部と、
前記カメラ姿勢データに含まれる前記チルト角度に関する情報に基づいて決定された処理パラメータを用い、前記複数の画像データに基づく二次元画像をそれぞれ基準軸を極軸とする仮想球面上に投影する処理をして複数の球面投影画像データを生成する画像変換処理部と、
前記複数の球面投影画像データに基づくそれぞれの画像間の動きベクトルを導出する動きベクトル演算処理部と、
前記複数の球面投影画像データに基づく各画像間の動き補償を前記動きベクトル演算処理部で導出された動きベクトルに基づいて行い、前記複数の球面投影画像データから必要部分を切り出して貼り合わせる処理をしてパノラマ合成画像データを生成する合成処理部と
を備える。
The imaging device according to the second aspect of the present invention can generate a panorama composite image data by combining a plurality of image data,
An image sensor that continuously performs a plurality of image capturing operations when the image capturing apparatus is shaken so as to draw an arc along a horizontal plane, and generates a plurality of image data;
Before, after or during the plurality of shooting operations performed by the image sensor, a tilt angle that is a tilt angle in the tilt direction of the imaging device is measured, and camera posture data including information about the tilt angle is obtained. A posture detection unit to generate;
A process of projecting a two-dimensional image based on the plurality of image data onto a virtual sphere having a reference axis as a polar axis, using processing parameters determined based on information about the tilt angle included in the camera posture data. An image conversion processing unit for generating a plurality of spherical projection image data,
A motion vector arithmetic processing unit for deriving a motion vector between the images based on the plurality of spherical projection image data;
A process of performing motion compensation between images based on the plurality of spherical projection image data based on a motion vector derived by the motion vector calculation processing unit, and cutting out and pasting a necessary portion from the plurality of spherical projection image data And a synthesis processing unit that generates panorama synthesized image data.

本発明の第3の態様に係る画像貼り合わせ方法は、水平面に沿い、弧を描くように撮影装置を移動させながら複数回の撮影動作を連続して行って得られた複数の画像データのそれぞれから部分画像データを切り出して貼り合わせ、パノラマ合成画像データを生成する画像貼り合わせ方法であって、
前記複数の画像データを取得する画像データ取得ステップと、
前記複数回の撮影動作が前記撮影装置で行われる前または後、もしくは最中に検出された前記撮影装置のチルト方向の傾き角度であるチルト角度に関する情報を含むカメラ姿勢データを取得するカメラ姿勢データ取得ステップと、
前記カメラ姿勢データに含まれる前記チルト角度に関する情報に基づいて決定された処理パラメータを用い、前記複数の画像データに基づく二次元画像をそれぞれ基準軸を極軸とする仮想球面上に投影する処理をして複数の球面投影画像データを生成する画像変換処理ステップと、
前記複数の球面投影画像データに基づくそれぞれの画像間の動きベクトルを導出する動きベクトル導出ステップと、
前記複数の球面投影画像データに基づく各画像間の動き補償を、前記動きベクトル導出ステップで導出された動きベクトルに基づいて行い、前記複数の球面投影画像データから必要部分を切り出して貼り合わせる処理をしてパノラマ合成画像データを生成するパノラマ合成ステップと
を有する。
In the image pasting method according to the third aspect of the present invention, each of a plurality of image data obtained by continuously performing a plurality of photographing operations while moving the photographing device so as to draw an arc along a horizontal plane. A partial image data cut out and pasted together to create panorama composite image data,
An image data acquisition step of acquiring the plurality of image data;
Camera posture data for acquiring camera posture data including information relating to a tilt angle that is a tilt angle in the tilt direction of the photographing device detected before, after, or during the time when the plurality of photographing operations are performed by the photographing device. An acquisition step;
A process of projecting a two-dimensional image based on the plurality of image data onto a virtual sphere having a reference axis as a polar axis, using processing parameters determined based on information about the tilt angle included in the camera posture data. An image conversion processing step for generating a plurality of spherical projection image data,
A motion vector deriving step for deriving a motion vector between the images based on the plurality of spherical projection image data;
A process of performing motion compensation between images based on the plurality of spherical projection image data based on the motion vector derived in the motion vector deriving step, and cutting out and pasting necessary portions from the plurality of spherical projection image data Panorama synthesis step for generating panorama synthesized image data.

本発明の第4の態様に係る画像処理プログラムは、水平面に沿い、弧を描くように撮影装置を移動させながら複数回の撮影動作を連続して行って得られた複数の画像データのそれぞれから部分画像データを切り出して貼り合わせ、パノラマ合成画像データを生成する処理をコンピュータで行うための画像処理プログラムであって、前記コンピュータに、
前記複数の画像データを取得する画像データ取得手順と、
前記複数回の撮影動作が前記撮影装置で行われる前または後、もしくは最中に検出された前記撮影装置のチルト方向の傾き角度であるチルト角度に関する情報を含むカメラ姿勢データを取得するカメラ姿勢データ取得手順と、
前記カメラ姿勢データに含まれる前記チルト角度に関する情報に基づいて決定された処理パラメータを用い、前記複数の画像データに基づく二次元画像をそれぞれ基準軸を極軸とする仮想球面上に投影する処理をして複数の球面投影画像データを生成する画像変換処理手順と、
前記複数の球面投影画像データに基づくそれぞれの画像間の動きベクトルを導出する動きベクトル導出手順と、
前記複数の球面投影画像データに基づく各画像間の動き補償を、前記動きベクトル導出手順で導出された動きベクトルに基づいて行い、前記複数の球面投影画像データから必要部分を切り出して貼り合わせる処理をしてパノラマ合成画像データを生成するパノラマ合成手順と
を実行させる。
The image processing program according to the fourth aspect of the present invention is based on each of a plurality of image data obtained by continuously performing a plurality of photographing operations while moving the photographing device so as to draw an arc along a horizontal plane. An image processing program for performing a process of generating partial panoramic composite image data by cutting out and pasting partial image data on a computer,
An image data acquisition procedure for acquiring the plurality of image data;
Camera posture data for acquiring camera posture data including information relating to a tilt angle that is a tilt angle in the tilt direction of the photographing device detected before, after, or during the time when the plurality of photographing operations are performed by the photographing device. Acquisition procedure;
A process of projecting a two-dimensional image based on the plurality of image data onto a virtual sphere having a reference axis as a polar axis, using processing parameters determined based on information about the tilt angle included in the camera posture data. Image conversion processing procedure for generating a plurality of spherical projection image data,
A motion vector derivation procedure for deriving a motion vector between the images based on the plurality of spherical projection image data;
A process of performing motion compensation between images based on the plurality of spherical projection image data based on the motion vector derived in the motion vector derivation procedure, and cutting out and pasting a necessary portion from the plurality of spherical projection image data Then, a panorama synthesis procedure for generating panorama composite image data is executed.

本発明によれば、カメラをスイング面に沿って弧を描くように向きを変えながら連像撮影をして複数の静止画を得る際に、カメラのスイング面に対してカメラチルトが存在する場合においても、カメラチルトを考慮した画像変換処理を行うことによって、複数の画像を貼り合わせる際の不整合部分が生じるのを抑制し、滑らかなパノラマ画像を得ることが可能となる。   According to the present invention, when a plurality of still images are obtained by continuously shooting while changing the direction of the camera so as to draw an arc along the swing surface, a camera tilt exists with respect to the camera swing surface. However, by performing an image conversion process in consideration of the camera tilt, it is possible to suppress the occurrence of inconsistent portions when a plurality of images are combined, and to obtain a smooth panoramic image.

画像貼り合わせ装置を、電子カメラに組み込んだ場合の構成例を示すブロック図である。It is a block diagram which shows the structural example at the time of incorporating an image bonding apparatus in an electronic camera. 第1の実施の形態の電子カメラで実行される連続撮影および画像合成処理の処理手順を概略的に説明するフローチャートである。It is a flowchart which illustrates roughly the process sequence of the continuous imaging | photography and image synthesis process performed with the electronic camera of 1st Embodiment. 球面投影変換の処理を概念的に説明する図であり、(a)はカメラチルト角を考慮しない場合の処理を、(b)はカメラチルト角を考慮した場合の処理を、それぞれ示す図である。It is a figure which illustrates the process of spherical projection conversion notionally, (a) is a figure which shows the process when a camera tilt angle is not considered, (b) is a figure which respectively shows the process when a camera tilt angle is considered. . 球面投影変換の処理に際しての変数の定義を説明する図である。It is a figure explaining the definition of the variable in the process of spherical projection conversion. 球面投影変換の処理に際してカメラチルト角を考慮した処理をした場合の効果を説明する図であり、(a)はカメラチルト角を考慮しない場合の例を、(b)はカメラチルト角を考慮した場合の例を、それぞれ示す図である。It is a figure explaining the effect at the time of processing which considered the camera tilt angle at the time of processing of spherical projection conversion, (a) is an example when a camera tilt angle is not considered, (b) is a camera tilt angle considered It is a figure which shows the example of a case, respectively. カメラチルト角を考慮して球面投影変換の処理がなされた画像を貼り合わせて生成された画像の一部を拡大して示す図である。It is a figure which expands and shows a part of image produced | generated by bonding the image by which spherical projection conversion processing was performed in consideration of the camera tilt angle. 第2の実施の形態の電子カメラで実行される連続撮影および画像合成処理の処理手順を概略的に説明するフローチャートである。It is a flowchart which illustrates roughly the process sequence of the continuous imaging | photography and image synthesis process performed with the electronic camera of 2nd Embodiment. カメラを水平なスイング面に沿って振りながら連続撮影を行い、得られた画像を短冊状に切り出して貼り合わせ、パノラマ合成画像を生成する様子を概念的に説明する図である。It is a figure which illustrates notionally that a continuous shooting is performed while shaking a camera along a horizontal swing surface, and the obtained image is cut out in a strip shape and pasted to generate a panorama composite image. 円筒変換の原理を説明する図である。It is a figure explaining the principle of cylinder conversion. 球面投影変換の原理を説明する図であり、(a)は球面投影変換の処理を概念的に示す図であり、(b)は球面投影変換の処理に際しての変数の定義および座標変換式導出の原理を説明する図である。It is a figure explaining the principle of spherical projection conversion, (a) is a figure which shows the process of spherical projection conversion notionally, (b) is the definition of a variable in the process of spherical projection conversion, and coordinate conversion formula derivation | leading-out. It is a figure explaining a principle. 従来の技術に係る円筒変換、球面投影において撮像面上における被写体像の大きさと投影曲面上における被写体像の大きさとの関係を説明する図であり、(a)は被写体が画面中央にある場合の例を、(b)は被写体が画面端にある場合の例を、それぞれ示す図である。It is a figure explaining the relationship between the size of the subject image on the imaging surface and the size of the subject image on the projection curved surface in the cylindrical transformation and spherical projection according to the prior art, (a) when the subject is in the center of the screen For example, (b) is a diagram showing an example where the subject is at the edge of the screen. 従来の技術に係る円筒変換、球面投影の処理による効果を説明する図であり、(a)、(b)は処理前の画像中、被写体の画面中に存在する位置によって像の大きさが変化する様子を、(c)、(d)は処理後の画像中、被写体の画面中に存在する位置によらず、像の大きさが略同一となる様子を、それぞれ説明する図である。It is a figure explaining the effect by the processing of cylindrical conversion and spherical projection according to the prior art, (a), (b) is the size of the image changes depending on the position existing in the screen of the subject in the image before processing (C), (d) is a figure explaining a mode that the size of an image becomes substantially the same irrespective of the position which exists in the screen of a to-be-photographed object in the image after a process. 従来の技術に係る円筒変換、球面投影の処理において、カメラチルトの影響を受ける様子を説明する図であり、(a)、(b)はカメラチルトの無い状態で撮影して得られた画像を処理した場合の例を、(c)、(d)はカメラチルトのある状態で撮影して得られた画像を処理した場合の例を、それぞれ示す図である。It is a figure explaining a mode that it receives to the influence of a camera tilt in the process of cylindrical transformation and spherical projection which concern on the prior art, (a), (b) is the image obtained by image | photographing in the state without a camera tilt. (C), (d) is a figure which shows the example at the time of processing, and the example at the time of processing the image acquired by image | photographing in a state with a camera tilt, respectively. 従来の技術に係る円筒変換、球面投影の処理後の画像を貼り合わせて生成された画像の一部を拡大して示す図であり、カメラチルトの影響を受けて画像の接合部分に不整合を生じている例を示す図である。It is a figure which expands and shows a part of image generated by pasting together the image after processing of cylindrical conversion and spherical projection according to the prior art. It is a figure which shows the example which has arisen. 従来の技術に係る球面投影変換の処理においてカメラチルトの影響を受けて画像の歪曲を生じるメカニズムを説明する図であり、(a)はカメラチルトの無い場合の様子を、(b)はカメラチルトのある場合の様子を、それぞれ説明する図である。It is a figure explaining the mechanism which produces the distortion of an image under the influence of a camera tilt in the process of the spherical projection conversion based on a prior art, (a) is a mode when there is no camera tilt, (b) is a camera tilt. It is a figure explaining a mode in case there is.

−第1の実施形態−
(内部構成)
図1は、第1の実施形態における画像貼り合わせ装置120を、電子カメラ100へ組み込んだ場合の構成例を示すブロック図である。電子カメラ100は、撮影レンズとカメラ本体とが一体型に構成されるカメラでもよいし、撮影レンズ交換式のカメラでもよい。電子カメラ100は、スチルカメラであっても、静止画撮影が可能なムービーカメラであってもよい。
-First embodiment-
(Internal structure)
FIG. 1 is a block diagram illustrating a configuration example when the image bonding apparatus 120 according to the first embodiment is incorporated into the electronic camera 100. The electronic camera 100 may be a camera in which a photographing lens and a camera body are integrated, or a photographing lens exchangeable camera. The electronic camera 100 may be a still camera or a movie camera capable of taking a still image.

電子カメラ100は、撮影光学系102と、撮像素子104と、メモリ106と、画像処理部110と、画像貼り合わせ装置120と、制御部140と、画像メモリ142とを備える。画像貼り合わせ装置120は、角速度センサ128と、画像変換処理部122と、動きベクトル演算処理部124と、合成処理部126とを備える。図中、実線の矢印はデータの流れを表しており、破線は制御信号の伝達経路を表している。   The electronic camera 100 includes a photographing optical system 102, an image sensor 104, a memory 106, an image processing unit 110, an image pasting device 120, a control unit 140, and an image memory 142. The image pasting device 120 includes an angular velocity sensor 128, an image conversion processing unit 122, a motion vector calculation processing unit 124, and a synthesis processing unit 126. In the figure, solid arrows indicate data flow, and broken lines indicate control signal transmission paths.

制御部140はCPU等を備えて構成され、電子カメラ100の動作を統括的に制御する。すなわち、電子カメラ100の動作モードが画像記録モード、画像再生モード等に切り換えられ、その際にユーザによって動作モード等の設定が行われるのに応じて、撮像素子104、画像貼り合わせ装置120、画像処理部110、画像メモリ142のそれぞれで行われる動作を統括的に制御する。以下では、電子カメラ100がパノラマ画像生成モードに設定されてユーザによりレリーズ操作がなされた場合を例に説明する。つまり、撮影者は、電子カメラ100の動作モードをパノラマ画像生成モードに切り換えた後、撮影者を中心として円弧を描くように電子カメラ100を振って(スイングして)撮影方向をずらしながら連続撮影を行う。その結果、一連の複数フレームの静止画像データが得られ、電子カメラ100内の各構成要素は以下に説明する処理を行う。   The control unit 140 includes a CPU and the like, and comprehensively controls the operation of the electronic camera 100. That is, the operation mode of the electronic camera 100 is switched to the image recording mode, the image reproduction mode, and the like, and the operation mode and the like are set by the user at that time. Operations performed in each of the processing unit 110 and the image memory 142 are comprehensively controlled. Hereinafter, a case where the electronic camera 100 is set to the panoramic image generation mode and a release operation is performed by the user will be described as an example. That is, the photographer switches the operation mode of the electronic camera 100 to the panoramic image generation mode, and then shakes (swings) the electronic camera 100 so as to draw an arc around the photographer, and continuously photographs while shifting the photographing direction. I do. As a result, a series of still image data of a plurality of frames is obtained, and each component in the electronic camera 100 performs processing described below.

画像メモリ142は、フラッシュメモリやハードディスクドライブ等で構成される。画像メモリ142は電子カメラ100に内蔵されるものであってもよいし、電子カメラ100に対して着脱自在に構成されていてもよい。   The image memory 142 is configured by a flash memory, a hard disk drive, or the like. The image memory 142 may be built in the electronic camera 100, or may be configured to be detachable from the electronic camera 100.

撮像素子104は、例えば、CCDやCMOSのイメージセンサで構成され、撮影レンズや絞り等を有する撮影光学系102によって撮像素子104のイメージエリア上に形成される被写体像を光電変換し、画像信号を生成して出力する。本明細書において撮像素子104は内部にアンプやA/Dコンバータ等が備えられるCMOS撮像素子であり、デジタル画像信号を出力可能に構成されるものとする。撮像素子104はまた、そのイメージエリアに配列された画素上にベイヤ配列のオンチップカラーフィルタが配置された単板式の撮像素子であるものとする。撮像素子104から出力されるデジタル画像信号はメモリ106に現像前画像データ150として一時的に保存される。   The image sensor 104 is composed of a CCD or CMOS image sensor, for example, and photoelectrically converts a subject image formed on the image area of the image sensor 104 by a photographing optical system 102 having a photographing lens, a diaphragm, etc. Generate and output. In this specification, the image sensor 104 is a CMOS image sensor that includes an amplifier, an A / D converter, and the like, and is configured to be able to output a digital image signal. The image sensor 104 is also assumed to be a single-plate image sensor in which a Bayer array on-chip color filter is arranged on pixels arranged in the image area. A digital image signal output from the image sensor 104 is temporarily stored in the memory 106 as pre-development image data 150.

なお、図1には図示されていないが、電子カメラ100はレンズシャッタ、フォーカルプレンシャッタ、液晶式のシャッタ等、物理的に開閉するシャッタを備えていて、連続撮影動作時にシャッタが連続的に開閉動作するようにしてもよい。あるいは、撮像素子104自体がセンサシャッタの機能を備えていて、上述した物理的に開閉するシャッタを開放状態に維持したまま連続撮影をすることが可能に構成されていてもよい。その際、撮像素子104は、グローバルシャッタ方式(撮像素子104の受光上の全画素でほぼ同時に露光動作の開始および停止が行われる方式)で露光動作可能に構成されていることが望ましい。理由は、ローリングシャッタ方式により動体を撮影したときに生じる画像の歪みを、グローバルシャッタ方式では抑止できるからである。   Although not shown in FIG. 1, the electronic camera 100 includes a shutter that physically opens and closes such as a lens shutter, a focal plane shutter, and a liquid crystal shutter, and the shutter is continuously opened and closed during continuous shooting operation. You may make it operate | move. Alternatively, the image sensor 104 itself may have a sensor shutter function, and the above-described shutter that physically opens and closes may be configured to be capable of continuous shooting while maintaining the open state. At that time, it is desirable that the image sensor 104 is configured to be able to perform an exposure operation by a global shutter system (a system in which the exposure operation is started and stopped almost simultaneously in all pixels on the light reception of the image sensor 104). The reason is that the global shutter system can suppress image distortion that occurs when a moving object is imaged by the rolling shutter system.

現像前画像データ150は、撮像素子104の受光面上に形成されるオンチップカラーフィルタの配列(ベイヤ配列)に基づいて画素ごとにR(Red)信号、G(Green)信号、B(Blue)信号のうちのいずれか一つの情報を有する、いわゆるRaw形式の画像データである。この現像前画像データは、必要に応じてRaw画像データファイルとして画像メモリ142に記録することができる。   The pre-development image data 150 includes R (Red) signal, G (Green) signal, and B (Blue) for each pixel based on the array (Bayer array) of on-chip color filters formed on the light receiving surface of the image sensor 104. This is image data in the so-called Raw format having information of any one of the signals. This pre-development image data can be recorded in the image memory 142 as a raw image data file as necessary.

画像処理部110は、メモリ106に保存されている現像前画像データ150にデモザイキング、ノイズ低減、ホワイトバランス、色補正、階調変換等の処理をして現像後画像データ152を生成する。この現像後画像データ152は、圧縮処理されて画像メモリ142に画像ファイルとして記録することも可能である。ただし、本実施の形態において電子カメラ100はパノラマ画像生成モードで一連の撮影動作が行われ、得られた複数フレームの現像後画像データ152が処理されて一つのパノラマ合成画像が生成されるものとする。その場合、画像処理部110により生成された現像後画像データ152はメモリ106に一時的に記録される。   The image processing unit 110 performs processing such as demosaicing, noise reduction, white balance, color correction, and gradation conversion on the pre-development image data 150 stored in the memory 106 to generate post-development image data 152. The developed image data 152 can be compressed and recorded as an image file in the image memory 142. However, in this embodiment, the electronic camera 100 performs a series of shooting operations in the panorama image generation mode, and the obtained post-development image data 152 of a plurality of frames is processed to generate one panorama composite image. To do. In this case, the developed image data 152 generated by the image processing unit 110 is temporarily recorded in the memory 106.

画像貼り合わせ装置120は、画像処理部110により生成された複数フレームの現像後画像データ152を以下に説明するように処理して一つのパノラマ合成画像データ162を生成する。   The image pasting device 120 processes the post-development image data 152 of a plurality of frames generated by the image processing unit 110 as described below to generate one panorama composite image data 162.

角速度センサ128は、電子カメラ100のチルト角度を検出可能に構成されるセンサである。チルト角度とは、水平面に対する撮影光学系102の光軸の傾き角度を意味する。以下でチルトの向き説明する場合、チルト角度は、撮影光学系102の光軸が水平面よりも上向きのとき、正の値をとり、水平面よりも下向きのとき、負の値をとるものとする。パノラマ画像生成モードで一連の複数フレームの撮影が行われる際に角速度センサ128によって計測動作が行われ、電子カメラ100のチルト角度を表すカメラ姿勢データ154が角速度センサ128から出力される。   The angular velocity sensor 128 is a sensor configured to be able to detect the tilt angle of the electronic camera 100. The tilt angle means the tilt angle of the optical axis of the photographing optical system 102 with respect to the horizontal plane. In the following description of the tilt direction, the tilt angle takes a positive value when the optical axis of the imaging optical system 102 is upward from the horizontal plane, and takes a negative value when the optical axis is downward from the horizontal plane. A measurement operation is performed by the angular velocity sensor 128 when a series of frames are captured in the panoramic image generation mode, and camera attitude data 154 representing the tilt angle of the electronic camera 100 is output from the angular velocity sensor 128.

画像変換処理部122は、メモリ106に一時的に記録されている現像後画像データ152に対して仮想球面への投影処理と平面展開の処理とを行い、球面投影画像データ158を生成してメモリ106に一時的に記録する。画像変換処理部122は、上述した球面投影画像データ158の生成に際して、撮影時に設定されていた焦点距離等の撮影パラメータ156と、撮影時にチルト角を計測して得られたカメラ姿勢データ154とを参照する。なお、先に説明したように、現像後画像データ152は複数フレーム分がメモリ106に一時的に記録されるので、画像変換処理部122はそれぞれのフレームの現像後画像データ152に対して画像変換の処理を行う。その結果、メモリ106内には複数フレーム分の球面投影画像データ158が一時的に記録される。   The image conversion processing unit 122 performs projection processing on the virtual spherical surface and planar development processing on the developed image data 152 temporarily recorded in the memory 106 to generate spherical projection image data 158 to generate the memory. 106 is temporarily recorded. When generating the spherical projection image data 158 described above, the image conversion processing unit 122 uses shooting parameters 156 such as a focal length set at the time of shooting and camera posture data 154 obtained by measuring a tilt angle at the time of shooting. refer. As described above, since the post-development image data 152 is temporarily recorded in the memory 106 for a plurality of frames, the image conversion processing unit 122 performs image conversion on the post-development image data 152 of each frame. Perform the process. As a result, spherical projection image data 158 for a plurality of frames is temporarily recorded in the memory 106.

動きベクトル演算処理部124は、複数枚の球面投影画像データ158について各画像間の位置ずれ量を表す動きベクトル160を求める。すなわち、動きベクトル演算処理部124は、複数枚の球面投影画像データ158に基づく複数の画像それぞれから注目画像ブロックを抽出し、時間的に隣接しあう複数の画像間で上記注目画像ブロックの移動量および移動方向を求めて動きベクトル160を求める。動きベクトル演算処理部124で求められた、各隣接画像間の動きベクトル160はメモリ106に一時的に記録される。動きベクトル160を求める処理としては、例えば、基準となる画像中において複数の動きベクトル測定領域を設定し、この動きベクトル測定領域の画像をテンプレートとして参照画像とのテンプレートマッチングの処理を行う方法がある。そして、それぞれの動きベクトル測定領域に対応する動きベクトル160が導出される。   The motion vector calculation processing unit 124 obtains a motion vector 160 representing the amount of positional deviation between the images for the plurality of spherical projection image data 158. That is, the motion vector calculation processing unit 124 extracts a target image block from each of a plurality of images based on a plurality of spherical projection image data 158, and the amount of movement of the target image block between a plurality of temporally adjacent images. Then, the motion vector 160 is obtained by obtaining the moving direction. The motion vector 160 between the adjacent images obtained by the motion vector calculation processing unit 124 is temporarily recorded in the memory 106. As a process for obtaining the motion vector 160, for example, there is a method in which a plurality of motion vector measurement regions are set in a reference image, and template matching processing with a reference image is performed using the image of the motion vector measurement region as a template. . Then, a motion vector 160 corresponding to each motion vector measurement region is derived.

テンプレートマッチング処理は、テンプレートを参照画像中の探索領域内で走査しながら一致指標を演算し、一致指標が最も高くなる位置を検出する処理である。参照画像中で一致指標が最も高くなる位置と基準画像中の対応位置(テンプレートの存在する位置)との位置ずれ量が計算され、位置ずれの方向と位置ずれ量とを規定する動きベクトルとして出力される。一致指標は、SAD(Sum of Absolute intensity Difference:差の絶対値和)、SSD(Sum of Squared intensity Difference:差の二乗和)、NCC(Normalized Cross-Correlation:正規化相互相関)など公知の技術を用いて導出することが可能である。   The template matching process is a process of calculating a matching index while scanning a template in a search area in a reference image and detecting a position where the matching index is the highest. The amount of misalignment between the position where the matching index is the highest in the reference image and the corresponding position in the standard image (the position where the template exists) is calculated and output as a motion vector that defines the direction and amount of misalignment Is done. The coincidence index uses known techniques such as SAD (Sum of Absolute Intensity Difference), SSD (Sum of Squared Intensity Difference), NCC (Normalized Cross-Correlation), etc. And can be derived.

合成処理部126は、メモリ106に記録されている複数フレームの球面投影画像データ158について、動きベクトル演算処理部124で求められた動きベクトル160を参照して、複数の画像間の位置ずれを補正しながら貼り合わせ処理を行うことでパノラマ合成画像データ162を生成し、メモリ106に格納する。このとき、必要に応じて、輪郭形状を矩形にするため画像の周辺部を切り取ってメモリに格納する。以上のようにして現像処理を含む各種画像処理が施された画像は、圧縮処理されて画像メモリ142に画像ファイルとして記録される。また、必要に応じて不図示の表示装置等に表示される。   The synthesizing unit 126 corrects misalignment between the plurality of images by referring to the motion vector 160 obtained by the motion vector arithmetic processing unit 124 for the spherical projection image data 158 of the plurality of frames recorded in the memory 106. The panorama composite image data 162 is generated by performing the pasting process while being stored in the memory 106. At this time, if necessary, the peripheral portion of the image is cut out and stored in the memory in order to make the contour shape rectangular. The image that has been subjected to various types of image processing including development processing as described above is compressed and recorded in the image memory 142 as an image file. Further, it is displayed on a display device (not shown) or the like as necessary.

(処理シーケンス)
図2は、第1の実施形態における画像貼り合わせ装置120を備える電子カメラ100によって行われる画像貼り合わせ処理の内容を示すフローチャートである。例えば、電子カメラ100がパノラマ画像を生成するためのパノラマ画像生成モードに設定されており、ユーザによってレリーズボタンの押圧操作が行われると、図2に示される処理が開始される。
(Processing sequence)
FIG. 2 is a flowchart illustrating the contents of the image combining process performed by the electronic camera 100 including the image combining apparatus 120 according to the first embodiment. For example, when the electronic camera 100 is set to a panoramic image generation mode for generating a panoramic image, and the user performs a pressing operation on the release button, the processing shown in FIG. 2 is started.

ステップS200では、ユーザがレリーズボタンを押圧操作した時点における電子カメラ100のチルト方向の傾きが計測され、カメラ姿勢データ154としてメモリ106に蓄積される。   In step S <b> 200, the tilt in the tilt direction of the electronic camera 100 when the user presses the release button is measured and stored in the memory 106 as camera posture data 154.

ステップS202では、焦点距離、シャッタ速度、ISO感度、絞り値等の露光条件を一定に固定した状態で連写撮影が行われる。このとき、電子カメラ100には、電子カメラ100を振る方向を示す矢印等が表示され、撮影者はそれに従って円弧を描くように電子カメラ100を振りながら撮影を行う。すなわち、水平面に沿うように電子カメラ100をスイングさせながら撮影を行う。   In step S202, continuous shooting is performed with exposure conditions such as focal length, shutter speed, ISO sensitivity, aperture value, etc. fixed. At this time, an arrow or the like indicating the direction in which the electronic camera 100 is shaken is displayed on the electronic camera 100, and the photographer performs shooting while swinging the electronic camera 100 so as to draw an arc according to the arrow. That is, photographing is performed while swinging the electronic camera 100 along the horizontal plane.

上述したS200、S202の処理についてはその順番を逆にし、連続撮影の後にカメラチルト角の計測が行われても良い。あるいは、連続撮影動作開始後の所定のタイミングでカメラチルト角の計測が行われても良い。   The order of the processes in S200 and S202 described above may be reversed, and the camera tilt angle may be measured after continuous shooting. Alternatively, the camera tilt angle may be measured at a predetermined timing after the start of the continuous shooting operation.

ステップS204では、ステップS202において連写撮影して得られた複数フレームの現像前画像データ150それぞれに対してデモザイキング、ノイズ低減、ホワイトバランス、階調変換、色補正等の処理をし、現像後画像データ152を生成する処理が行われる。この処理が、図1を参照して説明した画像処理部110で行われる処理に相当する。   In step S204, processing such as demosaicing, noise reduction, white balance, gradation conversion, and color correction is performed on each of the plurality of pre-development image data 150 obtained by continuous shooting in step S202, and after development. Processing for generating image data 152 is performed. This process corresponds to the process performed by the image processing unit 110 described with reference to FIG.

ステップS206では、ステップS204で現像処理して得られた複数フレームの現像後画像データ152それぞれに対して、焦点距離などの撮影パラメータ156とS200で計測されたカメラチルト角(カメラ姿勢データ154)とを参照して球面投影変換および平面展開をする処理が行われて複数フレームの球面投影画像データ158が生成される。この処理が、図1を参照して説明した画像変換処理部122で行われる処理に相当する。   In step S206, for each of the plurality of post-development image data 152 obtained by the development processing in step S204, the shooting parameters 156 such as the focal length and the camera tilt angle (camera posture data 154) measured in S200. The spherical projection conversion and planar development are performed with reference to FIG. 5 to generate a plurality of frames of spherical projection image data 158. This process corresponds to the process performed by the image conversion processing unit 122 described with reference to FIG.

球面投影処理の処理内容を図3(a)、図3(b)を参照して説明する。ここでは撮影時に、電子カメラ100がチルトした状態でスイングされた場合を例に説明する。このカメラチルトを考慮せずに球面投影を行った場合、被写界内の一点に対応する点像の移動軌跡は図3(a)に示されるように経度だけでなく緯度も変化する。これは図15を参照して説明したのと同様である。   The processing contents of the spherical projection processing will be described with reference to FIGS. 3 (a) and 3 (b). Here, a case where the electronic camera 100 is swung in a tilted state during shooting will be described as an example. When spherical projection is performed without taking this camera tilt into consideration, the trajectory of the point image corresponding to one point in the object scene changes not only in longitude but also in latitude as shown in FIG. This is the same as described with reference to FIG.

図3(b)は、本発明の実施の形態における球面投影処理の処理内容を概念的に示す図である。図3(b)に示される処理では、画像を投影する球面の軸(極軸)が、角速度センサ128で計測されたチルト角度だけ傾けられる。球面の半径は実焦点距離であるものとする。電子カメラ100のチルト角度だけ極軸を傾けた球面に対してx,y,z3軸の直交座標を設定し、x軸回りの回転角度をθx、y軸回りの回転角度をθyとすると(図4)、半径rの球面上の点(x,y,z)とx軸回り,y軸回りの回転角θx,θyとの間では以下に示す関係、すなわち、

(x,y,z)=(r・cosθx・sinθy,r・sinθx,r・cosθx・cosθy)
…(8)

が成り立つ。
FIG. 3B is a diagram conceptually showing the processing content of the spherical projection processing in the embodiment of the present invention. In the process shown in FIG. 3B, the spherical axis (polar axis) on which the image is projected is tilted by the tilt angle measured by the angular velocity sensor 128. The radius of the spherical surface is assumed to be the actual focal length. The x, y, z3 axis orthogonal coordinates are set for a spherical surface whose polar axis is tilted by the tilt angle of the electronic camera 100, the rotation angle about the x axis is θx, and the rotation angle about the y axis is θy (see FIG. 4) The relationship shown below between the point (x, y, z) on the spherical surface with the radius r and the rotation angles θx, θy around the x axis and around the y axis,

(X, y, z) = (r · cosθx · sinθy, r · sinθx, r · cosθx · cosθy)
... (8)

Holds.

通常の(チルト角度を考慮しない)座標系(x’,y’,z’)とチルト角度を考慮した座標系(x,y、z)とはチルト角度φだけ座標系がずれているので、次の関係、
Since the normal coordinate system (not considering the tilt angle) (x ′, y ′, z ′) and the coordinate system (x, y, z) considering the tilt angle are shifted by the tilt angle φ, The following relationship,






が成り立つ。





Holds.

カメラ基準の(チルト角度を考慮しない)座標系におけるx’軸回り、y’軸回りそれぞれの回転角をθ’x、θ’yとすると次の関係、

θ’x=arcsin(y’) … (10)
θ’y=arctan(x’/z’) … (11)

が成り立つ。
When the rotation angles around the x ′ axis and the y ′ axis in the camera-based coordinate system (not considering the tilt angle) are θ′x and θ′y,

θ′x = arcsin (y ′) (10)
θ′y = arctan (x ′ / z ′) (11)

Holds.

一つの点から光が放射状に出射して撮像面に入射すると仮定した場合、カメラ基準の球面座系(θ’x、θ’y)を用いると、撮像面の対応位置(s,t)は、

s=r・tan(θ’y) … (12)
t=r・tan(θ’x)/tan(θ’y) … (13)

で表される。
When it is assumed that light is emitted radially from one point and incident on the imaging surface, the corresponding position (s, t) on the imaging surface is obtained using the camera-based spherical seat system (θ′x, θ′y). ,

s = r · tan (θ′y) (12)
t = r · tan (θ′x) / tan (θ′y) (13)

It is represented by

以上に説明した式(8)から式(13)より、撮像面上の位置(s,t)と、カメラチルト角を考慮した球面座標(θx,θy)との間の対応関係を求めることができる。カメラチルト角を考慮した球面座標(θx,θy)は、以下の(14)、(15)で示す式、

s’=r・θy … (14)
t’=r・θx … (15)

を用いて正距円筒図法で示される平面座標(s’,t’)に展開可能となる。
From the equations (8) to (13) described above, the correspondence between the position (s, t) on the imaging surface and the spherical coordinates (θx, θy) considering the camera tilt angle can be obtained. it can. The spherical coordinates (θx, θy) in consideration of the camera tilt angle are expressed by the following equations (14) and (15):

s ′ = r · θy (14)
t ′ = r · θx (15)

Can be developed into plane coordinates (s ′, t ′) indicated by equirectangular projection.

以上より、撮像面上に形成される画像(画像データに基づく二次元画像)を、カメラチルト角度を考慮した球面座標系の仮想曲面に投影することができる。   As described above, an image (a two-dimensional image based on image data) formed on the imaging surface can be projected onto a virtual curved surface of a spherical coordinate system in consideration of the camera tilt angle.

図2の説明に戻る。ステップS208では、S206の処理を経て得られた複数枚の球面投影画像データ158について、画像間の位置ずれを表す動きベクトル160を求める処理が行われる。   Returning to the description of FIG. In step S208, a process for obtaining a motion vector 160 representing a positional deviation between images is performed on the plurality of spherical projection image data 158 obtained through the process of S206.

ステップS210では、S206で生成された複数枚の球面投影画像データ158について、S208で導出された動きベクトル160を用いて画像間の位置ずれを補正しながら貼り合わせ処理を行うことでパノラマ合成画像データ162を生成する処理が行われる。   In step S210, panorama composite image data is obtained by performing a pasting process on the plurality of spherical projection image data 158 generated in S206 while correcting the positional deviation between the images using the motion vector 160 derived in S208. Processing to generate 162 is performed.

以上に説明したように、レリーズ押圧操作時にカメラチルト角が計測され、そのチルト角度分だけ補正した球面投影画像を生成することによって、2軸方向の比較的単純な位置合わせ処理によって、画像貼り合わせに際しての位置合わせ残差を減じることが可能となる。   As described above, the camera tilt angle is measured at the time of pressing the release button, and a spherical projection image corrected by the tilt angle is generated, thereby performing image pasting by a relatively simple alignment process in the biaxial direction. It is possible to reduce the registration residual.

なお、本実施の形態では、連写撮影を開始した後のカメラチルト角は大きく変化しないことを前提としている。連続撮影中にカメラチルト角が変化するのに対応可能とする例については第2の実施の形態で説明する。   In the present embodiment, it is assumed that the camera tilt angle after starting continuous shooting does not change significantly. An example in which the camera tilt angle can be changed during continuous shooting will be described in the second embodiment.

以上に説明した処理を行って生成される画像の例について図5、図6を参照して説明する。図5(a)には、カメラチルト角を考慮しないで球面投影画像生成の処理をして得られた画像の例を示す。図5(b)には、カメラチルト角を考慮して球面投影画像生成の処理をして得られた画像の例を示す。図5(a)と図5(b)とを比較すればあきらかであるように、本発明の実施の形態による球面投影変換の処理により、水平方向に延在する直線状の被写体の像の湾曲が抑制されていることが分かる。   An example of an image generated by performing the processing described above will be described with reference to FIGS. FIG. 5A shows an example of an image obtained by processing for generating a spherical projection image without considering the camera tilt angle. FIG. 5B shows an example of an image obtained by processing for generating a spherical projection image in consideration of the camera tilt angle. As apparent from a comparison between FIG. 5A and FIG. 5B, the curvature of the image of the linear object extending in the horizontal direction by the spherical projection conversion processing according to the embodiment of the present invention. It can be seen that is suppressed.

図5(b)に示される画像を貼り合わせて得られた画像の一部を拡大したものを図6に示す。図6に示される画像では、図14を参照して説明したような不連続部が殆ど目立たなくなっている。このとき、画像の回転や倍率変換等の処理をすることなく、2軸方向の単純な位置合わせをするだけで滑らかな貼り合わせをすることができるので、画像貼り合わせの処理負荷を減じることが可能となる。   FIG. 6 shows an enlarged view of a part of the image obtained by pasting the images shown in FIG. In the image shown in FIG. 6, the discontinuity as described with reference to FIG. 14 is hardly noticeable. At this time, since it is possible to perform smooth bonding only by simple alignment in two axes directions without performing processing such as image rotation and magnification conversion, the processing load of image bonding can be reduced. It becomes possible.

−第2の実施形態−
第2の実施の形態では、以下で詳細に説明するように、連続撮影が行われる際、毎回の撮影動作に対応してカメラチルト角の計測が行われ、その計測結果がカメラ姿勢データ154として記録される。その後、各画像を球面投影変換する時に、その画像を撮影する際に計測して得られたカメラチルト角が参照される。
-Second Embodiment-
In the second embodiment, as will be described in detail below, when continuous shooting is performed, the camera tilt angle is measured corresponding to each shooting operation, and the measurement result is used as camera posture data 154. To be recorded. Thereafter, when each image is subjected to spherical projection conversion, the camera tilt angle obtained by measurement when the image is captured is referred to.

本発明の第2の実施の形態に係る画像貼り合わせ装置120も、図1を参照して説明した第1の実施の形態に係る画像貼り合わせ装置120と同様の構成を備える。また、画像貼り合わせ装置120が電子カメラ100に適用されるのも第1の実施の形態と同様である。第1の実施の形態と異なるのは以下に説明する処理シーケンスである。   The image bonding apparatus 120 according to the second embodiment of the present invention also has the same configuration as the image bonding apparatus 120 according to the first embodiment described with reference to FIG. Also, the image bonding apparatus 120 is applied to the electronic camera 100 as in the first embodiment. What is different from the first embodiment is a processing sequence described below.

(処理シーケンス)
図7は、第2の実施形態における画像貼り合わせ装置120を備える電子カメラ100によって行われる画像貼り合わせ処理の手順を説明するフローチャートである。第1の実施の形態と同様、例えば、電子カメラ100がパノラマ画像を生成するためのパノラマ画像生成モードに設定されており、ユーザによってレリーズボタンの押圧操作が行われると、図2に示される処理が開始される。
(Processing sequence)
FIG. 7 is a flowchart for explaining the procedure of the image combining process performed by the electronic camera 100 including the image combining device 120 according to the second embodiment. Similar to the first embodiment, for example, when the electronic camera 100 is set to a panoramic image generation mode for generating a panoramic image and the user performs a pressing operation of the release button, the processing illustrated in FIG. 2 is performed. Is started.

ステップS700では、電子カメラ100のチルト方向の傾きが計測され、電子カメラ100の姿勢データ130としてメモリ106に蓄積される。   In step S <b> 700, the tilt of the electronic camera 100 in the tilt direction is measured and stored in the memory 106 as attitude data 130 of the electronic camera 100.

ステップS702では、焦点距離、シャッタ速度、ISO感度、絞り値等の露光条件を一定に固定した状態で1フレーム分の撮影が行われる。このとき、電子カメラ100には、電子カメラ100を振る方向を示す矢印等が表示され、撮影者はそれに従って円弧を描くように電子カメラ100を振りながら撮影を行う。すなわち、水平面に沿うように電子カメラ100をスイングさせながら撮影を行う。   In step S702, shooting for one frame is performed with exposure conditions such as focal length, shutter speed, ISO sensitivity, aperture value, etc. fixed. At this time, an arrow or the like indicating the direction in which the electronic camera 100 is shaken is displayed on the electronic camera 100, and the photographer performs shooting while swinging the electronic camera 100 so as to draw an arc according to the arrow. That is, photographing is performed while swinging the electronic camera 100 along the horizontal plane.

上述したS700、S702の処理についてはその順番を逆にし、毎撮影動作の後にカメラチルト角の計測が行われても良い。あるいは、撮影動作とカメラチルト角の計測とが略同じタイミングで行われてもよい。   The order of the processes in S700 and S702 described above may be reversed, and the camera tilt angle may be measured after each shooting operation. Alternatively, the photographing operation and the camera tilt angle measurement may be performed at substantially the same timing.

ステップS704では、レリーズスイッチがオフになったか否かの判定が行われる。S704での判定が否定される間、S700でのカメラチルト角の計測とS702での撮影とが繰り返し行われる。S704での判定が肯定された場合の分岐先であるS706において、S702の撮影動作で得られた複数フレームの現像前画像データ150それぞれに対してデモザイキング、ノイズ低減、ホワイトバランス、階調変換、色補正等の処理をし、現像後画像データ152を生成する処理が行われる。この処理が、図1を参照して説明した画像処理部110で行われる処理に相当する。   In step S704, it is determined whether or not the release switch has been turned off. While the determination in S704 is negative, the measurement of the camera tilt angle in S700 and the shooting in S702 are repeated. In S706, which is a branch destination when the determination in S704 is affirmative, demosaicing, noise reduction, white balance, gradation conversion, and the like for each of the plurality of pre-development image data 150 obtained by the photographing operation in S702, Processing such as color correction is performed to generate post-development image data 152. This process corresponds to the process performed by the image processing unit 110 described with reference to FIG.

ステップS708では、ステップS706で現像処理して得られた複数フレームの現像後画像データ152それぞれに対して、焦点距離などの撮影パラメータ156とS700で計測されたカメラチルト角(カメラ姿勢データ154)とを参照して球面投影変換および平面展開をする処理が行われて複数フレームの球面投影画像データ158が生成される。この処理が、図1を参照して説明した画像変換処理部122で行われる処理に相当する。   In step S708, for each of the plurality of post-development image data 152 obtained by the development processing in step S706, the shooting parameters 156 such as the focal length and the camera tilt angle (camera posture data 154) measured in S700 are obtained. The spherical projection conversion and planar development are performed with reference to FIG. 5 to generate a plurality of frames of spherical projection image data 158. This process corresponds to the process performed by the image conversion processing unit 122 described with reference to FIG.

以下、S710、S712の処理は第1の実施の形態で図2を参照して説明したS208、S210の処理とそれぞれ同様であるので詳細な説明を省略する。   Hereinafter, the processes of S710 and S712 are the same as the processes of S208 and S210 described with reference to FIG. 2 in the first embodiment, and thus detailed description thereof is omitted.

第1の実施形態では、連続撮影の開始前にカメラチルト角が計測され、その後連続撮影して得られた全ての画像について球面投影変換の処理をする際に、上記カメラチルト角が一律に適用される。これに対し、第2の実施の形態では、1フレームの撮影動作に対応して1回ずつ、カメラチルト角度の計測が行われ、撮影画像のそれぞれに適したチルト角度が設定され、球面投影変換の処理が行われる点が異なる。これによって、連写撮影中にカメラのチルト角度が変動した場合においても、縦横2軸方向の比較的単純な位置合せ処理によって画像間の位置ずれを補正することができ、接合部の不整合の目立ちにくい滑らかなパノラマ画像を得ることが可能となる。   In the first embodiment, the camera tilt angle is measured before the start of continuous shooting, and then the camera tilt angle is uniformly applied when spherical projection conversion processing is performed on all images obtained after continuous shooting. Is done. On the other hand, in the second embodiment, the camera tilt angle is measured once in response to the shooting operation of one frame, and a tilt angle suitable for each of the shot images is set, and spherical projection conversion is performed. This is different. As a result, even when the tilt angle of the camera fluctuates during continuous shooting, it is possible to correct misalignment between images by relatively simple alignment processing in the vertical and horizontal biaxial directions, and to prevent inconsistencies in the joints. It is possible to obtain a smooth panoramic image that is not noticeable.

以上、第1および第2の実施の形態で、画像貼り合わせ装置120が電子カメラ100に実装される例について説明したが、情報処理装置と、この情報処理装置上で実行されるプログラムとによって画像貼り合わせ装置120が実現されてもよい。その場合、複数の画像データとカメラ姿勢データとを取得し、図2のS204からS210までの処理手順、あるいは図7のS706からS712までの処理手順を情報処理装置が実行するためのプログラムが情報処理装置内の補助記憶装置にストアされる。これらのプログラムは補助記憶装置から読み出されて情報処理装置内のメモリ上にロードされ、情報処理装置により実行される。この場合、現像前画像データ150または現像後画像データ152がカメラ姿勢データ154、撮影パラメータ156とともに電子カメラ100の画像メモリ142に画像ファイルとして記録され、その画像ファイルが情報処理装置に入力される。生成されたパノラマ合成画像データに基づく画像は情報処理装置に接続される表示装置等に出力可能である。また、生成されたパノラマ合成画像データを収容する画像ファイルを情報処理装置が生成して記録することも可能である。   As described above, in the first and second embodiments, the example in which the image bonding apparatus 120 is mounted on the electronic camera 100 has been described, but an image is processed by the information processing apparatus and a program executed on the information processing apparatus. The bonding apparatus 120 may be realized. In that case, a program for acquiring a plurality of image data and camera posture data and for the information processing apparatus to execute the processing procedure from S204 to S210 in FIG. 2 or the processing procedure from S706 to S712 in FIG. Stored in an auxiliary storage device in the processing device. These programs are read from the auxiliary storage device, loaded onto the memory in the information processing device, and executed by the information processing device. In this case, the pre-development image data 150 or the post-development image data 152 is recorded as an image file in the image memory 142 of the electronic camera 100 together with the camera attitude data 154 and the shooting parameters 156, and the image file is input to the information processing apparatus. An image based on the generated panorama composite image data can be output to a display device or the like connected to the information processing device. It is also possible for the information processing apparatus to generate and record an image file that contains the generated panorama composite image data.

情報処理装置としては、汎用のコンピュータであってもよいし、画像処理専用の装置、ビデオレコーダ等であってもよい。   The information processing apparatus may be a general-purpose computer, an apparatus dedicated to image processing, a video recorder, or the like.

以上では、一連の静止画像撮影動作が連続して行われて得られた複数の静止画像データをもとにパノラマ合成画像データが生成される例について説明したが本発明はそれに限られない。例えば、動画の撮影に際してカメラをパンしながら風景を撮影する場合がある。ユーザはその動画像を再生し、その中から気に入ったシーンを見つけ出したときに、特定の時間区間のシーンを選択し、パノラマ合成画像データを生成するコマンドを発する。画像貼り合わせ装置120は、ユーザにより選択された時間区間中の動画像データから複数枚の静止画像を切り出し、画像変換、動きベクトル導出、パノラマ合成の処理をすることができる。この場合、動画像撮影中に角速度センサ128は電子カメラ100のチルト角を適宜の時間間隔で計測し、その計測結果がカメラ姿勢データ154として動画像データに付加されているものとする。   Although an example in which panoramic composite image data is generated based on a plurality of still image data obtained by continuously performing a series of still image shooting operations has been described above, the present invention is not limited thereto. For example, there is a case where a landscape is shot while panning the camera when shooting a moving image. When the user reproduces the moving image and finds a favorite scene from the moving image, the user selects a scene in a specific time interval and issues a command for generating panorama composite image data. The image pasting apparatus 120 can cut out a plurality of still images from moving image data in a time interval selected by the user, and perform image conversion, motion vector derivation, and panorama synthesis processing. In this case, it is assumed that the angular velocity sensor 128 measures the tilt angle of the electronic camera 100 at an appropriate time interval during moving image shooting, and the measurement result is added to the moving image data as camera posture data 154.

本発明に係る画像貼り合わせ装置は、デジタルスチルカメラ、デジタルムービーカメラに組み込んだものとすることが可能である。さらには、パーソナルコンピュータ、ビデオレコーダ、携帯電話あるいは携帯情報端末装置などに実装することも可能である。   The image bonding apparatus according to the present invention can be incorporated in a digital still camera or a digital movie camera. Furthermore, it can be mounted on a personal computer, a video recorder, a mobile phone, a portable information terminal device, or the like.

100 … 電子カメラ
102 … 撮影光学系
104 … 撮像素子
106 … メモリ
110 … 画像処理部
120 … 画像貼り合わせ装置
122 … 画像変換処理部
124 … 動きベクトル演算処理部
126 … 合成処理部
128 … 角速度センサ
140 … 制御部
142 … 画像メモリ
150 … 現像前画像データ
152 … 現像後画像データ
154 … カメラ姿勢データ
156 … 撮影パラメータ
158 … 球面投影画像データ
160 … 動きベクトル
162 … パノラマ合成画像データ
DESCRIPTION OF SYMBOLS 100 ... Electronic camera 102 ... Shooting optical system 104 ... Image pick-up element 106 ... Memory 110 ... Image processing part 120 ... Image pasting apparatus 122 ... Image conversion processing part 124 ... Motion vector arithmetic processing part 126 ... Composition processing part 128 ... Angular velocity sensor 140 ... Control unit 142 ... Image memory 150 ... Pre-development image data 152 ... Post-development image data 154 ... Camera attitude data 156 ... Shooting parameters 158 ... Spherical projection image data 160 ... Motion vector 162 ... Panorama composite image data

Claims (7)

水平面に沿い、弧を描くように撮影装置を移動させながら複数回の撮影動作を連続して行って得られた複数の画像データのそれぞれから部分画像データを切り出して貼り合わせ、パノラマ合成画像データを生成する画像貼り合わせ装置であって、
前記複数の画像データを取得する画像取得部と、
前記複数回の撮影動作が前記撮影装置で行われる前または後、もしくは最中に検出された前記撮影装置のチルト方向の傾き角度であるチルト角度に関する情報を含むカメラ姿勢データを取得するカメラ姿勢データ取得部と、
前記カメラ姿勢データに含まれる前記チルト角度に関する情報に基づいて決定された処理パラメータを用い、前記複数の画像データに基づく二次元画像をそれぞれ基準軸を極軸とする仮想球面上に投影する処理をして複数の球面投影画像データを生成する画像変換処理部と、
前記複数の球面投影画像データに基づくそれぞれの画像間の動きベクトルを導出する動きベクトル演算処理部と、
前記複数の球面投影画像データに基づく各画像間の動き補償を前記動きベクトル演算処理部で導出された動きベクトルに基づいて行い、前記複数の球面投影画像データから必要部分を切り出して貼り合わせる処理をしてパノラマ合成画像データを生成する合成処理部と
を備えることを特徴とする画像貼り合わせ装置。
The partial image data is cut out and pasted from each of a plurality of image data obtained by continuously performing a plurality of photographing operations while moving the photographing device so as to draw an arc along the horizontal plane, and the panoramic composite image data is obtained. An image pasting device to be generated,
An image acquisition unit for acquiring the plurality of image data;
Camera posture data for acquiring camera posture data including information relating to a tilt angle that is a tilt angle in the tilt direction of the photographing device detected before, after, or during the time when the plurality of photographing operations are performed by the photographing device. An acquisition unit;
A process of projecting a two-dimensional image based on the plurality of image data onto a virtual sphere having a reference axis as a polar axis, using processing parameters determined based on information about the tilt angle included in the camera posture data. An image conversion processing unit for generating a plurality of spherical projection image data,
A motion vector arithmetic processing unit for deriving a motion vector between the images based on the plurality of spherical projection image data;
A process of performing motion compensation between images based on the plurality of spherical projection image data based on a motion vector derived by the motion vector calculation processing unit, and cutting out and pasting a necessary portion from the plurality of spherical projection image data And a composition processing unit for generating panorama composite image data.
前記処理パラメータにより、前記仮想球面の前記基準軸と前記二次元画像の面とでなす角度が規定され、
前記画像変換処理部は、前記基準軸と前記二次元画像の面とでなす角度が前記チルト角度と等しくなるように前記基準軸を傾斜させた前記仮想球面上に投影する処理をして前記複数の球面投影画像データを生成することを特徴とする、請求項1に記載の画像貼り合わせ装置。
The processing parameter defines an angle formed by the reference axis of the virtual sphere and the surface of the two-dimensional image,
The image conversion processing unit performs a process of projecting on the virtual spherical surface in which the reference axis is inclined so that an angle formed by the reference axis and the plane of the two-dimensional image is equal to the tilt angle. The image pasting apparatus according to claim 1, wherein the spherical projection image data is generated.
前記チルト角度は、前記複数回の撮影動作それぞれに対応して検出されることを特徴とする請求項1または2に記載の画像貼り合わせ装置。   The image pasting apparatus according to claim 1, wherein the tilt angle is detected corresponding to each of the plurality of photographing operations. 前記動きベクトル演算処理部は、テンプレートマッチング法を用いて前記それぞれの画像間の動きベクトルを導出することを特徴とする請求項1から3のいずれか一つに記載の画像貼り合わせ装置。   The image pasting device according to any one of claims 1 to 3, wherein the motion vector calculation processing unit derives a motion vector between the respective images using a template matching method. 複数の画像データを合成してパノラマ合成画像データを生成可能な撮影装置であって、
水平面に沿い、弧を描くように前記撮影装置が振られているときに複数回の撮影動作を連続して行い、複数の画像データを生成する撮像素子と、
前記複数回の撮影動作が前記撮像素子で行われる前または後、もしくは最中に、前記撮影装置のチルト方向の傾き角度であるチルト角度を計測し、前記チルト角度に関する情報を含むカメラ姿勢データを生成する姿勢検出部と、
前記カメラ姿勢データに含まれる前記チルト角度に関する情報に基づいて決定された処理パラメータを用い、前記複数の画像データに基づく二次元画像をそれぞれ基準軸を極軸とする仮想球面上に投影する処理をして複数の球面投影画像データを生成する画像変換処理部と、
前記複数の球面投影画像データに基づくそれぞれの画像間の動きベクトルを導出する動きベクトル演算処理部と、
前記複数の球面投影画像データに基づく各画像間の動き補償を前記動きベクトル演算処理部で導出された動きベクトルに基づいて行い、前記複数の球面投影画像データから必要部分を切り出して貼り合わせる処理をしてパノラマ合成画像データを生成する合成処理部と
を備えることを特徴とする撮影装置。
An imaging device capable of generating a panorama composite image data by combining a plurality of image data,
An image sensor that continuously performs a plurality of image capturing operations when the image capturing apparatus is shaken so as to draw an arc along a horizontal plane, and generates a plurality of image data;
Before, after or during the plurality of shooting operations performed by the image sensor, a tilt angle that is a tilt angle in the tilt direction of the imaging device is measured, and camera posture data including information about the tilt angle is obtained. A posture detection unit to generate;
A process of projecting a two-dimensional image based on the plurality of image data onto a virtual sphere having a reference axis as a polar axis, using processing parameters determined based on information about the tilt angle included in the camera posture data. An image conversion processing unit for generating a plurality of spherical projection image data,
A motion vector arithmetic processing unit for deriving a motion vector between the images based on the plurality of spherical projection image data;
A process of performing motion compensation between images based on the plurality of spherical projection image data based on a motion vector derived by the motion vector calculation processing unit, and cutting out and pasting a necessary portion from the plurality of spherical projection image data And a compositing processing unit for generating panoramic composite image data.
水平面に沿い、弧を描くように撮影装置を移動させながら複数回の撮影動作を連続して行って得られた複数の画像データのそれぞれから部分画像データを切り出して貼り合わせ、パノラマ合成画像データを生成する画像貼り合わせ方法であって、
前記複数の画像データを取得する画像データ取得ステップと、
前記複数回の撮影動作が前記撮影装置で行われる前または後、もしくは最中に検出された前記撮影装置のチルト方向の傾き角度であるチルト角度に関する情報を含むカメラ姿勢データを取得するカメラ姿勢データ取得ステップと、
前記カメラ姿勢データに含まれる前記チルト角度に関する情報に基づいて決定された処理パラメータを用い、前記複数の画像データに基づく二次元画像をそれぞれ基準軸を極軸とする仮想球面上に投影する処理をして複数の球面投影画像データを生成する画像変換処理ステップと、
前記複数の球面投影画像データに基づくそれぞれの画像間の動きベクトルを導出する動きベクトル導出ステップと、
前記複数の球面投影画像データに基づく各画像間の動き補償を、前記動きベクトル導出ステップで導出された動きベクトルに基づいて行い、前記複数の球面投影画像データから必要部分を切り出して貼り合わせる処理をしてパノラマ合成画像データを生成するパノラマ合成ステップと
を有することを特徴とする画像貼り合わせ方法。
The partial image data is cut out and pasted from each of a plurality of image data obtained by continuously performing a plurality of photographing operations while moving the photographing device so as to draw an arc along the horizontal plane, and the panoramic composite image data is obtained. An image pasting method to be generated,
An image data acquisition step of acquiring the plurality of image data;
Camera posture data for acquiring camera posture data including information relating to a tilt angle that is a tilt angle in the tilt direction of the photographing device detected before, after, or during the time when the plurality of photographing operations are performed by the photographing device. An acquisition step;
A process of projecting a two-dimensional image based on the plurality of image data onto a virtual sphere having a reference axis as a polar axis, using processing parameters determined based on information about the tilt angle included in the camera posture data. An image conversion processing step for generating a plurality of spherical projection image data,
A motion vector deriving step for deriving a motion vector between the images based on the plurality of spherical projection image data;
A process of performing motion compensation between images based on the plurality of spherical projection image data based on the motion vector derived in the motion vector deriving step, and cutting out and pasting necessary portions from the plurality of spherical projection image data And a panorama synthesizing step for generating panorama synthesized image data.
水平面に沿い、弧を描くように撮影装置を移動させながら複数回の撮影動作を連続して行って得られた複数の画像データのそれぞれから部分画像データを切り出して貼り合わせ、パノラマ合成画像データを生成する処理をコンピュータで行うための画像処理プログラムであって、前記コンピュータに、
前記複数の画像データを取得する画像データ取得手順と、
前記複数回の撮影動作が前記撮影装置で行われる前または後、もしくは最中に検出された前記撮影装置のチルト方向の傾き角度であるチルト角度に関する情報を含むカメラ姿勢データを取得するカメラ姿勢データ取得手順と、
前記カメラ姿勢データに含まれる前記チルト角度に関する情報に基づいて決定された処理パラメータを用い、前記複数の画像データに基づく二次元画像をそれぞれ基準軸を極軸とする仮想球面上に投影する処理をして複数の球面投影画像データを生成する画像変換処理手順と、
前記複数の球面投影画像データに基づくそれぞれの画像間の動きベクトルを導出する動きベクトル導出手順と、
前記複数の球面投影画像データに基づく各画像間の動き補償を、前記動きベクトル導出手順で導出された動きベクトルに基づいて行い、前記複数の球面投影画像データから必要部分を切り出して貼り合わせる処理をしてパノラマ合成画像データを生成するパノラマ合成手順と
を実行させることを特徴とする画像処理プログラム。
The partial image data is cut out and pasted from each of a plurality of image data obtained by continuously performing a plurality of photographing operations while moving the photographing device so as to draw an arc along the horizontal plane, and the panoramic composite image data is obtained. An image processing program for performing processing to be generated by a computer,
An image data acquisition procedure for acquiring the plurality of image data;
Camera posture data for acquiring camera posture data including information relating to a tilt angle that is a tilt angle in the tilt direction of the photographing device detected before, after, or during the time when the plurality of photographing operations are performed by the photographing device. Acquisition procedure;
A process of projecting a two-dimensional image based on the plurality of image data onto a virtual sphere having a reference axis as a polar axis, using processing parameters determined based on information about the tilt angle included in the camera posture data. Image conversion processing procedure for generating a plurality of spherical projection image data,
A motion vector derivation procedure for deriving a motion vector between the images based on the plurality of spherical projection image data;
A process of performing motion compensation between images based on the plurality of spherical projection image data based on the motion vector derived in the motion vector derivation procedure, and cutting out and pasting a necessary portion from the plurality of spherical projection image data And a panorama composition procedure for generating panorama composite image data.
JP2011183286A 2011-08-25 2011-08-25 Image connecting device, photographing device, image connecting method, and image processing program Withdrawn JP2013046270A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011183286A JP2013046270A (en) 2011-08-25 2011-08-25 Image connecting device, photographing device, image connecting method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011183286A JP2013046270A (en) 2011-08-25 2011-08-25 Image connecting device, photographing device, image connecting method, and image processing program

Publications (1)

Publication Number Publication Date
JP2013046270A true JP2013046270A (en) 2013-03-04

Family

ID=48009829

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011183286A Withdrawn JP2013046270A (en) 2011-08-25 2011-08-25 Image connecting device, photographing device, image connecting method, and image processing program

Country Status (1)

Country Link
JP (1) JP2013046270A (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015080118A (en) * 2013-10-17 2015-04-23 株式会社アウトソーシング・システム・コンサルティング Exit pupil position measurement device, imaging apparatus, exit pupil position measurement method and program, and imaging method and program
JP2015080117A (en) * 2013-10-17 2015-04-23 株式会社アウトソーシング・システム・コンサルティング Image processing device, imaging device, image processing method, and image processing program
CN104700355A (en) * 2015-03-31 2015-06-10 百度在线网络技术(北京)有限公司 Generation method, device and system for indoor two-dimension plan
WO2016047073A1 (en) * 2014-09-25 2016-03-31 株式会社Jvcケンウッド Image joining device, imaging device, image joining method, and image joining program
CN106162139A (en) * 2016-08-04 2016-11-23 微鲸科技有限公司 Coded method, video output device, coding/decoding method and video play device
KR101701716B1 (en) * 2015-12-17 2017-02-03 (주)지오시스템리서치 Method for monitoring an ambient condition of an ocean facility
KR101717602B1 (en) * 2016-12-21 2017-03-17 (주)지오시스템리서치 System for monitoring an ambient condition of an ocean facility
WO2018041005A1 (en) * 2016-08-30 2018-03-08 华为技术有限公司 Motion compensation prediction method and device
CN107801039A (en) * 2016-08-30 2018-03-13 华为技术有限公司 Motion prediction compensation method and equipment
WO2018068747A1 (en) * 2016-10-16 2018-04-19 华为技术有限公司 Motion compensated prediction method and device
WO2018199792A1 (en) * 2017-04-26 2018-11-01 Huawei Technologies Co., Ltd Apparatuses and methods for encoding and decoding a panoramic video signal
WO2018199793A1 (en) * 2017-04-27 2018-11-01 Huawei Technologies Co., Ltd Geodesic intra-prediction for panoramic video coding
TWI656788B (en) * 2016-12-14 2019-04-11 聯發科技股份有限公司 Method and apparatus for generating and encoding projection-based frame with 360-degree content represented by rectangular projection faces packed in viewport-based cube projection layout
WO2019127484A1 (en) * 2017-12-29 2019-07-04 深圳市大疆创新科技有限公司 Video coding method, video decoding method, and related device
EP3515076A4 (en) * 2016-09-30 2019-07-24 Huawei Technologies Co., Ltd. Motion compensation prediction method and device
US11109034B2 (en) 2017-07-20 2021-08-31 Canon Kabushiki Kaisha Image processing apparatus for alignment of images, control method for image processing apparatus, and storage medium
WO2023221929A1 (en) * 2022-05-19 2023-11-23 影石创新科技股份有限公司 Image display method and apparatus, electronic device, and storage medium

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015080117A (en) * 2013-10-17 2015-04-23 株式会社アウトソーシング・システム・コンサルティング Image processing device, imaging device, image processing method, and image processing program
JP2015080118A (en) * 2013-10-17 2015-04-23 株式会社アウトソーシング・システム・コンサルティング Exit pupil position measurement device, imaging apparatus, exit pupil position measurement method and program, and imaging method and program
JP2016066927A (en) * 2014-09-25 2016-04-28 株式会社Jvcケンウッド Picture joining device, photographic device, picture joining method and picture joining program
WO2016047073A1 (en) * 2014-09-25 2016-03-31 株式会社Jvcケンウッド Image joining device, imaging device, image joining method, and image joining program
KR101759798B1 (en) 2015-03-31 2017-07-31 바이두 온라인 네트웍 테크놀러지 (베이징) 캄파니 리미티드 Method, device and system for generating an indoor two dimensional plan view image
JP2016194895A (en) * 2015-03-31 2016-11-17 バイドゥ オンライン ネットワーク テクノロジー (ベイジン) カンパニー リミテッド Method, device, and system for creating indoor two-dimentional (2d) floor plan
CN104700355A (en) * 2015-03-31 2015-06-10 百度在线网络技术(北京)有限公司 Generation method, device and system for indoor two-dimension plan
KR101701716B1 (en) * 2015-12-17 2017-02-03 (주)지오시스템리서치 Method for monitoring an ambient condition of an ocean facility
CN106162139A (en) * 2016-08-04 2016-11-23 微鲸科技有限公司 Coded method, video output device, coding/decoding method and video play device
US11128874B2 (en) 2016-08-30 2021-09-21 Huawei Technologies Co., Ltd. Motion compensating prediction method and device
WO2018041005A1 (en) * 2016-08-30 2018-03-08 华为技术有限公司 Motion compensation prediction method and device
CN107801039A (en) * 2016-08-30 2018-03-13 华为技术有限公司 Motion prediction compensation method and equipment
CN107801039B (en) * 2016-08-30 2020-04-14 华为技术有限公司 Motion compensation prediction method and device
EP3515076A4 (en) * 2016-09-30 2019-07-24 Huawei Technologies Co., Ltd. Motion compensation prediction method and device
US10779000B2 (en) 2016-09-30 2020-09-15 Huawei Technologies Co., Ltd. Motion-compensated prediction method and apparatus
CN107959855A (en) * 2016-10-16 2018-04-24 华为技术有限公司 Motion prediction compensation method and equipment
CN107959855B (en) * 2016-10-16 2020-02-14 华为技术有限公司 Motion compensated prediction method and apparatus
WO2018068747A1 (en) * 2016-10-16 2018-04-19 华为技术有限公司 Motion compensated prediction method and device
US10911767B2 (en) 2016-10-16 2021-02-02 Huawei Technologies Co., Ltd. Motion compensating prediction method and apparatus
TWI656788B (en) * 2016-12-14 2019-04-11 聯發科技股份有限公司 Method and apparatus for generating and encoding projection-based frame with 360-degree content represented by rectangular projection faces packed in viewport-based cube projection layout
KR101717602B1 (en) * 2016-12-21 2017-03-17 (주)지오시스템리서치 System for monitoring an ambient condition of an ocean facility
US11115680B2 (en) 2017-04-26 2021-09-07 Huawei Technologies Co., Ltd. Apparatuses and methods for encoding and decoding a panoramic video signal
WO2018199792A1 (en) * 2017-04-26 2018-11-01 Huawei Technologies Co., Ltd Apparatuses and methods for encoding and decoding a panoramic video signal
WO2018199793A1 (en) * 2017-04-27 2018-11-01 Huawei Technologies Co., Ltd Geodesic intra-prediction for panoramic video coding
US11109034B2 (en) 2017-07-20 2021-08-31 Canon Kabushiki Kaisha Image processing apparatus for alignment of images, control method for image processing apparatus, and storage medium
WO2019127484A1 (en) * 2017-12-29 2019-07-04 深圳市大疆创新科技有限公司 Video coding method, video decoding method, and related device
WO2023221929A1 (en) * 2022-05-19 2023-11-23 影石创新科技股份有限公司 Image display method and apparatus, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
JP6721065B2 (en) Imaging device, image processing device and method
JP2013046270A (en) Image connecting device, photographing device, image connecting method, and image processing program
US10789676B2 (en) Image processing device, image processing method, and program
JP5846549B1 (en) Image processing system, image processing method, program, imaging system, image generation apparatus, image generation method and program
US6389179B1 (en) Image combining apparatus using a combining algorithm selected based on an image sensing condition corresponding to each stored image
JP4760973B2 (en) Imaging apparatus and image processing method
WO2017088678A1 (en) Long-exposure panoramic image shooting apparatus and method
JP6157242B2 (en) Image processing apparatus and image processing method
JP2010088085A (en) Imaging apparatus, imaging method, and program
JP2010088084A (en) Imaging apparatus, imaging method, and program
JP7030442B2 (en) Image processing equipment, image processing methods, and programs
JP5846172B2 (en) Image processing apparatus, image processing method, program, and imaging system
JP5248951B2 (en) CAMERA DEVICE, IMAGE SHOOTING SUPPORT DEVICE, IMAGE SHOOTING SUPPORT METHOD, AND IMAGE SHOOTING SUPPORT PROGRAM
JP6222205B2 (en) Image processing device
JP5796611B2 (en) Image processing apparatus, image processing method, program, and imaging system
JP2019053758A (en) Image processing apparatus
JPH09322055A (en) Electronic camera system
JP7383911B2 (en) Imaging system, image processing device, imaging device and program
JP7306089B2 (en) Image processing system, imaging system, image processing device, imaging device, and program
JP6079838B2 (en) Image processing apparatus, program, image processing method, and imaging system
JP6439845B2 (en) Image processing device
JP7484242B2 (en) Image processing device, image processing method, imaging device, image processing system, and program
JP5166966B2 (en) Camera device, composite image creation support device, composite image creation support method, and composite image creation support program
JP2019009574A (en) Image processing apparatus
JP4803319B2 (en) Imaging apparatus, image processing method, and program

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20141104