JP2012150826A - Image composition device and program - Google Patents

Image composition device and program Download PDF

Info

Publication number
JP2012150826A
JP2012150826A JP2012052903A JP2012052903A JP2012150826A JP 2012150826 A JP2012150826 A JP 2012150826A JP 2012052903 A JP2012052903 A JP 2012052903A JP 2012052903 A JP2012052903 A JP 2012052903A JP 2012150826 A JP2012150826 A JP 2012150826A
Authority
JP
Japan
Prior art keywords
image
processing
brightness
composition
function
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
JP2012052903A
Other languages
Japanese (ja)
Other versions
JP5413625B2 (en
Inventor
Masaaki Sasaki
雅昭 佐々木
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2012052903A priority Critical patent/JP5413625B2/en
Publication of JP2012150826A publication Critical patent/JP2012150826A/en
Application granted granted Critical
Publication of JP5413625B2 publication Critical patent/JP5413625B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To prevent waste of processing time, and to suppress the deterioration of composition precision or image quality.SOLUTION: An imaging apparatus 100 is provided with a CPU 71 for performing image composition processing for combining any one reference image among a plurality of images with an object image, processing of specifying shooting condition relevant information related to shooting conditions of the image, and processing of setting contents of the image composition processing on the basis of specified shooting conditions.

Description

本発明は、複数の画像を合成する画像合成装置及びプログラムに関する。   The present invention relates to an image composition apparatus and a program for synthesizing a plurality of images.

近年、連続して撮影された複数の画像に対して特徴点の抽出及び追跡を行い、その移動量から射影変換行列Hを求め、この射影変換行列Hを用いて位置合せを行って重ね合わせることで1枚の合成画像を作り出す方法が開発されている(例えば、特許文献1参照)。   In recent years, feature points are extracted and tracked from a plurality of images photographed in succession, a projection transformation matrix H is obtained from the amount of movement, and alignment is performed using the projection transformation matrix H to perform superposition. A method for creating a single composite image has been developed (see, for example, Patent Document 1).

具体的には、先ず、連続して撮影された複数の画像のうち、合成基準画像から特徴点を抽出し、それらを他の画像で追跡する。ここで、特徴点の追跡は、連続画像を所定回数サブサンプリングして低解像度の階層を作った後(ピラミッド化)、低解像度の画像から順番に反復法を用いて行う。
そして、特徴点の追跡が終了すると、RANSACを行う。画像間の複数の特徴点の対応の中からランダムに4組選択して、射影変換に用いるH行列を計算する。計算されたH行列について、サポートする特徴点の個数をそのH行列の得点として、一定以上の得点を持つH行列が求まるまで上記の作業を繰り返す。
そして、RANSACにより最終的に求まったH行列を用いて射影変換を行い、2枚の画像を合成する。これらの工程を所定枚数分繰り返して全ての画像を加算合成する。
これにより、通常の1枚撮影画像に比べてランダムに生じるノイズが平均化されたS/Nの良い画像を作り出すことができる。
Specifically, first, feature points are extracted from a composite reference image among a plurality of images photographed continuously, and these are tracked with other images. Here, tracking of feature points is performed using an iterative method in order from low resolution images after sub-sampling a continuous image a predetermined number of times to create a low resolution hierarchy (pyramidization).
When the tracking of feature points is completed, RANSAC is performed. Four sets are randomly selected from the correspondence between a plurality of feature points between images, and an H matrix used for projective transformation is calculated. With respect to the calculated H matrix, the number of feature points to be supported is used as the score of the H matrix, and the above operation is repeated until an H matrix having a certain score or more is obtained.
Then, projective transformation is performed using the H matrix finally obtained by RANSAC to synthesize two images. These steps are repeated for a predetermined number of times to add and synthesize all the images.
As a result, it is possible to create an image with good S / N in which noise that is randomly generated is averaged compared to a normal single-shot image.

特開2005−94614号公報JP 2005-94614 A

しかしながら、上記の画像合成にあっては、例えば、撮影している環境の明るさ、手ぶれ量、撮影画像の特徴量、被写体等の撮影状況を考慮せずに、一意的に設定した条件で行っていた。このため、撮影状況に適した画像合成処理を行えず、処理時間を浪費したり、合成精度や画像品質が落ちてしまうといった問題があった。   However, the above-described image composition is performed under uniquely set conditions without taking into consideration the brightness of the environment in which the image is being taken, the amount of camera shake, the feature amount of the captured image, the shooting situation of the subject, and the like. It was. For this reason, there has been a problem that image composition processing suitable for the shooting situation cannot be performed, processing time is wasted, and composition accuracy and image quality are degraded.

そこで、本発明の課題は、処理時間の浪費の防止を図るとともに、合成精度や画像品質の低下を抑制することができる画像合成装置及びプログラムを提供することである。   SUMMARY OF THE INVENTION An object of the present invention is to provide an image composition device and a program that can prevent waste of processing time and can suppress deterioration in composition accuracy and image quality.

請求項1に記載の発明の画像合成装置は、
複数の画像のうち、何れか一の基準画像と対象画像を合成する画像合成処理を行う画像合成手段と、
前記画像の撮影の際の明るさを予め区分された何れかの明るさとして検出する検出手段と、
前記検出手段による検出結果に基づいて、前記画像合成手段による前記画像合成処理の内容を設定する合成処理設定手段と、
を備え、
前記画像合成手段は、
前記基準画像内から特徴点を抽出する特徴点抽出手段を含み、
前記合成処理設定手段は、前記検出手段による検出結果として暗いと区分された方のあかるさで検出した場合、前記特徴点抽出手段による前記特徴点の抽出数をより多い数とし、
前記画像合成手段は、
前記複数の画像の解像度を段階的に低減させて低解像度画像を作成する画像作成手段を含み、
前記合成処理設定手段は、前記検出手段による検出結果として暗いと区分された方のあかるさで検出した場合、前記画像作成手段による前記解像度の低減に係る段階数をより多い数とする
ことを特徴としている。
The image synthesizing device of the invention according to claim 1
Image combining means for performing image combining processing for combining any one of the plurality of images and the target image;
Detecting means for detecting the brightness at the time of shooting the image as any one of the previously divided brightness;
Based on the detection result by the detection means, composition processing setting means for setting the content of the image composition processing by the image composition means;
With
The image composition means includes
Including feature point extraction means for extracting feature points from the reference image;
When the combination processing setting means detects the brightness that is classified as dark as the detection result by the detection means, the number of feature points extracted by the feature point extraction means is a larger number,
The image composition means includes
Including image creating means for creating a low-resolution image by gradually reducing the resolution of the plurality of images,
The composition processing setting means sets the number of steps related to the reduction of the resolution by the image creating means to a larger number when the detection result by the detection means is detected by the brightness that is classified as dark. It is said.

請求項2に記載の発明のプログラムは、
コンピュータに、
複数の画像のうち、何れか一の基準画像と対象画像を合成する画像合成処理を行う合成機能と、
前記画像の撮影の際の明るさを予め区分された何れかの明るさとして検出する検出機能と、
前記検出機能による検出結果に基づいて、前記画像合成処理の内容を設定する設定機能と、
を実現させるためのプログラムであって、
前記合成機能は、
前記基準画像内から特徴点を抽出する抽出機能を含み、
前記設定機能は、前記検出機能による検出結果として暗いと区分された方の明るさで検出した場合、前記抽出機能による前記特徴点の抽出数をより多い数とし、
前記合成機能は、
前記複数の画像の解像度を段階的に低減させて低解像度画像を作成する作成機能を含み、
前記設定機能は、前記検出機能による検出結果として暗いと区分された方の明るさで検
出した場合、前記作成機能による前記解像度の低減に係る段階数をより多い数とする
ことを特徴としている。
The program of the invention described in claim 2 is:
On the computer,
A combining function for performing image combining processing for combining any one of the plurality of images and the target image;
A detection function for detecting the brightness at the time of shooting the image as any one of the pre-divided brightness levels;
A setting function for setting the content of the image composition processing based on the detection result by the detection function;
Is a program for realizing
The synthesis function is
An extraction function for extracting feature points from the reference image;
When the setting function detects a brightness classified as dark as a detection result by the detection function, the number of feature points extracted by the extraction function is set to a larger number,
The synthesis function is
A creation function for creating a low-resolution image by gradually reducing the resolution of the plurality of images;
The setting function is characterized in that when the detection result by the detection function is detected at a brightness that is classified as dark, the number of steps related to the resolution reduction by the creation function is increased. .

本発明によれば、撮影状況に応じて無駄な処理を行わない、即ち、撮影状況に応じて必要な処理を行うことにより処理時間の浪費を防止して処理速度の向上を図ることができるとともに、合成精度や画像品質の低下を抑制することができる。   According to the present invention, wasteful processing is not performed according to shooting conditions, that is, processing time can be prevented from being wasted and processing speed can be improved by performing necessary processing according to shooting conditions. Therefore, it is possible to suppress a decrease in synthesis accuracy and image quality.

本発明を適用した実施形態1の撮像装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the imaging device of Embodiment 1 to which this invention is applied. 図1の撮像装置に備わる映像信号処理部を模式的に示した図である。It is the figure which showed typically the video signal processing part with which the imaging device of FIG. 1 is equipped. 図1の撮像装置による画像処理に係る処理内容と明るさとの対応関係を模式的に示す図である。It is a figure which shows typically the correspondence of the processing content and brightness which concern on the image processing by the imaging device of FIG. 図1の撮像装置による画像合成処理に係る処理内容と明るさとの対応関係を模式的に示す図である。It is a figure which shows typically the correspondence of the process content and brightness which concern on the image composition process by the imaging device of FIG. 図1の撮像装置による撮像処理に係る動作の一例を示すフローチャートである。3 is a flowchart illustrating an example of an operation related to an imaging process by the imaging apparatus of FIG. 1. 本発明を適用した実施形態2の撮像装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the imaging device of Embodiment 2 to which this invention is applied. 図6の撮像装置による画像合成処理に係る処理内容とずれ量との対応関係を模式的に示す図である。It is a figure which shows typically the correspondence of the processing content and the deviation | shift amount which concern on the image composition process by the imaging device of FIG. 図6の撮像装置による画像処理に係る処理内容とずれ量との対応関係を模式的に示す図である。FIG. 7 is a diagram schematically illustrating a correspondence relationship between processing content and a shift amount related to image processing by the imaging apparatus of FIG. 6. 図6の撮像装置による撮像処理に係る動作の一例を示すフローチャートである。7 is a flowchart illustrating an example of an operation related to an imaging process by the imaging apparatus of FIG. 6. 本発明を適用した実施形態3の撮像装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the imaging device of Embodiment 3 to which this invention is applied. 図10の撮像装置による画像合成処理に係る処理内容と特徴量との対応関係を模式的に示す図である。It is a figure which shows typically the correspondence of the process content and feature-value which concern on the image composition process by the imaging device of FIG. 図10の撮像装置による画像処理に係る処理内容と特徴量との対応関係を模式的に示す図である。It is a figure which shows typically the correspondence of the processing content and feature-value which concern on the image processing by the imaging device of FIG. 図10の撮像装置による撮像処理に係る動作の一例を示すフローチャートである。11 is a flowchart illustrating an example of an operation related to an imaging process by the imaging apparatus in FIG. 10.

以下に、本発明について、図面を用いて具体的な態様を説明する。ただし、発明の範囲は、図示例に限定されない。   Hereinafter, specific embodiments of the present invention will be described with reference to the drawings. However, the scope of the invention is not limited to the illustrated examples.

[実施形態1]
図1は、本発明を適用した実施形態1の撮像装置100の概略構成を示すブロック図である。また、図2は、撮像装置100の映像信号処理部13を模式的に示した図である。
[Embodiment 1]
FIG. 1 is a block diagram illustrating a schematic configuration of an imaging apparatus 100 according to the first embodiment to which the present invention is applied. FIG. 2 is a diagram schematically illustrating the video signal processing unit 13 of the imaging apparatus 100.

実施形態1の撮像装置100は、画像撮影時の明るさに応じて、基準画像と対象画像を合成する画像合成処理の内容や合成される複数の被合成画像に対する画像処理の内容を設定する。
具体的には、撮像装置100は、図1に示すように、撮像部1と、撮像補助部2と、表示部3、操作部4と、記録媒体5と、USB端子6と、制御部7等を備えて構成されている。
The imaging apparatus 100 according to the first embodiment sets the content of the image composition processing for composing the reference image and the target image and the content of the image processing for a plurality of composite images to be composited according to the brightness at the time of image capturing.
Specifically, as illustrated in FIG. 1, the imaging apparatus 100 includes an imaging unit 1, an imaging auxiliary unit 2, a display unit 3, an operation unit 4, a recording medium 5, a USB terminal 6, and a control unit 7. Etc. are provided.

撮像部1は、撮像手段として、被写体を連続して撮像して複数の画像フレームを生成する。具体的には、撮像部1は、撮像レンズ群11と、電子撮像部12と、映像信号処理部13と、画像メモリ14と、撮影制御部15等を備えている。   The imaging unit 1, as an imaging unit, continuously captures a subject and generates a plurality of image frames. Specifically, the imaging unit 1 includes an imaging lens group 11, an electronic imaging unit 12, a video signal processing unit 13, an image memory 14, a shooting control unit 15, and the like.

撮像レンズ群11は、複数の撮像レンズから構成されている。
電子撮像部12は、撮像レンズ群11を通過した被写体像を二次元の画像信号に変換するCCD(Charge Coupled Device)やCMOS(Complementary Metal-oxide Semiconductor)等の撮像素子から構成されている。
The imaging lens group 11 includes a plurality of imaging lenses.
The electronic imaging unit 12 includes an imaging element such as a charge coupled device (CCD) or a complementary metal-oxide semiconductor (CMOS) that converts a subject image that has passed through the imaging lens group 11 into a two-dimensional image signal.

映像信号処理部13は、電子撮像部12から出力される画像信号に対して所定の画像合成処理や画像処理を施すものである。具体的には、映像信号処理部13は、図2に示すように、合成される複数の画像に係る画像信号のピラミッド階層化、所定画像からの特徴点の抽出、抽出された特徴点の追跡(トラック)等を行うオプティカルフロー検出部131と、特徴点どうしが対応付けられた特徴点対応表からランダムに所定数の特徴点を選択して、これらの特徴点を用いた射影変換(H計算)及び他の特徴点を用いたサポート計算等を行うRANSAC部132、画素どうしが対応する位置を計算して画像信号を加算(合成)する画像合成部133を備えている。   The video signal processing unit 13 performs predetermined image composition processing and image processing on the image signal output from the electronic imaging unit 12. Specifically, as shown in FIG. 2, the video signal processing unit 13 forms a pyramid hierarchy of image signals related to a plurality of images to be combined, extracts feature points from a predetermined image, and tracks the extracted feature points. A predetermined number of feature points are randomly selected from an optical flow detection unit 131 that performs (track) and the like and a feature point correspondence table in which feature points are associated with each other, and projective transformation (H calculation) using these feature points is performed. ) And a RANSAC unit 132 that performs support calculation using other feature points, and an image synthesis unit 133 that calculates positions corresponding to pixels and adds (synthesizes) image signals.

