JP2020039062A - Image processing apparatus, image processing method, and program - Google Patents

Image processing apparatus, image processing method, and program Download PDF

Info

Publication number
JP2020039062A
JP2020039062A JP2018165718A JP2018165718A JP2020039062A JP 2020039062 A JP2020039062 A JP 2020039062A JP 2018165718 A JP2018165718 A JP 2018165718A JP 2018165718 A JP2018165718 A JP 2018165718A JP 2020039062 A JP2020039062 A JP 2020039062A
Authority
JP
Japan
Prior art keywords
image
radius
virtual cylinder
images
focal length
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.)
Granted
Application number
JP2018165718A
Other languages
Japanese (ja)
Other versions
JP7106399B2 (en
Inventor
石橋 亨
Toru Ishibashi
亨 石橋
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 JP2018165718A priority Critical patent/JP7106399B2/en
Publication of JP2020039062A publication Critical patent/JP2020039062A/en
Application granted granted Critical
Publication of JP7106399B2 publication Critical patent/JP7106399B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To allow for generation of a composite image in which an angle of view according to a focal length of a photographing lens is maintained, when a plurality of photographed images are converted to cylindrical coordinates and composited.SOLUTION: The image processing apparatus includes: acquiring means (116) acquiring a plurality of images photographed in such a manner that the image include common areas in adjacent photographing directions while changing the photographing direction sequentially; determining means (123) determining a radius of a virtual cylinder; conversion means (116e) converting each of the images into an image projected on a virtual cylinder by cylindrical coordinate conversion; detecting means (116c) detecting an amount of movement between adjacent photographing directions; positioning means (116d) positioning each image obtained by performing the cylindrical coordinate conversion on the basis of the movement amount; and compositing means (116j) superimposing the common areas of the positioned images and compositing the images so as to sequentially connect the images to each other. A radius of the virtual cylinder is determined to be larger than a focal length of a photographing lens of an imaging apparatus.SELECTED DRAWING: Figure 1

Description

本発明は、撮影された複数の画像を合成する画像処理技術に関する。   The present invention relates to an image processing technique for combining a plurality of captured images.

従来、撮像装置の撮影方向を順次変更しつつ隣接する撮影方向で互いに共通領域が写るようにして複数の画像を撮像し、隣接する画像同士の共通領域を順次重ね合わせて合成することで、広い撮影範囲の画像を生成する技術(特許文献1参照)が知られている。
一方、複数の画像を合成して広い撮影範囲の画像を生成する場合、撮影方式に応じて適切な合成処理方式を設定することが重要であり、特に、特許文献2には、撮影焦点距離を半径とする仮想円筒面上に円筒座標変換を行う技術が開示されている。
Conventionally, a plurality of images are captured in such a manner that a common region is captured in adjacent imaging directions while sequentially changing the imaging direction of an imaging device, and the common regions of adjacent images are sequentially superimposed and synthesized to create a wide area. 2. Description of the Related Art A technique for generating an image of a shooting range (see Patent Document 1) is known.
On the other hand, when a plurality of images are combined to generate an image with a wide shooting range, it is important to set an appropriate synthesis processing method according to the shooting method. A technique for performing cylindrical coordinate conversion on a virtual cylindrical surface having a radius is disclosed.

特開2005−328497号公報JP 2005-328497 A 特開平11−331696号公報JP-A-11-331696

しかしながら円筒座標変換では、焦点距離が長いレンズよりも焦点距離が短い広角レンズほど、画像中心からの変換量が大きくなる。このため、撮影レンズとして広角レンズを用いた場合、順次撮影された複数の画像のうち、特に1枚目と最後に撮影した画像で使用できる部分が少なくなり、最終的に生成される合成画像の有効高さが狭くなるという問題がある。   However, in the cylindrical coordinate conversion, the conversion amount from the center of the image is larger for a wide-angle lens having a shorter focal length than a lens having a longer focal length. For this reason, when a wide-angle lens is used as a photographing lens, a portion that can be used in the first and last photographed images among a plurality of sequentially photographed images is reduced, and a composite image finally generated is reduced. There is a problem that the effective height becomes narrow.

そこで、本発明は、撮影された複数の画像を円筒座標変換して合成する場合に、撮影レンズの焦点距離に応じた画角を維持した合成画像を生成可能にすることを目的とする。   In view of the above, an object of the present invention is to make it possible to generate a combined image that maintains an angle of view corresponding to the focal length of a photographing lens when a plurality of photographed images are converted by cylindrical coordinates and combined.

本発明の画像処理装置は、撮像装置の撮影方向を順次変更しつつ隣接する撮影方向で共通領域を含むように撮影された複数の画像を取得する取得手段と、仮想円筒の半径を決定する決定手段と、前記複数の各画像を、前記仮想円筒に投影された画像に円筒座標変換する変換手段と、隣接する撮影方向間の移動量を検出する検出手段と、前記検出された移動量に基づいて、前記円筒座標変換された各画像の位置合わせを行う位置合わせ手段と、前記位置合わせが行われた各画像の前記共通領域を重ね合わせて各画像を順次つなぐように合成する合成手段と、を有し、前記決定手段は、前記仮想円筒の半径を前記撮像装置が有する撮影レンズの焦点距離よりも大きい半径に決定することを特徴とする。   The image processing apparatus according to the present invention includes: an acquiring unit configured to acquire a plurality of images photographed so as to include a common area in an adjacent photographing direction while sequentially changing a photographing direction of the image capturing apparatus; and determining a radius of a virtual cylinder. Means, a conversion means for converting the plurality of images into cylindrical coordinates converted to an image projected on the virtual cylinder, a detection means for detecting a movement amount between adjacent photographing directions, and based on the detected movement amount. Positioning means for performing positioning of each image subjected to the cylindrical coordinate conversion, and combining means for combining the images so as to sequentially connect the images by superimposing the common area of each of the images subjected to the positioning, Wherein the determining means determines a radius of the virtual cylinder to be larger than a focal length of a photographing lens of the imaging device.

本発明によれば、撮影された複数の画像を円筒座標変換して合成する場合に、撮影レンズの焦点距離に応じた画角を維持した合成画像を生成可能となる。   According to the present invention, when a plurality of captured images are converted into cylindrical coordinates and combined, it is possible to generate a combined image that maintains an angle of view corresponding to the focal length of the taking lens.

実施形態の撮像装置の一構成例を示すブロック図である。FIG. 1 is a block diagram illustrating a configuration example of an imaging device according to an embodiment. パノラマ撮影の概念の説明図である。It is explanatory drawing of the concept of panorama imaging | photography. 焦点距離と有効高さとの関係を示した図である。FIG. 3 is a diagram illustrating a relationship between a focal length and an effective height. 焦点距離による円筒座標変換結果と合成結果の違いの説明図である。FIG. 9 is an explanatory diagram of a difference between a cylindrical coordinate conversion result and a synthesis result depending on a focal length. 撮影時の撮像装置の基本動作フローチャートである。6 is a flowchart of a basic operation of the imaging apparatus at the time of shooting. 第1の実施形態に係るパノラマ撮影の処理フローチャートである。5 is a flowchart of a panoramic image capturing process according to the first embodiment. パノラマ撮影時のデータフローダイアグラムである。It is a data flow diagram at the time of panorama photography. 第2の実施形態に係るパノラマ撮影の処理フローチャートである。It is a processing flowchart of panoramic imaging according to the second embodiment.

以下、本発明の好ましい実施の形態を、添付の図面に基づいて詳細に説明する。
<第1の実施形態>
図1は、第1の実施形態に係る画像処理装置の一適用例としての撮像装置の概略構成を示すブロック図である。本実施形態の撮像装置は、様々な撮影機能を備えており、その一つとしてパノラマ撮影機能をも備えた、例えばデジタルカメラである。
図1に示した撮像装置の詳細な構成について説明する前に、以下の図2(a)および図2(b)から図4までを用いて、パノラマ撮影について説明する。
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
<First embodiment>
FIG. 1 is a block diagram illustrating a schematic configuration of an imaging device as an application example of the image processing device according to the first embodiment. The imaging apparatus according to the present embodiment has various photographing functions, and for example, is a digital camera having a panoramic photographing function as one of them.
Before describing the detailed configuration of the imaging apparatus shown in FIG. 1, panoramic shooting will be described with reference to FIGS. 2A and 2B to FIG.

パノラマ撮影では、撮像装置の撮影方向を所望の方向(水平方向や垂直方向など)に順次変更しながら、全景のそれぞれ一部を構成する複数の画像を順番に連続的に撮影(いわゆる流し撮り連写のように撮影)することが行われる。つまりパノラマ撮影の際には、レリーズボタンを押した状態で撮像装置の撮影方向を所望の方向に移動させるようになされ、撮像装置では、レリーズボタンが押された状態が続いている間、連写撮影のように所定の時間毎に自動的な撮影を行う。またパノラマ撮影の際には、撮影方向を順次変更する所望の方向において隣接した撮影画角(隣接した撮影方向)内で、互いに一部の領域(共通領域とする。)が重複して写るように各画像が撮影される。なおパノラマ撮影において撮影方向を順次変更する際の所望の方向は、一般的には地面等と平行な水平方向となされるが、垂直方向(重力方向)等の他の方向になされる場合もある。本実施形態の説明では、撮影方向を順次変更する所望の方向が、一般的な水平方向となされた場合のパノラマ撮影を一例として挙げている。また撮像装置は、パノラマ撮影により取得した複数の画像に対し、後述するように、それぞれ歪曲等の補正処理と円筒座標変換処理を行い、さらに円筒座標変換後の画像の共通領域を重ね合わせるような合成処理を行ってパノラマ画像を生成する。本実施形態の撮像装置では、このようなパノラマ撮影機能によって、撮影レンズの画角よりも広い全景の撮影範囲のパノラマ画像を生成可能となされている。   In the panoramic shooting, a plurality of images constituting a part of the whole scene are sequentially and sequentially shot while sequentially changing the shooting direction of the imaging device to a desired direction (horizontal direction, vertical direction, or the like) (so-called panning shot sequence). Photo-taking). In other words, during panoramic shooting, the shooting direction of the imaging device is moved in a desired direction while the release button is pressed. In the imaging device, continuous shooting is performed while the release button is being pressed. Automatic photographing is performed at predetermined time intervals like photographing. Also, in panoramic shooting, some areas (common areas) overlap each other within adjacent shooting angles of view (adjacent shooting directions) in a desired direction in which the shooting direction is sequentially changed. Each image is taken. The desired direction when the photographing direction is sequentially changed in panoramic photographing is generally a horizontal direction parallel to the ground or the like, but may be another direction such as a vertical direction (gravity direction). . In the description of the present embodiment, panoramic imaging in which the desired direction in which the imaging direction is sequentially changed is a general horizontal direction is taken as an example. Further, as described later, the imaging apparatus performs a distortion correction process and a cylindrical coordinate conversion process on a plurality of images acquired by panoramic shooting, and further superimposes a common area of the images after the cylindrical coordinate conversion. A panorama image is generated by performing a combining process. The imaging apparatus of the present embodiment can generate a panoramic image of the entire shooting range wider than the angle of view of the shooting lens by such a panorama shooting function.

図2(a)は、パノラマ撮影時において、撮像装置201の撮影方向を所望の方向に順次変更している様子を概略的に示した図である。図2(a)に示すように、パノラマ撮影時には、例えばユーザ200が回転の中心となって、撮像装置201の撮影方向を矢印210に示す所望の方向に順次変更する。なお、撮影方向の変更は、例えば雲台に撮像装置201を設置し、その雲台を水平方向等に回転駆動することにより行われてもよい。以下の説明では、ユーザ(又は雲台)を回転の中心として撮像装置の撮影方向を順次変更することを「スイング」と呼ぶことにする。そして、撮像装置201は、スイングにより所望の方向に変更された撮影方向毎に、それぞれ隣接する撮影画角内で互いに一部の領域(共通領域)が重複して写るようにして複数の画像を撮影する。これにより、撮像装置201により順次取得された各画像は、スイングの方向において隣接する画像同士でそれぞれ共通領域を有する画像となる。その後、撮像装置201は、それら各画像に対して歪曲補正と円筒座標変換処理を行い、円筒座標変換後の隣接する画像同士の共通領域を重ね合わせるようにして各画像を合成することによりパノラマ画像を生成する。言い換えると、パノラマ画像の合成処理は、スイングの方向において隣接する各画像から、スイング時の回転角度に応じてそれぞれ中心付近の部分画像を切り出し、それら切り出した部分画像を繋ぐような合成処理となっている。   FIG. 2A is a diagram schematically illustrating a state in which the imaging direction of the imaging device 201 is sequentially changed to a desired direction during panoramic imaging. As shown in FIG. 2A, at the time of panoramic shooting, for example, the user 200 sequentially changes the shooting direction of the imaging device 201 to a desired direction indicated by an arrow 210 as a center of rotation. The imaging direction may be changed by, for example, installing the imaging device 201 on a camera platform and rotating the camera platform in a horizontal direction or the like. In the following description, sequentially changing the shooting direction of the imaging device with the user (or pan head) as the center of rotation will be referred to as “swing”. Then, the imaging apparatus 201 captures a plurality of images in such a manner that some areas (common areas) are overlapped with each other within the adjacent imaging angle of view for each imaging direction changed to a desired direction by the swing. Shoot. Thereby, each image sequentially acquired by the imaging device 201 becomes an image having a common area between adjacent images in the swing direction. After that, the imaging apparatus 201 performs distortion correction and cylindrical coordinate conversion processing on each of the images, and combines the images so that the common area between adjacent images after the cylindrical coordinate conversion is overlapped to synthesize a panoramic image. Generate In other words, the synthesizing process of the panoramic image is a synthesizing process in which, from each image adjacent in the direction of the swing, partial images near the center are cut out in accordance with the rotation angle at the time of the swing, and the cut-out partial images are connected. ing.

図2(b)は、パノラマ撮影の対象となされた全景220と、撮像装置201をスイングさせて撮影された2枚の隣接した画像221,222と、それら2枚の画像221,222を共通領域で重ね合わせて合成した合成結果画像223の一例を示している。なお図2(b)の例では、パノラマ撮影の際の1枚目の画像221と、その画像221の次に撮影された2枚目の画像222のみを示している。画像221と画像222にはそれぞれ共通領域が含まれており、パノラマ画像の合成時には、それらの共通領域を重ね合わせて繋ぎ合わせるような合成が行われることにより、合成結果画像223が生成される。図2(b)の全景220のパノラマ画像を生成する場合には、前述同様にして全景220をカバーできる複数の各画像が撮影され、隣接する各画像同士の共通領域を順次重ね合わせて繋ぐような合成処理が行われる。   FIG. 2B illustrates a panoramic view of the entire scene 220, two adjacent images 221 and 222 taken by swinging the imaging device 201, and the two images 221 and 222. 9 shows an example of a synthesis result image 223 obtained by superimposing and synthesizing. Note that, in the example of FIG. 2B, only the first image 221 at the time of panoramic shooting and the second image 222 taken after the image 221 are shown. The image 221 and the image 222 each include a common area. When synthesizing a panoramic image, the synthesis is performed such that the common areas are overlapped and connected, thereby generating a synthesis result image 223. In the case of generating the panoramic image of the entire view 220 in FIG. 2B, a plurality of images that can cover the entire view 220 are captured in the same manner as described above, and the common areas of the adjacent images are sequentially overlapped and connected. Is performed.

またパノラマ画像の生成の際には、各画像の合成処理に先立ち、各画像に対して、撮像装置の撮影レンズの歪曲等を補正する処理と、撮影レンズの焦点距離に応じた半径の仮想円筒上にマッピングするような円筒座標変換処理とが行われる。さらに円筒座標変換後の各画像について、スイングの方向において隣接する各画像の共通領域から特徴点を抽出し、その特徴点がどのくらい動いたかを表す移動ベクトルの検出が行われる。移動ベクトルは、水平成分(X成分、横方向成分)と垂直成分(Y成分、縦方向成分)とを含み、パノラマ撮影で取得された隣接画像同士の位置を一致させるための位置合わせパラメータとして検出される。そして、移動ベクトルからは例えばアフィン変換の係数が算出され、パノラマ画像の生成時には、そのアフィン変換係数を基に、特徴点が一致するように隣接画像同士の共通領域を重ね合わせるような合成処理が行われる。   In addition, when generating a panoramic image, prior to the synthesizing process of each image, a process of correcting distortion or the like of a photographing lens of an imaging device is performed on each image, and a virtual cylinder having a radius corresponding to the focal length of the photographing lens. A cylindrical coordinate conversion process such as mapping above is performed. Further, for each image after the cylindrical coordinate conversion, a feature point is extracted from a common area of each image adjacent in the direction of the swing, and a movement vector indicating how much the feature point has moved is detected. The movement vector includes a horizontal component (X component, horizontal component) and a vertical component (Y component, vertical component), and is detected as a positioning parameter for matching the positions of adjacent images acquired by panoramic shooting. Is done. Then, for example, a coefficient of an affine transformation is calculated from the movement vector, and at the time of generating a panoramic image, a synthesizing process is performed based on the affine transformation coefficient such that common areas of adjacent images are overlapped so that feature points match. Done.

