JP2009153046A - Blur correcting device and method, and imaging apparatus - Google Patents

Blur correcting device and method, and imaging apparatus Download PDF

Info

Publication number
JP2009153046A
JP2009153046A JP2007330864A JP2007330864A JP2009153046A JP 2009153046 A JP2009153046 A JP 2009153046A JP 2007330864 A JP2007330864 A JP 2007330864A JP 2007330864 A JP2007330864 A JP 2007330864A JP 2009153046 A JP2009153046 A JP 2009153046A
Authority
JP
Japan
Prior art keywords
image
images
correction
exposure
correction target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007330864A
Other languages
Japanese (ja)
Inventor
Haruo Hatanaka
晴雄 畑中
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP2007330864A priority Critical patent/JP2009153046A/en
Publication of JP2009153046A publication Critical patent/JP2009153046A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To apply a blur correction to consecutively taken images inexpensively and highly precisely, and to reduce the increase of required memory capacity caused when correcting blurs of consecutively taken normal-exposure images by using a short-exposure image. <P>SOLUTION: An image sequence to be recorded constituted of (m) normal-exposure images and (n) short-exposure images is consecutively taken in accordance with consecutive photographing instructions and image data thereof are recorded on a recording medium ((m) and (n) are integers). In such a case, a ratio between the number of normal-exposure images and the number of short-exposure images to be taken is set so as to establish m<n. Furthermore, based on a displacement amount (D<SB>A</SB>) between preview images taken before consecutive photographing, the ratio of (n) in (m) is variably set. When the displacement amount is great, the ratio is increased but when the displacement amount is small, the ratio is decreased. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、手ぶれ等に由来する画像のぶれを補正するぶれ補正装置及びぶれ補正方法並びに撮像装置に関する。   The present invention relates to a camera shake correction apparatus, a camera shake correction method, and an imaging apparatus that correct camera shake caused by camera shake or the like.

手ぶれ補正技術は、撮影時における手ぶれを軽減する技術であり、デジタルスチルカメラ等の撮像装置における差別化技術として重要視されている。手ぶれ補正の一種として、手ぶれ検出センサで手ぶれを検出しその検出結果に基づいて補正レンズや撮像素子を駆動する光学式手ぶれ補正がある。   The camera shake correction technique is a technique for reducing camera shake at the time of photographing, and is regarded as important as a differentiation technique in an imaging apparatus such as a digital still camera. As one type of camera shake correction, there is optical camera shake correction in which camera shake is detected by a camera shake detection sensor and a correction lens and an image sensor are driven based on the detection result.

一方において、静止画に対する特殊撮影として、CCD等から成る撮像部に連続的に撮影を行わせる連写撮影(所謂ブラケット撮影を含む)がある。このような連写撮影に光学式手ぶれ補正を適用することも考えられる。しかし、連写撮影回数が多いと連写撮影の開始から終了までのトータルの手ぶれ量が非常に大きくなって、補正レンズや撮像素子の必要駆動量がそれらの可動範囲を超えることがあり、この場合は連写撮影の後半部において手ぶれ補正が全く効かなくなる。また、手ぶれ検出センサの使用自体がコストアップを招いてしまう。   On the other hand, as special shooting for still images, there is continuous shooting (including so-called bracket shooting) in which an imaging unit composed of a CCD or the like continuously performs shooting. It is also conceivable to apply optical camera shake correction to such continuous shooting. However, if the number of continuous shootings is large, the total amount of camera shake from the start to the end of continuous shooting will be very large, and the required drive amount of the correction lens and image sensor may exceed their movable range. In this case, camera shake correction is not effective at the second half of continuous shooting. Further, the use of the camera shake detection sensor itself increases the cost.

他方、手ぶれ検出センサを用いない電子式手ぶれ補正も開発されている。この電子式手ぶれ補正では、撮影によって得られた画像を解析して手ぶれを検出しその検出結果に基づいて手ぶれ補正を行う。   On the other hand, electronic image stabilization that does not use an image stabilization sensor has also been developed. In this electronic camera shake correction, an image obtained by photographing is analyzed to detect camera shake, and camera shake correction is performed based on the detection result.

電子式手ぶれ補正に関する従来手法として、以下のものがある。ある従来手法では、補正されるべき主画像の撮影前後に副画像を複数枚撮影して、その複数の副画像から主画像撮影時のぶれ情報を推定し、そのぶれ情報から主画像のぶれを補正する(例えば、特許文献1参照)。但し、この手法では、主画像前後に得られる副画像間の動き量(露光間隔をも含んだ動き量)から主画像のぶれが推定されるため、ぶれの検出精度が低くなってしまう。   As conventional methods for electronic image stabilization, there are the following methods. In one conventional method, a plurality of sub-images are captured before and after the main image to be corrected, the blur information at the time of main image shooting is estimated from the sub-images, and the blur of the main image is estimated from the blur information. It correct | amends (for example, refer patent document 1). However, in this method, since the blur of the main image is estimated from the amount of motion between the sub-images obtained before and after the main image (the amount of motion including the exposure interval), the detection accuracy of the blur is lowered.

また他の従来手法では、手ぶれ画像を2次元周波数空間へ変換した画像から手ぶれを検出している(例えば、特許文献2参照)。具体的には、変換によって得られた画像を周波数座標の原点を中心とした円に投影し、その投影データからぶれの大きさと方向を求めるようにしている。但し、この手法では、直線的且つ等速的なぶれしか推定できず、また、被写体の特定方向における周波数成分が小さい場合、ぶれ方向の検出を失敗してしまうことがある。   In another conventional method, camera shake is detected from an image obtained by converting a camera shake image into a two-dimensional frequency space (see, for example, Patent Document 2). Specifically, the image obtained by the conversion is projected onto a circle centered on the origin of the frequency coordinate, and the magnitude and direction of the shake are obtained from the projection data. However, with this method, only linear and constant velocity blur can be estimated, and when the frequency component in a specific direction of the subject is small, detection of the blur direction may fail.

尚、1枚の手ぶれ画像から、撮影中の手ぶれを表す手ぶれ情報(点広がり関数或いは画像復元フィルタ)を推定し、その手ぶれ情報と手ぶれ画像からぶれのない復元画像をデジタル信号処理で生成する方式も提案されている。この種の方式の中で、フーリエ反復法を用いた方式が下記非特許文献1に開示されている。図26にフーリエ反復法を実現する構成のブロック図を示す。フーリエ反復法では、復元画像と点広がり関数(Point Spread Function;PSF)の修正を介しつつフーリエ変換と逆フーリエ変換を反復実行することにより、劣化画像から最終的な復元画像を推定する。フーリエ反復法を実行するためには、初期の復元画像(復元画像の初期値)を与えてやる必要があり、初期の復元画像としては、一般的に、ランダム画像または手ぶれ画像としての劣化画像が用いられる。   A method for estimating camera shake information (a point spread function or an image restoration filter) representing a camera shake during shooting from a single camera shake image, and generating a restored image free from the camera shake information and the camera shake image by digital signal processing. Has also been proposed. Among these types of methods, a method using the Fourier iteration method is disclosed in Non-Patent Document 1 below. FIG. 26 shows a block diagram of a configuration for realizing the Fourier iteration method. In the Fourier iteration method, the final restored image is estimated from the degraded image by repeatedly executing Fourier transform and inverse Fourier transform while correcting the restored image and the point spread function (PSF). In order to execute the Fourier iteration method, it is necessary to give an initial restored image (initial value of the restored image). Generally, the initial restored image is a random image or a degraded image as a camera shake image. Used.

特開2001−346093号公報JP 2001-346093 A 特開平11−27574号公報JP-A-11-27574 G. R. Ayers and J. C. Dainty, "Iterative blind deconvolution method and its applications", OPTICS LETTERS, 1988年,Vol.13, No.7, p.547-549G. R. Ayers and J. C. Dainty, "Iterative blind deconvolution method and its applications", OPTICS LETTERS, 1988, Vol. 13, No. 7, p.547-549

手ぶれ検出センサを必要としない電子式手ぶれ補正によれば、光学式手ぶれ補正に比べて低コスト化が図れるが、連写撮影に適したものは未だ提案されていないのが実情である。   Electronic camera shake correction that does not require a camera shake detection sensor can reduce the cost compared to optical camera shake correction, but it has not been proposed yet that is suitable for continuous shooting.

そこで本発明は、連続的に撮影された画像に対するぶれ補正を安価且つ高精度に実現することのできるぶれ補正装置及び撮像装置を提供することを目的とする。   SUMMARY OF THE INVENTION An object of the present invention is to provide a shake correction apparatus and an imaging apparatus that can realize shake correction with respect to continuously shot images at low cost and high accuracy.

本発明に係るぶれ補正装置は、所定の連写撮影指示に従う撮像手段の連続的な撮影によって得られた時系列で並ぶ画像列中に、m枚の第1画像及び前記第1画像の露光時間よりも短い露光時間の撮影によるn枚の第2画像が含まれるように前記撮像手段を制御する撮影制御手段と(但し、m及びnは整数であって且つm>n≧1)、前記m枚の第1画像の中から1枚の第1画像を補正対象画像として抽出する補正対象画像抽出手段と、前記n枚の第2画像の中から1枚の第2画像を参照画像として抽出する参照画像抽出手段と、前記補正対象画像と前記参照画像に基づいて前記補正対象画像のぶれを補正する補正処理手段と、を備えたことを特徴とする。   The blur correction apparatus according to the present invention includes m first images and an exposure time of the first image in an image sequence arranged in time series obtained by continuous shooting by an imaging unit according to a predetermined continuous shooting instruction. Photographing control means for controlling the imaging means so that n second images obtained by photographing with an exposure time shorter than that are included (where m and n are integers and m> n ≧ 1), and m Correction target image extraction means for extracting one first image as a correction target image from among the first images, and one second image from the n second images as a reference image. Reference image extracting means, and correction processing means for correcting blur of the correction target image based on the correction target image and the reference image are provided.

これにより、連続的な撮影によって得られた画像に対するぶれ補正が行われる。手ぶれ検出センサが不要であるため安価にぶれ補正装置を形成できる。また、露光時間が短いことに由来してぶれが少ないと想定される参照画像を用い、参照画像のエッジ状態を目標に補正対象画像を補正することができるため、ぶれ補正の高精度化も見込める。   Thereby, blur correction is performed on an image obtained by continuous shooting. Since a camera shake detection sensor is unnecessary, a camera shake correction device can be formed at low cost. In addition, it is possible to use a reference image that is assumed to have less blur due to the short exposure time, and to correct the correction target image with the edge state of the reference image as a target. .

一方で、手ぶれや被写体の動きの影響を低減するためには、ぶれ補正の目標となる第2画像を各第1画像の直前又は直後に撮影することが望ましい。しかし、第1画像を1枚撮影する度に第2画像を1枚撮影すると、第2画像を撮影しない場合と比べて2倍のメモリ容量が必要となる。また、m枚の第1画像を得るために必要な撮影時間が長くなる。これを考慮し、第2画像の枚数(即ち、n)を第1画像の枚数(即ち、m)よりも小さくする。これにより、必要メモリ容量の増大が抑制されると共にm枚の第1画像を得るための撮影時間の増大が抑制される。   On the other hand, in order to reduce the effects of camera shake and subject movement, it is desirable to photograph the second image that is the target of camera shake correction immediately before or after each first image. However, if one second image is taken each time one first image is taken, twice the memory capacity is required as compared to the case where the second image is not taken. In addition, the photographing time required to obtain m first images is increased. Considering this, the number of second images (ie, n) is made smaller than the number of first images (ie, m). Thereby, an increase in required memory capacity is suppressed, and an increase in photographing time for obtaining m first images is suppressed.

具体的には例えば、前記画像列の撮影前に前記撮像手段から得られた複数の画像間の位置ずれ量を検出する第1位置ずれ検出手段を更に備え、前記撮影制御手段は、第1位置ずれ検出手段の検出結果に基づいて、mに対するnの比を設定する。   Specifically, for example, it further includes first misalignment detection means for detecting misalignment amounts between a plurality of images obtained from the imaging means before photographing the image sequence, and the photographing control means includes a first position Based on the detection result of the deviation detection means, the ratio of n to m is set.

これに代えて例えば、前記m枚の第1画像は、mA枚の第1画像と前記mA枚の第1画像よりも後に撮影されるmB枚の第1画像から形成され(但し、mA及びmBは整数であって、mA≧2、mB≧1、m=mA+mB)、当該ぶれ補正装置は、前記mA枚の第1画像間の位置ずれ量を検出する第1位置ずれ検出手段を更に備え、前記撮影制御手段は、第1位置ずれ検出手段の検出結果に基づいて、mBに対するnの比を設定する。 Alternatively, for example, the m first images are formed from m A first images and m B first images taken after the m A first images (provided that, m A and m B are integers, and m A ≧ 2, m B ≧ 1, m = m A + m B ), and the blur correction device detects the amount of misalignment between the first images of m A sheets. A first misregistration detecting means that sets the ratio of n to m B based on the detection result of the first misregistration detection means.

第1位置ずれ検出手段を用いてmに対するnの比又はmBに対するnの比を設定するようにすれば、高精度のぶれ補正を維持しつつ、必要メモリ容量の増大等を極力抑制することが可能となる。 If the ratio of n to m or the ratio of n to m B is set using the first misregistration detection means, an increase in necessary memory capacity and the like can be suppressed as much as possible while maintaining high-precision blur correction. Is possible.

或いは例えば、前記撮影制御手段は、n=1とし、前記m枚の第1画像の撮影前又は撮影後に1枚だけ第2画像が取得されるように、或いは、n=2とし、前記m枚の第1画像の撮影前と撮影後に1枚ずつ第2画像が取得されるように、前記撮像手段を制御する。   Alternatively, for example, the shooting control unit may set n = 1 so that only one second image is acquired before or after shooting the m first images, or n = 2 and the m images are acquired. The imaging unit is controlled so that the second image is acquired one by one before and after the first image is captured.

これによれば、第2画像の撮影に由来する、第1画像の撮影間隔の増大を回避することができる。   According to this, it is possible to avoid an increase in the shooting interval of the first image resulting from the shooting of the second image.

また具体的には例えば、前記補正対象画像と前記参照画像との間の位置ずれ量を検出する第2位置ずれ検出手段を更に備え、前記補正処理手段は、前記第2位置ずれ検出手段の検出結果を用いた、前記補正対象画像と前記参照画像との間の位置ずれ補正を介して、前記補正対象画像のぶれを補正し、前記第2位置ずれ検出手段は、前記m枚の第1画像及び前記n枚の第2画像を時系列で並べた場合において前記補正対象画像としての前記第1画像と前記参照画像としての前記第2画像との間に他の画像が存在するとき、前記他の画像と前記補正対象画像と前記参照画像とから成る累積対象画像列を特定し、累積対象画像列を形成する時間的に隣接する2枚の画像間の位置ずれ量を夫々に求めて累積することにより前記補正対象画像と前記参照画像との間の前記位置ずれ量を検出する。   More specifically, for example, the image processing apparatus further includes a second misregistration detection unit that detects a misregistration amount between the correction target image and the reference image, and the correction processing unit detects the second misregistration detection unit. Using the result, the blur of the correction target image is corrected through the correction of the misalignment between the correction target image and the reference image, and the second misalignment detection unit is configured to detect the m first images. And when the n second images are arranged in time series, when another image exists between the first image as the correction target image and the second image as the reference image, the other The accumulation target image sequence composed of the image, the correction target image and the reference image is specified, and the amount of positional deviation between two temporally adjacent images forming the accumulation target image sequence is obtained and accumulated. The correction target image and the reference Detecting the positional deviation amount between the images.

これにより、補正対象画像と参照画像との間の位置ずれ量を高精度に求めることが可能となり、結果、高精度のぶれ補正が期待される。   As a result, it is possible to obtain a positional deviation amount between the correction target image and the reference image with high accuracy, and as a result, high-accuracy blur correction is expected.

また例えば、前記m枚の第1画像の画像データを夫々に記録したm個の画像ファイルを記録手段に保存する記録制御手段を更に備え、前記記録制御手段は、前記n枚の第2画像に含まれる1枚の第2画像の画像データを、前記m個の画像ファイルの内の何れか1つにのみ記録する。   Further, for example, it further comprises recording control means for storing in the recording means m image files each recording the image data of the m first images, wherein the recording control means adds the n second images to the n second images. The image data of one included second image is recorded in only one of the m image files.

これにより、第2画像の画像データが重複記録されず、第2画像の記録に由来する必要記録容量の増大が抑制される。   As a result, the image data of the second image is not redundantly recorded, and an increase in the required recording capacity resulting from the recording of the second image is suppressed.

また、本発明に係る撮像装置は、撮影によって画像を表す信号を出力する撮像手段と、前記撮像手段の出力信号を受ける上記ぶれ補正装置と、を備えたことを特徴とする。   According to another aspect of the present invention, there is provided an image pickup apparatus including an image pickup unit that outputs a signal representing an image by shooting, and the shake correction device that receives an output signal of the image pickup unit.

また、本発明に係る他の撮像装置は、撮影によって画像を表す信号を出力する撮像手段と、所定の連写撮影指示を受け付ける指示受付手段と、前記撮像手段の出力信号に基づく画像の画像データを記録する記録手段と、を備え、前記連写撮影指示に従ってm枚の第1画像を前記撮像手段に連続的に撮影させて、前記m枚の第1画像の画像データを前記記録手段に記録させる撮像装置において(但し、mは整数)、前記連写撮影指示に従う連続的な撮影によって得られる時系列で並ぶ画像列中に、前記m枚の第1画像及び前記第1画像の露光時間よりも短い露光時間の撮影によるn枚の第2画像が含まれるように前記撮像手段を制御する撮影制御手段と(但し、nは整数であって且つm>n≧1)、前記画像列の画像データを前記記録手段に記録させる記録制御手段と、前記m枚の第1画像の中から1枚の第1画像を補正対象画像として抽出する補正対象画像抽出手段と、前記n枚の第2画像の中から1枚の第2画像を参照画像として抽出する参照画像抽出手段と、前記補正対象画像と前記参照画像に基づいて前記補正対象画像のぶれを補正する補正処理手段と、を備えたことを特徴とする。   Another imaging apparatus according to the present invention includes an imaging unit that outputs a signal representing an image by shooting, an instruction receiving unit that receives a predetermined continuous shooting instruction, and image data of an image based on an output signal of the imaging unit And recording means for recording m first images according to the continuous shooting instruction, and recording the image data of the m first images in the recording means. In the imaging device (where m is an integer), the exposure time of the m first images and the first image in an image sequence arranged in time series obtained by continuous shooting according to the continuous shooting instruction. An imaging control means for controlling the imaging means so that n second images obtained by imaging with a short exposure time are included (where n is an integer and m> n ≧ 1), and the image of the image sequence Record data in the recording means Recording control means for performing correction, image correction means for extracting one first image from the m first images as a correction target image, and one second image from the n second images. Reference image extraction means for extracting two images as reference images, and correction processing means for correcting blur of the correction target image based on the correction target image and the reference image are provided.

また、本発明に係るぶれ補正方法は、所定の連写撮影指示に従う撮像手段の連続的な撮影によって得られた時系列で並ぶ画像列中に、m枚の第1画像及び前記第1画像の露光時間よりも短い露光時間の撮影によるn枚の第2画像が含まれるように前記撮像手段を制御し(但し、m及びnは整数であって且つm>n≧1)、前記m枚の第1画像の中から1枚の第1画像を補正対象画像として抽出する一方で、前記n枚の第2画像の中から1枚の第2画像を参照画像として抽出し、前記補正対象画像と前記参照画像に基づいて前記補正対象画像のぶれを補正することを特徴とする。   Further, the blur correction method according to the present invention includes the m first images and the first images in the time series arranged in a time series obtained by continuous shooting by the imaging unit according to a predetermined continuous shooting instruction. The imaging means is controlled so that n second images obtained by photographing with an exposure time shorter than the exposure time are included (where m and n are integers and m> n ≧ 1), While extracting one first image from the first image as a correction target image, extracting one second image from the n second images as a reference image, The blur of the correction target image is corrected based on the reference image.

本発明によれば、連続的に撮影された画像に対するぶれ補正を安価且つ高精度に実現することができる。   According to the present invention, it is possible to realize blur correction on continuously captured images with low cost and high accuracy.

本発明の意義ないし効果は、以下に示す実施の形態の説明により更に明らかとなろう。ただし、以下の実施の形態は、あくまでも本発明の一つの実施形態であって、本発明ないし各構成要件の用語の意義は、以下の実施の形態に記載されたものに制限されるものではない。   The significance or effect of the present invention will become more apparent from the following description of embodiments. However, the following embodiment is merely one embodiment of the present invention, and the meaning of the term of the present invention or each constituent element is not limited to that described in the following embodiment. .

以下、本発明の実施の形態につき、図面を参照して具体的に説明する。参照される各図において、同一の部分には同一の符号を付し、同一の部分に関する重複する説明を原則として省略する。後に第1〜第4実施例を説明するが、まず、各実施例に共通する事項又は各実施例にて参照される事項について説明する。   Hereinafter, embodiments of the present invention will be specifically described with reference to the drawings. In each of the drawings to be referred to, the same part is denoted by the same reference numeral, and redundant description regarding the same part is omitted in principle. The first to fourth embodiments will be described later. First, matters that are common to each embodiment or items that are referred to in each embodiment will be described.

図1は、本発明の実施形態に係る撮像装置1の全体ブロック図である。撮像装置1は、静止画を撮影及び記録可能なデジタルスチルカメラ、又は、静止画及び動画を撮影及び記録可能なデジタルビデオカメラである。   FIG. 1 is an overall block diagram of an imaging apparatus 1 according to an embodiment of the present invention. The imaging device 1 is a digital still camera that can capture and record a still image, or a digital video camera that can capture and record a still image and a moving image.

撮像装置1は、撮像部11と、AFE(Analog Front End)12と、主制御部13と、内部メモリ14と、表示部15と、記録媒体16と、操作部17と、を備えている。操作部17には、シャッタボタン17aが備えられている。   The imaging device 1 includes an imaging unit 11, an AFE (Analog Front End) 12, a main control unit 13, an internal memory 14, a display unit 15, a recording medium 16, and an operation unit 17. The operation unit 17 is provided with a shutter button 17a.

図2に、撮像部11の内部構成図を示す。撮像部11は、光学系35と、絞り32と、CCD(Charge Coupled Devices)やCMOS(Complementary Metal Oxide Semiconductor)イメージセンサなどから成る撮像素子33と、光学系35や絞り32を駆動制御するためのドライバ34と、を有している。光学系35は、ズームレンズ30及びフォーカスレンズ31を含む複数枚のレンズから形成される。ズームレンズ30及びフォーカスレンズ31は光軸方向に移動可能である。ドライバ34は、主制御部13からの駆動制御信号に基づいてズームレンズ30及びフォーカスレンズ31の各位置並びに絞り32の開度を駆動制御することにより、撮像部11の焦点距離(画角)及び焦点位置並びに撮像素子33への入射光量を制御する。   FIG. 2 shows an internal configuration diagram of the imaging unit 11. The imaging unit 11 drives and controls the optical system 35, the diaphragm 32, the imaging element 33 including a CCD (Charge Coupled Devices), a CMOS (Complementary Metal Oxide Semiconductor) image sensor, and the like, and the optical system 35 and the diaphragm 32. And a driver 34. The optical system 35 is formed from a plurality of lenses including the zoom lens 30 and the focus lens 31. The zoom lens 30 and the focus lens 31 are movable in the optical axis direction. The driver 34 drives and controls the positions of the zoom lens 30 and the focus lens 31 and the opening degree of the diaphragm 32 based on the drive control signal from the main control unit 13, so that the focal length (angle of view) and the imaging unit 11 are controlled. The focal position and the amount of light incident on the image sensor 33 are controlled.

