JP2016006674A - Image processor, program, image processing method and imaging system - Google Patents

Image processor, program, image processing method and imaging system Download PDF

Info

Publication number
JP2016006674A
JP2016006674A JP2015162099A JP2015162099A JP2016006674A JP 2016006674 A JP2016006674 A JP 2016006674A JP 2015162099 A JP2015162099 A JP 2015162099A JP 2015162099 A JP2015162099 A JP 2015162099A JP 2016006674 A JP2016006674 A JP 2016006674A
Authority
JP
Japan
Prior art keywords
image
template
images
feature amount
connection position
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
JP2015162099A
Other languages
Japanese (ja)
Other versions
JP6079838B2 (en
Inventor
竹中 博一
Hiroichi Takenaka
博一 竹中
啓一 河口
Keiichi Kawaguchi
啓一 河口
吉田 和弘
Kazuhiro Yoshida
和弘 吉田
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2015162099A priority Critical patent/JP6079838B2/en
Publication of JP2016006674A publication Critical patent/JP2016006674A/en
Application granted granted Critical
Publication of JP6079838B2 publication Critical patent/JP6079838B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To provide an image processor for compositing a plurality of input images, and to provide a program, an image processing method and an imaging system.SOLUTION: This image processor 10 includes feature amount acquisition means 234 for acquiring a feature amount of a prescribed object image in a first input image, connection position detection means 246 for detecting a connection position between the first input image and a second input image with a system corresponding to the feature amount, and composition means 212 for compositing the first input image and the second input image at the connection position.

Description

本発明は、画像処理装置、プログラム、画像処理方法および撮像システムに関し、より詳細には、複数の入力画像をつなぎ合わせるための画像処理装置、プログラム、画像処理方法および撮像システムに関する。   The present invention relates to an image processing device, a program, an image processing method, and an imaging system, and more particularly to an image processing device, a program, an image processing method, and an imaging system for joining a plurality of input images.

魚眼レンズや超広角レンズなどの広角なレンズを複数使用して全方位(以下、全天球という。)を一度に撮像する全天球撮像システムが知られている。上記全天球撮像システムでは、各々のレンズからの像をセンサ面に投影し、得られる各画像を画像処理によって結合することで、全天球画像を生成する。例えば、180度を超える画角を有する2つの広角なレンズを用いて、全天球画像を生成することができる。   2. Description of the Related Art An omnidirectional imaging system is known that uses a plurality of wide-angle lenses such as fish-eye lenses and super-wide-angle lenses to image omnidirectional (hereinafter referred to as omnidirectional sphere) at once. In the omnidirectional imaging system, an image from each lens is projected onto the sensor surface, and the obtained images are combined by image processing to generate an omnidirectional image. For example, an omnidirectional image can be generated using two wide-angle lenses having an angle of view exceeding 180 degrees.

上記画像処理では、各レンズ光学系により撮影された部分画像に対して、所定の射影モデルに基づいて、また理想的なモデルからの歪みを考慮して、歪み補正および射影変換を施す。そして、部分画像に含まれる重複部分を用いて部分画像をつなぎ合わせ、1枚の全天球画像とする処理が行われる。画像をつなぎ合わせる処理においては、部分画像間の重複部分において、パターンマッチングなどを用いて被写体が重なるつなぎ位置が検出される。   In the image processing, distortion correction and projective transformation are performed on the partial images captured by each lens optical system based on a predetermined projection model and taking into account distortion from an ideal model. Then, the partial images are connected using the overlapping portions included in the partial images, and processing to form one omnidirectional image is performed. In the process of joining the images, a joining position where the subject overlaps is detected using pattern matching or the like in the overlapping part between the partial images.

しかしながら、従来技術のパターンマッチングによるつなぎ位置検出技術では、マッチングを行う対象領域が、その画像が平坦であったり、同じ模様が繰り返された領域であったりして特徴が少ない場合に、適切なつなぎ位置を検出することが難しかった。このため、部分画像を良好につなぎ合わせることができず、得られる全天球画像の品質が低下してしまう可能性があった。   However, with the joint position detection technique based on the conventional pattern matching, if the target area to be matched is a flat area or an area in which the same pattern is repeated, and there are few features, the appropriate joint area is detected. It was difficult to detect the position. For this reason, the partial images cannot be stitched well, and the quality of the obtained omnidirectional image may be deteriorated.

複数のカメラを用いて撮像された複数の部分画像をつなぎ合わせる種々の技術が知られている。例えば、特開2001−148779号公報(特許文献1)は、パターンマッチングを行う際に、不適切なマッチング領域が使用されることに起因するパターンマッチングの誤りを回避し、高精度に画像の合成を行うことを目的とした画像処理装置を開示する。特許文献1の従来技術では、マッチング領域抽出部によって抽出されたマッチング領域に対し、そのマッチング領域が適切か否かの判定を行い、不適切なマッチング領域については再度抽出をやり直すよう構成されている。また、パターンマッチング部によるマッチング結果についても、その適否を判定し、マッチング結果が適切でなければ、マッチング領域の抽出をやり直すよう構成されている。   Various techniques for connecting a plurality of partial images captured using a plurality of cameras are known. For example, Japanese Patent Laid-Open No. 2001-148777 (Patent Document 1) avoids pattern matching errors caused by using inappropriate matching regions when performing pattern matching, and synthesizes images with high accuracy. An image processing apparatus intended to perform the above is disclosed. The prior art of Patent Document 1 is configured to determine whether or not the matching area is appropriate for the matching area extracted by the matching area extraction unit, and perform extraction again for an inappropriate matching area. . Further, the matching result by the pattern matching unit is also determined as to whether or not the matching result is appropriate, and if the matching result is not appropriate, extraction of the matching region is performed again.

上記特許文献1の従来技術は、マッチング領域として相応しくない領域、例えば、全面白画素や黒画素の領域や、縦方向、横方向、斜め方向に連続する直線が存在する領域を事前に除去してパターンマッチングを行うことにより、画像の合成の精度を向上させている。   The prior art disclosed in Patent Document 1 removes in advance areas that are not suitable as matching areas, such as areas of white pixels and black pixels, and areas where straight lines that continue in the vertical, horizontal, and diagonal directions exist. By performing pattern matching, the accuracy of image synthesis is improved.

しかしながら、上記特許文献1の従来技術は、マッチング領域が不適切な場合にはマッチング領域を再抽出するという技術である。このため、不適切と判断したマッチング領域に対する適切なつなぎ位置を決定することは依然として難しかった。   However, the prior art disclosed in Patent Document 1 is a technique of re-extracting a matching area when the matching area is inappropriate. For this reason, it is still difficult to determine an appropriate connection position with respect to the matching area determined to be inappropriate.

本発明は、上記従来技術の不充分な点に鑑みてなされたものであり、本発明は、複数の入力画像を合成する場合に、入力画像の所定の対象画像の特徴量に応じた適切なつなぎ位置を検出し、検出したつなぎ位置で合成することが可能な画像処理装置、プログラム、画像処理方法および撮像システムを提供することを目的とする。   The present invention has been made in view of the insufficiency of the prior art described above, and the present invention is suitable for combining a plurality of input images according to the feature amount of a predetermined target image of the input images. An object of the present invention is to provide an image processing device, a program, an image processing method, and an imaging system capable of detecting a connection position and combining them at the detected connection position.

本発明では、上記課題を解決するために、下記特徴を有する、複数の入力画像を合成するための画像処理装置を提供する。本画像処理装置は、第1の入力画像における所定の対象画像の特徴量を取得する特徴量取得手段と、上記特徴量に応じた方式で、上記第1の入力画像と2の入力画像のつなぎ位置を検出するつなぎ位置検出手段と、上記つなぎ位置で上記第1の入力画像と上記第2の入力画像を合成する合成手段とを含む。   In order to solve the above-mentioned problems, the present invention provides an image processing apparatus for synthesizing a plurality of input images having the following characteristics. The image processing apparatus includes a feature amount acquisition unit that acquires a feature amount of a predetermined target image in the first input image, and a connection between the first input image and the second input image by a method according to the feature amount. A connecting position detecting means for detecting a position; and a combining means for combining the first input image and the second input image at the connecting position.

上記構成によれば、複数の入力画像を合成する場合に、入力画像の所定の対象画像の特徴量に応じた適切なつなぎ位置を検出し、検出したつなぎ位置で合成することが可能となる。   According to the above configuration, when combining a plurality of input images, it is possible to detect an appropriate connection position according to the feature amount of a predetermined target image of the input image and combine the detected input positions.

本実施形態による全天球撮像システムを示す断面図。A sectional view showing an omnidirectional imaging system by this embodiment. 本実施形態による全天球撮像システムのハードウェア構成図。The hardware block diagram of the omnidirectional imaging system by this embodiment. 本実施形態による全天球撮像システムにおける画像処理全体の流れを示す図。The figure which shows the flow of the whole image processing in the omnidirectional imaging system by this embodiment. 本実施形態による全天球撮像システム上に実現される全天球画像合成処理の主要な機能ブロック図。The main functional block diagram of the omnidirectional image synthetic | combination process implement | achieved on the omnidirectional imaging system by this embodiment. 本実施形態による全天球撮像システムが実行する、全天球画像合成処理の全体的な流れを示すフローチャート。The flowchart which shows the whole flow of the omnidirectional image synthesis process which the omnidirectional imaging system by this embodiment performs. 魚眼レンズを用いた全天球撮像システムにおける射影関係を説明する図。The figure explaining the projection relationship in the omnidirectional imaging system using a fisheye lens. 本実施形態で用いられる全天球画像フォーマットの画像データのデータ構造を説明する図。The figure explaining the data structure of the image data of the omnidirectional image format used by this embodiment. 位置検出用歪み補正部および画像合成用歪み補正部が参照する変換データを説明する図。The figure explaining the conversion data which the distortion correction part for position detection and the distortion correction part for image composition refer to. 位置検出処理の際における2つの魚眼レンズで撮像された2つの部分画像の球面座標系へのマッピングを説明する図。The figure explaining the mapping to the spherical coordinate system of the two partial images imaged with the two fisheye lenses in the case of a position detection process. 本実施形態によるつなぎ位置検出部の機能ブロック図。The functional block diagram of the connection position detection part by this embodiment. 特定の実施形態によるテンプレート特徴量算出部のブロック図。The block diagram of the template feature-value calculation part by specific embodiment. 本実施形態による全天球撮像システムが実行する、つなぎ位置検出処理を示すフローチャート。The flowchart which shows the joint position detection process which the omnidirectional imaging system by this embodiment performs. 本実施形態によるテンプレート生成部によるテンプレート画像の生成方法を説明する図。The figure explaining the production | generation method of the template image by the template production | generation part by this embodiment. (A)本実施形態によるテンプレート画像の順位付け、および(B,C)本実施形態による仮位置算出部が行う順位付けに基づくテンプレート画像の仮位置の算出方法を説明する図。The figure explaining the calculation method of the temporary position of the template image based on ranking of the template image by this embodiment and (B, C) the ranking performed by the temporary position calculation part by this embodiment. 本実施形態による探索範囲設定部が行う探索範囲の設定方法を説明する図。The figure explaining the setting method of the search range which the search range setting part by this embodiment performs. 本実施形態による全天球撮像システムが実行する(A)マッチング計算処理および(B)スコア補正処理を示すフローチャート。The flowchart which shows the (A) matching calculation process and the (B) score correction process which the omnidirectional imaging system by this embodiment performs. (A)テンプレート画像と、(B)パターンマッチングにより探索範囲でテンプレート画像を探索する処理を説明する図。The figure explaining the process which searches a template image in a search range by (A) template image and (B) pattern matching. (A)オフセット関数のグラフ、並びに(B,C)補正前のスコアおよび補正後のスコアを探索位置でプロットしたグラフを補正前のスコアに基づくマッチング位置および補正後のスコアに基づくマッチング位置とともに示す図。(A) A graph of an offset function, and (B, C) a graph in which the score before correction and the score after correction are plotted at the search position are shown together with the matching position based on the score before correction and the matching position based on the score after correction. Figure. 本実施形態において、つなぎ位置検出部により生成される検出結果データのデータ構造を示す図。The figure which shows the data structure of the detection result data produced | generated by the connection position detection part in this embodiment. 本実施形態のつなぎ位置検出部による検出結果データを生成する処理を説明する図。The figure explaining the process which produces | generates the detection result data by the connection position detection part of this embodiment. 本実施形態による全天球撮像システムが実行する、画像合成用変換テーブルの生成処理を示すフローチャート。5 is a flowchart showing processing for generating an image composition conversion table executed by the omnidirectional imaging system according to the present embodiment. 画像合成処理の際における2つの魚眼レンズで撮像された2つの部分画像の球面座標系へのマッピングを説明する図。The figure explaining the mapping to the spherical coordinate system of the two partial images imaged with the two fisheye lenses in the case of an image synthesis process. 他の実施形態における全天球撮像システムの概略図。Schematic of the omnidirectional imaging system in other embodiments. 他の実施形態における全天球撮像システムにおける全天球画像合成処理の全体的な流れを示すフローチャート図。The flowchart figure which shows the whole flow of the omnidirectional image synthetic | combination process in the omnidirectional imaging system in other embodiment.

以下、本発明の実施形態について説明するが、本発明の実施形態は、以下に説明する実施形態に限定されるものではない。なお、以下の実施形態では、画像処理装置および撮像システムの一例として、2つの魚眼レンズを光学系に含む撮像体を備えるとともに、2つの魚眼レンズで自身が撮像した2つの部分画像に対し歪曲補正および射影変換を行い、画像つなぎ合わせを行って、全天球画像を生成する画像処理機能を備えた、全天球撮像システム10を用いて説明する。   Hereinafter, although embodiment of this invention is described, embodiment of this invention is not limited to embodiment described below. In the following embodiments, as an example of an image processing apparatus and an imaging system, an imaging body including two fisheye lenses is included in an optical system, and distortion correction and projection are performed on two partial images captured by the two fisheye lenses themselves. A description will be given using an omnidirectional imaging system 10 having an image processing function for performing conversion, image joining, and generating an omnidirectional image.

[全体構成]
以下、図1〜図3を参照しながら、本実施形態による全天球撮像システムの全体構成について説明する。図1は、本実施形態による全天球撮像システム(以下、単に、撮像システムと参照する。)10を示す断面図である。図1に示す撮像システム10は、撮像体12と、上記撮像体12およびコントローラやバッテリなどの部品を保持する筐体14と、上記筐体14に設けられたシャッター・ボタン18とを備える。図1に示す撮像体12は、2つの結像光学系20A,20Bと、CCD(Charge Coupled Device)センサやCMOS(Complementary Metal Oxide Semiconductor)センサなどの2つの固体撮像素子22A,22Bとを含む。結像光学系20と固体撮像素子22とを1個ずつ組み合わせたものを撮像光学系と参照する。結像光学系20各々は、例えば6群7枚の魚眼レンズとして構成することができる。上記魚眼レンズは、図1に示す実施形態では、180度(=360度/n;n=2)より大きい全画角を有し、好適には、185度以上の画角を有し、より好適には、190度以上の画角を有する。
[overall structure]
Hereinafter, the overall configuration of the omnidirectional imaging system according to the present embodiment will be described with reference to FIGS. FIG. 1 is a sectional view showing an omnidirectional imaging system (hereinafter simply referred to as an imaging system) 10 according to the present embodiment. An imaging system 10 illustrated in FIG. 1 includes an imaging body 12, a casing 14 that holds the imaging body 12, and components such as a controller and a battery, and a shutter button 18 provided on the casing 14. The imaging body 12 shown in FIG. 1 includes two imaging optical systems 20A and 20B and two solid-state imaging elements 22A and 22B such as a CCD (Charge Coupled Device) sensor and a CMOS (Complementary Metal Oxide Semiconductor) sensor. A combination of the imaging optical system 20 and the solid-state imaging element 22 one by one is referred to as an imaging optical system. Each of the imaging optical systems 20 can be configured as, for example, six groups of seven fisheye lenses. In the embodiment shown in FIG. 1, the fisheye lens has a total angle of view greater than 180 degrees (= 360 degrees / n; n = 2), and preferably has an angle of view of 185 degrees or more. Has an angle of view of 190 degrees or more.

2つの結像光学系20A,20Bの光学素子(レンズ、プリズム、フィルタおよび開口絞り)は、固体撮像素子22A,22Bに対して位置関係が定められる。位置決めは、結像光学系20A,20Bの光学素子の光軸が、対応する固体撮像素子22の受光領域の中心部に直交して位置するように、かつ、受光領域が、対応する魚眼レンズの結像面となるように行われる。固体撮像素子22各々は、受光領域が面積エリアを成す2次元の固体撮像素子であり、組み合わせられる結像光学系20により集光された光を画像信号に変換する。   The optical elements (lens, prism, filter, and aperture stop) of the two imaging optical systems 20A and 20B have a positional relationship with respect to the solid-state imaging elements 22A and 22B. Positioning is performed so that the optical axes of the optical elements of the imaging optical systems 20A and 20B are positioned perpendicular to the center of the light receiving area of the corresponding solid-state imaging element 22, and the light receiving area is connected to the corresponding fisheye lens. It is performed so that it becomes an image plane. Each of the solid-state imaging elements 22 is a two-dimensional solid-state imaging element in which a light receiving region forms an area area, and converts the light collected by the combined imaging optical system 20 into an image signal.

図1に示す実施形態では、結像光学系20A,20Bは、同一仕様のものであり、それぞれの光軸が合致するようにして、互いに逆向きに組み合わせられる。固体撮像素子22A,22Bは、受光した光分布を画像信号に変換して、図示しないコントローラ上の画像処理手段に出力する。画像処理手段では、詳細は後述するが、固体撮像素子22A,22Bからそれぞれ入力される部分画像をつなぎ合わせて合成し、立体角4πラジアンの画像(以下「全天球画像」と参照する。)を生成する。全天球画像は、撮影地点から見渡すことのできる全ての方向を撮影したものとなる。ここで、図1に示す実施形態では、全天球画像を生成しているが、水平面のみ360度を撮影した、いわゆるパノラマ画像であってもよい。   In the embodiment shown in FIG. 1, the imaging optical systems 20A and 20B have the same specifications, and are combined in opposite directions so that their optical axes match. The solid-state imaging elements 22A and 22B convert the received light distribution into image signals and output them to image processing means on a controller (not shown). Although the details will be described later in the image processing means, the partial images respectively input from the solid-state image pickup devices 22A and 22B are connected and combined to form an image with a solid angle of 4π radians (hereinafter referred to as “global celestial image”). Is generated. The omnidirectional image is an image of all directions that can be seen from the shooting point. Here, in the embodiment shown in FIG. 1, the omnidirectional image is generated, but a so-called panoramic image obtained by photographing 360 degrees only on the horizontal plane may be used.

また、ここで、固体撮像素子22A,22Bの走査方向を、互いに一致させることで、各々の撮像画像をつなぎ合わせやすくすることができる。つまり、それぞれの固体撮像素子22の走査方向と順序を、互いにつなぎ合わせる部分で一致させることで、互いのカメラの境界にある物体、特に、移動物体のつなぎ合わせに効果が得られる。例えば、固体撮像素子22Aで撮影された撮像画像の左上の部分と、固体撮像素子22Bで撮影された撮像画像の左下の部分が、画像のつなぎ合わせる部分として一致する場合は、固体撮像素子22Aの走査は、固体撮像素子の上から下に向かって、右から左に走査する。一方、固体撮像素子22Bの走査は、固体撮像素子の下から上に向かって、右から左に走査する。このように、画像のつなぎ合わせる部分に基づいて、各固体撮像素子22の走査方向を一致させるように制御することで、つなぎ合わせ易いという効果が得られる。   Here, the captured images can be easily joined by matching the scanning directions of the solid-state imaging devices 22A and 22B to each other. That is, by matching the scanning direction and order of the solid-state imaging elements 22 at the portions where they are connected to each other, it is possible to obtain an effect for connecting objects located at the boundaries of the cameras, particularly moving objects. For example, when the upper left part of the captured image captured by the solid-state image sensor 22A and the lower left part of the captured image captured by the solid-state image sensor 22B coincide with each other as a part where the images are joined, the solid-state image sensor 22A The scanning is performed from right to left from the top to the bottom of the solid-state imaging device. On the other hand, the solid-state image sensor 22B scans from the right to the left from the bottom to the top of the solid-state image sensor. As described above, by controlling so that the scanning directions of the respective solid-state imaging devices 22 coincide with each other based on the portion where the images are to be joined, an effect that the joining is easy can be obtained.

上述したように、魚眼レンズが180度を超える全画角を有するため、全天球画像を構成する際には、各撮像光学系による撮影画像において、重複する画像部分が、同一像を表す基準データとして画像つなぎ合わせの参考とされる。生成された全天球画像は、例えば、撮像体12に備えられる、または撮像体12に接続されているディスプレイ装置、印刷装置、SD(登録商標)カードやコンパクトフラッシュ(登録商標)などの外部記憶媒体などに出力される。   As described above, since the fisheye lens has a total angle of view exceeding 180 degrees, when composing an omnidirectional image, reference data in which overlapping image portions represent the same image in the captured images by the respective imaging optical systems. As a reference for stitching images together. The generated omnidirectional image is, for example, an external storage such as a display device, a printing device, an SD (registered trademark) card, or a compact flash (registered trademark) provided in or connected to the imaging body 12. Output to media.

図2は、本実施形態による撮像システム10のハードウェア構成を示す。撮像システム10は、デジタル・スチルカメラ・プロセッサ(以下、単にプロセッサと参照する。)100と、鏡胴ユニット102と、プロセッサ100に接続される種々のコンポーネントから構成される。鏡胴ユニット102は、上述した2組のレンズ光学系20A,20Bと、固体撮像素子22A,22Bとを有する。固体撮像素子22は、プロセッサ100内の後述するCPU130からの制御指令により制御される。   FIG. 2 shows a hardware configuration of the imaging system 10 according to the present embodiment. The imaging system 10 includes a digital still camera processor (hereinafter simply referred to as a processor) 100, a lens barrel unit 102, and various components connected to the processor 100. The lens barrel unit 102 includes the two sets of lens optical systems 20A and 20B and the solid-state imaging elements 22A and 22B. The solid-state imaging device 22 is controlled by a control command from a CPU 130 described later in the processor 100.

プロセッサ100は、ISP(Image Signal Processor)108と、DMAC(Direct Memory Access Controller)110と、メモリアクセスの調停のためのアービタ(ARBMEMC)112と、メモリアクセスを制御するMEMC(Memory Controller)114と、歪曲補正・画像合成ブロック118とを含む。ISP108A,108Bは、それぞれ、固体撮像素子22A,22Bの信号処理を経て入力された画像データに対し、ホワイト・バランス設定やガンマ設定を行う。MEMC114には、SDRAM116が接続される。SDRAM116には、ISP108A,180Bおよび歪曲補正・画像合成ブロック118において処理を施す際にデータが一時的に保存される。歪曲補正・画像合成ブロック118は、2つの撮像光学系から得られた2つの部分画像に対し、3軸加速度センサ120からの情報を利用して、歪曲補正とともに天地補正を施し、画像合成する。   The processor 100 includes an ISP (Image Signal Processor) 108, a DMAC (Direct Memory Access Controller) 110, an arbiter (ARBMEMC) 112 for arbitrating memory access, a MEMC (Memory Controller) 114 for controlling memory access, And a distortion correction / image synthesis block 118. The ISPs 108A and 108B perform white balance setting and gamma setting on the image data input through the signal processing of the solid-state imaging devices 22A and 22B, respectively. The SDRAM 116 is connected to the MEMC 114. Data is temporarily stored in the SDRAM 116 when processing is performed in the ISPs 108A and 180B and the distortion correction / image synthesis block 118. The distortion correction / image synthesis block 118 performs distortion correction and top-and-bottom correction on the two partial images obtained from the two imaging optical systems using the information from the three-axis acceleration sensor 120 to synthesize an image.

プロセッサ100は、さらに、DMAC122と、画像処理ブロック124と、CPU130と、画像データ転送部126と、SDRAMC128と、メモリカード制御ブロック140と、USBブロック146と、ペリフェラル・ブロック150と、音声ユニット152と、シリアルブロック158と、LCD(Liquid Crystal Display)ドライバ162と、ブリッジ168とを含む。   The processor 100 further includes a DMAC 122, an image processing block 124, a CPU 130, an image data transfer unit 126, an SDRAM C 128, a memory card control block 140, a USB block 146, a peripheral block 150, and an audio unit 152. Serial block 158, LCD (Liquid Crystal Display) driver 162, and bridge 168.

CPU130は、当該撮像システム10の各部の動作を制御する。画像処理ブロック124は、リサイズブロック132、JPEGブロック134、H.264ブロック136などを用いて、画像データに対し各種画像処理を施す。リサイズブロック132は、画像データのサイズを補間処理により拡大または縮小するためのブロックである。JPEGブロック134は、JPEG圧縮および伸張を行うコーデック・ブロックである。H.264ブロック136は、H.264などの動画圧縮および伸張を行うコーデック・ブロックである。画像データ転送部126は、画像処理ブロック124で画像処理された画像を転送する。SDRAMC128は、プロセッサ100に接続されるSDRAM138制御し、SDRAM138には、プロセッサ100内で画像データに各種処理を施す際に、画像データを一時的に保存する。   The CPU 130 controls the operation of each unit of the imaging system 10. The image processing block 124 includes a resize block 132, a JPEG block 134, an H.264 image, and an H.264 image. Various image processing is performed on the image data using a H.264 block 136 or the like. The resize block 132 is a block for enlarging or reducing the size of the image data by interpolation processing. The JPEG block 134 is a codec block that performs JPEG compression and expansion. H. H.264 block 136 is an H.264 block. It is a codec block that performs video compression and decompression such as H.264. The image data transfer unit 126 transfers the image processed by the image processing block 124. The SDRAM C 128 controls the SDRAM 138 connected to the processor 100, and the SDRAM 138 temporarily stores image data when various processes are performed on the image data in the processor 100.

メモリカード制御ブロック140は、メモリカードスロット142に挿入されたメモリカードおよびフラッシュROM144に対する読み書きを制御する。メモリカードスロット142は、撮像システム10にメモリカードを着脱可能に装着するためのスロットである。USBブロック146は、USBコネクタ148を介して接続されるパーソナル・コンピュータなどの外部機器とのUSB通信を制御する。ペリフェラル・ブロック150には、電源スイッチ166が接続される。音声ユニット152は、ユーザが音声信号を入力するマイク156と、記録された音声信号を出力するスピーカ154とに接続され、音声入出力を制御する。シリアルブロック158は、パーソナル・コンピュータなどの外部機器とのシリアル通信を制御し、無線NIC(Network Interface Card)160が接続される。LCDドライバ162は、LCDモニタ164を駆動するドライブ回路であり、LCDモニタ164に各種状態を表示するための信号に変換する。   The memory card control block 140 controls reading and writing with respect to the memory card inserted into the memory card slot 142 and the flash ROM 144. The memory card slot 142 is a slot for detachably attaching a memory card to the imaging system 10. The USB block 146 controls USB communication with an external device such as a personal computer connected via the USB connector 148. A power switch 166 is connected to the peripheral block 150. The audio unit 152 is connected to a microphone 156 from which a user inputs an audio signal and a speaker 154 from which a recorded audio signal is output, and controls audio input / output. The serial block 158 controls serial communication with an external device such as a personal computer, and is connected with a wireless NIC (Network Interface Card) 160. The LCD driver 162 is a drive circuit that drives the LCD monitor 164 and converts it into a signal for displaying various states on the LCD monitor 164.

フラッシュROM144には、CPU130が解読可能なコードで記述された制御プログラムや各種パラメータが格納される。電源スイッチ166の操作によって電源がオン状態になると、上記制御プログラムがメインメモリにロードされる。CPU130は、メインメモリに読み込まれたプログラムに従って、装置各部の動作を制御するとともに、制御に必要なデータをSDRAM138と、図示しないローカルSRAMとに一時的に保存する。   The flash ROM 144 stores a control program and various parameters described by codes that can be read by the CPU 130. When the power is turned on by operating the power switch 166, the control program is loaded into the main memory. The CPU 130 controls the operation of each part of the apparatus according to a program read into the main memory, and temporarily stores data necessary for control in the SDRAM 138 and a local SRAM (not shown).

図3は、本実施形態による撮像システム10における画像処理全体の流れを示す図である。まず、ステップS101A,101Bでは、固体撮像素子22A,22B各々によって、画像が撮像される。ステップS102A,102Bでは、固体撮像素子22A,22B各々から出力されたベイヤーRAWの画像に対し、図2に示したISP108により、オプティカル・ブラック補正処理、欠陥画素補正処理、リニア補正処理、シェーディング処理および領域分割平均処理が行われる。ステップS103A,103Bでは、メモリに保存される。ステップS104A,104Bでは、図2に示したISP108により、さらに、ホワイト・バランス処理、ガンマ補正処理、ベイヤー補間処理、YUV変換処理、エッジ強調処理および色補正処理が行われ、ステップS105A,105Bで、メモリに保存される。   FIG. 3 is a diagram illustrating the flow of the entire image processing in the imaging system 10 according to the present embodiment. First, in steps S101A and 101B, an image is captured by each of the solid-state imaging devices 22A and 22B. In steps S102A and 102B, the optical black correction process, the defective pixel correction process, the linear correction process, the shading process, and the like are performed on the Bayer RAW image output from each of the solid-state imaging devices 22A and 22B by the ISP 108 illustrated in FIG. Region division averaging processing is performed. In steps S103A and 103B, the image is stored in the memory. In steps S104A and 104B, white balance processing, gamma correction processing, Bayer interpolation processing, YUV conversion processing, edge enhancement processing, and color correction processing are further performed by the ISP 108 shown in FIG. 2, and in steps S105A and 105B, Saved in memory.

2つの固体撮像素子22A,22B各々について上述した処理が完了すると、ステップS106では、上記処理が施された各部分画像に対し、歪曲補正および合成処理が行われる。ステップS107では、適宜タグ付けされて、全天球画像が内蔵メモリまたは外部ストレージにファイル保存される。また、上記歪曲補正および合成処理の過程では、適宜、3軸加速度センサ120からの情報を得て傾き天地補正が行われてもよい。また、保存される画像ファイルには、適宜圧縮処理が施されても良い。   When the processing described above is completed for each of the two solid-state imaging devices 22A and 22B, in step S106, distortion correction and composition processing are performed on each partial image subjected to the above processing. In step S107, the image is appropriately tagged and the omnidirectional image is saved as a file in the built-in memory or external storage. In addition, in the process of the distortion correction and the synthesis process, the inclination top / bottom correction may be performed by obtaining information from the triaxial acceleration sensor 120 as appropriate. Further, the stored image file may be appropriately compressed.

[全天球画像合成機能]
以下、図4〜図22を参照しながら、本実施形態による撮像システム10が備える全天球画像合成機能について詳細を説明する。図4は、本実施形態による撮像システム10上に実現される全天球画像合成処理の主要な機能ブロック200を示す。歪曲補正・画像合成ブロック118は、図4に示すように、位置検出用歪み補正部202と、つなぎ位置検出部204と、テーブル修正部206と、テーブル生成部208と、画像合成用歪み補正部210と、画像合成部212とを含み構成される。
[Spherical image composition function]
Hereinafter, the omnidirectional image synthesis function included in the imaging system 10 according to the present embodiment will be described in detail with reference to FIGS. 4 to 22. FIG. 4 shows main functional blocks 200 of the omnidirectional image synthesis processing realized on the imaging system 10 according to the present embodiment. As shown in FIG. 4, the distortion correction / image synthesis block 118 includes a position detection distortion correction unit 202, a joint position detection unit 204, a table correction unit 206, a table generation unit 208, and an image synthesis distortion correction unit. 210 and an image composition unit 212.

また、歪曲補正・画像合成ブロック118には、2つの固体撮像素子22A,22Bから、ISP108A,108Bによる各画像信号処理を経て、2つの部分画像が入力される。ここで、固体撮像素子22A,22Bに対し「0」および「1」の番号を付して参照し、固体撮像素子22Aをソースとする画像を「部分画像0」のように参照し、固体撮像素子22Bをソースとする画像を「部分画像1」のように参照する。さらに、歪曲補正・画像合成ブロック118には、それぞれのレンズ光学系の設計データ等に基づいて、所定の投影モデルに従い製造元等で予め作成された、位置検出用変換テーブル220が提供される。   In addition, two partial images are input to the distortion correction / image synthesis block 118 through image signal processing by the ISPs 108A and 108B from the two solid-state imaging devices 22A and 22B. Here, the solid-state image pickup devices 22A and 22B are referred to with the numbers “0” and “1”, and an image using the solid-state image pickup device 22A as a source is referred to as “partial image 0”. An image having the element 22B as a source is referred to as “partial image 1”. Further, the distortion correction / image synthesis block 118 is provided with a position detection conversion table 220 created in advance by a manufacturer or the like according to a predetermined projection model based on design data of each lens optical system.

位置検出用歪み補正部202は、つなぎ位置検出処理の前段の処理として、入力される部分画像0および部分画像1に対し、位置検出用変換テーブル220を用いて歪み補正を施し、位置検出用補正画像(以下、単に補正画像と参照する場合がある。)0および位置検出用補正画像1を生成する。入力される部分画像0,1は、受光領域が面積エリアを成す2次元の固体撮像素子で撮像されたものであり、平面座標系(x,y)で表現された画像データとなる。これに対し、位置検出用変換テーブル220を用いて歪み補正がかけられた補正画像は、入力画像とは異なる座標系の画像データであり、より具体的には、球面座標系(動径を1とし、2つの偏角θ,φを有する極座標系である。)で表現された全天球画像フォーマットの画像データとなる。   The position detection distortion correction unit 202 performs distortion correction on the input partial image 0 and partial image 1 using the position detection conversion table 220 as the preceding process of the joint position detection process, thereby correcting the position detection. An image (hereinafter, simply referred to as a corrected image) 0 and a position detection corrected image 1 are generated. The input partial images 0 and 1 are images captured by a two-dimensional solid-state imaging device in which a light receiving region forms an area area, and are image data expressed in a plane coordinate system (x, y). On the other hand, the corrected image subjected to distortion correction using the position detection conversion table 220 is image data of a coordinate system different from the input image, and more specifically, a spherical coordinate system (radial radius is 1). And a polar coordinate system having two declination angles θ and φ).