また、映像信号処理部13は、画像処理手段として、複数の画像に対して固定ノイズの消去処理や色の再現処理等の所定の画像処理を行う。
固定ノイズの消去は、予め撮像装置ごとに固定ノイズ値を測定しておき、連続撮影した画像からその値を差分することにより行う。
色の再現処理は、色彩分布を引き伸ばしたり、コントラストがでるような補正を行う。
In addition, the video signal processing unit 13 performs predetermined image processing such as fixed noise erasure processing and color reproduction processing on a plurality of images as image processing means.
The fixed noise is erased by measuring a fixed noise value for each image pickup apparatus in advance and subtracting the value from the continuously shot images.
In the color reproduction process, correction is performed so that the color distribution is extended or the contrast is increased.

画像メモリ14は、画像処理後の画像信号を一時的に記憶する。
撮影制御部15は、CPU71の制御下にて、電子撮像部12及び映像信号処理部13を制御する。具体的には、撮影制御部15は、電子撮像部12に所定の露出時間で被写体を撮像させ、当該電子撮像部12の撮像領域から画像信号を所定のフレームレートで読み出す処理の実行を制御する。
The image memory 14 temporarily stores the image signal after image processing.
The imaging control unit 15 controls the electronic imaging unit 12 and the video signal processing unit 13 under the control of the CPU 71. Specifically, the imaging control unit 15 controls the execution of the process of causing the electronic imaging unit 12 to image a subject with a predetermined exposure time and reading an image signal from the imaging area of the electronic imaging unit 12 at a predetermined frame rate. .

撮像補助部2は、撮像部1による被写体の撮像の際に駆動するものであり、フォーカス駆動部21と、ズーム駆動部22等を備えている。   The imaging assisting unit 2 is driven when the subject is imaged by the imaging unit 1, and includes a focus driving unit 21, a zoom driving unit 22, and the like.

フォーカス駆動部21は、撮像レンズ群11に接続されたフォーカス機構部(図示略)を駆動させる。
ズーム駆動部22は、撮像レンズ群11に接続されたズーム機構部(図示略)を駆動させる。
なお、フォーカス駆動部21及びズーム駆動部22は、撮影制御部15に接続され、撮影制御部15の制御下にて駆動する。
The focus drive unit 21 drives a focus mechanism unit (not shown) connected to the imaging lens group 11.
The zoom drive unit 22 drives a zoom mechanism unit (not shown) connected to the imaging lens group 11.
The focus driving unit 21 and the zoom driving unit 22 are connected to the shooting control unit 15 and are driven under the control of the shooting control unit 15.

表示部3は、撮像部1により撮像された画像を表示するものである。具体的には、表示部3は、表示制御部31と、画像表示部32等を備えている。
表示制御部31は、CPU71から適宜出力される表示データを一時的に保存するビデオメモリ(図示略)を備えている。
画像表示部32は、表示制御部31からの出力信号に基づいて所定の画像を表示する液晶モニタ等を備えている。
The display unit 3 displays an image captured by the imaging unit 1. Specifically, the display unit 3 includes a display control unit 31, an image display unit 32, and the like.
The display control unit 31 includes a video memory (not shown) that temporarily stores display data appropriately output from the CPU 71.
The image display unit 32 includes a liquid crystal monitor that displays a predetermined image based on an output signal from the display control unit 31.

操作部4は、当該撮像装置100の所定操作を行うためのものであり、操作入力部41と、入力回路42等を備えている。   The operation unit 4 is for performing a predetermined operation of the imaging apparatus 100, and includes an operation input unit 41, an input circuit 42, and the like.

操作入力部41は、撮像部1による被写体の撮像を指示するシャッターボタン41aを備えている。シャッターボタン41aは、被写体の連続撮影処理にて、ユーザにより押圧操作されている間、映像信号処理部13による画像合成処理を実行させる指示をCPU71に出力する。   The operation input unit 41 includes a shutter button 41 a that instructs the imaging unit 1 to image a subject. The shutter button 41a outputs an instruction to the CPU 71 to execute the image composition processing by the video signal processing unit 13 while being pressed by the user in the continuous photographing process of the subject.

入力回路42は、操作入力部41から出力され入力された操作信号をCPU71に入力するためのものである。   The input circuit 42 is for inputting an operation signal output from the operation input unit 41 to the CPU 71.

記録媒体5は、例えば、カード型の不揮発性メモリ(フラッシュメモリ)やハードディスク等により構成され、撮像部1により撮像された画像の画像データを複数記憶する。   The recording medium 5 is configured by, for example, a card-type nonvolatile memory (flash memory), a hard disk, and the like, and stores a plurality of image data of images captured by the imaging unit 1.

USB端子6は、外部機器との接続用の端子であり、USBケーブル(図示略)等を介してデータの送受信を行う。   The USB terminal 6 is a terminal for connection with an external device, and transmits and receives data via a USB cable (not shown).

制御部7は、撮像装置100の各部を制御するものであり、例えば、CPU71と、プログラムメモリ72と、データメモリ73等を備えている。   The control unit 7 controls each unit of the imaging apparatus 100, and includes, for example, a CPU 71, a program memory 72, a data memory 73, and the like.

CPU71は、プログラムメモリ72に記憶された撮像装置100用の各種処理プログラムに従って各種の制御動作を行うものである。   The CPU 71 performs various control operations according to various processing programs for the imaging apparatus 100 stored in the program memory 72.

データメモリ73は、例えば、フラッシュメモリ等により構成され、CPU71によって処理されるデータ等を一時記憶する。   The data memory 73 is composed of, for example, a flash memory and temporarily stores data processed by the CPU 71.

プログラムメモリ72は、CPU71の動作に必要な各種プログラムやデータを記憶するものである。具体的には、プログラムメモリ72は、画像合成プログラム72a、明るさ検出プログラム72b、第1の画像処理設定プログラム72c、第1の合成処理設定プログラム72d等を記憶している。   The program memory 72 stores various programs and data necessary for the operation of the CPU 71. Specifically, the program memory 72 stores an image composition program 72a, a brightness detection program 72b, a first image processing setting program 72c, a first composition processing setting program 72d, and the like.

画像合成プログラム72aは、CPU71の制御下にて、映像信号処理部13に、電子撮像部1により連続的に撮像された複数の画像のうち、何れか一の基準画像(例えば1枚目の画像)内から抽出した特徴点を対象画像(例えば2枚目以降の画像)内で追跡し、当該追跡結果に基づいて基準画像と対象画像を合成する画像合成処理に係る機能を実現させるためのプログラムである。
具体的には、CPU71が画像合成プログラム72aを実行することで、映像信号処理部13のオプティカルフロー検出部131は、低解像度画像作成手段として、入力された複数の画像信号に基づいて、例えば画像の縦横の画素を順次1/2倍ずつすることで解像度を段階的に低減させた低解像度画像を作成する(ピラミッド化)。また、オプティカルフロー検出部131は、特徴点抽出手段として、複数の画像のうち、何れか一の画像を基準画像として、基準画像から所定数の特徴点(特徴の高いブロック領域)を選択して抽出する。そして、オプティカルフロー検出部131は、対象画像に対する特徴点追跡手段として、特徴点を最も解像度の低い画像から解像度が高い方に順次追跡する。
そして、RANSAC部132は、基準画像と対象画像における複数の特徴点の対応の中からランダムに4点選択して仮の射影変換行列Hを計算し、そのサポート数で求めた射影変換行列Hを評価し、その作業を繰り返してより信頼性の高い射影変換行列Hを算出する。
その後、画像合成部133は、射影変換行列Hを用いて対象画像の画素を基準画像の座標系に射影変換して、当該対象画像と基準画像を合成する。
なお、画像合成処理にあっては、基準画像の画素を対象画像の座標系に射影変換するようにしても良い。
ここで、CPU71と映像信号処理部13は、基準画像と対象画像を合成する画像合成処理を行う画像合成手段として機能する。
Under the control of the CPU 71, the image composition program 72 a is one of a plurality of images that are continuously captured by the electronic image capturing unit 1 in the video signal processing unit 13 (for example, the first image). ) A program for tracking a feature point extracted from within a target image (for example, the second and subsequent images) and realizing a function related to an image composition process for compositing a reference image and the target image based on the tracking result It is.
Specifically, when the CPU 71 executes the image synthesis program 72a, the optical flow detection unit 131 of the video signal processing unit 13 serves as a low-resolution image creation unit based on a plurality of input image signals, for example, an image A low-resolution image in which the resolution is reduced stepwise by sequentially halving the vertical and horizontal pixels is created (pyramidization). Further, the optical flow detection unit 131 selects a predetermined number of feature points (block regions having high features) from the reference image by using any one of the plurality of images as a reference image as a feature point extraction unit. Extract. Then, the optical flow detection unit 131 sequentially tracks the feature points from the image with the lowest resolution to the higher resolution as a feature point tracking unit for the target image.
Then, the RANSAC unit 132 randomly selects four points from the correspondence between a plurality of feature points in the reference image and the target image, calculates a provisional projective transformation matrix H, and calculates the projective transformation matrix H obtained by the support number. Evaluation is repeated, and the operation is repeated to calculate a projective transformation matrix H with higher reliability.
Thereafter, the image composition unit 133 performs projective transformation of the pixels of the target image into the coordinate system of the reference image using the projective transformation matrix H, and synthesizes the target image and the reference image.
In the image composition process, the pixels of the reference image may be projectively transformed into the coordinate system of the target image.
Here, the CPU 71 and the video signal processing unit 13 function as an image synthesizing unit that performs an image synthesizing process for synthesizing the reference image and the target image.

明るさ検出プログラム72bは、CPU71の制御下にて、映像信号処理部13に、電子撮像部1により撮像された画像の画像信号に基づいて所定領域の画素の輝度を測定させて当該画像の撮影の際の明るさ(撮影状況関連情報)を検出する明るさ検出処理に係る機能を実現させるためのプログラムである。
即ち、CPU71が明るさ検出プログラム72bを実行することで、映像信号処理部13は、被写体のプレビュー画像(スルー画像)の画像信号に基づいて所定領域の画素の輝度を測定して当該画像の明るさを検出する。具体的には、例えば、「十分に明るい環境」、「やや暗い環境」、「暗い環境」、「暗闇な環境」の4パターンの明るさに区分して検出する。
「十分に明るい環境」とは、例えば、日中の屋外や明るい照明下で撮影するような環境に相当し、「やや暗い環境」とは、例えば、夕方やくもりの日、照明の弱い室内で撮影するような環境に相当し、「暗い環境」とは、例えば、夜間や照明がかなり暗い室内などフラッシュを使って撮影するような環境に相当し、「暗闇な環境」とは、夜の森の中や照明が全くない室内など光源が存在しないような環境に相当する。
ここで、CPU71と映像信号処理部13は、画像の撮影の際の明るさを検出する明るさ検出手段として機能する。また、CPU71と映像信号処理部13は、画像の撮影状況に関連した撮影状況関連情報を特定する撮影状況特定手段として機能する。
The brightness detection program 72b causes the video signal processing unit 13 to measure the luminance of pixels in a predetermined area based on the image signal of the image captured by the electronic imaging unit 1 under the control of the CPU 71, and capture the image. It is a program for realizing a function relating to brightness detection processing for detecting brightness (photographing situation related information) at the time of shooting.
That is, when the CPU 71 executes the brightness detection program 72b, the video signal processing unit 13 measures the brightness of pixels in a predetermined area based on the image signal of the preview image (through image) of the subject, and the brightness of the image. Detect. Specifically, for example, detection is performed by classifying into four patterns of brightness of “sufficiently bright environment”, “slightly dark environment”, “dark environment”, and “dark environment”.
The “sufficiently bright environment” corresponds to, for example, an environment where shooting is performed outdoors during daytime or under bright lighting. The “slightly dark environment” is, for example, in the evening or in a cloudy day, in a room with low lighting. It corresponds to an environment where you shoot, and “dark environment” means, for example, an environment where you shoot using a flash, such as at night or in a room where the lighting is very dark, and “dark environment” means a night forest. This corresponds to an environment where there is no light source, such as in a room or indoors where there is no lighting.
Here, the CPU 71 and the video signal processing unit 13 function as brightness detection means for detecting the brightness at the time of shooting an image. Further, the CPU 71 and the video signal processing unit 13 function as a shooting situation specifying unit that specifies shooting situation related information related to the shooting situation of an image.

第1の画像処理設定プログラム72cは、CPU71を明るさ画像処理設定手段として機能させるものである。即ち、第1の画像処理設定プログラム72cは、明るさ検出処理による明るさの検出結果に基づいて、第1の画像処理内容設定テーブルT1(図3参照)に従って、映像信号処理部13による基準画像や対象画像(被合成画像)に対する画像処理の内容を設定する処理に係る機能をCPU71に実現させるためのプログラムである。
具体的には、明るさ検出処理にて「やや暗い環境」であると検出されると、CPU71が第1の画像処理設定プログラム72cを実行することで、映像信号処理部13に固定ノイズの消去及び色の再現処理を実行させないように設定する。また、明るさ検出処理にて「暗い環境」であると検出されると、CPU71が第1の画像処理設定プログラム72cを実行することで、映像信号処理部13に固定ノイズの消去及び色の再現処理を行わせるように設定する。即ち、撮影環境が著しく暗い場合、連続撮影した画像1枚毎の色彩分布が狭くなったり、変化してしまうという問題が生じる。色彩成分が狂ってしまった画像は、単純に加算合成しても、色やコントラストが再現できないため、色の再現処理を行う必要があるためである。さらに、「暗い環境」では、画像成分が小さいために、カメラ固有で特定の画素に現れる固定ノイズの影響が無視できなくなる。つまり、画像信号が固定ノイズと比較しても小さな値となり、このような環境での画像合成においては、固定ノイズを無視することはできないため、固定ノイズの除去を行う必要があるためである。
The first image processing setting program 72c causes the CPU 71 to function as brightness image processing setting means. That is, the first image processing setting program 72c, based on the brightness detection result by the brightness detection processing, according to the first image processing content setting table T1 (see FIG. 3), the reference image by the video signal processing unit 13. And a program for causing the CPU 71 to realize a function related to processing for setting the contents of image processing for a target image (composite image).
Specifically, when the brightness detection process detects that the environment is “slightly dark”, the CPU 71 executes the first image processing setting program 72c to cause the video signal processing unit 13 to erase fixed noise. And setting so that the color reproduction process is not executed. When the brightness detection process detects a “dark environment”, the CPU 71 executes the first image processing setting program 72c to cause the video signal processing unit 13 to erase fixed noise and reproduce colors. Set to process. That is, when the shooting environment is extremely dark, there arises a problem that the color distribution for each continuously shot image becomes narrow or changes. This is because an image in which the color component is out of order cannot be reproduced with color and contrast even if they are simply added and combined, and color reproduction processing must be performed. Furthermore, in a “dark environment”, since the image component is small, the influence of fixed noise that appears in a specific pixel that is unique to the camera cannot be ignored. In other words, the image signal has a small value compared with the fixed noise, and the fixed noise cannot be ignored in the image synthesis in such an environment, so it is necessary to remove the fixed noise.