以下、円筒座標変換について詳細に説明する。
円筒座標変換では、円筒変換パラメータの一つとして仮想円筒の半径が用いられる。円筒座標変換における仮想円筒の半径は、撮像装置が有する撮影レンズの焦点距離に対応した半径にすることが好ましい。このため、撮影レンズの焦点距離が短くなるほど、つまり広角レンズであるほど、仮想円筒の半径は小さくなる。
Hereinafter, the cylindrical coordinate conversion will be described in detail.
In the cylindrical coordinate conversion, the radius of the virtual cylinder is used as one of the cylindrical conversion parameters. It is preferable that the radius of the virtual cylinder in the cylindrical coordinate conversion be a radius corresponding to the focal length of the imaging lens of the imaging device. Therefore, the shorter the focal length of the taking lens, that is, the wider the lens, the smaller the radius of the virtual cylinder.

一般に、撮像された画像に対して撮影レンズの歪曲を補正する処理を行った後の着目点の座標(X,Y)は、円筒座標変換を行うことにより、仮想円筒上の座標(X・cosθ,Y・cosθ)へと投影される。つまり、円筒座標変換によって、撮像された画像は、仮想円筒上に投影した状態の画像に変換される。ここで、撮像装置が有する撮像素子の有効撮像エリア幅をw[mm]、撮影レンズの焦点距離をf[mm]とすると、画像中心と画像右端と角度θ[rad]との関係は、以下の式(1)で表される。   In general, the coordinates (X, Y) of a point of interest after performing processing for correcting distortion of a photographing lens on a captured image are converted to coordinates (X · cos θ) on a virtual cylinder by performing cylindrical coordinate conversion. , Y · cos θ). That is, the captured image is converted into an image projected on the virtual cylinder by the cylindrical coordinate conversion. Here, assuming that the effective imaging area width of the imaging device of the imaging device is w [mm] and the focal length of the imaging lens is f [mm], the relationship between the image center, the right end of the image, and the angle θ [rad] is as follows. Equation (1).

θ=arctan(w/2/f) 式(1)   θ = arctan (w / 2 / f) Equation (1)

また撮像素子の1画素のサイズ(画素ピッチ)をp[μm]、高さ方向の画素数をh[pix(ピクセル)]とすると、画像の有効高さH[pix]は、式(2)のようになる。   Further, assuming that the size (pixel pitch) of one pixel of the image sensor is p [μm] and the number of pixels in the height direction is h [pix (pixel)], the effective height H [pix] of the image is represented by Expression (2). become that way.

H=(h/2)・cosθ 式(2)   H = (h / 2) · cos θ Equation (2)

すなわち例えば、焦点距離fが小さくなると角度θが大きくなり、したがって有効高さHは小さくなる。
具体例として、撮像装置の撮像素子のサイズが幅22.32mmで高さ14.88mmのいわゆるAPS−Cサイズであり、画素ピッチが3.72μm、画素数が6000×4000ピクセルであるとする。この例において、撮影レンズの焦点距離fが例えば11mmである場合、式(1)および式(2)から、有効高さHは2809ピクセルとなり、撮像素子の高さ(4000ピクセル)の約70%になる。また例えば、撮影レンズの焦点距離fが18mmである場合、有効高さHは3400ピクセルとなり、撮像素子の高さ(4000ピクセル)の約85%になる。図3には、焦点距離fを横軸とし、撮像素子の高さに対する有効高さの割合[%]を縦軸として、撮影レンズの焦点距離fと有効高さの割合との対応点をプロットしたグラフを示している。図3に示すように、撮影レンズの焦点距離fが短くなるほど、撮像素子の高さに対する有効高さの割合が減る。つまりこれは、撮影レンズの焦点距離が短い広角レンズになるほど、円筒座標変換における座標変換量が大きくなることを表している。そしてこのことは、撮影レンズが広角レンズであるほど、円筒座標変換後の画像として使える領域が小さくなってしまうことを意味している。一方で、パノラマ撮影を行う際、ユーザは、広い範囲を撮影しようとして画角が広い広角レンズ、つまり撮影レンズの焦点距離を短くして撮影を行おうとするが、この場合、逆に画像として使用できる有効高さが減ってしまうことになる。
That is, for example, as the focal length f decreases, the angle θ increases, and thus the effective height H decreases.
As a specific example, it is assumed that the size of the imaging device of the imaging device is a so-called APS-C size having a width of 22.32 mm and a height of 14.88 mm, a pixel pitch of 3.72 μm, and a number of pixels of 6000 × 4000 pixels. In this example, when the focal length f of the photographing lens is, for example, 11 mm, the effective height H is 2809 pixels from Equations (1) and (2), which is about 70% of the height (4000 pixels) of the image sensor. become. Further, for example, when the focal length f of the photographing lens is 18 mm, the effective height H is 3400 pixels, which is about 85% of the height (4000 pixels) of the image sensor. FIG. 3 plots the corresponding point between the focal length f of the imaging lens and the ratio of the effective height, with the horizontal axis representing the focal length f and the vertical axis representing the ratio [%] of the effective height to the height of the image sensor. FIG. As shown in FIG. 3, as the focal length f of the photographing lens becomes shorter, the ratio of the effective height to the height of the image sensor decreases. In other words, this means that as the focal length of the photographing lens becomes shorter, the amount of coordinate conversion in the cylindrical coordinate conversion becomes larger. This means that the area that can be used as an image after cylindrical coordinate conversion becomes smaller as the shooting lens is a wide-angle lens. On the other hand, when performing panoramic shooting, the user attempts to shoot a wide-angle lens with a wide angle of view, that is, a short shooting distance with the focal length of the shooting lens, in order to shoot a wide range. The available effective height will be reduced.

図4は、撮影レンズの焦点距離によって有効高さが変化し、パノラマ画像の高さ方向の大きさ(有効高さ)が変わる一例を示した図である。図4において、円筒座標変換前の元画像400に対し、例えば撮影レンズの焦点距離fが18mmである場合には、仮想円筒の半径を18mmとして円筒座標変換が行われる。画像401は、仮想円筒の半径を18mmとして元画像400を円筒座標変換した後の画像を表している。また例えば、撮影レンズの焦点距離が11mmである場合には、元画像400に対して、仮想円筒の半径を11mmとして円筒座標変換が行われる。画像402は、仮想円筒の半径を11mmとして元画像400を円筒座標変換した後の画像を表している。これら二つの画像を比較して分かるように、仮想円筒の半径が18mmの場合の円筒座標変換後の画像401よりも、仮想円筒の半径が短い11mmの場合の円筒座標変換後の画像402の方が、高さ方向において大きく変形(湾曲)した画像となる。このため、画像402は、画像401よりも、高さ方向において合成時に使用できる領域が小さくなる。すなわち、仮想円筒の半径を11mmとして円筒座標変換した複数の画像402を合成したパノラマ画像405は、仮想円筒の半径を18mmとして円筒座標変換した各画像401を合成したパノラマ画像404よりも有効高さが小さい画像になってしまう。   FIG. 4 is a diagram illustrating an example in which the effective height changes according to the focal length of the photographing lens, and the size (effective height) of the panoramic image in the height direction changes. In FIG. 4, when the focal length f of the photographing lens is 18 mm, for example, the radius of the virtual cylinder is changed to 18 mm with respect to the original image 400 before the cylindrical coordinate conversion. An image 401 represents an image obtained by converting the original image 400 into a cylindrical coordinate with the radius of the virtual cylinder being 18 mm. For example, when the focal length of the taking lens is 11 mm, cylindrical coordinate conversion is performed on the original image 400 with the radius of the virtual cylinder set to 11 mm. An image 402 represents an image obtained by converting the original image 400 into a cylindrical coordinate with the radius of the virtual cylinder being 11 mm. As can be seen by comparing these two images, the image 402 after the cylindrical coordinate conversion when the radius of the virtual cylinder is 11 mm is shorter than the image 401 after the cylindrical coordinate conversion when the radius of the virtual cylinder is 18 mm. However, an image is greatly deformed (curved) in the height direction. Therefore, the image 402 has a smaller area that can be used at the time of composition in the height direction than the image 401. That is, the panoramic image 405 obtained by combining the plurality of images 402 obtained by performing the cylindrical coordinate conversion with the radius of the virtual cylinder being 11 mm is more effective height than the panoramic image 404 obtained by combining the respective images 401 obtained by performing the cylindrical coordinate conversion with the virtual cylinder having a radius of 18 mm. Becomes a small image.

そこで、本実施形態の撮像装置は、撮影レンズの焦点距離より仮想円筒の半径を大きくして円筒座標変換を行い、焦点距離を仮想円筒の半径とした円筒座標変換よりも、有効高さを大きくすることを可能としている。本実施形態では、少なくとも、撮像装置がスイングされてパノラマ撮影を行った際の隣接する撮像方向間の移動量と、撮影レンズの焦点距離とに基づいて、仮想円筒の半径を決定する。なお、隣接撮影方向間の移動量は、例えば角速度センサからの情報を基に算出してもよいし、撮影された各画像から算出してもよい。隣接撮影方向間の移動量を、角速度センサの情報を基に算出する場合、または、撮影された画像を基に算出する場合の詳細については後述する。   Therefore, the imaging apparatus of the present embodiment performs the cylindrical coordinate conversion by increasing the radius of the virtual cylinder from the focal length of the photographing lens, and increases the effective height as compared with the cylindrical coordinate conversion in which the focal length is the radius of the virtual cylinder. It is possible to do. In the present embodiment, the radius of the virtual cylinder is determined based on at least the amount of movement between adjacent imaging directions when the imaging apparatus is swung to perform panoramic imaging and the focal length of the imaging lens. The movement amount between the adjacent photographing directions may be calculated based on information from an angular velocity sensor, for example, or may be calculated from each photographed image. Details of the case where the movement amount between the adjacent photographing directions is calculated based on the information of the angular velocity sensor or the case where it is calculated based on the photographed image will be described later.

以下、パノラマ撮影の際の隣接撮影方向間の移動量と撮影レンズの焦点距離とに基づく仮想円筒の半径の算出処理について説明する。
パノラマ撮影の際には、図2(a)で説明したように、ユーザ200等を中心として回転するように撮像装置201をスイングさせて撮像方向を順次変更しつつ、連写のように連続的な画像撮影が行われる。そして、パノラマ画像は、パノラマ撮影で取得された各画像から、隣接する撮影方向間におけるスイング時の回転の角度βに応じて各画像の中心付近の部分画像を切り出して順次合成することにより生成される。ここで、撮像素子の1画素のサイズが例えばp[μm]であり、前述した移動ベクトルのX方向の成分(大きさ)がx[pix]、仮想円筒の半径がR[mm]であるとすると、角度βは、式(3)により表される。
Hereinafter, a process of calculating the radius of the virtual cylinder based on the amount of movement between adjacent shooting directions and the focal length of the shooting lens during panoramic shooting will be described.
At the time of panoramic shooting, as described with reference to FIG. 2A, the imaging device 201 is swung so as to rotate around the user 200 and the like, and the imaging direction is sequentially changed, and continuous imaging such as continuous shooting is performed. Image taking is performed. Then, the panoramic image is generated by cutting out partial images near the center of each image in accordance with the rotation angle β during the swing between the adjacent photographing directions from each image acquired in the panoramic shooting and sequentially combining them. You. Here, it is assumed that the size of one pixel of the image sensor is, for example, p [μm], the component (size) of the movement vector in the X direction is x [pix], and the radius of the virtual cylinder is R [mm]. Then, the angle β is represented by Expression (3).

β=arctan(x・p/R/1000) 式(3)   β = arctan (x · p / R / 1000) Equation (3)

したがって、パノラマ画像の合成に使用される部分画像における有効高さH[pix]は、式(4)で表される。   Therefore, the effective height H [pix] in the partial image used for synthesizing the panoramic image is represented by Expression (4).

H=(h/2)・cos{arctan(x・p/R/1000)} 式(4)   H = (h / 2) · cos {arctan (x · p / R / 1000)} Equation (4)

また本実施形態では、例えば、仮想円筒の半径Rを焦点距離fと同じにした場合と、仮想円筒の半径Rを焦点距離fより大きくした場合とで、部分画像の有効高さが実質的に変わらない場合に、仮想円筒の半径Rを焦点距離fとは異なる値に変更可能とする。本実施形態では、隣接する画像の境界部分で位置ずれが無いか、もしくは気にならない程度に少ない場合に、部分画像の有効高さが実質的に変わらないとする。例えば、合成後のパノラマ画像を等倍で出力するならば、境界部分での位置ずれが例えば0.5〜1ピクセル程度未満である場合に、部分画像の有効高さが実質的に変わらないとする。また例えば、パノラマ画像を縮小して出力するならば、縮小後において境界部分での位置ずれが0.5〜1ピクセル程度未満である場合に、部分画像の有効高さが実質的に変わらないとする。なお、これらの数値は一例であり、適宜変更可能である。   In the present embodiment, for example, the effective height of the partial image is substantially the same when the radius R of the virtual cylinder is equal to the focal length f and when the radius R of the virtual cylinder is larger than the focal length f. If not changed, the radius R of the virtual cylinder can be changed to a value different from the focal length f. In the present embodiment, it is assumed that the effective height of the partial image does not substantially change when there is no positional deviation at the boundary portion between the adjacent images or when the positional deviation is small enough to be unnoticeable. For example, if the combined panoramic image is output at the same magnification, the effective height of the partial image must be substantially unchanged when the displacement at the boundary is, for example, less than about 0.5 to 1 pixel. I do. Also, for example, if the panoramic image is reduced and output, if the displacement at the boundary after the reduction is less than about 0.5 to 1 pixel, the effective height of the partial image does not substantially change. I do. Note that these numerical values are merely examples, and can be changed as appropriate.

本実施形態では、撮像素子の高さ方向の画素数をh[pix]、画素ピッチをp[μm]、仮想円筒の半径をR[mm]、焦点距離をf[mm]、移動ベクトルのX成分をx[pix]とした場合、式(5)と式(6)との差を基に判断する。すなわち式(5)の演算値と式(6)の演算値との差が、所定の閾値未満(例えば1ピクセル未満)である場合に、部分画像の有効高さが実質的に変わらないとする。   In the present embodiment, the number of pixels in the height direction of the image sensor is h [pix], the pixel pitch is p [μm], the radius of the virtual cylinder is R [mm], the focal length is f [mm], and the movement vector X is When the component is x [pix], the determination is made based on the difference between Expressions (5) and (6). That is, when the difference between the calculated value of Expression (5) and the calculated value of Expression (6) is less than a predetermined threshold (for example, less than one pixel), it is assumed that the effective height of the partial image does not substantially change. .

(h/2)・x・cos{arctan(x・p/R/1000)/2} 式(5)
(h/2)・x・cos{arctan(x・p/f/1000)/2} 式(6)
(h / 2) · x · cos {arctan (x · p / R / 1000) / 2} Equation (5)
(h / 2) · x · cos {arctan (x · p / f / 1000) / 2} Equation (6)

また前述の例では撮像素子の高さ方向の画素数をhピクセルとしたが、撮影時にはいわゆる手ぶれも発生するため、その手ぶれ分を考慮して、実際にはhピクセル全てが使用されることは少ない。すなわち、手ぶれによる移動分が撮像素子の高さ方向に対して例えば10%〜30%程度になると想定した場合、実際のパノラマ画像は、撮像素子の高さ方向の画素数hに対して例えば90%〜70%となるような高さにトリミングされて生成される。したがって、手ぶれ分を予め考慮して、式(5)と式(6)におけるhは、撮像素子の高さ方向の画素数の90%〜70%として用いてもよい。   In the above-described example, the number of pixels in the height direction of the image sensor is set to h pixels. However, since so-called camera shake also occurs at the time of shooting, it is difficult to use all the h pixels in consideration of the camera shake. Few. That is, assuming that the amount of movement due to camera shake is, for example, about 10% to 30% with respect to the height direction of the image sensor, the actual panoramic image is, for example, 90 pixels with respect to the number h of pixels in the height direction of the image sensor. % To 70%. Therefore, h in Expressions (5) and (6) may be used as 90% to 70% of the number of pixels in the height direction of the image sensor in consideration of camera shake in advance.