図6は、魚眼レンズを用いた撮像システムにおける射影関係を説明する図である。本実施形態において、1つ魚眼レンズで撮影された画像は、撮影地点から概ね半球分の方位を撮影したものとなる。また、魚眼レンズは、図6に示すように、光軸に対する入射角度φに対応した像高hで画像生成される。像高hと、入射角度φとの関係は、所定の投影モデルに応じた射影関数で決定される。射影関数は、魚眼レンズの性質によって異なるが、等距離射影方式と呼ばれる投影モデルの魚眼レンズでは、fを焦点距離として、下記式(1)で表現される。   FIG. 6 is a diagram for explaining a projection relationship in an imaging system using a fisheye lens. In the present embodiment, an image photographed with one fisheye lens is a photograph of the direction of approximately a hemisphere from the photographing point. In addition, as shown in FIG. 6, the fisheye lens generates an image with an image height h corresponding to the incident angle φ with respect to the optical axis. The relationship between the image height h and the incident angle φ is determined by a projection function corresponding to a predetermined projection model. Although the projection function differs depending on the nature of the fisheye lens, the projection model fisheye lens called the equidistant projection method is expressed by the following formula (1), where f is the focal length.

上記投影モデルとしては、その他、中心投影方式(h=f・tanφ)、立体射影方式(h=2f・tan(φ/2))、等立体角射影方式(h=2f・sin(φ/2))および正射影方式(h=f・sinφ)を挙げることができる。いずれの方式においても、光軸からの入射角度φと焦点距離fとに対応して結像の像高hが決定される。また、本実施形態では、画像対角線よりもイメージサークル径が小さな、いわゆる円周魚眼レンズの構成を採用するものとし、得られる部分画像は、図6(B)に示すように、撮影範囲の概ね半球分が投影されたイメージサークル全体を含む平面画像となる。   Other projection models include a central projection method (h = f · tan φ), a solid projection method (h = 2f · tan (φ / 2)), and an equal solid angle projection method (h = 2f · sin (φ / 2). )) And an orthogonal projection method (h = f · sinφ). In either method, the image height h of the image is determined corresponding to the incident angle φ from the optical axis and the focal length f. In the present embodiment, a configuration of a so-called circumferential fisheye lens in which the image circle diameter is smaller than the image diagonal line is employed, and the obtained partial image is approximately a hemisphere of the shooting range as shown in FIG. The plane image includes the entire image circle onto which the minutes have been projected.

図7は、本実施形態で用いられる全天球画像フォーマットの画像データのデータ構造を説明する図である。図7に示すように、全天球画像フォーマットの画像データは、所定の軸に対するなす角度に対応する垂直角度φと、上記軸周りの回転角に対応する水平角度θとを座標とした画素値の配列として表現される。水平角度θは、0〜360度(−180度〜+180度とも表現できる。)の範囲となり、垂直角度φは、0〜180度(同様に−90度〜+90度とも表現できる。)の範囲となる。各座標値(θ,φ)は、撮影地点を中心とした全方位を表す球面上の各点と対応付けられており、全方位が全天球画像上にマッピングされる。魚眼レンズで撮影された画像の平面座標と、全天球画像フォーマットの球面上の座標との関係は、図6で説明したような射影関数を用いることによって対応付けることができる。   FIG. 7 is a diagram for explaining the data structure of image data in the omnidirectional image format used in the present embodiment. As shown in FIG. 7, the image data in the omnidirectional image format includes pixel values whose coordinates are a vertical angle φ corresponding to an angle formed with respect to a predetermined axis and a horizontal angle θ corresponding to a rotation angle around the axis. Expressed as an array of The horizontal angle θ is in the range of 0 to 360 degrees (can be expressed as −180 degrees to +180 degrees), and the vertical angle φ is in the range of 0 to 180 degrees (also can be expressed as −90 degrees to +90 degrees). It becomes. Each coordinate value (θ, φ) is associated with each point on the spherical surface representing the omnidirectional centered on the photographing point, and the omnidirectional is mapped on the omnidirectional image. The relationship between the plane coordinates of the image taken with the fisheye lens and the coordinates on the spherical surface of the omnidirectional image format can be associated by using the projection function as described with reference to FIG.

図8は、位置検出用歪み補正部202および画像合成用歪み補正部210が参照する変換データを説明する図である。変換テーブル220,224は、平面座標系で表現される部分画像から、球面座標系で表現される画像への射影を規定する。変換テーブル220,224は、図8(A)および(B)に示すように、各魚眼レンズ毎に、補正後画像の座標値(θ,φ)と、該座標値(θ,φ)にマッピングされる補正前の部分画像の座標値(x、y)とを対応付ける情報を、全座標値(θ,φ)(θ=0,・・・360度,φ=0,・・・,180度)に対して保持する。図8の例示では、1画素が担当する角度は、φ方向およびθ方向いずれも1/10度であり、変換テーブル220,224は、各魚眼レンズについて、3600×1800の対応関係を示す情報を有することになる。   FIG. 8 is a diagram for explaining conversion data referred to by the position detection distortion correction unit 202 and the image composition distortion correction unit 210. The conversion tables 220 and 224 define the projection from the partial image expressed in the plane coordinate system to the image expressed in the spherical coordinate system. As shown in FIGS. 8A and 8B, the conversion tables 220 and 224 are mapped to the coordinate value (θ, φ) of the corrected image and the coordinate value (θ, φ) for each fisheye lens. The information for associating the coordinate values (x, y) of the partial image before correction are all coordinate values (θ, φ) (θ = 0,... 360 degrees, φ = 0,..., 180 degrees). Hold against. In the example of FIG. 8, the angle handled by one pixel is 1/10 degrees in both the φ direction and the θ direction, and the conversion tables 220 and 224 have information indicating a correspondence relationship of 3600 × 1800 for each fisheye lens. It will be.

つなぎ位置検出で使用する位置検出用変換テーブル220は、事前に製造元等で、レンズ設計データなどを元に、図6で説明したレンズの射影関係に基づき、放射歪曲および偏心歪曲等に起因した理想的なレンズモデルからの歪みを補正した上で計算され、テーブル化されたものである。これとは対照的に、画像合成用変換テーブル224は、詳細は後述するが、位置検出用変換テーブル220から所定の変換処理よって生成されるものである。なお、説明する実施形態では、変換データは、座標値の対応関係がテーブル化されたデータとしている。しかしながら、他の実施形態では、変換データは、平面座標系で表現される部分画像(x,y)から、球面座標系で表現される画像(θ,φ)への射影を規定する1または複数の関数の係数データとしてもよい。   The position detection conversion table 220 used in the connection position detection is an ideal result caused by radial distortion, eccentric distortion, etc. based on the projection relationship of the lens explained in FIG. It is calculated and corrected into a table after correcting distortion from a typical lens model. In contrast, the image composition conversion table 224 is generated from the position detection conversion table 220 by a predetermined conversion process, as will be described in detail later. In the embodiment to be described, the conversion data is data in which the correspondence relationship of coordinate values is tabulated. However, in other embodiments, the transformation data is one or more that defines a projection from a partial image (x, y) expressed in a planar coordinate system to an image (θ, φ) expressed in a spherical coordinate system. It is good also as coefficient data of the function.

再び図4を参照すると、位置検出用歪み補正部202は、位置検出用変換テーブル220を参照して、部分画像0および部分画像1を変換し、位置検出用補正画像0および位置検出用補正画像1を生成する。より具体的には、位置検出用歪み補正部202は、変換後の補正画像の全座標値(θ,φ)について、位置検出用変換テーブル220を参照し、各座標値(θ,φ)にマッピングされる変換前の部分画像の座標値(x,y)を求め、該座標値(x,y)の部分画像における画素値を参照する。これによって、補正画像が生成される。   Referring to FIG. 4 again, the position detection distortion correction unit 202 converts the partial image 0 and the partial image 1 with reference to the position detection conversion table 220, and corrects the position detection correction image 0 and the position detection correction image. 1 is generated. More specifically, the position detection distortion correction unit 202 refers to the position detection conversion table 220 for all coordinate values (θ, φ) of the converted corrected image, and sets each coordinate value (θ, φ). The coordinate value (x, y) of the partial image before conversion to be mapped is obtained, and the pixel value in the partial image of the coordinate value (x, y) is referred to. As a result, a corrected image is generated.