第1の合成処理設定プログラム72dは、CPU71を明るさ合成処理設定手段として機能させるものである。即ち、第1の合成処理設定プログラム72dは、明るさ検出処理による明るさの検出結果に基づいて、第1の合成処理内容設定テーブルT2(図4参照)に従って、映像信号処理部13による画像合成処理の内容を設定する処理に係る機能をCPU71に実現させるためのプログラムである。
具体的には、明るさ検出処理にて「やや暗い環境」であると検出されると、CPU71が第1の合成処理設定プログラム72dを実行することで、映像信号処理部13のオプティカルフロー検出部131による特徴点の抽出数及びピラミッドの階層数を通常数とするように設定する。また、明るさ検出処理にて「暗い環境」であると検出されると、CPU71が第1の合成処理設定プログラム72dを実行することで、オプティカルフロー検出部131による特徴点の抽出数及びピラミッドの階層数を通常よりも多い数に変更するように設定する。即ち、撮影環境が著しく暗い場合、各画素の画像信号か著しく小さいため、特徴点がノイズに埋もれてしまうことから、特徴点の抽出・トラッキングは非常に困難になる。そこで、「暗い環境」では、明るい環境での画像合成よりも多くの特徴点を抽出したり、トラッキングを多くしたりして精度を高める必要があるためである。
The first synthesizing process setting program 72d causes the CPU 71 to function as a brightness synthesizing process setting unit. That is, the first composition processing setting program 72d performs image composition by the video signal processing unit 13 according to the first composition processing content setting table T2 (see FIG. 4) based on the brightness detection result by the brightness detection processing. This is a program for causing the CPU 71 to realize a function related to the process of setting the process content.
Specifically, when it is detected in the brightness detection process that the environment is “slightly dark”, the CPU 71 executes the first synthesis processing setting program 72d, whereby the optical flow detection unit of the video signal processing unit 13 is executed. The number of feature points extracted by 131 and the number of hierarchies of pyramids are set to be normal numbers. When the brightness detection process detects a “dark environment”, the CPU 71 executes the first synthesis process setting program 72d, so that the number of feature points extracted by the optical flow detection unit 131 and the pyramid are extracted. Set the number of hierarchies to be changed to a larger number than usual. That is, when the shooting environment is extremely dark, since the image signal of each pixel is extremely small and the feature points are buried in noise, the feature point extraction / tracking becomes very difficult. Therefore, in the “dark environment”, it is necessary to increase the accuracy by extracting more feature points and increasing tracking than in the case of image synthesis in a bright environment.

また、プログラムメモリ72には、第1の画像処理内容設定テーブルT1(図3参照)と、第1の合成処理内容設定テーブルT2(図4参照)が記憶されている。   The program memory 72 stores a first image processing content setting table T1 (see FIG. 3) and a first composition processing content setting table T2 (see FIG. 4).

第1の画像処理内容設定テーブルT1は、図3に示すように、画像処理の処理内容(「固定ノイズの消去処理」、「色の再現処理」)と明るさ(「十分に明るい環境」、「やや暗い環境」、「暗い環境」、「暗闇な環境」)とを対応付けて記憶している。具体的には、処理内容として「固定ノイズの消去処理」は、「やや暗い環境」では「行わない」が対応付けられ、「暗い環境」では「行う」が対応付けられている。また、処理内容として「色の再現処理」は、「やや暗い環境」では「行わない」が対応付けられ、「暗い環境」では「行う」が対応付けられている。   As shown in FIG. 3, the first image processing content setting table T1 includes image processing details (“fixed noise elimination processing”, “color reproduction processing”) and brightness (“sufficiently bright environment”), “Slightly dark environment”, “dark environment”, “dark environment”) are stored in association with each other. Specifically, “fixed noise elimination processing” is associated with “not performed” in “slightly dark environment” and “performed” in “dark environment” as the processing content. As the processing content, “color reproduction processing” is associated with “do not perform” in “slightly dark environment” and “execute” in “dark environment”.

第1の合成処理内容設定テーブルT2は、図4に示すように、画像合成処理の処理内容(「特徴点の抽出処理」、「ピラミッドの階層化処理」)と明るさ(「十分に明るい環境」、「やや暗い環境」、「暗い環境」、「暗闇な環境」)とを対応付けて記憶している。具体的には、処理内容として「特徴点の抽出処理」は、「やや暗い環境」では「通常数」が対応付けられ、「暗い環境」では「通常よりも多い」が対応付けられている。また、処理内容として「ピラミッドの階層化処理」は、「やや暗い環境」では「通常数」が対応付けられ、「暗い環境」では「通常よりも多い」が対応付けられている。   As shown in FIG. 4, the first composition processing content setting table T2 includes image composition processing content (“feature point extraction processing”, “pyramid layering processing”) and brightness (“sufficiently bright environment”). , “Slightly dark environment”, “dark environment”, “dark environment”) in association with each other. Specifically, “feature point extraction processing” is associated with “normal number” in “slightly dark environment” and “more than normal” in “dark environment” as the processing content. In addition, “pyramid hierarchization processing” is associated with “normal number” in “slightly dark environment” and “more than normal” in “dark environment” as the processing content.

次に、実施形態1の撮像装置100による撮像処理について図5を参照して説明する。
図5は、撮像処理に係る動作の一例を示すフローチャートである。
Next, imaging processing performed by the imaging apparatus 100 according to Embodiment 1 will be described with reference to FIG.
FIG. 5 is a flowchart illustrating an example of an operation related to the imaging process.

図5に示すように、撮像部1による被写体の撮像が開始されると、CPU71は、プログラムメモリ72内の明るさ検出プログラム72bを実行して、映像信号処理部13に被写体のプレビュー画像(スルー画像)の画像信号に基づいて所定領域の画素の輝度を測定して当該画像の明るさを検出させる(ステップS1)。
続けて、CPU71は、明るさ検出処理の検出結果に応じて、撮影モードを通常撮影モードと連写撮影モードに設定する分岐を行う(ステップS2)。具体的には、明るさ検出処理にて「十分に明るい環境」や「暗闇な環境」と検出されると、CPU71は、撮影モードを通常撮影モードに設定し、一方、明るさ検出処理にて「やや暗い環境」や「暗い環境」と検出されると、CPU71は、撮影モードを連写撮影モードに設定する。
As shown in FIG. 5, when the imaging of the subject by the imaging unit 1 is started, the CPU 71 executes a brightness detection program 72b in the program memory 72 and causes the video signal processing unit 13 to display a preview image (through-image of the subject). Based on the image signal of the image), the brightness of the pixels in the predetermined area is measured to detect the brightness of the image (step S1).
Subsequently, the CPU 71 performs branching to set the shooting mode to the normal shooting mode and the continuous shooting mode in accordance with the detection result of the brightness detection process (step S2). Specifically, when “brightly bright environment” or “dark environment” is detected in the brightness detection process, the CPU 71 sets the shooting mode to the normal shooting mode, while in the brightness detection process. When “slightly dark environment” or “dark environment” is detected, the CPU 71 sets the shooting mode to the continuous shooting mode.

明るさ検出処理にて「十分に明るい環境」と検出され、ステップS2にて撮影モードが通常撮影モードに設定されると、CPU71は、ユーザによるシャッターボタン41aの押圧操作に基づいて、撮像部1により通常の撮影条件で被写体を撮影させる(ステップS3)。   When “brightly bright environment” is detected in the brightness detection process and the shooting mode is set to the normal shooting mode in step S2, the CPU 71 sets the imaging unit 1 based on the pressing operation of the shutter button 41a by the user. Thus, the subject is photographed under normal photographing conditions (step S3).

また、明るさ検出処理にて「暗闇な環境」と検出され、ステップS2にて撮影モードが通常撮影モードに設定されると、CPU71は、連写撮影された複数枚の画像を合成して一の画像を得る画像合成処理が実行不可であることを表す「合成不可」を画像表示部32に表示させる(ステップS4)。その後、CPU71は、ユーザによるシャッターボタン41aの押圧操作に基づいて、撮像部1により通常の撮影条件で被写体を撮影させる(ステップS5)。   Further, when “dark environment” is detected in the brightness detection process, and the shooting mode is set to the normal shooting mode in step S2, the CPU 71 combines a plurality of continuously shot images. “Unsynthesizable” is displayed on the image display unit 32, indicating that the image composition process for obtaining the image is not executable (step S4). Thereafter, the CPU 71 causes the imaging unit 1 to shoot the subject under normal shooting conditions based on the pressing operation of the shutter button 41a by the user (step S5).

一方、明るさ検出処理にて「やや暗い環境」や「暗い環境」と検出され、ステップS2にて撮影モードが連写撮影モードに設定されると、CPU71は、プログラムメモリ72内の第1の画像処理設定プログラム72cを実行して、第1の画像処理内容設定テーブルT1に従って映像信号処理部13による画像処理の内容を設定するとともに、プログラムメモリ72内の第1の合成処理設定プログラム72dを実行して、第1の合成処理内容設定テーブルT2に従って映像信号処理部13による画像合成処理の内容を設定する(ステップS6)。   On the other hand, when “slightly dark environment” or “dark environment” is detected in the brightness detection process, and the shooting mode is set to the continuous shooting mode in step S2, the CPU 71 sets the first in the program memory 72. The image processing setting program 72c is executed to set the content of the image processing by the video signal processing unit 13 according to the first image processing content setting table T1, and the first synthesis processing setting program 72d in the program memory 72 is executed. Then, the content of the image composition processing by the video signal processing unit 13 is set according to the first composition processing content setting table T2 (step S6).

続けて、ユーザによるシャッターボタン41aの押圧操作に基づいて撮像部1による被写体の連続した撮影が開始されると(ステップS7)、明るさ検出処理の検出結果の「やや暗い環境」及び「暗い環境」に応じて分岐して(ステップS8)、明るさ検出処理の検出結果が「やや暗い環境」の場合には、CPU71は、プログラムメモリ72内の画像合成プログラム72aを実行して、映像信号処理部13のオプティカルフロー検出部131に、基準画像及び対象画像に対して階層数を通常数としてピラミッド階層化処理を行わせるとともに、基準画像に対しては抽出数を通常数として特徴点の抽出を行わせ、対象画像に対しては抽出された特徴点の追跡を行わせる(ステップS9)。   Subsequently, when continuous imaging of the subject by the imaging unit 1 is started based on the pressing operation of the shutter button 41a by the user (step S7), the “slightly dark environment” and “dark environment” of the detection result of the brightness detection process. ”(Step S8), and if the detection result of the brightness detection process is“ slightly dark environment ”, the CPU 71 executes the image synthesis program 72a in the program memory 72 to perform video signal processing. The optical flow detection unit 131 of the unit 13 performs pyramid hierarchization processing on the reference image and the target image with the number of hierarchies as a normal number, and extracts the feature points with the normal number as the extraction number for the reference image. The extracted feature points are tracked for the target image (step S9).

一方、ステップS8にて、明るさ検出処理の検出結果が「暗い環境」の場合には、CPU71は、映像信号処理部13に、基準画像及び対象画像に対して固定ノイズの消去及び色の再現処理を行わせた後(ステップS10)、プログラムメモリ72内の画像合成プログラム72aを実行して、映像信号処理部13のオプティカルフロー検出部131に、基準画像及び対象画像に対して階層数を通常よりも多い数としてピラミッド階層化処理を行わせるとともに、基準画像に対しては抽出数を通常よりも多い数として特徴点の抽出を行わせ、対象画像に対しては抽出された特徴点の追跡を行わせる(ステップS11)。   On the other hand, if the detection result of the brightness detection process is “dark environment” in step S8, the CPU 71 causes the video signal processing unit 13 to erase fixed noise and reproduce colors for the reference image and the target image. After the processing (step S10), the image composition program 72a in the program memory 72 is executed, and the optical flow detection unit 131 of the video signal processing unit 13 sets the number of hierarchies for the reference image and the target image. Pyramid hierarchization processing is performed as a larger number, feature points are extracted as the number of extractions than the normal number for the reference image, and the extracted feature points are tracked for the target image (Step S11).

その後、CPU71は、映像信号処理部13のRANSAC部132に、基準画像と対象画像における複数の特徴点どうしが対応付けられた特徴点対応表に基づいて、射影変換行列Hを算出させ、画像合成部133に、射影変換行列Hを用いて対象画像の画素を基準画像の座標系に射影変換させて当該対象画像と基準画像を合成させる(ステップS12)。勿論、ステップS12の画像合成を行うためには、その時点で基準画像と少なくとも1つの対象画像の撮影が完了している必要があるので、撮影が完了していない場合にはステップS12の画像合成をスキップすることになる。   Thereafter, the CPU 71 causes the RANSAC unit 132 of the video signal processing unit 13 to calculate a projective transformation matrix H based on a feature point correspondence table in which a plurality of feature points in the reference image and the target image are associated with each other, and image synthesis is performed. The unit 133 uses the projective transformation matrix H to projectively transform the pixels of the target image into the coordinate system of the reference image and synthesize the target image and the reference image (step S12). Of course, in order to perform the image composition in step S12, it is necessary to complete the photographing of the reference image and at least one target image at that time. Therefore, if the photographing is not completed, the image composition of step S12 is performed. Will be skipped.

次に、CPU71は、ユーザによるシャッターボタン41aの押圧操作の解除に基づいて被写体の連続撮影の終了が指示されているか否かを判定する(ステップS13)。ここで、被写体の連続撮影の終了が指示されていると判定されると(ステップS13;YES)、CPU71は、合成画像に対して所定の画像処理を施して(ステップS14)、当該撮像処理を終了する。   Next, the CPU 71 determines whether or not the end of continuous shooting of the subject is instructed based on the release of the pressing operation of the shutter button 41a by the user (step S13). Here, if it is determined that the end of continuous shooting of the subject has been instructed (step S13; YES), the CPU 71 performs predetermined image processing on the composite image (step S14), and performs the imaging processing. finish.