一例として、撮像素子の画素数が6000×4000ピクセル、1画素のサイズが3.72μm、手ぶれによる移動分が撮像素子上で20%程度、スイングによる隣接撮影方向間の移動量が画素数換算で145ピクセル相当であるとする。この場合、手ぶれ分を考慮した有効高さの画素数EP[pix]は、式(7)により表される。   As an example, the number of pixels of the image sensor is 6000 × 4000 pixels, the size of each pixel is 3.72 μm, the amount of movement due to camera shake is about 20% on the image sensor, and the amount of movement between adjacent shooting directions due to swing is calculated as the number of pixels. Assume that it is equivalent to 145 pixels. In this case, the number of pixels EP [pix] of the effective height in consideration of the camera shake is expressed by Expression (7).

EP=4000/2×0.8・cos{arctan(145・3.72/R/1000)} 式(7)   EP = 4000/2 × 0.8 · cos {arctan (145 · 3.72 / R / 1000)} formula (7)

そしてこの時、仮想円筒の半径Rが例えば11mmの場合と14mmの場合とでは、それぞれの有効高さの差が0.8ピクセルとなり、前述した閾値未満(1ピクセル未満)となる。したがってこの場合、焦点距離fが11mmで撮影されていたとしても、仮想円筒の半径を14mmとした円筒座標変換を行っても問題ないことになる。   At this time, when the radius R of the virtual cylinder is, for example, 11 mm or 14 mm, the difference between the effective heights is 0.8 pixels, which is less than the above-described threshold (less than 1 pixel). Therefore, in this case, even if the image is photographed at the focal length f of 11 mm, there is no problem even if the cylindrical coordinate conversion with the radius of the virtual cylinder is 14 mm.

しかしながら、例えばスイングの速度が速くなり、隣接撮影方向間の移動量が画素数換算で前述した145ピクセルの2倍の290ピクセル相当になった場合、仮想円筒の半径Rが11mmの場合と14mmの場合とで有効高さの差は3.3ピクセルとなる。つまりこの時の有効高さの差(3.3ピクセル)は閾値(例えば1ピクセル)より大きくなる。この場合、パノラマ画像の合成を行うと、各画像の境界部分が段差となって見えてしまうようになる。したがって、パノラマ撮影時のスイングの速度が速く、隣接する撮影方向間での移動量が大きい場合には、仮想円筒の半径を変更しないようにするか、もしくは半径の変化量を小さくすることが必要となる。なお、パノラマ撮影を行う場合において、撮影開始前は撮像装置をスイングさせておらず、撮影開始直後から撮像装置のスイングが開始される。つまり、パノラマ撮影の開始時にはスイング速度が遅いため、前述のような有効高さの差が大きくなる問題が生ずることは略々ないと考えられる。   However, for example, when the speed of the swing is increased and the movement amount between the adjacent photographing directions is equivalent to 290 pixels which is twice the above-described 145 pixels in terms of the number of pixels, the case where the radius R of the virtual cylinder is 11 mm and the case where the radius R of the virtual cylinder is 14 mm The difference between the effective heights is 3.3 pixels. That is, the difference in effective height (3.3 pixels) at this time is larger than the threshold value (for example, 1 pixel). In this case, when the panoramic images are combined, the boundary between the images becomes visible as a step. Therefore, if the swing speed during panoramic shooting is high and the amount of movement between adjacent shooting directions is large, it is necessary to keep the radius of the virtual cylinder unchanged or to reduce the amount of change in radius. Becomes When performing panoramic imaging, the imaging device is not swung before the start of imaging, and the imaging device starts swinging immediately after the start of imaging. That is, since the swing speed is slow at the start of the panoramic shooting, it is considered that the problem that the difference between the effective heights becomes large as described above hardly occurs.

これに対し、パノラマ撮影の開始後、徐々にスイングの速度が速くなってくると前述した有効高さの差の問題が顕著になる。このため、本実施形態では、隣接する撮影方向間における移動量、つまりスイングの速度に応じて、円筒座標変換時の仮想円筒の半径を変えていくようにする。例えば焦点距離が11mmの撮影レンズで撮影した場合、撮影開始直後でスイング速度が遅い時の1枚目の画像の円筒座標変換時には仮想円筒の半径を15mmとし、2枚目では半径を13mm、3枚目以降では半径を11mmとするように半径を変える。こうすることで、撮影開始後にスイング速度が速くなったころには、仮想円筒の半径を撮影レンズの焦点距離と同じ値に戻せるため、スイングの速度に影響されることがなくなる。   On the other hand, if the speed of the swing gradually increases after the start of the panorama shooting, the above-described problem of the difference in the effective height becomes remarkable. For this reason, in the present embodiment, the radius of the virtual cylinder at the time of cylindrical coordinate conversion is changed according to the amount of movement between adjacent photographing directions, that is, the speed of the swing. For example, when shooting with a shooting lens having a focal length of 11 mm, the radius of the virtual cylinder is set to 15 mm at the time of cylindrical coordinate conversion of the first image when the swing speed is low immediately after the start of shooting, and the radius is set to 13 mm for the second image. After the first sheet, the radius is changed so that the radius is 11 mm. By doing so, when the swing speed increases after the start of shooting, the radius of the virtual cylinder can be returned to the same value as the focal length of the shooting lens, so that it is not affected by the swing speed.

また、パノラマ撮影を終了させる際にも前述同様に、スイングの速度に応じて仮想円筒の半径を変えるようにすることが望ましい。つまりパノラマ撮影を終了させる際には、スイング速度が遅くなっていくことになる。このため例えば、焦点距離が11mmの撮影レンズで撮影した場合、パノラマ撮影を終了させるためにスイングの速度が遅くなるにつれて、仮想円筒の半径を11mm、13mmのように順に大きくする。そして、パノラマ撮影時の最後の画像については、仮想円筒の半径を例えば15mmにするようなことを行う。   Also, when ending panoramic photography, it is desirable to change the radius of the virtual cylinder according to the swing speed, as described above. That is, when ending the panoramic shooting, the swing speed becomes slow. For this reason, for example, when shooting is performed with a shooting lens having a focal length of 11 mm, the radius of the virtual cylinder is gradually increased to 11 mm and 13 mm as the swing speed decreases to end panoramic shooting. Then, for the last image at the time of panorama shooting, the radius of the virtual cylinder is set to, for example, 15 mm.

本実施形態では、前述したように、仮想円筒の半径を可変とし、1枚目に撮影した画像と最後に撮影した画像については半径を大きくして画像の有効高さを増やすことにより、パノラマ画像の有効高さが減ってしまうことを防止可能となる。パノラマ撮影において開始時と終了時以外の撮影途中の画像については、撮影レンズの焦点距離を仮想円筒の半径にする。   In the present embodiment, as described above, the radius of the virtual cylinder is variable, and the radius of the first and last shot images is increased to increase the effective height of the panorama image. Can be prevented from being reduced in the effective height. For images in the middle of shooting other than at the start and end of panoramic shooting, the focal length of the shooting lens is set to the radius of the virtual cylinder.

また、前述したような有効高さの減少が顕著になるのは、前述の図3に示したように、焦点距離(仮想円筒の半径)が概ね20mm程度以下になる場合である。そのため、焦点距離に対する閾値を予め用意しておき、その閾値よりも焦点距離が短い広角レンズでの撮影が行われる場合にのみ、本実施形態の手法を適用するようにしてもよい。また、閾値よりもさらに焦点距離が短い超広角側と広角側、もしくは閾値付近などで、仮想円筒の半径を大きくして、座標変換量を少なくするようなことも好ましい様態のひとつである。   Further, the decrease in the effective height as described above becomes remarkable when the focal length (the radius of the virtual cylinder) is about 20 mm or less as shown in FIG. Therefore, a threshold value for the focal length may be prepared in advance, and the method according to the present embodiment may be applied only when photographing is performed with a wide-angle lens having a focal length shorter than the threshold value. Also, it is one of the preferable modes to increase the radius of the virtual cylinder on the ultra-wide-angle side and the wide-angle side where the focal length is shorter than the threshold value, or to reduce the coordinate conversion amount near the threshold value.

以下、図1に示した本実施形態の撮像装置の構成について説明する。
図1において、撮影レンズ101は、フォーカスレンズやズームレンズを有し、被写体等の光学像を撮像センサ112の撮像面上に結像させる。撮影レンズ101は、撮像装置本体に着脱可能な交換レンズであってもよいし、撮像装置に固定されたレンズであってもよい。絞り103は、絞り駆動回路104により駆動され、撮影レンズ101を介した入射光量の調節を行う。絞り駆動回路104は、マイクロコンピュータ(以下、マイコンとする。)123により算出された絞り駆動量を基に、絞り103における光学的な絞り値を変化させる。AF(オートフォーカス)駆動回路102は、例えばDCモータやステッピングモータを有して構成され、マイコン123からのフォーカス制御信号を基に、撮影レンズ101のフォーカスレンズを駆動してピント合わせを行う。
Hereinafter, the configuration of the imaging apparatus of the present embodiment illustrated in FIG. 1 will be described.
In FIG. 1, a photographing lens 101 has a focus lens and a zoom lens, and forms an optical image of a subject or the like on an imaging surface of an imaging sensor 112. The taking lens 101 may be an interchangeable lens that can be attached to and detached from the imaging device main body, or may be a lens fixed to the imaging device. The diaphragm 103 is driven by a diaphragm driving circuit 104 to adjust the amount of incident light via the photographing lens 101. The aperture drive circuit 104 changes the optical aperture value of the aperture 103 based on the aperture drive amount calculated by the microcomputer 123. The AF (autofocus) drive circuit 102 includes, for example, a DC motor and a stepping motor, and drives the focus lens of the photographing lens 101 to perform focusing based on a focus control signal from the microcomputer 123.

主ミラー105は、撮影レンズ101から入射した光束を、ファインダ部側と撮像センサ112側とに切り替えるためのミラーである。主ミラー105は、常時はファインダ部側へと光束を反射させるように配されているが、撮像が行われる場合やライブビュー表示がなされる場合には、撮影レンズ101からの光束が撮像センサ112へと入射するように、上方に跳ね上げられる。この主ミラー105を跳ね上げる等のミラー駆動は、マイコン123による制御の下、ミラー駆動回路107により行われる。また、主ミラー105は、その中央部が光の一部を透過できるようにハーフミラーとなされている。   The main mirror 105 is a mirror for switching a light beam incident from the photographing lens 101 between the finder unit side and the image sensor 112 side. The main mirror 105 is normally disposed so as to reflect the light beam toward the finder unit side. However, when an image is taken or a live view display is performed, the light beam from the photographing lens 101 is reflected by the image sensor 112. Is jumped upward so as to be incident on. The mirror driving such as flipping up the main mirror 105 is performed by the mirror driving circuit 107 under the control of the microcomputer 123. The main mirror 105 is a half mirror so that a central portion thereof can transmit a part of light.

ペンタプリズム108はファインダ部の一部を構成しており、撮影レンズ101から入射して主ミラー105により反射した光束を不図示の接眼部に導くためのプリズムである。なお、不図示の接眼部は、それぞれ不図示のピント板、アイピースレンズなどが設けられて構成されている。   The pentaprism 108 constitutes a part of a finder section, and is a prism for guiding a light beam incident from the imaging lens 101 and reflected by the main mirror 105 to an eyepiece (not shown). The eyepieces (not shown) are each provided with a focusing plate (not shown), an eyepiece lens, and the like.

サブミラー106は、主ミラー105の中央部に設けられたハーフミラーを透過した光束を反射させて、不図示の焦点検出用のセンサや、露光量算出回路109に併設されている不図示の露光量検出用センサに導くためのミラーである。   The sub-mirror 106 reflects a light beam transmitted through a half mirror provided at the center of the main mirror 105, and detects a focus detection sensor (not shown) and an exposure amount (not shown) provided in the exposure amount calculation circuit 109. This is a mirror for guiding to the detection sensor.

露光量検出用のセンサは、主ミラー105の中央部のハーフミラーを透過してサブミラー106で反射されてきた入射光を光電変換して露光量算出回路109に送る。露光量算出回路109は、露光量検出用のセンサの検出出力から露光量を算出し、その算出した露光量の信号をマイコン123に出力する。マイコン123は、露光量の信号を基に、絞り駆動量、シャッタスピードや露光時間等を制御する。   The exposure amount detection sensor photoelectrically converts incident light transmitted through the half mirror at the center of the main mirror 105 and reflected by the sub-mirror 106, and sends the light to the exposure amount calculation circuit 109. The exposure amount calculation circuit 109 calculates an exposure amount from the detection output of the exposure amount detection sensor, and outputs a signal of the calculated exposure amount to the microcomputer 123. The microcomputer 123 controls the aperture driving amount, the shutter speed, the exposure time, and the like based on the signal of the exposure amount.

焦点検出用のセンサは、主ミラー105の中央部のハーフミラーを透過してサブミラー106で反射されてきた光束を受光し、そのセンサ出力をマイコン123に送る。マイコン123は、そのセンサ出力からデフォーカス量を算出し、そのデフォーカス量を基にフォーカス演算を行ってフォーカス制御信号を生成し、そのフォーカス制御信号によりAF駆動回路102を制御する。   The focus detection sensor receives the light flux transmitted through the central half mirror of the main mirror 105 and reflected by the sub mirror 106, and sends the sensor output to the microcomputer 123. The microcomputer 123 calculates a defocus amount from the sensor output, performs a focus calculation based on the defocus amount, generates a focus control signal, and controls the AF drive circuit 102 based on the focus control signal.

フォーカルプレーンシャッタ(以下、シャッタ110とする。)は、マイコン123による制御の下、シャッタ駆動回路111により駆動される。すなわち、シャッタ110の開口時間は、マイコン123により制御される。   The focal plane shutter (hereinafter, referred to as a shutter 110) is driven by a shutter driving circuit 111 under the control of the microcomputer 123. That is, the opening time of the shutter 110 is controlled by the microcomputer 123.

撮像センサ112は、マイコン123により駆動制御がなされるCCDやCMOSセンサなどからなる撮像素子であり、撮影レンズ101によって結像された被写体像を電気信号に変換する。AD変換器115は、マイコン123による制御の下、撮像センサ112からのアナログ出力信号をデジタル信号に変換する。AD変換器115から出力されたデジタル信号は、画像処理回路116に送られる。   The image sensor 112 is an image sensor composed of a CCD, a CMOS sensor, or the like, which is driven and controlled by the microcomputer 123, and converts a subject image formed by the photographing lens 101 into an electric signal. The AD converter 115 converts an analog output signal from the image sensor 112 into a digital signal under the control of the microcomputer 123. The digital signal output from the AD converter 115 is sent to the image processing circuit 116.

画像処理回路116は、デジタル化された画像データに対し、フィルタ処理、色変換処理、ガンマ処理などを行うと共に、JPEGなどへの圧縮処理を行い、メモリコントローラ119に出力する。その際、画像処理回路116は、処理途中の画像データを、メモリコントローラ119を介してバッファメモリ122に一時的に蓄積させることも可能である。また、画像処理回路116は、撮像センサ112により撮像された画像データや、メモリコントローラ119から入力される画像データを、表示駆動回路117を通して表示部118に出力することも可能である。画像処理回路116におけるこれらの機能の切り替えはマイコン123の指示により行われる。また、画像処理回路116は、必要に応じて、撮像センサ112による撮像がなされた際の露出情報やホワイトバランスなどの情報を、マイコン123に出力することも可能である。それらの情報を基に、マイコン123は、ホワイトバランスやゲイン調整の指示を行う。   The image processing circuit 116 performs filter processing, color conversion processing, gamma processing, and the like on the digitized image data, performs compression processing to JPEG or the like, and outputs the result to the memory controller 119. At this time, the image processing circuit 116 can also temporarily store the image data being processed in the buffer memory 122 via the memory controller 119. Further, the image processing circuit 116 can output image data captured by the image sensor 112 and image data input from the memory controller 119 to the display unit 118 through the display driving circuit 117. Switching of these functions in the image processing circuit 116 is performed according to an instruction from the microcomputer 123. Further, the image processing circuit 116 can output information such as exposure information and white balance at the time of imaging by the imaging sensor 112 to the microcomputer 123 as necessary. Based on the information, the microcomputer 123 issues a white balance or gain adjustment instruction.