図9は、位置検出処理の際における、2つの魚眼レンズで撮像された2つの部分画像の球面座標系へのマッピングを説明する図である。位置検出用歪み補正部202による処理の結果、魚眼レンズで撮像された2つの部分画像0,1は、図9に示すように、全天球画像フォーマット上に展開される。魚眼レンズ0により撮影された部分画像0は、典型的には、全天球のうちの概ね上半球にマッピングされ、魚眼レンズ1により撮影された部分画像1は、全天球のうちの概ね下半球にマッピングされる。全天球フォーマットで表現された補正画像0および補正画像1は、魚眼レンズの全画角が180度を超えるため、それぞれ半球からはみ出し、その結果、補正画像0および補正画像1を重ね合わせると、画像間で撮影範囲が重複する重複領域が発生する。   FIG. 9 is a diagram for describing mapping of two partial images captured by two fisheye lenses to a spherical coordinate system in the position detection process. As a result of the processing by the position detection distortion correction unit 202, the two partial images 0 and 1 captured by the fisheye lens are developed on an omnidirectional image format as shown in FIG. The partial image 0 captured by the fisheye lens 0 is typically mapped to approximately the upper hemisphere of the entire celestial sphere, and the partial image 1 captured by the fisheye lens 1 is approximately aligned to the approximately lower hemisphere of the entire celestial sphere. To be mapped. The corrected image 0 and the corrected image 1 expressed in the omnidirectional format protrude from the hemisphere because the total angle of view of the fisheye lens exceeds 180 degrees. As a result, when the corrected image 0 and the corrected image 1 are superimposed, Overlapping areas with overlapping shooting ranges occur.

詳細を後述するように、位置検出用歪み補正部202による補正後は、つなぎ位置検出部204により、上記重複領域において、画像間のつなぎ位置が検出されることになる。本実施形態による位置検出用変換テーブル220では、図9に示すように、2つのレンズ光学系各々の光軸を球面の2つの極(φ=0度,180度)に射影するとともに、画像間の重複領域を球面の赤道近傍(φ=90度±((全画角−180度)/2))に射影するように作成される。球面座標系では、垂直角度φが0度または180度である極に近接するほど、歪みが大きくなり、つなぎ位置検出精度が劣化してしまう。これに対し、上述したような射影とすることによって、θ方向にずれたときの歪み量が小さな垂直角度90度付近に、重複領域を位置させて、つなぎ位置検出が行われることになり、つなぎ位置検出精度を向上させることができる。ひいては、歪みの大きなレンズ光学系で撮像された画像であっても、高い精度でつなぎ位置を検出することが可能となる。   As will be described in detail later, after correction by the position detection distortion correction unit 202, the connection position detection unit 204 detects a connection position between images in the overlap region. In the position detection conversion table 220 according to the present embodiment, as shown in FIG. 9, the optical axes of the two lens optical systems are projected onto two spherical poles (φ = 0 degrees, 180 degrees), and between the images. Are created so that they are projected in the vicinity of the equator of the spherical surface (φ = 90 degrees ± ((total angle of view−180 degrees) / 2)). In the spherical coordinate system, the closer to the pole where the vertical angle φ is 0 degree or 180 degrees, the greater the distortion, and the joint position detection accuracy deteriorates. On the other hand, by using the projection as described above, the overlapping position is detected in the vicinity of a vertical angle of 90 degrees where the amount of distortion when shifted in the θ direction is small, and the connecting position is detected. The position detection accuracy can be improved. As a result, it is possible to detect a connection position with high accuracy even for an image captured by a lens optical system having a large distortion.

ここで、再び図4を参照すると、つなぎ位置検出部204は、位置検出用歪み補正部202により変換された補正画像0,1の入力を受けて、パターンマッチング処理により、入力された補正画像0,1間のつなぎ位置を検出し、検出結果データ222を生成する。   Here, referring to FIG. 4 again, the joint position detection unit 204 receives the correction images 0 and 1 converted by the position detection distortion correction unit 202 and receives the input correction image 0 by pattern matching processing. , 1 is detected, and detection result data 222 is generated.

パターンマッチングでは、典型的には、マッチングを行う対象領域が、その画像が平坦であったり、同じ模様が繰り返された領域であったりして特徴が少ないと、精度高くつなぎ位置を検出することが難しくなる。そこで、本実施形態によるつなぎ位置検出部204は、マッチングを行う対象領域の画像が有する特徴の程度を指標する特徴量を測定し、この測定された特徴量を用いて、対象領域のつなぎ位置を決定する構成を採用する。これにより、領域の特徴に応じた適切な評価方式でつなぎ合わせを行って、得られる全天球画像の品質の向上を図っている。   In pattern matching, typically, if the target area to be matched is a flat image or an area in which the same pattern is repeated and there are few features, it is possible to detect the connection position with high accuracy. It becomes difficult. Therefore, the connection position detection unit 204 according to the present embodiment measures a feature amount that indicates the degree of the feature of the image of the target region to be matched, and uses this measured feature amount to determine the connection position of the target region. Adopt a configuration to determine. As a result, stitching is performed by an appropriate evaluation method according to the feature of the region, thereby improving the quality of the obtained omnidirectional image.

図10は、図4に示した本実施形態によるつなぎ位置検出部の機能ブロックを示す図である。図10に示すつなぎ位置検出部204は、より詳細には、テンプレート生成部232と、テンプレート特徴量算出部234と、テンプレート順位付け部236と、仮位置算出部238と、探索範囲設定部240と、マッチング計算部242と、スコア補正部244と、つなぎ位置決定部246と、検出結果生成部248とを含み構成される。以下、テンプレート・マッチングによるつなぎ位置検出処理について説明するが、説明の便宜上、テンプレート側を位置検出用補正画像1とし、探索される側を位置検出用補正画像0とする。   FIG. 10 is a diagram showing functional blocks of the connection position detection unit according to the present embodiment shown in FIG. More specifically, the connection position detection unit 204 shown in FIG. 10 includes a template generation unit 232, a template feature amount calculation unit 234, a template ranking unit 236, a temporary position calculation unit 238, and a search range setting unit 240. , A matching calculation unit 242, a score correction unit 244, a connection position determination unit 246, and a detection result generation unit 248. Hereinafter, the connection position detection processing by template matching will be described. For convenience of explanation, the template side is referred to as a position detection correction image 1 and the searched side is referred to as a position detection correction image 0.

テンプレート生成部232は、テンプレート・マッチングにおけるテンプレート用画像として位置検出用補正画像1を用い、位置検出用補正画像1から、それぞれ探索用画像内で探索する対象となる複数の画像(以下、テンプレート画像という。)を生成する。テンプレート・マッチングによるつなぎ位置検出処理では、それぞれ位置検出用補正画像1の一部分であるテンプレート画像各々に対し、位置検出用補正画像0へのつなぎ位置が求められる。ここでは、両補正画像0,1間の重複領域におけるつなぎ位置を目的としているので、位置検出用補正画像1全体のうちの重複領域の部分から複数のテンプレート画像が生成される。   The template generation unit 232 uses the position detection correction image 1 as a template image in template matching, and uses a plurality of images (hereinafter referred to as template images) to be searched for in the search image from the position detection correction image 1. Is generated). In the joint position detection process by template matching, the joint position to the position detection correction image 0 is obtained for each template image that is a part of the position detection correction image 1. Here, since the connection position in the overlapping area between the two correction images 0 and 1 is intended, a plurality of template images are generated from the overlapping area portion of the entire position detection correction image 1.

テンプレート特徴量算出部234は、テンプレート生成部232により生成された複数のテンプレート画像各々に対し特徴量を算出する。ここで、特徴量とは、テンプレート画像が有する特徴の程度を定量する指標する値であり、本実施形態において、特徴量が大きいとは、画像に大きな特徴が認められることを意味し、特徴量が小さいとは、画像の特徴が少なく無個性であることを意味するものとする。特徴量としては、テンプレート画像から抽出されるエッジ量、テンプレート画像から算出される分散および標準偏差の少なくとも1つを用いることができるが、特に限定されるものではない。   The template feature amount calculation unit 234 calculates a feature amount for each of the plurality of template images generated by the template generation unit 232. Here, the feature amount is a value for indexing the degree of the feature of the template image. In the present embodiment, the large feature amount means that a large feature is recognized in the image, and the feature amount. “Small” means that the image has few features and no individuality. As the feature amount, at least one of the edge amount extracted from the template image, the variance calculated from the template image, and the standard deviation can be used, but it is not particularly limited.

図11は、特定の実施形態によるテンプレート特徴量算出部のブロック図を示す。図11(A)〜(C)は、エッジ量を指標とする実施形態によるテンプレート特徴量算出部234Aの構成を示す。これに対し図11(D)は、標準偏差または分散を指標とする実施形態によるテンプレート特徴量算出部234Bの構成を示す。   FIG. 11 shows a block diagram of a template feature quantity calculation unit according to a specific embodiment. FIGS. 11A to 11C show the configuration of the template feature quantity calculation unit 234A according to the embodiment using the edge quantity as an index. On the other hand, FIG. 11D shows a configuration of the template feature amount calculation unit 234B according to the embodiment using standard deviation or variance as an index.

テンプレート画像の特徴量としてエッジ量を用いる場合は、図11(A)に示すようなエッジ強調を行うためのエッジ強調ブロックを用いることができる。図11(A)に示すエッジ強調ブロックは、エッジ抽出フィルタ部250と、ゲイン乗算部252と、LPF(Low-Pass Filter)部254とを含み構成される。エッジ強調ブロックでは、エッジ抽出フィルタ部250で抽出されたエッジ量に対しゲイン乗算部252でゲインを掛けてエッジ量を調整した信号が生成される。そして、調整された信号と、LPF部254で入力信号にLPF処理してノイズ除去した信号とを加算部256で足し合わせた信号が、エッジ強調された信号として出力される。   When the edge amount is used as the feature amount of the template image, an edge enhancement block for performing edge enhancement as shown in FIG. 11A can be used. The edge enhancement block illustrated in FIG. 11A includes an edge extraction filter unit 250, a gain multiplication unit 252, and an LPF (Low-Pass Filter) unit 254. In the edge enhancement block, a signal is generated by adjusting the edge amount by multiplying the edge amount extracted by the edge extraction filter unit 250 by the gain multiplication unit 252. Then, a signal obtained by adding the adjusted signal and the signal obtained by removing the noise by performing the LPF process on the input signal by the LPF unit 254 by the adding unit 256 is output as an edge-emphasized signal.

本実施形態では、エッジのみを抽出すればよい。このため、例えば図11(C)に示すようなLPF係数を用いることでLPF処理した信号をゼロにし、図11(B)に示すエッジ抽出フィルタ係数を用いてエッジ抽出フィルタ部250で抽出したエッジ量のみを出力させればよい。図11(A)に示すエッジ強調ブロックにテンプレート画像を入力することにより、各画素毎のエッジ量が出力される。テンプレート画像に対する特徴量としては、テンプレートの全画素のエッジ量の合計を用いてもよいし、エッジ量の平均としてもよい。テンプレート画像のエッジ合計量が大きいほど、画像に明るさが不連続に変化している箇所が多く含まれることを意味する。したがって、平坦な画像は、典型的には、エッジ量が小さくなり、特徴量が小さくなる。   In the present embodiment, only the edges need be extracted. For this reason, for example, the LPF coefficient as shown in FIG. 11C is used to make the signal subjected to the LPF processing zero, and the edge extracted by the edge extraction filter unit 250 using the edge extraction filter coefficient shown in FIG. Only the amount needs to be output. By inputting the template image to the edge enhancement block shown in FIG. 11A, the edge amount for each pixel is output. As the feature amount for the template image, the sum of the edge amounts of all the pixels of the template may be used, or the average of the edge amounts may be used. It means that as the total amount of edges of the template image is larger, the image includes more portions where the brightness changes discontinuously. Therefore, a flat image typically has a small edge amount and a small feature amount.

テンプレート画像の特徴量として画像の標準偏差(または分散)を用いる場合は、図11(D)に示すような構成を備えることができる。図11(D)に示す標準偏差(または分散)計算部258は、テンプレート画像の標準偏差σ(または分散σ)を下記算出式(2)で求める。なお、下記式(2)においては、テンプレート画像の総画素数をN(=W画素×H画素)とし、テンプレート画像の座標(i,j)における輝度をT(i,j)としている。テンプレート画像の標準偏差(または分散)が大きいほど、ヒストグラムにおいて輝度が広く分布していることを意味する。したがって、平坦な画像は、典型的には画像の輝度の分布が狭くなり、特徴量が小さくなる。 When the standard deviation (or variance) of the image is used as the feature amount of the template image, a configuration as shown in FIG. 11D can be provided. The standard deviation (or variance) calculation unit 258 shown in FIG. 11D calculates the standard deviation σ (or variance σ 2 ) of the template image using the following calculation formula (2). In the following formula (2), the total number of pixels of the template image is N (= W pixels × H pixels), and the luminance at the coordinates (i, j) of the template image is T (i, j). The larger the standard deviation (or variance) of the template image, the wider the luminance is distributed in the histogram. Therefore, a flat image typically has a narrow brightness distribution of the image and a small feature amount.

なお、テンプレート画像の特徴量として、標準偏差および分散を例示したが、テンプレート画像から求められる濃度ヒストグラムにおける尖度(ヒストグラムの分布が平均値周りに集中しているか裾の方へ広がっているかの程度を表す。)や歪度(ヒストグラムの形状が対称な形から歪んでいる程度を表す)などの濃度ヒストグラムに基づく指標、差分統計量に基づくコントラストなど他の統計的な指標を計算し、これらの指標を用いて、テンプレート画像を特徴付けてもよい。また、上述した説明では、輝度値を用いて特徴量を計算するものとして説明したが、RGBの各色毎に特徴量を計算し、その総和としてテンプレート画像の特徴量を計算してもよい。エッジ量や標準偏差、分散などの特徴量は、目的とする画像から簡単に算出することができ、演算コストが少なく、良好な検出結果が得られることから、好適である。しかしながら、これに限定されるものではなく、画像が有する特徴の程度を指標する如何なる指標値を採用することができる。   Although the standard deviation and the variance are exemplified as the feature amount of the template image, the kurtosis in the density histogram obtained from the template image (the degree of whether the histogram distribution is concentrated around the average value or spreads toward the tail) And other statistical indicators such as contrast based on density histograms, contrast based on differential statistics, etc., and the degree of distortion (representing the degree to which the histogram is distorted from a symmetric shape) An index may be used to characterize the template image. In the above description, the feature value is calculated using the luminance value. However, the feature value may be calculated for each color of RGB, and the feature value of the template image may be calculated as the sum of the feature values. Feature quantities such as edge quantity, standard deviation, and variance can be easily calculated from the target image, which is preferable because the calculation cost is low and good detection results can be obtained. However, the present invention is not limited to this, and any index value that indicates the degree of characteristics of an image can be used.

再び図10を参照すると、テンプレート順位付け部236は、テンプレート特徴量算出部234で算出された特徴量に基づいて、複数のテンプレート画像の処理の順序を順位付けし、テンプレート画像間の特徴量の相対的な関係を規定する。   Referring to FIG. 10 again, the template ranking unit 236 ranks the processing order of the plurality of template images based on the feature amounts calculated by the template feature amount calculation unit 234, and calculates the feature amounts between the template images. Define relative relationships.

仮位置算出部238は、生成された複数のテンプレート画像のうちの、注目する注目テンプレート画像について、後述するテンプレート・マッチング処理の基準とする仮位置を算出する。ここでは、注目テンプレート画像と、その位置検出用補正画像1上でその周辺にある周辺テンプレート画像各々との間の特徴量の相対的な関係に基づいて仮位置が算出される。   The temporary position calculation unit 238 calculates a temporary position that is used as a reference for a template matching process to be described later for a template image of interest among the generated template images. Here, the temporary position is calculated on the basis of the relative relationship of the feature amounts between the template image of interest and each of the surrounding template images on the position detection correction image 1.

テンプレート・マッチングは、テンプレート画像を、探索する対象となる探索用画像の中から探索する処理であるが、ある程度テンプレート画像に対応する領域が特定されている場合は、探索用画像中の探索範囲を限定することができる。探索範囲設定部240は、上記注目テンプレート画像について、注目テンプレート画像と周辺テンプレート画像各々との間の特徴量の相対的な関係に基づいて、テンプレート・マッチングでの探索範囲を設定する。典型的には、上記仮位置算出部238により算出された仮位置を中心とした位置検出用画像0における所定の探索範囲が設定される。また、周辺テンプレート画像について決定済みのつなぎ位置に基づいて、さらに、絞り込まれた探索範囲を設定してもよい。   Template matching is a process of searching for a template image from search images to be searched. If a region corresponding to the template image is specified to some extent, a search range in the search image is determined. It can be limited. The search range setting unit 240 sets a search range for template matching based on the relative relationship of feature amounts between the template image of interest and each of the peripheral template images for the template of interest. Typically, a predetermined search range in the position detection image 0 around the temporary position calculated by the temporary position calculation unit 238 is set. Further, a narrowed search range may be set based on the connection positions determined for the peripheral template image.

マッチング計算部242は、上記注目テンプレート画像について、典型的にはテンプレート・マッチング方式により、上記算出された仮位置に基づいて、上記注目テンプレート画像と、位置検出用補正画像における各部分とのマッチングを計算する。マッチングの計算では、上記探索範囲設定部240によって設定された仮位置を中心とした探索範囲で、テンプレート画像を移動させながら、各位置での画像の類似度に基づく評価値であるマッチング・スコアが計算される。さらに、本実施形態では、テンプレート画像の特徴量の区分に応じて、複数の評価方式が準備されている。そして、本実施形態によるマッチング計算部242は、テンプレート特徴量算出部234により算出された特徴量に応じて、その際に用いるマッチングの評価方式を切り替えて、マッチング・スコアを計算する。   The matching calculation unit 242 performs matching between the target template image and each portion of the position detection correction image based on the calculated temporary position, typically by the template matching method, for the target template image. calculate. In the matching calculation, a matching score, which is an evaluation value based on the similarity of images at each position, is moved while the template image is moved in the search range centered on the temporary position set by the search range setting unit 240. Calculated. Further, in the present embodiment, a plurality of evaluation methods are prepared according to the classification of the feature amount of the template image. Then, the matching calculation unit 242 according to the present embodiment calculates a matching score by switching the matching evaluation method used at that time according to the feature amount calculated by the template feature amount calculation unit 234.

スコア補正部244は、上記注目テンプレート画像について、上述したマッチング計算部242により算出された画像の類似度に基づくスコアに対し、上記算出された仮位置を中心として優先的にスコアが高くなるようなオフセット補正を行う。なお、用いた評価方式によって、スコアが取り得る範囲が異なる。このため、スコア補正部244は、マッチング計算部242が用いた評価方式に応じてオフセット補正方式を切り替える。これにより、テンプレート画像間の特徴量の相対的な関係に基づいて算出された仮位置を加味し、かつ、マッチングの評価方式に対し適切なスコアの補正が可能となる。   The score correction unit 244 preferentially increases the score centered on the calculated temporary position with respect to the score based on the similarity of the image calculated by the matching calculation unit 242 with respect to the template image of interest. Perform offset correction. In addition, the range which a score can take changes with the used evaluation methods. For this reason, the score correction unit 244 switches the offset correction method according to the evaluation method used by the matching calculation unit 242. Thus, it is possible to correct the score appropriate for the matching evaluation method, taking into account the temporary position calculated based on the relative relationship of the feature amounts between the template images.

つなぎ位置決定部246は、上記注目テンプレート画像に対して、位置検出用補正画像0上で上記補正されたスコアが最大化される位置につなぎ位置を決定する。このとき決定されるつなぎ位置は、注目テンプレート画像よりも特徴量が大きい周辺テンプレート画像のつなぎ位置が加味されたものとなる。   The connection position determination unit 246 determines the connection position of the target template image at a position where the corrected score is maximized on the position detection correction image 0. The connection position determined at this time is obtained by adding the connection position of the peripheral template image having a larger feature amount than the template image of interest.

上述した仮位置算出部238、探索範囲設定部240、マッチング計算部242、スコア補正部244およびつなぎ位置決定部246による処理が、複数のテンプレート画像各々について行われると、テンプレート画像各々に対応した位置検出用補正画像0上のつなぎ位置が求められる。検出結果生成部248は、ここで求められた各テンプレート画像に対応するつなぎ位置のデータ・セットに基づいて、全天球フォーマットの各画素(θ,φ)毎のつなぎ位置を計算し、検出結果データ222を生成する。   When the processing by the temporary position calculation unit 238, the search range setting unit 240, the matching calculation unit 242, the score correction unit 244, and the connection position determination unit 246 described above is performed for each of the plurality of template images, the position corresponding to each template image A connection position on the detection correction image 0 is obtained. The detection result generation unit 248 calculates the connection position for each pixel (θ, φ) in the omnidirectional format based on the connection position data set corresponding to each template image obtained here, and the detection result. Data 222 is generated.