なお、ステップS13にて、被写体の連続撮影の終了が指示されていないと判定されると(ステップS13;NO)、ステップS8に移行して、入力される複数の画像信号に対して映像信号処理部13による画像合成処理及び画像処理が行われる。   If it is determined in step S13 that the end of continuous shooting of the subject has not been instructed (step S13; NO), the process proceeds to step S8, and video signal processing is performed on a plurality of input image signals. Image synthesis processing and image processing by the unit 13 are performed.

以上のように、実施形態1の撮像装置100によれば、画像の撮影状況関連情報として画像の撮影の際の明るさを検出し、明るさの検出結果に基づいて、画像処理における基準画像や対象画像に対する画像処理の内容や画像合成処理における画像合成処理の内容を設定することができる。
即ち、「十分に明るい環境」では、通常撮影で十分綺麗に撮影できるため、画像合成で得られる画像に対する処理時間などのデメリットの方が目立ってしまう場合が多くなる。このため、画像合成処理を行わずに通常の1枚撮影を行う。これにより、撮影環境の明るさによって画像合成を行うか行わないかの選択を自動で切替えることになるので、ユーザにとってはその手間が省略できる。
また、「やや暗い環境」では、通常撮影でもある程度明るく撮影することができるため、特徴点の抽出及びトラッキングに関しては、それほど慎重に行わなくても十分な精度を得ることができる。また、各画素の画像信号も十分あるので固定ノイズの影響も受け難く、色彩分布もそれほど狭くならないため、それらを補正する処理は行わなくても十分な品質を確保することができるので、その分、処理時間を短縮することができる。
また、「暗い環境」では、画像合成が失敗し易いので、「やや暗い環境」よりも慎重に合成を行う必要があるため、特徴点の抽出数やピラミッドの階層数を増やすようにする。また、画像信号成分が小さいので固定ノイズの影響を非常に受け、色彩分布も狭く色の再現性も悪いため、固定ノイズを消去する処理や、色を再現するための処理を行う。
また、「暗闇な環境」では、画像合成を行うための特徴点の抽出及びトラッキングが非常に困難になり、画像合成が成功する可能性は非常に低くなるため、画像合成処理を行わずに、ユーザの立場を考えて「合成不可」の報知を行った後、通常の1枚撮影を行う。
As described above, according to the imaging apparatus 100 of the first embodiment, the brightness at the time of image shooting is detected as the image shooting state related information, and based on the detection result of the brightness, The contents of the image processing for the target image and the contents of the image composition processing in the image composition processing can be set.
In other words, in a “sufficiently bright environment”, it is possible to capture a sufficiently clear image by normal shooting, so that there are many cases where disadvantages such as processing time for an image obtained by image synthesis become more conspicuous. Therefore, a normal single image is taken without performing the image composition process. Accordingly, the selection of whether or not to perform image composition is automatically switched depending on the brightness of the shooting environment, so that the user can save the trouble.
Also, in a “slightly dark environment”, it is possible to shoot to a certain degree of brightness even in normal shooting, so that sufficient accuracy can be obtained without performing so carefully in extracting and tracking feature points. In addition, since there are enough image signals for each pixel, it is not easily affected by fixed noise, and the color distribution is not so narrow, so that sufficient quality can be ensured without performing processing to correct them. , Processing time can be shortened.
Also, since image composition is likely to fail in a “dark environment”, it is necessary to perform composition more carefully than in a “slightly dark environment”, so the number of feature points extracted and the number of layers of pyramids are increased. In addition, since the image signal component is small, it is greatly affected by fixed noise, and the color distribution is narrow and the color reproducibility is poor. Therefore, processing for eliminating fixed noise and processing for reproducing colors are performed.
Also, in the “dark environment”, extraction and tracking of feature points for image composition becomes very difficult, and the possibility of successful image composition becomes very low, so without performing image composition processing, In consideration of the user's position, the notification of “composite is impossible” is made, and then normal one-shot shooting is performed.

このように、「暗い環境」での画像合成は、画像の精度・品質にかかわる問題が多く発生し、それを解決するためにいくつもの処理を行わなければならないが、それらの処理は明るい環境で合成する場合は必要とせず、むしろ処理時間の浪費になってしまったり、画像品質を下げてしまう可能性もある。
そこで、連続撮影画像の合成において、それぞれの明るさに相応しい合成処理や画像処理を行うことで、無駄な処理を行わないことにより処理時間の浪費を抑えて全体的な処理速度の向上を図ることができる。さらに、必要な場合には慎重に合成を行うことで合成成功率の向上及び適切なパラメータを使うことで出力画像の画質の向上を図ることができる。
また、自動的に撮影状況の明るさに最適な撮影ができるので、ユーザビリティの向上を図ることもできる。
In this way, image composition in a “dark environment” has many problems related to the accuracy and quality of the image, and a number of processes must be performed to solve it, but these processes are performed in a bright environment. This is not necessary when compositing, but rather it may waste processing time or reduce image quality.
Therefore, in the synthesis of continuously shot images, by performing synthesis processing and image processing appropriate for each brightness, it is possible to reduce waste of processing time and improve overall processing speed by not performing unnecessary processing. Can do. Further, if necessary, the composition success rate can be improved by carefully combining the images, and the image quality of the output image can be improved by using appropriate parameters.
In addition, since it is possible to automatically perform shooting optimal for the brightness of the shooting situation, usability can be improved.

なお、上記実施形態1では、映像信号処理部13は、明るさ検出処理にて検出された4パターンの明るさ(「十分に明るい環境」、「やや暗い環境」、「暗い環境」、「暗闇な環境」)に応じて所定の画像処理を実行するか否かとしたが、これに限られるものではなく、例えば、明るさの検出パターンをより細かく区分して、当該区分に応じて画像処理の内容をより細かく制御するようにしても良い。例えば、「やや暗い環境」と「暗い環境」の中間の環境を設定して、当該環境では、固定ノイズの消去か色の再現処理の何れか一方のみを行うようにしても良いし、固定ノイズの消去及び色の再現処理の程度(強度)を変更するようにしても良い。   In the first embodiment, the video signal processing unit 13 performs the brightness of the four patterns detected in the brightness detection process (“sufficiently bright environment”, “slightly dark environment”, “dark environment”, “darkness”). However, the present invention is not limited to this. For example, the brightness detection pattern is divided more finely, and image processing is performed according to the division. The content may be controlled more finely. For example, an environment between “slightly dark environment” and “dark environment” may be set so that only one of fixed noise elimination or color reproduction processing is performed in the environment, or fixed noise is performed. The degree (intensity) of erasing and color reproduction processing may be changed.

また、上記実施形態1では、画像処理内容の設定にて固定ノイズの消去及び色の再現処理の両方の処理内容を設定するようにしたが、必ずしも両方を設定する必要はなく、固定ノイズの消去及び色の再現処理のうち、少なくとも何れか一方の設定を行うようにしても良い。
さらに、画像合成処理内容の設定にて特徴点の抽出数及びピラミッドの階層数の両方の処理内容を設定するようにしたが、必ずしも両方を設定する必要はなく、特徴点の抽出数及びピラミッドの階層数のうち、少なくとも何れか一方の設定を行うようにしても良い。
加えて、設定される画像処理の内容は、固定ノイズの消去及び色の再現処理に限られるものではなく、また、設定される画像合成処理の内容は、特徴点の抽出数及びピラミッドの階層数に限られるものではなく、出力画像の画質の向上を図ることができる処理であれば如何なるものであっても良い。
In the first embodiment, the processing contents of both fixed noise elimination and color reproduction processing are set in the setting of the image processing contents. However, it is not always necessary to set both, and the fixed noise elimination is performed. In addition, at least one of the color reproduction processing and the color reproduction processing may be set.
Furthermore, the processing content of both the number of feature points extracted and the number of layers of the pyramid is set in the image composition processing content setting, but it is not always necessary to set both, the number of feature points extracted and the number of pyramids At least one of the number of layers may be set.
In addition, the set image processing content is not limited to the fixed noise elimination and color reproduction processing, and the set image composition processing content includes the number of feature points extracted and the number of pyramid layers. The present invention is not limited to this, and any process that can improve the image quality of the output image may be used.

また、上記実施形態1にあっては、「十分に明るい環境」では、画像合成処理を行わずに通常の1枚撮影を行うようにしたが、これに限られるものではなく、手ぶれや被写体ぶれを検出した場合には、画像合成処理を行ってぶれを補正するようにしても良い。
また、上記実施形態1において、シャッターボタン41aを半押し操作と全押し操作とが可能な2段押しボタンとし、シャッターボタン41aの半押し操作が行われた際に明るさ測定を行い(ステップS1)、その後、シャッターボタン41aの全押し操作が行われると、通常撮影(ステップS3、S5)や連続撮影(ステップS7)を開始するようにしてもよい。
Further, in the first embodiment, in the “sufficiently bright environment”, the normal one-shot shooting is performed without performing the image composition processing. However, the present invention is not limited to this. May be corrected by performing an image composition process.
In the first embodiment, the shutter button 41a is a two-stage push button that can be pressed halfway and fully, and brightness measurement is performed when the shutter button 41a is pressed halfway (step S1). Thereafter, when the shutter button 41a is fully pressed, normal shooting (steps S3 and S5) and continuous shooting (step S7) may be started.

[実施形態2]
以下に、実施形態2の撮像装置200について図6〜図9を参照して説明する。
ここで、図6は、本発明を適用した実施形態2の撮像装置200の概略構成を示すブロック図である。
実施形態2の撮像装置200は、基準画像と対象画像のずれ量に基づいて、画像合成処理の内容や合成画像に対する画像処理の内容を設定する。
なお、実施形態2の撮像装置200は、画像合成処理の内容や画像処理の内容を変更する以外の点では、実施形態1におけるものと略同様であり、その詳細な説明については省略するものとする。
[Embodiment 2]
Hereinafter, the imaging apparatus 200 according to the second embodiment will be described with reference to FIGS.
Here, FIG. 6 is a block diagram illustrating a schematic configuration of the imaging apparatus 200 according to the second embodiment to which the present invention is applied.
The imaging apparatus 200 according to the second embodiment sets the content of the image composition process and the content of the image process for the composite image based on the deviation amount between the reference image and the target image.
The imaging apparatus 200 according to the second embodiment is substantially the same as that according to the first embodiment except that the contents of the image composition process and the contents of the image process are changed, and detailed description thereof is omitted. To do.

図6に示すように、プログラムメモリ72は、画像合成プログラム72aに加えて、ずれ量検出プログラム72e、第2の合成処理設定プログラム72f、第2の画像処理設定プログラム72g等を記憶している。   As shown in FIG. 6, the program memory 72 stores a deviation amount detection program 72e, a second composition processing setting program 72f, a second image processing setting program 72g, and the like in addition to the image composition program 72a.

ずれ量検出プログラム72eは、CPU71の制御下にて、映像信号処理部13に、基準画像と対象画像のずれ量(撮影状況関連情報)を検出する処理に係る機能を実現させるためのプログラムである。
即ち、CPU71がずれ量検出プログラム72eを実行することで、ピラミッド化した最も解像度の低い画像に対して特徴点追跡を行わずに、基準画像と対象画像間の全体の動き量を検出して、その値をずれ量とする。具体的には、例えば、「ずれ量小」、「ずれ量中」、「ずれ量大」の3パターンのずれ量に区分して検出する。
「ずれ量小」とは、例えば、基準画像と対象画像のずれ量が所定値t1よりも小さい場合であり、「ずれ量中」とは、基準画像と対象画像のずれ量が所定値t1以上であり、且つ所定値t2よりも小さい場合(t1<t2)であり、「ずれ量大」とは、基準画像と対象画像のずれ量が所定値t2以上である場合である。
ここで、CPU71と映像信号処理部13は、基準画像と対象画像のずれ量を検出するずれ量検出手段として機能する。また、CPU71と映像信号処理部13は、画像の撮影状況に関連した撮影状況関連情報を特定する撮影状況特定手段として機能する。
The deviation amount detection program 72e is a program for causing the video signal processing unit 13 to realize a function related to processing for detecting a deviation amount (shooting situation related information) between the reference image and the target image under the control of the CPU 71. .
That is, the CPU 71 executes the shift amount detection program 72e to detect the entire amount of motion between the reference image and the target image without performing feature point tracking on the lowest resolution image that has been pyramidal, The value is set as the deviation amount. Specifically, for example, detection is performed by classifying into three patterns of shift amounts of “small shift amount”, “medium shift amount”, and “large shift amount”.
“Small amount of deviation” means, for example, a case where the amount of deviation between the reference image and the target image is smaller than a predetermined value t1, and “medium amount of deviation” means that the amount of deviation between the reference image and the target image is equal to or larger than the predetermined value t1. And is smaller than the predetermined value t2 (t1 <t2), and “large deviation amount” is a case where the deviation amount between the reference image and the target image is equal to or larger than the predetermined value t2.
Here, the CPU 71 and the video signal processing unit 13 function as a deviation amount detection unit that detects a deviation amount between the reference image and the target image. Further, the CPU 71 and the video signal processing unit 13 function as a shooting situation specifying unit that specifies shooting situation related information related to the shooting situation of an image.