また前述したパノラマ撮影などの連続撮影動作が行われた場合、画像処理回路116は、メモリコントローラ119を介して、撮影された未処理画像データをバッファメモリ122に一旦格納させた後に読み出して画像処理や圧縮処理を行う。これらバッファメモリ122への格納と画像処理、圧縮処理は、パノラマ撮影などの連続撮影動作が行われている間、続けられる。なお、連像撮影が可能な枚数は、バッファメモリ122の容量や、パノラマ撮影の際に撮像される画像サイズに応じた枚数となる。   When a continuous shooting operation such as the panoramic shooting described above is performed, the image processing circuit 116 reads out the unprocessed image data once stored in the buffer memory 122 via the memory controller 119 and then reads out the processed image data. And compression processing. The storage in the buffer memory 122, the image processing, and the compression processing are continued while a continuous photographing operation such as panoramic photographing is performed. It should be noted that the number of images that can be subjected to continuous image capturing depends on the capacity of the buffer memory 122 and the number of images that are captured during panoramic image capturing.

画像処理回路116は、ゲートアレイなどのロジックデバイスにより実現され、輝度調整回路116a、ガンマ補正回路116b、現像回路116k、圧縮・伸長回路116lなどを有する。また、画像処理回路116は、移動量算出回路116c、位置合わせ回路116d、幾何変換回路116e、変倍回路116f、トリミング回路116g、合成回路116jなども有する。現像回路116kは、現像処理を行う。輝度調整回路116aは、デジタルゲインによって明るさを調整する。ガンマ補正回路116bは、ガンマ特性によって輝度を調整する。圧縮・伸長回路116lは、JPEGなどの一般的な画像形式への変換を行う。移動量算出回路116cは、例えばパノラマ撮影が行われた場合に、前述した隣接する撮影方向間の移動量を求める。また移動量算出回路116cは撮像装置のぶれ量についても算出する。位置合わせ回路116dは、例えばパノラマ撮影が行われた場合に、移動量算出回路116cにて算出された移動量を基に前述したように画像の位置合わせを行う。また位置合わせ回路116dはぶれ補正のための位置合わせも行う。幾何変換回路116eは、撮影レンズ101の歪曲収差補正、アフィン変換、射影変換、円筒座標変換などを行う。特にパノラマ撮影が行われた場合には、幾何変換回路116eは、前述したような歪曲収差補正や円筒座標変換を行う。変倍回路116fは、画像のサイズを変倍する。トリミング回路116gは、画像の一部を切り出す。合成回路116jは、複数の画像を合成する。特にパノラマ撮影が行われた場合、合成回路116jは、前述したように共通領域を重ね合わせて各画像を繋ぐようにしてパノラマ画像を合成する。本実施形態の撮像装置においてパノラマ撮影が行われた際の移動量算出回路116c、位置合わせ回路116d、幾何変換回路116e、変倍回路116f、トリミング回路116g、合成回路116jにおける動作の説明は後述する。   The image processing circuit 116 is realized by a logic device such as a gate array, and has a luminance adjustment circuit 116a, a gamma correction circuit 116b, a development circuit 116k, a compression / decompression circuit 116l, and the like. The image processing circuit 116 also includes a movement amount calculation circuit 116c, a positioning circuit 116d, a geometric conversion circuit 116e, a scaling circuit 116f, a trimming circuit 116g, a combining circuit 116j, and the like. The developing circuit 116k performs a developing process. The brightness adjustment circuit 116a adjusts brightness by a digital gain. The gamma correction circuit 116b adjusts luminance according to gamma characteristics. The compression / decompression circuit 116l performs conversion into a general image format such as JPEG. The moving amount calculation circuit 116c calculates the moving amount between the adjacent photographing directions, for example, when panoramic photographing is performed. The movement amount calculation circuit 116c also calculates the amount of shake of the imaging device. For example, when panoramic shooting is performed, the positioning circuit 116d performs image positioning as described above based on the movement amount calculated by the movement amount calculation circuit 116c. The alignment circuit 116d also performs alignment for blur correction. The geometric transformation circuit 116e performs distortion correction of the taking lens 101, affine transformation, projection transformation, cylindrical coordinate transformation, and the like. In particular, when panoramic photography is performed, the geometric conversion circuit 116e performs the above-described distortion correction and cylindrical coordinate conversion. The scaling circuit f changes the size of the image. The trimming circuit 116g cuts out a part of the image. The combining circuit 116j combines a plurality of images. In particular, when panoramic shooting is performed, the synthesizing circuit 116j synthesizes a panoramic image by overlapping the common areas and connecting the images as described above. The operation of the movement amount calculation circuit 116c, the positioning circuit 116d, the geometric conversion circuit 116e, the scaling circuit 116f, the trimming circuit 116g, and the combining circuit 116j when panoramic shooting is performed in the imaging apparatus of the present embodiment will be described later. .

メモリコントローラ119は、メモリ120へのデータの書き込みと読み出し、バッファメモリ122への一時的なデータの蓄積等を制御する。なお、メモリ120は着脱可能なカード型等のメモリであってもよい。メモリコントローラ119は、画像処理回路116による処理がなされていない未処理の画像データをバッファメモリ122に格納し、画像処理回路116による処理済みのデジタル画像データをメモリ120に格納する。また、メモリコントローラ119は、バッファメモリ122やメモリ120から読み出した画像データを画像処理回路116に出力する。また、メモリコントローラ119は、メモリ120に記憶されている画像を、外部インターフェイス121を介してコンピュータ等の外部機器に出力することも可能となされている。   The memory controller 119 controls writing and reading of data to and from the memory 120, temporary storage of data in the buffer memory 122, and the like. The memory 120 may be a removable card type memory or the like. The memory controller 119 stores unprocessed image data that has not been processed by the image processing circuit 116 in the buffer memory 122, and stores digital image data processed by the image processing circuit 116 in the memory 120. Further, the memory controller 119 outputs the image data read from the buffer memory 122 or the memory 120 to the image processing circuit 116. Further, the memory controller 119 can output an image stored in the memory 120 to an external device such as a computer via the external interface 121.

表示部118は、TFTや有機ELなどの表示デバイスである。表示駆動回路117は、VRAMとしても用いられるバッファメモリ122に格納された表示データを、メモリコントローラ119と画像処理回路116を介して受け取り、その表示データにより表示部118を駆動して画面上に画像等を表示させる。   The display unit 118 is a display device such as a TFT or an organic EL. The display drive circuit 117 receives display data stored in the buffer memory 122 also used as a VRAM via the memory controller 119 and the image processing circuit 116, drives the display unit 118 with the display data, and displays an image on the screen. And so on.

操作部124は、各種のボタンやスイッチが接続されており、それらボタンやスイッチの状態を検知し、それら状態検知信号をマイコン123に伝える。マイコン123は、操作部124からの状態検知信号に応じて各部をコントロールする。   The operation unit 124 is connected to various buttons and switches, detects the states of the buttons and switches, and transmits the state detection signals to the microcomputer 123. The microcomputer 123 controls each unit according to a state detection signal from the operation unit 124.

操作部124に接続された各種のスイッチのうち、スイッチ125(以後、SW1とする)とスイッチ126(以後、SW2とする)は、レリーズボタンの操作でオンオフするスイッチである。SW1のみがオンとなっている状態は、いわゆるレリーズボタン半押し状態である。このレリーズボタン半押し状態の時、マイコン123は、撮像装置のオートフォーカスの動作を開始させると共に測光動作を開始させる。SW1及びSW2が共にオンとなっている状態は、いわゆるレリーズボタンの全押し状態である。このレリーズボタン全押し状態の時、マイコン123は、撮像装置の画像撮影と記録を行わせる。また、レリーズボタン全押し状態が続いている間、マイコン123は、撮像装置に連続撮影動作を行わせる。前述したパノラマ撮影の際にはレリーズボタン全押し状態となされる。   Among various switches connected to the operation unit 124, a switch 125 (hereinafter, referred to as SW1) and a switch 126 (hereinafter, referred to as SW2) are switches that are turned on / off by operating a release button. The state in which only SW1 is ON is a so-called half-pressed release button state. When the release button is half-pressed, the microcomputer 123 starts the autofocus operation of the imaging apparatus and starts the photometric operation. The state where both SW1 and SW2 are on is the so-called full-press state of the release button. When the release button is fully depressed, the microcomputer 123 causes the imaging device to capture and record an image. Further, while the release button is fully pressed, the microcomputer 123 causes the imaging device to perform a continuous shooting operation. At the time of the panoramic shooting described above, the release button is fully pressed.

また、操作部124には、不図示のボタンやスイッチとして、例えば、露出補正ボタン、絞りボタン、ISO設定ボタン、メニューボタン、セットボタン、フラッシュ設定ボタン、単写/連写/セルフタイマー切り替えボタンなども接続されている。また操作部124に接続された不図示のボタン等には、例えば、メニューや再生画像移動のための移動+(プラス)ボタンや移動−(マイナス)ボタン、表示画像拡大ボタン、表示画像縮小ボタン、再生スイッチ、消去ボタン、情報表示ボタンなども含まれる。なお、絞りボタンは、予め設定された絞り値にまで絞り103を絞り込ませる際に操作されるボタンである。消去ボタンは、撮影した画像を消去する際に操作されるボタンである。情報表示ボタンは、撮影や再生に関する情報表示を行う際に操作されるボタンである。また、操作部124には、例えば回転ダイアルが接続されていてもよい。例えば移動+(プラス)ボタンや移動−(マイナス)ボタンの各機能は回転ダイアルが備えてもよい。回転ダイアルの回転操作によって、より軽快に数値や機能を選択することが可能となる。   The operation unit 124 includes buttons and switches (not shown) such as an exposure compensation button, an aperture button, an ISO setting button, a menu button, a set button, a flash setting button, and a single / continuous / self-timer switching button. Is also connected. Buttons (not shown) connected to the operation unit 124 include, for example, a move + (plus) button and a move-(minus) button for moving a menu or a reproduced image, a display image enlargement button, a display image reduction button, A playback switch, an erase button, an information display button, and the like are also included. The aperture button is a button operated when the aperture 103 is narrowed down to a preset aperture value. The delete button is a button operated when deleting a captured image. The information display button is a button that is operated when displaying information regarding shooting and playback. Further, a rotary dial may be connected to the operation unit 124, for example. For example, each function of the move + (plus) button and the move-(minus) button may be provided in a rotary dial. By rotating the rotary dial, numerical values and functions can be selected more easily.

液晶駆動回路127は、外部液晶表示部128やファインダ内液晶表示部129を駆動する。マイコン123は、液晶駆動回路127に対して表示内容を送り、液晶駆動回路127が外部液晶表示部128やファインダ内液晶表示部129を駆動させることで、撮像装置の動作状態やメッセージ等を文字や画像を用いて表示させる。また、ファインダ内液晶表示部129には、不図示のLEDなどのバックライトが配置されており、そのLEDも液晶駆動回路127により駆動される。   The liquid crystal drive circuit 127 drives the external liquid crystal display unit 128 and the liquid crystal display unit 129 in the finder. The microcomputer 123 sends display contents to the liquid crystal drive circuit 127, and the liquid crystal drive circuit 127 drives the external liquid crystal display unit 128 and the liquid crystal display unit 129 in the finder, so that the operation state of the image pickup apparatus, messages, and the like are displayed in characters and the like. Display using an image. Further, a backlight such as an LED (not shown) is disposed in the liquid crystal display unit 129 in the finder, and the LED is also driven by the liquid crystal driving circuit 127.

マイコン123は、撮影前に設定されているISO感度、画像サイズ、画質に応じた、画像サイズの予測値データを基に、メモリコントローラ119を介してメモリ120の容量を確認した上で撮影可能残数を演算することができる。そして、マイコン123は、その撮影可能残数を表示部118に表示させる。また、マイコン123は、撮影可能残数を、必要に応じて外部液晶表示部128やファインダ内液晶表示部129に表示させることもできる。   The microcomputer 123 checks the capacity of the memory 120 via the memory controller 119 based on the predicted value data of the image size according to the ISO sensitivity, the image size, and the image quality set before the photographing, and then sets the remaining photographable amount. Numbers can be computed. Then, the microcomputer 123 causes the display unit 118 to display the remaining photographable number. The microcomputer 123 can also display the remaining number of images that can be shot on the external liquid crystal display unit 128 and the finder liquid crystal display unit 129 as necessary.

不揮発性メモリ130は、EEPROMであり、撮像装置に電源が入れられていない状態でも、記憶内容を保存することができる。マイコン123の動作プログラムは、不揮発性メモリ130に格納されている。なお、例えばパノラマ撮影等により取得された画像に対する画像処理がソフトウェア構成によって実現される場合、本実施形態に係る画像処理プログラムも不揮発性メモリ130に格納され、マイコン123はその画像処理プログラムを実行する。   The nonvolatile memory 130 is an EEPROM, and can store the stored contents even when the power of the imaging device is not turned on. The operation program of the microcomputer 123 is stored in the nonvolatile memory 130. When image processing for an image acquired by, for example, panoramic photography is realized by a software configuration, the image processing program according to the present embodiment is also stored in the nonvolatile memory 130, and the microcomputer 123 executes the image processing program. .

ジャイロセンサ133は、例えば2軸若しくは3軸の角速度センサであり、撮像装置における回転の角速度を検出し、その検出信号(以下、ジャイロ情報とする。)としてマイコン123に出力する。
温度計134は、温度を検出し、その検出信号をマイコン123に出力する。本実施形態の場合、温度計134は、ジャイロセンサ133付近に配置することが好ましいが、一般的に撮像装置やメモリ120等の保護のために撮像センサ112やメモリ120などの近傍に設置されている温度センサを流用してもよい。
The gyro sensor 133 is, for example, a biaxial or triaxial angular velocity sensor, detects the angular velocity of rotation in the imaging device, and outputs the detection signal (hereinafter, referred to as gyro information) to the microcomputer 123.
The thermometer 134 detects the temperature and outputs a detection signal to the microcomputer 123. In the case of the present embodiment, the thermometer 134 is preferably arranged near the gyro sensor 133, but is generally installed near the imaging sensor 112, the memory 120, and the like for protection of the imaging device, the memory 120, and the like. The existing temperature sensor may be diverted.

外部インターフェイス121は、本実施形態の撮像装置と、コンピュータ等の外部機器とを接続する。
電源部131は、例えば着脱可能なバッテリを備えており、本実施形態の撮像装置の各部に必要な電力を供給する。
内部時計132は、時刻情報や撮像装置の動作に必要な時間情報を出力してマイコン123に出力する。マイコン123は、例えば内部時計132からの時刻情報に基づく撮影時刻データを、メモリ120に記録される画像ファイルに付加又は重畳することができる。
The external interface 121 connects the imaging device of the present embodiment to an external device such as a computer.
The power supply unit 131 includes, for example, a detachable battery, and supplies necessary power to each unit of the imaging device of the present embodiment.
The internal clock 132 outputs time information and time information necessary for the operation of the imaging device, and outputs the information to the microcomputer 123. The microcomputer 123 can add or superimpose the photographing time data based on the time information from the internal clock 132 to the image file recorded in the memory 120, for example.

以下、図5フローチャートを用いて、本実施形態の撮像装置における基本的な撮影動作を説明する。図5のフローチャートに示した撮影動作は、マイコン123が撮像装置の各部を制御することにより行われる。撮影動作が開始される前には、予め露光量算出回路109により露光量が算出され、絞り量、蓄積時間(シャッタスピード)、ISO感度等が決定されているとする。なお、以下の説明では、図5のフローチャートの各処理ステップS501〜ステップS507をS501〜S507と略記する。   Hereinafter, a basic photographing operation in the imaging apparatus of the present embodiment will be described with reference to the flowchart of FIG. The photographing operation shown in the flowchart of FIG. 5 is performed by the microcomputer 123 controlling each unit of the imaging device. Before the photographing operation is started, it is assumed that the exposure amount is calculated in advance by the exposure amount calculation circuit 109, and the aperture amount, the accumulation time (shutter speed), the ISO sensitivity, and the like are determined. In the following description, the processing steps S501 to S507 in the flowchart of FIG. 5 are abbreviated as S501 to S507.

ユーザによりレリーズボタンが全押し状態となされてSW1及びSW2が共にオンの状態になると、S501として、マイコン123は、図5のフローチャートに示した撮影動作の制御を開始する。   When the release button is fully pressed by the user and both SW1 and SW2 are turned on, the microcomputer 123 starts controlling the photographing operation shown in the flowchart of FIG.