再び図4を参照すると、テーブル修正部206は、検出結果データ222に基づいて、事前準備された位置検出用変換テーブル220に対して修正を施し、テーブル生成部208に渡す。テーブル生成部208は、上記テーブル修正部206により修正された変換データから、回転座標変換に基づき、画像合成用変換テーブル224を生成する。   Referring back to FIG. 4, the table correction unit 206 corrects the position detection conversion table 220 prepared in advance based on the detection result data 222 and passes the correction to the table generation unit 208. The table generation unit 208 generates an image composition conversion table 224 based on the rotation coordinate conversion from the conversion data corrected by the table correction unit 206.

画像合成用歪み補正部210は、画像合成処理の前段の処理として、元の部分画像0および部分画像1に対し、画像合成用変換テーブル224を用いて歪み補正をかけ、画像合成用補正画像0および画像合成用補正画像1を生成する。生成される画像合成用補正画像は、位置検出用補正画像と同様に、球面座標系で表現されている一方で、上記回転座標変換により、位置検出用補正画像とは座標軸の定義が異なったものとなる。画像合成部212は、得られた画像合成用補正画像0および画像合成用補正画像1を合成し、全天球画像フォーマットの合成画像を生成する。なお、つなぎ位置検出部204、テーブル修正部206、テーブル生成部208、画像合成用歪み補正部210および画像合成部212が実行する処理については、処理フローの説明とともに詳細を後述する。   The image composition distortion correction unit 210 performs distortion correction on the original partial image 0 and the partial image 1 using the image composition conversion table 224 as the preceding process of the image composition processing, and corrects the image composition corrected image 0. And the corrected image 1 for image synthesis is generated. Like the position detection correction image, the generated image composition correction image is expressed in a spherical coordinate system, but the definition of coordinate axes differs from that of the position detection correction image due to the rotational coordinate conversion. It becomes. The image composition unit 212 synthesizes the obtained image composition correction image 0 and the image composition correction image 1 to generate a composite image in the omnidirectional image format. Note that the processing executed by the connection position detection unit 204, the table correction unit 206, the table generation unit 208, the image composition distortion correction unit 210, and the image composition unit 212 will be described in detail later along with the description of the processing flow.

図4に示す機能ブロック200は、さらに、表示画像生成部214を含むことができる。上記生成された合成画像は、全天球画像フォーマットで表現されるため、そのまま、ディスプレイなどの平面表示デバイスに表示させると、垂直角度0度および180度に近づくほど画像が歪んで表示されることになる。表示画像生成部214は、全天球画像を平面表示デバイスに投影するための画像処理を実行する手段である。表示画像生成部214は、例えば、全天球画像フォーマットの合成画像から、球面座標系から特定方向および特定画角の平面座標系へ変換し、ユーザが指定する特定の視野方向の一定画角の画像に投影する処理を行うことができる。   The functional block 200 illustrated in FIG. 4 can further include a display image generation unit 214. Since the generated composite image is expressed in an omnidirectional image format, when displayed as it is on a flat display device such as a display, the image is displayed with distortion as the vertical angles approach 0 degrees and 180 degrees. become. The display image generation unit 214 is a unit that executes image processing for projecting the omnidirectional image onto a flat display device. The display image generation unit 214 converts, for example, a composite image in the omnidirectional image format from a spherical coordinate system to a plane coordinate system with a specific direction and a specific angle of view, and has a fixed angle of view in a specific viewing direction specified by the user. A process of projecting onto an image can be performed.

[全天球画像合成処理の流れ]
以下、図5、図12および図21を参照して、本実施形態による全天球画像合成処理の流れを説明する。図5は、本実施形態による撮像システム10が実行する全天球画像合成処理の全体的な流れを示すフローチャートである。図5に示す処理は、例えば、シャッター・ボタン18の押下により2つの撮像光学系で撮影が指示され、CPU130から指令が発行されたことに応答して、ステップS200から開始される。
[Flow of spherical image composition processing]
Hereinafter, the flow of the omnidirectional image synthesis process according to the present embodiment will be described with reference to FIGS. 5, 12, and 21. FIG. 5 is a flowchart showing an overall flow of the omnidirectional image synthesis process executed by the imaging system 10 according to the present embodiment. The processing shown in FIG. 5 is started from step S200 in response to, for example, that the photographing is instructed by the two imaging optical systems by pressing the shutter button 18 and the instruction is issued from the CPU 130.

ステップS201では、撮像システム10は、位置検出用歪み補正部202により、2つの固体撮像素子22A,22Bによって取得された部分画像0および部分画像1に対し、位置検出用変換テーブル220を用いて歪み補正を行う。これによって、位置検出用補正画像0および位置検出用補正画像1が得られる。これにより、図9に示すような全天球画像フォーマットの補正画像が得られる。ステップS202では、撮像システム10は、つなぎ位置検出部204により、位置検出用補正画像0および位置検出用補正画像1の重複領域において、画像間のつなぎ位置検出を行う。   In step S201, the imaging system 10 uses the position detection conversion table 220 to distort the partial image 0 and the partial image 1 acquired by the two solid-state imaging devices 22A and 22B by the position detection distortion correction unit 202. Make corrections. As a result, a corrected image for position detection 0 and a corrected image for position detection 1 are obtained. As a result, a corrected image in the omnidirectional image format as shown in FIG. 9 is obtained. In step S <b> 202, the imaging system 10 detects a connection position between images in the overlapping region of the position detection correction image 0 and the position detection correction image 1 by the connection position detection unit 204.

図12は、本実施形態による撮像システム10が実行する、つなぎ位置検出処理を示すフローチャートである。図12に示す処理は、図5に示したステップS202で呼び出されて、ステップS300から開始される。ステップS301では、撮像システム10は、テンプレート用画像、探索される探索用画像、テンプレートのブロック・サイズ、テンプレートを生成する開始座標、テンプレートの生成間隔および全ブロック数の初期設定を行う。   FIG. 12 is a flowchart illustrating a connection position detection process executed by the imaging system 10 according to the present embodiment. The process shown in FIG. 12 is called in step S202 shown in FIG. 5, and is started from step S300. In step S301, the imaging system 10 performs initial setting of a template image, a search image to be searched, a template block size, a start coordinate for generating a template, a template generation interval, and the total number of blocks.

図13は、本実施形態によるテンプレート生成部によるテンプレート画像の生成方法を説明する図である。説明する実施形態では、テンプレート用画像300は、位置検出用補正画像1の重複領域の部分の画像であり、探索用画像310は、位置検出用補正画像0の重複領域の部分の画像である。上記ブロック・サイズは、テンプレート画像を構成する画素サイズであり、上記生成間隔は、隣接するテンプレート画像が生成される間隔である。上記生成開始座標は、最初のテンプレート画像を切り出す座標である。なお、ブロック・サイズおよび生成間隔は、つなぎ合わせの所望の精度および処理量を勘案して定めればよい。   FIG. 13 is a diagram illustrating a template image generation method by the template generation unit according to the present embodiment. In the embodiment to be described, the template image 300 is an image of the overlapping area portion of the position detection correction image 1, and the search image 310 is an image of the overlapping area portion of the position detection correction image 0. The block size is a pixel size constituting a template image, and the generation interval is an interval at which adjacent template images are generated. The generation start coordinates are coordinates for cutting out the first template image. Note that the block size and generation interval may be determined in consideration of the desired accuracy and processing amount of stitching.

ブロック・サイズをW画素×H画素とし、生成開始座標を(sx,sy)とし、生成間隔をstep画素とすると、図13に示すような態様で複数のテンプレート画像302−1〜302−#が生成される。生成されるテンプレートのブロック数#は、テンプレート生成用画像300の水平方向サイズ(説明する実施形態で全天球フォーマットの幅サイズ=3600画素)を生成間隔(step)で割った値の整数値となる。   Assuming that the block size is W pixels × H pixels, the generation start coordinates are (sx, sy), and the generation interval is a step pixel, a plurality of template images 302-1 to 302- # are formed in a manner as shown in FIG. Generated. The number of blocks of the generated template # is an integer value obtained by dividing the horizontal size of the template generation image 300 (width size of the omnidirectional format = 3600 pixels in the embodiment to be described) by the generation interval (step). Become.

ここで生成された複数のテンプレート画像302−1〜302−#に対し、探索用画像310上での対応部分314が所定の探索範囲312内で探索されることになる。なお、全天球画像フォーマットのθ座標の両端(0度および360度)はつながっているため、テンプレート画像の生成やテンプレート・マッチングの際は、右端の隣は左端として、左端の隣は右端として取り扱うことができる。   Corresponding portions 314 on the search image 310 are searched within the predetermined search range 312 for the plurality of template images 302-1 to 302- # generated here. Since both ends (0 degrees and 360 degrees) of the θ coordinate of the omnidirectional image format are connected, when generating a template image or template matching, the right end is the left end and the left end is the right end. It can be handled.

図12を参照すると、ステップS302では、現在の座標(sx,sy)に基づいて、テンプレート画像を生成する。第1回目のループでは、ステップS301で初期設定された生成開始座標(sx,sy)からブロック・サイズの領域(W画素×H画素)が切り出されてテンプレート画像が生成される。テンプレート画像生成後は、座標を(sx+step,sy)に更新し、2回目以降のテンプレート生成は、同様にして更新された座標からブロック・サイズの領域を指定して生成されることになる。テンプレート画像が生成されると、生成されたテンプレート画像に対し、図13に模式的に示すようなテンプレート番号(以下、単に番号と参照することもある。)が付与される。なお、特に限定されるものではないが、説明する実施形態では、テンプレート画像は、重複領域においてθ方向に一列、一周分、生成されるものとする。   Referring to FIG. 12, in step S302, a template image is generated based on the current coordinates (sx, sy). In the first loop, a block size area (W pixels × H pixels) is cut out from the generation start coordinates (sx, sy) that are initially set in step S301 to generate a template image. After the template image is generated, the coordinates are updated to (sx + step, sy), and the second and subsequent template generations are generated by designating a block size area from the updated coordinates in the same manner. When the template image is generated, a template number (simply referred to as a number hereinafter) as schematically shown in FIG. 13 is assigned to the generated template image. Although not particularly limited, in the embodiment to be described, it is assumed that the template image is generated for one line and one turn in the θ direction in the overlapping region.

ステップS303では、撮像システム10は、ステップS302で生成されたテンプレート画像から特徴量を算出する。ステップS304では、撮像システム10は、生成されるべき全てのブロックの処理が終了しているか否かを判定する。ステップS304で、終了していないと判定された場合(NO)は、ステップS302へループさせて、次のテンプレート画像の生成および特徴量の算出に処理を進める。一方、ステップS304で、全てのブロックの処理が終了したと判定された場合(YES)は、ステップS305へ処理を分岐させる。   In step S303, the imaging system 10 calculates a feature amount from the template image generated in step S302. In step S304, the imaging system 10 determines whether or not processing of all blocks to be generated has been completed. If it is determined in step S304 that the process has not been completed (NO), the process loops to step S302 to proceed to generation of the next template image and calculation of the feature amount. On the other hand, if it is determined in step S304 that all blocks have been processed (YES), the process branches to step S305.

ステップS305では、撮像システム10は、全てのブロックのテンプレート画像を、その特徴量の大きい方から小さい方へ順位付ける。これにより、ステップS306以降の処理順序が規定される。図14(A)は、本実施形態によるテンプレート画像の順位付けを説明する図である。図14(A)に示すように、各番号のテンプレート画像に対し、特徴量の大きい順にテンプレート順位が付される。図12に示すステップS306〜ステップS311の処理は、ステップS305で決定された順序で、順位の高いテンプレート画像から順に処理対象として選択され処理が行われる。   In step S <b> 305, the imaging system 10 ranks the template images of all blocks from the largest feature amount to the smallest one. Thereby, the processing order after step S306 is defined. FIG. 14A is a diagram for explaining ranking of template images according to the present embodiment. As shown in FIG. 14A, the template order is assigned to the template images of each number in descending order of the feature amount. The processes in steps S306 to S311 shown in FIG. 12 are selected and processed in the order determined in step S305 in order from the template image with the highest rank.

図12を参照すると、ステップS306では、撮像システム10は、処理対象として注目する注目テンプレート画像に対し、仮位置を算出する。図14(B)は、本実施形態による仮位置算出部が行う、順位付けに基づくテンプレート画像の仮位置の第1の算出方法を説明する図である。第1の計算方法においては、まず、注目テンプレート画像の周辺に位置する周辺テンプレート画像に対して設定されているつなぎ位置を取得する。   Referring to FIG. 12, in step S <b> 306, the imaging system 10 calculates a temporary position for the template image of interest that is focused as a processing target. FIG. 14B is a diagram illustrating a first method for calculating the temporary position of the template image based on the ranking performed by the temporary position calculation unit according to the present embodiment. In the first calculation method, first, a connection position set for a peripheral template image positioned around the template image of interest is acquired.

説明する実施形態では、テンプレート画像は、重複領域においてθ方向に一列に生成され、左側から順にテンプレート番号が付されているので、番号で隣接関係が識別される。図14(B)に示す例では、注目テンプレート画像(図中では番号3のもの)の前後のテンプレート画像(図中では番号2および番号4のもの)のつなぎ位置が取得される。テンプレート画像各々には、図12のステップS305でテンプレート順位が付されており、図12のステップS306〜ステップS311までのつなぎ位置を検出する処理は、順位の高いものから実施される。このため、注目テンプレート画像よりも大きな特徴量を有し、順位がより高いテンプレート画像に対しては、既につなぎ位置が決定していることになる。   In the embodiment to be described, the template images are generated in a line in the θ direction in the overlapping region, and the template numbers are assigned in order from the left side, so that the adjacent relationship is identified by the number. In the example shown in FIG. 14B, the connection positions of the template images (numbers 2 and 4 in the figure) before and after the target template image (number 3 in the figure) are acquired. Each template image is given a template order in step S305 in FIG. 12, and the process of detecting the connection position from step S306 to step S311 in FIG. 12 is performed in descending order. For this reason, the connection position has already been determined for a template image having a larger feature amount than the template image of interest and a higher rank.

したがって、図14(B)の例示では、注目テンプレート画像(番号3)の順位が3位であるため、テンプレート順位が1位および2位であるテンプレート画像(番号4および番号1のもの)のつなぎ位置が既に決定済みということになる。一方、図14(B)において反転表示されている4位〜6位のテンプレート画像(番号2、番号5および番号6のもの)に対してはつなぎ位置が未決定であり、初期つなぎ位置として(0,0)が設定されている。なお、注目テンプレート画像(番号3)のつなぎ位置も、現時点では初期つなぎ位置(0,0)となっている。つなぎ位置は、補正画像1の重複領域におけるテンプレート画像の座標と、補正画像0の重複領域における対応する領域の座標とのズレ量を表し、つなぎ位置(0,0)は、テンプレート画像が、補正画像1上の座標位置そのままでつなぎ合わされることを意味する。   Accordingly, in the example of FIG. 14B, the template image of interest (number 3) is ranked third, so that the template images (number 4 and number 1) that are the first and second templates are connected. The position has already been determined. On the other hand, for the 4th to 6th template images (numbers 2, 5, and 6) that are highlighted in FIG. 14B, the connection position is not yet determined, and the initial connection position ( 0,0) is set. Note that the connection position of the template image of interest (number 3) is also the initial connection position (0, 0) at the present time. The joint position represents the amount of deviation between the coordinates of the template image in the overlap area of the corrected image 1 and the coordinates of the corresponding area in the overlap area of the corrected image 0. The joint position (0, 0) is corrected by the template image. It means that the coordinate positions on the image 1 are connected as they are.

よって、図14(B)の例示では、周辺テンプレート画像のつなぎ位置として、注目テンプレート画像(図中では番号3のもの)の右側のテンプレート画像(図中では番号4のもの)の決定済みのつなぎ位置と、左側のテンプレート画像(図中では番号2のもの)の初期つなぎ位置とが取得される。   Therefore, in the example of FIG. 14B, as the connection position of the peripheral template images, the determined connection of the template image (number 4 in the drawing) on the right side of the template image of interest (number 3 in the drawing) is determined. The position and the initial connection position of the left template image (number 2 in the figure) are acquired.

そして、取得された周辺テンプレート画像のつなぎ位置を平均処理し、その平均値を注目テンプレートの仮位置とすることができる。この際、単純な相加平均を計算してもよいが、好適には、決定済みのつなぎ位置と、未決定のつなぎ位置(初期つなぎ位置)とで重みを変えて、重み付き平均を行うことができる。具体的には、決定済みのつなぎ位置の方の影響が強くなるように重みを大きくすることができる。   Then, the acquired connection positions of the peripheral template images are averaged, and the average value can be used as the temporary position of the template of interest. At this time, a simple arithmetic average may be calculated, but preferably, the weighted average is performed by changing the weight between the determined connection position and the undecided connection position (initial connection position). Can do. Specifically, the weight can be increased so that the influence of the determined connection position becomes stronger.

注目テンプレート画像(番号i)の仮位置(tx,ty)は、下記計算式(3)により計算することができる。下記式(3)においては、左側のテンプレート画像(番号i−1)のつなぎ位置を(xi−1,yi−1)、その重みをwとし、右側のテンプレート画像(i+1)のつなぎ位置を(xi+1,yi+1)、その重みをwとする。wおよびwは、対応する隣接テンプレート画像のつなぎ位置が決定済みか否かに応じた重み値である。 The temporary position (tx i , ty i ) of the target template image (number i) can be calculated by the following calculation formula (3). In the following equation (3), the connection position of the left template image (number i-1) is (x i−1 , y i−1 ), the weight is w , and the right template image (i + 1) is connected. The position is (x i + 1 , y i + 1 ) and its weight is w + . w and w + are weight values according to whether or not the connection positions of the corresponding adjacent template images have been determined.

図14(B)の例示において、例えば、決定済みの重み係数wを「0.7」、未決定の重み係数wを「0.3」とし、決定済みのテンプレート番号4のつなぎ位置を(2,−2)、未決定のテンプレート番号2のつなぎ位置を初期値(0,0)とすると、上記計算式(3)により注目テンプレート画像(番号3)の仮位置は(1.4,−1.4)となる。 In the example of FIG. 14B, for example, the determined weight coefficient w H is “0.7”, the undecided weight coefficient w L is “0.3”, and the connection position of the determined template number 4 is (2, -2) When the connection position of the undecided template number 2 is an initial value (0, 0), the temporary position of the template image of interest (number 3) is (1.4, -1.4).

図14(C)は、本実施形態による仮位置算出部が行う、順位付けに基づくテンプレート画像の仮位置の第2の算出方法を説明する図である。図14(C)に示す第2の算出方法においては、まず、注目テンプレート画像の周辺テンプレート画像として、すべてのテンプレート画像について、注目テンプレート画像からの距離と、設定されているつなぎ位置とが取得される。つなぎ位置が未決定のものについては、上記と同様に初期つなぎ位置(0,0)が取得される。テンプレート画像間の距離は、単純にブロック数を単位とすればよい。図14(C)においては、例えば、注目テンプレートをテンプレート番号3として、番号2および番号4のテンプレート画像に対しては距離1が、番号1および番号5のものに対しては距離2が、番号6のものに対しては距離3が与えられる。   FIG. 14C is a diagram illustrating a second method for calculating the temporary position of the template image based on the ranking performed by the temporary position calculation unit according to the present embodiment. In the second calculation method shown in FIG. 14C, first, as the peripheral template image of the template image of interest, the distance from the template image of interest and the set connection position are obtained for all template images. The For those for which the connection position has not been determined, the initial connection position (0, 0) is acquired in the same manner as described above. The distance between the template images may simply be the number of blocks. In FIG. 14C, for example, the template of interest is template number 3, distance 1 is assigned to the template images of number 2 and number 4, and distance 2 is assigned to those of number 1 and number 5. A distance of 3 is given for 6 things.

そして、取得された周辺テンプレート画像のつなぎ位置を距離で重み付けして平均処理し、その平均値を注目テンプレート画像の仮位置とすることができる。距離に基づく重み付けは、距離が近いほど大きくなるような関数を用いることができる。例えば、距離の逆数(1/距離)を重み値として使用することができる。   Then, the connected positions of the acquired peripheral template images are weighted by the distance and averaged, and the average value can be used as the temporary position of the template image of interest. For the weighting based on the distance, a function that increases as the distance is closer can be used. For example, the reciprocal of distance (1 / distance) can be used as the weight value.

注目テンプレート画像(番号i)の仮位置を(tx,ty)として、各テンプレート画像(番号j=1〜N)のつなぎ位置を(x,y)、その距離をDijとすると、下記計算式(4)により、仮位置(tx,ty)を計算することができる。図14(C)に示す第2の算出方法によれば、隣接以外の遠くのテンプレート画像のつなぎ位置も考慮されるので、周辺との連続性をより良好に維持することができる。なお、注目テンプレート画像の周辺テンプレート画像として、すべてのテンプレート画像の距離およびつなぎ位置を取得するものとしたが、距離で所定の打ち切りを行ってもよい。 If the temporary position of the template image of interest (number i) is (tx i , ty i ), the connection position of each template image (number j = 1 to N) is (x j , y j ), and the distance is D ij. The temporary position (tx i , ty i ) can be calculated by the following calculation formula (4). According to the second calculation method shown in FIG. 14C, since the connection positions of distant template images other than those adjacent are considered, continuity with the surroundings can be maintained better. Note that the distances and connection positions of all template images are acquired as the peripheral template images of the template image of interest, but a predetermined censoring may be performed at the distance.