第2の合成処理設定プログラム72fは、CPU71をずれ合成処理設定手段として機能させるものである。即ち、第2の合成処理設定プログラム72fは、ずれ量検出処理によるずれ量の検出結果に基づいて、第2の合成処理内容設定テーブルT3(図7参照)に従って、映像信号処理部13による画像合成処理の内容を設定する処理に係る機能をCPU71に実現させるためのプログラムである。
具体的には、CPU71が第2の合成処理設定プログラム72fを実行することで、ずれ量検出処理により検出されたずれ量の大きさに応じて、オプティカルフロー検出部131による特徴点追跡における対象画像内の探索範囲(追跡範囲)の大きさを変更する。例えば、ずれ量検出処理にて、ずれ量が「ずれ量小」であると検出されると、特徴点の探索範囲を通常のサイズとし、また、ずれ量が「ずれ量中」であると検出されると、特徴点の探索範囲を通常よりも大きいサイズとする。即ち、通常、特徴点の探索範囲は画像サイズから決められ、この探索範囲のサイズは、直接的に処理時間に影響を与えることになるが、大きなずれが生じることを考慮して、探索範囲のサイズをある程度大きくとらなければならない。これに対して、ずれ量が小さかった場合には、探索範囲のサイズを大きくした分の処理時間は無駄となる。そこで、基準画像と対象画像のずれ量が大きくなるほど、より慎重にトラッキングを行う必要が生じるためである。
なお、探索範囲からはみ出てしまうくらいのずれが生じて、ずれ量が「ずれ量大」であると検出された場合には、ずれ量が小さい場合に比べて画像中の似たような画素に誤って追跡してしまう可能性が大きくなってしまうため、その時点で、対象画像を画像合成処理に用いずに破棄するようになっている。
The second synthesis processing setting program 72f causes the CPU 71 to function as a shift synthesis processing setting unit. That is, the second composition processing setting program 72f performs image composition by the video signal processing unit 13 in accordance with the second composition processing content setting table T3 (see FIG. 7) based on the detection result of the displacement amount by the displacement amount detection process. This is a program for causing the CPU 71 to realize a function related to the process of setting the process content.
Specifically, the CPU 71 executes the second synthesis processing setting program 72f, so that the target image in the feature point tracking by the optical flow detection unit 131 according to the magnitude of the deviation amount detected by the deviation amount detection process. The size of the search range (tracking range) is changed. For example, when the deviation amount detection process detects that the deviation amount is “small deviation amount”, the feature point search range is set to a normal size, and the deviation amount is detected to be “medium deviation amount”. Then, the feature point search range is set to a size larger than usual. In other words, the search range of feature points is usually determined from the image size, and the size of this search range directly affects the processing time, but considering the fact that a large shift occurs, The size must be increased to some extent. On the other hand, when the amount of deviation is small, the processing time for increasing the size of the search range is wasted. Therefore, it is necessary to perform tracking more carefully as the amount of deviation between the reference image and the target image increases.
In addition, when a shift that is beyond the search range occurs and the shift amount is detected to be “large shift amount”, similar pixels in the image are compared with the case where the shift amount is small. Since there is a high possibility that the image is erroneously tracked, the target image is discarded without being used for the image synthesis process at that time.

第2の画像処理設定プログラム72gは、CPU71をずれ画像処理設定手段として機能させるものである。即ち、第2の画像処理設定プログラム72gは、ずれ量検出処理によるずれ量の検出結果に基づいて、第2の画像処理内容設定テーブルT4(図8参照)に従って、映像信号処理部13による合成画像に対する画像処理の内容を設定する処理に係る機能をCPU71に実現させるためのプログラムである。
具体的には、CPU71が第2の画像処理設定プログラム72gを実行することで、ずれ量検出処理により検出されたずれ量の大きさに応じて、映像信号処理部13による合成画像に対するシャープネス処理の強さを変更する。例えば、ずれ量検出処理にて、ずれ量が「ずれ量小」であると検出されると、シャープネスフィルタの強さを通常のものとし、また、ずれ量が「ずれ量中」であると検出されると、シャープネスフィルタの強さを通常よりも強いものとる。即ち、基準画像と対象画像のずれ量が大きくなるほど、合成時に視差の影響が大きくなり、合成精度が落ちて撮影画像がぼやっとしたり、さらにずれ量が大きくなれば、部分的に二重写りが生じた失敗画像が発生することもある。そこで、基準画像と対象画像のずれ量が大きく合成画像がぼやっとするような撮影環境では、それを解消するためにシャープネス処理を施す必要があるためである。
なお、シャープネス処理の強さの程度は、シャープネスフィルタをかけ過ぎると画像の品質が悪化するため、連続撮影中の位相のずれの最大値に応じてシャープネスフィルタの強さを設定するのが好ましい。
The second image processing setting program 72g causes the CPU 71 to function as a shifted image processing setting unit. That is, the second image processing setting program 72g, based on the detection result of the shift amount by the shift amount detection process, in accordance with the second image processing content setting table T4 (see FIG. 8), the composite image by the video signal processing unit 13. This is a program for causing the CPU 71 to realize a function related to processing for setting the content of image processing for.
Specifically, when the CPU 71 executes the second image processing setting program 72g, the sharpness processing of the synthesized image by the video signal processing unit 13 according to the magnitude of the deviation detected by the deviation detection processing. Change strength. For example, if the deviation amount detection process detects that the deviation amount is “small deviation amount”, the strength of the sharpness filter is normal, and the deviation amount is detected as “medium deviation amount”. If so, the strength of the sharpness filter is set to be stronger than usual. In other words, the greater the amount of deviation between the reference image and the target image, the greater the effect of parallax at the time of composition, and the combined accuracy decreases and the photographed image becomes blurred. The resulting failed image may occur. This is because, in a shooting environment where the amount of deviation between the reference image and the target image is large and the composite image is blurred, it is necessary to perform sharpness processing in order to eliminate this.
Note that the strength of the sharpness processing is preferably set according to the maximum value of the phase shift during continuous shooting because the image quality deteriorates if the sharpness filter is excessively applied.

また、プログラムメモリ72には、第2の合成処理内容設定テーブルT3(図7参照)と、第2の画像処理内容設定テーブルT4(図8参照)が記憶されている。   The program memory 72 stores a second composition processing content setting table T3 (see FIG. 7) and a second image processing content setting table T4 (see FIG. 8).

第2の合成処理内容設定テーブルT3は、図7に示すように、画像合成処理の処理内容としての特徴点追跡における「探索範囲の大きさ」とずれ量(「ずれ量小」、「ずれ量中」、「ずれ量大」)とを対応付けて記憶している。具体的には、「探索範囲の大きさ」は、「ずれ量小」では「通常」が対応付けられ、「ずれ量中」では「通常よりも大きい」が対応付けられている。   As shown in FIG. 7, the second composition processing content setting table T3 includes a “search range size” and a deviation amount (“deviation amount small”, “deviation amount” in the feature point tracking as the processing contents of the image composition processing. “Medium” and “large deviation”) are stored in association with each other. Specifically, “the size of the search range” is associated with “normal” for “small deviation” and “larger than normal” for “medium deviation”.

第2の画像処理内容設定テーブルT4は、図8に示すように、画像処理の処理内容としての合成画像に対する「シャープネスフィルタの強さ」とずれ量(「ずれ量小」、「ずれ量中」、「ずれ量大」)とを対応付けて記憶している。具体的には、「シャープネスフィルタの強さ」は、「ずれ量小」では「通常」が対応付けられ、「ずれ量中」では「通常よりも強い」が対応付けられている。   As shown in FIG. 8, the second image processing content setting table T4 includes “sharpness filter strength” and deviation amounts (“deviation amount small”, “medium deviation amount”) for the composite image as the processing content of the image processing. , “Large deviation amount”). Specifically, “the strength of the sharpness filter” is associated with “normal” for “small deviation” and “stronger than normal” for “medium deviation”.

次に、実施形態2の撮像装置200による撮像処理について図9を参照して説明する。
図9は、撮像処理に係る動作の一例を示すフローチャートである。
Next, imaging processing by the imaging apparatus 200 of Embodiment 2 will be described with reference to FIG.
FIG. 9 is a flowchart illustrating an example of an operation related to the imaging process.

図9に示すように、ユーザによるシャッターボタン41aの押圧操作に基づいて撮像部1による被写体の連続した撮影が開始されると(ステップS21)、CPU71は、プログラムメモリ72内のずれ量検出プログラム72eを実行して、映像信号処理部13に、基準画像と対象画像のずれ量を検出させる(ステップS22)。ここで、1枚目の画像を基準画像、2枚目以降の画像を対象画像とした場合は、ステップS21により連続撮影が開始された後、2枚目の画像の撮影が完了した後にステップS22に移行してずれ量検出処理が開始され、以後、画像の撮影が完了する度にステップS22のずれ量検出処理が行われることになる。
続けて、CPU71は、ずれ量検出処理の検出結果に応じて、合成される対象画像を画像合成処理の対象とするか否かの分岐を行い(ステップS23)、「ずれ量大」と検出されると、CPU71は、合成される対象画像を破棄した後(ステップS24)、ステップS22に移行する。
As shown in FIG. 9, when continuous shooting of the subject by the imaging unit 1 is started based on the pressing operation of the shutter button 41a by the user (step S21), the CPU 71 detects the shift amount detection program 72e in the program memory 72. To cause the video signal processing unit 13 to detect the amount of deviation between the reference image and the target image (step S22). Here, when the first image is the reference image and the second and subsequent images are the target images, after the continuous shooting is started in step S21, the shooting of the second image is completed and then step S22. The shift amount detection process is started and the shift amount detection process in step S22 is performed every time image capturing is completed.
Subsequently, the CPU 71 branches whether or not the target image to be synthesized is the target of the image synthesis process according to the detection result of the deviation amount detection process (step S23), and is detected as “large deviation amount”. Then, after discarding the target image to be synthesized (step S24), the CPU 71 proceeds to step S22.

一方、ステップS23にて「ずれ量小」か「ずれ量中」と検出されると、CPU71は、当該対象画像を画像合成処理の対象とし、プログラムメモリ72内の第2の合成処理設定プログラム72fを実行して、第2の合成処理内容設定テーブルT3に従って映像信号処理部13による画像合成処理の内容を設定するとともに、プログラムメモリ72内の第2の画像処理設定プログラム72gを実行して、第2の画像処理内容設定テーブルT4に従って映像信号処理部13による画像処理の内容を設定する(ステップS25)。ここで、第2の画像処理設定プログラム72gを実行して、第2の画像処理内容設定テーブルT4に従って映像信号処理部13による画像処理の内容を設定する場合、設定しようとしている画像処理の内容の強度(通常よりも強い)が現在設定されている画像処理の内容(通常)よりも高い場合にのみ更新設定するものとする。なお、画像処理の内容の強度が同じ場合は更新設定するようにしてもいいし、更新設定しないようにしてもよい   On the other hand, when “small deviation amount” or “medium deviation amount” is detected in step S23, the CPU 71 sets the target image as a target of image synthesis processing, and sets the second synthesis processing setting program 72f in the program memory 72. To set the content of the image composition processing by the video signal processing unit 13 in accordance with the second composition processing content setting table T3, and execute the second image processing setting program 72g in the program memory 72 to execute the second composition processing content setting table T3. The content of the image processing by the video signal processing unit 13 is set according to the image processing content setting table T4 of No. 2 (step S25). Here, when executing the second image processing setting program 72g and setting the content of the image processing by the video signal processing unit 13 according to the second image processing content setting table T4, the content of the image processing to be set is set. Only when the intensity (stronger than normal) is higher than the currently set image processing content (normal), the update setting is made. If the intensity of the image processing content is the same, update setting may be performed, or update setting may not be performed.

続けて、CPU71は、プログラムメモリ72内の画像合成プログラム72aを実行して、映像信号処理部13のオプティカルフロー検出部131に、基準画像及び対象画像に対してピラミッド階層化処理を行わせるとともに、基準画像に対しては特徴点の抽出を行わせ、対象画像に対しては抽出された特徴点の追跡をずれ量に応じて設定された探索範囲で行わせる(ステップS26)。
その後、CPU71は、映像信号処理部13のRANSAC部132に、基準画像と対象画像における複数の特徴点どうしが対応付けられた特徴点対応表に基づいて、射影変換行列Hを算出させ、画像合成部133に、射影変換行列Hを用いて対象画像の画素を基準画像の座標系に射影変換させて当該対象画像と基準画像を合成させる(ステップS27)。
Subsequently, the CPU 71 executes the image synthesis program 72a in the program memory 72 to cause the optical flow detection unit 131 of the video signal processing unit 13 to perform pyramid hierarchization processing on the reference image and the target image. The feature points are extracted from the reference image, and the extracted feature points are tracked from the target image within the search range set in accordance with the shift amount (step S26).
Thereafter, the CPU 71 causes the RANSAC unit 132 of the video signal processing unit 13 to calculate a projective transformation matrix H based on a feature point correspondence table in which a plurality of feature points in the reference image and the target image are associated with each other, and image synthesis is performed. The unit 133 performs projective transformation of the pixels of the target image into the coordinate system of the reference image using the projective transformation matrix H to synthesize the target image and the reference image (step S27).

次に、CPU71は、ユーザによるシャッターボタン41aの押圧操作の解除に基づいて被写体の連続撮影の終了が指示されているか否かを判定する(ステップS28)。ここで、被写体の連続撮影の終了が指示されていると判定されると(ステップS28;YES)、CPU71は、映像信号処理部13に、連続撮影中における最大ずれ量に応じて設定されたシャープネスフィルタの強さで合成画像に対してシャープネス処理を施して(ステップS29)、当該撮像処理を終了する。   Next, the CPU 71 determines whether or not the end of continuous shooting of the subject is instructed based on the release of the pressing operation of the shutter button 41a by the user (step S28). If it is determined that the end of continuous shooting of the subject is instructed (step S28; YES), the CPU 71 causes the video signal processing unit 13 to set the sharpness set according to the maximum shift amount during continuous shooting. Sharpness processing is performed on the composite image with the strength of the filter (step S29), and the imaging processing ends.

なお、ステップS28にて、被写体の連続撮影の終了が指示されていないと判定されると(ステップS28;NO)、ステップS22に移行して、入力される複数の画像信号に対して映像信号処理部13による画像合成処理の対象とするか否かの設定が行われる。   If it is determined in step S28 that the end of continuous shooting of the subject has not been instructed (step S28; NO), the process proceeds to step S22, and video signal processing is performed on a plurality of input image signals. A setting is made as to whether or not the image is to be processed by the unit 13.

以上のように、実施形態2の撮像装置200によれば、画像の撮影状況関連情報として基準画像と対象画像のずれ量を検出し、ずれ量の検出結果に基づいて、画像合成処理における画像合成処理の内容や画像処理における合成画像に対する画像処理の内容を設定することができる。
即ち、手ぶれ等が生じた場合に、基準画像と対象画像のずれ量の大きさに応じて特徴点追跡時における特徴点の探索範囲のサイズを設定して、当該サイズでトラッキングを行うことで、無駄な処理時間の浪費を抑えることができる。また、ずれ量が大きくなるほど、画像合成時に視差の影響が大きくなって合成精度が落ちて撮影画像がぼやっとしたり、さらにずれが大きくなれば、部分的に二重写りが生じた失敗画像が発生することもある。そこで、基準画像と対象画像のずれ量が大きく合成画像がぼやっとするような撮影環境の場合には、それを解消するためにシャープネス処理を施すようにする。さらに、基準画像と対象画像のずれ量が著しく大きい場合には、画像合成が失敗する可能性か高いので、その時点で撮影画像を破棄する。
As described above, according to the imaging apparatus 200 of the second embodiment, the shift amount between the reference image and the target image is detected as the image capturing state related information, and based on the detection result of the shift amount, the image composition in the image composition processing is performed. It is possible to set the content of the processing and the content of the image processing for the composite image in the image processing.
In other words, when camera shake or the like occurs, by setting the size of the feature point search range at the time of feature point tracking according to the amount of deviation between the reference image and the target image, tracking by the size, Waste of unnecessary processing time can be suppressed. In addition, as the amount of displacement increases, the effect of parallax increases during image composition, resulting in a decrease in composition accuracy and a blurred photographed image. Sometimes. Therefore, in a shooting environment where the amount of deviation between the reference image and the target image is large and the composite image is blurred, sharpness processing is performed in order to eliminate this. Furthermore, if the amount of deviation between the reference image and the target image is remarkably large, there is a high possibility that image composition will fail, and the captured image is discarded at that time.