撮影動作の制御を開始すると、マイコン123は、S502として、以下の一連の動作を行うように各部を制御する。先ず、マイコン123は、予め決められた絞り量を絞り駆動回路104に通知して、絞り103を目標の絞り量にする。また、マイコン123は、撮像センサ112、AD変換器115などを動作可能な状態にする撮影準備を行う。そして、マイコン123は、撮影準備が完了すると、ミラー駆動回路107を制御して主ミラー105を上方に跳ね上げさせ、またシャッタ駆動回路111を制御してシャッタ110の不図示の先幕を開けさせる。これにより、撮影レンズ101を介した被写体像が撮像センサ112上に結像されることになる。続いて、マイコン123は、シャッタ駆動回路111を制御して、予め設定された蓄積時間後にシャッタ110の不図示の後幕を閉じる。これにより、撮像センサ112には、蓄積時間の間だけ光が入ることになる。S502では、この一連の動作により、撮像センサ112の露光が行われる。   When the control of the photographing operation is started, the microcomputer 123 controls each unit to perform the following series of operations in S502. First, the microcomputer 123 notifies the aperture driving circuit 104 of a predetermined aperture amount, and sets the aperture 103 to a target aperture amount. In addition, the microcomputer 123 prepares for shooting in which the image sensor 112, the AD converter 115, and the like are operable. When the preparation for photographing is completed, the microcomputer 123 controls the mirror driving circuit 107 to flip the main mirror 105 upward, and controls the shutter driving circuit 111 to open the front curtain (not shown) of the shutter 110. . As a result, the subject image via the photographing lens 101 is formed on the image sensor 112. Subsequently, the microcomputer 123 controls the shutter drive circuit 111 to close the rear curtain (not shown) of the shutter 110 after a preset accumulation time. As a result, light enters the image sensor 112 only during the accumulation time. In S502, the exposure of the image sensor 112 is performed by this series of operations.

続いて、S503として、マイコン123は、撮像センサ112から出力されてAD変換器115で変換された画像データを、画像処理回路116を介し、さらにメモリコントローラ119を介してバッファメモリ122に格納させる。さらに、S504として、マイコン123は、メモリコントローラ119を介してバッファメモリ122から読み出した画像データを画像処理回路116に送り、現像回路116kによる現像処理を行わせる。またS504において、マイコン123は、画像処理回路116を制御し、ホワイトバランス処理や、ガンマ補正回路116bで暗部にゲインをかける処理などの画像処理を行わせてもよい。   Subsequently, in step S <b> 503, the microcomputer 123 causes the image data output from the image sensor 112 and converted by the AD converter 115 to be stored in the buffer memory 122 via the image processing circuit 116 and further via the memory controller 119. Further, as S504, the microcomputer 123 sends the image data read from the buffer memory 122 via the memory controller 119 to the image processing circuit 116, and causes the developing circuit 116k to perform the developing process. In step S504, the microcomputer 123 may control the image processing circuit 116 to perform image processing such as white balance processing and processing for applying a gain to a dark part by the gamma correction circuit 116b.

次に、S505として、マイコン123による制御の下、画像処理回路116は、画像処理が施された画像データを圧縮・伸長回路116lによりJPEGなどの汎用的なデータフォーマットへと変換して、メモリ120に記録させる。その後、マイコン123は、レリーズボタンが全押し状態でなければ、S507として、図5のフローチャートの撮影動作の制御を終了する。   Next, in step S505, under the control of the microcomputer 123, the image processing circuit 116 converts the image data on which the image processing has been performed into a general-purpose data format such as JPEG by the compression / decompression circuit 116l. To record. Thereafter, if the release button is not fully pressed, the microcomputer 123 ends the control of the photographing operation in the flowchart of FIG. 5 in S507.

なお、メモリ120に記録される画像データは、画像処理回路116での画像処理や現像処理が行われていないRAWデータを、圧縮・伸長回路116lにより可逆圧縮したデータであってもよい。マイコン123は、操作部124を介したユーザからの指示を基に、メモリ120に記録する画像データをJPEG等の画像データか又は可逆圧縮されたRAWデータの何れにするかを決定する。   It should be noted that the image data recorded in the memory 120 may be data obtained by reversibly compressing RAW data that has not been subjected to image processing and development processing in the image processing circuit 116 by the compression / decompression circuit 116l. The microcomputer 123 determines whether the image data to be recorded in the memory 120 is JPEG image data or lossless-compressed RAW data based on an instruction from the user via the operation unit 124.

次に、図1に示した本実施形態の撮像装置において、パノラマ撮影が行われている場合の動作について説明する。
本実施形態の撮像装置はパノラマ撮影モードを含む種々の撮影モードでの動作が可能となされており、前述したパノラマ撮影は、ユーザが撮像装置の撮影モードをパノラマ撮影モードに設定することにより実行可能となる。
Next, the operation of the imaging apparatus according to the present embodiment illustrated in FIG. 1 when panoramic imaging is performed will be described.
The imaging device of the present embodiment can operate in various shooting modes including the panorama shooting mode, and the above-described panorama shooting can be executed by the user setting the shooting mode of the imaging device to the panorama shooting mode. Becomes

ユーザから操作部124を介してパノラマ撮影モードへの切り替え指示が入力されると、マイコン123は、撮像装置をパノラマ撮影モードに設定し、撮像センサ112とAD変換器115に電源が供給されるよう制御すると共に初期設定を行う。また、マイコン123は、ミラー駆動回路107を制御して主ミラー105を上げさせるとともに、シャッタ駆動回路111を制御してシャッタ110を開き、撮影レンズ101による被写体像等が撮像センサ112に結像されるようにする。これにより、撮像センサ112から読み出されてAD変換器115にてデジタル変換された画像信号は画像処理回路116に送られる。さらに、マイコン123は、画像処理回路116を制御し、現像回路116kによる現像処理、輝度調整回路116a、ガンマ補正回路116bによる画像処理、変倍回路116fによる変倍処理を行わせる。変倍回路116fにより表示に適した画像サイズへと変倍された画像は、表示部118に送られて表示される。撮像装置では、このような撮像センサ112による撮像から表示部118の表示までの処理が、1秒間に24回〜60回繰り返して行われることにより、いわゆるライブビューの表示がなされる。   When a user inputs an instruction to switch to the panoramic imaging mode via the operation unit 124, the microcomputer 123 sets the imaging apparatus to the panoramic imaging mode and supplies power to the imaging sensor 112 and the AD converter 115. Control and make initial settings. Further, the microcomputer 123 controls the mirror driving circuit 107 to raise the main mirror 105, and controls the shutter driving circuit 111 to open the shutter 110, so that a subject image or the like by the photographing lens 101 is formed on the image sensor 112. So that Thus, the image signal read from the image sensor 112 and digitally converted by the AD converter 115 is sent to the image processing circuit 116. Further, the microcomputer 123 controls the image processing circuit 116 to perform the development processing by the development circuit 116k, the image processing by the luminance adjustment circuit 116a and the gamma correction circuit 116b, and the magnification processing by the magnification circuit 116f. The image scaled to an image size suitable for display by the scaling circuit 116f is sent to the display unit 118 and displayed. In the imaging apparatus, a process from imaging by the imaging sensor 112 to display on the display unit 118 is repeatedly performed 24 to 60 times per second, so that a so-called live view is displayed.

ここで、本実施形態の撮像装置においてパノラマ撮影を行う場合、ユーザは、パノラマ撮影の開始準備作業として、表示部118のライブビュー表示を確認しながら撮影レンズ101を所望の画角(所望の焦点距離)に設定する。さらに、ユーザは、全景220の撮影範囲内でメインとなる被写体に対して撮影レンズ101を向けた上でSW1を押下(レリーズボタンを半押し)する。ユーザによりSW1が押下されると、マイコン123は、パノラマ撮影の準備のために、撮像装置の各部を制御し、画角内の被写体に対する適切な露光量の算出と、画角内の被写体に対する焦点合わせとを行わせる。例えばライブビュー表示がなされている場合、マイコン123は、画像処理回路116に含まれる不図示の露光量算出回路により最適な露光量を算出させて、その露光量の情報を取得する。また例えばライブビューの表示がなされていない場合、マイコン123は、サブミラー106にて反射された光の受光信号に応じた最適な露光量を露光量算出回路109に算出させ、その算出された露光量の情報を取得する。そして、マイコン123は、露光量の情報を基に、絞り駆動回路104を介した絞り103の駆動制御、撮像センサ112の感度制御や蓄積時間の制御を行う。また、マイコン123は、AF駆動回路102を介して撮影レンズ101を駆動させることにより、画角内のメインの被写体に対して焦点を合わせるように制御する。これらパノラマ撮影のための開始準備が完了すると、マイコン123は、不図示のスピーカ等からの通知音の出力や通知表示等を行って、パノラマ撮影の開始準備が整ったことをユーザに知らせる。   Here, when performing panoramic imaging with the imaging apparatus of the present embodiment, the user moves the imaging lens 101 to a desired angle of view (desired focus) while checking the live view display on the display unit 118 as a preparation work for starting panoramic imaging. Distance). Further, the user presses SW1 (presses the release button halfway) with the photographic lens 101 facing the main subject within the photographic range of the whole view 220. When the user presses SW1, the microcomputer 123 controls each unit of the imaging apparatus in preparation for panoramic shooting, calculates an appropriate exposure amount for a subject within the angle of view, and focuses on the subject within the angle of view. And make it match. For example, when the live view display is performed, the microcomputer 123 causes the exposure amount calculation circuit (not shown) included in the image processing circuit 116 to calculate an optimal exposure amount, and acquires information on the exposure amount. For example, when the live view is not displayed, the microcomputer 123 causes the exposure amount calculation circuit 109 to calculate an optimal exposure amount according to the light reception signal of the light reflected by the sub-mirror 106, and the calculated exposure amount Get the information of. The microcomputer 123 performs drive control of the aperture 103 via the aperture drive circuit 104, sensitivity control of the image sensor 112, and control of the accumulation time based on the information on the exposure amount. Further, the microcomputer 123 controls the focusing lens to be focused on the main subject within the angle of view by driving the photographing lens 101 via the AF driving circuit 102. When the preparation for starting the panorama shooting is completed, the microcomputer 123 outputs a notification sound from a speaker or the like (not shown) or displays a notification to notify the user that the preparation for starting the panorama shooting is completed.

次に、ユーザは、撮像装置を全景220のなかで、パノラマ撮影で撮り始めたい向きに撮影方向(撮影レンズ101)を向けた上で、SW2を押下(レリーズボタンを全押し)する。これにより、撮像装置では実際にパノラマ撮影がスタートし、画像の撮像が開始される。そして、パノラマ撮影が開始されると、撮像装置では、図5に示すフローチャートの処理を開始する。
以下、図5のフローチャートと図6に示すデータフローダイアグラムを用いて、パノラマ撮影時の撮像装置における処理の流れを説明する。図5のフローチャートおよび図6のデータフローダイアグラムに示した動作は、マイコン123が撮像装置の各部を制御することにより行われる。なお、図5に示すフローチャートの処理は、ハードウェア構成により実行されてもよいし、一部がソフトウェア構成で残りがハードウェア構成により実現されてもよい。ソフトウェア構成により処理が実行される場合、例えば不揮発性メモリ130に記憶されているプログラムをマイコン123が実行することにより実現される。本実施形態に係るプログラムは、不揮発性メモリ130に予め用意されていてもよく、また着脱可能な半導体メモリ等から読み出されたり、不図示のインターネット等のネットワークからダウンロードされたりしてもよい。
Next, the user turns the photographing direction (photographing lens 101) in a direction in which the user wants to start panoramic photographing in the whole view 220 of the image capturing apparatus, and then presses down SW2 (fully presses the release button). As a result, the image capturing apparatus actually starts panoramic image capturing and starts capturing an image. Then, when the panoramic shooting is started, the imaging device starts the processing of the flowchart shown in FIG.
Hereinafter, the flow of processing in the imaging apparatus at the time of panoramic shooting will be described using the flowchart of FIG. 5 and the data flow diagram shown in FIG. The operations shown in the flowchart of FIG. 5 and the data flow diagram of FIG. 6 are performed by the microcomputer 123 controlling each unit of the imaging apparatus. Note that the processing of the flowchart illustrated in FIG. 5 may be executed by a hardware configuration, or may be partially realized by a software configuration and the remaining may be realized by a hardware configuration. When the processing is executed by the software configuration, the processing is realized, for example, by the microcomputer 123 executing a program stored in the nonvolatile memory 130. The program according to the present embodiment may be prepared in the nonvolatile memory 130 in advance, may be read from a removable semiconductor memory or the like, or may be downloaded from a network such as the Internet (not shown).

S601においてパノラマ撮影が開始されると、マイコン123は、先ずS602として、レンズ情報とセンサ情報とを取得する。レンズ情報には、撮影レンズ101における歪曲や周辺光量低下の補正時に使用されるレンズ補正データや、円筒座標変換の際に使用する焦点距離、画角の情報などが含まれる。それらレンズ情報は、例えば撮影レンズ101に内蔵された不図示のメモリあるいは不揮発性メモリ130等に保存されており、マイコン123は取得したレンズ情報を内部メモリに記憶する。センサ情報には、撮像センサ112の有効撮像エリアの縦横幅のサイズ、画素数、1画素あたりのサイズ、画素ピッチなどが含まれる。それらセンサ情報は、例えば不揮発性メモリ130等に予め保存されていても良いし、マイコン123が演算により求めても良い。マイコン123は、取得したセンサ情報を内部メモリに記憶する。   When panoramic photography is started in S601, the microcomputer 123 first acquires lens information and sensor information in S602. The lens information includes lens correction data used for correcting distortion and a decrease in peripheral light amount in the photographing lens 101, and information on a focal length and an angle of view used for cylindrical coordinate conversion. The lens information is stored in, for example, a memory (not shown) built in the photographing lens 101 or a nonvolatile memory 130, and the microcomputer 123 stores the obtained lens information in an internal memory. The sensor information includes the size of the vertical and horizontal widths of the effective imaging area of the imaging sensor 112, the number of pixels, the size per pixel, the pixel pitch, and the like. The sensor information may be stored in advance in, for example, the nonvolatile memory 130 or the like, or may be calculated by the microcomputer 123. The microcomputer 123 stores the acquired sensor information in the internal memory.

次にS603として、マイコン123は、撮像装置の各部を制御して1枚目の画像の撮影を行わせる。このときの撮像センサ112とAD変換器115は例えばライブビュー用の駆動に設定されているので、マイコン123は、これらを静止画撮影用の駆動に切り替える。またマイコン123は、絞り駆動回路104を介して絞り103を先ほど決めた露光量になるように調整し、さらにシャッタ駆動回路111を介してシャッタ110を開閉させて、撮像センサ112に被写体像が結像されるようにする。これにより、撮像センサ112では静止画の撮影が行われ、撮像センサ112から読み出された画像信号はAD変換器115でデジタル信号に変換される。そして、画像処理回路116では、AD変換器115からのデジタル信号に対し、不図示の回路により撮像センサ112のシェーディング補正処理のような最小限の画像処理を施す。この画像処理回路116による最小限の処理がなされた画像データは、1枚目のRAW画像のデータとして、メモリコントローラ119を介してバッファメモリ122に格納される。   Next, in step S603, the microcomputer 123 controls each unit of the imaging device to capture the first image. At this time, since the image sensor 112 and the AD converter 115 are set to, for example, drive for live view, the microcomputer 123 switches the drive to drive for still image shooting. Further, the microcomputer 123 adjusts the aperture 103 to the predetermined exposure amount via the aperture drive circuit 104, and further opens and closes the shutter 110 via the shutter drive circuit 111, so that a subject image is formed on the image sensor 112. To be imaged. Thus, a still image is captured by the image sensor 112, and the image signal read from the image sensor 112 is converted into a digital signal by the AD converter 115. Then, the image processing circuit 116 performs a minimum image process such as a shading correction process of the image sensor 112 on a digital signal from the AD converter 115 by a circuit (not shown). The image data subjected to the minimum processing by the image processing circuit 116 is stored in the buffer memory 122 via the memory controller 119 as data of the first RAW image.

また、S604において、マイコン123は、1枚目の画像の撮影から次の2枚目の画像の撮影が行われるまでに撮像装置がどのくらいスイング(回転)されたのかを検出可能にするために、ジャイロセンサ133を初期化(リセット)する。   In step S604, the microcomputer 123 can detect how much the imaging apparatus has been swung (rotated) from the time when the first image is shot until the time when the next second image is shot. The gyro sensor 133 is initialized (reset).