なお、上記説明では、隣接テンプレート画像のつなぎ位置が決定済みか否かに応じた重み値、またはテンプレート画像間の距離に応じた重み値を用いるものとして説明した。しかしながら、上述した計算方法は、一例であり、特に限定されるものではない。他の実施形態では、隣接テンプレート画像のつなぎ位置が決定済みか否かに応じ、かつ、テンプレート画像間の距離に応じた重み付けを行ってもよい。   In the above description, the weight value according to whether or not the connection position of adjacent template images has been determined or the weight value according to the distance between the template images has been described. However, the calculation method described above is an example and is not particularly limited. In another embodiment, weighting may be performed in accordance with whether or not the connection positions of adjacent template images have been determined, and in accordance with the distance between the template images.

再び図12を参照すると、ステップS307では、撮像システム10は、テンプレート・マッチングを行う探索領域の探索範囲を設定する。図15は、本実施形態による探索範囲設定部が行う探索範囲の設定方法を説明する図である。テンプレート・マッチングでは、注目テンプレート画像について、所定サイズの探索領域が探索用画像から切り出される。探索用画像である位置検出用画像0と、テンプレート用画像である位置検出用画像1とは、事前定義された位置検出用変換テーブルによって生成されるので、ある程度の精度で重ね合わせられている。このため、テンプレート画像に対応する部分は、対応する補正画像0上の座標の近傍に見出されることが予測されるので、この座標を基準として探索領域が切り出される。上記探索範囲は、探索領域においてテンプレート・マッチングを行う範囲を決めるもので、この探索範囲内でテンプレート画像を縦横に位置をずらしながら探索領域の画像とマッチングが行われる。このため、探索範囲が広くなるにつれて処理時間が長くなる。   Referring to FIG. 12 again, in step S307, the imaging system 10 sets a search range of a search area for performing template matching. FIG. 15 is a diagram illustrating a search range setting method performed by the search range setting unit according to the present embodiment. In template matching, a search area of a predetermined size is extracted from the search image for the template image of interest. Since the position detection image 0 that is a search image and the position detection image 1 that is a template image are generated by a predefined position detection conversion table, they are superimposed with a certain degree of accuracy. For this reason, since it is predicted that the part corresponding to the template image is found in the vicinity of the coordinates on the corresponding corrected image 0, the search area is cut out based on the coordinates. The search range determines a range for performing template matching in the search region, and matching with the image in the search region is performed while shifting the position of the template image vertically and horizontally within the search range. For this reason, the processing time becomes longer as the search range becomes wider.

図15(A)は、通常の探索範囲360の設定方法を説明するものであり、通常の設定方法では、初期位置(○:テンプレート画像の座標と一致)を中心にした探索領域330をそのまま探索範囲360Aとする。この場合、探索領域330と探索範囲360Aとが同じとなり、探索領域全てでマッチング計算を行う必要がある。   FIG. 15A illustrates a method for setting the normal search range 360. In the normal setting method, the search region 330 centered on the initial position (◯: coincides with the coordinates of the template image) is searched as it is. The range is 360A. In this case, the search area 330 and the search range 360A are the same, and it is necessary to perform matching calculation in the entire search area.

これに対して、図15(B)は、算出された仮位置に基づいて探索範囲を設定する方法を説明する。通常、決定された仮位置(図では●で示す。)334は、特徴のあるテンプレートの影響を受けて初期位置(図では○で示す。)332から移動しているため、仮位置(●)を中心にして探索領域を移動させ(350)、元の探索領域330と重なる領域を探索範囲360Bとすることにより、探索範囲を狭め、処理時間を短縮することができる。   In contrast, FIG. 15B illustrates a method of setting a search range based on the calculated temporary position. Usually, the determined temporary position (indicated by ● in the figure) 334 is moved from the initial position (indicated by ○ in the figure) 332 under the influence of a characteristic template, so that the temporary position (●) The search area is moved around 350 (350), and the area overlapping with the original search area 330 is set as the search area 360B, so that the search area can be narrowed and the processing time can be shortened.

図15(C)は、さらに、隣接するテンプレート画像について決定済みのつなぎ位置に基づいて探索範囲を設定する方法を説明するものである。図15(B)に示す方法と同様に、決定された仮位置(●)を中心にして探索領域を移動させ(350)、元の探索領域330と重なる領域を求める。続いて、隣接するテンプレート画像について決定済みのつなぎ位置を参照し、さらに絞り込んだ探索範囲360Cを決定する。例えば、両側の隣接テンプレート画像のつなぎ位置が決定済みの場合には、注目テンプレートのつなぎ位置は、概ねその間に限定されると考えられる。そこで、図15(C)のように両側のテンプレート画像の縦方向のつなぎ位置336U,336Lを利用して縦方向に制限を与えて、探索範囲360Bを狭めることで、さらに処理時間を短縮することができる。   FIG. 15C further illustrates a method of setting a search range based on a connection position that has been determined for adjacent template images. Similarly to the method shown in FIG. 15B, the search area is moved around the determined temporary position (●) (350), and an area overlapping the original search area 330 is obtained. Subsequently, the determined search range 360C is determined by referring to the determined connection positions for the adjacent template images. For example, when the connection positions of the adjacent template images on both sides have been determined, the connection positions of the template of interest are considered to be generally limited between them. Therefore, as shown in FIG. 15C, the processing time can be further shortened by narrowing the search range 360B by limiting the vertical direction by using the vertical connection positions 336U and 336L of the template images on both sides. Can do.

再び図12を参照すると、ステップS308では、撮像システム10は、ステップS307で設定された探索範囲内で、探索領域上でテンプレート画像を縦方向および横方向にずらしながら、マッチングを計算し、類似度のスコアを求める。   Referring to FIG. 12 again, in step S308, the imaging system 10 calculates matching while shifting the template image in the vertical direction and the horizontal direction on the search region within the search range set in step S307, and the similarity Find the score.

図16(A)は、本実施形態による撮像システム10が実行するマッチング計算処理の詳細を示すフローチャートである。図16(A)に示す処理は、図12に示したステップS308で呼び出されて、ステップS400から開始される。ステップS401では、撮像システム10は、注目テンプレート画像の特徴量が所定の閾値以上であるか否かを判定する。また、説明する実施形態では、所定の閾値を定めて、その閾値に対する大小により特徴量を区分している。ステップS401で、注目テンプレート画像の特徴量が所定の閾値以上であると判定された場合(YES)は、ステップS402へ処理を分岐させる。   FIG. 16A is a flowchart showing details of matching calculation processing executed by the imaging system 10 according to the present embodiment. The process shown in FIG. 16A is called in step S308 shown in FIG. 12, and is started from step S400. In step S401, the imaging system 10 determines whether the feature amount of the template image of interest is greater than or equal to a predetermined threshold value. In the embodiment to be described, a predetermined threshold value is set, and the feature amount is classified according to the magnitude of the threshold value. If it is determined in step S401 that the feature amount of the template image of interest is greater than or equal to a predetermined threshold (YES), the process branches to step S402.

ステップS402では、撮像システム10は、特徴量が大きな画像に適した評価方式のマッチング・スコアを計算し、ステップS404で、本処理を終了させて、図12に示した処理に戻す。一方。ステップS401で、注目テンプレート画像の特徴量が所定の閾値以上ではないと判定された場合(NO)は、ステップS403へと処理を分岐させる。ステップS403では、撮像システム10は、特徴量が小さな画像に適した評価方式に基づくマッチング・スコアを計算し、ステップS404で、本処理を終了させて、図12に示した処理に戻る。   In step S402, the imaging system 10 calculates a matching score of an evaluation method suitable for an image having a large feature amount. In step S404, the imaging system 10 ends the process and returns to the process illustrated in FIG. on the other hand. If it is determined in step S401 that the feature amount of the template image of interest is not equal to or greater than the predetermined threshold (NO), the process branches to step S403. In step S403, the imaging system 10 calculates a matching score based on an evaluation method suitable for an image having a small feature amount. In step S404, the imaging system 10 ends the process and returns to the process illustrated in FIG.

以下、図17を参照して、テンプレート・マッチングの一例として、ゼロ平均正規化相互相関(Zero-mean Normalized Cross-Correlation)法およびZSSD(Zero-mean Sum of Squared Differences)法について説明する。図17は、(A)テンプレート画像と、(B)パターンマッチングにより探索範囲でテンプレート画像を探索する処理を説明する図である。テンプレートの全画素数をN(=W画素×H画素)とし、探索範囲上での探索位置を(kx,ky)で表す。探索位置(kx,ky)を基準座標(0,0)とした場合の座標(i,j)におけるテンプレート画像の輝度値をT(i,j)とし、探索用画像上の輝度値をS(kx+i,ky+j)とすると、ZNCC法によるマッチング・スコアZNCC(kx,ky)は、下記式(5)で求めることができる。なお、図17では、探索位置(kx,ky)をテンプレート画像の左上に設定しているが、座標の取り方は、特に限定されるものではなく、テンプレート画像の中心に設定してもよい。   Hereinafter, as an example of template matching, a zero-mean normalized cross-correlation (Zero) method and a zero-mean sum of squared difference (ZSSD) method will be described with reference to FIG. FIG. 17 is a diagram for explaining processing for searching for a template image in a search range by (A) a template image and (B) pattern matching. The total number of pixels of the template is N (= W pixels × H pixels), and the search position on the search range is represented by (kx, ky). The brightness value of the template image at the coordinates (i, j) when the search position (kx, ky) is the reference coordinates (0,0) is T (i, j), and the brightness value on the search image is S ( kx + i, ky + j), the matching score ZNCC (kx, ky) by the ZNCC method can be obtained by the following equation (5). In FIG. 17, the search position (kx, ky) is set at the upper left of the template image, but the method of taking the coordinates is not particularly limited, and may be set at the center of the template image.

マッチング・スコアZNCC(kx,ky)は、類似度を表し、1のときは、完全一致となり、−1のときはネガポジ反転となる。すなわち、マッチング・スコアZNCC(kx,ky)が高い方が、テンプレート画像との類似度が高いことを示す。図17(B)に示すように探索範囲内でテンプレート画像を縦横に位置をずらしながら、テンプレート・マッチングが行われ、各探索位置におけるマッチング・スコアZNCC(kx,ky)が算出される。   The matching score ZNCC (kx, ky) represents the degree of similarity. When it is 1, it is a perfect match, and when it is -1, it is a negative / positive inversion. That is, a higher matching score ZNCC (kx, ky) indicates a higher degree of similarity with the template image. As shown in FIG. 17B, template matching is performed while shifting the position of the template image vertically and horizontally within the search range, and a matching score ZNCC (kx, ky) at each search position is calculated.

これに対して、ZSSD法による相違度ZSSD(kx,ky)は、下記式(6)で求めることができる。なお、ZSSD法では、同じ位置の画素の輝度値の差の2乗和が求められるので、ZSSDの値は、いわゆる相違度であり、値が大きい方が類似していないことを意味する。そのため、類似度に基づくスコアとするために、負の符号を付けて、−ZSSD(kx,ky)をマッチング・スコアとする。   On the other hand, the dissimilarity ZSSD (kx, ky) by the ZSSD method can be obtained by the following equation (6). In the ZSSD method, since the sum of squares of the difference in luminance value of pixels at the same position is obtained, the ZSSD value is a so-called dissimilarity, which means that a larger value is not similar. Therefore, in order to obtain a score based on the degree of similarity, a negative sign is added and −ZSSD (kx, ky) is set as a matching score.

マッチング・スコア−ZSSD(kx,ky)は、各画素値を8ビット値とすると、取りうる値の範囲は、−(255×255)〜0がとなり、0のときは、完全一致となる。マッチング・スコア−ZSSD(kx,ky)が高い方が、テンプレート画像との類似度が高いことを示す。   The matching score -ZSSD (kx, ky) has a range of possible values from − (255 × 255) to 0 when each pixel value is an 8-bit value. A higher matching score-ZSSD (kx, ky) indicates a higher degree of similarity with the template image.

上述したZNCC法は、画像のゲインの変動を吸収することができ、また、画像の平均明るさの変動を吸収することができる点、また、類似度のマッチングの堅牢性も高い点で好適なものである。ZNCC法は、特に、画像の輝度が充分に広がって分布し、特徴量が大きい場合に好適に適用することができる。これに対して、ZSSD法は、画像の平均明るさの変動を吸収することができる点で、SSDと比較して優れており、また、SSD(Sum of Squared Differences)に比較して計算コストがかかるが、ZNCCよりも計算か簡素である。ZSSD法は、特に、特徴量が小さくぼけた画像に対しても好適に適用することができる。なお、ZSSDに代えてZSAD(Zero-mean Sum of Absolute Differences)を用いても良い。   The ZNCC method described above is suitable in that it can absorb fluctuations in the gain of the image, can absorb fluctuations in the average brightness of the image, and has high robustness in matching similarity. Is. The ZNCC method can be suitably applied particularly when the luminance of the image is sufficiently spread and distributed and the feature amount is large. On the other hand, the ZSSD method is superior to SSD in that it can absorb fluctuations in the average brightness of an image, and the calculation cost is lower than that of SSD (Sum of Squared Differences). However, the calculation is simpler than ZNCC. The ZSSD method can be suitably applied particularly to an image having a small feature amount and blurred. Instead of ZSSD, ZSAD (Zero-mean Sum of Absolute Differences) may be used.

再び図12を参照すると、ステップS309では、撮像システム10は、ステップS308で計算された各位置における類似度に基づくマッチング・スコアZNCC(kx,ky)または−ZSSD(kx,ky)に対し、オフセット補正を行って、補正された最終的なスコアを計算する。   Referring to FIG. 12 again, in step S309, the imaging system 10 offsets the matching score ZNCC (kx, ky) or -ZSSD (kx, ky) based on the similarity at each position calculated in step S308. Make corrections and calculate the corrected final score.

図16(B)は、本実施形態による撮像システム10が実行するスコア補正処理の詳細を示すフローチャートである。図16(B)に示す処理は、図12に示したステップS309で呼び出されて、ステップS500から開始される。ステップS501では、撮像システム10は、注目テンプレート画像の特徴量が所定の閾値以上であるか否かを判定する。ステップS501で、注目テンプレート画像の特徴量が所定の閾値以上であると判定された場合(YES)は、ステップS502へ処理を分岐させる。この場合は、スコアの算出にZNCC法が用いられているので、ステップS502では、撮像システム10は、ZNCC法用のオフセット関数を用いてオフセットを計算し、ステップS504で、本処理を終了させて、図12に示した処理に戻る。   FIG. 16B is a flowchart showing details of the score correction processing executed by the imaging system 10 according to the present embodiment. The process shown in FIG. 16B is called in step S309 shown in FIG. 12, and starts from step S500. In step S501, the imaging system 10 determines whether the feature amount of the template image of interest is greater than or equal to a predetermined threshold value. If it is determined in step S501 that the feature amount of the template image of interest is greater than or equal to a predetermined threshold (YES), the process branches to step S502. In this case, since the ZNCC method is used to calculate the score, in step S502, the imaging system 10 calculates an offset using the offset function for the ZNCC method, and in step S504, the process is terminated. Returning to the processing shown in FIG.

一方、ステップS501で、注目テンプレート画像の特徴量が所定の閾値以上ではないと判定された場合(NO)は、ステップS503へ処理を分岐させる。この場合は、スコアの算出にZSSD法が用いられているので、ステップS503では、撮像システム10は、ZSSD法用のオフセット関数を用いてオフセットを計算し、ステップS504で、本処理を終了させて、図12に示した処理に戻る。   On the other hand, if it is determined in step S501 that the feature amount of the template image of interest is not equal to or greater than the predetermined threshold (NO), the process branches to step S503. In this case, since the ZSSD method is used to calculate the score, in step S503, the imaging system 10 calculates an offset using an offset function for the ZSSD method, and in step S504, the process is terminated. Returning to the processing shown in FIG.

ステップS310では、撮像システム10は、ステップS309で計算された各位置における補正後のスコアに基づいて、当該注目テンプレート画像に対するつなぎ位置を決定する。   In step S310, the imaging system 10 determines a connection position for the template image of interest based on the corrected score at each position calculated in step S309.

図18(A)は、マッチング・スコアに対するオフセット関数を探索位置(kx/ky)に対してプロットしたグラフを示す。ステップS309の処理では、マッチング・スコアZNCC(kx,ky)または−ZSSD(kx,ky)に対し、図18(A)に示すようなオフセット関数(kx、ky)により仮位置からの距離に応じたオフセット値を加算する。図18(A)に示すオフセット関数は、仮位置でオフセット値が最大になり、仮位置から距離が離れるにつれて単調減少する関数である。オフセット関数は、上述したようにマッチング・スコアの評価方式に応じて、その取りうる値の範囲が異なるので、その範囲に応じた大きさとなるように定められる。例えば、ZNCCでは、−1〜1の値の範囲となり、−ZSSDでは、−(255×255)〜0となるので、それに対応した大きさとする。図18(B)および(C)は、補正前のスコアおよび補正後のスコアを探索位置(kx/ky)でプロットしたグラフを補正前のスコアに基づくマッチング位置および補正後のスコアに基づくマッチング位置とともに示す図である。図18(B)は、特徴量が大きいテンプレート画像の場合を例示し、図18(C)は、特徴量が小さいテンプレート画像の場合を例示する。   FIG. 18A shows a graph in which the offset function for the matching score is plotted with respect to the search position (kx / ky). In the process of step S309, the matching score ZNCC (kx, ky) or -ZSSD (kx, ky) is determined according to the distance from the temporary position by the offset function (kx, ky) as shown in FIG. Add the offset value. The offset function shown in FIG. 18A is a function in which the offset value becomes maximum at the temporary position and monotonously decreases as the distance from the temporary position increases. As described above, the range of possible values of the offset function varies depending on the matching score evaluation method, and thus the offset function is determined to have a size corresponding to the range. For example, in ZNCC, the value ranges from −1 to 1, and in −ZSSD, from − (255 × 255) to 0, the size is set accordingly. FIGS. 18B and 18C show a graph obtained by plotting the score before correction and the score after correction at the search position (kx / ky), the matching position based on the score before correction, and the matching position based on the score after correction. It is a figure shown with. FIG. 18B illustrates the case of a template image having a large feature amount, and FIG. 18C illustrates the case of a template image having a small feature amount.

図18(B)に示すように、オフセット補正により、最終的なマッチング・スコアは、仮位置を中心としてかさ上げされる。しかしながら、テンプレート画像の特徴量が大きい場合は、位置の変化による類似度が大きく変動するので、類似度に基づくマッチング・スコアの影響が色濃く残される。このため、オフセット補正が行われるか否かにかかわらず、概ね類似度に基づくマッチング・スコアが最大となる位置がマッチング位置として決定される。すなわち、類似度のマッチング・スコアのピークが明確に残る程度に特徴量が大きければ、類似度が優勢的につなぎ位置を決定付けることになる。   As shown in FIG. 18B, the final matching score is raised around the temporary position by the offset correction. However, when the feature amount of the template image is large, the similarity due to the change in position greatly fluctuates, so that the influence of the matching score based on the similarity remains dark. For this reason, regardless of whether offset correction is performed or not, the position where the matching score based on the similarity is maximized is determined as the matching position. In other words, if the feature quantity is large enough that the peak of the similarity matching score remains clearly, the similarity will predominately determine the connection position.

一方、図18(C)に示すように、テンプレート画像の特徴量が小さい場合は、通常のマッチング・スコアでは明瞭なピークが認められず、類似度に基づくマッチング・スコアよりも、仮位置からの距離に応じたオフセットの影響が色濃く反映される。このため、概ねオフセット関数が最大となる仮位置の近傍がマッチング位置として決定される。すなわち、特徴量が小さい場合は、仮位置が優勢的につなぎ位置を決定付けることになる。   On the other hand, as shown in FIG. 18 (C), when the feature amount of the template image is small, a clear peak is not recognized in the normal matching score, and from the temporary position rather than the matching score based on the similarity. The effect of offset according to distance is reflected deeply. For this reason, the vicinity of the temporary position where the offset function is approximately maximum is determined as the matching position. That is, when the feature amount is small, the temporary position predominates and determines the connection position.

マッチング位置が決定されると、注目テンプレート画像(番号i)に対し、位置検出用補正画像0のそのままの座標値上に重ね合わせた位置からのずらし量(Δθ,Δφ)としてつなぎ位置が求められる。 When the matching position is determined, a connection position is obtained as a shift amount (Δθ i , Δφ i ) from the position superimposed on the coordinate value of the position detection correction image 0 as it is with respect to the template image of interest (number i). Desired.

上述したオフセット補正を行うことにより、類似度に基づくスコアに明確なピークがあり、類似度が大きい場合はその位置がつなぎ位置となる。特徴のない場合など明確なピークがあらわれない場合は、仮位置付近がつなぎ位置となり、隣接ブロックとの連続性が保たれ、仮位置から大きく外れた位置でつなぎ位置が決定されてしまう割合を低減することができる。   By performing the offset correction described above, there is a clear peak in the score based on the similarity, and when the similarity is large, the position becomes the connection position. When there is no clear peak, such as when there is no feature, the tentative position is the connection position, continuity with adjacent blocks is maintained, and the ratio at which the connection position is determined at a position far from the temporary position is reduced. can do.