このように、基準画像と対象画像のずれ量の大きさは、画像合成処理や画像処理に対して影響を与えるため、ずれ量の大きさを考慮せずに一意的な画像合成処理や画像処理を行うことは処理が過不足になってしまう。
そこで、連続撮影画像の合成において、基準画像と対象画像のずれ量の大きさに相応しい画像合成処理や画像処理を行うことで、無駄な処理を行わないことにより処理時間の浪費を抑えて全体的な処理速度の向上を図ることができる。さらに、必要な場合には慎重に合成を行うことで合成成功率の向上及び適切なパラメータを使うことで出力画像の画質の向上を図ることができる。
As described above, the amount of deviation between the reference image and the target image affects the image composition processing and image processing. Therefore, the unique image composition processing and image processing are not considered without considering the amount of deviation. Doing so would result in excessive or insufficient processing.
Therefore, in the synthesis of continuously shot images, by performing image synthesis processing and image processing appropriate for the amount of deviation between the reference image and the target image, the waste of processing time can be suppressed by not performing unnecessary processing. The processing speed can be improved. Further, if necessary, the composition success rate can be improved by carefully combining the images, and the image quality of the output image can be improved by using appropriate parameters.

なお、上記実施形態2では、基準画像と対象画像のずれ量の検出にて、基準画像と対象画像間の動き量をずれ量とするようにしたが、これに限られるものではなく、例えば、加速度センサを用いて連続撮影間のカメラの移動距離を測定して、当該移動距離をずれ量とするようにしても良い。   In the second embodiment, the amount of motion between the reference image and the target image is set as the amount of shift in the detection of the shift amount between the reference image and the target image. However, the present invention is not limited to this. An acceleration sensor may be used to measure the moving distance of the camera during continuous shooting, and the moving distance may be used as a shift amount.

また、上記実施形態2では、設定される画像処理の内容をシャープネス処理としたが、設定される画像処理の内容は、シャープネス処理に限られるものではなく、さらに、設定される画像合成処理の内容は、特徴点の探索範囲の大きさの変更に限られるものではなく、出力画像の画質の向上を図ることができる処理であれば如何なるものであっても良い。   In the second embodiment, the content of the image processing to be set is the sharpness processing. However, the content of the image processing to be set is not limited to the sharpness processing, and further, the content of the image composition processing to be set. Is not limited to changing the size of the search range for feature points, and any process that can improve the image quality of the output image may be used.

[実施形態3]
以下に、実施形態3の撮像装置300について図10〜図13を参照して説明する。
ここで、図10は、本発明を適用した実施形態3の撮像装置300の概略構成を示すブロック図である。
実施形態3の撮像装置300は、特徴点の特徴量の測定結果に基づいて、画像合成処理の内容や合成画像に対する画像処理の内容を設定する。
なお、実施形態3の撮像装置300は、画像合成処理の内容や画像処理の内容の変更以外の点では、実施形態1におけるものと略同様であり、その詳細な説明については省略するものとする。
[Embodiment 3]
Hereinafter, the imaging apparatus 300 according to the third embodiment will be described with reference to FIGS.
Here, FIG. 10 is a block diagram illustrating a schematic configuration of the imaging apparatus 300 according to the third embodiment to which the present invention is applied.
The imaging apparatus 300 according to the third embodiment sets the content of the image composition process and the content of the image process for the composite image based on the measurement result of the feature amount of the feature points.
The imaging apparatus 300 according to the third embodiment is substantially the same as that according to the first embodiment except for the contents of the image composition process and the change of the contents of the image process, and detailed description thereof will be omitted. .

図10に示すように、プログラムメモリ72は、画像合成プログラム72aに加えて、特徴量検出プログラム72h、第3の合成処理設定プログラム72i、第3の画像処理設定プログラム72j等を記憶している。   As shown in FIG. 10, the program memory 72 stores a feature amount detection program 72h, a third composition processing setting program 72i, a third image processing setting program 72j, and the like in addition to the image composition program 72a.

特徴量検出プログラム72hは、CPU71の制御下にて、映像信号処理部13に、基準画像内から抽出した特徴点の特徴量(撮影状況関連情報)を検出する処理に係る機能を実現させるためのプログラムである。
即ち、CPU71が特徴量検出プログラム72hを実行することで、基準画像内から抽出した特徴点の広がり具合や均一度合から特徴量を検出する。具体的には、「特徴量小」、「特徴量中」、「特徴量大」の3パターンの特徴量に区分して検出する。
「特徴量大」とは、例えば、特徴点が画像内にて広範囲に略均一に分布している場合であり、「特徴量中」とは、特徴点が画像内にて広範囲に分布しているが、分布が均一でない場合であり、「特徴量小」とは、特徴点が画像内にて広範囲に分布しておらず、且つ、分布も均一でない場合であり、具体的には、特徴となるものがない一様に白い壁や空の画像を撮影した場合に特徴量が小さくなる。
ここで、CPU71と映像信号処理部13は、基準画像内から抽出した特徴点の特徴量を測定する特徴量測定手段として機能する。また、CPU71と映像信号処理部13は、画像の撮影状況に関連した撮影状況関連情報を特定する撮影状況特定手段として機能する。
The feature amount detection program 72h allows the video signal processing unit 13 to realize a function related to processing for detecting feature amounts (shooting situation related information) of feature points extracted from the reference image under the control of the CPU 71. It is a program.
That is, when the CPU 71 executes the feature amount detection program 72h, the feature amount is detected based on the degree of spread and uniformity of feature points extracted from the reference image. Specifically, detection is performed by classifying into three pattern feature amounts of “small feature amount”, “medium feature amount”, and “large feature amount”.
“Large feature amount” means, for example, a case where feature points are distributed almost uniformly over a wide range in the image, and “medium feature amount” means that feature points are distributed over a wide range in the image. However, the distribution is not uniform, and “small feature amount” is a case where the feature points are not distributed over a wide range in the image and the distribution is not uniform. When a uniform white wall or an empty image is photographed with no object, the feature amount becomes small.
Here, the CPU 71 and the video signal processing unit 13 function as a feature amount measuring unit that measures a feature amount of a feature point extracted from the reference image. Further, the CPU 71 and the video signal processing unit 13 function as a shooting situation specifying unit that specifies shooting situation related information related to the shooting situation of an image.

第3の合成処理設定プログラム72iは、CPU71を特徴合成処理設定手段として機能させるものである。即ち、第3の合成処理設定プログラム72iは、特徴量検出処理による特徴量の検出結果に基づいて、第3の合成処理内容設定テーブルT5(図11参照)に従って、映像信号処理部13による画像合成処理の内容を設定する処理に係る機能をCPU71に実現させるためのプログラムである。
具体的には、CPU71が第3の合成処理設定プログラム72iを実行することで、特徴量検出処理により検出された特徴量の大きさに応じて、オプティカルフロー検出部131による特徴点の抽出数、追跡の反復回数及びピラミッドの階層数を変更する。例えば、特徴量検出処理にて、特徴量が「特徴量大」であると検出されると、特徴点の抽出数、追跡の反復回数及びピラミッドの階層数を通常数とし、また、特徴量が「特徴量中」であると検出されると、特徴点の抽出数、追跡の反復回数及びピラミッドの階層数を通常よりも多い数とし、また、特徴量が「特徴量小」であると検出されると、特徴点の抽出数、追跡の反復回数及びピラミッドの階層数を最も多い数(特徴量が「特徴量中」の場合よりも多い数)とする。即ち、最も良好に画像合成が行える状況は、特徴量が画像中の広範囲に均一に分布していて、特徴量も大きい場合である。これに対して、特徴点の特徴量が小さい場合は、類似特徴を持つ画素に誤追跡し、トラッキングが失敗し易いといった問題がある。そこで、特徴量が小さい場合には、特徴点の抽出個数を増やしたり、トラッキングの反復回数を増やしたり、ピラミッドの階層数を増やすなどの処理を追加して、より慎重に画像合成処理を行う必要が生じるためである。
The third synthesis process setting program 72i causes the CPU 71 to function as a feature synthesis process setting unit. That is, the third composition processing setting program 72i performs image composition by the video signal processing unit 13 according to the third composition processing content setting table T5 (see FIG. 11) based on the feature amount detection result by the feature amount detection processing. This is a program for causing the CPU 71 to realize a function related to the process of setting the process content.
Specifically, the CPU 71 executes the third synthesis processing setting program 72i, so that the number of feature points extracted by the optical flow detection unit 131 according to the size of the feature amount detected by the feature amount detection process, Change the number of iterations and the number of pyramid hierarchies. For example, if the feature amount detection process detects that the feature amount is “large feature amount”, the number of feature points extracted, the number of tracking iterations, and the number of hierarchy levels of the pyramid are set to the normal number, and the feature amount is When it is detected that the feature amount is “medium”, the number of feature points extracted, the number of tracking iterations, and the number of hierarchies of the pyramid are set higher than usual, and the feature amount is detected as “small feature amount”. Then, the number of feature points extracted, the number of tracking iterations, and the number of pyramid hierarchies are set to the largest number (a larger number than when the feature amount is “medium in feature amount”). In other words, the situation where the image can be best synthesized is when the feature amount is uniformly distributed over a wide range in the image and the feature amount is large. On the other hand, when the feature amount of the feature point is small, there is a problem that a pixel having a similar feature is mistracked and tracking tends to fail. Therefore, when the feature amount is small, it is necessary to add more processing such as increasing the number of feature points extracted, increasing the number of tracking iterations, or increasing the number of pyramid layers, and perform image synthesis processing more carefully. This is because.

第3の画像処理設定プログラム72jは、CPU71を特徴画像処理設定手段として機能させるものである。即ち、第3の画像処理設定プログラム72jは、特徴量検出処理による特徴量の検出結果に基づいて、第3の画像処理内容設定テーブルT6(図12参照)に従って、映像信号処理部13による合成画像に対する画像処理の内容を設定する処理に係る機能をCPU71に実現させるためのプログラムである。
具体的には、CPU71が第3の画像処理設定プログラム72jを実行することで、特徴量検出処理により検出された特徴量の大きさに応じて、映像信号処理部13による合成画像に対するシャープネス処理の強さを変更する。例えば、特徴量検出処理にて、特徴量が「特徴量大」であると検出されると、シャープネスフィルタの強さを通常のものとし、また、特徴量が「特徴量中」であると検出されると、シャープネスフィルタの強さを通常よりも強いものとし、また、特徴量が「特徴量小」であると検出されると、シャープネスフィルタの強さを最も強い(特徴量が「特徴量中」の場合よりも強い)ものとする。即ち、特徴量が小さくなるほど、トラッキング精度が落ちて撮影画像がぼやっとしてしまう。そこで、特徴量が小さければ小さいほど合成画像に対してかけるシャープネスフィルタを強めるようにすれば、合成精度に応じたシャープネスフィルタをかけることができ、結果的に画像の品質の向上を図ることができるためである。
The third image processing setting program 72j causes the CPU 71 to function as feature image processing setting means. That is, the third image processing setting program 72j, based on the feature amount detection result by the feature amount detection processing, in accordance with the third image processing content setting table T6 (see FIG. 12), the composite image by the video signal processing unit 13. This is a program for causing the CPU 71 to realize a function related to processing for setting the content of image processing for.
Specifically, the CPU 71 executes the third image processing setting program 72j so that the video signal processing unit 13 performs sharpness processing on the synthesized image according to the feature amount detected by the feature amount detection processing. Change strength. For example, if the feature amount detection process detects that the feature amount is “large feature amount”, the strength of the sharpness filter is normal, and the feature amount is detected as “medium feature amount”. The strength of the sharpness filter is made stronger than usual, and if the feature quantity is detected as “small feature quantity”, the strength of the sharpness filter is the strongest (the feature quantity is “feature quantity” Stronger than “medium”). That is, the smaller the feature amount, the lower the tracking accuracy, and the captured image becomes blurred. Therefore, if the sharpness filter to be applied to the composite image is strengthened as the feature amount is small, it is possible to apply the sharpness filter according to the composite accuracy, and as a result, the image quality can be improved. Because.

また、プログラムメモリ72には、第3の合成処理内容設定テーブルT5(図11参照)と、第3の画像処理内容設定テーブルT6(図12参照)が記憶されている。   The program memory 72 stores a third composition processing content setting table T5 (see FIG. 11) and a third image processing content setting table T6 (see FIG. 12).

第3の合成処理内容設定テーブルT5は、図11に示すように、画像合成処理の処理内容(「特徴点の抽出処理」、「追跡の反復処理」、「ピラミッドの階層化処理」)と特徴点の特徴量(「特徴量小」、「特徴量中」、「特徴量大」)とを対応付けて記憶している。具体的には、処理内容として「特徴点の抽出処理」は、「特徴量大」では「通常数」が対応付けられ、「特徴量中」では「通常より多い」が対応付けられ、「特徴量小」では「最も多い」が対応付けられている。また、処理内容として「追跡の反復処理」は、「特徴量大」では「通常数」が対応付けられ、「特徴量中」では「通常より多い」が対応付けられ、「特徴量小」では「最も多い」が対応付けられている。また、処理内容として「ピラミッドの階層化処理」は、「特徴量大」では「通常数」が対応付けられ、「特徴量中」では「通常より多い」が対応付けられ、「特徴量小」では「最も多い」が対応付けられている。   As shown in FIG. 11, the third composition processing content setting table T5 includes image composition processing content ("feature point extraction processing", "tracking iteration processing", "pyramid hierarchization processing") and features. Point feature values (“small feature value”, “medium feature value”, “large feature value”) are stored in association with each other. Specifically, “feature point extraction processing” as processing details is associated with “normal number” for “large feature amount”, “more than normal” for “medium feature amount”, “Small amount” is associated with “most often”. In addition, as the processing content, “tracking repetitive processing” is associated with “normal number” for “large feature amount”, “more than normal” for “medium feature amount”, and “small feature amount” for “medium amount”. “Most” is associated. In addition, “Pyramid hierarchization processing” is associated with “large feature amount” associated with “normal number”, “medium feature amount” associated with “more than normal”, and “small feature amount”. Is associated with “most common”.