S603においてバッファメモリ122に格納された1枚目のRAW画像データは、メモリコントローラ119により読み出されて画像処理回路116の現像回路116kに送られる。現像回路116kは、RAW画像に対して現像処理を行って、輝度(Y)と色差(UV)からなる1枚目のYUV画像に変換し、そのYUV画像データを幾何変換回路116eと変倍回路116fに送る。なお、S603で撮影された1枚目のRAW画像が、図7のデータフローダイアグラムのN枚目RAW画像705であるとすると、1枚目のYUV画像は、図7のN枚目RAW画像705を現像回路116kで現像したN枚目現像後画像706である。   The first RAW image data stored in the buffer memory 122 in S603 is read out by the memory controller 119 and sent to the developing circuit 116k of the image processing circuit 116. The development circuit 116k performs a development process on the RAW image to convert the RAW image into a first YUV image including luminance (Y) and color difference (UV), and converts the YUV image data into a geometric conversion circuit 116e and a scaling circuit. Send to 116f. If the first RAW image captured in S603 is the N-th RAW image 705 in the data flow diagram of FIG. 7, the first YUV image is the N-th RAW image 705 of FIG. Is an N-th post-development image 706 developed by the developing circuit 116k.

画像処理回路116の変倍回路116fでは、1枚目のYUV画像に対し表示部118の画素数に応じた縮小処理が行われ、その縮小処理により得られた縮小画像がバッファメモリ122のVRAM領域に格納される。なお、1枚目のYUV画像が図7のN枚目現像後画像706であるとすると、VRAM領域708には、N枚目現像後画像706を変倍回路116fで縮小処理した縮小画像が格納される。そして、VRAM領域から読み出された1枚目のYUV画像は表示駆動回路117を介して表示部118の画面上に表示される。この表示を見ることにより、ユーザはパノラマ撮影において1枚目に撮影された画像を確認できる。   In the scaling circuit 116 f of the image processing circuit 116, a reduction process according to the number of pixels of the display unit 118 is performed on the first YUV image, and the reduced image obtained by the reduction process is stored in the VRAM area of the buffer memory 122. Is stored in Assuming that the first YUV image is the N-th developed image 706 in FIG. 7, a reduced image obtained by reducing the N-th developed image 706 by the scaling circuit 116f is stored in the VRAM area 708. Is done. Then, the first YUV image read from the VRAM area is displayed on the screen of the display unit 118 via the display drive circuit 117. By looking at this display, the user can confirm the first captured image in panoramic photography.

また画像処理回路116の幾何変換回路116eでは、S605の処理として、マイコン123を介して取得したレンズ補正データを用いて、YUV画像に対して撮影レンズ101の歪曲収差を補正する処理を施す。歪曲収差の補正処理は既存の技術であるためその説明は省略する。なお、1枚目のYUV画像が図7のN枚目現像後画像706であるとすると、図7のN枚目現像後画像706が幾何変換回路116eで歪曲収差補正された後の画像は、N枚目幾何変換後画像707である。このN枚目幾何変換後画像707はバッファメモリ122に格納され、次の画像が撮影されて後述する移動量算出回路116cでの移動量算出の際に、N−1枚目幾何変換後画像703としてバッファメモリ122から読み出されることになる。   Further, the geometric conversion circuit 116e of the image processing circuit 116 performs a process of correcting the distortion of the photographic lens 101 on the YUV image using the lens correction data obtained via the microcomputer 123 as the process of S605. The processing for correcting the distortion is an existing technique, and a description thereof will be omitted. Assuming that the first YUV image is the N-th developed image 706 in FIG. 7, the image after the N-th developed image 706 in FIG. This is the Nth geometrically transformed image 707. The N-th post-geometrically transformed image 707 is stored in the buffer memory 122, and the next image is photographed. From the buffer memory 122.

次にS606において、マイコン123は、撮像装置の各部を制御して2枚目の静止画撮影を行わせる。2枚目の画像撮影の場合も1枚目の画像撮影と同様に、マイコン123は、露光量の制御、シャッタ駆動の制御を行う。そして、撮像センサ112から読み出された2枚目の画像信号も1枚目と同様、AD変換器115でデジタル信号に変換され、画像処理回路116で最小限の画像処理が施され、2枚目のRAW画像のデータとしてバッファメモリ122に格納される。なお、2枚目のRAW画像が撮影された場合、この2枚目のRAW画像は、図7のデータフローダイアグラムではN枚目RAW画像705となる。   Next, in step S606, the microcomputer 123 controls each unit of the imaging device to perform the second still image shooting. In the case of capturing the second image, similarly to the first image, the microcomputer 123 controls the exposure amount and the shutter drive. Then, similarly to the first image signal, the second image signal read from the image sensor 112 is also converted into a digital signal by the AD converter 115 and subjected to the minimum image processing by the image processing circuit 116. The data is stored in the buffer memory 122 as the data of the RAW image of the eye. When the second RAW image is captured, the second RAW image becomes the N-th RAW image 705 in the data flow diagram of FIG.

またS606では、バッファメモリ122に格納された2枚目のRAW画像データも1枚目と同様、画像処理回路116の現像回路116により現像処理されて2枚目のYUV画像に変換される。S606で撮影された2枚目のRAW画像が、図7のN枚目RAW画像705であるとすると、2枚目のYUV画像は、図7のN枚目RAW画像705を現像回路116kで現像したN枚目現像後画像706となる。そして、2枚目のYUV画像も1枚目と同様、画像処理回路116の変倍回路116fにより縮小処理が行われて、VRAM領域に格納された後、表示駆動回路117を介して表示部118の画面上に表示される。この表示を見ることにより、ユーザはパノラマ撮影において2枚目に撮影された画像を確認できる。   In step S606, the second RAW image data stored in the buffer memory 122 is developed by the developing circuit 116 of the image processing circuit 116 and converted into the second YUV image in the same manner as the first RAW image data. Assuming that the second RAW image captured in S606 is the N-th RAW image 705 in FIG. 7, the second YUV image is developed from the N-th RAW image 705 in FIG. 7 by the developing circuit 116k. An N-th developed image 706 is obtained. Similarly to the first YUV image, the second YUV image is reduced by the scaling circuit 116f of the image processing circuit 116, stored in the VRAM area, and then displayed on the display unit 118 via the display drive circuit 117. Will be displayed on the screen. By looking at this display, the user can confirm the second captured image in the panoramic imaging.

さらにS607において、マイコン123は、ジャイロセンサ133からジャイロ情報(図7のデータフローダイアグラムではジャイロ情報724)を取得して不図示の内部メモリ等に記憶する。ここで、ジャイロ情報としては、撮像装置のヨー(Yaw)方向、ピッチ(Pitch)方向の2軸の情報を取得するが、光軸回りの回転であるロール(Roll)方向を加えた3軸の情報を取得することが好ましい。なお、ジャイロセンサ133からの出力そのものは角速度の情報であるが、パノラマ撮影では隣接する撮像方向間、つまり前回の撮影から今回の撮影までの間にどのくらいスイングされたかの検出が必要である。このため、マイコン123は、前回の撮影から今回の撮影までの間のスイングによる角速度を積分するような演算を2枚目以降の画像の撮影時においてそれぞれ実行して、隣接撮影方向間の回転角度を算出して不図示の内部メモリ等に記憶する。   Further, in S607, the microcomputer 123 acquires gyro information (gyro information 724 in the data flow diagram of FIG. 7) from the gyro sensor 133 and stores the gyro information in an internal memory (not shown). Here, as the gyro information, two-axis information of the imaging apparatus in the yaw (Yaw) direction and the pitch (Pitch) direction is acquired, but the three-axis information obtained by adding the roll (Roll) direction that is the rotation around the optical axis is added. It is preferable to obtain information. Note that the output itself from the gyro sensor 133 is information on the angular velocity. However, in panoramic imaging, it is necessary to detect how much the swing has occurred between adjacent imaging directions, that is, between the previous imaging and the current imaging. For this reason, the microcomputer 123 executes a calculation for integrating the angular velocity due to the swing from the previous shooting to the current shooting at the time of shooting the second and subsequent images, respectively, and executes the rotation angle between the adjacent shooting directions. Is calculated and stored in an internal memory (not shown).

次にS608において、移動量算出回路116cは、マイコン123から、前述したレンズ情報の焦点距離や画角の情報、センサ情報、スイング時の隣接撮影方向間の回転角度の情報を取得する。そして、移動量算出回路116cは、それらの情報を基に、前回の撮影から今回の撮影までの間つまり隣接する撮影方向間におけるスイングの回転角度を、画素単位で表される移動量に変換する。本実施形態において、このS608にて求められた移動量が、角速度センサからのジャイロ情報を基に算出される移動量である。   Next, in step S608, the movement amount calculation circuit 116c acquires, from the microcomputer 123, information on the above-described focal length and angle of view of the lens information, sensor information, and information on the rotation angle between adjacent shooting directions during a swing. Then, the movement amount calculation circuit 116c converts the rotation angle of the swing from the previous shooting to the current shooting, that is, between adjacent shooting directions, into a movement amount expressed in pixel units based on the information. . In the present embodiment, the movement amount obtained in S608 is a movement amount calculated based on gyro information from the angular velocity sensor.

ここで、撮影レンズ101の焦点距離をf[mm]、撮像センサ112の有効撮像エリア幅をw[mm]とすると、歪曲収差補正後の画角α[°](もしくは歪曲収差の無いレンズの画角α)は、以下の式(8)により算出できる。   Here, assuming that the focal length of the imaging lens 101 is f [mm] and the effective imaging area width of the imaging sensor 112 is w [mm], the angle of view α [°] after the distortion correction (or the lens having no distortion). The angle of view α) can be calculated by the following equation (8).

α=2×arctan(w/2/f) 式(8)   α = 2 × arctan (w / 2 / f) Equation (8)

また撮像センサ112の1画素当たりのサイズをp[μm]、前回の撮影から今回の撮影までの間のスイング角をβ[°]とすると、移動量d[pix]は、式(9)により算出できる。
d=tan(β/2)×f/p×1000 式(9)
Further, assuming that the size per pixel of the image sensor 112 is p [μm] and the swing angle from the previous shooting to the current shooting is β [°], the moving amount d [pix] is given by Expression (9). Can be calculated.
d = tan (β / 2) × f / p × 1000 Equation (9)

次にS609において、幾何変換回路116eでは、2枚目のYUV画像に対して1枚目と同様に歪曲収差を補正する処理が行われる。
続いてマイコン123は、S610として、幾何変換回路116eが円筒座標変換を行う際に用いる、仮想円筒の半径を算出する。
ここで、前述したように、撮影レンズ101が焦点距離の短い広角レンズになっている場合、その焦点距離を仮想円筒の半径にして円筒座標変換を行うと、画像の左右端近辺の座標変換量が大きくなり、高さ方向の有効画素数が少なくなってしまう。
Next, in step S609, the geometric conversion circuit 116e performs a process of correcting distortion on the second YUV image in the same manner as the first YUV image.
Subsequently, in S610, the microcomputer 123 calculates the radius of the virtual cylinder used when the geometric conversion circuit 116e performs the cylindrical coordinate conversion.
Here, as described above, when the photographing lens 101 is a wide-angle lens having a short focal length, when the focal length is set to the radius of the virtual cylinder and cylindrical coordinate conversion is performed, the coordinate conversion amount near the left and right ends of the image is obtained. And the number of effective pixels in the height direction decreases.

このため、本実施形態では、前述したように、焦点距離fを仮想円筒の半径Rにした場合と、仮想円筒の半径Rを焦点距離fよりも大きくした場合とで、画像の上下端で実質的な差が生じない範囲で、仮想円筒の半径を大きくして円筒座標変換を行う。なお、仮想円筒の半径Rの算出処理は、最初に1度だけ行い、その後の仮想円筒の半径は固定の値としても良いし、本実施形態のように画像の撮影毎に行っても良い。さらには、最初に行った仮想円筒の半径の算出結果から、順次画像が撮影される毎に、仮想円筒の半径を徐々に焦点距離fの値に近づけていくことも好ましい様態の一つである。   Therefore, in the present embodiment, as described above, the case where the focal length f is set to the radius R of the virtual cylinder and the case where the radius R of the virtual cylinder is set to be larger than the focal length f are substantially the same at the upper and lower ends of the image. The cylindrical coordinate conversion is performed by increasing the radius of the virtual cylinder within a range in which there is no significant difference. The process of calculating the radius R of the virtual cylinder may be performed only once at first, and the radius of the virtual cylinder may be a fixed value thereafter, or may be performed each time an image is captured as in the present embodiment. Furthermore, it is one of the preferable embodiments that the radius of the virtual cylinder is gradually made closer to the value of the focal length f every time an image is sequentially taken from the calculation result of the radius of the virtual cylinder performed first. .

続いてS611において、幾何変換回路116eにより円筒座標変換が行われる。本実施形態において、円筒座標変換と歪曲収差補正とは共に幾何変換回路116eで行われるため、幾何変換回路116eは、それら円筒座標変換と歪曲収差補正を前述した通り別に行ってもよいし、同時に行ってもよい。
なお、2枚目のYUV画像が図7のN枚目現像後画像706である場合、図7のN枚目現像後画像706が幾何変換回路116eで円筒座標変換および歪曲収差補正された後の画像は、N枚目幾何変換後画像707となる。このN枚目幾何変換後画像707はバッファメモリ122に格納され、次の画像(3枚目の画像)が撮影されて移動量算出回路116cで移動量が算出される際に、N−1枚目幾何変換後画像703としてバッファメモリ122から読み出されることになる。
Subsequently, in step S611, cylindrical coordinate conversion is performed by the geometric conversion circuit 116e. In this embodiment, since both the cylindrical coordinate conversion and the distortion correction are performed by the geometric conversion circuit 116e, the geometric conversion circuit 116e may perform the cylindrical coordinate conversion and the distortion correction separately as described above, or at the same time. May go.
When the second YUV image is the N-th developed image 706 in FIG. 7, the N-th developed image 706 in FIG. 7 is subjected to cylindrical coordinate conversion and distortion correction by the geometric conversion circuit 116e. The image becomes an N-th post-geometric transformation image 707. The Nth geometrically transformed image 707 is stored in the buffer memory 122, and when the next image (third image) is photographed and the movement amount is calculated by the movement amount calculation circuit 116c, N-1 images are calculated. The image 703 is read from the buffer memory 122 as the image 703 after the eye geometric conversion.

次にS612として、移動量算出回路116cにより、N枚目幾何変換後画像707とN−1枚目幾何変換後画像703とを用いた移動量の算出処理が行われる。画像から移動量を算出する処理に関しては既知の方法を使用可能である。本実施形態では、移動量算出回路116cにおいて画像からエッジを検出して幾つかの特徴点を抽出し、さらに標本化することでアフィン変換の係数を算出する。このように、移動量算出回路116cでは、エッジを検出し、さらに特徴点を抽出することにより、撮影された画像の移動量を算出する。   Next, in step S612, the movement amount calculation circuit 116c performs a movement amount calculation process using the N-th image after geometric conversion 707 and the (N-1) -th image after geometric conversion 703. A known method can be used for the process of calculating the movement amount from the image. In the present embodiment, the moving amount calculation circuit 116c detects edges from the image, extracts some feature points, and samples the feature points to calculate affine transformation coefficients. As described above, the movement amount calculation circuit 116c calculates the movement amount of the captured image by detecting the edge and further extracting the feature points.

ここで例えば、前回撮影された画像と今回撮影された画像との間で、特徴点1の座標が(x1,y1)から(u1,v1)にずれ、特徴点2の座標が(x2,y2)から(u2,v2)に、特徴点3の座標が(x3,y3)から(u3,v3)にずれたとする。この場合、前述した式(1)を基に連立方程式を作ると式(10)、式(11)のようになる。   Here, for example, the coordinates of the feature point 1 are shifted from (x1, y1) to (u1, v1) and the coordinates of the feature point 2 are (x2, y2) between the image taken last time and the image taken this time. ) To (u2, v2), and the coordinates of the feature point 3 are shifted from (x3, y3) to (u3, v3). In this case, if simultaneous equations are created based on the above-mentioned equation (1), the equations are as shown in equations (10) and (11).

Figure 2020039062
Figure 2020039062
Figure 2020039062
Figure 2020039062