再び図12を参照すると、ステップS311では、撮像システム10は、全てのテンプレート画像のブロックに対する処理が終了しているか判定する。ステップS311で、終了していないと判定された場合(NO)は、ステップS306に戻されて、全てのブロックに対する処理が完了するまで繰り返させる。一方、ステップS311で、全ての処理が終了したと判定された場合(YES)は、ステップS312へ処理を進める。   Referring to FIG. 12 again, in step S311, the imaging system 10 determines whether the processing for all the template image blocks has been completed. If it is determined in step S311 that the process has not been completed (NO), the process returns to step S306 and is repeated until the processes for all the blocks are completed. On the other hand, if it is determined in step S311 that all the processes have been completed (YES), the process proceeds to step S312.

上述したステップS306からステップS311までの処理により、生成された複数のテンプレート画像(番号i:i=1〜#)すべてに対応したつなぎ位置(Δθ,Δφ)が求められる。ステップS312では、撮像システム10は、得られた各テンプレート画像に対応するつなぎ位置のデータ・セットに基づいて、全天球フォーマットの各画素(θ,φ)毎のつなぎ位置(Δθ,Δφ)を計算し、検出結果データ222を生成する。ステップS313では、撮像システム10は、本つなぎ位置検出処理を終了させ、図5に示す処理に戻る。 Through the processing from step S306 to step S311, the connection positions (Δθ i , Δφ i ) corresponding to all of the generated template images (number i: i = 1 to #) are obtained. In step S312, the imaging system 10 determines the connection position (Δθ, Δφ) for each pixel (θ, φ) in the omnidirectional format based on the connection position data set corresponding to each obtained template image. The detection result data 222 is generated by calculation. In step S313, the imaging system 10 ends the present joint position detection process and returns to the process illustrated in FIG.

図19は、本実施形態において、つなぎ位置検出部204により生成される検出結果データのデータ構造を示す図である。図20は、本実施形態の位置検出部204による検出結果データを生成する処理を説明する図である。上記ステップS312での処理により、図19に示すような、変換後の各座標値(θ,φ)に対して、ずらし量(Δθ,Δφ)が対応付けられた情報を全座標値について保持する検出結果データ222が得られる。このとき、各座標値(θ,φ)に対応するずらし量(Δθ,Δφ)は、上記つなぎ位置検出処理により求められたテンプレート・ブロック(i)毎のずらし量(Δθ,Δφ)を、各テンプレート・ブロックの中心座標の値として設定し、補間して計算することができる。 FIG. 19 is a diagram illustrating a data structure of detection result data generated by the connection position detection unit 204 in the present embodiment. FIG. 20 is a diagram illustrating processing for generating detection result data by the position detection unit 204 of the present embodiment. As a result of the processing in step S312, the information in which the shift amounts (Δθ, Δφ) are associated with the coordinate values (θ, φ) after conversion as shown in FIG. 19 is held for all coordinate values. Detection result data 222 is obtained. At this time, the shift amounts (Δθ, Δφ) corresponding to the respective coordinate values (θ, φ) are the shift amounts (Δθ i , Δφ i ) for each template block (i) obtained by the connection position detection process. It can be set as the value of the center coordinate of each template block and calculated by interpolation.

具体的には、まず、図20(A)に示すように、水平方向の座標値θがテンプレート・ブロックの中心座標の値と等しく、かつ、上端(φ=0)および下端(高さが1800画素の場合は、φ=1799である。)に位置する各座標におけるずらし量(Δθ,Δφ)を(0,0)として設定する。その他のずらし量未設定の座標については、図20(B)に示すように、近傍の設定済み4点(図中A〜Dで示す。)からなる格子を考え、その中で2次元線形補間演算によりずらし量を算出する。点Qを、4点の格子においてθ軸方向にdθ:1−dθ、φ軸方向にdφ:1−dφに内分する点だとすると、点Qにおけるずらし量(Δθ,Δφ)は、近傍4点におけるずらし量((ΔθA,Δφ),…,(ΔθD,Δφ))を用いて、下記式(7)により計算することができる。 Specifically, first, as shown in FIG. 20A, the horizontal coordinate value θ is equal to the value of the center coordinate of the template block, and the upper end (φ = 0) and the lower end (height is 1800). In the case of a pixel, φ = 1799.) The shift amount (Δθ, Δφ) at each coordinate located at (0) is set as (0, 0). As for other coordinates for which the shift amount is not set, as shown in FIG. 20B, a lattice composed of four neighboring points (indicated by A to D in the figure) is considered, and two-dimensional linear interpolation is included therein. The shift amount is calculated by calculation. If the point Q is a point that internally divides dθ: 1-dθ in the θ-axis direction and dφ: 1-dφ in the φ-axis direction in the four-point lattice, the shift amount (Δθ Q , Δφ Q ) at the point Q is near Using the shift amounts ((Δθ A, Δφ A ),..., (Δθ D, Δφ D )) at the four points, it can be calculated by the following equation (7).

なお、説明する実施形態では、全天球フォーマットにおける上端(φ=0)および下端(上記例ではφ=1799)に対しずらし量(0,0)を設定するようにした。しかしながら、各座標値(θ,φ)に対応するずらし量(Δθ,Δφ)の計算方法は、特に限定されるものではない。ここでは部分画像0,1を矛盾無くつなぎ合わせられればよいので、他の実施形態では、より内側にずらし量(0,0)とする座標を設定して上記2次元線形補間演算を行うことができる。この場合、その座標よりφ方向が外側である座標においては、全てずらし量(0,0)を設定するようにすればよい。   In the embodiment to be described, the shift amount (0, 0) is set with respect to the upper end (φ = 0) and the lower end (φ = 1799 in the above example) in the omnidirectional format. However, the calculation method of the shift amount (Δθ, Δφ) corresponding to each coordinate value (θ, φ) is not particularly limited. Here, the partial images 0 and 1 only need to be connected without contradiction, and in another embodiment, the above-described two-dimensional linear interpolation calculation can be performed by setting the coordinates to be shifted inward (0, 0). it can. In this case, the shift amount (0, 0) may be set for all the coordinates whose φ direction is outside the coordinates.

再び図5を参照すると、ステップS203では、撮像システム10は、テーブル修正部206により、上記検出結果データ222を用いて、位置検出用変換テーブル220を画像が球面座標上で位置合わせされるように修正する。ステップS202のつなぎ位置検出処理により、図19に示すように、全天球画像フォーマットの座標値毎に、ずらし量が求まるので、ステップS203では、具体的には、部分画像0の歪み補正に用いた検出用歪み補正テーブル0において、入力座標値(θ,φ)に対し、修正前には(θ+Δθ,φ+Δφ)に対応付けられていた(x,y)を対応付けるように修正する。なお、部分画像1の歪み補正に用いた検出用歪み補正テーブル1については対応付けを変える必要はない。   Referring to FIG. 5 again, in step S203, the imaging system 10 causes the table correction unit 206 to use the detection result data 222 so that the position detection conversion table 220 is aligned on the spherical coordinates. Correct it. As shown in FIG. 19, the shift amount is obtained for each coordinate value of the omnidirectional image format by the joint position detection process in step S202. Specifically, in step S203, the distortion amount of partial image 0 is used. In the detected distortion correction table 0, the input coordinate value (θ, φ) is corrected so as to correspond to (x, y) that was associated with (θ + Δθ, φ + Δφ) before the correction. Note that it is not necessary to change the association of the detection distortion correction table 1 used for distortion correction of the partial image 1.

ステップS204では、撮像システム10は、テーブル生成部208により、修正された位置検出用変換テーブル220から、回転座標変換することによって、画像合成用変換テーブル224を生成する。   In step S <b> 204, the imaging system 10 generates the image composition conversion table 224 by performing rotational coordinate conversion from the corrected position detection conversion table 220 using the table generation unit 208.

図21は、本実施形態による撮像システム10が実行する、画像合成用変換テーブルの生成処理を示すフローチャートである。図22は、画像合成処理の際における、2つの魚眼レンズで撮像された2つの部分画像の球面座標系へのマッピングを説明する図である。図21に示す処理は、図5に示したステップS204で呼び出されて、ステップS600から開始する。ステップS601〜ステップS606のループでは、テーブル生成部208は、画像合成用歪み補正テーブルの入力値となる画像合成用の球面座標系の座標値(θ,φ)毎に、ステップS602〜S605の処理を実行する。設定される座標値の範囲は、水平角度の全範囲(0〜360度)および垂直角度の全範囲(0〜180度)で定義される範囲となる。入力値になる全座標値について変換処理を行うため、ここで各座標値が順に設定される。 FIG. 21 is a flowchart illustrating the image synthesis conversion table generation processing executed by the imaging system 10 according to the present embodiment. FIG. 22 is a diagram for describing mapping of two partial images captured by two fisheye lenses to a spherical coordinate system in the image composition process. The process shown in FIG. 21 is called in step S204 shown in FIG. 5 and starts from step S600. In the loop of step S601 to step S606, the table generation unit 208 performs steps S602 to S605 for each coordinate value (θ g , φ g ) of the spherical coordinate system for image synthesis that is an input value of the distortion correction table for image synthesis. Execute the process. The range of coordinate values to be set is a range defined by the entire range of horizontal angles (0 to 360 degrees) and the entire range of vertical angles (0 to 180 degrees). In order to perform conversion processing for all coordinate values that become input values, the coordinate values are set in order here.

ステップS602では、テーブル生成部208は、回転座標変換により、上記座標値(θg,φ)に対応する、つなぎ位置検出用の球面座標系の座標値(θ,φ)を求める。回転座標変換により、図9に示すような、一方のレンズ光学系の光軸を軸とした水平角度θおよび垂直角度φの座標軸の定義から、図22に示すような、光軸に垂直な軸を基準とした水平角度θおよび垂直角度φの定義に変換される。上記座標(θg,φ)に対応する座標(θ,φ)は、回転座標変換に基づき、動径を1とし、画像合成用の球面座標系の座標(θg,φ)に対応する3次元直交座標(x,y,z)および位置検出用の球面座標系の座標(θd,φ)に対応する3次元直交座標(x,y,z)を用いて、下記式(8)で計算することができる。なお、下記式(8)中、係数βは、3次元直交座標におけるx軸周りの回転座標変換を規定する回転角であり、説明する実施形態では、90度である。 In step S602, the table generation unit 208 obtains coordinate values (θ d , φ d ) of the joint coordinate detection spherical coordinate system corresponding to the coordinate values (θ g, φ g ) by rotational coordinate conversion. By rotating coordinate transformation, the definition of the coordinate axes of the horizontal angle θ d and the vertical angle φ d with the optical axis of one lens optical system as an axis as shown in FIG. 9 makes it perpendicular to the optical axis as shown in FIG. Are converted into definitions of a horizontal angle θ g and a vertical angle φ g with respect to a simple axis. Coordinates (θ d , φ d ) corresponding to the above coordinates (θ g, φ g ) are based on rotational coordinate transformation and have a radius of 1 and coordinates (θ g, φ g ) in a spherical coordinate system for image synthesis. The three-dimensional orthogonal coordinates (x d , y d , z d ) corresponding to the coordinates (θ d, φ d ) of the position detection spherical coordinate system and the three-dimensional orthogonal coordinates (x g , y g , z g ) corresponding to ) Can be calculated by the following equation (8). In the following formula (8), the coefficient β is a rotation angle that defines the rotation coordinate transformation around the x axis in the three-dimensional orthogonal coordinates, and is 90 degrees in the embodiment to be described.

位置検出用変換テーブル220では、光軸が球面の極に、画像間の重複部分が球面の赤道近傍に射影され、全天球画像フォーマットの上下方向と、撮影されたシーンの天頂方向が一致していない。これに対して、上記回転座標変換により、画像合成用変換テーブル224では、光軸が球面の赤道上に射影され、全天球画像フォーマットの上下方向と、撮影されたシーンの天頂方向とが一致するようになる。   In the position detection conversion table 220, the optical axis is projected onto the spherical pole and the overlapping portion between the images is projected near the equator of the spherical surface, and the vertical direction of the omnidirectional image format matches the zenith direction of the captured scene. Not. In contrast, in the image composition conversion table 224, the optical axis is projected onto the spherical equator, and the vertical direction of the omnidirectional image format matches the zenith direction of the captured scene. Will come to do.

ステップS603〜ステップS605のループでは、画像0および画像1毎に、テーブル生成部208は、ステップS604の処理を実行する。ステップS604では、テーブル生成部208は、各画像(0,1)について、(θ,φ)に対応付けられる部分画像(0,1)の座標値(x,y)を、修正後のつなぎ位置検出用変換テーブルを参照して求める。なお、変換テーブル220,224は、θおよびφ共に、1画素きざみで対応する座標値(x,y)を保持しているが、変換により算出される座標値(θ,φ)は、典型的には、小数点以下の値で取得される。簡便には、対応付けられる部分画像(0,1)の座標値(x,y)は、算出された座標値(θ,φ)の最近傍のテーブル中に存在する座標値に対応付けられる座標値(x,y)を採用することができる。また、好適な実施形態では、テーブルに存在するうち、最近傍の座標値およびその周囲の座標値に対応付けられる複数の座標値(x,y)を参照して、算出された座標(θ,φ)からの距離に応じて重み付け補間を行って、対応付けられる部分画像(0,1)の座標値(x,y)を計算することもできる。 In the loop from step S603 to step S605, the table generating unit 208 executes the process of step S604 for each of image 0 and image 1. In step S604, the table generation unit 208 converts the coordinate values (x, y) of the partial image (0, 1) associated with (θ d , φ d ) for each image (0, 1) after correction. It is obtained by referring to the connection position detection conversion table. The conversion tables 220 and 224 hold the corresponding coordinate values (x, y) in increments of 1 pixel for both θ d and φ d , but the coordinate values (θ d , φ d ) calculated by the conversion are stored. Is typically obtained with a value after the decimal point. Conveniently, the coordinate values (x, y) of the associated partial image (0, 1) are associated with the coordinate values existing in the nearest table of the calculated coordinate values (θ d , φ d ). The coordinate value (x, y) obtained can be adopted. In a preferred embodiment, the coordinates (θ d ) calculated with reference to a plurality of coordinate values (x, y) associated with the nearest coordinate value and the surrounding coordinate values among the coordinate values existing in the table. , Φ d ), the coordinate value (x, y) of the associated partial image (0, 1) can also be calculated by performing weighted interpolation according to the distance from it.

ステップS603〜ステップS605のループで、すべての画像(0,1)について計算が行われ、ステップS602〜ステップS606のループで、入力値となるすべての座標値に対する計算が完了すると、ステップS607では、本処理を終了させる。これにより、画像合成用変換テーブル224の全データが生成される。   In the loop of step S603 to step S605, calculation is performed for all the images (0, 1), and in the loop of step S602 to step S606, when calculation for all coordinate values that are input values is completed, in step S607, This process is terminated. As a result, all data of the image composition conversion table 224 is generated.

再び図5を参照すると、ステップS205では、撮像システム10は、画像合成用歪み補正部210により、画像合成用変換テーブル224を用いて、元の部分画像0および部分画像1に対し歪み補正を行い、画像合成用補正画像0および画像合成用補正画像1を得る。これにより、画像合成用歪み補正部210による処理の結果、魚眼レンズで撮像された2つの部分画像0,1は、図22に示すように、全天球画像フォーマット上に展開される。魚眼レンズ0により撮影された部分画像0は、典型的には、全天球のうちの概ね左半球にマッピングされ、魚眼レンズ1により撮影された部分画像1は、全天球のうちの概ね右半球にマッピングされる。   Referring to FIG. 5 again, in step S205, the imaging system 10 performs distortion correction on the original partial image 0 and partial image 1 using the image synthesis conversion table 224 by the image synthesis distortion correction unit 210. Then, a corrected image for image synthesis 0 and a corrected image for image synthesis 1 are obtained. Thereby, as a result of the processing by the image composition distortion correction unit 210, the two partial images 0 and 1 captured by the fisheye lens are developed on the omnidirectional image format as shown in FIG. The partial image 0 captured by the fisheye lens 0 is typically mapped to approximately the left hemisphere of the entire celestial sphere, and the partial image 1 captured by the fisheye lens 1 is approximately aligned to the approximately right hemisphere of the entire celestial sphere. To be mapped.

図9および図22を比較すると明確であるが、全天球フォーマットに対し、異なった位置に部分画像0および部分画像1がマッピングされており、シーンの天頂方向が画像の上下方向となるφ方向に一致している。部分画像0,1の中心部が、より歪みの少ない赤道上にマッピングされ、補正画像0および補正画像1間の重複領域は、図9に示したものと異なり、垂直角度0度および180度付近、並びに、水平角度0度および180度の近傍領域にマッピングされる。   9 and 22, it is clear that partial image 0 and partial image 1 are mapped at different positions with respect to the omnidirectional format, and the zenith direction of the scene is the vertical direction of the image. It matches. The central part of the partial images 0 and 1 is mapped on the equator with less distortion, and the overlapping area between the corrected image 0 and the corrected image 1 is different from that shown in FIG. , As well as in the vicinity of horizontal angles of 0 degrees and 180 degrees.

ステップS206では、画像合成部212により、画像合成用補正画像0および画像合成用補正画像1を合成する。合成処理では、画像間で重複する重複領域については、ブレンド処理等が行われ、片方しか画素値が存在しない領域については、存在するそのままの画素値が採用されることになる。上記合成処理により、魚眼レンズにより撮像された2枚の部分画像から、1枚の全天球画像が生成される。   In step S <b> 206, the image composition unit 212 synthesizes the image composition correction image 0 and the image composition correction image 1. In the combining process, blending processing or the like is performed for overlapping areas that overlap between images, and the existing pixel values are used for areas where only one of the pixel values exists. Through the above synthesis process, one omnidirectional image is generated from the two partial images captured by the fisheye lens.

以上説明したように、本実施形態では、マッチングを行う対象となるテンプレート画像が有する特徴の程度を指標する特徴量を測定し、この測定された特徴量を用いて、テンプレート画像のつなぎ位置を決定している。より具体的には、領域の特徴に応じてマッチング・スコアを求める評価方式を切り替えている。これにより、特徴の強い領域および特徴の弱い領域に対して適切な評価方式に基づいてつなぎ位置を決定できるので、つなぎ位置検出のミスを低減し、位置合わせの精度を向上させることができる。ひいては、画像が平坦であったり、同じ模様が繰り返された領域であったりして特徴が少ない領域に対しても、精度高くつなぎ位置を検出することができ、得られる全天球画像の品質が向上される。さらに、特徴の少ない不適切なマッチング領域を除外して計算する処理を採用しないので、アルゴリズムの簡素化が図られる。   As described above, in the present embodiment, a feature amount that indicates the degree of the feature of the template image to be matched is measured, and the connection position of the template image is determined using the measured feature amount. doing. More specifically, the evaluation method for obtaining the matching score is switched according to the feature of the region. As a result, since the connection position can be determined based on an appropriate evaluation method for a region having a strong feature and a region having a weak feature, it is possible to reduce errors in detecting the connection position and improve the alignment accuracy. As a result, it is possible to detect the connecting position with high accuracy even in an area where the image is flat or an area where the same pattern is repeated and has few features, and the quality of the obtained omnidirectional image is high. Be improved. Furthermore, the algorithm is simplified because no processing is performed that excludes an inappropriate matching region with few features.

ZNCC法とZSSD法とでは、一般的には、ZNCC法の方が高精度である。しかしながら、上述した実施形態では、基本はZNCC法を使用しつつ、特徴の弱い領域の画像、特に平坦な画像に対しては、ZSSD法を用いるように制御している。特徴の弱い画像について、ZNCC法ではなくZSSD法を使う利点は、以下のように説明される。   In general, the ZNCC method and the ZSSD method are more accurate than the ZNCC method. However, in the above-described embodiment, the ZNCC method is basically used, and control is performed so that the ZSSD method is used for an image in a weak region, particularly a flat image. The advantage of using the ZSSD method instead of the ZNCC method for images with weak features is explained as follows.

例えば、一面の青空や真っ白な壁などの平坦な画像に対してマッチング評価を行うことを考える。このような平坦な画像には、典型的には、撮影時にノイズが乗っている。ノイズが乗った平坦な画像同士でマッチング評価を行う際、いわゆる相関値の一種を与えるZNCC法に比較して、画素毎の誤差を加算した総和として誤差値を与えるZSSD法は、ノイズ画像同士でも誤差は、それほど大きくならないため、マッチング評価値としては良好な値を与える。上述した実施形態では、平坦な画像については、マッチング評価値として良い値をとるようにしたいため、特徴量の小さいテンプレート画像については、相関値を与えるZNCC法ではなく、誤差値を与えるZSSD法を用いることとしている。   For example, consider performing matching evaluation on a flat image such as a blue sky or a pure white wall. Such a flat image typically includes noise during shooting. Compared with the ZNCC method that gives a kind of so-called correlation value when performing matching evaluation between flat images with noise, the ZSSD method that gives an error value as a sum total of errors for each pixel Since the error does not become so large, a good value is given as a matching evaluation value. In the above-described embodiment, since it is desired to take a good value as a matching evaluation value for a flat image, a ZSSD method that gives an error value is used for a template image with a small feature amount, instead of the ZNCC method that gives a correlation value. I am going to use it.