撮像素子33は、光学系35及び絞り32を介して入射した被写体を表す光学像を光電変換し、該光電変換によって得られた電気信号をAFE12に出力する。より具体的には、撮像素子33は、マトリクス状に二次元配列された複数の受光画素を備え、各撮影において、各受光画素は露光時間に応じた電荷量の信号電荷を蓄える。蓄えた信号電荷の電荷量に比例した大きさを有する各受光画素からのアナログ信号は、撮像装置1内で生成される駆動パルスに従って順次AFE12に出力される。以下の説明における「露光」とは、撮像素子33の露光を意味するものとする。   The image sensor 33 photoelectrically converts an optical image representing a subject incident through the optical system 35 and the diaphragm 32 and outputs an electrical signal obtained by the photoelectric conversion to the AFE 12. More specifically, the image sensor 33 includes a plurality of light receiving pixels arranged two-dimensionally in a matrix, and in each photographing, each light receiving pixel stores a signal charge having a charge amount corresponding to the exposure time. An analog signal from each light receiving pixel having a magnitude proportional to the amount of stored signal charge is sequentially output to the AFE 12 in accordance with a drive pulse generated in the imaging device 1. In the following description, “exposure” means exposure of the image sensor 33.

AFE12は、撮像部11(撮像素子33)から出力されるアナログ信号を増幅し、増幅されたアナログ信号をデジタル信号に変換する。AFE12は、このデジタル信号を、順次、主制御部13に出力する。   The AFE 12 amplifies the analog signal output from the imaging unit 11 (image sensor 33), and converts the amplified analog signal into a digital signal. The AFE 12 sequentially outputs this digital signal to the main control unit 13.

主制御部13は、CPU(Central Processing Unit)、ROM(Read Only Memory)及びRAM(Random Access Memory)等を備え、映像信号処理部として機能する。主制御部13は、AFE12の出力信号に基づいて、撮像部11によって撮影された画像(以下、「撮影画像」ともいう)を表す映像信号を生成する。また、主制御部13は、表示部15の表示内容を制御する表示制御手段としての機能をも備え、表示に必要な制御を表示部15に対して行う。また、主制御部13は、撮像素子33の露光時間を制御するための露光時間制御信号を撮像部11に出力する。   The main control unit 13 includes a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like, and functions as a video signal processing unit. Based on the output signal of the AFE 12, the main control unit 13 generates a video signal representing an image captured by the imaging unit 11 (hereinafter also referred to as “captured image”). The main control unit 13 also has a function as display control means for controlling the display content of the display unit 15, and performs control necessary for display on the display unit 15. The main control unit 13 outputs an exposure time control signal for controlling the exposure time of the image sensor 33 to the imaging unit 11.

内部メモリ14は、SDRAM(Synchronous Dynamic Random Access Memory)等にて形成され、撮像装置1内で生成された各種データを一時的に記憶する。表示部15は、液晶ディスプレイパネル等から成る表示装置であり、主制御部13の制御の下、撮影された画像や記録媒体16に記録されている画像などを表示する。記録媒体16は、SD(Secure Digital)メモリカード等の不揮発性メモリであり、主制御部13による制御の下、撮影画像などを記憶する。   The internal memory 14 is formed by SDRAM (Synchronous Dynamic Random Access Memory) or the like, and temporarily stores various data generated in the imaging device 1. The display unit 15 is a display device including a liquid crystal display panel and the like, and displays a photographed image, an image recorded on the recording medium 16, and the like under the control of the main control unit 13. The recording medium 16 is a non-volatile memory such as an SD (Secure Digital) memory card, and stores captured images and the like under the control of the main control unit 13.

操作部17は、外部からの操作を受け付ける。操作部17に対する操作内容は、主制御部13に伝達される。シャッタボタン17aは、画像の撮影及び記録を指示するためのボタンである。   The operation unit 17 receives an operation from the outside. The content of the operation on the operation unit 17 is transmitted to the main control unit 13. The shutter button 17a is a button for instructing photographing and recording of an image.

シャッタボタン17aは2段階の押下操作が可能に形成されている。撮影者がシャッタボタン17aを軽く押し込むと、シャッタボタン17aは半押しの状態となり、その状態から更にシャッタボタン17aを押し込むとシャッタボタン17aは全押しの状態となる。   The shutter button 17a is formed so that it can be pressed in two stages. When the photographer lightly presses the shutter button 17a, the shutter button 17a is half pressed, and when the shutter button 17a is further pressed from this state, the shutter button 17a is fully pressed.

撮影画像は、手ぶれに起因するぶれを含みうる。主制御部13にはぶれ補正処理を実行するぶれ補正部(ぶれ補正装置)が内在されており、このぶれ補正部は、角速度センサ等の手ぶれ検出センサを用いることなく、撮像部11の出力信号から得られる画像データに基づいて撮影画像のぶれを補正する機能を備える。以下、ぶれ補正部によってぶれが補正されるべき撮影画像を、特に「補正対象画像」と呼び、そのぶれの補正後の画像を「ぶれ補正画像」と呼ぶ。   The photographed image can include a camera shake caused by camera shake. The main control unit 13 includes a shake correction unit (blur correction device) that performs a shake correction process. The shake correction unit outputs an output signal of the imaging unit 11 without using a camera shake detection sensor such as an angular velocity sensor. Provided with a function of correcting blurring of a captured image based on image data obtained from. Hereinafter, a captured image whose shake is to be corrected by the blur correction unit is particularly referred to as a “correction target image”, and an image after the blur correction is referred to as a “blur correction image”.

撮像装置1の動作モードには、静止画または動画の撮影及び記録が可能な撮影モードと、記録媒体16に記録された静止画または動画を表示部15に再生表示する再生モードと、が含まれる。操作部17に対する操作に応じて、各モード間の遷移は実施される。   The operation mode of the imaging device 1 includes a shooting mode capable of shooting and recording a still image or a moving image, and a reproduction mode for reproducing and displaying the still image or moving image recorded on the recording medium 16 on the display unit 15. . Transition between the modes is performed according to the operation on the operation unit 17.

撮影モードにおいて、ユーザが撮像装置1に連写撮影指示を与えると、記録媒体16に記録されるべき時系列で並ぶ撮影画像列が連写撮影によって得られる。この撮影画像列を、以下「被記録画像列」と呼ぶ。連写撮影指示は、シャッタボタン17aに対する所定操作によって撮像装置1に与えられるものとする。被記録画像列は時系列で並ぶ複数の撮影画像から成り、その複数の撮影画像の中に補正対象画像となるべき撮影画像が含まれる。尚、勿論、操作部17に対する所定操作によって撮像装置1に単写撮影指示を与えることも可能であり、単写撮影指示が与えられると、1枚の撮影画像が取得されて記録媒体16に記録される。以下の説明では、シャッタボタン17aの押下操作によって連写撮影指示が撮像装置1に与えられるものとする。   When the user gives a continuous shooting instruction to the imaging apparatus 1 in the shooting mode, a sequence of captured images arranged in time series to be recorded on the recording medium 16 is obtained by continuous shooting. This captured image sequence is hereinafter referred to as a “recorded image sequence”. The continuous shooting instruction is given to the imaging apparatus 1 by a predetermined operation on the shutter button 17a. The recorded image sequence is composed of a plurality of photographed images arranged in time series, and a photographed image to be a correction target image is included in the plurality of photographed images. Of course, it is also possible to give a single shooting instruction to the imaging apparatus 1 by a predetermined operation on the operation unit 17, and when a single shooting instruction is given, one shot image is acquired and recorded in the recording medium 16. Is done. In the following description, it is assumed that a continuous shooting instruction is given to the imaging apparatus 1 by an operation of pressing the shutter button 17a.

連写撮影指示又は単写撮影指示の有無に拘らず、撮影モードにおいて、撮像部11は所定のフレーム周期(例えば、1/60秒)にて順次撮影を行っており、この撮影によって得られた被記録画像列以外の各撮影画像を、プレビュー画像と呼ぶ。次々と得られるプレビュー画像は、順次、表示部15上で更新表示される。   Regardless of whether there is a continuous shooting instruction or a single shooting instruction, in the shooting mode, the imaging unit 11 sequentially performs shooting at a predetermined frame period (for example, 1/60 seconds), and the shooting is obtained. Each captured image other than the recorded image sequence is referred to as a preview image. The preview images obtained one after another are sequentially updated and displayed on the display unit 15.

図3に、撮影モードにおける、プレビュー画像の撮影期間と被記録画像列の撮影期間との時間的関係を示す。順次撮影によってプレビュー画像列を取得している状態において、連写撮影指示が与えられると被記録画像列の撮影が行われ、被記録画像列の撮影が終わると、再度、プレビュー画像列が撮影される状態に移行する。   FIG. 3 shows a temporal relationship between the shooting period of the preview image and the shooting period of the recorded image sequence in the shooting mode. In a state where the preview image sequence is acquired by sequential shooting, when a continuous shooting instruction is given, the recorded image sequence is captured, and when the recorded image sequence is captured, the preview image sequence is captured again. Transition to the state.

以下、撮像装置1の動作を詳細に説明する実施例として、第1〜第4実施例を説明する。或る実施例に記載した事項は、矛盾なき限り、他の実施例にも適用可能である。   Hereinafter, first to fourth examples will be described as examples for explaining the operation of the imaging apparatus 1 in detail. The matters described in one embodiment can be applied to other embodiments as long as no contradiction arises.

<<第1実施例>>
まず、第1実施例について説明する。図4及び図5を参照する。図4は、第1実施例に係る、撮像装置1の一部ブロック図である。図4の符号51〜57によって参照される各部位は、主制御部13に含まれるぶれ補正部(図1参照)内に設けられる。
<< First Example >>
First, the first embodiment will be described. Please refer to FIG. 4 and FIG. FIG. 4 is a partial block diagram of the imaging apparatus 1 according to the first embodiment. 4 are provided in a shake correction unit (see FIG. 1) included in the main control unit 13.

[撮影時の動作]
まず、撮影時の動作について説明する。図5は、第1実施例に係り、撮影モードにおける撮像装置1の撮影動作の流れを表すフローチャートである。撮影動作時には、図4の第1位置ずれ検出部51、撮影制御部52及び記録制御部53が有意に機能する。
[Operation when shooting]
First, the operation during shooting will be described. FIG. 5 is a flowchart illustrating the flow of the shooting operation of the image pickup apparatus 1 in the shooting mode according to the first embodiment. During the shooting operation, the first misalignment detection unit 51, the shooting control unit 52, and the recording control unit 53 in FIG. 4 function significantly.

まず、ステップS11において、主制御部13は、シャッタボタン17aが半押しの状態となっているか否かを確認する。それが半押しの状態となっているとステップS11からステップS12に移行し、その後、シャッタボタン17aが全押しの状態となるまでに得られる複数のプレビュー画像を参照して、プレビュー画像間の位置ずれ量DAが算出される。シャッタボタン17aが半押しの状態となってから、それが全押しの状態となるまでの期間を「撮影準備期間」と呼ぶ。本例において、シャッタボタン17aを全押しの状態とする操作は連写撮影指示に相当する。尚、撮影準備期間中において公知のオートフォーカス制御がなされ、撮像素子33上に被写体の光学像を結像するようにフォーカスレンズ31の位置が駆動制御される(図2参照)。 First, in step S11, the main control unit 13 confirms whether or not the shutter button 17a is in a half-pressed state. If it is in the half-pressed state, the process proceeds from step S11 to step S12, and then the positions between the preview images are referred to with reference to a plurality of preview images obtained until the shutter button 17a is fully pressed. A deviation amount D A is calculated. A period from when the shutter button 17a is half-pressed to when it is fully pressed is referred to as a “shooting preparation period”. In this example, the operation of fully pressing the shutter button 17a corresponds to a continuous shooting instruction. Note that known autofocus control is performed during the shooting preparation period, and the position of the focus lens 31 is driven and controlled so as to form an optical image of the subject on the image sensor 33 (see FIG. 2).

第1位置ずれ検出部51には、順次取得される各撮影画像の画像データが与えられる。第1実施例において、第1位置ずれ検出部51は、撮影準備期間中に得られる、時間的に隣接するプレビュー画像間の位置ずれ量を求めることによって、位置ずれ量DAを算出する。位置ずれ量は、水平成分と垂直成分を含む二次元のベクトル量であり、動き量、動きベクトル又はオプティカルフローとも呼ばれる(位置ずれ量DA以外の、後述する各位置ずれ量についても同様)。 The first misalignment detection unit 51 is provided with image data of each captured image that is sequentially acquired. In a first embodiment, the first displacement detection unit 51 is obtained during the shooting preparation time, by obtaining the positional displacement amount between the preview images that are temporally adjacent to calculate a position deviation amount D A. The displacement amount is a two-dimensional vector amount including a horizontal component and a vertical component, and is also referred to as a motion amount, a motion vector, or an optical flow (the same applies to each displacement amount described later other than the displacement amount D A ).

例えば、図6に示す如く、撮影準備期間中に10枚のプレビュー画像P1、P2、・・・P8、P9及びP10がこの順番で撮影され、プレビュー画像P10が得られた直後にシャッタボタン17aが全押しの状態となって、プレビュー画像P10の次には被記録画像列を形成する1枚目の撮影画像の露光が行われる場合を考える。 For example, as shown in FIG. 6, ten preview images P 1 , P 2 ,... P 8 , P 9 and P 10 were taken in this order during the shooting preparation period, and a preview image P 10 was obtained. immediately after becoming shutter button 17a is fully pressed state, the next preview image P 10 consider the case where exposure for the first captured image to form a recording image sequence is performed.