これら式(10)、式(11)の方程式を解くことで、式中のa〜fのアフィン係数を算出することが可能となる。そして、移動量算出回路116cは、4点以上の特徴点が抽出された場合には、それらの中で距離が近い特徴点を除外し、残りの特徴点を最小二乗法により正規化する。一方、3点の特徴点が抽出できなかった場合や、検出された3点の特徴点が直線状に並んでいる場合、あるいは3点のうち2点が近い場合、移動量算出回路116cは、移動量の算出を失敗したと判断する。また画像の特徴点を基に算出した移動量(アフィン係数)と、前述したジャイロ情報724を基に算出した移動量とが大きく異なる場合(例えば移動量の差分が閾値を超える場合)には、画像に繰り返しパターンや移動体が含まれていることが考えられる。このため、画像に基づく移動量とジャイロ情報に基づく移動量とが大きく異なっている場合、移動量算出回路116cは、画像の特徴点を基に算出した移動量をキャンセルして、別の条件下で再度移動量を算出してもよい。また画像に基づく移動量とジャイロ情報に基づく移動量とが大きく異なった場合、マイコン123は、撮影された画像を失敗画像として次の撮影(S606)を行うように制御したり、パノラマ撮影自体が失敗したものとして図6の処理を終了したりしてもよい。一方、画像に基づく移動量とジャイロ情報に基づく移動量との差が閾値未満であり、それら両移動量が略々一致している場合には、S613の処理に進む。   By solving the equations (10) and (11), the affine coefficients a to f in the equations can be calculated. Then, when four or more feature points are extracted, the movement amount calculation circuit 116c excludes feature points having a short distance among them, and normalizes the remaining feature points by the least square method. On the other hand, when three feature points cannot be extracted, when the detected three feature points are arranged in a straight line, or when two of the three points are close to each other, the movement amount calculation circuit 116 c It is determined that the calculation of the movement amount has failed. If the movement amount (affine coefficient) calculated based on the feature points of the image is significantly different from the movement amount calculated based on the gyro information 724 (for example, if the difference between the movement amounts exceeds a threshold), It is possible that the image contains a repetitive pattern or a moving object. For this reason, when the movement amount based on the image is significantly different from the movement amount based on the gyro information, the movement amount calculation circuit 116c cancels the movement amount calculated based on the feature points of the image, and under another condition. The movement amount may be calculated again. If the movement amount based on the image is significantly different from the movement amount based on the gyro information, the microcomputer 123 controls the next photographing (S606) with the photographed image as a failed image, or controls the panoramic photographing itself. The processing in FIG. 6 may be terminated as a failure. On the other hand, if the difference between the movement amount based on the image and the movement amount based on the gyro information is smaller than the threshold value, and the two movement amounts substantially match, the process proceeds to S613.

S613に進むと、位置合わせ回路116dは、移動量算出回路116cが画像を基に算出した移動量(アフィン係数)を基に、N枚目の画像とN−1枚目の画像の位置合わせを行わせる。本実施形態の場合、位置合わせ回路116dでは、アフィン係数を用いたアフィン変換により位置合わせを行う。なお図7の例の場合、位置合わせ回路116dによる位置合わせが行われた後の位置合わせ画像711が得られる。   In step S613, the positioning circuit 116d performs positioning of the Nth image and the (N-1) th image based on the moving amount (affine coefficient) calculated based on the image by the moving amount calculation circuit 116c. Let it do. In the case of the present embodiment, the positioning circuit 116d performs positioning by affine transformation using affine coefficients. In the case of the example of FIG. 7, a registration image 711 after the registration by the positioning circuit 116d is obtained.

次にS614として、合成回路116jは、位置合わせ画像711とそれ以前の合成処理済みの合成画像とを用いた合成処理が行われる。すなわち、画像処理回路116においてN枚目(N>2)の画像の処理が行われている場合、合成回路116jでは、N枚目の位置合わせ画像711と、それ以前のN−1枚目までで合成された合成画像710との合成が行われる。この合成回路116jによる合成画像712が、前述した共通領域を重ね合わせて繋いだ合成画像に相当する。なお、パノラマ撮影される範囲に例えば水面など全体に亘って動きのある被写体が存在する場合には、合成結果の品位が落ちることがあるため、合成される画像の境界部分の合成比率を変えることで品位向上を図ってもよい。   Next, as S614, the synthesizing circuit 116j performs a synthesizing process using the alignment image 711 and the synthesized image that has been subjected to the synthesizing process. That is, when the N-th (N> 2) image processing is being performed in the image processing circuit 116, the combining circuit 116j performs processing on the N-th alignment image 711 and the (N-1) -th image before that. Are synthesized with the synthesized image 710 synthesized in step (1). The composite image 712 by the composite circuit 116j corresponds to a composite image in which the above-described common areas are overlapped and connected. Note that if there is a moving object over the whole area such as the water surface in the panorama shooting range, the quality of the synthesized result may be degraded. To improve the quality.

次にS615において、マイコン123は、SW2が押下されているか否かを判定し、SW2が押下されていると判定した場合には、S606に処理を戻して、次の画像の撮影を行わせる。一方、S615においてSW2が押下されていないと判定した場合、マイコン123は、パノラマ撮影のための画像撮影が終了したと判断してS616に処理を進める。   Next, in step S615, the microcomputer 123 determines whether or not the switch SW2 is pressed. If the microcomputer 123 determines that the switch SW2 is pressed, the process returns to step S606, and the next image is captured. On the other hand, if it is determined in step S615 that the SW2 has not been pressed, the microcomputer 123 determines that the image capturing for panoramic capturing has ended, and proceeds to step S616.

S616に進むと、マイコン123は、画像処理回路116の圧縮・伸長回路116lに対し、合成画像712(パノラマ画像)をJPEG等の汎用フォーマットへ圧縮する処理を行わせる。
その後、S617において、マイコン123は、合成画像712の圧縮データを、メモリコントローラ119を介してメモリ120に保存させる。なお、圧縮処理の前に、合成画像712の暗部を見易くするためにガンマ補正回路116bでγ補正を行ってもよく、また、画像全体の色調を統一するための色調補正を行ってもよい。また、合成画像のサイズが大きい場合には、予めユーザにより指定されたサイズになるように、変倍回路116fによる変倍処理が行われてもよい。さらに、手ぶれなどを考慮し、最大内接矩形或いは予め決められた領域でトリミング回路116gによる切り出しを行ってから、圧縮処理および保存処理を行ってもよい。
In step S616, the microcomputer 123 causes the compression / expansion circuit 116l of the image processing circuit 116 to perform processing for compressing the composite image 712 (panoramic image) into a general-purpose format such as JPEG.
After that, in S617, the microcomputer 123 stores the compressed data of the composite image 712 in the memory 120 via the memory controller 119. Note that, before the compression processing, the gamma correction may be performed by the gamma correction circuit 116b in order to make the dark portion of the composite image 712 easier to see, or the color tone may be corrected to unify the color tone of the entire image. When the size of the synthesized image is large, the scaling process by the scaling circuit 116f may be performed so that the size of the synthesized image becomes the size designated by the user in advance. Further, in consideration of camera shake and the like, compression processing and storage processing may be performed after the trimming circuit 116g cuts out a maximum inscribed rectangle or a predetermined area.

なおここでは、図2(a)に示したようにユーザ200が撮像装置201を正位置(横位置)に構えた状態で水平方向にスイングする例を挙げたが、撮像装置201を縦位置に構えた状態で水平方向にスイングする場合も本実施形態に含まれる。その他にも、ユーザが撮像装置を重力方向(縦方向)等の他の方向にスイングする場合も本実施形態に含まれる。   Here, as shown in FIG. 2A, an example in which the user 200 swings in the horizontal direction while holding the imaging device 201 at the normal position (horizontal position) has been described. This embodiment also includes a case where the player swings in the horizontal direction while holding the player. In addition, the present embodiment also includes a case where the user swings the imaging device in another direction such as the gravity direction (vertical direction).

以上説明したように、本実施形態においては、撮像装置における隣接撮影方向間の移動量をジャイロ情報に基づいて算出し、その算出した移動量を基に仮想円筒の半径を決定している。そして、本実施形態では、仮想円筒の半径を撮影レンズの焦点距離よりも大きくすることで、円筒座標変換によって有効高さが小さくなるのを抑えている。これにより、本実施形態によれば、撮影方向を順次変更して撮影した複数の画像を円筒座標変換して合成する場合において、焦点距離の短いレンズを用いた際の広い画角を維持した合成画像を生成可能となる。   As described above, in the present embodiment, the movement amount between the adjacent photographing directions in the imaging device is calculated based on the gyro information, and the radius of the virtual cylinder is determined based on the calculated movement amount. In this embodiment, the radius of the virtual cylinder is set to be larger than the focal length of the photographing lens, so that the effective height is not reduced by the cylindrical coordinate conversion. Thus, according to the present embodiment, in a case where a plurality of images taken while sequentially changing the shooting direction are combined by cylindrical coordinate conversion and combined, a wide angle of view is maintained while using a lens with a short focal length. Images can be generated.

<第2の実施形態>
次に第2の実施形態について説明する。第2の実施形態に係る撮像装置の構成等は前述同様であるため、その図示と説明は省略する。
前述した第1の実施形態では、図6のフローチャートで説明したように、ジャイロ情報を基にスイング量(移動量)を算出し、その移動量に基づいて仮想円筒の半径を決定していた。これに対し、第2の実施形態では、撮影された画像から移動量を算出し、その移動量に基づいて仮想円筒の半径を決定する。図8には、パノラマ撮影された画像から隣接撮影方向間の移動量を算出し、その移動量に基づいて仮想円筒の半径を決定する処理を含む第2の実施形態のフローチャートを示す。なお、図8においてS801〜S805は前述のS601〜S605と同様であり、またS807はS606と、S808はS609と、S813〜S819はS612〜S619と概ね同様の処理であるため、それらの詳細な説明は省略する。以下、図6のフローチャートとは異なる処理を主に説明する。
<Second embodiment>
Next, a second embodiment will be described. Since the configuration and the like of the imaging apparatus according to the second embodiment are the same as those described above, the illustration and description thereof are omitted.
In the first embodiment described above, as described in the flowchart of FIG. 6, the swing amount (movement amount) is calculated based on the gyro information, and the radius of the virtual cylinder is determined based on the movement amount. On the other hand, in the second embodiment, the movement amount is calculated from the captured image, and the radius of the virtual cylinder is determined based on the movement amount. FIG. 8 shows a flowchart of the second embodiment including a process of calculating a movement amount between adjacent shooting directions from an image captured by panorama shooting and determining a radius of the virtual cylinder based on the movement amount. In FIG. 8, S801 to S805 are the same as S601 to S605 described above, and S807 is substantially the same as S606, S808 is S609, and S813 to S819 are substantially the same as S612 to S619. Description is omitted. Hereinafter, processing different from the flowchart of FIG. 6 will be mainly described.

図8のフローチャートの場合、マイコン123は、S805における歪曲補正処理の後、S806に処理を進める。
S806において、マイコン123は、撮影レンズ101の実焦点距離を仮想円筒の半径に決定し、1枚目の画像について、幾何変換回路116eによる円筒座標変換を行わせる。なお、S806における円筒座標変換は、後述するS810で行われる移動量算出において正確な移動量を算出するために行われる。このS806の後は、S807において前述のS606と同様に2枚目以降の撮影が行われ、次のS808において前述のS609と同様に歪曲補正処理が行われる。
In the case of the flowchart of FIG. 8, the microcomputer 123 advances the processing to S806 after the distortion correction processing in S805.
In step S806, the microcomputer 123 determines the actual focal length of the imaging lens 101 to be the radius of the virtual cylinder, and causes the geometric conversion circuit 116e to perform cylindrical coordinate conversion on the first image. Note that the cylindrical coordinate conversion in S806 is performed in order to calculate an accurate movement amount in a movement amount calculation performed in S810 described later. After S806, the second and subsequent images are captured in S807 in the same manner as in S606, and the distortion correction process is performed in S808 in the same manner as in S609.

S808の後のS809において、マイコン123は、2枚目以降の画像についても、撮影レンズ101の実焦点距離を仮想円筒の半径に決定し、画像処理回路116の幾何変換回路116eによる円筒座標変換を行わせる。このS809における円筒座標変換も、S806と同様に、後述するS810で行われる移動量算出で正確な移動量を算出するために行われる。   In S809 after S808, the microcomputer 123 also determines the actual focal length of the photographing lens 101 to be the radius of the virtual cylinder for the second and subsequent images, and performs cylindrical coordinate conversion by the geometric conversion circuit 116e of the image processing circuit 116. Let it do. Similar to S806, the cylindrical coordinate conversion in S809 is also performed in order to calculate an accurate movement amount by a movement amount calculation performed in S810 described later.

次にS810において、移動量算出回路116cは、前述のように実焦点距離に対応した仮想円筒半径を用いて円筒座標変換がなされた後のN枚目(今回)の画像とN−1枚目(前回)の画像とを用い、前述のS612と同様にして移動量を算出する。   Next, in step S810, the movement amount calculation circuit 116c calculates the Nth (current) image and the (N-1) th image after the cylindrical coordinate conversion is performed using the virtual cylindrical radius corresponding to the actual focal length as described above. Using the (previous) image, the movement amount is calculated in the same manner as in S612.

次にS811において、マイコン123は、S810で画像から算出した移動量を基に、前述した第1の実施形態と同様にして、仮想円筒の半径を算出する。すなわち、第1の実施形態と同様に、焦点距離fを仮想円筒の半径Rにした場合と、仮想円筒の半径Rを焦点距離fよりも大きくした場合とで、画像の上下端で実質的な差が生じない範囲で、つまり閾値未満となる場合に、仮想円筒の半径を大きくする。   Next, in step S811, the microcomputer 123 calculates the radius of the virtual cylinder based on the movement amount calculated from the image in step S810, in the same manner as in the first embodiment. That is, similar to the first embodiment, the case where the focal length f is set to the radius R of the virtual cylinder and the case where the radius R of the virtual cylinder is set to be larger than the focal length f are substantially at the upper and lower ends of the image. When the difference does not occur, that is, when the difference is less than the threshold, the radius of the virtual cylinder is increased.

次にS812において、幾何変換回路116eでは、S811で算出された仮想円筒半径を用い、図6のS611と同様にして円筒座標変換を行う。すなわち、幾何変換回路116eでは、順次撮影された各画像に対し、S811で算出された仮想円筒半径を用いた円筒座標変換を行う。   Next, in step S812, the geometric conversion circuit 116e uses the virtual cylinder radius calculated in step S811 to perform cylindrical coordinate conversion in the same manner as in step S611 in FIG. That is, the geometric transformation circuit 116e performs cylindrical coordinate transformation on each of the sequentially photographed images using the virtual cylinder radius calculated in S811.

次にS813において、移動量算出回路116cは、S812で円筒座標変換がなされた後のN枚目(今回)の画像とN−1枚目(前回)の画像とを用い、前述のS612と同様にして移動量を再算出する。S813で移動量の再計算を行うのは、S810で算出した移動量が実焦点距離の仮想円筒半径で円筒座標変換した画像から得られており、その時の仮想円筒半径はS811で算出した仮想円筒半径とは異なり、その結果、移動量も異なってくるからである。そのため、スイングの速度が速い場合など、S809とS812で円筒座標変換に用いた仮想円筒半径が同じかもしくは許容できる範囲の差である場合には、S813の再計算は省略可能である。また円筒座標変換の違いを考慮して、S809で算出した移動量(アフィン変換の係数)を変換しても良い。   Next, in step S813, the movement amount calculation circuit 116c uses the Nth (current) image and the (N-1) th (previous) image after the cylindrical coordinate conversion has been performed in step S812, in the same manner as in the above-described step S612. And recalculate the movement amount. The movement amount is recalculated in S813 because the movement amount calculated in S810 is obtained from an image obtained by performing cylindrical coordinate conversion with the virtual cylinder radius of the actual focal length, and the virtual cylinder radius at that time is the virtual cylinder calculated in S811. This is because, unlike the radius, the amount of movement also differs as a result. Therefore, if the virtual cylinder radius used in the cylindrical coordinate conversion in S809 and S812 is the same or a difference in an allowable range, such as when the swing speed is high, the recalculation in S813 can be omitted. In addition, the movement amount (coefficient of the affine transformation) calculated in S809 may be transformed in consideration of the difference in the cylindrical coordinate transformation.

その後、S814〜S819では、前述のS613〜S618と同様にして、位置合わせ、合成、終了判定、圧縮、保存、さらにパノラマ撮影の終了までの各処理が行われる。   After that, in steps S814 to S819, in the same manner as in steps S613 to S618 described above, each process of positioning, combining, ending determination, compression, saving, and further ending panoramic shooting is performed.

以上説明したように、第2の実施形態では、撮影された各画像から、スイング時における隣接撮影方向間の移動量を算出し、その移動量を基に仮想円筒の半径を決定している。第2の実施形態の場合も第1の実施形態と同様に、仮想円筒の半径を撮影レンズ101の焦点距離よりも大きくすることにより、円筒座標変換によって有効高さが小さくなるのを最小限に抑えることが可能となる。   As described above, in the second embodiment, the amount of movement between adjacent photographing directions during a swing is calculated from each photographed image, and the radius of the virtual cylinder is determined based on the amount of movement. In the case of the second embodiment, as in the first embodiment, the radius of the virtual cylinder is made larger than the focal length of the photographing lens 101 to minimize the reduction of the effective height due to the cylindrical coordinate conversion. It can be suppressed.