全天球撮像システム10では、全方位が撮影範囲となるため、重複領域に、空などの平坦で特徴が弱い領域と、被写体などの特徴が強い領域との両方が含まれるシーンが多々発生する。本実施形態による複数の画像のつなぎ合わせ処理は、このような性質を有する全天球画像のつなぎ合わせに対し、好適に適用することができる。   In the omnidirectional imaging system 10, since the omnidirectional range is the imaging range, many scenes are generated in which the overlapping region includes both a flat and weak feature such as the sky and a strong feature such as the subject. . The joining process of a plurality of images according to the present embodiment can be suitably applied to the joining of omnidirectional images having such properties.

[他の実施形態]
上述した実施形態では、画像処理装置および撮像システムの一例として、全天球の静止画を自身が備える撮像光学系により撮影し、内部の歪曲補正・画像合成ブロックで合成する撮像システム10を用いて説明した。しかしながら、画像処理装置および撮像システムの構成は、特に限定されるものではない。他の実施形態では、全天球を動画撮影する全天球動画撮像システムとして構成してもよく、複数の撮像光学系で撮影された複数の部分画像(静止画または動画)の入力を受けて全天球画像(静止画または動画)を生成するカメラ・プロセッサ、撮影を専ら担当する全天球撮像装置で撮影された複数の部分画像(静止画または動画)の入力を受けて全天球画像(静止画または動画)を合成するパーソナル・コンピュータ、ワークステーション、物理コンピュータ・システム上の仮想マシンなどの情報処理装置、スマートフォン、タブレットなどの携帯情報端末などを上記画像処理装置として構成することもできる。また、上述したようなカメラ・プロセッサ、情報処理装置、携帯情報端などの画像処理装置と、該画像処理装置から分離された撮像光学系とを含む撮像システムとして構成してもよい。
[Other Embodiments]
In the above-described embodiment, as an example of the image processing apparatus and the imaging system, the imaging system 10 that captures a still image of a celestial sphere with its imaging optical system and synthesizes it with an internal distortion correction / image synthesis block is used. explained. However, the configurations of the image processing apparatus and the imaging system are not particularly limited. In another embodiment, it may be configured as an omnidirectional moving image capturing system that captures a moving image of the omnidirectional sphere, and receives a plurality of partial images (still images or moving images) captured by a plurality of imaging optical systems. A camera processor that generates omnidirectional images (still images or moving images), and omnidirectional images that receive multiple partial images (still images or moving images) captured by an omnidirectional imaging device that is exclusively responsible for shooting An information processing device such as a personal computer, a workstation, or a virtual machine on a physical computer system, a portable information terminal such as a smartphone or a tablet, etc. that synthesizes (still images or moving images) can also be configured as the image processing device. . Moreover, you may comprise as an imaging system containing image processing apparatuses, such as a camera processor, information processing apparatus, and a portable information end as mentioned above, and the imaging optical system isolate | separated from this image processing apparatus.

以下、図23および図24を参照しながら、全天球撮像装置と、この全天球撮像装置で撮影された複数の部分画像の入力を受けて、合成された全天球画像を生成する外部のコンピュータ装置とを含む、他の実施形態における全天球撮像システムについて説明する。図23は、他の実施形態における全天球撮像システム400の概略を示す。   Hereinafter, with reference to FIG. 23 and FIG. 24, an omnidirectional imaging device and an external that generates a synthesized omnidirectional image by receiving input of a plurality of partial images photographed by the omnidirectional imaging device. An omnidirectional imaging system according to another embodiment including the computer apparatus will be described. FIG. 23 shows an outline of an omnidirectional imaging system 400 according to another embodiment.

図23に示す実施形態による全天球撮像システム400は、専ら撮像を担当する全天球撮像装置410と、この全天球撮像装置410と接続され、専ら画像処理を担当するコンピュータ装置430とを含み構成される。なお、図23には、主要な構成のみが示されており、詳細な構成が省略させていることに留意されたい。また、図1〜図22を参照して説明した実施形態と同様のはたらきをする構成要素については、同一符番を付して参照する。また、図23および図24に示す実施形態による全天球撮像システム400は、全天球画像を合成する画像処理が専らコンピュータ装置430で行われることを除いて、図1〜図22を参照して説明した実施形態と同様の構成を備えるので、以下、相違点を中心に説明する。   The omnidirectional imaging system 400 according to the embodiment shown in FIG. 23 includes an omnidirectional imaging apparatus 410 that is exclusively responsible for imaging, and a computer apparatus 430 that is connected to the omnidirectional imaging apparatus 410 and is exclusively responsible for image processing. Consists of. Note that FIG. 23 shows only the main configuration, and omits the detailed configuration. In addition, the same reference numerals are given to components that function in the same manner as the embodiment described with reference to FIGS. In addition, the omnidirectional imaging system 400 according to the embodiment shown in FIGS. 23 and 24 refers to FIGS. 1 to 22 except that image processing for synthesizing the omnidirectional image is performed exclusively by the computer device 430. Therefore, the following description will focus on the differences.

図23に示す実施形態において、全天球撮像装置410は、デジタル・スチルカメラ・プロセッサ100と、鏡胴ユニット102と、プロセッサ100に接続される3軸加速度センサ120とを含む。鏡胴ユニット102は、図2に示したものと同様の構成を有するものであり、プロセッサ100も、図2に示したものと同様の構成を有するものである。   In the embodiment shown in FIG. 23, the omnidirectional imaging device 410 includes a digital still camera processor 100, a lens barrel unit 102, and a three-axis acceleration sensor 120 connected to the processor 100. The lens barrel unit 102 has the same configuration as that shown in FIG. 2, and the processor 100 also has the same configuration as that shown in FIG.

プロセッサ100は、ISP108と、USBブロック146と、シリアルブロック158とを含み、USBコネクタ148を介して接続されるコンピュータ装置430とのUSB通信を制御する。シリアルブロック158には、無線NIC160が接続されており、ネットワークを介して接続されるコンピュータ装置430との無線通信を制御している。   The processor 100 includes an ISP 108, a USB block 146, and a serial block 158, and controls USB communication with a computer device 430 connected via a USB connector 148. A wireless NIC 160 is connected to the serial block 158 to control wireless communication with the computer device 430 connected via the network.

図23に示すコンピュータ装置430は、デスクトップ型のパーソナル・コンピュータ、ワークステーションなどの汎用コンピュータなどとして構成することができる。コンピュータ装置430は、プロセッサ、メモリ、ROM、ストレージなどのハードウェア・コンポーネントを備える。図23に示す実施形態において、コンピュータ装置430は、USBインタフェース432と、無線NIC434とを含み、USBバスまたはネットワークを介して、全天球撮像装置410と接続されている。   A computer apparatus 430 shown in FIG. 23 can be configured as a general-purpose computer such as a desktop personal computer or a workstation. The computer device 430 includes hardware components such as a processor, a memory, a ROM, and a storage. In the embodiment shown in FIG. 23, the computer device 430 includes a USB interface 432 and a wireless NIC 434, and is connected to the omnidirectional imaging device 410 via a USB bus or a network.

コンピュータ装置430は、さらに、画像合成にかかる処理ブロックとして、位置検出用歪み補正部202と、つなぎ位置検出部204と、テーブル修正部206と、テーブル生成部208と、画像合成用歪み補正部210と、画像合成部212とを含み構成される。本実施形態では、鏡胴ユニット102の複数の撮像光学系により撮像された2つの部分画像と、全天球撮像装置410の位置検出用変換テーブルとが、USBバスまたはネットワークを介して外部のコンピュータ装置430に転送される。   The computer apparatus 430 further includes a position detection distortion correction unit 202, a connection position detection unit 204, a table correction unit 206, a table generation unit 208, and an image synthesis distortion correction unit 210 as processing blocks for image synthesis. And an image composition unit 212. In this embodiment, two partial images captured by a plurality of imaging optical systems of the lens barrel unit 102 and the position detection conversion table of the omnidirectional imaging device 410 are externally connected via a USB bus or a network. Transferred to device 430.

コンピュータ装置430において、位置検出用歪み補正部202は、全天球撮像装置410から転送された部分画像0,1に対し、併せて転送された位置検出用変換テーブルを用いて歪み補正を施し、位置検出用補正画像0,1を生成する。つなぎ位置検出部204は、変換された補正画像0,1間のつなぎ位置を検出し、検出結果データを生成する。テーブル修正部206は、検出結果データに基づいて、転送された位置検出用変換テーブルに対して修正を施す。テーブル生成部208は、修正された変換データから、回転座標変換を施し、画像合成用変換テーブルを生成する。   In the computer apparatus 430, the position detection distortion correction unit 202 performs distortion correction on the partial images 0 and 1 transferred from the omnidirectional imaging apparatus 410 using the position detection conversion table transferred together, The position detection correction images 0 and 1 are generated. The joint position detection unit 204 detects the joint position between the converted corrected images 0 and 1 and generates detection result data. The table correction unit 206 corrects the transferred position detection conversion table based on the detection result data. The table generation unit 208 performs rotational coordinate conversion from the corrected conversion data, and generates an image composition conversion table.

画像合成用歪み補正部210は、画像合成処理の前段の処理として、元の部分画像0および部分画像1に対し、画像合成用変換テーブルを用いて歪み補正をかけ、画像合成用補正画像0,1を生成する。画像合成部212は、得られた画像合成用補正画像0,1を合成し、全天球画像フォーマットの合成画像を生成する。   The image composition distortion correction unit 210 performs distortion correction on the original partial image 0 and the partial image 1 using the image composition conversion table as the preceding process of the image composition processing, and corrects the image composition corrected images 0 and 0. 1 is generated. The image composition unit 212 synthesizes the obtained image composition correction images 0 and 1 to generate a composite image in the omnidirectional image format.

図23に示す機能ブロックは、さらに、表示画像生成部214を含むことができる。表示画像生成部214は、全天球画像を平面表示デバイスに投影するための画像処理を実行する。本実施形態によるコンピュータ装置430は、ROMやHDDなどからプログラムを読み出し、RAMが提供する作業空間に展開することにより、CPUの制御の下、上述した各機能部および以下後述する各処理を実現する。   The functional block shown in FIG. 23 can further include a display image generation unit 214. The display image generation unit 214 executes image processing for projecting the omnidirectional image onto the flat display device. The computer apparatus 430 according to the present embodiment reads out a program from a ROM, an HDD, or the like, and develops it in a work space provided by the RAM, thereby realizing each of the above-described functional units and processes described below under the control of the CPU. .

図24は、他の実施形態における全天球撮像システム400における全天球画像合成処理の全体的な流れを示すフローチャート図である。図24には、全天球撮像装置410で撮像画像が入力された後、当該画像がコンピュータ装置430で保存されるまでの流れが説明されている。   FIG. 24 is a flowchart showing an overall flow of the omnidirectional image synthesis process in the omnidirectional imaging system 400 according to another embodiment. FIG. 24 illustrates a flow from when a captured image is input by the omnidirectional imaging device 410 to when the image is stored by the computer device 430.

図24に示す処理は、例えば、全天球撮像装置410でシャッター・ボタンの押下により2つの撮像光学系で撮影が指示されたことに応答して、ステップS700から開始される。まず、全天球撮像装置410内での処理が実行される。   The processing shown in FIG. 24 is started from step S700 in response to, for example, instructing photographing with the two imaging optical systems by pressing the shutter button in the omnidirectional imaging device 410. First, processing in the omnidirectional imaging device 410 is executed.

ステップS701では、全天球撮像装置410は、2つの固体撮像素子22A,22Bによって部分画像0および部分画像1を撮影する。ステップS702では、全天球撮像装置410は、USBバスあるいはネットワークを介して、部分画像0および部分画像0をコンピュータ装置430へ転送する。併せて、上記位置検出用変換テーブルが、USBバスあるいはネットワークを介してコンピュータ装置430に転送される。このとき、傾き補正もコンピュータ装置430側で行われる場合は、3軸加速度センサ120で取得された傾き情報がコンピュータ装置430へ転送される。   In step S701, the omnidirectional imaging device 410 captures the partial image 0 and the partial image 1 with the two solid-state imaging devices 22A and 22B. In step S702, the omnidirectional imaging device 410 transfers the partial image 0 and the partial image 0 to the computer device 430 via the USB bus or the network. In addition, the position detection conversion table is transferred to the computer device 430 via the USB bus or the network. At this time, when tilt correction is also performed on the computer device 430 side, the tilt information acquired by the triaxial acceleration sensor 120 is transferred to the computer device 430.

なお、上述した全天球撮像装置410の位置検出用変換テーブルは、全天球撮像装置410とコンピュータ装置430との間で互いに認識し合った際に転送しておいておけばよい。つまり、位置検出用変換テーブルは、一度、コンピュータ装置430に転送されていれば充分であり、毎回、変換テーブルを転送することを要さない。位置検出用変換テーブルは、例えば、図示しないSDRAMなどに記憶されており、ここから読み出され、転送される。ここまでが、全天球撮像装置410内における処理であり、次のステップS703からは、転送先のコンピュータ装置430内において実行される処理である。   Note that the above-described position detection conversion table of the omnidirectional imaging device 410 may be transferred when the omnidirectional imaging device 410 and the computer device 430 recognize each other. That is, it is sufficient that the position detection conversion table is once transferred to the computer apparatus 430, and it is not necessary to transfer the conversion table every time. The position detection conversion table is stored, for example, in an SDRAM (not shown) or the like, and is read and transferred from here. The processing up to this point is processing in the omnidirectional imaging device 410, and processing from the next step S703 is processing executed in the transfer destination computer device 430.

ステップS703では、コンピュータ装置430は、位置検出用歪み補正部202により、転送された部分画像0および部分画像1に対し、転送された位置検出用変換テーブルを用いて歪み補正を行い、位置検出用補正画像0,1を得る。このとき、傾き補正が転送先コンピュータ装置430側で行われる場合は、転送された傾き情報に基づき、位置検出用変換テーブルに対し鉛直方向に応じた補正が事前に行われてもよい。ステップS704では、コンピュータ装置430は、つなぎ位置検出部204により、位置検出用補正画像0,1の重複領域において、画像間のつなぎ位置検出を行い、検出結果データを得る。ステップS705では、コンピュータ装置430は、テーブル修正部206により、検出結果データを用いて、転送された位置検出用変換テーブルを、画像が球面座標上で位置合わせされるように修正する。ステップS706では、コンピュータ装置430は、テーブル生成部208により、修正された位置検出用変換テーブルから、回転座標変換することによって、画像合成用変換テーブルを生成する。   In step S703, the computer apparatus 430 uses the position detection distortion correction unit 202 to perform distortion correction on the transferred partial image 0 and partial image 1 using the transferred position detection conversion table, and performs position detection. Corrected images 0 and 1 are obtained. At this time, when the tilt correction is performed on the transfer destination computer device 430 side, the position detection conversion table may be corrected in advance in accordance with the vertical direction based on the transferred tilt information. In step S <b> 704, the computer apparatus 430 performs joint position detection between images in the overlapping region of the position detection corrected images 0 and 1 by the joint position detection unit 204, and obtains detection result data. In step S <b> 705, the computer apparatus 430 uses the table correction unit 206 to correct the transferred position detection conversion table using the detection result data so that the image is aligned on the spherical coordinates. In step S <b> 706, the computer apparatus 430 generates an image composition conversion table by performing rotational coordinate conversion from the corrected position detection conversion table using the table generation unit 208.

ステップS707では、コンピュータ装置430は、画像合成用歪み補正部210により、画像合成用変換テーブルを用いて、元の部分画像0,1に対し歪み補正を行い、画像合成用補正画像0,1を得る。ステップS708では、コンピュータ装置430は、画像合成部212により、画像合成用補正画像0,1を合成する。上記合成処理により、魚眼レンズにより撮像された2枚の部分画像から、1枚の全天球画像が生成される。そして、ステップS709では、コンピュータ装置430は、ステップS708で生成された全天球画像を外部ストレージに保存し、ステップS710で終了する。   In step S <b> 707, the computer apparatus 430 performs distortion correction on the original partial images 0 and 1 using the image synthesis conversion table 210 by the image synthesis distortion correction unit 210, and obtains the image synthesis corrected images 0 and 1. obtain. In step S <b> 708, the computer apparatus 430 synthesizes the corrected images for image synthesis 0 and 1 by the image synthesis unit 212. Through the above synthesis process, one omnidirectional image is generated from the two partial images captured by the fisheye lens. In step S709, the computer apparatus 430 stores the omnidirectional image generated in step S708 in the external storage, and the process ends in step S710.

なお、図24に示した他の実施形態におけるフローチャートにかかる動作も、コンピュータ上のプログラムに実行させることができる。すなわち、全天球撮像装置410の動作を制御するCPU、コンピュータ装置430の動作を制御するCPUが、それぞれ、ROM、RAMなどの記憶媒体に格納されたプログラムを読み出し、メモリ上に展開することにより、上述した全天球画像合成処理の各担当部分の処理を実現する。なお、図23および図24は、分離して構成された全天球画像撮像システムを例示するものであり、図23および図24に示した具体的な実施形態に限定されるものではない。全天球画像撮像システムを実現するための各機能部は、1以上の撮像装置、1以上のコンピュータ・システム上に種々の態様で分散実装することができる。   In addition, the operation | movement concerning the flowchart in other embodiment shown in FIG. 24 can also be made to perform the program on a computer. That is, the CPU that controls the operation of the omnidirectional imaging device 410 and the CPU that controls the operation of the computer device 430 read out the programs stored in the storage medium such as ROM and RAM, respectively, and expand them on the memory. The processing of each responsible portion of the above-described omnidirectional image synthesis processing is realized. FIG. 23 and FIG. 24 exemplify the omnidirectional imaging system configured separately, and are not limited to the specific embodiments shown in FIG. 23 and FIG. Each functional unit for realizing the omnidirectional image capturing system can be distributedly mounted in various modes on one or more imaging devices and one or more computer systems.

以上説明した実施形態によれば、複数の入力画像間でつなぎ位置を検出する場合に、入力画像の部分領域に対して、それぞれ、部分領域の特徴量に応じた適切なつなぎ位置を検出することが可能な画像処理装置、画像処理方法、プログラムおよび撮像システムを提供することができる。   According to the embodiment described above, when a connection position is detected between a plurality of input images, an appropriate connection position corresponding to the feature amount of the partial area is detected for each partial area of the input image. It is possible to provide an image processing apparatus, an image processing method, a program, and an imaging system capable of performing the above.

なお、上述した実施形態では、複数の部分画像は、それぞれ、異なるレンズ光学系を用いて略同時に撮像されたものとしたが、他の実施形態では、同じレンズ光学系を用い、時を異にして、所定の撮影点から、異なる撮影方向(方位)を向いて撮影撮像された複数の部分画像の重ね合わせに適用してもよい。さらに、上述した実施形態では、180度より大きな画角を有するレンズ光学系で撮像された2つの部分画像を重ね合わせて合成するものとしたが、他の実施形態では、1または複数のレンズ光学系により撮像された3以上の部分画像の重ね合わせ合成に適用してもよい。また、上述した実施形態では、魚眼レンズを用いた撮像システムを一例に説明してきたが、超広角レンズを用いた全天球撮像システムに適用してもよい。さらに、上述した好適な実施形態では、全天球画像の重ね合わせについて説明したが、特に限定されるものではなく、複数の画像のつなぎ位置を検出するいかなる画像処理に適用可能であることは言うまでもない。   In the above-described embodiment, each of the plurality of partial images is captured substantially simultaneously using different lens optical systems. However, in the other embodiments, the same lens optical system is used and the times are different. Thus, the present invention may be applied to superposition of a plurality of partial images that are photographed and photographed from different photographing directions (orientations) from a predetermined photographing point. Furthermore, in the above-described embodiment, two partial images captured by a lens optical system having an angle of view greater than 180 degrees are superimposed and synthesized, but in other embodiments, one or more lens optics are combined. You may apply to the superimposition synthesis | combination of the 3 or more partial image imaged by the system. In the above-described embodiment, the imaging system using the fisheye lens has been described as an example. However, the imaging system may be applied to an omnidirectional imaging system using an ultra-wide angle lens. Further, in the above-described preferred embodiment, the superposition of the omnidirectional images has been described. Yes.

また、上記機能部は、アセンブラ、C、C++、C#、Java(登録商標)などのレガシープログラミング言語やオブジェクト指向プログラミング言語などで記述されたコンピュータ実行可能なプログラムにより実現でき、ROM、EEPROM、EPROM、フラッシュメモリ、フレキシブルディスク、CD−ROM、CD−RW、DVD−ROM、DVD−RAM、DVD−RW、ブルーレイディスク、SDカード、MOなど装置可読な記録媒体に格納して、あるいは電気通信回線を通じて頒布することができる。また、上記機能部の一部または全部は、例えばフィールド・プログラマブル・ゲート・アレイ(FPGA)などのプログラマブル・デバイス(PD)上に実装することができ、あるいはASIC(特定用途向集積)として実装することができ、上記機能部をPD上に実現するためにPDにダウンロードする回路構成データ(ビットストリームデータ)、回路構成データを生成するためのHDL(Hardware Description Language)、VHDL(Very High Speed Integrated Circuits Hardware Description Language)、Verilog−HDLなどにより記述されたデータとして記録媒体により配布することができる。   The functional unit can be realized by a computer-executable program written in a legacy programming language such as an assembler, C, C ++, C #, Java (registered trademark), an object-oriented programming language, or the like. ROM, EEPROM, EPROM , Stored in a device-readable recording medium such as a flash memory, a flexible disk, a CD-ROM, a CD-RW, a DVD-ROM, a DVD-RAM, a DVD-RW, a Blu-ray disc, an SD card, an MO, or through an electric communication line Can be distributed. In addition, a part or all of the functional unit can be mounted on a programmable device (PD) such as a field programmable gate array (FPGA) or mounted as an ASIC (application-specific integration). Circuit configuration data (bit stream data) downloaded to the PD in order to realize the above functional unit on the PD, HDL (Hardware Description Language) for generating the circuit configuration data, VHDL (Very High Speed Integrated Circuits) Hardware Description Language), Verilog-HDL, and the like can be distributed on a recording medium as data.