この場合、第1位置ずれ検出部51は、位置ずれ検出方法を用いて、時間的に隣接するプレビュー画像Piとプレビュー画像Pi+1との間の位置ずれ量を算出する(ここで、iは1以上9以下の整数)。位置ずれ検出方法には、公知の代表点マッチング法、ブロックマッチング法、勾配法が含まれる。そして、例えば、被記録画像列の撮影期間の直前に得られた2枚のプレビュー画像間の位置ずれ量、即ち、プレビュー画像P9とプレビュー画像P10との間の位置ずれ量を位置ずれ量DAとする。或いは、3枚以上のプレビュー画像に基づく複数の位置ずれ量から位置ずれ量DAを求めるようにしてもよい。例えば、プレビュー画像P8とプレビュー画像P9との間の位置ずれ量とプレビュー画像P9とプレビュー画像P10との間の位置ずれ量との平均を位置ずれ量DAとして求めても構わない。 In this case, the first misregistration detection unit 51 calculates the misregistration amount between the preview image P i and the preview image P i + 1 that are temporally adjacent by using the misregistration detection method (where, i is an integer from 1 to 9. The displacement detection method includes a known representative point matching method, block matching method, and gradient method. For example, the amount of positional deviation between two preview images obtained immediately before the recording period of the recorded image sequence, that is, the amount of positional deviation between the preview image P 9 and the preview image P 10 is calculated as the amount of positional deviation. Let D A. Alternatively, the displacement amount D A may be obtained from a plurality of displacement amounts based on three or more preview images. For example, the average of the positional deviation amount between the preview image P 8 and the preview image P 9 and the positional deviation amount between the preview image P 9 and the preview image P 10 may be obtained as the positional deviation amount D A. .

プレビュー画像間の位置ずれ量の算出と並行し、ステップS13において、主制御部13は、シャッタボタン17aが半押しの状態から全押しの状態に遷移したか否かを確認する。全押しの状態への遷移が確認されると、ステップS14に移行する。尚、図5では、この遷移の確認前に位置ずれ量DAが算出されるかのように図示されているが、実際には、この遷移が確認された後に位置ずれ量DAが決定される。尚、位置ずれ量DAは、画素を単位として算出される。 In parallel with the calculation of the amount of positional deviation between the preview images, in step S13, the main control unit 13 checks whether or not the shutter button 17a has transitioned from the half-pressed state to the fully-pressed state. When the transition to the fully pressed state is confirmed, the process proceeds to step S14. In FIG. 5, the positional deviation amount D A is shown as if it was calculated before confirmation of this transition, but actually, the positional deviation amount D A is determined after this transition is confirmed. The The misregistration amount D A is calculated in units of pixels.

ステップS14において、撮影制御部52は、位置ずれ量DAに基づいて被記録画像列の撮影パターンを決定する。被記録画像列は、m枚の通常露光画像とn枚の短露光画像から形成される。被記録画像列の撮影パターンとは通常露光画像と短露光画像の撮影パターンとも言い換えられる。ここで、mは2以上の整数であり、nは1以上の整数であり、更に、不等式「m>n」が成立する。mの値は、例えば操作部17に対するユーザの操作に従って決定される。通常露光画像とは、後述の適正な露光時間TEPによる露光によって得られた撮影画像を意味する。一方、短露光画像は、通常露光画像の露光時間よりも短い露光時間にて得られた撮影画像を意味する。 In step S <b> 14, the shooting control unit 52 determines the shooting pattern of the recorded image sequence based on the positional deviation amount D A. The recorded image sequence is formed from m normal exposure images and n short exposure images. The shooting pattern of the recorded image sequence is also referred to as a shooting pattern of a normal exposure image and a short exposure image. Here, m is an integer of 2 or more, n is an integer of 1 or more, and the inequality “m> n” holds. The value of m is determined according to a user operation on the operation unit 17, for example. The normal exposure image means a photographed image obtained by exposure with appropriate exposure time T EP later. On the other hand, a short exposure image means a captured image obtained with an exposure time shorter than the exposure time of a normal exposure image.

以下、通常露光画像を得るための撮影を「通常露光撮影」と、短露光画像を得るための撮影を「短露光撮影」と呼ぶことがある。また、通常露光画像を表す画像データを「通常露光画像データ」と、短露光画像を表す画像データを「短露光画像データ」と呼ぶことがある。尚、本明細書では、或る画像の画像データに対して何らかの処理(記録、保存、読み出し等)を行うことを説明する文章において、記述の簡略化上、画像データの記述を省略することがある。例えば、通常露光画像の画像データの記録と、通常露光画像の記録は同義である。   Hereinafter, photographing for obtaining a normal exposure image is sometimes referred to as “normal exposure photographing”, and photographing for obtaining a short exposure image is sometimes referred to as “short exposure photographing”. In addition, image data representing a normal exposure image may be referred to as “normal exposure image data”, and image data representing a short exposure image may be referred to as “short exposure image data”. In this specification, description of image data may be omitted for simplification of description in a sentence explaining that some processing (recording, saving, reading, etc.) is performed on image data of a certain image. is there. For example, recording of image data of a normal exposure image is synonymous with recording of a normal exposure image.

具体的にはステップS14において、撮影制御部52は、位置ずれ量DAに基づいて、通常露光画像と短露光画像の撮影枚数割合、即ち、mとnの比を決定する。 Specifically, in step S14, the shooting control unit 52 determines the ratio of the number of shots of the normal exposure image and the short exposure image, that is, the ratio of m and n, based on the positional deviation amount D A.

m=6である場合を想定して具体例を挙げる。以下の説明では、特に断りなき限り、m=6である場合を想定する。   A specific example will be given assuming that m = 6. In the following description, a case where m = 6 is assumed unless otherwise specified.

位置ずれ量DAの大きさが20画素以上である場合は、1枚の通常露光画像と1枚の短露光画像を交互に撮影する。但し、被記録画像列の内、最後に得られる撮影画像は通常露光画像であるとする。このため、6枚の通常露光画像A1〜A6と5枚の短露光画像B1〜B5とから成る被記録画像列が得られる。より具体的には、図7(a)に示す如く、画像A1、B1、A2、B2、A3、B3、A4、B4、A5、B5及びA6の順番で連写撮影がなされる。この連写撮影に対応する撮影パターンを、以下「第1撮影パターン」と呼ぶ。 When the amount of displacement D A is 20 pixels or more, one normal exposure image and one short exposure image are alternately photographed. However, it is assumed that the last captured image in the recorded image sequence is a normal exposure image. Therefore, the recording image sequence consisting of six normal exposure image A 1 to A 6 and five short-exposure image B 1 .about.B 5 Metropolitan is obtained. More specifically, as shown in FIG. 7A, the order of images A 1 , B 1 , A 2 , B 2 , A 3 , B 3 , A 4 , B 4 , A 5 , B 5 and A 6 . The continuous shooting is done. The shooting pattern corresponding to this continuous shooting is hereinafter referred to as a “first shooting pattern”.

位置ずれ量DAの大きさが10画素以上であって且つ20画素未満である場合は、2枚の通常露光画像の撮影後に1枚の短露光画像を撮影するという撮影動作を繰り返す。但し、被記録画像列の内、最後に得られる撮影画像は通常露光画像であるとする。このため、6枚の通常露光画像A1〜A6と2枚の短露光画像B1及びB2とから成る被記録画像列が得られる。より具体的には、図7(b)に示す如く、画像A1、A2、B1、A3、A4、B2、A5及びA6の順番で連写撮影がなされる。この連写撮影に対応する撮影パターンを、以下「第2撮影パターン」と呼ぶ。 If the magnitude of the positional deviation amount D A is less than and 20 pixels was 10 pixels or more repeats the imaging operation of taking a single short-exposure image after the two normal exposure image capturing. However, it is assumed that the last captured image in the recorded image sequence is a normal exposure image. For this reason, a recorded image sequence composed of six normal exposure images A 1 to A 6 and two short exposure images B 1 and B 2 is obtained. More specifically, as shown in FIG. 7B, continuous shooting is performed in the order of images A 1 , A 2 , B 1 , A 3 , A 4 , B 2 , A 5 and A 6 . The shooting pattern corresponding to the continuous shooting is hereinafter referred to as a “second shooting pattern”.

位置ずれ量DAの大きさが10画素未満である場合は、3枚の通常露光画像の撮影後に1枚の短露光画像を撮影するという撮影動作を繰り返す。但し、被記録画像列の内、最後に得られる撮影画像は通常露光画像であるとする。このため、6枚の通常露光画像A1〜A6と1枚の短露光画像B1とから成る被記録画像列が得られる。より具体的には、図7(c)に示す如く、画像A1、A2、A3、B1、A4、A5及びA6の順番で連写撮影がなされる。この連写撮影に対応する撮影パターンを、以下「第3撮影パターン」と呼ぶ。 When the amount of misregistration D A is less than 10 pixels, the photographing operation of photographing one short exposure image after photographing three normal exposure images is repeated. However, it is assumed that the last captured image in the recorded image sequence is a normal exposure image. Therefore, a recorded image sequence composed of six normal exposure images A 1 to A 6 and one short exposure image B 1 is obtained. More specifically, as shown in FIG. 7C, continuous shooting is performed in the order of images A 1 , A 2 , A 3 , B 1 , A 4 , A 5 and A 6 . The shooting pattern corresponding to this continuous shooting is hereinafter referred to as a “third shooting pattern”.

尚、図7(a)〜(c)では、画像の明るさを濃淡によって表現している。短露光画像の露光時間は短いため、短露光画像の明るさ(輝度レベル)は、通常露光画像のそれよりも低い。通常露光撮影時と短露光撮影時との間で、絞り32の開度及びAFE12における信号増幅度は同じであるとする(但し、それらを異ならせることも可能である)。   In FIGS. 7A to 7C, the brightness of the image is expressed by shading. Since the exposure time of the short exposure image is short, the brightness (luminance level) of the short exposure image is lower than that of the normal exposure image. It is assumed that the aperture of the diaphragm 32 and the signal amplification degree in the AFE 12 are the same between the normal exposure photography and the short exposure photography (however, they can be different).

このように、撮影制御部52は、位置ずれ量DAに基づいて、被記録画像列に含めるべき通常露光画像の枚数と短露光画像の枚数との比を決定し、通常露光画像と短露光画像の撮影順序を上述の如く定める。 In this way, the imaging control unit 52 determines the ratio between the number of normal exposure images and the number of short exposure images to be included in the recorded image sequence based on the positional deviation amount D A , so that the normal exposure image and the short exposure are determined. The image capturing order is determined as described above.

上述の具体例では、mが6であるが故に、位置ずれ量DAの大きさが20画素以上である場合はm:n=6:5となり、位置ずれ量DAの大きさが10画素以上であって且つ20画素未満である場合はm:n=3:1となり、位置ずれ量DAの大きさが10画素未満である場合はm:n=6:1となっているが、mを十分に大きくすると、位置ずれ量DAの大きさが20画素以上である場合における比m:nは1:1に収束してゆき、位置ずれ量DAの大きさが10画素以上であって且つ20画素未満である場合における比m:nは2:1に収束してゆき、位置ずれ量DAの大きさが10画素未満である場合における比m:nは3:1に収束してゆく。 In the above specific example, since m is 6, when the displacement amount D A is 20 pixels or more, m: n = 6: 5, and the displacement amount D A is 10 pixels. When the above is less than 20 pixels, m: n = 3: 1, and when the displacement D A is less than 10 pixels, m: n = 6: 1. When m is sufficiently large, the ratio m: n converges to 1: 1 when the displacement amount D A is 20 pixels or more, and the displacement amount D A is 10 pixels or more. The ratio m: n converges to 2: 1 in the case of less than 20 pixels, and the ratio m: n converges to 3: 1 in the case where the amount of displacement D A is less than 10 pixels. I will do it.

ステップS14に続くステップS15において、撮影制御部52は、被写体の明るさを測定する測光回路(不図示)から得られた明るさ情報に基づき、撮像素子33の露光量が適正となる露光時間TEPを算出する。 In step S15 following step S14, the imaging control unit 52 performs an exposure time T at which the exposure amount of the image sensor 33 is appropriate based on brightness information obtained from a photometric circuit (not shown) that measures the brightness of the subject. Calculate EP .

続くステップS16において、露光時間TEPと閾値時間TTHとを比較し、露光時間TEPが閾値時間TTHよりも短い場合、通所露光画像に手ぶれに由来するぶれは含まれない(或いは極めて軽微である)とみなして、後述のステップS17に移行することなく、通常連写撮影を実行する。通常連写撮影では、被記録画像列にm枚の通常露光画像のみが含まれるように撮像部11が制御される。閾値時間TTHとしては、例えば、手ぶれ限界露光時間を用いる。手ぶれ限界露光時間は、手ぶれが無視できると判断される限界露光時間であり、撮像部11の焦点距離fDの逆数から算出される。 In the following step S16, is compared with the exposure time T EP and the threshold time T TH, if the exposure time T EP is shorter than the threshold time T TH, blur from camera shake Outpatient exposure image is not included (or an extremely small Therefore, normal continuous shooting is executed without proceeding to step S17 to be described later. In normal continuous shooting, the imaging unit 11 is controlled so that only m normal exposure images are included in the recorded image sequence. As the threshold time T TH , for example, a camera shake limit exposure time is used. The camera shake limit exposure time is a limit exposure time at which camera shake is determined to be negligible, and is calculated from the reciprocal of the focal length f D of the imaging unit 11.

一方、露光時間TEPが閾値時間TTHよりも長い場合はステップS17に移行する。ステップS17において、撮影制御部52は、ステップS14にて決定した撮影パターンにてm枚の通常露光画像及びn枚の短露光画像が連写撮影されるように、露光時間制御信号を生成して撮像部11による撮影動作を制御する。各通常露光画像の露光時間は露光時間TEPとされ、各短露光画像の露光時間は、例えば、TEP/4とされる。 On the other hand, when the exposure time T EP is longer than a threshold time T TH proceeds to step S17. In step S17, the shooting control unit 52 generates an exposure time control signal so that m normal exposure images and n short exposure images are continuously shot with the shooting pattern determined in step S14. The imaging operation by the imaging unit 11 is controlled. The exposure time of each normal exposure image is the exposure time TEP, and the exposure time of each short exposure image is, for example, TEP / 4.

各通常露光画像の露光時間は比較的長いため、各通常露光画像には手ぶれ等に由来するぶれが含まれる可能性が高いが、各短露光画像の露光時間は比較的短いため、各短露光画像には手ぶれ等に由来するぶれが殆ど含まれない。   Since each normal exposure image has a relatively long exposure time, each normal exposure image is likely to contain camera shake. However, each short exposure image has a relatively short exposure time. The image contains almost no blurring caused by camera shake or the like.

ステップS17の連写撮影によって得られた各通常露光画像データ及び各短露光画像データは、図4の記録制御部53に送られる。ステップS18において、記録制御部53は、これらの画像データを記録媒体16に記録するための記録制御を行う。尚、被記録画像列の連写撮影が完了してから記録制御を行うことも可能であるし、ステップS17の連写撮影とステップS18の記録制御を並行して行うことも可能である。   Each normal exposure image data and each short exposure image data obtained by the continuous shooting in step S17 is sent to the recording control unit 53 in FIG. In step S <b> 18, the recording control unit 53 performs recording control for recording these image data on the recording medium 16. The recording control can be performed after the continuous shooting of the recorded image sequence is completed, or the continuous shooting in step S17 and the recording control in step S18 can be performed in parallel.

ステップS18の記録制御において、記録制御部53は、通常露光画像データを記録するための画像ファイルを作成する。例えば、Exif(Exchangeable image file format)のファイルフォーマットに準拠するように画像ファイルを作成する。図8に、1つの画像ファイルの構造を示す。画像ファイルは、本体領域とヘッダ領域から形成されている。Exifのファイルフォーマットに準拠する場合、ヘッダ領域はExifタグ又はExif領域とも呼ばれる。   In the recording control in step S18, the recording control unit 53 creates an image file for recording the normal exposure image data. For example, an image file is created so as to comply with the file format of Exif (Exchangeable image file format). FIG. 8 shows the structure of one image file. The image file is formed of a main body area and a header area. When conforming to the Exif file format, the header area is also referred to as an Exif tag or an Exif area.

説明の具体化のため、図7(b)に対応する第2撮影パターンによって連写撮影がなされた場合を例にとり、ステップS18の記録制御にて作成される画像ファイル群を説明する。図9は、この画像ファイル群のデータ構造の模式図である。第2撮影パターンによって連写撮影がなされた場合、6つの画像ファイルFI1〜FI6が作成されて記録媒体16に保存される。画像ファイルFI1〜FI6の本体領域には、夫々、通常露光画像A1〜A6の画像データが記録される。 For the sake of specific description, an example of a case in which continuous shooting is performed with the second shooting pattern corresponding to FIG. 7B will be described, and an image file group created by the recording control in step S18 will be described. FIG. 9 is a schematic diagram of the data structure of the image file group. When continuous shooting is performed according to the second shooting pattern, six image files FI 1 to FI 6 are created and stored in the recording medium 16. Image data of normal exposure images A 1 to A 6 are recorded in the main body regions of the image files FI 1 to FI 6 , respectively.

一方、短露光画像の画像データを記録するための専用の画像ファイルは作成されない。或る短露光画像の画像データは、その短露光画像の直前の撮影によって得られた通常露光画像が記録されるべき画像ファイルのヘッダ領域に記録される。従って、図9に示す如く、短露光画像B1の画像データは画像ファイルFI2のヘッダ領域に記録され、短露光画像B2の画像データは画像ファイルFI4のヘッダ領域に記録される。また、短露光画像データが記録されない画像ファイルのヘッダ領域には、その画像ファイルの本体領域に記録される通常露光画像の撮影時点を基準として時間的に最も近接して撮影された短露光画像が記録される画像ファイル名だけを記録する。従って、画像ファイルFI1及びFI3のヘッダ領域には画像ファイルFI2の画像ファイル名だけが記録され、画像ファイルFI5及びFI6のヘッダ領域には画像ファイルFI4の画像ファイル名だけが記録されることになり、画像ファイルFI1、FI3、FI5及びFI6のヘッダ領域には、短露光画像データが記録されない。但し、各画像ファイルのヘッダ領域には、画像データ又は画像ファイル名以外の付加データ(撮影日時や撮影時の焦点距離など)も記録される。また、通常露光画像又は短露光画像の画像データを画像ファイルに記録する際、JPEG(Joint Photographic Experts Group)等の圧縮方式を用いて画像データは圧縮される。 On the other hand, a dedicated image file for recording image data of a short exposure image is not created. Image data of a certain short exposure image is recorded in a header area of an image file in which a normal exposure image obtained by photographing immediately before the short exposure image is to be recorded. Therefore, as shown in FIG. 9, the image data of the short exposure image B 1 is recorded in the header area of the image file FI 2 , and the image data of the short exposure image B 2 is recorded in the header area of the image file FI 4 . In addition, in the header area of an image file in which short-exposure image data is not recorded, a short-exposure image photographed closest in time with respect to the photographing point of the normal exposure image recorded in the main body area of the image file. Records only the name of the recorded image file. Accordingly, only the image file name of the image file FI 2 is recorded in the header areas of the image files FI 1 and FI 3 , and only the image file name of the image file FI 4 is recorded in the header areas of the image files FI 5 and FI 6. Accordingly, the short exposure image data is not recorded in the header areas of the image files FI 1 , FI 3 , FI 5 and FI 6 . However, in the header area of each image file, additional data other than the image data or image file name (shooting date and time, focal length at the time of shooting, etc.) is also recorded. Further, when recording image data of a normal exposure image or a short exposure image in an image file, the image data is compressed using a compression method such as JPEG (Joint Photographic Experts Group).

図10に、上述の記録制御を実現する処理のフローチャートを示す。図10は、図5のステップS18の詳細フローチャートに相当し、ステップS18の処理は、図10のステップS21〜S28の各処理から形成される。   FIG. 10 shows a flowchart of processing for realizing the recording control described above. FIG. 10 corresponds to the detailed flowchart of step S18 of FIG. 5, and the process of step S18 is formed from the processes of steps S21 to S28 of FIG.

ステップS18の記録制御では、まず、変数iを導入し、変数iに1を代入してから(ステップS21)ステップS22に移行する。ステップS22では、被記録画像列を形成する各撮影画像の内、第i番目に取得された撮影画像を画像Iiとして選択してからステップS23に移行する。図7(b)に対応する第2撮影パターンにて連写撮影がなされた場合、画像I1、I2、I3、I4、I5、I6、I7及びI8は、夫々、画像A1、A2、B1、A3、A4、B2、A5及びA6に対応する。そして、画像Iiが通常露光画像である場合は、ステップS23からステップS24に移行し、画像ファイルを作成して該画像ファイルの本体領域にJPEG圧縮後の画像Iiの画像データを出力して記録させる。更にステップS25にて、その画像ファイルのヘッダ領域に、画像Iiに対応する短露光画像データが記録されるべき画像ファイル名を出力して記録させる。ステップS25の処理後、ステップS27に移行する。一方、画像Iiが短露光画像である場合は、ステップS23からステップS26に移行する。ステップS26では、画像Ii-1の画像データが記録されている画像ファイルのヘッダ領域にJPEG圧縮後の画像Iiの画像データを出力して記録させ、その後、ステップS27に移行する。ステップS27では、全画像データの記録が完了したかが確認され、完了していない場合はステップS28にて変数iに1を加えてからステップS22に戻り、上述のステップS22以降の各処理を繰り返し実行する。一方、全画像データの記録が完了した場合は、記録制御を終了する。 In the recording control in step S18, first, the variable i is introduced, 1 is substituted into the variable i (step S21), and the process proceeds to step S22. In step S22, the i-th acquired captured image is selected as the image I i out of the captured images forming the recorded image sequence, and the process proceeds to step S23. When continuous shooting is performed in the second shooting pattern corresponding to FIG. 7B, the images I 1 , I 2 , I 3 , I 4 , I 5 , I 6 , I 7 and I 8 are respectively Corresponds to images A 1 , A 2 , B 1 , A 3 , A 4 , B 2 , A 5 and A 6 . If the image I i is a normal exposure image, the process proceeds from step S23 to step S24, where an image file is created and the image data of the image I i after JPEG compression is output to the main body area of the image file. Let me record. In step S25, the name of the image file in which the short exposure image data corresponding to the image I i is to be recorded is output and recorded in the header area of the image file. After the process of step S25, the process proceeds to step S27. On the other hand, when the image I i is a short exposure image, the process proceeds from step S23 to step S26. In step S26, the image data of the image I i after JPEG compression is output and recorded in the header area of the image file in which the image data of the image I i-1 is recorded, and then the process proceeds to step S27. In step S27, it is confirmed whether or not the recording of all the image data has been completed. If not, 1 is added to the variable i in step S28, and the process returns to step S22. Execute. On the other hand, when the recording of all the image data is completed, the recording control is terminated.

実際には、上述の如く画像ファイルの記録時に画像データが圧縮されるのであるが、以下の説明では、説明の簡略化上、画像データに対する圧縮処理の存在を無視する。   Actually, the image data is compressed when the image file is recorded as described above. However, in the following description, the existence of the compression process for the image data is ignored for the sake of simplicity.

[ぶれ補正時の動作]
次に、ぶれ補正時の動作について説明する。図11は、第1実施例に係り、撮像装置1のぶれ補正動作の流れを表すフローチャートである。ぶれ補正動作は、例えば、再生モードにおいて実行される。ぶれ補正動作時には、図4の補正対象画像抽出部54、参照画像抽出部55、第2位置ずれ検出部56及び補正処理部57が有意に機能する。
[Operation during image stabilization]
Next, the operation at the time of blur correction will be described. FIG. 11 is a flowchart illustrating the flow of the shake correction operation of the imaging apparatus 1 according to the first embodiment. The shake correction operation is executed in the playback mode, for example. During the shake correction operation, the correction target image extraction unit 54, the reference image extraction unit 55, the second misregistration detection unit 56, and the correction processing unit 57 in FIG. 4 function significantly.

ぶれ補正動作の実行時にはステップS31〜S36の各処理が順次実行される。まず、ステップS31において、主制御部13は、記録媒体16に保存されているm枚の通常露光画像の内、何れの通常露光画像のぶれを補正するべきかを表す指示(以下、補正対象指示という)を受ける。補正対象指示は、例えば、ユーザの操作部17に対する所定操作によって与えられる。補正対象指示の内容に従って、補正対象画像抽出部54は、m枚の通常露光画像の内の1枚を選択し、選択した1枚の通常露光画像の画像データを記録媒体16に保存されている画像ファイルの本体領域から内部メモリ14上に読み出す。補正対象画像抽出部54によって選択された1枚の通常露光画像は、以後、補正対象画像として取り扱われる。   When the shake correction operation is performed, the processes of steps S31 to S36 are sequentially performed. First, in step S31, the main control unit 13 indicates an instruction (hereinafter referred to as a correction target instruction) indicating which of the m normal exposure images stored in the recording medium 16 should be corrected. Called). The correction target instruction is given by a predetermined operation on the operation unit 17 by the user, for example. According to the content of the correction target instruction, the correction target image extraction unit 54 selects one of the m normal exposure images, and the image data of the selected one normal exposure image is stored in the recording medium 16. Read from the main body area of the image file onto the internal memory 14. The single normal exposure image selected by the correction target image extraction unit 54 is subsequently handled as a correction target image.

続くステップS32において、参照画像抽出部55は、補正対象画像として選択された通常露光画像のぶれ補正に参照される1枚の短露光画像を参照画像として特定し、補正対象画像が記録されている画像ファイルのヘッダ領域の記録内容に基づいて、その参照画像の画像データを記録媒体16から読み出す。補正対象画像が記録されている画像ファイルのヘッダ領域に短露光画像の画像データが記録されている場合は、その短露光画像が参照画像として特定される。補正対象画像が記録されている画像ファイルのヘッダ領域に短露光画像の画像データが記録されていない場合は、そのヘッダ領域に記録されている画像ファイル名が参照され、その画像ファイル名で指し示される画像ファイルのヘッダ領域に記録された短露光画像が参照画像として特定される。   In subsequent step S32, the reference image extraction unit 55 specifies one short exposure image to be referred to for blur correction of the normal exposure image selected as the correction target image as the reference image, and the correction target image is recorded. Based on the recorded contents of the header area of the image file, the image data of the reference image is read from the recording medium 16. When image data of a short exposure image is recorded in the header area of the image file in which the correction target image is recorded, the short exposure image is specified as a reference image. When the image data of the short exposure image is not recorded in the header area of the image file in which the correction target image is recorded, the image file name recorded in the header area is referred to and indicated by the image file name. A short-exposure image recorded in the header area of the image file to be recorded is specified as a reference image.

図9に示す6つの画像ファイルFI1〜FI6が作成されて記録媒体16に保存されている場合を想定して具体例を挙げる。この場合において、補正対象画像が通常露光画像A2であるときは、通常露光画像A2を記憶する画像ファイルFI2のヘッダ領域に短露光画像B1の画像データが記録されているため、短露光画像B1が参照画像として選択されて画像ファイルFI2のヘッダ領域から短露光画像B1の画像データが内部メモリ14上に読み出される。同様にして、補正対象画像が通常露光画像A4であるときは、短露光画像B2が参照画像として選択されて画像ファイルFI4のヘッダ領域から短露光画像B2の画像データが内部メモリ14上に読み出される。 A specific example will be given assuming that the six image files FI 1 to FI 6 shown in FIG. 9 are created and stored in the recording medium 16. In this case, when the correction target image is the normal exposure image A 2 , the image data of the short exposure image B 1 is recorded in the header area of the image file FI 2 storing the normal exposure image A 2. The exposure image B 1 is selected as a reference image, and the image data of the short exposure image B 1 is read onto the internal memory 14 from the header area of the image file FI 2 . Similarly, when the correction target image is the normal exposure image A 4 , the short exposure image B 2 is selected as the reference image, and the image data of the short exposure image B 2 from the header area of the image file FI 4 is stored in the internal memory 14. Reads up.

一方、補正対象画像が通常露光画像A1であるときは、通常露光画像A1を記憶する画像ファイルFI1のヘッダ領域に記憶されている画像ファイル名によって指し示される画像ファイルFI2が着目される。そして、画像ファイルFI2のヘッダ領域内の短露光画像B1が参照画像として選択されて、画像ファイルFI2のヘッダ領域から短露光画像B1の画像データが内部メモリ14上に読み出される。同様にして、補正対象画像が通常露光画像A3、A5及びA6であるときは、夫々、画像ファイルFI3、FI5及びFI6のヘッダ領域内の画像ファイル名に基づいて短露光画像B1、B2、B2が参照画像として選択されて、参照画像の画像データが内部メモリ14上に読み出される。 On the other hand, when the correction target image is the normal exposure image A 1 , the image file FI 2 indicated by the image file name stored in the header area of the image file FI 1 storing the normal exposure image A 1 is focused. The Then, the short exposure image B 1 in the header area of the image file FI 2 is selected as a reference image, and the image data of the short exposure image B 1 is read from the header area of the image file FI 2 onto the internal memory 14. Similarly, the correction when the target image is the normal exposure image A 3, A 5 and A 6, respectively, the image file FI 3, FI 5 and the image file name short-exposure images based on the header region of the FI 6 B 1 , B 2 , and B 2 are selected as reference images, and the image data of the reference image is read onto the internal memory 14.

ステップS31及びS32にて補正対象画像及び参照画像の各画像データが読み出された後、ステップS33に移行する。ステップS33では、第2位置ずれ検出部56が、代表点マッチング法等の位置ずれ検出方法を用いて、補正対象画像と参照画像との間の位置ずれ量DBを算出する。 After the image data of the correction target image and the reference image are read in steps S31 and S32, the process proceeds to step S33. In step S33, the second displacement detection unit 56, using the position deviation detecting method such as the representative point matching method, calculates a position deviation amount D B between the reference image and the correction target image.

図12を参照して、この算出方法をより詳細に説明する。図12は、ステップS33の詳細フローチャートである。ステップS33の処理は、ステップS41〜S43の各処理から形成される。まず、ステップS41にて、時系列で並べた被記録画像列において補正対象画像と参照画像との間に他の画像が存在するか否かを判別する。即ち、補正対象画像と参照画像との撮影間に他の通常露光画像の撮影がなされているか否かを判別する。そして、他の画像が存在しない場合はステップS42に移行する一方、他の画像が存在する場合はステップS43に移行する。   This calculation method will be described in more detail with reference to FIG. FIG. 12 is a detailed flowchart of step S33. The process of step S33 is formed from the processes of steps S41 to S43. First, in step S41, it is determined whether or not another image exists between the correction target image and the reference image in the recorded image sequence arranged in time series. That is, it is determined whether or not another normal exposure image is shot between the correction target image and the reference image. If no other image exists, the process proceeds to step S42. If another image exists, the process proceeds to step S43.

例えば、図7(c)に対応する第3撮影パターンによって連写撮影がなされた場合において、補正対象画像が通常露光画像A3又はA4であるならば参照画像は短露光画像B1であるためステップS41からステップS42に移行し、補正対象画像が通常露光画像A1、A2、A5又はA6であるならば参照画像は短露光画像B1であるためステップS41からステップS43に移行する。 For example, in the case where continuous shooting is performed with the third shooting pattern corresponding to FIG. 7C, if the correction target image is the normal exposure image A 3 or A 4 , the reference image is the short exposure image B 1 . Therefore, the process proceeds from step S41 to step S42. If the correction target image is the normal exposure image A 1 , A 2 , A 5 or A 6 , the reference image is the short exposure image B 1 and therefore the process proceeds from step S41 to step S43. To do.

ステップS42では、補正対象画像と参照画像の各画像データに基づいて補正対象画像と参照画像を直接対比し、代表点マッチング法等の位置ずれ検出方法を用いて両画像間の位置ずれ量DB1を求める。そして、この位置ずれ量DB1を位置ずれ量DBとして取り扱う。 In step S42, the correction target image and the reference image are directly compared based on the image data of the correction target image and the reference image, and a positional shift amount D B1 between the two images is detected using a positional shift detection method such as a representative point matching method. Ask for. Then, handling of the positional deviation amount D B1 as the positional deviation amount D B.

一方、ステップS43に移行した場合は、補正対象画像及び参照画像と、それら両画像間に存在する他の通常露光画像と、から成る画像列が累積対象画像列として特定される。そして、代表点マッチング法等の位置ずれ検出方法を用い、累積対象画像列に含まれる時間的に隣接する2つの画像間の位置ずれ量を順次求め、求めた位置ずれ量を累積することによって位置ずれ量DB2を求める。そして、この位置ずれ量DB2を位置ずれ量DBとして取り扱う。 On the other hand, when the process proceeds to step S43, an image sequence including the correction target image and the reference image and another normal exposure image existing between the two images is specified as the accumulation target image sequence. Then, by using a positional deviation detection method such as a representative point matching method, the positional deviation amount between two temporally adjacent images included in the accumulation target image sequence is sequentially obtained, and the obtained positional deviation amount is accumulated. A deviation amount D B2 is obtained. Then, handling of the positional deviation amount D B2 as the positional deviation amount D B.

例えば、図7(c)に対応する第3撮影パターンによって連写撮影がなされた場合において、通常露光画像A1が補正対象画像として選択された時、累積対象画像列は、通常露光画像A1〜A3及び短露光画像B1から形成されることとなる。そして、この場合、画像A1を基準とした画像A1と画像A2との間の位置ずれ量DBa、画像A2を基準とした画像A2と画像A3との間の位置ずれ量DBb、及び、画像A3を基準とした画像A3と画像B1との間の位置ずれ量DBcを求め、位置ずれ量DBa、DBb及びDBcを累積した位置ずれ量を位置ずれ量DB2として求める。上述したように、位置ずれ量は二次元のベクトル量であるため、位置ずれ量DB2、DBa、DBb及びDBcを夫々ベクトルDB2、DBa、DBb及びDBcと読み替える。そして、図13に示す如く、ベクトルDBaの終点とベクトルDBbの始点を繋ぎ合わせ且つベクトルDBbの終点とベクトルDBcの始点とを繋ぎ合わせると、ベクトルDBaの始点及びベクトルDBcの終点はベクトルDB2の始点及び終点と合致することになる。 For example, when continuous shooting is performed with the third shooting pattern corresponding to FIG. 7C, when the normal exposure image A 1 is selected as the correction target image, the accumulation target image sequence is the normal exposure image A 1. It will be formed from a to a 3 and the short-exposure image B 1. In this case, the positional deviation amount D Ba between the image A 1 and the image A 2 with the image A 1 as a reference, and the positional deviation amount between the image A 2 and the image A 3 with the image A 2 as a reference. D Bb, or, positions calculated displacement amount D Bc, positional deviation amount D Ba, the positional displacement amount obtained by accumulating the D Bb and D Bc position between the image a 3 and the image B 1 relative to the image a 3 Obtained as the deviation amount DB2 . As described above, since the displacement amount is a two-dimensional vector amount, the displacement amounts D B2 , D Ba , D Bb, and D Bc are read as vectors D B2 , D Ba , D Bb, and D Bc , respectively. Then, as shown in FIG. 13, when joining the starting point of the end point and a vector D Bc Vector D Ba endpoint and vector D Bb starting the splicing and vector D Bb of the vector D Ba of the start point and the vector D Bc The end point coincides with the start point and end point of the vector DB2 .

補正対象画像と参照画像との間の撮影間隔が長いと、それらの撮影間に、被写体の変化や撮像装置1の周辺照度等の変化が生じやすくなる。被写体の変化等が生じると、補正対象画像と参照画像との間で画像一致度が低下し、原理的に、両画像間の位置ずれ検出精度が低下する。また、補正対象画像と参照画像との間の撮影間隔が長いと、手ぶれが累積して両画像の撮影間の全体手ぶれ量が大きくなる。対比画像間で生じる手ぶれ量の増大は、対比画像間の位置ずれ検出精度を低下させる方向に作用する。例えば、対比画像間で大きな回転方向の位置ずれがある場合は、通常の、並進方向の位置ずれ検出方法では、正しい位置ずれ量を検出できない。ぶれ補正は、検出された位置ずれ量に基づく、補正対象画像と参照画像との間の位置ずれ補正を介して実行されるため、位置ずれ検出精度が低下すると、位置ずれ補正の精度が劣化して最終的にはぶれ補正の精度劣化を招く。これを考慮し、ステップS43の処理の如く、時間的に隣接する画像間の位置ずれ量を累積することで、補正対象画像と参照画像との間の位置ずれ量DBを求めるようにする。時間的に隣接する画像間の位置ずれ量は小さく且つ被写体の変化等も少ないため、位置ずれ量を高精度に求めることが可能であり、結果、それらの累積量に相当する位置ずれ量DBの精度も高くなる。 If the shooting interval between the correction target image and the reference image is long, a change in the subject and a change in the ambient illuminance of the imaging apparatus 1 tend to occur between the shootings. When the subject changes or the like, the image matching degree decreases between the correction target image and the reference image, and in principle, the positional deviation detection accuracy between the two images decreases. Also, if the shooting interval between the correction target image and the reference image is long, camera shake accumulates and the total amount of camera shake between the shooting of both images increases. The increase in the amount of camera shake occurring between the contrast images acts in the direction of reducing the positional deviation detection accuracy between the contrast images. For example, when there is a large rotational displacement between contrast images, the normal displacement detection method cannot detect the correct displacement amount. Since blur correction is performed through misalignment correction between the correction target image and the reference image based on the detected misalignment amount, the accuracy of misalignment correction deteriorates when the misalignment detection accuracy decreases. Eventually, the accuracy of blur correction is degraded. Considering this, as processing of step S43, by accumulating the positional displacement amount between images temporally adjacent, to determine a position deviation amount D B between the reference image and the correction target image. For temporally positional shift amount between adjacent images is less small and changes in the subject, it is possible to determine the positional deviation amount with high accuracy, a result, the position deviation amount D B corresponding to their cumulative amount The accuracy of is also increased.

尚、上述の手法と異なるが、ステップS43に至った場合でも、補正対象画像と参照画像との直接対比により両画像間の位置ずれ量DB1を算出するようにし、その直接対比に基づく位置ずれ量DB1と累積演算に基づく位置ずれ量DB2との平均量又は何れか一方を、位置ずれ量DBとして求めるようにしてもよい。また或いは、ステップS43に至った場合でも、直接対比に基づく位置ずれ量DB1を算出するようにし、その位置ずれ量DB1の算出時におけるマッチング誤差の最小値が大きい場合にのみ、位置ずれ量DB2を位置ずれ量DBとして求めるようにしてもよい。マッチング誤差の最小値は、算出された位置ずれ量の信頼性を示す指標であり、それが大きいと該信頼性は低くなる。マッチング誤差とは、代表点マッチング法やブロックマッチング法を用いる場合に求められる、対比画像間のSAD(Sum of Absolute Difference)又はSSD(Sum of Square Difference)である。 Although different from the above-described method, even when step S43 is reached, the positional deviation amount DB1 between the two images is calculated by direct comparison between the correction target image and the reference image, and the positional deviation based on the direct comparison is calculated. You may make it obtain | require the average amount or one of the amount D B1 and the amount of displacement D B2 based on the cumulative calculation as the amount of displacement D B. Alternatively, even when step S43 is reached, the positional deviation amount DB1 based on the direct comparison is calculated, and the positional deviation amount is obtained only when the minimum value of the matching error at the time of calculating the positional deviation amount DB1 is large. D B2 may be obtained as the positional deviation amount D B. The minimum value of the matching error is an index indicating the reliability of the calculated misregistration amount, and if it is large, the reliability becomes low. The matching error is SAD (Sum of Absolute Difference) or SSD (Sum of Square Difference) between contrast images, which is obtained when the representative point matching method or the block matching method is used.

また、大きな位置ずれ量を求めるためにはマッチング位置の探索範囲を大きくする必要がある。探索範囲の拡大は処理負担を増大させる。また、探索範囲が不足すれば位置ずれ量を正確に検出できない。これを考慮し、ステップS43に至った場合、まず、上述の位置ずれ量DB2を算出し、その位置ずれ量DB2を基準として補正対象画像と参照画像との直接対比により両画像間の位置ずれ量を求め、それを最終的に求めるべき位置ずれ量DBとして取り扱うようにしてもよい。つまり、位置ずれ量DB2が打ち消されるようにマッチング位置の探索範囲をずらした上で補正対象画像と参照画像を直接対比し、その直接対比によって得られた両画像間の位置ずれ量を最終的に位置ずれ量DBとして求めるようにしてもよい。 Further, in order to obtain a large amount of positional deviation, it is necessary to increase the search range for the matching position. Expansion of the search range increases the processing burden. Also, if the search range is insufficient, the amount of positional deviation cannot be detected accurately. Considering this, when the process reaches step S43, first, the above-described positional deviation amount DB2 is calculated, and the position between the two images is directly compared with the reference image based on the positional deviation amount DB2. obtains a shift amount, may be handled as the position displacement amount D B should seek it eventually. That is, after the search range of the matching position is shifted so that the positional shift amount DB2 is canceled, the correction target image and the reference image are directly compared, and the positional shift amount between the two images obtained by the direct comparison is finally determined. it may be obtained as a position deviation amount D B to.

図11のフローチャートの説明に戻る。位置ずれ量DBが求められると、ステップS34に移行する。補正対象画像及び参照画像の各画像データ及び位置ずれ量DBは、図4の補正処理部57に与えられる。ステップS34において、補正処理部57は、位置ずれ量DBに基づいて補正対象画像と参照画像との間の位置ずれを補正する。 Returning to the flowchart of FIG. When the positional deviation amount D B obtained, the process proceeds to step S34. Each image data and the positional deviation amount D B of the correction target image and the reference image are given to the correction processing unit 57 of FIG. In step S34, the correction processing unit 57 corrects the positional deviation between the reference image and the correction target image based on the positional deviation amount D B.

今、位置ずれ量DBが、補正対象画像を基準として求められたものであるとする。そうすると、参照画像は、補正対象画像を基準として位置ずれ量DBに相当する分だけ位置ずれが生じた画像とみなすことができる。そこで、この位置ずれ量DBが打ち消されるように参照画像に座標変換(アフィン変換など)を施すことによって参照画像を位置ずれ補正する。例えば、この座標変換を行うための幾何変換パラメータを求め、補正対象画像が定義される座標面上に参照画像を座標変換することによって位置ずれ補正を行う。位置ずれ補正前の参照画像内の座標(x+DBx,y+DBy)に位置する画素は、位置ずれ補正によって座標(x,y)に位置する画素に変換される。DBx及びDByは、夫々、DBの水平成分及び垂直成分である。尚、補正対象画像を座標変換することによって、或いは、補正対象画像と参照画像の双方を座標変換することによって、同様の位置ずれ補正を実現してもよい。 Now, positional deviation amount D B is the corrected target image is obtained is obtained as a reference. Then, the reference image is divided by positional deviation corresponding to the displacement amount D B the correction target image as a reference can be regarded as an image generated. Therefore, the reference image to the positional deviation correction by performing coordinate conversion on the reference image (such as affine conversion) as the positional deviation amount D B is canceled. For example, geometric displacement parameters for performing this coordinate conversion are obtained, and positional deviation correction is performed by converting the reference image on the coordinate plane on which the correction target image is defined. A pixel located at the coordinates (x + D Bx , y + D By ) in the reference image before the positional deviation correction is converted into a pixel located at the coordinates (x, y) by the positional deviation correction. D Bx and D By A, respectively, the horizontal and vertical components of D B. Note that the same misalignment correction may be realized by performing coordinate conversion on the correction target image or by performing coordinate conversion on both the correction target image and the reference image.

ステップS34による位置ずれ補正後の補正対象画像及び参照画像を、夫々、補正対象画像Lw及び参照画像Rwと呼ぶ。補正対象画像Lwは位置ずれ補正後の補正対象画像の全体画像を表し、参照画像Rwは位置ずれ補正後の参照画像の全体画像を表している。ステップS34に続くステップS35において、補正処理部57は、補正対象画像Rw及び参照画像Lwに基づいて補正対象画像Lwに対するぶれ補正処理を行うことで、補正対象画像Lwのぶれが低減されたぶれ補正画像Qwを生成する。ぶれ補正画像Qwの生成方法については後述する。その後、ステップS36において、主制御部13は、ぶれ補正画像Qwの画像データを記録するための画像ファイルを新たに生成して、その画像ファイルを記録媒体16に記憶する。或いは、画像ファイルを新たに生成することなく、補正対象画像の画像データが上書きされるように、補正対象画像の画像データを記録していた画像ファイルの本体領域にぶれ補正画像Qwの画像データを記憶してもよい。また、ぶれ補正画像Qwは、表示部15に表示される。   The correction target image and the reference image after the positional deviation correction in step S34 are referred to as a correction target image Lw and a reference image Rw, respectively. The correction target image Lw represents the whole image of the correction target image after the positional deviation correction, and the reference image Rw represents the whole reference image after the positional deviation correction. In step S <b> 35 subsequent to step S <b> 34, the correction processing unit 57 performs shake correction processing on the correction target image Lw based on the correction target image Rw and the reference image Lw, so that the blur correction in which the blur of the correction target image Lw is reduced is performed. An image Qw is generated. A method for generating the shake correction image Qw will be described later. Thereafter, in step S <b> 36, the main control unit 13 newly generates an image file for recording the image data of the shake correction image Qw, and stores the image file in the recording medium 16. Alternatively, the image data of the shake correction image Qw is added to the main body area of the image file in which the image data of the correction target image is recorded so that the image data of the correction target image is overwritten without generating a new image file. You may remember. Further, the shake correction image Qw is displayed on the display unit 15.

[作用・効果等]
上述のように処理することによる作用又は効果について考察する。基本的に、通常露光画像よりも短露光画像の方がぶれは小さく、短露光画像のエッジ状態を目標に通常露光画像を補正すれば、通常露光画像のぶれは低減される。手ぶれや被写体の動きは連写撮影中にも生じるため、ぶれ補正の目標となる短露光画像は通常露光画像の直前又は直後に撮影されることが望ましい。しかし、通常露光画像を1枚撮影する度に短露光画像を1枚撮影すると、通常の連写撮影に比べて2倍のメモリ容量が必要となる。また、m枚の通常露光画像を得るために必要な撮影時間が長くなると共に隣接する通常露光画像の撮影間隔が長くなってしまう。
[Action and effect]
Consider the action or effect of processing as described above. Basically, the short exposure image has less blur than the normal exposure image, and if the normal exposure image is corrected with the edge state of the short exposure image as a target, the blur of the normal exposure image is reduced. Since camera shake and subject movement also occur during continuous shooting, it is desirable that the short-exposure image that is the target of camera shake correction be captured immediately before or after the normal exposure image. However, if one short exposure image is taken every time one normal exposure image is taken, twice the memory capacity is required as compared with normal continuous shooting. In addition, the shooting time required to obtain m normal exposure images becomes longer and the shooting interval between adjacent normal exposure images becomes longer.

第1実施例では、これを考慮し、m枚の通常露光画像の撮影に付随して撮影されるべき短露光画像の枚数(即ち、n)を通常露光画像の枚数(即ち、m)よりも小さくしている。これにより、短露光画像の撮影に由来する必要メモリ容量の増大が抑制されると共にm枚の通常露光画像を得るための撮影時間の増大も抑制される。   In the first embodiment, considering this, the number of short exposure images (that is, n) to be photographed in association with the photographing of m normal exposure images is set to be larger than the number of normal exposure images (that is, m). It is small. As a result, an increase in the required memory capacity resulting from the shooting of the short exposure image is suppressed, and an increase in the shooting time for obtaining m normal exposure images is also suppressed.

但し、短露光画像の枚数が少ないと、通常露光画像と短露光画像との撮影間隔が大きくなる組み合わせが発生することになる。このとき、更に、被写体の動きが大きかったり大きな手ぶれが発生したりすると、補正対象画像としての通常露光画像と参照画像としての短露光画像との間の位置ずれ量が大きくなって、位置ずれ量の検出精度が悪くなり、最終的にはぶれ補正の精度が悪くなる。そこで、本実施例では、プレビュー画像間の位置ずれ量DAに基づいて通常露光画像の枚数に対する短露光画像の枚数の比を設定する。つまり、位置ずれ量DAが大きい場合は、補正対象画像と参照画像との間の位置ずれ量も大きくなると推定されるため、その比を大きくして高精度の位置ずれ量検出を確保する。一方、位置ずれ量DAが小さい場合は、補正対象画像と参照画像との間の位置ずれ量は小さいと推定されるため、その比を減少させることで、必要メモリ容量の増大抑制、m枚の通常露光画像を得るための撮影時間の増大抑制及び隣接する通常露光画像の撮影間隔の増大抑制を図る。 However, when the number of short-exposure images is small, a combination in which the photographing interval between the normal exposure image and the short-exposure image becomes large occurs. At this time, if the subject moves further or a large amount of camera shake occurs, the amount of misalignment between the normal exposure image as the correction target image and the short exposure image as the reference image increases, and the misalignment amount The detection accuracy of the image quality deteriorates, and the accuracy of blur correction eventually deteriorates. Therefore, in this embodiment, the ratio of the number of short-exposure images to the number of normal-exposure images is set based on the positional deviation amount D A between preview images. That is, when the displacement amount D A is large, it is estimated that the displacement amount between the correction target image and the reference image also increases. Therefore, the ratio is increased to ensure highly accurate displacement detection. On the other hand, if the positional displacement amount D A is small, the correction for the positional deviation amount between the target image and the reference image is estimated to be small, by decreasing the ratio, the required memory capacity increase suppression, m Like The increase in shooting time for obtaining the normal exposure image and the increase in the shooting interval between adjacent normal exposure images are suppressed.

また、本実施例では、図9に示す如く、1枚の短露光画像の画像データを1つの画像ファイルにのみ記録するようにし、短露光画像の画像データが記録されない画像ファイルには、参照すべき画像ファイルのリンク情報(画像ファイル名)のみをヘッダ領域に記録しておく。これにより、短露光画像データの重複記録がなくなり、ファイルサイズの増加を低減できる。   In this embodiment, as shown in FIG. 9, the image data of one short exposure image is recorded only in one image file, and the image file in which the image data of the short exposure image is not recorded is referred to. Only the link information (image file name) of the power image file is recorded in the header area. This eliminates redundant recording of short-exposure image data, thereby reducing an increase in file size.

また更に、短露光画像の画像データをそれの直前に撮影された通常露光画像の画像ファイルに記録することで、ファイルの開閉に関わるファイルアクセス回数を低減することができる。例えば、図7(b)に対応する第2撮影パターンで連写撮影がなされた場合は、図9に示す画像ファイルFI1〜FI6が順次生成されて記録媒体16に保存されるが、本実施例によれば、図14(a)に示すような記録動作がなされる。つまり、画像ファイルFI1が開かれて画像A1の画像データが記録された後、画像ファイルFI1が閉じられる。その後、画像ファイルFI2が開かれて画像A2及びB1の画像データが記録された後、画像ファイルFI2が閉じられる。仮に、画像B1の画像データを、画像ファイルFI2ではなく画像ファイルFI1のヘッダ領域に記録したとするならば、図14(b)に示す如く、画像A1の画像データの記録後に一旦閉じた画像ファイルFI1を、画像B1の画像データの記録時に、再度、開閉しなければならない。ファイルの開閉には有限の時間がかかるため、ファイルアクセス回数の低減は記録動作時間の短縮に寄与する。 Furthermore, by recording the image data of the short exposure image in the image file of the normal exposure image taken immediately before it, the number of file accesses related to the opening and closing of the file can be reduced. For example, when continuous shooting is performed with the second shooting pattern corresponding to FIG. 7B, the image files FI 1 to FI 6 shown in FIG. 9 are sequentially generated and stored in the recording medium 16. According to the embodiment, a recording operation as shown in FIG. That is, after the image file FI 1 is opened and the image data of the image A 1 is recorded, the image file FI 1 is closed. Then, after the image file FI 2 is opened image data of the image A 2 and B 1 is recorded, the image file FI 2 is closed. If the image data of the image B 1 is recorded not in the image file FI 2 but in the header area of the image file FI 1 , as shown in FIG. 14B, once the image data of the image A 1 is recorded. The closed image file FI 1 must be opened and closed again when the image data of the image B 1 is recorded. Since opening and closing a file takes a finite time, reducing the number of file accesses contributes to shortening the recording operation time.

尚、本実施例では、短露光画像の全体の画像データを記録媒体16に記録することとしているが、図11のステップS35におけるぶれ補正処理で必要な部分の画像データのみを、記録媒体16に記録するようにしてもよい。これにより、ファイルサイズの増加を更に低減することができる。例えば、短露光画像の一部に相当する、短露光画像内における特徴的な小領域を抽出し、その小領域内の画像の画像データを短露光画像の全体の画像データの代わりに記録媒体16に記録するようにしてもよい。但し、これは、後述の第2の補正方法(第4実施例参照)には適用できない。特徴的な小領域は、抽出元画像の中でエッジ成分が比較的多い(換言すれば、コントラストが比較的強い)領域のことを指し、例えば、特徴的な絵柄を含む領域である。特徴的な絵柄とは、例えば、物体の角部のような2方向以上に輝度変化を有し、その輝度変化に基づき画像処理によって該絵柄の位置(画像上の位置)を容易に検出できるような絵柄を意味する。   In the present embodiment, the entire image data of the short-exposure image is recorded on the recording medium 16. However, only the image data of the portion necessary for the blur correction process in step S35 in FIG. It may be recorded. Thereby, the increase in file size can be further reduced. For example, a characteristic small area in the short exposure image corresponding to a part of the short exposure image is extracted, and the image data of the image in the small exposure image is used instead of the entire image data of the short exposure image. May be recorded. However, this cannot be applied to a second correction method (see the fourth embodiment) described later. A characteristic small region refers to a region having a relatively large number of edge components (in other words, a relatively strong contrast) in the extraction source image, and is, for example, a region including a characteristic pattern. A characteristic pattern has, for example, a luminance change in two or more directions such as a corner of an object, and the position of the pattern (position on the image) can be easily detected by image processing based on the luminance change. Meaning a simple pattern.

<<第2実施例>>
第1実施例では、プレビュー画像間の位置ずれ量DAに基づいて被記録画像列の撮影パターンを決定しているが、被記録画像列の撮影開始近辺に得られた通常露光画像間の位置ずれ量に基づいて、その後の、撮影パターンを決定してもよい。これを説明する実施例として、第2実施例を説明する。第2実施例は、第1実施例の一部を変形した実施例に相当するため第1実施例と相違する部分だけを説明する。撮影パターンの決定方法以外の動作及び構成等は、第1実施例のそれと同じであり、第1実施例の記載事項が矛盾なき限り第2実施例にも適用される。
<< Second Example >>
In the first embodiment, the shooting pattern of the recorded image sequence is determined based on the positional deviation amount D A between the preview images, but the position between the normal exposure images obtained in the vicinity of the recording start of the recorded image sequence. A subsequent photographing pattern may be determined based on the amount of deviation. As an example for explaining this, a second example will be described. Since the second embodiment corresponds to an embodiment obtained by modifying a part of the first embodiment, only portions different from the first embodiment will be described. The operation and configuration other than the method of determining the shooting pattern are the same as those of the first embodiment, and the description is applicable to the second embodiment as long as the description of the first embodiment is consistent.

撮影モードにおいて、シャッタボタン17aが半押しの状態となった後、フォーカスレンズ31の駆動制御を介してシャッタボタン17aが全押しの状態となると、被記録画像列の取得のための連写撮影が開始される。撮影制御部52は、被写体の明るさを測定する測光回路(不図示)から得られた明るさ情報に基づき、撮像素子33の露光量が適正となる露光時間TEPを算出する。そして、露光時間TEPと閾値時間TTHとを比較し、露光時間TEPが閾値時間TTHよりも短い場合、通常連写撮影を実行する。通常連写撮影では、被記録画像列にm枚の通常露光画像のみが含まれるように撮像部11が制御される。 In the shooting mode, after the shutter button 17a is half-pressed and then the shutter button 17a is fully pressed via the drive control of the focus lens 31, continuous shooting for acquiring a recorded image sequence is performed. Be started. Photographing control unit 52, based on the brightness information obtained from the photometric circuit for measuring the brightness of an object (not shown), the exposure amount of the image sensor 33 to calculate the exposure time T EP to be appropriate. Then, compared with the exposure time T EP and the threshold time T TH, the exposure time T EP is shorter than the threshold time T TH, executes the normal continuous shooting. In normal continuous shooting, the imaging unit 11 is controlled so that only m normal exposure images are included in the recorded image sequence.

一方、露光時間TEPが閾値時間TTHよりも長い場合、撮影制御部52は、まず、露光時間TEPの通常露光撮影によってmA枚の通常露光画像を連写撮影する。ここで、mAは2以上の整数である。最終的に、被記録画像列にはm枚の通常露光画像が含まれることになるが、mA枚の通常露光画像はm枚の通常露光画像の一部である。即ち、不等式「mA<m」が成立する。また、m=mA+mBであるとする。mBは、1以上の整数である。 On the other hand, when the exposure time T EP is longer than a threshold time T TH, the imaging control unit 52, first, continuous shooting the m A single normal exposure image by ordinary-exposure shooting of the exposure time T EP. Here, m A is an integer of 2 or more. Eventually, the m normal exposure images are included in the recorded image sequence, but the m A normal exposure images are part of the m normal exposure images. That is, the inequality “m A <m” is established. Further, it is assumed that m = m A + m B. m B is an integer of 1 or more.

今、mAは2であるとし、2枚の通常露光画像A1及びA2がこの順番で連写撮影されたものとする。第1位置ずれ検出部51は、代表点マッチング法等の位置ずれ検出方法を用いて、時間的に隣接する通常露光画像A1と通常露光画像A2との間の位置ずれ量を位置ずれ量DA2として算出する。尚、位置ずれ量DA2は、画素を単位として算出される。 Now, suppose that m A is 2, and that two normal exposure images A 1 and A 2 are taken in this order. The first displacement detection unit 51, using the position deviation detecting method such as the representative point matching method, positional deviation amount positional deviation amount between the normal exposure image A 1 and a normal exposure image A 2 temporally adjacent Calculated as D A2 . The positional deviation amount D A2 is calculated in units of pixels.

その後、撮影制御部52は、位置ずれ量DA2に基づいて被記録画像列の撮影パターンを決定する。但し、当然のことながら、ここで決定される撮影パターンは通常露光画像A
1及びA2を除く撮影パターンである。第1実施例と同様、被記録画像列は、m枚の通常露光画像とn枚の短露光画像から形成され且つmは2以上の整数であり、nは1以上の整数である。更に、不等式「m>n」が成立する。具体的には、撮影制御部52は、位置ずれ量DA2に基づいて、通常露光画像A1及びA2を除く通常露光画像と短露光画像の撮影枚数割合を決定する。つまり、位置ずれ量DA2に基づいてmBとnの比を決定する。尚、m=mA+mBが成立するのであるから、mBとnの比が定まれば自動的にmとnの比も定まる。従って、撮影制御部52は、位置ずれ量DA2に基づいてmとnの比を定めているとも言える。
Thereafter, the shooting control unit 52 determines the shooting pattern of the recorded image sequence based on the positional deviation amount D A2 . However, as a matter of course, the photographing pattern determined here is the normal exposure image A.
A shooting pattern except 1 and A 2. As in the first embodiment, the recorded image sequence is formed from m normal exposure images and n short exposure images, and m is an integer of 2 or more and n is an integer of 1 or more. Furthermore, the inequality “m> n” holds. Specifically, the shooting control unit 52 determines the ratio of the number of shots of the normal exposure image and the short exposure image excluding the normal exposure images A 1 and A 2 based on the positional deviation amount D A2 . That is, the ratio of m B and n is determined based on the positional deviation amount D A2 . Since m = m A + m B is established, if the ratio of m B and n is determined, the ratio of m and n is automatically determined. Therefore, it can be said that the imaging control unit 52 determines the ratio of m and n based on the positional deviation amount D A2 .

m=6である場合を想定して具体例を挙げる。
位置ずれ量DA2の大きさが20画素以上である場合は、通常露光画像A1及びA2の撮影の後、1枚の通常露光画像と1枚の短露光画像を交互に撮影する。但し、被記録画像列の内、最後に得られる撮影画像は通常露光画像であるとし、通常露光画像A1及びA2の撮影の直後に短露光撮影を行うものとする。このため、6枚の通常露光画像A1〜A6と4枚の短露光画像B1〜B4とから成る被記録画像列が得られる。より具体的には、図15(a)に示す如く、画像A1、A2、B1、A3、B2、A4、B3、A5、B4及びA6の順番で連写撮影がなされる。
A specific example will be given assuming that m = 6.
When the size of the displacement amount D A2 is 20 pixels or more, one normal exposure image and one short exposure image are alternately captured after the normal exposure images A 1 and A 2 are captured. However, it is assumed that the last captured image in the recorded image sequence is a normal exposure image, and short exposure shooting is performed immediately after shooting of the normal exposure images A 1 and A 2 . For this reason, a recorded image sequence composed of six normal exposure images A 1 to A 6 and four short exposure images B 1 to B 4 is obtained. More specifically, as shown in FIG. 15A, continuous shooting is performed in the order of images A 1 , A 2 , B 1 , A 3 , B 2 , A 4 , B 3 , A 5 , B 4 and A 6. Shooting is done.

位置ずれ量DA2の大きさが10画素以上であって且つ20画素未満である場合は、通常露光画像A1及びA2の撮影の後、2枚の通常露光画像の撮影後に1枚の短露光画像を撮影するという撮影動作を繰り返す。但し、被記録画像列の内、最後に得られる撮影画像は通常露光画像であるとし、通常露光画像A1及びA2の撮影の直後に短露光撮影を行うものとする。このため、6枚の通常露光画像A1〜A6と2枚の短露光画像B1及びB2とから成る被記録画像列が得られる。より具体的には、図15(b)に示す如く、画像A1、A2、B1、A3、A4、B2、A5及びA6の順番で連写撮影がなされる。この連写撮影による撮影パターンは、結果的に、図7(b)に対応する第2撮影パターンのそれと同じである。 When the size of the misregistration amount D A2 is 10 pixels or more and less than 20 pixels, after the normal exposure images A 1 and A 2 are captured, one short image is captured after the two normal exposure images are captured. The photographing operation of photographing the exposure image is repeated. However, it is assumed that the last captured image in the recorded image sequence is a normal exposure image, and short exposure shooting is performed immediately after shooting of the normal exposure images A 1 and A 2 . For this reason, a recorded image sequence composed of six normal exposure images A 1 to A 6 and two short exposure images B 1 and B 2 is obtained. More specifically, as shown in FIG. 15B, continuous shooting is performed in the order of images A 1 , A 2 , B 1 , A 3 , A 4 , B 2 , A 5 and A 6 . As a result, the shooting pattern by the continuous shooting is the same as that of the second shooting pattern corresponding to FIG.

位置ずれ量DA2の大きさが10画素未満である場合は、通常露光画像A1及びA2の撮影の後、3枚の通常露光画像の撮影後に1枚の短露光画像を撮影するという撮影動作を繰り返す。但し、被記録画像列の内、最後に得られる撮影画像は通常露光画像であるとし、通常露光画像A1及びA2を含む3枚の通常露光画像の撮影直後に1回目の短露光撮影を行うものとする。このため、6枚の通常露光画像A1〜A6と1枚の短露光画像B1とから成る被記録画像列が得られる。より具体的には、図15(c)に示す如く、画像A1、A2、A3、B1、A4、A5及びA6の順番で連写撮影がなされる。この連写撮影による撮影パターンは、結果的に、図7(c)に対応する第3撮影パターンのそれと同じである。 When the amount of displacement D A2 is less than 10 pixels, after taking the normal exposure images A 1 and A 2 , taking one short exposure image after taking three normal exposure images. Repeat the operation. However, the last captured image in the recorded image sequence is a normal exposure image, and the first short exposure shooting is performed immediately after the three normal exposure images including the normal exposure images A 1 and A 2 are captured. Assumed to be performed. Therefore, a recorded image sequence composed of six normal exposure images A 1 to A 6 and one short exposure image B 1 is obtained. More specifically, as shown in FIG. 15C, continuous shooting is performed in the order of images A 1 , A 2 , A 3 , B 1 , A 4 , A 5 and A 6 . As a result, the shooting pattern by the continuous shooting is the same as that of the third shooting pattern corresponding to FIG.

このように、撮影制御部52は、位置ずれ量DA2に基づいてmBとnの比(及びmとnの比)を決定し、通常露光画像と短露光画像の撮影順序を上述の如く定める。 As described above, the shooting control unit 52 determines the ratio of m B and n (and the ratio of m and n) based on the positional deviation amount D A2 , and sets the shooting order of the normal exposure image and the short exposure image as described above. Determine.

得られた各通常露光画像の画像データ及び各短露光画像の画像データは、第1実施例と同様の記録制御(図5のステップS18;図10参照)によって記録媒体16に記録される。ぶれ補正時における撮像装置1の動作も、第1実施例と同じである。   The obtained image data of each normal exposure image and image data of each short exposure image are recorded on the recording medium 16 by the same recording control as in the first embodiment (step S18 in FIG. 5; see FIG. 10). The operation of the image pickup apparatus 1 at the time of blur correction is the same as that in the first embodiment.

本実施例によっても第1実施例と同様の効果を得ることができる。但し、上述の例では、位置ずれ量DA2の大きさが20画素以上である場合、通常露光画像A1と、それに最も時間的に近接する短露光画像B1との間に他の通常露光画像が挿入される。従って、位置ずれ量DA2の大きさが20画素以上であって且つ通常露光画像A1が補正対象画像となった場合にのみ第1実施例に比べてぶれ補正精度が悪くなる。 According to this embodiment, the same effect as that of the first embodiment can be obtained. However, in the above-described example, when the size of the displacement amount D A2 is 20 pixels or more, another normal exposure is performed between the normal exposure image A 1 and the short exposure image B 1 closest in time to the normal exposure image A 1. An image is inserted. Accordingly, the blur correction accuracy is deteriorated as compared with the first embodiment only when the amount of the displacement D A2 is 20 pixels or more and the normal exposure image A 1 is the correction target image.

尚、mAが2である例を上述したが、mAを3以上の任意の整数としてもよい。例えば、mAを3とする場合、撮影制御部52は、被記録画像列を形成する1番目、2番目、3番目の撮影画像をそれぞれ通常露光画像A1、A2及びA3とする。そして、この場合、第1位置ずれ検出部51は、画像A1と画像A2との間の位置ずれ量と画像A2と画像A3との間の位置ずれ量を求めて両位置ずれ量を平均化したものを位置ずれ量DA2として算出し、その位置ずれ量DA2に基づいて、撮影制御部52は通常露光画像A1〜A3を除く被記録画像列の撮影パターンを決定する。 In addition, although the example in which m A is 2 has been described above, m A may be an arbitrary integer of 3 or more. For example, when m A is 3, the imaging control unit 52 sets the first, second, and third captured images forming the recorded image sequence as normal exposure images A 1 , A 2, and A 3 , respectively. In this case, the first misregistration detection unit 51 obtains the misregistration amount between the image A 1 and the image A 2 and the misregistration amount between the image A 2 and the image A 3. was calculated that the average as positional deviation amount D A2, based on the position deviation amount D A2, the imaging control unit 52 typically determines the shooting pattern of the recorded image columns except exposure image a 1 to a 3 .

<<第3実施例>>
次に、第3実施例について説明する。第3実施例では、撮影パターンの変形例について説明する。第3実施例は、第1実施例の一部を変形した実施例に相当するため第1実施例と相違する部分だけを説明する。撮影パターンの設定方法以外の動作及び構成等は、第1実施例のそれと同じであり、第1実施例の記載事項が矛盾なき限り第3実施例にも適用される。
<< Third Example >>
Next, a third embodiment will be described. In the third embodiment, a modified example of the shooting pattern will be described. Since the third embodiment corresponds to an embodiment obtained by modifying a part of the first embodiment, only the portions different from the first embodiment will be described. The operation, configuration, and the like other than the shooting pattern setting method are the same as those of the first embodiment, and the description is applicable to the third embodiment as long as the description of the first embodiment is consistent.

撮影モードにおいて、シャッタボタン17aが全押しの状態となると、被記録画像列の取得のための連写撮影が開始される。撮影制御部52は、被写体の明るさを測定する測光回路(不図示)から得られた明るさ情報に基づき、撮像素子33の露光量が適正となる露光時間TEPを算出する。そして、露光時間TEPと閾値時間TTHとを比較し、露光時間TEPが閾値時間TTHよりも短い場合、通常連写撮影を実行する。通常連写撮影では、被記録画像列にm枚の通常露光画像のみが含まれるように撮像部11が制御される。 In the shooting mode, when the shutter button 17a is fully pressed, continuous shooting for acquiring a recorded image sequence is started. Photographing control unit 52, based on the brightness information obtained from the photometric circuit for measuring the brightness of an object (not shown), the exposure amount of the image sensor 33 to calculate the exposure time T EP to be appropriate. Then, compared with the exposure time T EP and the threshold time T TH, the exposure time T EP is shorter than the threshold time T TH, executes the normal continuous shooting. In normal continuous shooting, the imaging unit 11 is controlled so that only m normal exposure images are included in the recorded image sequence.

一方、露光時間TEPが閾値時間TTHよりも長い場合、撮影制御部52は、次に示す第4〜第6撮影パターンの何れかを用い、m枚の通常露光画像とn枚の短露光画像とから成る被記録画像列を撮像部11に連写撮影させる。第4撮影パターンでは、短露光画像を1枚だけ撮影した後、m枚の通常露光画像を連写撮影する。第5撮影パターンでは、m枚の通常露光画像を連写撮影した後、短露光画像を1枚だけ撮影する。第6撮影パターンでは、短露光画像を1枚だけ撮影した後、m枚の通常露光画像を連写撮影し、更にその後、短露光画像を1枚だけ撮影する。 On the other hand, when the exposure time T EP is longer than a threshold time T TH, the imaging control unit 52, using any one of the fourth to sixth shooting pattern shown below, m pieces of normal exposure images and n pieces of short-exposure The image-recording unit 11 causes the imaging unit 11 to continuously record a recorded image sequence including images. In the fourth shooting pattern, only one short exposure image is shot, and then m normal exposure images are shot continuously. In the fifth shooting pattern, after the m normal exposure images are continuously shot, only one short exposure image is shot. In the sixth shooting pattern, only one short exposure image is shot, then m normal exposure images are shot continuously, and then only one short exposure image is shot.

m=6である場合を想定して具体例を挙げる。
第4撮影パターンを採用する場合、6枚の通常露光画像A1〜A6と1枚の短露光画像B1とから成る被記録画像列が得られる。より具体的には、図16(a)に示す如く、画像B1、A1、A2、A3、A4、A5及びA6の順番で連写撮影がなされる。
第5撮影パターンを採用する場合、6枚の通常露光画像A1〜A6と1枚の短露光画像B1とから成る被記録画像列が得られる。より具体的には、図16(b)に示す如く、画像A1、A2、A3、A4、A5、A6及びB1の順番で連写撮影がなされる。
第6撮影パターンを採用する場合、6枚の通常露光画像A1〜A6と2枚の短露光画像B1及びB2とから成る被記録画像列が得られる。より具体的には、図16(c)に示す如く、画像B1、A1、A2、A3、A4、A5、A6及びB2の順番で連写撮影がなされる。
A specific example will be given assuming that m = 6.
When the fourth photographing pattern is adopted, a recorded image sequence composed of six normal exposure images A 1 to A 6 and one short exposure image B 1 is obtained. More specifically, as shown in FIG. 16 (a), the image B 1, A 1, A 2 , A 3, A 4, continuous shooting in the order of A 5 and A 6 is made.
When the fifth shooting pattern is adopted, a recorded image sequence composed of six normal exposure images A 1 to A 6 and one short exposure image B 1 is obtained. More specifically, as shown in FIG. 16B, continuous shooting is performed in the order of images A 1 , A 2 , A 3 , A 4 , A 5 , A 6 and B 1 .
When the sixth shooting pattern is adopted, a recorded image sequence including six normal exposure images A 1 to A 6 and two short exposure images B 1 and B 2 is obtained. More specifically, as shown in FIG. 16C, continuous shooting is performed in the order of images B 1 , A 1 , A 2 , A 3 , A 4 , A 5 , A 6 and B 2 .

得られた各通常露光画像の画像データ及び各短露光画像の画像データは、第1実施例と同様の記録制御(図5のステップS18;図10参照)によって記録媒体16に記録される。但し、通常露光画像A1の撮影前に短露光画像B1の撮影を行った場合、短露光画像B1の画像データは、通常露光画像A1が記録される画像ファイルのヘッダ領域に記録される。一方で、第1実施例の記録制御で説明したように、第5撮影パターンを採用した場合における短露光画像B1の画像データは、通常露光画像A6が記録される画像ファイルのヘッダ領域に記録され、第6撮影パターンを採用した場合における短露光画像B2の画像データは、通常露光画像A6が記録される画像ファイルのヘッダ領域に記録される。そして、短露光画像が記録されない画像ファイルのヘッダ領域には、その画像ファイルの本体領域に記録される通常露光画像の撮影時点を基準として時間的に最も近接して撮影された短露光画像が記録される画像ファイル名だけを記録する。ぶれ補正時における撮像装置1の動作は、第1実施例と同じである。 The obtained image data of each normal exposure image and image data of each short exposure image are recorded on the recording medium 16 by the same recording control as in the first embodiment (step S18 in FIG. 5; see FIG. 10). However, if the normal performed taking short-exposure image B 1 before taking the exposure image A 1, the image data of short-exposure image B 1 represents, normal exposure image A 1 is recorded in the header area of an image file recorded The On the other hand, as described in the recording control of the first embodiment, the image data of short-exposure image B 1 in the case of adopting the fifth shot pattern, the header area of an image file is normally exposed image A 6 is recorded The recorded image data of the short exposure image B 2 in the case of adopting the sixth shooting pattern is recorded in the header area of the image file in which the normal exposure image A 6 is recorded. Then, in the header area of the image file in which no short exposure image is recorded, the short exposure image photographed closest in time with respect to the photographing time point of the normal exposure image recorded in the main body area of the image file is recorded. Only the name of the image file to be recorded is recorded. The operation of the imaging apparatus 1 during blur correction is the same as that in the first embodiment.

m>nを満たすべく、撮影制御部52は、mが3以上の場合にのみ、第6撮影パターンを採用する。mの値に応じて採用する撮影パターンの切替制御を行うようにしてもよい。例えば、mが3以上の所定値以上である場合に第6撮影パターンを採用するようにし、mが該所定値未満である場合には第4又は第5撮影パターンを採用するようにする。   In order to satisfy m> n, the imaging control unit 52 adopts the sixth imaging pattern only when m is 3 or more. You may make it perform switching control of the imaging | photography pattern employ | adopted according to the value of m. For example, the sixth shooting pattern is adopted when m is a predetermined value of 3 or more, and the fourth or fifth shooting pattern is adopted when m is less than the predetermined value.

第3実施例においても、m枚の通常露光画像の撮影に付随して撮影されるべき短露光画像の枚数(即ち、n)を通常露光画像の枚数(即ち、m)よりも小さくしている。これにより、短露光画像の撮影に由来する必要メモリ容量の増大が抑制されると共にm枚の通常露光画像を得るための撮影時間の増大も抑制される。また、m枚の通常露光画像の撮影間に短露光画像の撮影を行うと隣接する通常露光画像の撮影間隔が広がってしまうが、第3実施例では、m枚の通常露光画像の連写撮影の前又は後に短露光画像の撮影を行うため、隣接する通常露光画像の撮影間隔が短露光撮影によって増大することもない。また、第1実施例と同様、短露光画像データは重複記録されないため、ファイルサイズの増加を低減することができる。   Also in the third embodiment, the number of short-exposure images (that is, n) to be photographed in association with the photographing of m normal-exposure images is made smaller than the number of normal-exposure images (that is, m). . As a result, an increase in the required memory capacity resulting from the shooting of the short exposure image is suppressed, and an increase in the shooting time for obtaining m normal exposure images is also suppressed. Further, if a short exposure image is shot during shooting of m normal exposure images, the shooting interval between adjacent normal exposure images is widened. In the third embodiment, continuous shooting of m normal exposure images is performed. Since the short-exposure image is captured before or after this, the interval between adjacent normal-exposure images is not increased by the short-exposure shooting. Further, as in the first embodiment, since the short exposure image data is not recorded redundantly, an increase in file size can be reduced.

尚、第1実施例でも述べたように、短露光画像の全体の画像データの内、図11のステップS35におけるぶれ補正処理で必要な部分の画像データのみを、記録媒体16に記録するようにしてもよい。これにより、ファイルサイズの増加を更に低減することができる。   As described in the first embodiment, among the entire image data of the short-exposure image, only the image data of the portion necessary for the blur correction process in step S35 in FIG. 11 is recorded on the recording medium 16. May be. Thereby, the increase in file size can be further reduced.

<<第4実施例>>
次に、第4実施例について説明する。第4実施例では、補正対象画像Lwと参照画像Rwに基づく、補正対象画像Lwのぶれ補正方法を説明する。この補正を行うためのぶれ補正処理は、図11のステップS35にて実行される。補正対象画像Lwのぶれ補正方法として、以下に、第1〜第3の補正方法を例示する。第1、第2、第3の補正方法は、夫々、画像復元方式、画像合成方式、画像鮮鋭化方式による補正方法である。
<< 4th Example >>
Next, a fourth embodiment will be described. In the fourth embodiment, a shake correction method for the correction target image Lw based on the correction target image Lw and the reference image Rw will be described. The shake correction process for performing this correction is executed in step S35 of FIG. As the blur correction methods for the correction target image Lw, first to third correction methods will be exemplified below. The first, second, and third correction methods are correction methods using an image restoration method, an image composition method, and an image sharpening method, respectively.

[第1の補正方法]
図17を参照して、第1の補正方法について説明する。図17は、第1の補正方法に基づくぶれ補正処理の流れを表すフローチャートである。第1の補正方法を採用する場合、図11のステップS35の処理は、図17のステップS71〜S78の各処理から形成される。尚、第1の補正方法の記述において、画像などが記憶される「メモリ」とは、内部メモリ14を意味するものとする。
[First correction method]
The first correction method will be described with reference to FIG. FIG. 17 is a flowchart showing the flow of blur correction processing based on the first correction method. When the first correction method is employed, the process of step S35 in FIG. 11 is formed from the processes of steps S71 to S78 in FIG. In the description of the first correction method, “memory” in which an image or the like is stored means the internal memory 14.

まず、ステップS71において、補正対象画像Lwの中から特徴的な小領域を抽出し、この抽出された小領域内の画像を小画像Lsとしてメモリ上に記憶する。例えば、ハリス(Harris)のコーナ検出器を用いて128×128画素の小領域を特徴的な小領域として抽出する。尚、特徴的な小領域の意義は、上述したとおりである。   First, in step S71, a characteristic small area is extracted from the correction target image Lw, and an image in the extracted small area is stored in the memory as a small image Ls. For example, a small area of 128 × 128 pixels is extracted as a characteristic small area by using a Harris corner detector. The significance of the characteristic small area is as described above.

次に、ステップS72において、補正対象画像Lwから抽出された小領域と同一座標の小領域を参照画像Rwから抽出し、参照画像Rwから抽出された小領域内の画像を小画像Rsとしてメモリ上に記憶する。今、補正対象画像Lwと参照画像Rwの画像サイズは等しいものとする。そうすると、補正対象画像Lwから抽出される小領域の中心座標(補正対象画像Lwにおける中心座標)と参照画像Rwから抽出される小領域の中心座標(参照画像Rwにおける中心座標)は等しく、且つ、両小領域の画像サイズも等しい。   Next, in step S72, a small region having the same coordinates as the small region extracted from the correction target image Lw is extracted from the reference image Rw, and an image in the small region extracted from the reference image Rw is stored in the memory as a small image Rs. To remember. Now, it is assumed that the image size of the correction target image Lw and the reference image Rw are equal. Then, the center coordinates of the small area extracted from the correction target image Lw (center coordinates in the correction target image Lw) and the center coordinates of the small area extracted from the reference image Rw (center coordinates in the reference image Rw) are equal, and The image sizes of both small areas are also equal.

参照画像Rwの露光時間は比較的短いため、小画像Rsの信号対雑音比(以下、S/N比という)は比較的低いと共に小画像Rsの輝度は比較的低い。そこで、ステップS73において、小画像Rsに対してメディアンフィルタ等を用いたノイズ除去処理を施し、更に、ノイズ除去処理後の小画像Rsの輝度レベルを増加させる。即ち例えば、小画像Rsの輝度レベルが小画像Lsの輝度レベルと等しくなるように(小画像Rsの平均輝度と小画像Lsの平均輝度が等しくなるように)、小画像Rsの各画素の輝度値に一定値を乗じるという輝度正規化処理を行う。ノイズ除去処理及び輝度正規化処理後の小画像Rsは小画像Rs’としてメモリ上に記憶される。   Since the exposure time of the reference image Rw is relatively short, the signal-to-noise ratio (hereinafter referred to as S / N ratio) of the small image Rs is relatively low and the luminance of the small image Rs is relatively low. Therefore, in step S73, noise removal processing using a median filter or the like is performed on the small image Rs, and the luminance level of the small image Rs after noise removal processing is further increased. That is, for example, the luminance level of each pixel of the small image Rs is set so that the luminance level of the small image Rs is equal to the luminance level of the small image Ls (the average luminance of the small image Rs is equal to the average luminance of the small image Ls). Luminance normalization is performed by multiplying the value by a fixed value. The small image Rs after the noise removal process and the luminance normalization process is stored in the memory as a small image Rs ′.

上述のようにして得られた小画像Lsを劣化画像として且つ小画像Rs’を初期復元画像として取り扱った上で(ステップS74)、ステップS75にてフーリエ反復法を実施することにより、小画像Lsのぶれによる劣化の状態を表す画像劣化関数を求める。   The small image Ls obtained as described above is treated as a deteriorated image and the small image Rs ′ is treated as an initial restored image (step S74), and then the Fourier iteration method is performed in step S75, whereby the small image Ls is obtained. An image deterioration function representing a state of deterioration due to blurring is obtained.

フーリエ反復法を実施する際、初期の復元画像(復元画像の初期値)を与えてやる必要があるが、この初期の復元画像を初期復元画像と呼ぶ。   When performing the Fourier iteration method, it is necessary to give an initial restored image (initial value of the restored image). This initial restored image is called an initial restored image.

画像劣化関数として点広がり関数(Point Spread Function;以下、PSFと呼ぶ)を求める。理想的な点像が撮像装置1のぶれによって画像上で描く軌跡にあわせて重み付けがなされたオペレータ或るいは空間フィルタは、PSFと呼ばれ、手ぶれの数学モデルとして一般的に使用される。手ぶれは画像全体に対して一様な劣化を与えるため、小画像Lsに対して求めたPSFは、補正対象画像Lwの全体に対するPSFとして利用することができる。   A point spread function (hereinafter referred to as PSF) is obtained as an image degradation function. An operator or a spatial filter in which an ideal point image is weighted in accordance with a trajectory drawn on the image by a shake of the image pickup apparatus 1 is called a PSF, and is generally used as a mathematical model of camera shake. Since camera shake uniformly degrades the entire image, the PSF obtained for the small image Ls can be used as the PSF for the entire correction target image Lw.

フーリエ反復法は、劣化を含む劣化画像から、劣化を除去或いは低減した復元画像を得る手法である(上記非特許文献1参照)。このフーリエ反復法を、図18及び図19を参照して詳細に説明する。図18は、図17のステップS75の処理の詳細フローチャートである。図19は、図4の補正処理部57に内在する、フーリエ反復法を実施する部位のブロック図である。   The Fourier iteration method is a method for obtaining a restored image from which deterioration is removed or reduced from a deteriorated image including deterioration (see Non-Patent Document 1 above). This Fourier iteration method will be described in detail with reference to FIGS. FIG. 18 is a detailed flowchart of the process in step S75 of FIG. FIG. 19 is a block diagram of a part in the correction processing unit 57 of FIG.

まず、ステップS101において、復元画像をf’とし、この復元画像f’に初期復元画像をセットする。即ち、初期の復元画像f’として小画像Rs’を用いるようにする。次に、ステップS102において、劣化画像(即ち、小画像Ls)をgとする。そして、劣化画像gをフーリエ変換したものをGとしてメモリ上に記憶しておく(ステップS103)。例えば、初期復元画像及び劣化画像の画像サイズが128×128画素の場合、f’及びgは、128×128の行列サイズを有する行列として表現できる。   First, in step S101, a restored image is set as f ', and an initial restored image is set in the restored image f'. That is, the small image Rs ′ is used as the initial restored image f ′. Next, in step S102, the deteriorated image (that is, the small image Ls) is set to g. Then, the result of Fourier transform of the deteriorated image g is stored in the memory as G (step S103). For example, when the image sizes of the initial restored image and the degraded image are 128 × 128 pixels, f ′ and g can be expressed as a matrix having a matrix size of 128 × 128.

次に、ステップS110において、復元画像f’をフーリエ変換したF’を求め、更にステップS111において、下記式(A−1)によりHを算出する。Hは、PSFをフーリエ変換したものに相当する。式(A−1)において、F’*は、F’の共役複素行列であり、αは、定数である。 Next, in step S110, F ′ obtained by Fourier transform of the restored image f ′ is obtained, and in step S111, H is calculated by the following equation (A-1). H corresponds to the result of Fourier transform of PSF. In Formula (A-1), F ′ * is a conjugate complex matrix of F ′, and α is a constant.

次に、ステップS112において、Hを逆フーリエ変換することにより、PSFを得る。ここで得られるPSFをhとする。次に、ステップS113において、PSF hを下記式(A−2a)の拘束条件で修正した後、更に式(A−2b)の拘束条件にて修正する。   Next, in step S112, PSF is obtained by performing inverse Fourier transform on H. The PSF obtained here is assumed to be h. Next, in step S113, PSF h is corrected under the constraint condition of the following formula (A-2a), and further corrected under the constraint condition of formula (A-2b).

PSF hは、2次元の行列として表現されるため、この行列の各要素をh(x,y)で表す。PSFの各要素は、本来、0以上且つ1以下の値をとるはずである。従って、ステップS113において、PSFの各要素が0以上且つ1以下であるかを判断し、0以上且つ1以下となっている要素の値はそのままにする一方、1より大きな要素がある場合はその要素の値を1に修正し、且つ、0より小さい要素がある場合はその要素の値を0に修正する。これが、式(A−2a)の拘束条件による修正である。そして、この修正後のPSFの各要素の総和が1となるように、PSFを正規化する。この正規化が、式(A−2b)の拘束条件による修正である。   Since PSF h is expressed as a two-dimensional matrix, each element of this matrix is represented by h (x, y). Each element of the PSF should originally take a value of 0 or more and 1 or less. Therefore, in step S113, it is determined whether each element of the PSF is 0 or more and 1 or less, and the value of the element that is 0 or more and 1 or less is left as it is. The value of the element is corrected to 1, and if there is an element smaller than 0, the value of the element is corrected to 0. This is correction by the constraint condition of Formula (A-2a). Then, the PSF is normalized so that the sum of the elements of the PSF after correction is 1. This normalization is a correction by the constraint condition of the formula (A-2b).

式(A−2a)及び(A−2b)の拘束条件によって修正されたPSFを、h'とする。   The PSF corrected by the constraints of the expressions (A-2a) and (A-2b) is set as h ′.

次に、ステップS114において、PSF h’をフーリエ変換したH’を求め、更にステップS115において、下記式(A−3)によりFを算出する。Fは、復元画像fをフーリエ変換したものに相当する。式(A−3)において、H’*は、H’の共役複素行列であり、βは、定数である。 Next, in step S114, H ′ obtained by Fourier transforming PSF h ′ is obtained, and in step S115, F is calculated by the following equation (A-3). F corresponds to a Fourier transform of the restored image f. In Formula (A-3), H ′ * is a conjugate complex matrix of H ′, and β is a constant.

次に、ステップS116において、Fを逆フーリエ変換することにより、復元画像を取得する。ここで得られる復元画像をfとする。次に、ステップS117において、復元画像fを下記式(A−4)の拘束条件で修正し、修正された復元画像を、新たにf’とする。   Next, in step S116, a restored image is obtained by performing an inverse Fourier transform on F. Let f be the restored image obtained here. Next, in step S117, the restored image f is corrected under the constraint condition of the following formula (A-4), and the corrected restored image is newly set as f '.

復元画像fは、2次元の行列として表現されるため、この行列の各要素をf(x,y)で表す。今、劣化画像及び復元画像の各画素の画素値が、0から255までのデジタル値にて表されるものとする。そうすると、復元画像fを表す行列の各要素(即ち、各画素値)は、本来、0以上且つ255以下の値をとるはずである。従って、ステップS117において、復元画像fを表す行列の各要素が0以上且つ255以下であるかを判断し、0以上且つ255以下となっている要素の値はそのままにする一方、255より大きな要素がある場合はその要素の値を255に修正し、且つ、0より小さい要素がある場合はその要素の値を0に修正する。これが、式(A−4)の拘束条件による修正である。   Since the restored image f is represented as a two-dimensional matrix, each element of the matrix is represented by f (x, y). Now, it is assumed that the pixel value of each pixel of the degraded image and the restored image is represented by a digital value from 0 to 255. Then, each element (that is, each pixel value) of the matrix representing the restored image f should originally have a value of 0 or more and 255 or less. Accordingly, in step S117, it is determined whether each element of the matrix representing the restored image f is 0 or more and 255 or less, and the value of the element that is 0 or more and 255 or less is left as it is. If there is an element, the value of the element is corrected to 255, and if there is an element smaller than 0, the value of the element is corrected to 0. This is correction by the constraint condition of Formula (A-4).

次に、ステップS118において、収束条件を満たすか否かを判断することによって、反復処理の収束判定を行う。   Next, in step S118, it is determined whether or not the convergence condition is satisfied, thereby determining whether or not the iterative process is converged.

例えば、最新のF'と1つ前に得られたF'との差分の絶対値を収束判定の指標として用いる。この指標が所定の閾値以下の場合、収束条件が満たされると判断する一方、そうでない場合、収束条件は満たされないと判断する。   For example, the absolute value of the difference between the latest F ′ and the previous F ′ is used as an index for convergence determination. If this index is less than or equal to a predetermined threshold value, it is determined that the convergence condition is satisfied. Otherwise, it is determined that the convergence condition is not satisfied.

収束条件が満たされる場合、最新のH'を逆フーリエ変換したものを最終的なPSFとする。即ち、この最新のH'を逆フーリエ変換したものが、図17のステップS75で求められるべきPSFとなる。収束条件が満たされない場合、ステップS110に戻り、ステップS110〜S118の各処理を繰り返す。ステップS110〜S118の各処理の繰り返しにおいて、f'、F'、H、h、h'、H'、F及びf(図19参照)は、順次、最新のものに更新されていく。   When the convergence condition is satisfied, a final PSF is obtained by performing inverse Fourier transform on the latest H ′. That is, the latest H ′ obtained by inverse Fourier transform is the PSF to be obtained in step S75 of FIG. When the convergence condition is not satisfied, the process returns to step S110, and the processes of steps S110 to S118 are repeated. In the repetition of each process of steps S110 to S118, f ′, F ′, H, h, h ′, H ′, F, and f (see FIG. 19) are sequentially updated to the latest ones.

収束判定の指標として、他の指標を用いることも可能である。例えば、最新のH'と1つ前に得られたH'との差分の絶対値を収束判定の指標として用いて、上記の収束条件の成立/不成立を判断してもよい。また例えば、上記式(A−2a)及び(A−2b)を用いたステップS113における修正量、或いは、式(A−4)を用いたステップS117における修正量を収束判定の指標として用いて、上記の収束条件の成立/不成立を判断してもよい。反復処理が収束に向かえば、それらの修正量が小さくなるからである。   Another index can be used as an index for determining convergence. For example, the absolute value of the difference between the latest H ′ and the previous H ′ obtained may be used as the convergence determination index to determine whether or not the convergence condition is satisfied. Further, for example, the correction amount in step S113 using the above formulas (A-2a) and (A-2b) or the correction amount in step S117 using formula (A-4) is used as an index for convergence determination. Whether or not the convergence condition is satisfied may be determined. This is because if the iterative process is toward convergence, the amount of correction becomes small.

また、ステップS110〜S118から成るループ処理の繰り返し回数が所定回数に達した場合、収束不可と判断して、最終的なPSFを算出することなく処理を終了するようにしてもよい。この場合、補正対象画像Lwの補正は行われない。   Further, when the number of repetitions of the loop process consisting of steps S110 to S118 reaches a predetermined number, it may be determined that convergence is impossible and the process may be terminated without calculating a final PSF. In this case, the correction target image Lw is not corrected.

図17の各ステップの説明に戻る。ステップS75にて、PSFが算出された後、ステップS76に移行する。ステップS76では、ステップS75で求められたPSFの逆行列の各要素を画像復元フィルタの各フィルタ係数として求める。この画像復元フィルタは、劣化画像から復元画像を得るためのフィルタである。実際には、上記式(A−3)の右辺の一部に相当する下記式(A−5)にて表される行列の各要素が、画像復元フィルタの各フィルタ係数に相当するため、ステップS75におけるフーリエ反復法の計算途中結果をそのまま利用可能である。但し、式(A−5)におけるH’*及びH’は、ステップS118の収束条件の成立直前に得られたH’*及びH’(即ち、最終的に得られたH’*及びH’)である。 Returning to the description of each step in FIG. After the PSF is calculated in step S75, the process proceeds to step S76. In step S76, each element of the inverse matrix of the PSF obtained in step S75 is obtained as each filter coefficient of the image restoration filter. This image restoration filter is a filter for obtaining a restored image from a deteriorated image. Actually, each element of the matrix represented by the following equation (A-5) corresponding to a part of the right side of the above equation (A-3) corresponds to each filter coefficient of the image restoration filter. The intermediate calculation result of the Fourier iteration method in S75 can be used as it is. However, the formula H '* and H' is in the (A-5), H obtained satisfied immediately before the convergence condition in step S118 '* and H' (i.e., the finally obtained H '* and H' ).

ステップS76にて画像復元フィルタの各フィルタ係数が求められた後、ステップS77に移行し、この画像復元フィルタを用いて補正対象画像Lwの全体をフィルタリング(空間フィルタリング)する。即ち、求められた各フィルタ係数を有する画像復元フィルタを補正対象画像Lwの各画素に適用して補正対象画像Lwをフィルタリングする。これにより、補正対象画像Lwに含まれるぶれを低減したフィルタリング画像が生成される。画像復元フィルタのサイズは補正対象画像Lwの画像サイズよりも小さいが、手ぶれは画像全体に一様な劣化を与えると考えられるため、この画像復元フィルタを補正対象画像Lwの全体に対して適用することによって、補正対象画像Lwの全体のぶれが低減される。   After each filter coefficient of the image restoration filter is obtained in step S76, the process proceeds to step S77, and the entire correction target image Lw is filtered (spatial filtering) using the image restoration filter. In other words, the correction target image Lw is filtered by applying an image restoration filter having the obtained filter coefficients to each pixel of the correction target image Lw. Thereby, a filtered image with reduced blur included in the correction target image Lw is generated. Although the size of the image restoration filter is smaller than the image size of the correction target image Lw, it is considered that camera shake causes uniform degradation on the entire image. Therefore, this image restoration filter is applied to the entire correction target image Lw. Thus, the overall blurring of the correction target image Lw is reduced.

フィルタリング画像には、フィルタリングに伴うリンギングが含まれうる。このため、ステップS78において、これを除去するためのリンギング除去処理をフィルタリング画像に施すことにより最終的なぶれ補正画像Qwを生成する。リンギングを除去する手法は公知であるため、詳細な説明を割愛する。その手法として、例えば特開2006−129236号公報に記載の手法を用いればよい。   The filtering image may include ringing accompanying filtering. For this reason, in step S78, a final blurring correction image Qw is generated by applying a ringing removal process for removing this to the filtered image. Since the method for removing ringing is known, a detailed description is omitted. For example, a technique described in JP 2006-129236 A may be used.

ぶれ補正画像Qwは、補正対象画像Lwに含まれるぶれが低減され且つフィルタリングに伴うリンギングが低減された画像となる。但し、フィルタリング画像もぶれが低減された画像であるため、フィルタリング画像をぶれ補正画像Qwとして捉えることも可能である。   The blur correction image Qw is an image in which blur included in the correction target image Lw is reduced and ringing due to filtering is reduced. However, since the filtered image is also an image with reduced blur, the filtered image can also be regarded as the shake-corrected image Qw.

参照画像Rwに含まれるぶれ量は少ないため、それのエッジ成分は、手ぶれのない理想画像のエッジ成分に近い。従って、上述の如く、この参照画像Rwから得られる画像をフーリエ反復法における初期復元画像とする。   Since the amount of blur included in the reference image Rw is small, its edge component is close to the edge component of an ideal image without camera shake. Therefore, as described above, an image obtained from this reference image Rw is used as an initial restored image in the Fourier iteration method.

フーリエ反復法によるループ処理の繰り返しによって、復元画像(f')は、手ぶれが極力除去された画像に徐々に近づいていくが、初期復元画像自体が既に手ぶれのない画像に近いため、従来の如くランダム画像や劣化画像を初期復元画像とするよりも収束が早くなる(最短では、1回のループ処理で収束する)。この結果、手ぶれ情報(PSF又は画像復元フィルタのフィルタ係数)作成用の処理時間及び手ぶれ補正用の処理時間が短縮される。また、初期復元画像が収束すべき画像からかけ離れていると局所解(真に収束すべき画像とは異なる画像)に収束する確率が高くなるが、上述のように初期復元画像を設定することにより、局所解に収束する確率が低くなる(即ち、手ぶれ補正に失敗する確率が低くなる)。   By repetitive loop processing by the Fourier iteration method, the restored image (f ′) gradually approaches an image from which camera shake has been removed as much as possible. However, since the initial restored image itself is already close to an image without camera shake, Convergence is faster than a random image or a deteriorated image as an initial restored image (in the shortest, convergence is achieved by a single loop process). As a result, the processing time for generating camera shake information (PSF or filter coefficient of the image restoration filter) and the processing time for camera shake correction are shortened. If the initial restored image is far from the image to be converged, the probability of convergence to a local solution (an image different from the image to be truly converged) increases. However, by setting the initial restored image as described above, , The probability of convergence to a local solution is low (that is, the probability that camera shake correction fails) is low.

また、手ぶれは画像全体に一様な劣化を与えると考えられるため、各画像から小領域を抽出して各小領域の画像データから手ぶれ情報(PSF又は画像復元フィルタのフィルタ係数)を作成し、それを画像全体に適用する。これにより、必要な演算量が低減され、手ぶれ情報作成用の処理時間及び手ぶれ補正用の処理時間が短縮される。勿論、必要回路の規模縮小化やそれに伴うコストダウン効果も見込める。   In addition, camera shake is thought to give uniform degradation to the entire image, so a small area is extracted from each image to create camera shake information (PSF or filter coefficient of the image restoration filter) from the image data of each small area, Apply it to the entire image. As a result, the amount of calculation required is reduced, and the processing time for creating camera shake information and the processing time for correcting camera shake are shortened. Of course, the required circuit scale can be reduced and the cost reduction effect can be expected.

この際、上述の如く、エッジ成分を多く含む特徴的な小領域を自動的に抽出するようにする。PSFの算出元画像におけるエッジ成分の増大は、雑音成分に対する信号成分の割合の増大を意味するため、特徴的な小領域の抽出によって雑音の影響が小さくなり、手ぶれ情報をより正確に検出することができるようになる。   At this time, as described above, a characteristic small region containing a lot of edge components is automatically extracted. An increase in the edge component in the PSF calculation source image means an increase in the ratio of the signal component to the noise component. Therefore, the influence of noise is reduced by extracting a characteristic small region, and camera shake information is detected more accurately. Will be able to.

尚、図18の処理では、空間領域上における劣化画像g及び復元画像f’がフーリエ変換によって周波数領域上に変換されることで、周波数領域上の劣化画像gを表す関数G及び周波数領域上の復元画像f’を表す関数F’が求められる(尚、周波数領域とは、勿論、二次元の周波数領域である)。求められた関数G及びF’から周波数領域上のPSFを表す関数Hが求められ、この関数Hは逆フーリエ変換によって空間領域上の関数、即ち、PSF hに変換される。このPSF hは、所定の拘束条件を用いて修正され、修正後のPSF h'が求められる。このPSFを修正する処理を、以下「第1の修正処理」と呼ぶ。   In the process of FIG. 18, the degraded image g and the restored image f ′ on the spatial domain are transformed to the frequency domain by Fourier transform, so that the function G representing the degraded image g on the frequency domain and the frequency domain A function F ′ representing the restored image f ′ is obtained (note that the frequency domain is, of course, a two-dimensional frequency domain). A function H representing PSF in the frequency domain is obtained from the obtained functions G and F ′, and this function H is converted into a function in the spatial domain, that is, PSF h by inverse Fourier transform. The PSF h is corrected using a predetermined constraint condition, and a corrected PSF h ′ is obtained. The process of correcting the PSF is hereinafter referred to as “first correction process”.

PSF h'はフーリエ変換によって再度、周波数領域上に変換されて関数H’が求められ、関数H’と関数Gから周波数領域上の復元画像を表す関数Fが求められる。この関数Fを逆フーリエ変換することによって空間領域上の復元画像fが得られ、この復元画像fが所定の拘束条件を用いて修正されて、修正後の復元画像f’が求められる。この復元画像を修正する処理を、以下「第2の修正処理」と呼ぶ。   PSF h ′ is again transformed onto the frequency domain by Fourier transform to obtain a function H ′, and a function F representing a restored image on the frequency domain is obtained from the functions H ′ and G. By performing inverse Fourier transform on this function F, a restored image f in the spatial domain is obtained, and this restored image f is corrected using a predetermined constraint condition, and a corrected restored image f ′ is obtained. The processing for correcting the restored image is hereinafter referred to as “second correction processing”.

上述の例では、この後、図18のステップS118にて収束条件が満たされるまで、修正後の復元画像f’を用いて上述の処理が反復されると述べた。また、反復処理が収束に向かえば修正量が小さくなるという特性を考慮し、この収束条件の成立/不成立を、第1の修正処理に対応するステップS113での修正量、又は、第2の修正処理に対応するステップS117での修正量に基づいて判断しても良いとも述べた。この判断を修正量に基づいて行う場合、基準修正量を予め設定しておき、ステップS113での修正量又はステップS117での修正量と基準修正量とを比較して、前者が後者よりも小さい場合に収束条件が成立すると判断することになるが、基準修正量を十分に大きく設定しておけば、ステップS110〜S117の処理は反復実行されない。つまり、この場合、第1の修正処理を1回だけ行って得たPSF h'が、図17のステップS75で導出されるべき最終的なPSFとなる。このように、図18の処理を用いたとしても、第1及び第2の修正処理が繰り返し実行されるとは限らない。   In the above-described example, it has been described that, after that, the above-described processing is repeated using the corrected restored image f ′ until the convergence condition is satisfied in step S <b> 118 of FIG. 18. Further, considering the characteristic that the correction amount becomes smaller when the iterative process is toward convergence, the establishment / non-establishment of the convergence condition is determined by the correction amount in step S113 corresponding to the first correction process or the second correction. It has also been stated that the determination may be made based on the correction amount in step S117 corresponding to the processing. When this determination is made based on the correction amount, a reference correction amount is set in advance, and the correction amount in step S113 or the correction amount in step S117 is compared with the reference correction amount, and the former is smaller than the latter. In this case, it is determined that the convergence condition is satisfied. However, if the reference correction amount is set sufficiently large, the processes in steps S110 to S117 are not repeatedly executed. That is, in this case, PSF h ′ obtained by performing the first correction process only once is the final PSF to be derived in step S75 of FIG. As described above, even if the process of FIG. 18 is used, the first and second correction processes are not always repeatedly executed.

第1及び第2の修正処理の繰り返し実行回数の増大は、最終的に求まるPSFの精度向上に寄与するが、本例では初期復元画像自体が既に手ぶれのない画像に近いため、第1の修正処理を1回だけ行って得たPSF h’の精度も、実用上、問題ない程度に高い。これを考慮すれば、ステップS118の判定処理自体を省略することも可能である。この場合、1回だけステップS113の処理を実行することで求まるPSF h’が図17のステップS75で導出されるべき最終的なPSFとなり、1回だけステップS114の処理を実行することで求まる関数H’から、図17のステップS76で導出されるべき画像復元フィルタの各フィルタ係数が求まる。故に、ステップS118の処理を省略する場合は、ステップS115〜S117の処理も割愛される。   The increase in the number of repeated executions of the first and second correction processes contributes to improving the accuracy of the finally obtained PSF. However, in this example, since the initial restoration image itself is close to an image without camera shake, the first correction is performed. The accuracy of PSF h ′ obtained by performing the treatment only once is also high enough to cause no problem. In consideration of this, the determination process itself in step S118 can be omitted. In this case, PSF h ′ obtained by executing the process of step S113 only once becomes the final PSF to be derived in step S75 of FIG. 17, and the function obtained by executing the process of step S114 only once. From H ′, each filter coefficient of the image restoration filter to be derived in step S76 in FIG. 17 is obtained. Therefore, when the process of step S118 is omitted, the processes of steps S115 to S117 are also omitted.

また、第1の補正方法を採用する場合、参照画像Rwの生成元の短露光画像の全画像データを記録媒体16に記録しておく必要は必ずしもなく、短露光画像の全画像データの内、小画像Rsの画像データのみを記録媒体16に記録しておくようにすれば、ぶれ補正画像Qwの生成は可能である。これを実現するための処理例を以下に説明する。尚、この処理例は、後述の第3の補正方法に対しても適用可能である。説明の具体化のため、図7(b)に対応する第2撮影パターンを用いて被記録画像列が取得され、参照画像Rwの元となる短露光画像が短露光画像B1であって且つ補正対象画像Lwの元となる通常露光画像が通常露光画像A1である場合を考える。 Further, when the first correction method is adopted, it is not always necessary to record all image data of the short-exposure image from which the reference image Rw is generated on the recording medium 16, and among all the image data of the short-exposure image, If only the image data of the small image Rs is recorded in the recording medium 16, it is possible to generate the shake correction image Qw. A processing example for realizing this will be described below. This processing example can also be applied to a third correction method described later. For the sake of specific description, a recorded image sequence is acquired using the second shooting pattern corresponding to FIG. 7B, the short exposure image that is the basis of the reference image Rw is the short exposure image B 1 , and Consider a case where the normal exposure image that is the basis of the correction target image Lw is the normal exposure image A 1 .

この場合、撮影動作時において、図4の記録制御部53は、ハリスのコーナ検出器等を用いることによって短露光画像B1の中から特徴的な小領域を抽出し、この抽出された小領域内の画像の画像データを、その小領域の中心座標(短露光画像B1における中心座標)と共に画像ファイルFI2のヘッダ領域に記録する。そして、この抽出された画像に、エッジ除去処理、及び、通常露光撮影と短露光撮影との間における露光時間の相違に由来する輝度レベル差を打ち消すための輝度正規化処理を施して得た画像を、小画像Rs’として取り扱うようにする。尚、小画像Rsの画像データではなく、この小画像Rs’の画像データを画像ファイルFI2のヘッダ領域に記録するようにしてもよい。図11に対応するぶれ補正動作時には、図4の補正処理部57が、小画像Rs’をテンプレートとし、周知のテンプレートマッチング法を用いて、そのテンプレートとの類似度が最も高い小領域を補正対象画像Lwとしての通常露光画像A1内から探索する。探索範囲は、画像ファイルFI2のヘッダ領域に記録された中心座標(小画像Rs’についての中心座標)に基づいて設定される。そして、探索された小領域内の画像を小画像Lsとして取り扱うようにする。小画像Rs’及び小画像Lsが得られた後の動作は上述した通りである。 In this case, during the photographing operation, the recording control unit 53 in FIG. 4 extracts a characteristic small area from the short-exposure image B 1 by using a Harris corner detector or the like, and the extracted small area The image data of the inside image is recorded in the header area of the image file FI 2 together with the center coordinates of the small area (center coordinates in the short exposure image B 1 ). Then, an image obtained by subjecting the extracted image to edge normalization processing and luminance normalization processing for canceling a luminance level difference resulting from a difference in exposure time between normal exposure photography and short exposure photography. Are handled as a small image Rs ′. Note that the image data of the small image Rs ′ may be recorded in the header area of the image file FI 2 instead of the image data of the small image Rs. At the time of the shake correction operation corresponding to FIG. 11, the correction processing unit 57 of FIG. 4 uses the small image Rs ′ as a template and uses a known template matching method to correct a small region having the highest similarity with the template. Search is performed from the normal exposure image A 1 as the image Lw. The search range is set based on the center coordinates (center coordinates for the small image Rs ′) recorded in the header area of the image file FI 2 . Then, the searched image in the small area is handled as the small image Ls. The operation after the small image Rs ′ and the small image Ls are obtained is as described above.

[第2の補正方法]
次に、図20及び図21を参照して、第2の補正方法について説明する。図20は、第2の補正方法に基づくぶれ補正処理の流れを表すフローチャートである。図21は、このぶれ補正処理の流れを表す概念図である。第2の補正方法を採用する場合、図11のステップS35の処理は、図20のステップS151〜S154の各処理から形成される。
[Second correction method]
Next, the second correction method will be described with reference to FIGS. FIG. 20 is a flowchart showing the flow of blur correction processing based on the second correction method. FIG. 21 is a conceptual diagram showing the flow of this blur correction process. When the second correction method is employed, the process in step S35 in FIG. 11 is formed from the processes in steps S151 to S154 in FIG.

図1の撮像部11の撮影によって得られる画像は、輝度に関する情報と色に関する情報を含むカラー画像となっている。従って、補正対象画像Lwを形成する各画素の画素信号は、画素の輝度を表す輝度信号と、画素の色を表す色信号から形成される。今、各画素の画素信号がYUV形式で表現されているものとする。この場合、色信号は2つの色差信号U及びVから形成されることなる。そして、補正対象画像Lwを形成する各画素の画素信号は、画素の輝度を表す輝度信号Yと、画素の色を表す2つの色差信号U及びVと、から形成される。   1 is a color image including information on luminance and information on color. Accordingly, the pixel signal of each pixel that forms the correction target image Lw is formed from a luminance signal that represents the luminance of the pixel and a color signal that represents the color of the pixel. Now, it is assumed that the pixel signal of each pixel is expressed in YUV format. In this case, the color signal is formed from the two color difference signals U and V. The pixel signal of each pixel forming the correction target image Lw is formed from a luminance signal Y that represents the luminance of the pixel and two color difference signals U and V that represent the color of the pixel.

そうすると、補正対象画像Lwは、図21に示す如く、画素信号として輝度信号Yのみを含む画像LwYと、画素信号として色差信号Uのみを含む画像LwUと、画素信号として色差信号Vのみを含む画像LwVと、に分解することができる。同様に、参照画像Rwも、画素信号として輝度信号Yのみを含む画像RwYと、画素信号として色差信号Uのみを含む画像RwUと、画素信号として色差信号Vのみを含む画像RwVと、に分解できる(図21では、画像RwYのみ図示)。 Then, the correction target image Lw includes, as shown in FIG. 21, an image Lw Y including only the luminance signal Y as the pixel signal, an image Lw U including only the color difference signal U as the pixel signal, and only the color difference signal V as the pixel signal. an image Lw V containing, can be decomposed into. Similarly, the reference image Rw includes an image Rw Y including only the luminance signal Y as a pixel signal, an image Rw U including only the color difference signal U as a pixel signal, an image Rw V including only the color difference signal V as a pixel signal, (In FIG. 21, only the image Rw Y is shown).

図20のステップS151では、まず、補正対象画像Lwの輝度信号及び色差信号を抽出することにより、画像LwY、LwU及びLwVを生成する。続くステップS152では、参照画像Rwの輝度信号を抽出することにより、画像RwYを生成する。 In step S151 of FIG. 20, first, images Lw Y , Lw U and Lw V are generated by extracting the luminance signal and color difference signal of the correction target image Lw. In step S152, by extracting a brightness signal of the reference image Rw, and generates an image Rw Y.

画像RwYは低輝度であるため、ステップS153おいて、画像RwYの輝度レベルを増加させる。即ち例えば、画像RwYの輝度レベルが画像LwYの輝度レベルと等しくなるように(画像RwYの平均輝度と画像LwYの平均輝度が等しくなるように)、画像RwYの各画素の輝度値に一定値を乗じるという輝度正規化処理を行う。更に、この輝度正規化処理後の画像RwYに対して、メディアンフィルタ等を用いたノイズ除去処理を施す。輝度正規化処理及びノイズ除去処理後の画像RwYは画像RwY’としてメモリ上に記憶される。 Since the image Rw Y has low luminance, the luminance level of the image Rw Y is increased in step S153. That is, for example, the luminance level of each pixel of the image Rw Y is set so that the luminance level of the image Rw Y is equal to the luminance level of the image Lw Y (so that the average luminance of the image Rw Y is equal to the average luminance of the image Lw Y ). Luminance normalization is performed by multiplying the value by a fixed value. Furthermore, noise removal processing using a median filter or the like is performed on the image Rw Y after the luminance normalization processing. The image Rw Y after the luminance normalization processing and noise removal processing is stored on the memory as an image Rw Y ′.

その後、ステップS154において、画像LwU及びLwVと画像RwY’が合成され、この合成によって得られた画像がぶれ補正画像Qwとして出力される。ぶれ補正画像Qw内の座標(x,y)に位置する画素の画素信号は、座標(x,y)に位置する画像LwU内の画素の画素信号と、座標(x,y)に位置する画像LwV内の画素の画素信号と、座標(x,y)に位置する画像RwY’内の画素の画素信号と、から形成されることとなる。 Thereafter, in step S154, the images Lw U and Lw V and the image Rw Y 'are combined, and the image obtained by this combination is output as a blurring corrected image Qw. The pixel signal of the pixel located at the coordinate (x, y) in the shake correction image Qw is located at the coordinate (x, y) with the pixel signal of the pixel in the image Lw U located at the coordinate (x, y). It is formed from the pixel signal of the pixel in the image Lw V and the pixel signal of the pixel in the image Rw Y 'located at the coordinates (x, y).

カラー画像において、見た目のぶれは主に輝度のぶれによって引き起こされ、輝度のエッジ成分がぶれのない理想画像のそれに近ければ、観察者はぶれが少ないと感じる。従って、本補正方法では、ぶれ量の比較的少ない参照画像Rwの輝度信号を補正対象画像Lwの色信号に合成することによって擬似的な手ぶれ補正効果を得る。この方法によれば、エッジ近傍で色ずれが生じることとなるが、見た目においてぶれの少ない画像を低い計算コストで生成することができる。   In color images, visual blur is mainly caused by luminance blur, and if the edge component of luminance is close to that of an ideal image without blur, the viewer feels that there is little blur. Therefore, in this correction method, a pseudo camera shake correction effect is obtained by combining the luminance signal of the reference image Rw with a relatively small amount of blur with the color signal of the correction target image Lw. According to this method, although color misregistration occurs in the vicinity of the edge, an image with less blurring in appearance can be generated at a low calculation cost.

[第3の補正方法]
次に、図22及び図23を参照して、第3の補正方法について説明する。図22は、第3の補正方法に基づくぶれ補正処理の流れを表すフローチャートである。図23は、このぶれ補正処理の流れを表す概念図である。第3の補正方法を採用する場合、図11のステップS35の処理は、図22のステップS201〜S207の各処理から形成される。
[Third correction method]
Next, the third correction method will be described with reference to FIGS. FIG. 22 is a flowchart showing the flow of blur correction processing based on the third correction method. FIG. 23 is a conceptual diagram showing the flow of this blur correction process. When the third correction method is employed, the process of step S35 in FIG. 11 is formed from the processes of steps S201 to S207 in FIG.

まず、ステップS201において、補正対象画像Lwから特徴的な小領域を抽出することによって小画像Lsを生成し、ステップS202において、参照画像Rwから小画像Lsに対応する小領域を抽出することによって小画像Rsを生成する。このステップS201及びS202の処理は、図17のステップS71及びS72の処理と同じである。続いてステップS203おいて、小画像Rsに対してメディアンフィルタ等を用いたノイズ除去処理を施し、更に、ノイズ除去処理後の小画像Rsの輝度レベルを増加させる。即ち例えば、小画像Rsの輝度レベルが小画像Lsの輝度レベルと等しくなるように(小画像Rsの平均輝度と小画像Lsの平均輝度が等しくなるように)、小画像Rsの各画素の輝度値に一定値を乗じるという輝度正規化処理を行う。ノイズ除去処理及び輝度正規化処理後の小画像Rsは小画像Rs’としてメモリ上に記憶される。   First, in step S201, a small image Ls is generated by extracting a characteristic small region from the correction target image Lw. In step S202, a small region corresponding to the small image Ls is extracted from the reference image Rw. An image Rs is generated. The processing in steps S201 and S202 is the same as the processing in steps S71 and S72 in FIG. Subsequently, in step S203, noise removal processing using a median filter or the like is performed on the small image Rs, and the luminance level of the small image Rs after noise removal processing is further increased. That is, for example, the luminance level of each pixel of the small image Rs is set so that the luminance level of the small image Rs is equal to the luminance level of the small image Ls (the average luminance of the small image Rs is equal to the average luminance of the small image Ls). Luminance normalization is performed by multiplying the value by a fixed value. The small image Rs after the noise removal process and the luminance normalization process is stored in the memory as a small image Rs ′.

次に、ステップS204において、互いに異なる8種類の平滑化フィルタを用いて小画像Rs’をフィルタリングすることにより、平滑化度合いの異なる8つの平滑化小画像RsG1、RsG2、・・・、RsG8を生成する。今、8つの平滑化フィルタとして互いに異なる8つのガウシアンフィルタを用いるものとし、各ガウシアンフィルタによって表されるガウス分布の分散をσ2で表す。 Next, in step S204, by filtering the small image Rs ′ using eight different smoothing filters, eight smoothed small images Rs G1 , Rs G2 ,. Generate G8 . Now, eight different Gaussian filters are used as the eight smoothing filters, and the variance of the Gaussian distribution represented by each Gaussian filter is represented by σ 2 .

一次元の画像に着目し、その一次元の画像における画素の位置をxで表した場合、平均が0且つ分散がσ2のガウス分布は下記式(B−1)によって表されることが一般的に知られている(図24参照)。このガウス分布をガウシアンフィルタに適用すると、ガウシアンフィルタの各フィルタ係数はhg(x)で表される。つまり、ガウシアンフィルタを位置0の画素に適用する時、位置xにおけるフィルタ係数はhg(x)で表される。換言すれば、ガウシアンフィルタによるフィルタリング後の位置0の画素値に対する、フィルタリング前の位置xの画素値の寄与率はhg(x)で表される。 When attention is paid to a one-dimensional image and the pixel position in the one-dimensional image is represented by x, a Gaussian distribution having an average of 0 and a variance of σ 2 is generally represented by the following formula (B-1). (See FIG. 24). When this Gaussian distribution is applied to a Gaussian filter, each filter coefficient of the Gaussian filter is represented by h g (x). That is, when the Gaussian filter is applied to the pixel at position 0, the filter coefficient at position x is represented by h g (x). In other words, the contribution ratio of the pixel value at the position x before filtering to the pixel value at the position 0 after filtering by the Gaussian filter is represented by h g (x).

この考え方を二次元に拡張し、二次元の画像における画素の位置を(x,y)で表した場合、二次元ガウス分布は、下記式(B−2)によって表される。尚、x及びyは、それぞれ、水平方向の位置及び垂直方向の位置を表している。この二次元ガウス分布をガウシアンフィルタに適用すると、ガウシアンフィルタの各フィルタ係数はhg(x,y)で表され、ガウシアンフィルタを位置(0,0)の画素に適用する時、位置(x,y)におけるフィルタ係数はhg(x,y)で表される。つまり、ガウシアンフィルタによるフィルタリング後の位置(0,0)の画素値に対する、フィルタリング前の位置(x,y)の画素値の寄与率はhg(x,y)で表される。 When this concept is extended to two dimensions and the pixel position in the two-dimensional image is represented by (x, y), the two-dimensional Gaussian distribution is represented by the following formula (B-2). Note that x and y represent a horizontal position and a vertical position, respectively. When this two-dimensional Gaussian distribution is applied to the Gaussian filter, each filter coefficient of the Gaussian filter is represented by h g (x, y). When the Gaussian filter is applied to the pixel at the position (0, 0), the position (x, The filter coefficient in y) is represented by h g (x, y). That is, the contribution ratio of the pixel value at the position (x, y) before filtering to the pixel value at the position (0, 0) after filtering by the Gaussian filter is represented by h g (x, y).

ステップS204では、8つのガウシアンフィルタとして、σ=1,3,5,7,9,11,13,15のガウシアンフィルタを用いることとする。続くステップS205では、小画像Lsと平滑化小画像RsG1〜RsG8の夫々との間で画像マッチングを行い、平滑化小画像RsG1〜RsG8の内、最もマッチング誤差が小さくなる平滑化小画像(即ち、小画像Lsとの相関性が最も高い平滑化小画像)を特定する。 In step S204, Gaussian filters with σ = 1, 3, 5, 7, 9, 11, 13, and 15 are used as the eight Gaussian filters. In the subsequent step S205, image matching is performed between the small image Ls and each of the smoothed small images Rs G1 to Rs G8 , and among the smoothed small images Rs G1 to Rs G8 , the smoothing small that has the smallest matching error. An image (that is, a smoothed small image having the highest correlation with the small image Ls) is specified.

平滑化小画像RsG1に着目し、小画像Lsと平滑化小画像RsG1を対比した時のマッチング誤差(マッチング残差)の算出法を簡単に説明する。小画像Lsと平滑化小画像RsG1の画像サイズは同じであり、それらの水平方向の画素数及び垂直方向の画素数を夫々MN及びNNとする(MN及びNNは、2以上の整数)。小画像Ls内の位置(x,y)における画素の画素値をVLs(x,y)にて表し、平滑化小画像RsG1内の位置(x,y)における画素の画素値をVRs(x,y)にて表す。(但し、x及びyは、0≦x≦MN−1且つ0≦y≦NN−1、を満たす整数)。そうすると、対比画像間におけるSAD(Sum of Absolute Difference)を表すRSADは下記式(B−3)に従って算出され、対比画像間におけるSSD(Sum of Square Difference)を表すRSSDは下記式(B−4)に従って算出される。 Focusing on the smoothed small image Rs G1, briefly explaining the calculation method of the small image Ls and the smoothed small image Rs G1 matching error when the comparison (matching residuals). The image sizes of the small image Ls and the smoothed small image Rs G1 are the same, and the number of pixels in the horizontal direction and the number of pixels in the vertical direction are respectively M N and N N (M N and N N are 2 or more) Integer). The pixel value of the pixel at the position (x, y) in the small image Ls is represented by V Ls (x, y), and the pixel value of the pixel at the position (x, y) in the smoothed small image Rs G1 is represented by V Rs. It is represented by (x, y). (Where x and y are integers satisfying 0 ≦ x ≦ M N −1 and 0 ≦ y ≦ N N −1). Then, R SAD representing SAD (Sum of Absolute Difference) between contrast images is calculated according to the following formula (B-3), and R SSD representing SSD (Sum of Square Difference) between contrast images is represented by the following formula (B− Calculated according to 4).

このRSAD又はRSSDを、小画像Lsと平滑化小画像RsG1との間におけるマッチング誤差とする。同様にして、小画像Lsと平滑化小画像RsG2〜RsG8の夫々との間におけるマッチング誤差も求め、最もマッチング誤差が小さくなる平滑化小画像を特定する。今、σ=5に対応する平滑化小画像RsG3が特定されたとする。ステップS205では、平滑化小画像RsG3に対応するσをσ’とする。即ち、σ’の値は5となる。 Let R SAD or R SSD be a matching error between the small image Ls and the smoothed small image Rs G1 . Similarly, a matching error between the small image Ls and each of the smoothed small images Rs G2 to Rs G8 is also obtained, and the smoothed small image with the smallest matching error is specified. Now, it is assumed that the smoothed small image Rs G3 corresponding to σ = 5 is specified. In step S205, σ corresponding to the smoothed small image Rs G3 is set to σ ′. That is, the value of σ ′ is 5.

続くステップS206では、このσ’によって表されるガウスぼけを補正対象画像Lwの劣化の状態を表す画像劣化関数として取り扱うことにより、補正対象画像Lwの劣化除去を図る。   In the subsequent step S206, the Gaussian blur represented by σ 'is treated as an image degradation function representing the degradation state of the correction target image Lw, thereby deteriorating the correction target image Lw.

具体的には、ステップS206では、σ’に基づいて補正対象画像Lwの全体にアンシャープマスクフィルタを適用することにより、補正対象画像Lwのぶれを除去する。アンシャープマスクフィルタの適用前の画像を入力画像IINPUTとし、アンシャープマスクフィルタの適用後の画像を出力画像IOUTPUTとして、アンシャープマスクフィルタの処理内容を説明する。まず、アンシャープフィルタとしてσ’のガウシアンフィルタ(即ち、σ=5のガウシアンフィルタ)を採用し、このσ’のガウシアンフィルタを用いて入力画像IINPUTをフィルタリングすることにより、ぼかし画像IBLURを生成する。次に、入力画像IINPUTの各画素値からぼかし画像IBLURの各画素値を差し引くことにより、入力画像IINPUTとぼかし画像IBLURとの間の差分画像IDELTAを生成する。最後に、入力画像IINPUTの各画素値に差分画像IDELTAの各画素値を加算することによって得られた画像を、出力画像IOUTPUTとする。入力画像IINPUTと出力画像IOUTPUTとの関係式を式(B−5)に示す。式(B−5)において、(IINPUT・Gauss)は、σ’のガウシアンフィルタを用いて入力画像IINPUTをフィルタリングした結果を表している。
OUTPUT =IINPUT+IDELTA
=IINPUT+(IINPUT−IBLUR)
=IINPUT+(IINPUT−(IINPUT・Gauss) ・・・(B−5)
Specifically, in step S206, blurring of the correction target image Lw is removed by applying an unsharp mask filter to the entire correction target image Lw based on σ ′. Processing contents of the unsharp mask filter will be described with an image before application of the unsharp mask filter as an input image I INPUT and an image after application of the unsharp mask filter as an output image I OUTPUT . First, a σ ′ Gaussian filter (that is, a σ = 5 Gaussian filter) is used as an unsharp filter, and the input image I INPUT is filtered using this σ ′ Gaussian filter to generate a blurred image I BLUR . To do. Then, by subtracting each pixel value of the blurred image I BLUR from each pixel value of the input image I INPUT, and generates a difference image I DELTA between the input image I INPUT and the blurred image I BLUR. Finally, an image obtained by adding each pixel value of the difference image I DELTA to each pixel value of the input image I INPUT is defined as an output image I OUTPUT . A relational expression between the input image I INPUT and the output image I OUTPUT is shown in Expression (B-5). In Expression (B-5), (I INPUT · Gauss) represents the result of filtering the input image I INPUT using a Gaussian filter of σ ′.
I OUTPUT = I INPUT + I DELTA
= I INPUT + (I INPUT -I BLUR )
= I INPUT + (I INPUT- (I INPUT · Gauss) (B-5)

ステップS206では、補正対象画像Lwを入力画像IINPUTとして取り扱うことにより、出力画像IOUTPUTとしてのフィルタリング画像を得る。そして、ステップS207において、このフィルタリング画像のリンギングを除去してぶれ補正画像Qwを生成する(ステップS207の処理は、図17のステップS78の処理と同じである)。 In step S206, the correction target image Lw is handled as the input image I INPUT to obtain a filtered image as the output image I OUTPUT . In step S207, the ringing correction image Qw is generated by removing the ringing of the filtered image (the process in step S207 is the same as the process in step S78 in FIG. 17).

アンシャープマスクフィルタを用いることにより、入力画像(IINPUT)のエッジが強調され、画像鮮鋭化効果が得られる。但し、ぼかし画像(IBLUR)生成時におけるぼかし度合いが入力画像に含まれる実際のぼけ量と大きく異なると、適切なぼけ補正効果が得られない。例えば、ぼかし画像生成時におけるぼかし度合いが実際のぼけ量よりも大きいと、出力画像(IOUTPUT)は、極端に鮮鋭化された不自然な画像となる。一方、ぼかし画像生成時におけるぼかし度合いが実際のぼけ量よりも小さいと、鮮鋭化効果が弱すぎる。本補正方法では、アンシャープフィルタとしてσにてぼかし度合いが規定されるガウシアンフィルタを用い、そのガウシアンフィルタのσとして画像劣化関数に対応するσ’を用いる。このため、最適な鮮鋭化効果が得られ、ぼけが良好に除去された補正画像が得られる。即ち、見た目においてぶれの少ない画像を低い計算コストで生成することができる。 By using an unsharp mask filter, the edge of the input image (I INPUT ) is enhanced, and an image sharpening effect is obtained. However, if the blurring degree at the time of generating the blurred image (I BLUR ) is significantly different from the actual blur amount included in the input image, an appropriate blur correction effect cannot be obtained. For example, if the degree of blur at the time of blur image generation is larger than the actual blur amount, the output image (I OUTPUT ) becomes an extremely sharp and unnatural image. On the other hand, if the blurring degree at the time of generating the blurred image is smaller than the actual blur amount, the sharpening effect is too weak. In this correction method, a Gaussian filter whose degree of blurring is defined by σ is used as the unsharp filter, and σ ′ corresponding to the image degradation function is used as σ of the Gaussian filter. For this reason, an optimal sharpening effect is obtained, and a corrected image from which blur is well removed is obtained. That is, it is possible to generate an image with less blur in appearance at a low calculation cost.

図25に、入力画像IINPUTとしての手ぶれ画像300と共に、最適なσのガウシアンフィルタを用いた場合に得られる画像(即ち、本来の補正画像)302と、小さすぎるσのガウシアンフィルタを用いた場合に得られる画像301と、大きすぎるσのガウシアンフィルタを用いた場合に得られる画像303と、を示す。σが小さすぎると鮮鋭化効果が弱く、σが大きすぎると極端に鮮鋭化された不自然な画像が生成されることが分かる。 FIG. 25 shows an image (that is, an original corrected image) 302 obtained when an optimal σ Gaussian filter is used together with a camera shake image 300 as an input image I INPUT and a too small σ Gaussian filter. The image 301 obtained in FIG. 5 and the image 303 obtained when using a Gaussian filter with too large σ are shown. It can be seen that if σ is too small, the sharpening effect is weak, and if σ is too large, an extremely sharp unnatural image is generated.

また、第3の補正方法を採用する場合、第1の補正方法を採用する場合と同様、参照画像Rwの生成元の短露光画像の全画像データを記録媒体16に記録しておく必要は必ずしもなく、短露光画像の全画像データの内、小画像Rs又はRs’の画像データのみを記録媒体16に記録しておくようにすれば、ぶれ補正画像Qwの生成は可能である。   Further, when the third correction method is adopted, it is not always necessary to record all the image data of the short-exposure image from which the reference image Rw is generated on the recording medium 16 as in the case where the first correction method is adopted. However, if only the image data of the small image Rs or Rs ′ is recorded in the recording medium 16 among all the image data of the short exposure image, the blur correction image Qw can be generated.

<<変形等>>
上述した説明文中に示した具体的な数値は、単なる例示であって、当然の如く、それらを様々な数値に変更することができる。上述の実施形態の変形例または注釈事項として、以下に、注釈1及び注釈2を記す。各注釈に記載した内容は、矛盾なき限り、任意に組み合わせることが可能である。
<< Deformation, etc. >>
The specific numerical values shown in the above description are merely examples, and as a matter of course, they can be changed to various numerical values. As modifications or annotations of the above-described embodiment, notes 1 and 2 are described below. The contents described in each comment can be arbitrarily combined as long as there is no contradiction.

[注釈1]
上述の連写撮影は連続撮影(即ち、連続的な撮影)と同義であるが、この連続撮影の期間中に、撮影に関する諸条件は固定されていてもよいし変更されてもよい。撮影に関する諸条件とは、撮像部11の焦点位置、撮像部11の露出量、ホワイトバランスなどである。撮影に関する諸条件を変更しながら行われる連続撮影は、一般的に、ブラケット撮影とも呼ばれる。例えば、焦点位置に対するブラケット撮影を行う場合には、複数枚の撮影画像が異なる焦点位置(ピント位置)にて取得されるように、図2のフォーカスレンズ31の位置を順次変更させながら連続的に撮影を行う。
[Note 1]
The continuous shooting described above is synonymous with continuous shooting (that is, continuous shooting), but various conditions relating to shooting may be fixed or changed during the continuous shooting period. The various conditions related to shooting are the focal position of the image pickup unit 11, the exposure amount of the image pickup unit 11, white balance, and the like. Continuous shooting performed while changing various conditions related to shooting is generally called bracket shooting. For example, when performing bracket shooting with respect to the focal position, the position of the focus lens 31 in FIG. 2 is sequentially changed so that a plurality of captured images are acquired at different focal positions (focus positions). Take a picture.

[注釈2]
図1の撮像装置1は、ハードウェア、或いは、ハードウェアとソフトウェアの組み合わせによって実現可能である。特に、主制御部13の機能は、ハードウェア、ソフトウェア、またはハードウェアとソフトウェアの組み合わせによって実現可能である。主制御部13にて実現される機能の全部または一部を、プログラムとして記述し、該プログラムをプログラム実行装置(例えばコンピュータ)上で実行することによって、その機能の全部または一部を実現するようにしてもよい。ソフトウェアを用いて撮像装置1を構成する場合、ソフトウェアにて実現される部位についてのブロック図は、その部位の機能ブロック図を表すことになる。
[Note 2]
The imaging apparatus 1 in FIG. 1 can be realized by hardware or a combination of hardware and software. In particular, the function of the main control unit 13 can be realized by hardware, software, or a combination of hardware and software. All or part of the functions realized by the main control unit 13 are described as a program, and the program is executed on a program execution device (for example, a computer) to realize all or part of the functions. It may be. When the imaging apparatus 1 is configured using software, a block diagram of a part realized by software represents a functional block diagram of the part.

本発明の実施形態に係る撮像装置の全体ブロック図である。1 is an overall block diagram of an imaging apparatus according to an embodiment of the present invention. 図1の撮像部の内部構成図である。It is an internal block diagram of the imaging part of FIG. プレビュー画像の撮影期間と被記録画像列の撮影期間との時間的関係を示す図である。It is a figure which shows the time relationship between the imaging | photography period of a preview image, and the imaging | photography period of a to-be-recorded image sequence. 図1の撮像装置の一部ブロック図である。It is a partial block diagram of the imaging device of FIG. 本発明の第1実施例に係り、撮像装置の撮影動作の流れを表すフローチャートである。6 is a flowchart illustrating a flow of a shooting operation of the imaging apparatus according to the first embodiment of the present invention. 本発明の第1実施例に係り、撮影準備期間中に得られたプレビュー画像列を示す図である。FIG. 6 is a diagram illustrating a preview image sequence obtained during a shooting preparation period according to the first embodiment of the present invention. 本発明の第1実施例に係る被記録画像列の撮影パターンを例示する図である。It is a figure which illustrates the imaging | photography pattern of the to-be-recorded image sequence which concerns on 1st Example of this invention. 本発明の第1実施例に係り、図1の記録媒体に記録される1つの画像ファイルの構造を示す図である。FIG. 2 is a diagram illustrating a structure of one image file recorded on the recording medium of FIG. 1 according to the first embodiment of the present invention. 本発明の第1実施例に係り、図1の記録媒体に記録される画像ファイル群のデータ構造の模式図である。FIG. 2 is a schematic diagram of a data structure of an image file group recorded on the recording medium of FIG. 1 according to the first embodiment of the present invention. 図5のステップS18における記録制御の詳細フローチャートである。6 is a detailed flowchart of recording control in step S18 of FIG. 本発明の第1実施例に係り、撮像装置のぶれ補正動作の流れを表すフローチャートである。7 is a flowchart illustrating a flow of a shake correction operation of the imaging apparatus according to the first embodiment of the present invention. 図11のステップS33における位置ずれ量算出処理の詳細フローチャートである。12 is a detailed flowchart of a positional deviation amount calculation process in step S33 of FIG. 本発明の第1実施例に係り、位置ずれ量(ベクトル)が累積される様子を示す図である。It is a figure which shows a mode that a positional offset amount (vector) is accumulated according to 1st Example of this invention. 本発明の第1実施例に係り、画像ファイルに対するアクセスの様子を示す図である。It is a figure which shows the mode of the access with respect to the 1st Example of this invention with respect to an image file. 本発明の第2実施例に係る被記録画像列の撮影パターンを例示する図である。It is a figure which illustrates the imaging | photography pattern of the to-be-recorded image sequence which concerns on 2nd Example of this invention. 本発明の第3実施例に係る被記録画像列の撮影パターンを例示する図である。It is a figure which illustrates the imaging | photography pattern of the to-be-recorded image sequence which concerns on 3rd Example of this invention. 本発明の第4実施例に係り、第1の補正方法によるぶれ補正処理の動作の流れを表すフローチャートである。FIG. 14 is a flowchart illustrating an operation flow of a shake correction process according to a first correction method according to the fourth embodiment of the present invention. 図17のぶれ補正処理の一部である、フーリエ反復法の詳細フローチャートである。18 is a detailed flowchart of a Fourier iteration method, which is a part of the blur correction process of FIG. 17. 図18のフーリエ反復法を実施する部位のブロック図である。It is a block diagram of the site | part which implements the Fourier iteration method of FIG. 本発明の第4実施例に係り、第2の補正方法によるぶれ補正処理の動作の流れを表すフローチャートである。It is a flowchart concerning the 4th Example of this invention and represents the flow of operation | movement of the blurring correction process by a 2nd correction method. 図20に対応するぶれ補正処理の概念図である。FIG. 21 is a conceptual diagram of shake correction processing corresponding to FIG. 20. 本発明の第4実施例に係り、第3の補正方法によるぶれ補正処理の動作の流れを表すフローチャートである。FIG. 14 is a flowchart illustrating an operation flow of shake correction processing according to a third correction method according to the fourth embodiment of the present invention. 図22に対応するぶれ補正処理の概念図である。FIG. 23 is a conceptual diagram of shake correction processing corresponding to FIG. 22. 本発明の第4実施例に係り、一次元のガウス分布を示す図である。It is a figure which concerns on 4th Example of this invention and shows a one-dimensional Gaussian distribution. 図22に対応するぶれ補正処理の効果を説明するための図である。It is a figure for demonstrating the effect of the blurring correction process corresponding to FIG. 従来のフーリエ反復法を実現する構成のブロック図である。It is a block diagram of the structure which implement | achieves the conventional Fourier iteration method.

符号の説明Explanation of symbols

1 撮像装置
11 撮像部
12 AFE
13 主制御部
16 記録媒体
33 撮像素子
51 第1位置ずれ検出部
52 撮影制御部
53 記録制御部
54 補正対象画像抽出部
55 参照画像抽出部
56 第2位置ずれ検出部
57 補正処理部
DESCRIPTION OF SYMBOLS 1 Imaging device 11 Imaging part 12 AFE
DESCRIPTION OF SYMBOLS 13 Main control part 16 Recording medium 33 Image pick-up element 51 1st position shift detection part 52 Shooting control part 53 Recording control part 54 Correction object image extraction part 55 Reference image extraction part 56 2nd position shift detection part 57 Correction process part

Claims (9)

所定の連写撮影指示に従う撮像手段の連続的な撮影によって得られた時系列で並ぶ画像列中に、m枚の第1画像及び前記第1画像の露光時間よりも短い露光時間の撮影によるn枚の第2画像が含まれるように前記撮像手段を制御する撮影制御手段と(但し、m及びnは整数であって且つm>n≧1)、
前記m枚の第1画像の中から1枚の第1画像を補正対象画像として抽出する補正対象画像抽出手段と、
前記n枚の第2画像の中から1枚の第2画像を参照画像として抽出する参照画像抽出手段と、
前記補正対象画像と前記参照画像に基づいて前記補正対象画像のぶれを補正する補正処理手段と、を備えた
ことを特徴とするぶれ補正装置。
In an image sequence arranged in a time series obtained by continuous shooting by an imaging unit in accordance with a predetermined continuous shooting instruction, n by shooting with the first image of m sheets and an exposure time shorter than the exposure time of the first image. Photographing control means for controlling the imaging means so that the second image of the sheet is included (where m and n are integers and m> n ≧ 1);
Correction target image extraction means for extracting one first image as a correction target image from the m first images;
Reference image extraction means for extracting one second image as a reference image from the n second images;
A blur correction apparatus comprising: correction processing means for correcting blur of the correction target image based on the correction target image and the reference image.
前記画像列の撮影前に前記撮像手段から得られた複数の画像間の位置ずれ量を検出する第1位置ずれ検出手段を更に備え、
前記撮影制御手段は、第1位置ずれ検出手段の検出結果に基づいて、mに対するnの比を設定する
ことを特徴とする請求項1に記載のぶれ補正装置。
A first misregistration detecting means for detecting a misregistration amount between a plurality of images obtained from the imaging means before photographing the image sequence;
The blur correction apparatus according to claim 1, wherein the imaging control unit sets a ratio of n to m based on a detection result of the first misregistration detection unit.
前記m枚の第1画像は、mA枚の第1画像と前記mA枚の第1画像よりも後に撮影されるmB枚の第1画像から形成され(但し、mA及びmBは整数であって、mA≧2、mB≧1、m=mA+mB)、
当該ぶれ補正装置は、前記mA枚の第1画像間の位置ずれ量を検出する第1位置ずれ検出手段を更に備え、
前記撮影制御手段は、第1位置ずれ検出手段の検出結果に基づいて、mBに対するnの比を設定する
ことを特徴とする請求項1に記載のぶれ補正装置。
The m first images are formed from m A first images and m B first images taken after the m A first images, where m A and m B are Integer, m A ≧ 2, m B ≧ 1, m = m A + m B ),
The blur correction apparatus further comprises a first displacement detection means for detecting a positional deviation amount between the m A piece of first image,
It said imaging control means, based on a detection result of the first displacement detection means, blur correction device according to claim 1, characterized in that setting the ratio of n to m B.
前記撮影制御手段は、n=1とし、前記m枚の第1画像の撮影前又は撮影後に1枚だけ第2画像が取得されるように、或いは、n=2とし、前記m枚の第1画像の撮影前と撮影後に1枚ずつ第2画像が取得されるように、前記撮像手段を制御する
ことを特徴とする請求項1に記載のぶれ補正装置。
The shooting control means sets n = 1 so that only one second image is acquired before or after shooting the m first images, or n = 2, and the m first images. The blur correction apparatus according to claim 1, wherein the imaging unit is controlled so that the second image is acquired one by one before and after the image is captured.
前記補正対象画像と前記参照画像との間の位置ずれ量を検出する第2位置ずれ検出手段を更に備え、
前記補正処理手段は、前記第2位置ずれ検出手段の検出結果を用いた、前記補正対象画像と前記参照画像との間の位置ずれ補正を介して、前記補正対象画像のぶれを補正し、
前記第2位置ずれ検出手段は、前記m枚の第1画像及び前記n枚の第2画像を時系列で並べた場合において前記補正対象画像としての前記第1画像と前記参照画像としての前記第2画像との間に他の画像が存在するとき、前記他の画像と前記補正対象画像と前記参照画像とから成る累積対象画像列を特定し、累積対象画像列を形成する時間的に隣接する2枚の画像間の位置ずれ量を夫々に求めて累積することにより前記補正対象画像と前記参照画像との間の前記位置ずれ量を検出する
ことを特徴とする請求項1〜請求項4の何れかに記載のぶれ補正装置。
A second misregistration detection unit for detecting a misregistration amount between the correction target image and the reference image;
The correction processing unit corrects a blur of the correction target image through a positional shift correction between the correction target image and the reference image using a detection result of the second positional shift detection unit,
The second misregistration detection means, when the m first images and the n second images are arranged in time series, the first image as the correction target image and the first image as the reference image. When another image exists between two images, the accumulation target image sequence including the other image, the correction target image, and the reference image is specified, and the accumulation target image sequence is temporally adjacent. 5. The positional shift amount between the correction target image and the reference image is detected by respectively obtaining and accumulating the positional shift amount between two images. The shake correction apparatus according to any one of the above.
前記m枚の第1画像の画像データを夫々に記録したm個の画像ファイルを記録手段に保存する記録制御手段を更に備え、
前記記録制御手段は、前記n枚の第2画像に含まれる1枚の第2画像の画像データを、前記m個の画像ファイルの内の何れか1つにのみ記録する
ことを特徴とする請求項1〜請求項5の何れかに記載のぶれ補正装置。
A recording control means for storing m image files respectively recording the image data of the m first images in a recording means;
The recording control means records image data of one second image included in the n second images in only one of the m image files. The blur correction device according to any one of claims 1 to 5.
撮影によって画像を表す信号を出力する撮像手段と、
前記撮像手段の出力信号を受ける、請求項1〜請求項6の何れかに記載のぶれ補正装置と、を備えた
ことを特徴とする撮像装置。
Imaging means for outputting a signal representing an image by photographing;
An image pickup apparatus comprising: the shake correction apparatus according to claim 1 that receives an output signal of the image pickup means.
撮影によって画像を表す信号を出力する撮像手段と、
所定の連写撮影指示を受け付ける指示受付手段と、
前記撮像手段の出力信号に基づく画像の画像データを記録する記録手段と、を備え、
前記連写撮影指示に従ってm枚の第1画像を前記撮像手段に連続的に撮影させて、前記m枚の第1画像の画像データを前記記録手段に記録させる撮像装置において(但し、mは整数)、
前記連写撮影指示に従う連続的な撮影によって得られる時系列で並ぶ画像列中に、前記m枚の第1画像及び前記第1画像の露光時間よりも短い露光時間の撮影によるn枚の第2画像が含まれるように前記撮像手段を制御する撮影制御手段と(但し、nは整数であって且つm>n≧1)、
前記画像列の画像データを前記記録手段に記録させる記録制御手段と、
前記m枚の第1画像の中から1枚の第1画像を補正対象画像として抽出する補正対象画像抽出手段と、
前記n枚の第2画像の中から1枚の第2画像を参照画像として抽出する参照画像抽出手段と、
前記補正対象画像と前記参照画像に基づいて前記補正対象画像のぶれを補正する補正処理手段と、を備えた
ことを特徴とする撮像装置。
Imaging means for outputting a signal representing an image by photographing;
Instruction receiving means for receiving a predetermined continuous shooting instruction;
Recording means for recording image data of an image based on the output signal of the imaging means,
In an imaging apparatus that causes the imaging unit to continuously capture m first images in accordance with the continuous shooting instruction and records the image data of the m first images on the recording unit (where m is an integer) ),
In the image sequence arranged in a time series obtained by continuous shooting according to the continuous shooting instruction, the m first images and n second images obtained by shooting with an exposure time shorter than the exposure time of the first image. Photographing control means for controlling the imaging means so that an image is included (where n is an integer and m> n ≧ 1);
Recording control means for causing the recording means to record image data of the image sequence;
Correction target image extraction means for extracting one first image as a correction target image from the m first images;
Reference image extraction means for extracting one second image as a reference image from the n second images;
An imaging apparatus comprising: correction processing means for correcting blur of the correction target image based on the correction target image and the reference image.
所定の連写撮影指示に従う撮像手段の連続的な撮影によって得られた時系列で並ぶ画像列中に、m枚の第1画像及び前記第1画像の露光時間よりも短い露光時間の撮影によるn枚の第2画像が含まれるように前記撮像手段を制御し(但し、m及びnは整数であって且つm>n≧1)、
前記m枚の第1画像の中から1枚の第1画像を補正対象画像として抽出する一方で、
前記n枚の第2画像の中から1枚の第2画像を参照画像として抽出し、
前記補正対象画像と前記参照画像に基づいて前記補正対象画像のぶれを補正する
ことを特徴とするぶれ補正方法。
In an image sequence arranged in a time series obtained by continuous shooting by an imaging unit in accordance with a predetermined continuous shooting instruction, n by shooting with the first image of m sheets and an exposure time shorter than the exposure time of the first image. Controlling the imaging means so that the second image of the sheet is included (where m and n are integers and m> n ≧ 1);
While extracting one first image from the m first images as a correction target image,
Extracting one second image from the n second images as a reference image;
A blur correction method, wherein blur correction of the correction target image is corrected based on the correction target image and the reference image.
JP2007330864A 2007-12-21 2007-12-21 Blur correcting device and method, and imaging apparatus Pending JP2009153046A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007330864A JP2009153046A (en) 2007-12-21 2007-12-21 Blur correcting device and method, and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007330864A JP2009153046A (en) 2007-12-21 2007-12-21 Blur correcting device and method, and imaging apparatus

Publications (1)

Publication Number Publication Date
JP2009153046A true JP2009153046A (en) 2009-07-09

Family

ID=40921608

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007330864A Pending JP2009153046A (en) 2007-12-21 2007-12-21 Blur correcting device and method, and imaging apparatus

Country Status (1)

Country Link
JP (1) JP2009153046A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015154354A (en) * 2014-02-17 2015-08-24 キヤノン株式会社 Imaging apparatus
JP2017216656A (en) * 2016-06-02 2017-12-07 キヤノン株式会社 Imaging apparatus, imaging apparatus control method, and image processing system
WO2019183813A1 (en) * 2018-03-27 2019-10-03 华为技术有限公司 Image capture method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000341582A (en) * 1999-05-31 2000-12-08 Sony Corp Image pickup device and its method
JP2002247444A (en) * 2001-02-14 2002-08-30 Olympus Optical Co Ltd Image processor and recording medium for recording image processing program
JP2002290811A (en) * 2001-03-23 2002-10-04 Minolta Co Ltd Imaging device, method and program for image processing, and information recording medium
JP2005197822A (en) * 2003-12-26 2005-07-21 Olympus Corp Imaging apparatus, and generating method of title-attached thumbnail picture
JP2005204185A (en) * 2004-01-16 2005-07-28 Canon Inc Photographing apparatus
JP2006101447A (en) * 2004-09-30 2006-04-13 Mitsubishi Electric Corp Image pickup apparatus and image-restoring method
JP2007135182A (en) * 2005-10-14 2007-05-31 Kyocera Corp Imaging device and imaging method
JP2007233227A (en) * 2006-03-03 2007-09-13 Konica Minolta Business Technologies Inc Image forming apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000341582A (en) * 1999-05-31 2000-12-08 Sony Corp Image pickup device and its method
JP2002247444A (en) * 2001-02-14 2002-08-30 Olympus Optical Co Ltd Image processor and recording medium for recording image processing program
JP2002290811A (en) * 2001-03-23 2002-10-04 Minolta Co Ltd Imaging device, method and program for image processing, and information recording medium
JP2005197822A (en) * 2003-12-26 2005-07-21 Olympus Corp Imaging apparatus, and generating method of title-attached thumbnail picture
JP2005204185A (en) * 2004-01-16 2005-07-28 Canon Inc Photographing apparatus
JP2006101447A (en) * 2004-09-30 2006-04-13 Mitsubishi Electric Corp Image pickup apparatus and image-restoring method
JP2007135182A (en) * 2005-10-14 2007-05-31 Kyocera Corp Imaging device and imaging method
JP2007233227A (en) * 2006-03-03 2007-09-13 Konica Minolta Business Technologies Inc Image forming apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015154354A (en) * 2014-02-17 2015-08-24 キヤノン株式会社 Imaging apparatus
JP2017216656A (en) * 2016-06-02 2017-12-07 キヤノン株式会社 Imaging apparatus, imaging apparatus control method, and image processing system
WO2019183813A1 (en) * 2018-03-27 2019-10-03 华为技术有限公司 Image capture method and device
CN111418201A (en) * 2018-03-27 2020-07-14 华为技术有限公司 Shooting method and equipment
CN111418201B (en) * 2018-03-27 2021-10-15 华为技术有限公司 Shooting method and equipment

Similar Documents

Publication Publication Date Title
JP5213670B2 (en) Imaging apparatus and blur correction method
US9094648B2 (en) Tone mapping for low-light video frame enhancement
JP5139516B2 (en) Camera motion detection and estimation
JP4454657B2 (en) Blur correction apparatus and method, and imaging apparatus
US9307212B2 (en) Tone mapping for low-light video frame enhancement
JP4775700B2 (en) Image processing apparatus and image processing method
JP4665718B2 (en) Imaging device
JP2007281546A (en) Imaging apparatus and imaging method
JP2010166558A (en) Image forming apparatus
JP2009194896A (en) Image processing device and method, and imaging apparatus
JP2018107526A (en) Image processing device, imaging apparatus, image processing method and computer program
JP4958806B2 (en) Blur detection device, blur correction device, and imaging device
JP2009111596A (en) Imaging apparatus
JP2009088935A (en) Image recording apparatus, image correcting apparatus, and image pickup apparatus
KR101653272B1 (en) A digital photographing apparatus, a method for controlling the same, and a computer-readable medium
US8243154B2 (en) Image processing apparatus, digital camera, and recording medium
JP2009153046A (en) Blur correcting device and method, and imaging apparatus
JP2002300384A (en) Image recovery device, image recovery method, program and recording medium
JP2002247444A (en) Image processor and recording medium for recording image processing program
JP2009118434A (en) Blurring correction device and imaging apparatus
JP2009171341A (en) Blur correcting device and imaging apparatus
JP2018142983A (en) Image processing device and method of controlling the same, program, and storage medium
JP2009021909A (en) Image adder, method, and program
JP2011135379A (en) Imaging apparatus, imaging method and program
JP2009088933A (en) Image recording apparatus, image correcting apparatus and image pickup apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101130

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120224

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120321

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120710