以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。本実施形態は、特に撮像センサや撮影レンズなどを備えず、SDカード等の外部メモリから画像と撮影時のレンズ情報を取得して合成する画像処理装置や、これらの処理をコンピュータ上で動作させるためのプログラム、あるいは記録媒体にも適用可能である。また、実施形態に係る撮像装置はデジタルカメラだけでなく、カメラ機能を備えたスマートフォンやタブレット端末等の各種携帯端末、車載カメラ、工業用カメラなどにも適用可能である。   The preferred embodiments of the present invention have been described above, but the present invention is not limited to these embodiments, and various modifications and changes can be made within the scope of the gist. The present embodiment is not provided with an image sensor or a photographic lens, and operates an image processing apparatus that acquires an image and lens information at the time of image capturing from an external memory such as an SD card and combines them, and operates these processes on a computer. And a recording medium. Further, the imaging apparatus according to the embodiment can be applied to not only a digital camera but also various mobile terminals such as a smartphone and a tablet terminal having a camera function, a vehicle-mounted camera, an industrial camera, and the like.

本実施形態では、前述した実施形態の機能を実現するソフトウェアのプログラムコードを格納した記憶ないし記録媒体を、画像処理装置に供給することでも実現できる。算出部のコンピュータ(または、CPU、MPUなど)が記憶媒体に格納されたプログラムコードを読み出して前述した機能を実行する。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラム、これを格納した記憶媒体は本発明を構成することになる。本発明のプログラムは、所定の結像光学系と所定の撮像部、コンピュータを備えた撮像装置のコンピュータにインストールすることによって、撮像装置を高精度の距離検出が可能なものとすることができる。本発明のコンピュータは、記憶媒体の他、インターネットを通じて頒布することも可能である。   In the present embodiment, the present invention can also be realized by supplying a storage or recording medium storing program codes of software for realizing the functions of the above-described embodiments to an image processing apparatus. A computer (or CPU, MPU, or the like) of the calculation unit reads out the program code stored in the storage medium and executes the above-described function. In this case, the program code itself read from the storage medium implements the functions of the above-described embodiment, and the program and the storage medium storing the program constitute the present invention. By installing the program of the present invention in a computer of an imaging apparatus including a predetermined imaging optical system, a predetermined imaging unit, and a computer, the imaging apparatus can detect a distance with high accuracy. The computer of the present invention can be distributed via the Internet in addition to the storage medium.

上述の実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。即ち、本発明は、その技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。   Each of the above-described embodiments is merely an example of a specific embodiment for carrying out the present invention, and the technical scope of the present invention should not be interpreted in a limited manner. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features.

101:撮影レンズ、112:撮像センサ、116:画像処理回路、116c:移動量算出回路、116d:位置合わせ回路、116e:幾何変換回路、116f:変倍回路、116j:合成回路、116k:現像回路、116l:圧縮・伸長回路、123:マイクロコンピュータ、133:ジャイロセンサ   101: photographing lens, 112: image sensor, 116: image processing circuit, 116c: movement amount calculation circuit, 116d: position adjustment circuit, 116e: geometric conversion circuit, 116f: variable magnification circuit, 116j: synthesis circuit, 116k: development circuit , 116l: compression / expansion circuit, 123: microcomputer, 133: gyro sensor

Claims (15)

撮像装置の撮影方向を順次変更しつつ隣接する撮影方向で共通領域を含むように撮影された複数の画像を取得する取得手段と、
仮想円筒の半径を決定する決定手段と、
前記複数の各画像を、前記仮想円筒に投影された画像に円筒座標変換する変換手段と、
隣接する撮影方向間の移動量を検出する検出手段と、
前記検出された移動量に基づいて、前記円筒座標変換された各画像の位置合わせを行う位置合わせ手段と、
前記位置合わせが行われた各画像の前記共通領域を重ね合わせて各画像を順次つなぐように合成する合成手段と、を有し、
前記決定手段は、前記仮想円筒の半径を前記撮像装置が有する撮影レンズの焦点距離よりも大きい半径に決定することを特徴とする画像処理装置。
Acquisition means for acquiring a plurality of images captured so as to include a common area in adjacent imaging directions while sequentially changing the imaging direction of the imaging device,
Determining means for determining the radius of the virtual cylinder;
A conversion unit that converts the plurality of images into cylindrical coordinates into an image projected on the virtual cylinder,
Detecting means for detecting an amount of movement between adjacent photographing directions;
Based on the detected amount of movement, a positioning unit that performs positioning of each image subjected to the cylindrical coordinate conversion,
Synthesizing means for superimposing the common area of each image subjected to the alignment and synthesizing the images so as to sequentially connect the images,
The image processing apparatus according to claim 1, wherein the determining unit determines a radius of the virtual cylinder to be larger than a focal length of a photographing lens included in the imaging device.
前記決定手段は、少なくとも、前記移動量と、前記撮影レンズの焦点距離とを基に、前記仮想円筒の半径を算出することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the determination unit calculates a radius of the virtual cylinder based on at least the movement amount and a focal length of the photographing lens. 前記決定手段は、前記移動量が第1の閾値よりも小さい場合に、前記仮想円筒の半径を前記焦点距離より大きい半径に決定することを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the determining unit determines the radius of the virtual cylinder to be larger than the focal length when the moving amount is smaller than a first threshold. 前記決定手段は、前記撮影レンズの焦点距離を前記仮想円筒の半径にして前記円筒座標変換を行う場合と、前記仮想円筒の半径を前記撮影レンズの焦点距離より大きい半径にして前記円筒座標変換を行う場合とで、前記合成における前記画像の境界での位置ずれが第2の閾値未満となる場合に、前記仮想円筒の半径を前記焦点距離よりも大きい半径に決定することを特徴とする請求項2に記載の画像処理装置。   The determining means performs the cylindrical coordinate conversion by setting the focal length of the imaging lens to the radius of the virtual cylinder, and performs the cylindrical coordinate conversion by setting the radius of the virtual cylinder to a radius larger than the focal length of the imaging lens. The method according to claim 1, wherein when the position shift at the boundary of the image in the synthesis is smaller than a second threshold, the radius of the virtual cylinder is determined to be larger than the focal length. 3. The image processing device according to 2. 前記決定手段は、
画像の高さをh[pix]、画素ピッチをp[μm]、前記仮想円筒の半径をR[mm]、前記焦点距離をf[mm]、前記移動量を表すベクトルのX成分をx[pix]としたとき、
(h/2)・x・cos{arctan(x・p/R/1000)/2}の式と、
(h/2)・x・cos{arctan(x・p/f/1000)/2}の式と
の差が第2の閾値未満となる場合に、前記仮想円筒の半径を前記の焦点距離よりも大きい半径に決定することを特徴とする請求項4に記載の画像処理装置。
The determining means comprises:
The height of the image is h [pix], the pixel pitch is p [μm], the radius of the virtual cylinder is R [mm], the focal length is f [mm], and the X component of the vector representing the moving amount is x [ pix],
(h / 2) · x · cos {arctan (x · p / R / 1000) / 2},
When the difference from the expression of (h / 2) · x · cos {arctan (x · p / f / 1000) / 2} is smaller than the second threshold, the radius of the virtual cylinder is set to be smaller than the focal length. The image processing apparatus according to claim 4, wherein the radius is determined to be larger.
前記決定手段は、前記撮影レンズの焦点距離が第3の閾値よりも小さい場合に、前記仮想円筒の半径を前記焦点距離よりも大きい半径に決定する処理を実行することを特徴とする請求項1から5のいずれか1項に記載の画像処理装置。   2. The method according to claim 1, wherein the determining unit determines a radius of the virtual cylinder to be larger than the focal length when a focal length of the photographing lens is smaller than a third threshold value. 6. The image processing apparatus according to any one of claims 1 to 5, 前記決定手段は、前記画像ごとに前記仮想円筒の半径を異ならせることを特徴とする請求項1から6のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the determining unit changes a radius of the virtual cylinder for each of the images. 前記決定手段は、1枚目に撮影された画像と最後に撮影された画像との少なくともいずれかの画像と、前記1枚目と前記最後の間に撮影された各画像とで、前記仮想円筒の半径を異ならせることを特徴とする請求項7に記載の画像処理装置。   The deciding means determines the virtual cylinder by using at least one of an image taken first and an image taken last, and each image taken between the first and last images. The image processing apparatus according to claim 7, wherein the radius of the image processing device is changed. 前記検出手段は、前記撮像装置が有する角速度センサからの情報を取得し、前記角速度センサの情報に基づいて、前記移動量を算出することを特徴とする請求項1から8のいずれか1項に記載の画像処理装置。   The apparatus according to claim 1, wherein the detection unit acquires information from an angular velocity sensor included in the imaging device, and calculates the movement amount based on information from the angular velocity sensor. The image processing apparatus according to any one of the preceding claims. 前記検出手段は、隣接した撮影方向で撮影された画像の特徴点を基にさらに移動量を算出し、
前記位置合わせ手段では、前記角速度センサの情報を基に算出された前記移動量と、前記特徴点を基に算出された移動量との差が、第4の閾値未満である場合に、前記特徴点を基に算出された移動量を用いて前記位置合わせを行うことを特徴とする請求項9に記載の画像処理装置。
The detection means further calculates a movement amount based on feature points of images taken in adjacent shooting directions,
In the positioning unit, when a difference between the movement amount calculated based on the information of the angular velocity sensor and the movement amount calculated based on the feature point is less than a fourth threshold value, The image processing apparatus according to claim 9, wherein the positioning is performed using a movement amount calculated based on a point.
前記検出手段は、隣接した異なる撮影方向で撮影された画像の特徴点と、前記撮影レンズの焦点距離と、前記撮像装置が有する撮像素子のサイズおよび画素数の情報とを基に、前記移動量を算出することを特徴とする請求項1から8のいずれか1項に記載の画像処理装置。   The detection unit is configured to determine the amount of movement based on feature points of images photographed in adjacent different photographing directions, a focal length of the photographing lens, and information on the size and the number of pixels of an image sensor included in the image capturing apparatus. The image processing apparatus according to claim 1, wherein is calculated. 前記検出手段は、前記焦点距離を前記半径とした仮想円筒による前記円筒座標変換が行われた後の前記画像の特徴点を基に移動量を算出し、
前記決定手段は、前記算出された移動量と、前記焦点距離と、前記撮像素子のサイズおよび画素数の情報とを基に、前記焦点距離よりも大きい前記仮想円筒の半径を決定し、
さらに前記検出手段は、前記決定された半径の仮想円筒による前記円筒座標変換が行われた後の前記画像の特徴点を基に前記移動量を再計算することを特徴とする請求項11に記載の画像処理装置。
The detection means calculates a movement amount based on the feature points of the image after the cylindrical coordinate conversion by the virtual cylinder having the focal length as the radius,
The determining unit determines the radius of the virtual cylinder larger than the focal length based on the calculated movement amount, the focal length, and information on the size and the number of pixels of the image sensor.
12. The apparatus according to claim 11, wherein the detection unit recalculates the movement amount based on a feature point of the image after the cylindrical coordinate conversion by the virtual cylinder having the determined radius is performed. Image processing device.
撮影レンズによる光学像を撮像する撮像素子と、
所定の時間ごとに連続して画像を撮像する制御を行う制御手段と、
請求項1から12のいずれか1項に記載の画像処理装置と、
を有することを特徴とする撮像装置。
An image sensor that captures an optical image by a taking lens;
Control means for performing control to continuously capture images at predetermined time intervals,
An image processing apparatus according to any one of claims 1 to 12,
An imaging device comprising:
撮像装置の撮影方向を順次変更しつつ隣接する撮影方向で共通領域を含むように撮影された複数の画像を取得する取得工程と、
仮想円筒の半径を決定する決定工程と、
前記複数の各画像を、前記仮想円筒に投影された画像に円筒座標変換する変換工程と、
隣接する撮影方向間の移動量を検出する検出工程と、
前記検出された移動量に基づいて、前記円筒座標変換された各画像の位置合わせを行う位置合わせ工程と、
前記位置合わせが行われた各画像の前記共通領域を重ね合わせて各画像を順次つなぐように合成する合成工程と、を有し、
前記決定工程では、前記仮想円筒の半径を前記撮像装置が有する撮影レンズの焦点距離よりも大きい半径に決定することを特徴とする画像処理装置の画像処理方法。
An acquisition step of acquiring a plurality of images photographed so as to include a common area in adjacent photographing directions while sequentially changing the photographing direction of the imaging device,
A determining step of determining the radius of the virtual cylinder;
A conversion step of converting the plurality of images into cylindrical coordinates into an image projected on the virtual cylinder,
A detecting step of detecting a moving amount between adjacent photographing directions;
Based on the detected movement amount, a positioning step of performing positioning of each image subjected to the cylindrical coordinate conversion,
A synthesizing step of superimposing the common area of each of the images subjected to the alignment and synthesizing the images so as to sequentially connect the images,
In the determining step, a radius of the virtual cylinder is determined to be larger than a focal length of a photographing lens included in the imaging device.
コンピュータを、請求項1から13のいずれか1項に記載の画像処理装置の各手段として機能させるためのプログラム。   A program for causing a computer to function as each unit of the image processing apparatus according to any one of claims 1 to 13.
JP2018165718A 2018-09-05 2018-09-05 Image processing device, image processing method, and program Active JP7106399B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018165718A JP7106399B2 (en) 2018-09-05 2018-09-05 Image processing device, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018165718A JP7106399B2 (en) 2018-09-05 2018-09-05 Image processing device, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2020039062A true JP2020039062A (en) 2020-03-12
JP7106399B2 JP7106399B2 (en) 2022-07-26

Family

ID=69738321

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018165718A Active JP7106399B2 (en) 2018-09-05 2018-09-05 Image processing device, image processing method, and program

Country Status (1)

Country Link
JP (1) JP7106399B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001184484A (en) * 1999-12-24 2001-07-06 Sanyo Electric Co Ltd Image synthesizing method and computer readable recording medium with recorded image synthesizing program
JP2013012893A (en) * 2011-06-29 2013-01-17 Panasonic Corp Image converter, camera, image conversion method and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001184484A (en) * 1999-12-24 2001-07-06 Sanyo Electric Co Ltd Image synthesizing method and computer readable recording medium with recorded image synthesizing program
JP2013012893A (en) * 2011-06-29 2013-01-17 Panasonic Corp Image converter, camera, image conversion method and program

Also Published As

Publication number Publication date
JP7106399B2 (en) 2022-07-26

Similar Documents

Publication Publication Date Title
JP6659130B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP7030442B2 (en) Image processing equipment, image processing methods, and programs
JP2007043637A (en) Image pick-up apparatus, image pick-up program, and image processing program
US20110109771A1 (en) Image capturing appratus and image capturing method
JP7174120B2 (en) IMAGING DEVICE, PROGRAM, RECORDING MEDIUM, AND CONTROL METHOD
JP5203657B2 (en) Camera with enlarged display function
CN110891140B (en) Image pickup apparatus, image processing apparatus, control method therefor, and storage medium
JP5495598B2 (en) Imaging apparatus and control method thereof
JP5693664B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM
JP7169773B2 (en) IMAGING DEVICE, CONTROL METHOD THEREOF, AND PROGRAM
JP7106399B2 (en) Image processing device, image processing method, and program
JP7102301B2 (en) Imaging device and its control method, and program
JP6869841B2 (en) Image processing device, control method of image processing device, and program
JP7051586B2 (en) Imaging equipment, imaging methods and programs
JP7100535B2 (en) Image pickup device and image processing device, their control method, program, storage medium
JP5027029B2 (en) Camera with enlargement display function and camera control method
JP2002305676A (en) Electronic camera
JP7225281B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, COMPUTER PROGRAM AND RECORDING MEDIUM
JP2019009574A (en) Image processing apparatus
JP2010268029A (en) Digital camera
JP2006229697A (en) Image pickup device
JP2021129169A (en) Rotation position correction device and rotation position correction method
JP2014049960A (en) Imaging device, control method therefor, and program
JP2002305675A (en) Electronic camera and camera system
JP2009229982A (en) Camera with live viewing display function, and method of controlling camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210720

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220601

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20220614

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220713

R151 Written notification of patent or utility model registration

Ref document number: 7106399

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151