第3の画像処理内容設定テーブルT6は、図12に示すように、画像処理の処理内容としての合成画像に対する「シャープネスフィルタの強さ」と特徴点の特徴量(「特徴量小」、「特徴量中」、「特徴量大」)とを対応付けて記憶している。具体的には、「シャープネスフィルタの強さ」は、「特徴量大」では「通常」が対応付けられ、「特徴量中」では「通常より強い」が対応付けられ、「特徴量小」では「最も強い」が対応付けられている。   As shown in FIG. 12, the third image processing content setting table T6 includes “sharpness filter strength” and feature point feature amounts (“feature amount small”, “feature” for the composite image as the image processing content. “Medium” and “large feature”) are stored in association with each other. Specifically, the “strength of the sharpness filter” is associated with “normal” in “large feature amount”, “stronger than normal” in “medium feature amount”, and “small in feature amount”. “The strongest” is associated.

次に、実施形態3の撮像装置300による撮像処理について図13を参照して説明する。
図13は、撮像処理に係る動作の一例を示すフローチャートである。なお、撮像処理に係る動作を開始する時点において、画像処理の処理内容(シャープネスフィルタの強さ)として、特徴量が「特徴量大」であると検出された場合に設定される「通常」がデフォルト設定されているものとする。また、同様に、撮像処理に係る動作を開始する時点において、画像合成処理の処理内容(「特徴点の抽出処理」、「追跡の反復処理」、「ピラミッドの階層化処理」)として、特徴量が「特徴量大」であると検出された場合に設定される「通常数」がデフォルト設定されているものとする。
Next, imaging processing by the imaging apparatus 300 according to the third embodiment will be described with reference to FIG.
FIG. 13 is a flowchart illustrating an example of an operation related to the imaging process. Note that “normal” set when the feature amount is detected as “large feature amount” as the processing content of the image processing (the strength of the sharpness filter) at the time of starting the operation related to the imaging processing. It is assumed that it is set by default. Similarly, at the time of starting the operation related to the imaging process, as the processing contents of the image synthesis process (“feature point extraction process”, “tracking iterative process”, “pyramid hierarchization process”), the feature amount It is assumed that “normal number” that is set when it is detected that “the feature amount is large” is set by default.

図13に示すように、ユーザによるシャッターボタン41aの押圧操作に基づいて撮像部1による被写体の連続した撮影が開始されると(ステップS41)、CPU71は、プログラムメモリ72内の画像合成プログラム72aを実行して、映像信号処理部13のオプティカルフロー検出部131に、基準画像に対してデフォルト設定されている「通常数」のピラミッド階層化処理及びを特徴点の抽出処理を行わせる(ステップS42)。ここで、1枚目の画像を基準画像、2枚目以降の画像を対象画像とした場合は、ステップS41により連続撮影が開始された後、1枚目の画像の撮影が完了した後にステップS42に移行して特徴点抽出処理が行われることになる。   As illustrated in FIG. 13, when continuous shooting of the subject by the imaging unit 1 is started based on the pressing operation of the shutter button 41 a by the user (step S <b> 41), the CPU 71 loads the image composition program 72 a in the program memory 72. Then, the optical flow detection unit 131 of the video signal processing unit 13 performs a “normal number” pyramid hierarchization process and a feature point extraction process that are set as default for the reference image (step S42). . Here, when the first image is the reference image and the second and subsequent images are the target images, after the continuous shooting is started in step S41, the shooting of the first image is completed and then step S42. Then, the feature point extraction process is performed.

次に、CPU71は、抽出された特徴点の数が所定値以上であるか否かを判定する(ステップS43)。ここで、特徴点の数が所定値以上でないと判定されると(ステップS43;NO)、CPU71は、連写撮影された複数枚の画像を合成して一の画像を得る画像合成処理の実行に必要な特徴点が不足していることを表す「特徴点不足」を画像表示部32に表示させた後(ステップS44)、撮像部1により通常の撮影条件で被写体を撮影させる(ステップS45)。   Next, the CPU 71 determines whether or not the number of extracted feature points is equal to or greater than a predetermined value (step S43). Here, if it is determined that the number of feature points is not equal to or greater than the predetermined value (step S43; NO), the CPU 71 executes an image composition process for composing a plurality of continuously shot images to obtain one image. Is displayed on the image display unit 32 (step S44), and then the subject is photographed under normal photographing conditions (step S45). .

一方、ステップS43にて、特徴点の数が所定値以上であると判定されると(ステップS43;YES)、CPU71は、プログラムメモリ72内の特徴量検出プログラム72hを実行して、基準画像内から抽出した特徴点の広がり具合や均一度合から特徴量を検出する(ステップS46;特徴量検出処理)。
続けて、CPU71は、特徴量検出処理の検出結果に応じて、設定されている画像合成処理及び画像処理の内容の再設定を行うか否かの分岐を行い(ステップS47)、「特徴量中」か「特徴量小」と検出されると、CPU71は、プログラムメモリ72内の第3の合成処理設定プログラム72iを実行して、第3の合成処理内容設定テーブルT5に従って映像信号処理部13による画像合成処理の内容を再設定するとともに、プログラムメモリ72内の第3の画像処理設定プログラム72jを実行して、第3の画像処理内容設定テーブルT6に従って映像信号処理部13による画像処理の内容を再設定する(ステップS48)。つまり、画像合成処理の内容としてデフォルト設定されている「通常数」を、「通常より多い」(特徴量中)又は「最も多い」(特徴量小)に変更設定するとともに、画像処理の内容としてデフォルト設定されている「通常」を、「通常より強い」(特徴量中)又は「最も強い」(特徴量小)に変更設定する。
その後、CPU71は、プログラムメモリ72内の画像合成プログラム72aを実行して、映像信号処理部13のオプティカルフロー検出部131に、基準画像に対して、ピラミッド階層化処理を特徴量に応じて再設定された数で行わせ、特徴点の再抽出を特徴量に応じて設定された数で行わせ(ステップS49)、特徴量に応じて設定された数のピラミッド階層化処理及び追跡の反復処理を行わせることにより抽出された特徴点の追跡を行わせる(ステップS50)。
On the other hand, if it is determined in step S43 that the number of feature points is equal to or greater than the predetermined value (step S43; YES), the CPU 71 executes the feature amount detection program 72h in the program memory 72 to execute the reference image in the reference image. The feature amount is detected from the extent and uniformity of the feature points extracted from (step S46; feature amount detection process).
Subsequently, the CPU 71 branches whether or not to reset the set image composition processing and the contents of the image processing in accordance with the detection result of the feature amount detection processing (step S47). Or “small feature amount” is detected, the CPU 71 executes the third synthesis processing setting program 72i in the program memory 72, and the video signal processing unit 13 executes the third synthesis processing content setting table T5. The content of the image composition processing is reset, and the third image processing setting program 72j in the program memory 72 is executed, and the content of the image processing by the video signal processing unit 13 is determined according to the third image processing content setting table T6. Reset (step S48). In other words, the default setting “normal number” as the content of the image composition process is changed to “more than normal” (medium feature amount) or “most” (small feature amount), and the image processing content The default setting “normal” is changed to “stronger than normal” (medium feature amount) or “strongest” (small feature amount).
After that, the CPU 71 executes the image synthesis program 72a in the program memory 72, and resets the pyramid hierarchization processing for the reference image in accordance with the feature amount in the optical flow detection unit 131 of the video signal processing unit 13. The feature points are re-extracted with the number set according to the feature amount (step S49), and the number of pyramid hierarchization processes and tracking iterations set according to the feature amount are performed. The extracted feature points are tracked by performing (step S50).

一方、ステップS47の特徴量検出処理にて「特徴量大」と検出されると、ステップS50に移行して、CPU71は、映像信号処理部13のオプティカルフロー検出部131に、対象画像に対して、デフォルト設定されている「通常数」のピラミッド階層化処理及び追跡の反復処理を行わせることにより抽出された特徴点の追跡を行わせる(ステップS50)。   On the other hand, when “large feature amount” is detected in the feature amount detection process in step S47, the process proceeds to step S50, and the CPU 71 causes the optical flow detection unit 131 of the video signal processing unit 13 to apply the target image. The extracted feature points are tracked by performing the default “normal number” pyramid hierarchization process and the iterative tracking process (step S50).

その後、CPU71は、映像信号処理部13のRANSAC部132に、基準画像と対象画像における複数の特徴点どうしが対応付けられた特徴点対応表に基づいて、射影変換行列Hを算出させ、画像合成部133に、射影変換行列Hを用いて対象画像の画素を基準画像の座標系に射影変換させて当該対象画像と基準画像を合成させる(ステップS51)。   Thereafter, the CPU 71 causes the RANSAC unit 132 of the video signal processing unit 13 to calculate a projective transformation matrix H based on a feature point correspondence table in which a plurality of feature points in the reference image and the target image are associated with each other, and image synthesis is performed. The unit 133 uses the projective transformation matrix H to projectively transform the pixels of the target image into the reference image coordinate system to synthesize the target image and the reference image (step S51).

次に、CPU71は、ユーザによるシャッターボタン41aの押圧操作の解除に基づいて被写体の連続撮影の終了が指示されているか否かを判定する(ステップS52)。ここで、被写体の連続撮影の終了が指示されていると判定されると(ステップS52;YES)、CPU71は、映像信号処理部13に、デフォルト設定されているシャープネスフィルタの強さ、あるいは特徴量に応じて再設定されたシャープネスフィルタの強さで合成画像に対してシャープネス処理を施して(ステップS53)、当該撮像処理を終了する。   Next, the CPU 71 determines whether or not the end of the continuous shooting of the subject is instructed based on the release of the pressing operation of the shutter button 41a by the user (step S52). Here, if it is determined that the end of the continuous shooting of the subject is instructed (step S52; YES), the CPU 71 sets the strength of the sharpness filter set as a default or the feature amount in the video signal processing unit 13. Then, the sharpness processing is performed on the composite image with the strength of the sharpness filter reset according to (step S53), and the imaging processing is terminated.

なお、ステップS52にて、被写体の連続撮影の終了が指示されていないと判定されると(ステップS52;NO)、ステップS50に移行して、入力される複数の画像信号に対して映像信号処理部13によるピラミッド階層化処理及び追跡の反復処理を行わせることにより抽出された特徴点の追跡を行わせる。   If it is determined in step S52 that the end of continuous shooting of the subject has not been instructed (step S52; NO), the process proceeds to step S50, and video signal processing is performed on a plurality of input image signals. The extracted feature points are tracked by causing the unit 13 to perform pyramid hierarchization processing and tracking iterative processing.

以上のように、実施形態3の撮像装置300によれば、画像の撮影状況関連情報として特徴点の特徴量を検出し、特徴量の検出結果に基づいて、画像合成処理における画像合成処理の内容や画像処理における合成画像に対する画像処理の内容を設定することができる。
即ち、特徴量が小さければ小さいほど、特徴点の抽出個数を増やしたり、トラッキングの反復回数を増やしたり、ピラミッドの階層数を増やすなどの処理を追加してより慎重に画像合成処理を行う。また、特徴量が小さければ小さいほど合成画像に対してかけるシャープネスフィルタを強めるようにすれば、合成精度に応じたシャープネスフィルタをかけることができる。さらに、特徴量が小さすぎて基準画像から特徴点が規定個数抽出できない場合には、画像合成が失敗する可能性が非常に高いので、画像合成処理を行わずに、ユーザの立場を考えて「特徴点不足」の報知を行った後、通常の1枚撮影が行われる。
As described above, according to the imaging apparatus 300 of the third embodiment, the feature amount of the feature point is detected as the image capturing state-related information, and the content of the image composition processing in the image composition processing based on the feature amount detection result. It is possible to set the content of image processing for a composite image in image processing.
That is, the smaller the feature amount, the more carefully the image composition processing is performed by adding processing such as increasing the number of extracted feature points, increasing the number of tracking iterations, or increasing the number of pyramid layers. If the sharpness filter applied to the composite image is strengthened as the feature amount is small, it is possible to apply a sharpness filter corresponding to the composite accuracy. Furthermore, if the feature amount is too small to extract a specified number of feature points from the reference image, there is a very high possibility that image composition will fail, so consider the user's position without performing image composition processing. After notifying “insufficient feature points”, normal one-shot shooting is performed.

このように、特徴量の大きさは、画像の精度・品質にかかわる問題が多く発生し、それを解決するためにいくつもの処理を行わなければならないが、それらの処理は特徴量が十分大きい画像を合成する場合は必要とせず、むしろ処理時間の浪費になってしまったり、画像品質を下げてしまう可能性もある。
そこで、連続撮影画像の合成において、それぞれの特徴量に相応しい合成処理や画像処理を行うことで、無駄な処理を行わないことにより処理時間の浪費を抑えて全体的な処理速度の向上を図ることができる。さらに、必要な場合には慎重に合成を行うことで合成成功率の向上及び適切なパラメータを使うことで出力画像の画質の向上を図ることができる。
As described above, there are many problems related to the accuracy and quality of the image, and many processes must be performed in order to solve the problem. This is not necessary when synthesizing images, but rather, processing time may be wasted and image quality may be lowered.
Therefore, in the synthesis of continuously shot images, by performing synthesis processing and image processing appropriate for each feature amount, it is possible to reduce waste of processing time and improve overall processing speed by not performing unnecessary processing. Can do. Further, if necessary, the composition success rate can be improved by carefully combining the images, and the image quality of the output image can be improved by using appropriate parameters.

また、上記実施形態3では、画像合成処理内容の設定にて特徴点の抽出数、追跡の反復回数及びピラミッドの階層数の全ての処理内容を設定するようにしたが、必ずしも全てを設定する必要はなく、特徴点の抽出数、追跡の反復回数及びピラミッドの階層数のうち、少なくとも何れか一の設定を行うようにしても良い。
加えて、設定される画像処理の内容は、シャープネス処理に限られるものではなく、また、設定される画像合成処理の内容は、特徴点の抽出数、追跡の反復回数及びピラミッドの階層数に限られるものではなく、出力画像の画質の向上を図ることができる処理であれば如何なるものであっても良い。
In the third embodiment, all the processing contents of the number of feature points extracted, the number of tracking iterations, and the number of pyramid hierarchies are set in the setting of the image composition processing content. Instead, at least one of the number of feature point extractions, the number of tracking iterations, and the number of pyramid layers may be set.
In addition, the content of image processing that is set is not limited to sharpness processing, and the content of image composition processing that is set is limited to the number of feature points extracted, the number of tracking iterations, and the number of layers of pyramids. Any processing that can improve the image quality of the output image is possible.

なお、本発明は、上記実施形態に限定されることなく、本発明の趣旨を逸脱しない範囲において、種々の改良並びに設計の変更を行っても良い。   The present invention is not limited to the above-described embodiment, and various improvements and design changes may be made without departing from the spirit of the present invention.