これまで本発明の実施形態について説明してきたが、本発明の実施形態は上述した実施形態に限定されるものではなく、他の実施形態、追加、変更、削除など、当業者が想到することができる範囲内で変更することができ、いずれの態様においても本発明の作用・効果を奏する限り、本発明の範囲に含まれるものである。   Although the embodiments of the present invention have been described so far, the embodiments of the present invention are not limited to the above-described embodiments, and those skilled in the art may conceive other embodiments, additions, modifications, deletions, and the like. It can be changed within the range that can be done, and any embodiment is included in the scope of the present invention as long as the effects of the present invention are exhibited.

(付記)
(付記1)
複数の入力画像間のつなぎ位置を検出するための画像処理装置であって、
第1の入力画像から、それぞれ第2の入力画像内で探索する対象となる複数の対象画像を生成する対象画像生成手段と、
前記対象画像生成手段により生成された複数の対象画像各々に対し、特徴量を算出する特徴量算出手段と、
前記特徴量算出手段により特徴量が算出された複数の対象画像の注目する注目対象画像に対し、前記特徴量算出手段により算出された特徴量に応じた評価方式を用いて、前記注目対象画像と、前記第2の入力画像の部分とのマッチングを計算するマッチング計算手段と
を含む、画像処理装置。
(付記2)
前記マッチング計算手段により算出された各位置での評価値を、前記マッチング計算手段が用いた評価方式に応じた補正方式を用いて、補正する評価値補正手段をさらに含む、付記1に記載の画像処理装置。
(付記3)
前記注目対象画像に対し、前記注目対象画像と1以上の周辺対象画像各々との間の特徴量の相対的な関係に基づいて、仮位置を算出する仮位置算出手段をさらに含み、前記評価値補正手段は、前記マッチング計算手段により算出された類似度に基づく評価値を、仮位置を中心に優先されるように補正することを特徴とする、付記2に記載の画像処理装置。
(付記4)
前記特徴量は、対象画像のエッジ量、分散および標準偏差の少なくとも1つである、付記1〜3のいずれか1項に記載の画像処理装置。
(付記5)
前記特徴量に応じた評価方式としては、特徴量が基準より大きい場合には、相関値を与える評価方式が用いられ、特徴量が基準より小さい場合には、誤差値を与える評価方式が用いられる、付記1〜4のいずれか1項に記載の画像処理装置。
(付記6)
前記注目対象画像に対し、前記マッチングの評価値に基づき、該注目対象画像よりも特徴量が大きな周辺対象画像のつなぎ位置に応じた前記第2の入力画像へのつなぎ位置を決定するつなぎ位置決定手段
を含む、付記1〜5のいずれか1項に記載の画像処理装置。
(付記7)
複数の撮像画像を、投影モデルに基づき撮像画像間の撮影範囲が重複する重複領域を球面の赤道近傍に射影するような変換データを用いて、前記撮像画像とは異なる座標系に変換し、前記複数の入力画像を生成する変換手段と、
前記つなぎ位置決定手段によるつなぎ位置検出結果に基づいて、前記変換データを修正する修正手段と、
前記修正手段により修正された変換データを回転座標変換し、画像合成の際の前記複数の撮像画像に対する変換を規定する画像合成用変換データを生成するデータ生成手段と
を含む、付記6に記載の画像処理装置。
(付記8)
複数の入力画像間のつなぎ位置を検出するための画像処理方法であって、コンピュータが、
第1の入力画像から、それぞれ第2の入力画像内で探索する対象となる複数の対象画像を生成するステップと、
複数の対象画像各々に対し、特徴量を算出するステップと、
前記複数の対象画像の注目する注目対象画像に対し、算出された特徴量に応じた評価方式を用いて、前記注目対象画像と、前記第2の入力画像の部分とのマッチングを計算するステップと
を実行する、画像処理方法。
(付記9)
複数の入力画像間のつなぎ位置を検出するための画像処理装置を実現するためのプログラムであって、コンピュータを、
第1の入力画像から、それぞれ第2の入力画像内で探索する対象となる複数の対象画像を生成する対象画像生成手段、
前記対象画像生成手段により生成された複数の対象画像各々に対し、特徴量を算出する特徴量算出手段、および
前記特徴量算出手段により特徴量が算出された複数の対象画像の注目する注目対象画像に対し、前記特徴量算出手段により算出された特徴量に応じた評価方式を用いて、前記注目対象画像と、前記第2の入力画像の部分とのマッチングを計算するマッチング計算手段
として機能させるためのプログラム。
(付記10)
複数の撮像画像間のつなぎ位置を検出するための撮像システムであって、
撮像手段と、
前記撮像手段により、それぞれ複数の方位について撮像された複数の撮像画像から複数の入力画像を取得する手段と、
第1の入力画像から、それぞれ第2の入力画像内で探索する対象となる複数の対象画像を生成する対象画像生成手段と、
前記対象画像生成手段により生成された複数の対象画像各々に対し、特徴量を算出する特徴量算出手段と、
前記特徴量算出手段により特徴量が算出された複数の対象画像の注目する注目対象画像に対し、前記特徴量算出手段により算出された特徴量に応じた評価方式を用いて、前記注目対象画像と、前記第2の入力画像の部分とのマッチングを計算するマッチング計算手段と
を含む、撮像システム。
(Appendix)
(Appendix 1)
An image processing apparatus for detecting a connection position between a plurality of input images,
Target image generation means for generating a plurality of target images to be searched for in the second input image, respectively, from the first input image;
Feature quantity calculating means for calculating a feature quantity for each of a plurality of target images generated by the target image generating means;
Using the evaluation method according to the feature amount calculated by the feature amount calculation unit for the target image of interest of the plurality of target images whose feature amounts have been calculated by the feature amount calculation unit, An image processing apparatus comprising: matching calculation means for calculating matching with the portion of the second input image.
(Appendix 2)
The image according to claim 1, further comprising: an evaluation value correction unit that corrects the evaluation value at each position calculated by the matching calculation unit using a correction method according to the evaluation method used by the matching calculation unit. Processing equipment.
(Appendix 3)
The evaluation value further includes temporary position calculation means for calculating a temporary position based on a relative relationship of feature amounts between the target image and each of the one or more peripheral target images with respect to the target image. The image processing apparatus according to appendix 2, wherein the correction unit corrects the evaluation value based on the similarity calculated by the matching calculation unit so that priority is given to the temporary position.
(Appendix 4)
The image processing apparatus according to any one of appendices 1 to 3, wherein the feature amount is at least one of an edge amount, a variance, and a standard deviation of the target image.
(Appendix 5)
As the evaluation method according to the feature amount, an evaluation method that gives a correlation value is used when the feature amount is larger than the reference, and an evaluation method that gives an error value when the feature amount is smaller than the reference. The image processing apparatus according to any one of appendices 1 to 4.
(Appendix 6)
A connection position determination for determining a connection position to the second input image according to a connection position of a peripheral target image having a larger feature amount than the target image based on the matching evaluation value for the target image. The image processing apparatus according to any one of appendices 1 to 5, including: means.
(Appendix 7)
Converting a plurality of captured images into a coordinate system different from the captured image using conversion data such as projecting an overlapping region where the imaging ranges between the captured images overlap based on the projection model to the vicinity of the spherical equator, Conversion means for generating a plurality of input images;
Correction means for correcting the conversion data based on a connection position detection result by the connection position determination means;
The data generation means for generating the image composition conversion data for defining the conversion for the plurality of captured images at the time of image composition by performing rotational coordinate conversion on the conversion data modified by the modification means, Image processing device.
(Appendix 8)
An image processing method for detecting a connection position between a plurality of input images, the computer comprising:
Generating, from the first input image, a plurality of target images to be searched for in the second input image, respectively;
Calculating a feature amount for each of a plurality of target images;
Calculating a matching between the target image of interest and a portion of the second input image using an evaluation method corresponding to the calculated feature amount for the target image of interest of the plurality of target images; An image processing method is executed.
(Appendix 9)
A program for realizing an image processing apparatus for detecting a connection position between a plurality of input images, the computer comprising:
Target image generation means for generating a plurality of target images to be searched for in the second input image from the first input image,
For each of the plurality of target images generated by the target image generation unit, a feature amount calculation unit that calculates a feature amount, and a target image of interest of the plurality of target images for which the feature amount has been calculated by the feature amount calculation unit On the other hand, in order to function as a matching calculation unit that calculates matching between the target image and the portion of the second input image using an evaluation method according to the feature amount calculated by the feature amount calculation unit. Program.
(Appendix 10)
An imaging system for detecting a connection position between a plurality of captured images,
Imaging means;
Means for acquiring a plurality of input images from a plurality of captured images respectively captured in a plurality of directions by the imaging means;
Target image generation means for generating a plurality of target images to be searched for in the second input image, respectively, from the first input image;
Feature quantity calculating means for calculating a feature quantity for each of a plurality of target images generated by the target image generating means;
Using the evaluation method according to the feature amount calculated by the feature amount calculation unit for the target image of interest of the plurality of target images whose feature amounts have been calculated by the feature amount calculation unit, An imaging system comprising: matching calculation means for calculating matching with the portion of the second input image.

10,300…全天球撮像システム、12…撮像体、14…筐体、18…シャッター・ボタン、20…結像光学系、22…固体撮像素子、100…プロセッサ、102…鏡胴ユニット,108…ISP、110,122…DMAC、112…アービタ(ARBMEMC)、114…MEMC、116,138…SDRAM、118…歪曲補正・画像合成ブロック、120…3軸加速度センサ、124…画像処理ブロック、126…画像データ転送部、128…SDRAMC、130…CPU、132…リサイズブロック、134…JPEGブロック、136…H.264ブロック、140…メモリカード制御ブロック、142…メモリカードスロット、144…フラッシュROM、146…USBブロック、148…USBコネクタ、150…ペリフェラル・ブロック、152…音声ユニット、154…スピーカ、156…マイク、158…シリアルブロック、160…無線NIC、162…LCDドライバ、164…LCDモニタ、166…電源スイッチ、168…ブリッジ、200…機能ブロック、202…位置検出用歪み補正部、204…つなぎ位置検出部、206…テーブル修正部、208…テーブル生成部、210…画像合成用歪み補正部、212…画像合成部、214…表示画像生成部、220…位置検出用変換テーブル、220…検出結果データ、224…画像合成用変換テーブル、232…テンプレート生成部、234…テンプレート特徴量算出部、236…テンプレート順位付け部、238…仮位置算出部、240…探索範囲設定部、242…マッチング計算部、244…スコア補正部、246…つなぎ位置決定部、248…検出結果生成部、250…エッジ抽出フィルタ部、252…ゲイン乗算部、254…LPF部、256…加算部、300…テンプレート用画像、302…テンプレート画像、310…探索用画像、312…探索範囲、314…対応部分、330…探索領域、332…初期位置、334…仮位置、336…隣接のつなぎ位置、360…探索範囲、410…全天球撮像装置、430…コンピュータ装置、432…USBI/F、434…無線NIC DESCRIPTION OF SYMBOLS 10,300 ... Omnispherical imaging system, 12 ... Imaging body, 14 ... Housing, 18 ... Shutter button, 20 ... Imaging optical system, 22 ... Solid-state image sensor, 100 ... Processor, 102 ... Lens barrel unit, 108 ... ISP, 110, 122 ... DMAC, 112 ... Arbiter (ARBMEMC), 114 ... MEMC, 116, 138 ... SDRAM, 118 ... Distortion correction / image synthesis block, 120 ... Triaxial acceleration sensor, 124 ... Image processing block, 126 ... Image data transfer unit, 128... SDRAMC, 130... CPU, 132... Resize block, 134. 264 block, 140 ... memory card control block, 142 ... memory card slot, 144 ... flash ROM, 146 ... USB block, 148 ... USB connector, 150 ... peripheral block, 152 ... audio unit, 154 ... speaker, 156 ... microphone, 158 ... Serial block, 160 ... Wireless NIC, 162 ... LCD driver, 164 ... LCD monitor, 166 ... Power switch, 168 ... Bridge, 200 ... Functional block, 202 ... Position detection distortion correction unit, 204 ... Link position detection unit, 206 ... Table correction unit, 208 ... Table generation unit, 210 ... Image synthesis distortion correction unit, 212 ... Image synthesis unit, 214 ... Display image generation unit, 220 ... Conversion table for position detection, 220 ... Detection result data, 224 ... Image composition conversion table, 23 ... Template generation unit, 234 ... Template feature amount calculation unit, 236 ... Template ranking unit, 238 ... Temporary position calculation unit, 240 ... Search range setting unit, 242 ... Matching calculation unit, 244 ... Score correction unit, 246 ... Connection position Determination unit, 248 ... detection result generation unit, 250 ... edge extraction filter unit, 252 ... gain multiplication unit, 254 ... LPF unit, 256 ... addition unit, 300 ... template image, 302 ... template image, 310 ... search image, 312 ... Search range, 314 ... Corresponding part, 330 ... Search area, 332 ... Initial position, 334 ... Temporary position, 336 ... Adjacent connection position, 360 ... Search range, 410 ... Omni-sphere imaging device, 430 ... Computer device, 432 ... USB I / F, 434 ... Wireless NIC

特開2001−148779号公報JP 2001-148777 A

Claims (7)

複数の入力画像を合成する画像処理装置であって、
第1の入力画像における所定の対象画像の特徴量を取得する特徴量取得手段と、
前記特徴量に応じた方式で、前記第1の入力画像と2の入力画像のつなぎ位置を検出するつなぎ位置検出手段と、
前記つなぎ位置で前記第1の入力画像と前記第2の入力画像を合成する合成手段と
を含む、画像処理装置。
An image processing apparatus for combining a plurality of input images,
Feature amount acquisition means for acquiring a feature amount of a predetermined target image in the first input image;
A connection position detecting means for detecting a connection position between the first input image and the second input image in a manner according to the feature amount;
An image processing apparatus comprising: a combining unit that combines the first input image and the second input image at the connection position.
前記特徴量に応じた方式でマッチングを行う、請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein matching is performed by a method according to the feature amount. 特徴量は、対象画像のエッジ量、分散、および標準偏差の少なくとも1つである、請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the feature amount is at least one of an edge amount, a variance, and a standard deviation of the target image. 前記特徴量に応じた方式は、特徴量が基準より大きい場合、相関値を与え、特徴量が基準より小さい場合、誤差値を与える方式である、請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the method according to the feature amount is a method in which a correlation value is given when the feature amount is larger than a reference, and an error value is given when the feature amount is smaller than the reference. 複数の入力画像を合成するための画像処理装置を実現するためのプログラムであって、コンピュータを、
第1の入力画像における所定の対象画像の特徴量を取得する特徴量取得手段、
前記特徴量に応じた方式で、前記第1の入力画像と2の入力画像のつなぎ位置を検出するつなぎ位置検出手段、および
前記つなぎ位置で前記第1の入力画像と前記第2の入力画像を合成する合成手段
として機能させるためのプログラム。
A program for realizing an image processing apparatus for synthesizing a plurality of input images, comprising:
Feature amount acquisition means for acquiring a feature amount of a predetermined target image in the first input image;
A connection position detecting means for detecting a connection position between the first input image and the second input image by a method according to the feature amount, and the first input image and the second input image at the connection position. A program for functioning as a synthesis means for synthesis.
複数の入力画像を合成する画像処理方法であって、コンピュータが、
第1の入力画像における所定の対象画像の特徴量を取得するステップと、
前記特徴量に応じた方式で、前記第1の入力画像と2の入力画像のつなぎ位置を検出するステップと、
前記つなぎ位置で前記第1の入力画像と前記第2の入力画像を合成するステップと
を実行する、画像処理方法。
An image processing method for combining a plurality of input images, wherein a computer
Obtaining a feature amount of a predetermined target image in the first input image;
Detecting a connection position between the first input image and the second input image in a method according to the feature amount;
An image processing method that executes the step of synthesizing the first input image and the second input image at the connection position.
複数の入力画像を合成するための撮像システムであって、
撮像手段と、
前記撮像手段により、それぞれ複数の方位について撮像された複数の撮像画像から複数の入力画像を取得する手段と、
第1の入力画像における所定の対象画像の特徴量を取得する特徴量取得手段と、
前記特徴量に応じた方式で、前記第1の入力画像と2の入力画像のつなぎ位置を検出するつなぎ位置検出手段と、
前記つなぎ位置で前記第1の入力画像と前記第2の入力画像を合成する合成手段と
を含む、撮像システム。
An imaging system for combining a plurality of input images,
Imaging means;
Means for acquiring a plurality of input images from a plurality of captured images respectively captured in a plurality of directions by the imaging means;
Feature amount acquisition means for acquiring a feature amount of a predetermined target image in the first input image;
A connection position detecting means for detecting a connection position between the first input image and the second input image in a manner according to the feature amount;
An imaging system comprising: a combining unit that combines the first input image and the second input image at the connection position.
JP2015162099A 2015-08-19 2015-08-19 Image processing apparatus, program, image processing method, and imaging system Active JP6079838B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015162099A JP6079838B2 (en) 2015-08-19 2015-08-19 Image processing apparatus, program, image processing method, and imaging system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015162099A JP6079838B2 (en) 2015-08-19 2015-08-19 Image processing apparatus, program, image processing method, and imaging system

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2013177197A Division JP5796611B2 (en) 2013-08-28 2013-08-28 Image processing apparatus, image processing method, program, and imaging system

Publications (2)

Publication Number Publication Date
JP2016006674A true JP2016006674A (en) 2016-01-14
JP6079838B2 JP6079838B2 (en) 2017-02-15

Family

ID=55225033

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015162099A Active JP6079838B2 (en) 2015-08-19 2015-08-19 Image processing apparatus, program, image processing method, and imaging system

Country Status (1)

Country Link
JP (1) JP6079838B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020529386A (en) * 2017-08-04 2020-10-08 トヨタ・モーター・ヨーロッパToyota Motor Europe Manufacturing method of electrodes for all-solid-state batteries
US11928775B2 (en) 2020-11-26 2024-03-12 Ricoh Company, Ltd. Apparatus, system, method, and non-transitory medium which map two images onto a three-dimensional object to generate a virtual image

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1197512A (en) * 1997-07-25 1999-04-09 Nikon Corp Positioning apparatus and method and storage medium capable of computer-reading of positioning programs
JP2000155831A (en) * 1998-09-18 2000-06-06 Sanyo Electric Co Ltd Method and device for image composition and recording medium storing image composition program
JP2009290548A (en) * 2008-05-29 2009-12-10 Olympus Corp Image processing apparatus, image processing program, image processing method and electronic device
JP2012160904A (en) * 2011-01-31 2012-08-23 Sony Corp Information processor, information processing method, program, and imaging apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1197512A (en) * 1997-07-25 1999-04-09 Nikon Corp Positioning apparatus and method and storage medium capable of computer-reading of positioning programs
JP2000155831A (en) * 1998-09-18 2000-06-06 Sanyo Electric Co Ltd Method and device for image composition and recording medium storing image composition program
JP2009290548A (en) * 2008-05-29 2009-12-10 Olympus Corp Image processing apparatus, image processing program, image processing method and electronic device
JP2012160904A (en) * 2011-01-31 2012-08-23 Sony Corp Information processor, information processing method, program, and imaging apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020529386A (en) * 2017-08-04 2020-10-08 トヨタ・モーター・ヨーロッパToyota Motor Europe Manufacturing method of electrodes for all-solid-state batteries
US11928775B2 (en) 2020-11-26 2024-03-12 Ricoh Company, Ltd. Apparatus, system, method, and non-transitory medium which map two images onto a three-dimensional object to generate a virtual image

Also Published As

Publication number Publication date
JP6079838B2 (en) 2017-02-15

Similar Documents

Publication Publication Date Title
KR101657039B1 (en) Image processing apparatus, image processing method, and imaging system
JP6721065B2 (en) Imaging device, image processing device and method
JP5846172B2 (en) Image processing apparatus, image processing method, program, and imaging system
JP2017208619A (en) Image processing apparatus, image processing method, program and imaging system
JP6222205B2 (en) Image processing device
JP5796611B2 (en) Image processing apparatus, image processing method, program, and imaging system
JP6665917B2 (en) Image processing device
JP6079838B2 (en) Image processing apparatus, program, image processing method, and imaging system
US11825213B2 (en) Removal of image capture device from omnidirectional image created by stitching partial images
JP6291748B2 (en) Imaging apparatus, imaging method, and program
JP6439845B2 (en) Image processing device
JP2021005831A (en) Imaging system, image processing apparatus, imaging apparatus, and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160613

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160621

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160805

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: 20161220

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170102

R151 Written notification of patent or utility model registration

Ref document number: 6079838

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151