また、上記実施形態1〜3にあっては、画像の撮影状況に応じて画像合成処理や画像処理の内容を設定するようにしたが、これに限られるものではなく、例えば、撮影状況関連情報として特定された「明るさ」や「基準画像と対象画像のずれ量の大きさ」や「特徴点の特徴量」に応じて、露光時間や絞りや感度等を変更して撮影した後、画像合成処理を行うようにしても、全体的な処理速度の向上を図ることができるとともに、出力画像の画質の向上を図るができる。   In the first to third embodiments, the contents of the image composition processing and the image processing are set according to the shooting state of the image. However, the present invention is not limited to this. For example, shooting state related information After changing the exposure time, aperture, sensitivity, etc. according to the “brightness”, “reference image and target image deviation amount”, and “feature point feature amount” specified Even if the synthesis process is performed, the overall processing speed can be improved and the image quality of the output image can be improved.

さらに、撮像装置100、200、300の構成は、上記実施形態に例示したものは一例であり、これに限られるものではない。   Furthermore, the configurations of the imaging apparatuses 100, 200, and 300 are merely examples as illustrated in the above-described embodiment, and are not limited thereto.

また、画像合成装置として撮像装置100、200、300を例示したが、これに限られるものではなく、撮像部1により取得した複数の画像をUSB端子6を介して接続されたパソコン等の外部機器に出力して、当該外部機器にて画像合成処理に係る撮影状況特定処理、明るさ検出処理、ずれ量検出処理、特徴量検出処理、低解像度画像作成処理、特徴点抽出処理、特徴点追跡処理、合成処理設定処理、画像処理設定処理等を行うようにしても良い。   In addition, the image capturing apparatuses 100, 200, and 300 are illustrated as the image synthesizing apparatus. However, the present invention is not limited to this. Shooting condition specifying process, brightness detection process, deviation amount detection process, feature amount detection process, low-resolution image creation process, feature point extraction process, feature point tracking process Further, a synthesis process setting process, an image process setting process, and the like may be performed.

加えて、上記実施形態では、撮影状況特定手段、明るさ検出手段、ずれ量検出手段、特徴量検出手段、低解像度画像作成手段、特徴点抽出手段、特徴点追跡手段、合成処理設定手段、明るさ合成処理設定手段、ずれ合成処理設定手段、特徴合成処理設定手段、画像処理設定手段、明るさ画像処理設定手段、ずれ画像処理設定手段、特徴画像処理設定手段としての機能を、CPU71によって所定のプログラム等が実行されることにより実現される構成としたが、これに限られるものではなく、例えば、各種機能を実現するためのロジック回路等から構成しても良い。   In addition, in the above-described embodiment, the shooting situation specifying unit, the brightness detection unit, the deviation amount detection unit, the feature amount detection unit, the low-resolution image creation unit, the feature point extraction unit, the feature point tracking unit, the synthesis processing setting unit, the brightness The CPU 71 has predetermined functions of the image composition processing setting means, the deviation composition processing setting means, the feature composition processing setting means, the image processing setting means, the brightness image processing setting means, the deviation image processing setting means, and the feature image processing setting means. The configuration is realized by executing a program or the like. However, the configuration is not limited to this. For example, the configuration may be configured by a logic circuit or the like for realizing various functions.

100、200、300 撮像装置(画像合成装置)
13 映像信号処理部(画像合成手段、画像処理手段)
131 オプティカルフロー検出部(低解像度画像作成手段、特徴点抽出手段、特徴点追跡手段)
132 RANSAC部
133 画像合成部
71 CPU(撮影状況特定手段、明るさ検出手段、ずれ量検出手段、特徴量検出手段、低解像度画像作成手段、特徴点抽出手段、特徴点追跡手段、合成処理設定手段、明るさ合成処理設定手段、ずれ合成処理設定手段、特徴合成処理設定手段、画像処理設定手段、明るさ画像処理設定手段、ずれ画像処理設定手段、特徴画像処理設定手段)
100, 200, 300 Imaging device (image composition device)
13 Video signal processing unit (image synthesis means, image processing means)
131 Optical flow detection unit (low-resolution image creation means, feature point extraction means, feature point tracking means)
132 RANSAC section 133 Image composition section 71 CPU (shooting condition specifying means, brightness detection means, deviation amount detection means, feature amount detection means, low resolution image creation means, feature point extraction means, feature point tracking means, composition processing setting means Brightness composition processing setting means, deviation composition processing setting means, feature composition processing setting means, image processing setting means, brightness image processing setting means, deviation image processing setting means, feature image processing setting means)

請求項1に記載の発明の画像合成装置は、
複数の画像のうち、何れか一の基準画像と対象画像を合成する画像合成処理を行う合成手段と、
前記基準画像内から抽出した特徴点の特徴量を予め区分された何れかの特徴量として検出する検出手段と、
前記検出手段による検出結果に基づいて、前記合成手段による前記画像合成処理の内容を設定する設定手段と
を備えることを特徴とする。
The image synthesizing device of the invention according to claim 1
Combining means for performing image combining processing for combining any one of the plurality of images with the target image ;
Detecting means for detecting the feature quantity of the feature point extracted from the reference image as any of the feature quantities divided in advance ;
Setting means for setting the content of the image composition processing by the composition means based on the detection result by the detection means;
It is characterized by providing.

請求項に記載の発明のプログラムは、
コンピュータに、
複数の画像のうち、何れか一の基準画像と対象画像を合成する画像合成処理を行う合成機能
前記基準画像内から抽出した特徴点の特徴量を予め区分された何れかの特徴量として検出する検出機能、
前記特徴量の検出結果に基づいて、前記画像合成処理の内容を設定する設定機能
を実現させることを特徴とする。
The program of the invention described in claim 7 is:
On the computer,
A composition function for performing image composition processing for compositing any one of the plurality of images with the target image ;
A detection function for detecting a feature quantity of a feature point extracted from the reference image as any of the feature quantities that have been preliminarily classified;
A setting function for setting the content of the image composition processing based on the detection result of the feature amount
It is characterized by realizing.

Claims (2)

複数の画像のうち、何れか一の基準画像と対象画像を合成する画像合成処理を行う画像合成手段と、
前記画像の撮影の際の明るさを予め区分された何れかの明るさとして検出する検出手段と、
前記検出手段による検出結果に基づいて、前記画像合成手段による前記画像合成処理の内容を設定する合成処理設定手段と、
を備え、
前記画像合成手段は、
前記基準画像内から特徴点を抽出する特徴点抽出手段を含み、
前記合成処理設定手段は、前記検出手段による検出結果として暗いと区分された方のあかるさで検出した場合、前記特徴点抽出手段による前記特徴点の抽出数をより多い数とし、
前記画像合成手段は、
前記複数の画像の解像度を段階的に低減させて低解像度画像を作成する画像作成手段を含み、
前記合成処理設定手段は、前記検出手段による検出結果として暗いと区分された方のあかるさで検出した場合、前記画像作成手段による前記解像度の低減に係る段階数をより多い数とする
ことを特徴とする画像合成装置。
Image combining means for performing image combining processing for combining any one of the plurality of images and the target image;
Detecting means for detecting the brightness at the time of shooting the image as any one of the previously divided brightness;
Based on the detection result by the detection means, composition processing setting means for setting the content of the image composition processing by the image composition means;
With
The image composition means includes
Including feature point extraction means for extracting feature points from the reference image;
When the combination processing setting means detects the brightness that is classified as dark as the detection result by the detection means, the number of feature points extracted by the feature point extraction means is a larger number,
The image composition means includes
Including image creating means for creating a low-resolution image by gradually reducing the resolution of the plurality of images,
The composition processing setting means sets the number of steps related to the reduction of the resolution by the image creating means to a larger number when the detection result by the detection means is detected by the brightness that is classified as dark. An image composition device.
コンピュータに、
複数の画像のうち、何れか一の基準画像と対象画像を合成する画像合成処理を行う合成機能と、
前記画像の撮影の際の明るさを予め区分された何れかの明るさとして検出する検出機能と、
前記検出機能による検出結果に基づいて、前記画像合成処理の内容を設定する設定機能と、
を実現させるためのプログラムであって、
前記合成機能は、
前記基準画像内から特徴点を抽出する抽出機能を含み、
前記設定機能は、前記検出機能による検出結果として暗いと区分された方の明るさで検出した場合、前記抽出機能による前記特徴点の抽出数をより多い数とし、
前記合成機能は、
前記複数の画像の解像度を段階的に低減させて低解像度画像を作成する作成機能を含み、
前記設定機能は、前記検出機能による検出結果として暗いと区分された方の明るさで検出した場合、前記作成機能による前記解像度の低減に係る段階数をより多い数とする
プログラム。
On the computer,
A combining function for performing image combining processing for combining any one of the plurality of images and the target image;
A detection function for detecting the brightness at the time of shooting the image as any one of the pre-divided brightness levels;
A setting function for setting the content of the image composition processing based on the detection result by the detection function;
Is a program for realizing
The synthesis function is
An extraction function for extracting feature points from the reference image;
When the setting function detects a brightness classified as dark as a detection result by the detection function, the number of feature points extracted by the extraction function is set to a larger number,
The synthesis function is
A creation function for creating a low-resolution image by gradually reducing the resolution of the plurality of images;
The setting function is a program for increasing the number of steps related to the reduction of the resolution by the creation function when the brightness is classified as dark as a detection result by the detection function.
JP2012052903A 2012-03-09 2012-03-09 Image composition apparatus and program Expired - Fee Related JP5413625B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012052903A JP5413625B2 (en) 2012-03-09 2012-03-09 Image composition apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012052903A JP5413625B2 (en) 2012-03-09 2012-03-09 Image composition apparatus and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2007340377A Division JP4952574B2 (en) 2007-12-28 2007-12-28 Image composition apparatus and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2013227930A Division JP5910613B2 (en) 2013-11-01 2013-11-01 Image composition apparatus and program

Publications (2)

Publication Number Publication Date
JP2012150826A true JP2012150826A (en) 2012-08-09
JP5413625B2 JP5413625B2 (en) 2014-02-12

Family

ID=46792955

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012052903A Expired - Fee Related JP5413625B2 (en) 2012-03-09 2012-03-09 Image composition apparatus and program

Country Status (1)

Country Link
JP (1) JP5413625B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015100066A (en) * 2013-11-20 2015-05-28 キヤノン株式会社 Imaging apparatus, control method of the same, and program
JP2016041202A (en) * 2014-08-18 2016-03-31 株式会社東芝 Vacuum cleaner and image display method
JP2017090711A (en) * 2015-11-11 2017-05-25 キヤノン株式会社 Image tremor correction device, and control method of the same, program thereof, and recording medium
JPWO2018168228A1 (en) * 2017-03-15 2020-01-23 ソニー株式会社 Image processing apparatus, image processing method, and image processing program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005100407A (en) * 2003-09-24 2005-04-14 Seiko Epson Corp System and method for creating panorama image from two or more source images
JP2007006346A (en) * 2005-06-27 2007-01-11 Casio Comput Co Ltd Image processing apparatus and program
JP2007041752A (en) * 2005-08-02 2007-02-15 Casio Comput Co Ltd Image processor
JP2007048122A (en) * 2005-08-11 2007-02-22 Casio Comput Co Ltd Image processing device and program
JP2007072573A (en) * 2005-09-05 2007-03-22 Casio Comput Co Ltd Image processor and image processing method
JP2007334625A (en) * 2006-06-15 2007-12-27 Sony Corp Image processing method, program of image processing method, recording medium for recording program of image processing method, and image processing apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005100407A (en) * 2003-09-24 2005-04-14 Seiko Epson Corp System and method for creating panorama image from two or more source images
JP2007006346A (en) * 2005-06-27 2007-01-11 Casio Comput Co Ltd Image processing apparatus and program
JP2007041752A (en) * 2005-08-02 2007-02-15 Casio Comput Co Ltd Image processor
JP2007048122A (en) * 2005-08-11 2007-02-22 Casio Comput Co Ltd Image processing device and program
JP2007072573A (en) * 2005-09-05 2007-03-22 Casio Comput Co Ltd Image processor and image processing method
JP2007334625A (en) * 2006-06-15 2007-12-27 Sony Corp Image processing method, program of image processing method, recording medium for recording program of image processing method, and image processing apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015100066A (en) * 2013-11-20 2015-05-28 キヤノン株式会社 Imaging apparatus, control method of the same, and program
JP2016041202A (en) * 2014-08-18 2016-03-31 株式会社東芝 Vacuum cleaner and image display method
JP2017090711A (en) * 2015-11-11 2017-05-25 キヤノン株式会社 Image tremor correction device, and control method of the same, program thereof, and recording medium
JPWO2018168228A1 (en) * 2017-03-15 2020-01-23 ソニー株式会社 Image processing apparatus, image processing method, and image processing program
JP7131541B2 (en) 2017-03-15 2022-09-06 ソニーグループ株式会社 Image processing device, image processing method and image processing program

Also Published As

Publication number Publication date
JP5413625B2 (en) 2014-02-12

Similar Documents

Publication Publication Date Title
JP5574423B2 (en) Imaging apparatus, display control method, and program
WO2016023406A1 (en) Shooting method for motion trace of object, mobile terminal and computer storage medium
JP6512810B2 (en) Image pickup apparatus, control method and program
JP5195660B2 (en) Imaging apparatus, focusing method, and program
JP4952574B2 (en) Image composition apparatus and program
JP5413625B2 (en) Image composition apparatus and program
JP6541501B2 (en) IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD
JP4792929B2 (en) Digital camera
JP5910613B2 (en) Image composition apparatus and program
US20120307130A1 (en) Digital photographing apparatus, auto-focusing method, and computer-readable storage medium for executing the auto-focusing method
JP6196772B2 (en) FOCUS DETECTION DEVICE, FOCUS DETECTION METHOD AND PROGRAM, AND IMAGING DEVICE
JP6056160B2 (en) Automatic focusing device, automatic focusing method and program
JP5397426B2 (en) Imaging apparatus, focusing method, and program
JP5831492B2 (en) Imaging apparatus, display control method, and program
JP6717354B2 (en) Image processing apparatus, image processing method and program
JP2008283477A (en) Image processor, and image processing method
US11832020B2 (en) Image pickup apparatus, image pickup method, and storage medium
JP5614277B2 (en) Camera capable of recording waveforms
US20180124377A1 (en) Image processing apparatus, method for controlling the same, and image capture apparatus
KR20130092213A (en) Digital photographing apparatus and control method thereof
JP2011077850A (en) Image processing apparatus, image processing method, and program
JP2009198956A (en) Imaging apparatus and program
WO2015182021A1 (en) Image pickup control apparatus, image pickup apparatus, and image pickup control method
JP2011135437A (en) Imaging apparatus, image combining method, and program
JP2011075841A (en) Imaging apparatus

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130208

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130305

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130322

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131029

R150 Certificate of patent or registration of utility model

Ref document number: 5413625

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees