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

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

Info

Publication number
JP4687619B2
JP4687619B2 JP2006240955A JP2006240955A JP4687619B2 JP 4687619 B2 JP4687619 B2 JP 4687619B2 JP 2006240955 A JP2006240955 A JP 2006240955A JP 2006240955 A JP2006240955 A JP 2006240955A JP 4687619 B2 JP4687619 B2 JP 4687619B2
Authority
JP
Japan
Prior art keywords
image
images
accuracy
unit
output
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.)
Expired - Fee Related
Application number
JP2006240955A
Other languages
Japanese (ja)
Other versions
JP2008066910A (en
Inventor
義裕 手島
敬一 櫻井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2006240955A priority Critical patent/JP4687619B2/en
Publication of JP2008066910A publication Critical patent/JP2008066910A/en
Application granted granted Critical
Publication of JP4687619B2 publication Critical patent/JP4687619B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置、画像処理方法及びプログラムに関し、詳細には、CCDセンサ等の撮像デバイスで撮影された画像の手振れや被写体振れを補正する画像処理装置、画像処理方法及びプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and a program, and more particularly, to an image processing apparatus, an image processing method, and a program for correcting camera shake and subject shake of an image captured by an imaging device such as a CCD sensor.

一般的に夜景等の暗い環境において、補助光(ストロボ)無しで写真撮影をする場合には、光量不足を補うためにシャッタ速度が遅くなるので、手振れや被写体振れ(以下、手振れで代表する)が発生しやすくなる。このような手振れ問題は、とりわけ画素数の多いCCDセンサ等の撮像デバイスを備えたデジタルカメラにおいて顕在化する。   In general, when taking a picture without a supplementary light (strobe) in a dark environment such as a night view, the shutter speed becomes slow to compensate for the lack of light, so camera shake and subject shake (hereinafter referred to as camera shake) Is likely to occur. Such a camera shake problem becomes particularly apparent in a digital camera including an imaging device such as a CCD sensor having a large number of pixels.

たとえば、水平画素数がVGAクラスの640画素の撮像デバイスを備えたデジタルカメラを用いて、1/100秒のシャッタ速度(露光時間10ミリ秒)が必要な明るさの被写体を水平画角5度(この画角は普及型デジタルカメラのズームレンズにおける望遠端画角に相当する程度である。)で撮影することを考える。この場合、水平画角1度当たりの画素数は640/5=128画素となるので、露光時間10ミリ秒の間にごく僅か動いた場合、たとえば、高々0.1度動いただけでも、0.1×128=12.8画素もの大きな手振れを生じてしまう。   For example, using a digital camera equipped with a 640-pixel imaging device with a horizontal pixel count of VGA class, a subject with a brightness that requires a shutter speed of 1/100 seconds (exposure time of 10 milliseconds) is 5 degrees in the horizontal angle of view. Let us consider taking a picture with (this angle of view is equivalent to the angle of view at the telephoto end of a zoom lens of a popular digital camera). In this case, since the number of pixels per horizontal field angle is 640/5 = 128 pixels, even if it moves very slightly within an exposure time of 10 milliseconds, for example, even if it moves only 0.1 degrees at most, it is 0. As a result, a large camera shake of 1 × 128 = 12.8 pixels occurs.

このように、比較的に画素数が少ないVGAクラスの撮像デバイスであっても、ごく僅かな動き(0.1度の動き)で大きな(12.8画素もの)手振れを生じるのであるから、それ以上に画素数が多い撮像デバイスを備えたデジタルカメラにおいては、当然のこと、手振れ対策は必要不可欠である。   As described above, even a VGA class imaging device having a relatively small number of pixels generates a large (as much as 12.8 pixels) camera shake with very little movement (0.1 degree movement). In a digital camera equipped with an imaging device having a larger number of pixels as described above, naturally, a countermeasure against camera shake is indispensable.

<第1の従来技術>
下記の特許文献1には、撮影用光学系の一部に手振れ補正手段(手振れ補正レンズやその駆動機構等)を組み込み、その手振れ補正レンズを移動させることによって、手振れを光学的に補正するようにした手振れ補正カメラの技術が記載されている。しかしながら、この技術は、手振れ補正レンズやその駆動機構等を撮影用光学系に組み込む必要があり、機器の複雑化や大型化を招く上、コストアップも免れない。
<First prior art>
Japanese Patent Laid-Open No. 2004-228561 incorporates a camera shake correction unit (camera shake correction lens, its driving mechanism, etc.) in a part of the photographing optical system, and moves the camera shake correction lens to optically correct the camera shake. The technology of the camera shake correction camera is described. However, in this technique, it is necessary to incorporate a camera shake correction lens, a driving mechanism thereof, and the like in the photographing optical system, which causes the device to be complicated and large, and the cost is unavoidable.

<第2の従来技術>
下記の特許文献2には、画像処理によって手振れを補正するようにして、上記の特許文献1の問題点を解決した技術が記載されている。この第2の従来技術の原理は、以下のようなものである。今、1/100秒のシャッタ速度(露光時間10ミリ秒)が必要な明るさの被写体を撮影する場合を考える。さて、この露光時間(10ミリ秒)は手振れを引き起こすのに充分な時間であるが、もし、この1/10の露光時間(すなわち、1ミリ秒)で撮影したとすれば、この1ミリ秒はシャッタ速度換算で1/1000秒もの高速シャッタになるから、ほとんど手振れを発生しないはずである。
<Second prior art>
The following Patent Document 2 describes a technology that solves the problems of Patent Document 1 described above by correcting camera shake by image processing. The principle of the second prior art is as follows. Consider a case where a subject having a brightness that requires a shutter speed of 1/100 second (exposure time 10 milliseconds) is photographed. Now, this exposure time (10 milliseconds) is sufficient to cause camera shake, but if this 1/10 exposure time (that is, 1 millisecond) is taken, this 1 millisecond is taken. Since the shutter speed is a high-speed shutter of 1/1000 second in terms of shutter speed, almost no camera shake should occur.

しかし、単に露出時間を短く(1ミリ秒)しただけでは、当然ながら露光不足を招くので、充分な明るさの画像が得られない。   However, simply shortening the exposure time (1 millisecond) will naturally lead to underexposure, so that an image with sufficient brightness cannot be obtained.

そこで、第2の従来技術においては、露出時間を1/n(10ミリ秒→1ミリ秒)にしてn(n=10)枚の画像を連写し、それらn枚の画像を合成して露光不足を補っている。   Therefore, in the second prior art, the exposure time is set to 1 / n (10 milliseconds → 1 millisecond), n (n = 10) images are continuously shot, and these n images are combined and exposed. Make up for the shortage.

具体的には、予め設定されたn枚(上記の10枚に相当)の画像を手振れの影響を受けない程度の短い露光時間(上記の1ミリ秒に相当)で順次撮像する撮像素子と、上記n枚の画像の明度補正と、上記n枚の画像中、時間的に隣り合う2枚の画像の位置ずれを1/m画素(1画素または1/2画素〜1/8画素)の精度で検出する処理とを行う手段と、検出した上記位置ずれを補正する手段と、上記位置ずれを補正したn枚の画像を加算し、平均化する手段とを備えるというものである。   Specifically, an image sensor that sequentially captures n preset images (corresponding to the above 10 images) with a short exposure time (corresponding to the above 1 millisecond) that is not affected by camera shake, The brightness correction of the n images and the positional deviation between two temporally adjacent images in the n images are accurate to 1 / m pixels (1 pixel or 1/2 pixel to 1/8 pixel). And a means for correcting the detected positional deviation, and a means for adding and averaging the n images corrected for the positional deviation.

特開平6−138529号公報JP-A-6-138529 特開2000−224460号公報JP 2000-224460 A

しかしながら、上記第2の従来技術にあっては、画像処理によって手振れを補正するので、上記第1の従来技術の不都合(機器の複雑化や大型化及びコストアップ)を解消できるものの、以下の点で解決すべき問題点がある。   However, in the second prior art, since the camera shake is corrected by image processing, the disadvantages of the first prior art (complexity of equipment, increase in size and cost increase) can be eliminated, but the following points There is a problem to be solved.

上記第2の従来技術の例示によれば、手振れの影響を受けない程度の短い露光時間を1ミリ秒とし、また、手振れのおそれがある露光時間を10ミリ秒とする。そして、撮像素子において、予め設定されたn枚の画像を手振れの影響を受けない程度の短い露光時間で順次撮像するとしている。ここで、nは、「手振れのおそれがある露光時間」÷「手振れの影響を受けない程度の短い露光時間」で与えられるから、上記第2の従来技術の例示における撮像素子の画像撮影枚数(n)は10ミリ秒÷1ミリ秒=10〔枚〕になる。   According to the second prior art, the short exposure time that is not affected by camera shake is set to 1 millisecond, and the exposure time that may cause camera shake is set to 10 milliseconds. The imaging device sequentially captures n preset images with a short exposure time that is not affected by camera shake. Here, n is given by “exposure time that may cause camera shake” ÷ “short exposure time that is not affected by camera shake”, so that the number of images taken by the image sensor in the second prior art example ( n) is 10 milliseconds ÷ 1 millisecond = 10 [sheets].

この程度の枚数であれば、所要時間はほぼ一瞬であるので、撮影者にストレスを与えることはない。   With this number of sheets, the required time is almost a moment, so there is no stress on the photographer.

しかし、より暗い被写体を撮影する場合、たとえば、1/10秒のシャッタ速度(露光時間100ミリ秒)が必要な明るさの被写体を撮影する場合を考えると、この場合の撮像素子の画像撮影枚数(n)は100ミリ秒÷1ミリ秒=100〔枚〕にもなるから、撮影者は10倍の待ち時間を覚悟しなければならなくなり、大きなストレスを感じる。   However, when shooting a darker subject, for example, when taking a subject with a brightness that requires a shutter speed of 1/10 second (exposure time 100 milliseconds), the number of images taken by the image sensor in this case Since (n) is also 100 milliseconds ÷ 1 millisecond = 100 [sheets], the photographer must be prepared for a waiting time of 10 times, and feels a great stress.

このように、上記第2の従来技術においては、撮像素子の画像撮影枚数(n)を、単に「手振れのおそれがある露光時間」÷「手振れの影響を受けない程度の短い露光時間」で設定するようにしているので、より暗い被写体を撮影する場合のnの値が増大することとなり、結局、被写体が暗くなるほど、撮影者に大きなストレスを強いるという点において、解決しなければならない技術課題がある。   As described above, in the second prior art, the number (n) of images taken by the image sensor is simply set by “exposure time that may cause camera shake” ÷ “exposure time that is not affected by camera shake”. As a result, the value of n when shooting a darker subject increases, and as a result, the technical problem to be solved is that the darker the subject, the greater the stress on the photographer. is there.

そこで、本発明は、動き予測の精度、たとえば、画像の明るさに応じて、画像合成処理を切り替えることにより、より暗い被写体を撮影する場合における画像の撮影枚数の増大を抑制し、撮影者のストレス緩和を図った画像処理装置、画像処理方法及びプログラムを提供することを目的とする。   Therefore, the present invention suppresses an increase in the number of shot images when shooting a darker subject by switching the image composition processing according to the accuracy of motion prediction, for example, the brightness of the image, and An object of the present invention is to provide an image processing apparatus, an image processing method, and a program for reducing stress.

請求項1記載の発明は、周期的に複数枚の画像を生成して出力する撮像手段と、前記撮像手段から出力される複数の画像を逐次に取り込み、それらの画像間の動きを予測して両画像の位置ずれを補正する位置補正手段と、所定の画像合成処理を適用して前記位置ずれ補正後の画像を逐次に合成して合成画像を生成出力する画像合成手段と、前記動き予測の精度を推定する推定手段と、前記推定手段の推定結果が精度高である場合には前記画像合成手段で使用する所定の画像合成処理として画像解像度優先の画像合成処理を選択する一方、前記推定手段の推定結果が精度低である場合には前記画像合成手段で使用する所定の画像合成処理として画像S/N優先の画像合成処理を選択する画像合成処理選択手段とを備えたことを特徴とする画像処理装置である。
請求項2記載の発明は、前記推定手段は、前記撮像手段から出力される画像の明るさに応じて前記動き予測の精度を推定することを特徴とする請求項1記載の画像処理装置である。
請求項3記載の発明は、前記位置補正手段は、さらに、前記撮像手段から出力される画像の特徴点を、動き予測のために抽出する特徴点抽出手段を備え、前記推定手段は、この特徴点抽出手段の出力に基づいて、前記動き予測の精度を推定することを特徴とする請求項1記載の画像処理装置である。
請求項4記載の発明は、周期的に複数枚の画像を生成して出力する撮像ステップと、前記撮像ステップから出力される複数の画像を逐次に取り込み、それらの画像間の動きを予測して両画像の位置ずれを補正する位置補正ステップと、所定の画像合成処理を適用して前記位置ずれ補正後の画像を逐次に合成して合成画像を生成出力する画像合成ステップと、前記動き予測の精度を推定する推定ステップと、前記推定ステップの推定結果が精度高である場合には前記画像合成ステップで使用する所定の画像合成処理として画像解像度優先の画像合成処理を選択する一方、前記推定ステップの推定結果が精度低である場合には前記画像合成ステップで使用する所定の画像合成処理として画像S/N優先の画像合成処理を選択する画像合成処理選択ステップとを含むことを特徴とする画像処理方法である。
請求項5記載の発明は、前記推定ステップは、前記撮像ステップから出力される画像の明るさに応じて前記動き予測の精度を推定することを特徴とする請求項4記載の画像処理方法である。
請求項6記載の発明は、前記位置補正ステップは、さらに、前記撮像ステップから出力される画像の特徴点を、動き予測のために抽出する特徴点抽出ステップを含み、前記推定ステップは、この特徴点抽出ステップの出力に基づいて、前記動き予測の精度を推定することを特徴とする請求項4記載の画像処理方法である。
請求項7記載の発明は、コンピュータに、周期的に複数枚の画像を生成して出力する撮像手段と、前記撮像手段から出力される複数の画像を逐次に取り込み、それらの画像間の動きを予測して両画像の位置ずれを補正する位置補正手段と、所定の画像合成処理を適用して前記位置ずれ補正後の画像を逐次に合成して合成画像を生成出力する画像合成手段と、前記動き予測の精度を推定する推定手段と、前記推定手段の推定結果が精度高である場合には前記画像合成手段で使用する所定の画像合成処理として画像解像度優先の画像合成処理を選択する一方、前記推定手段の推定結果が精度低である場合には前記画像合成手段で使用する所定の画像合成処理として画像S/N優先の画像合成処理を選択する画像合成処理選択手段とを実現させることを特徴とするプログラムである。
請求項8記載の発明は、前記推定手段は、前記撮像手段から出力される画像の明るさに応じて前記動き予測の精度を推定することを特徴とする請求項7記載のプログラムである。
請求項9記載の発明は、前記位置補正手段は、さらに、前記撮像手段から出力される画像の特徴点を、動き予測のために抽出する特徴点抽出手段を備え、前記推定手段は、この特徴点抽出手段の出力に基づいて、前記動き予測の精度を推定することを特徴とする請求項7記載のプログラムである。
According to the first aspect of the present invention, an imaging unit that periodically generates and outputs a plurality of images, a plurality of images output from the imaging unit are sequentially captured, and a motion between the images is predicted. A position correction unit that corrects the positional deviation between the two images, an image synthesis unit that applies a predetermined image synthesis process to sequentially synthesize the images after the positional deviation correction to generate and output a synthesized image, and the motion prediction An estimation unit for estimating accuracy, and when the estimation result of the estimation unit is high in accuracy, an image synthesis process prioritizing image resolution is selected as a predetermined image synthesis process used in the image synthesis unit, while the estimation unit And an image composition processing selection means for selecting image S / N priority image composition processing as the predetermined image composition processing used by the image composition means when the estimation result is low in accuracy. Image processing It is a device.
The invention according to claim 2 is the image processing apparatus according to claim 1, wherein the estimation unit estimates the accuracy of the motion prediction according to brightness of an image output from the imaging unit. .
According to a third aspect of the present invention, the position correction unit further includes a feature point extraction unit that extracts a feature point of an image output from the imaging unit for motion prediction, and the estimation unit includes the feature point. The image processing apparatus according to claim 1, wherein the accuracy of the motion prediction is estimated based on an output of the point extraction unit.
According to the fourth aspect of the present invention, an imaging step for periodically generating and outputting a plurality of images, a plurality of images output from the imaging step are sequentially captured, and motion between these images is predicted. A position correction step for correcting a positional deviation between the two images, an image synthesis step for applying a predetermined image synthesis process to sequentially synthesize the images after the positional deviation correction to generate and output a synthesized image, and the motion prediction An estimation step for estimating accuracy, and if the estimation result of the estimation step is high in accuracy, an image synthesis process prioritizing image resolution is selected as a predetermined image synthesis process used in the image synthesis step, while the estimation step If the estimation result of the image is low in accuracy, the image synthesis process selection is performed to select the image S / N priority image synthesis process as the predetermined image synthesis process used in the image synthesis step. The image processing method which comprises a step.
The invention according to claim 5 is the image processing method according to claim 4, wherein the estimation step estimates the accuracy of the motion prediction according to the brightness of the image output from the imaging step. .
According to a sixth aspect of the present invention, the position correction step further includes a feature point extraction step for extracting a feature point of an image output from the imaging step for motion prediction, and the estimation step includes the feature point. The image processing method according to claim 4, wherein the accuracy of the motion prediction is estimated based on an output of the point extraction step.
According to the seventh aspect of the present invention, an image pickup unit that periodically generates and outputs a plurality of images to a computer, and a plurality of images output from the image pickup unit are sequentially captured, and a motion between the images is detected. A position correcting unit that predicts and corrects a positional deviation between the two images; an image synthesizing unit that applies a predetermined image synthesis process to sequentially synthesize the images after the positional deviation correction to generate a synthesized image; and An estimation unit for estimating the accuracy of motion prediction, and when the estimation result of the estimation unit is high in accuracy, an image synthesis process prioritizing image resolution is selected as a predetermined image synthesis process used in the image synthesis unit, When the estimation result of the estimation means is low in accuracy, an image composition processing selection means for selecting an image S / N priority image composition process as a predetermined image composition process used by the image composition means is realized. Which is a program which is characterized.
The invention according to claim 8 is the program according to claim 7, wherein the estimation means estimates the accuracy of the motion prediction according to the brightness of the image output from the imaging means.
According to a ninth aspect of the present invention, the position correction unit further includes a feature point extraction unit that extracts a feature point of an image output from the imaging unit for motion prediction, and the estimation unit includes the feature point. 8. The program according to claim 7, wherein the accuracy of the motion prediction is estimated based on an output of the point extracting means.

本発明では、動き予測の精度が高いときには、画像解像度優先の画像合成処理を適用して出力画像の画像合成を行い、一方、動き予測の精度が低いときには、画像S/N優先の画像合成処理を適用して出力画像の画像合成を行うので、特に、動き予測の精度が低い(たとえば、相当に暗い画像間の動き予測の精度は低い)ときであっても、多数の撮影画像を必要としない。
したがって、より暗い被写体を撮影する場合における画像の撮影枚数の増大を抑制し、撮影者のストレス緩和を図った画像処理装置、画像処理方法及びプログラムを提供することができる。
In the present invention, when the accuracy of motion prediction is high, image synthesis with priority for image resolution is applied to perform image synthesis of the output image. On the other hand, when the accuracy of motion prediction is low, image synthesis with priority for image S / N. Is used to synthesize the output image, so a large number of captured images are required even when the accuracy of motion prediction is low (for example, the accuracy of motion prediction between considerably dark images is low). do not do.
Therefore, it is possible to provide an image processing apparatus, an image processing method, and a program that suppress an increase in the number of images to be taken when shooting a darker subject and reduce a photographer's stress.

以下、本発明の実施形態を、デジタルカメラへの適用を例にして、図面を参照しながら説明する。なお、以下の説明における様々な細部の特定ないし実例および数値や文字列その他の記号の例示は、本発明の思想を明瞭にするための、あくまでも参考であって、それらのすべてまたは一部によって本発明の思想が限定されないことは明らかである。また、周知の手法、周知の手順、周知のアーキテクチャおよび周知の回路構成等(以下「周知事項」)についてはその細部にわたる説明を避けるが、これも説明を簡潔にするためであって、これら周知事項のすべてまたは一部を意図的に排除するものではない。かかる周知事項は本発明の出願時点で当業者の知り得るところであるので、以下の説明に当然含まれている。   Hereinafter, embodiments of the present invention will be described with reference to the drawings, taking application to a digital camera as an example. It should be noted that the specific details or examples in the following description and the illustrations of numerical values, character strings, and other symbols are only for reference in order to clarify the idea of the present invention, and the present invention may be used in whole or in part. Obviously, the idea of the invention is not limited. In addition, a well-known technique, a well-known procedure, a well-known architecture, a well-known circuit configuration, and the like (hereinafter, “well-known matter”) are not described in detail, but this is also to simplify the description. Not all or part of the matter is intentionally excluded. Such well-known matters are known to those skilled in the art at the time of filing of the present invention, and are naturally included in the following description.

図1は、本実施形態の適用システムの一例を示すデジタルカメラの構成図である。この図において、デジタルカメラ1は、CPU2等を含む典型的には1チップ化されたマイクロプロセッサからなる制御部3と、この制御部3を中心にして適宜に配置された、デジタルカメラに必要な、少なくとも、以下の各部を備えて構成されている。   FIG. 1 is a configuration diagram of a digital camera showing an example of an application system of the present embodiment. In this figure, the digital camera 1 is necessary for a digital camera including a CPU 2 and the like, which is typically a one-chip microprocessor, and a digital camera appropriately arranged around the controller 3. At least, the following parts are provided.

撮像部4は、撮影レンズや絞り機構及び焦点合わせ機構(並びに必要であればズーム機構)を含む光学部5と、CCDセンサまたはCMOSセンサなどの二次元イメージセンサからなる撮像デバイス6とで構成される。撮像部4の動作〔絞りの大きさやズーム倍率(撮影画角の調整)、焦点合わせ、撮像デバイス6の露光時間(シャッタ速度)の設定、撮像信号の読み出し動作、及び撮影感度(ISO感度)の設定等〕は、制御部3からの撮影動作指示を受けた撮像制御部7からのコントロールによって制御される。制御部3からの撮影動作指示は、たとえば、スルー画像(撮影構図確認用の画像のこと。時として低解像度の画像であることもある。)の読み出し指示や、静止画または動画像(高解像度の画像)の読み出し指示、並びに、それらの読み出し動作に必要な絞り値設定やズーム倍率設定等の各種事前動作指示などである。   The imaging unit 4 includes an optical unit 5 including a photographing lens, a diaphragm mechanism, a focusing mechanism (and a zoom mechanism if necessary), and an imaging device 6 including a two-dimensional image sensor such as a CCD sensor or a CMOS sensor. The Operation of the imaging unit 4 [aperture size and zoom magnification (adjusting the shooting angle of view), focusing, setting of the exposure time (shutter speed) of the imaging device 6, readout operation of the imaging signal, and imaging sensitivity (ISO sensitivity) The setting and the like are controlled by the control from the imaging control unit 7 that has received the imaging operation instruction from the control unit 3. The shooting operation instruction from the control unit 3 is, for example, an instruction to read a through image (an image for checking shooting composition; sometimes a low resolution image), a still image or a moving image (high resolution). For example), and various prior operation instructions such as aperture value setting and zoom magnification setting necessary for the reading operation.

撮像部4からは、上記の制御部3からの撮影動作指示に応答して、スルー画像や静止画または動画像(以下、フレーム画像という)が所定のフレームレート(典型的には毎秒30フレーム)で周期的に読み出される。これらのフレーム画像は、不図示のデジタル変換器でデジタル信号に変換された後、メモリ部8のバッファ領域8aに一時記憶される。   In response to the shooting operation instruction from the control unit 3, the imaging unit 4 generates a through image, a still image, or a moving image (hereinafter referred to as a frame image) at a predetermined frame rate (typically 30 frames per second). Is read periodically. These frame images are converted into digital signals by a digital converter (not shown) and then temporarily stored in the buffer area 8a of the memory unit 8.

メモリ部8は、上記のバッファ領域8aに加えて、少なくとも、画像処理領域8b、作業領域8c及び加算法保持領域8dの各領域を備える。上記のバッファ領域8aを含むこれらの領域8a〜8dは、バス線9を介して、制御部3や画像処理部10及び表示部11から任意にアクセスされるようになっている。   In addition to the buffer area 8a, the memory unit 8 includes at least each of an image processing area 8b, a work area 8c, and an addition method holding area 8d. These areas 8 a to 8 d including the buffer area 8 a are arbitrarily accessed from the control unit 3, the image processing unit 10, and the display unit 11 via the bus line 9.

画像処理部10は、制御部3からの指示に従って、バッファ領域8aに一時保存されているフレーム画像を画像処理領域8bに転送し、転送されたフレーム画像に対して所要の圧縮処理(たとえば、JPEG圧縮処理)を行い、その圧縮画像で画像処理領域8bの格納データを上書きする。制御部3は、この画像処理領域8bの格納データ(圧縮画像)を後述の外部記憶部17に転送して保存する。   The image processing unit 10 transfers the frame image temporarily stored in the buffer area 8a to the image processing area 8b in accordance with an instruction from the control unit 3, and performs a required compression process (for example, JPEG) on the transferred frame image. Compression processing), and the stored data in the image processing area 8b is overwritten with the compressed image. The control unit 3 transfers the stored data (compressed image) in the image processing area 8b to the external storage unit 17 described later and stores it.

また、画像処理部10は、制御部3からの指示に従って、後述の外部記憶部17から読み出された圧縮画像を画像処理領域8bに転送し、転送した圧縮画像に対して所要の伸長処理(たとえば、JPEG伸長処理)を行い、その伸長画像で画像処理領域8bの格納データを上書きする。   Further, the image processing unit 10 transfers a compressed image read from an external storage unit 17 described later to the image processing area 8b in accordance with an instruction from the control unit 3, and performs a required decompression process (for the transferred compressed image). For example, JPEG decompression processing) is performed, and the stored data in the image processing area 8b is overwritten with the decompressed image.

表示部11は、液晶ディスプレイ等の平面表示デバイスで構成されており、通常は、バッファ領域8aに一時保存されているスルー画像を撮影構図確認のために逐次に読み出して表示するが、画像の撮影時には、圧縮処理前の撮影画像を画像処理領域8bから読み出して表示したり、あるいは、画像の再生時には、伸長処理後の再生画像を画像処理領域8bから読み出して表示したりする。さらに、表示部11は、制御部3から適宜に出力される各種設定画面(たとえば、メニュー図面等)を表示する。  The display unit 11 is composed of a flat display device such as a liquid crystal display. Normally, the through image temporarily stored in the buffer area 8a is sequentially read and displayed for checking the shooting composition. Sometimes, a captured image before compression processing is read out from the image processing area 8b and displayed, or when an image is reproduced, a reproduced image after expansion processing is read out from the image processing area 8b and displayed. Furthermore, the display unit 11 displays various setting screens (for example, menu drawings) that are appropriately output from the control unit 3.

プログラムコード記憶部12は、各種のソフトウェアリソースを保持する。このソフトウェアリソースには、CPU2のアーキテクチャに対応したオペレーティングシステム(OS)や、そのOSと協調してデジタルカメラ1の各種機能的動作(撮影動作や画像の再生動作及びその他の管理動作等)を実現する制御プログラムなどが含まれる。これらのソフトウェアリソースは、必要に応じて、プログラムコード記憶部12からメモリ部8の作業領域8cに読み出され(ロードされ)、制御部2のCPU2によって実行される。   The program code storage unit 12 holds various software resources. This software resource realizes an operating system (OS) corresponding to the architecture of the CPU 2 and various functional operations of the digital camera 1 (photographing operation, image reproduction operation and other management operations, etc.) in cooperation with the OS. Control program to be included. These software resources are read (loaded) from the program code storage unit 12 to the work area 8c of the memory unit 8 as necessary, and are executed by the CPU 2 of the control unit 2.

操作部13は、デジタルカメラ1のユーザ操作用入力インターフェースに必要な各種操作子、たとえば、静止画撮影や動画撮影を行うためのシャッタキー13aや、画像撮影と画像再生のモードを切り替えるためのモードキー13bなどを含む。   The operation unit 13 includes various operators necessary for the user operation input interface of the digital camera 1, such as a shutter key 13a for performing still image shooting and moving image shooting, and a mode for switching between image shooting and image playback modes. Including a key 13b.

コンピュータインターフェース部14は、たとえば、USBやIEEE1394などの汎用プロトコルに対応したデータ入出力部であり、このコンピュータインターフェース部14を介し、必要に応じて、外部機器、典型的にはパーソナルコンピュータ15との間で撮影済み画像の転送や読み込みを行うことができるようになっている。   The computer interface unit 14 is, for example, a data input / output unit compatible with a general-purpose protocol such as USB or IEEE 1394. It is possible to transfer and read captured images between them.

外部記憶インターフェース部16は、外部記憶部17との間で画像データ等の入出力を行うものであり、外部記憶部17は外部記憶インターフェース部16から供給された画像データ等を記憶する。   The external storage interface unit 16 inputs and outputs image data and the like with the external storage unit 17, and the external storage unit 17 stores the image data and the like supplied from the external storage interface unit 16.

外部記憶部17は、フラッシュメモリ、ハードディスクまたは光ディスク等の不揮発性(電源をオフにしてもその記憶内容を失わない)の大容量記憶装置によって構成されており、主に、このデジタルカメラ1で撮影された画像を蓄積保存するために用いられる。なお、蓄積保存される各画像は、たとえば、JPEG形式等の圧縮ファイル、または、非圧縮の生データファイル(いわゆるRAWファイル)である。なお、この外部記憶部17は、固定型であってもよく、あるいは、デジタルカメラ1から取り外して、たとえば、外部のパーソナルコンピュータ15に装着可能な汎用形式のメモリデバイスであってもよい。   The external storage unit 17 is composed of a non-volatile mass storage device such as a flash memory, a hard disk, or an optical disk (the stored contents are not lost even when the power is turned off). Used to store and store the generated images. Each image stored and stored is, for example, a compressed file such as a JPEG format or an uncompressed raw data file (so-called RAW file). The external storage unit 17 may be a fixed type, or may be a general-purpose memory device that can be detached from the digital camera 1 and attached to the external personal computer 15, for example.

電源部18は、充電式の二次電池あるいは使い捨て型の一次電池を含み、制御部3をはじめとした、デジタルカメラ1の各部の動作に必要な電源電圧を供給する。   The power supply unit 18 includes a rechargeable secondary battery or a disposable primary battery, and supplies a power supply voltage necessary for the operation of each unit of the digital camera 1 including the control unit 3.

ここで、撮像デバイス6の詳細について説明する。
図2は、撮像デバイス6の構造図である。ここでは、N列×M行の画素を有するCCDセンサを例にする。撮像デバイス6は、入射光量に応じた電荷を蓄積するN×M個の光電変換素子6aをマトリクス状に二次元配列するとともに、各列間に1本ずつ、全部でN本の垂直転送部6bを配置して撮像領域6cを形成し、さらに、撮像領域6cの図面に向かって下側に水平転送部6dを配置して構成する。光電変換素子6aに蓄積された信号電荷は、読み出し信号(不図示)に応答して隣接する垂直転送部6bに取り込まれ、垂直転送部6bの内部を垂直転送クロック(不図示)に同期して図面の下方向に順次転送される。すべての垂直転送部6bの出力端は水平転送部6dに接続されており、水平転送部6dには、垂直転送クロックに同期して1ライン分の信号電荷が順次に取り込まれる。水平転送部6dに取り込まれた信号電荷は、水平転送クロック(不図示)に同期して図面の左方向に順次転送され、水平転送部6dの出力端に到達した信号電荷は、同端に設けられた電荷検出部6eで電気信号に変換され、アンプ6fで増幅された後、端子6gから画素単位の画像信号(CCD出力)として外部に取り出される。
Here, details of the imaging device 6 will be described.
FIG. 2 is a structural diagram of the imaging device 6. Here, a CCD sensor having N columns × M rows of pixels is taken as an example. The imaging device 6 two-dimensionally arranges N × M photoelectric conversion elements 6a for accumulating charges according to the amount of incident light in a matrix, and N vertical transfer units 6b, one for each column. To form an imaging region 6c, and further, a horizontal transfer portion 6d is arranged on the lower side of the imaging region 6c in the drawing. The signal charges accumulated in the photoelectric conversion element 6a are taken into an adjacent vertical transfer unit 6b in response to a read signal (not shown), and the inside of the vertical transfer unit 6b is synchronized with a vertical transfer clock (not shown). Sequentially transferred downward in the drawing. The output ends of all the vertical transfer units 6b are connected to the horizontal transfer unit 6d. The horizontal transfer unit 6d sequentially takes in signal charges for one line in synchronization with the vertical transfer clock. The signal charge taken into the horizontal transfer unit 6d is sequentially transferred in the left direction in the drawing in synchronization with a horizontal transfer clock (not shown), and the signal charge that has reached the output end of the horizontal transfer unit 6d is provided at the same end. The electric charge detection unit 6e converts the electric signal into an electric signal, and the amplifier 6f amplifies the electric signal. Then, the electric signal is taken out from the terminal 6g as a pixel unit image signal (CCD output).

ここで、光電変換素子6aの水平方向の並び(走査線又はライン)にそれぞれO1、E1、O2、E2、O3、E3、・・・・の便宜的な符号を付すことにする。但し、Oは奇数の略、Eは偶数の略である。O1、O2、O3で奇数ラインを、E1、E2、E3で偶数ラインを示すものとする。インターレース型のCCDセンサは、フィールド読み出し(フィールド蓄積ともいう)と、フレーム読み出し(フレーム蓄積ともいう)の二つのモードを外部から切替えることができる。フィールド読み出しでは、CCD出力がO1+E1、O2+E2、O3+E3、・・・・の順番になるが、フレーム読み出しでは、奇数フレームと偶数フレームの2回に分けてCCD出力が取り出され、したがって、奇数フレームではCCD出力がO1、O2、O3、・・・・の順番になり、偶数フレームではCCD出力がE1、E2、E3、・・・・の順番になる。   Here, for convenience, O1, E1, O2, E2, O3, E3,... Are assigned to the horizontal alignments (scanning lines or lines) of the photoelectric conversion elements 6a. However, O is an abbreviation for odd numbers, and E is an abbreviation for even numbers. O1, O2, and O3 indicate odd lines, and E1, E2, and E3 indicate even lines. The interlaced CCD sensor can switch between two modes of field reading (also referred to as field accumulation) and frame reading (also referred to as frame accumulation) from the outside. In the field readout, the CCD output is in the order of O1 + E1, O2 + E2, O3 + E3,..., But in the frame readout, the CCD output is taken out in two times, an odd frame and an even frame. The output is in the order of O1, O2, O3,..., And the CCD output is in the order of E1, E2, E3,.

このように、多数の光電変換素子6aを2次元に配列し、被写体からの光に応じた画像信号を出力するCCDセンサに代表される撮像デバイス6は、そのままでは色情報を含む画像信号を出力できない。光電変換素子6aが単に光の明暗の強度に対応した信号しか発生しないからである。   As described above, the image pickup device 6 typified by a CCD sensor that two-dimensionally arranges a large number of photoelectric conversion elements 6 a and outputs an image signal corresponding to light from a subject outputs an image signal including color information as it is. Can not. This is because the photoelectric conversion element 6a merely generates a signal corresponding to the intensity of light brightness.

色情報を得るために、3個の撮像デバイスを用い、その各々に赤、緑、青の色フィルタを装着して、それぞれの撮像デバイスから赤色、緑色、青色の画像信号を取り出すようにした3板式のカラー撮像デバイスが知られている。この撮像デバイスは、専ら色再現性を重視するスタジオ用テレビカメラなどに用いられているが、家庭用のビデオカメラや普及型のデジタルカメラなどにあっては、サイズや重さ及び電力消費の点から1個の撮像デバイスとモザイク状の色フィルタとを組み合わせた「単板式のカラー撮像デバイス」が用いられる。このことは、本実施形態の撮像デバイス6においても同様である。   In order to obtain color information, three image pickup devices are used, and red, green, and blue color filters are attached to each of the image pickup devices, and red, green, and blue image signals are extracted from the respective image pickup devices. A plate-type color imaging device is known. This imaging device is mainly used for studio TV cameras that emphasize color reproducibility, but for home video cameras and popular digital cameras, size, weight, and power consumption. A “single-plate color imaging device” in which one imaging device and a mosaic color filter are combined is used. The same applies to the imaging device 6 of the present embodiment.

図3は、撮像デバイス6と色フィルタ19とを示す図である。撮像デバイス6の桝目は各々1個の光電変換素子6aを含む画素であり、各画素は色フィルタ19の桝目と一対一に対応している。色フィルタ19の桝目はそれぞれ特定の色を有しており、色の選び方や配列の仕方によって様々なタイプのものが使用されている。   FIG. 3 is a diagram illustrating the imaging device 6 and the color filter 19. Each cell of the imaging device 6 is a pixel including one photoelectric conversion element 6 a, and each pixel has a one-to-one correspondence with the cell of the color filter 19. Each cell of the color filter 19 has a specific color, and various types are used depending on how the colors are selected and arranged.

図4は、B.E.Bayerによって考え出された、いわゆるベイヤー方式(又は緑市松方式)と呼ばれる色フィルタの原理図である。この方式は、色信号と輝度信号のバランスがよく、被写体の明るさに依存せずに良好な色再現性が得られることから、広く用いられている方式である。この図において、Yは輝度情報を得るためのフィルタ、C1 、C2
は色情報を得るためのフィルタである。Yフィルタを市松状に配置するとともに、奇数ラインの隙間にC1 フィルタを配置し、偶数ラインの隙間にC2 ラインを配置する。なお、Yフィルタを多く配置する理由は、人間の視覚上、色情報よりも輝度情報の方が画像の解像度や輪郭のシャープさをよく知覚するからである。
FIG. E. It is a principle diagram of a color filter called a Bayer method (or a green checkered method) conceived by Bayer. This method is widely used because the color signal and the luminance signal are well balanced and good color reproducibility can be obtained without depending on the brightness of the subject. In this figure, Y is a filter for obtaining luminance information, C 1 , C 2
Is a filter for obtaining color information. The Y filter is arranged in a checkered pattern, the C 1 filter is arranged in the gap between the odd lines, and the C 2 line is arranged in the gap between the even lines. The reason why a large number of Y filters are arranged is that luminance information perceives better image resolution and outline sharpness than color information in human vision.

図5は、実際の色フィルタの構成図であり、Rは赤色のフィルタ、Gは緑色のフィルタ、Bは青色のフィルタである。赤(R)、緑(G)、青(B)は光の三原色であり、特に、緑色は被写体の明るさをよく表すから、Gフィルタは輝度情報を得るためのフィルタとしても用いられる。すなわち、Gフィルタは、前出のYフィルタに相当し、RフィルタとBフィルタは、それぞれC1 、C2
フィルタに相当する。なお、図示の例では、6×6のフィルタしか示していないが、これは説明の便宜である。実際には遙かに多くのフィルタ(升目)で構成されている。
FIG. 5 is a configuration diagram of an actual color filter, where R is a red filter, G is a green filter, and B is a blue filter. Red (R), green (G), and blue (B) are the three primary colors of light. In particular, since green represents the brightness of the subject well, the G filter is also used as a filter for obtaining luminance information. That is, the G filter corresponds to the Y filter described above, and the R filter and the B filter are C 1 , C 2 , respectively.
It corresponds to a filter. In the illustrated example, only a 6 × 6 filter is shown, but this is for convenience of explanation. Actually, it is composed of much more filters (mesh).

図6は、インターレース型CCDセンサの画素配列図である。この図に示すように、インターレース型CCDセンサの場合、色フィルタは、奇数ラインと偶数ラインで同一の配列になるが、前記のフィールド読み出しやフレーム読み出しに関わらず、読み出された画素の配列に着目すれば、図5の配列(ベイヤー方式に則った色情報の並び)とまったく同じである。すなわち、フィールド読み出しではO1+E1、O2+E2、O3+E3の2ライン合成読み出しとなり、一方、フレーム読み出しではO1、O2、O3、・・・、E1、E2、E3の飛び越しライン読み出しとなるが、何れの読み出しでも、G/RラインとG/Bラインを順次に読み出す点で同一である。   FIG. 6 is a pixel array diagram of an interlaced CCD sensor. As shown in this figure, in the case of an interlaced CCD sensor, the color filters are arranged in the same way for odd lines and even lines, but the read pixels are arranged regardless of the field readout or frame readout. If attention is paid, the arrangement (arrangement of color information in accordance with the Bayer method) in FIG. 5 is exactly the same. That is, O1 + E1, O2 + E2, and O3 + E3 combined readout is performed in field readout, while O1, O2, O3,..., E1, E2, and E3 interlaced readout are performed in frame readout. It is the same in that the G / R line and the G / B line are read sequentially.

したがって、本明細書では特に断りのない限り、図5に示すベイヤー方式の配列を例にして、撮像デバイス6の画素や色フィルタの配列を説明することにする。   Therefore, in this specification, unless otherwise specified, the arrangement of pixels and color filters of the imaging device 6 will be described using the Bayer arrangement shown in FIG. 5 as an example.

次に、本実施形態に特有の事項について説明する。本実施態の解決すべき技術課題は、CCDセンサ等の撮像デバイス6で撮影された画像の手振れや被写体振れを補正するための従来技術(冒頭の第2の従来技術)の問題点を解決することにある。すなわち、第2の従来技術においては、露出時間を1/n(10ミリ秒→1ミリ秒)にしてn(n=10)枚の画像を連写し、それらn枚の画像を合成して露光不足を補っているが、より暗い被写体を撮影する場合、たとえば、1/10秒のシャッタ速度(露光時間100ミリ秒)が必要な明るさの被写体を撮影する場合の撮像素子の画像撮影枚数(n)は、100ミリ秒÷1ミリ秒=100〔枚〕にもなるので、撮影者は10倍の待ち時間を覚悟しなければならなくなり、大きなストレスを感じるという問題点がある。本実施形態の狙いは、画像の明るさに応じて、画像合成処理を切り替えることにより、より暗い被写体を撮影する場合における画像の撮影枚数の増大を抑制し、撮影者のストレス緩和を図ることにある。   Next, items specific to this embodiment will be described. The technical problem to be solved by the present embodiment is to solve the problems of the conventional technique (the second conventional technique at the beginning) for correcting the camera shake and the subject shake of the image taken by the imaging device 6 such as a CCD sensor. There is. That is, in the second prior art, the exposure time is set to 1 / n (10 milliseconds → 1 millisecond), n (n = 10) images are continuously shot, and these n images are combined and exposed. Although the shortage is compensated for, when shooting a darker subject, for example, the number of images shot by the image sensor when shooting a subject with a brightness that requires a shutter speed of 1/10 second (exposure time 100 milliseconds) ( Since n) is also 100 milliseconds ÷ 1 millisecond = 100 [sheets], the photographer has to be prepared for a waiting time of 10 times, and there is a problem of feeling great stress. The aim of the present embodiment is to suppress an increase in the number of images taken when shooting a darker subject by switching the image composition processing according to the brightness of the image, and to reduce the photographer's stress. is there.

図7は、本実施形態における特徴的な事項を含む制御プログラムのフローチャートを示す図である。この制御プログラムは、予めプログラムコード記憶部12に保持されており、ユーザによる撮影開始の操作アクション(すなわち、シャッタキー13aの押し下げ操作)に応答して、メモリ部8の作業領域8cに読み込まれ(ロードされ)、制御部3のCPU2によって実行される。   FIG. 7 is a diagram showing a flowchart of a control program including characteristic items in the present embodiment. This control program is stored in advance in the program code storage unit 12, and is read into the work area 8c of the memory unit 8 in response to an operation action for starting shooting by the user (ie, a pressing operation of the shutter key 13a) ( Loaded) and executed by the CPU 2 of the control unit 3.

このフローチャートを開始すると、まず、メモリ部8のバッファ領域8aを初期化する(ステップS1)。初期化とは、たとえば、バッファ領域8aの全ビット(全画素)にオール0を書き込むという操作である。次いで、撮像部4を制御して、1枚目の高解像度のフレーム画像(以下、1枚目画像)を撮影する(ステップS2)。撮影された1枚目画像は撮像部10の撮像デバイス6から取り出され、不図示のアナログデジタル変換器でデジタル信号に変換された後、メモリ部8のバッファ領域8aに書き込まれる。   When this flowchart is started, first, the buffer area 8a of the memory unit 8 is initialized (step S1). The initialization is, for example, an operation of writing all 0s in all bits (all pixels) of the buffer area 8a. Next, the imaging unit 4 is controlled to capture the first high-resolution frame image (hereinafter referred to as the first image) (step S2). The photographed first image is taken out from the imaging device 6 of the imaging unit 10, converted into a digital signal by an analog-digital converter (not shown), and then written in the buffer area 8 a of the memory unit 8.

次いで、バッファ領域8aに書き込まれた1枚目画像から特徴点の抽出を行う(ステップS3)。抽出された特徴点の情報は、後述の2枚目以降の画像の動き予測に用いられる。なお、特徴点の検出器としては、たとえば、ハリスのコーナー検出器(Harris corner detector)やSUSANと呼ばれるコーナー検出器等、公知のものを使用することができる。これらの検出器を用いて、閾値以上のものを特徴点として選択すればよい。   Next, feature points are extracted from the first image written in the buffer area 8a (step S3). The extracted feature point information is used for motion prediction of the second and subsequent images described later. As the feature point detector, for example, a well-known one such as a Harris corner detector or a corner detector called SUSAN can be used. What is necessary is just to select a thing more than a threshold value as a feature point using these detectors.

次いで、動き予測の精度を推定する(ステップS4)。“動き予測の精度”とは、1枚目の画像と後述の2枚目以降の画像との間における画像間の動き予測の確かさの度合いのことをいう。たとえば、1枚目の画像と後述の2枚目以降の画像の明るさが相当不足している場合(すなわち、相当暗い画像である場合)、各々の画像のコントラストが低くなるので、前記のステップS3で抽出された特徴点の誤差が大きくなり、したがって、この場合は、動き予測の精度が悪化する(精度低)と推定できる。これに対して、1枚目の画像と後述の2枚目以降の画像の明るさがそれほど不足していない場合(すなわち、それほど暗くない画像である場合)、各々の画像のコントラストがそこそこ得られるので、前記のステップS3で抽出された特徴点の誤差が小さくなり、したがって、この場合は、動き予測の精度が悪化しない(精度高)と推定できる。   Next, the accuracy of motion prediction is estimated (step S4). “The accuracy of motion prediction” refers to the degree of certainty of motion prediction between images between the first image and the second and later images described later. For example, when the brightness of the first image and the second and subsequent images described later are considerably insufficient (that is, when the image is considerably dark), the contrast of the respective images becomes low. The error of the feature point extracted in S3 becomes large. Therefore, in this case, it can be estimated that the accuracy of motion prediction deteriorates (low accuracy). On the other hand, when the brightness of the first image and the second and subsequent images described later are not so low (that is, when the images are not so dark), the contrast of each image can be obtained moderately. Therefore, the error of the feature point extracted in the above step S3 becomes small. Therefore, in this case, it can be estimated that the accuracy of motion prediction does not deteriorate (high accuracy).

このように、動き予測の精度と画像の明るさの間には一定の関係が成立すると考えられるので、ここでは、動き予測の精度を推定するための尺度として、入力された画像の明るさ(輝度値)を用いることにする。輝度値の測定方法は、たとえば、入力画像を間引きながら輝度Yを求め、その輝度Yの平均をその画像の明るさとしてもよい。次式(1)は、画像のRGB成分から輝度Yを求めるための計算式の例である。   Thus, since it is considered that there is a certain relationship between the accuracy of motion prediction and the brightness of the image, here, the brightness of the input image (as a measure for estimating the accuracy of motion prediction ( Luminance value). As a method of measuring the luminance value, for example, the luminance Y may be obtained while thinning out the input image, and the average of the luminance Y may be the brightness of the image. The following formula (1) is an example of a calculation formula for obtaining the luminance Y from the RGB components of the image.

Figure 0004687619
Figure 0004687619

たとえば、間引き数が画像の縦横ともに“8”である場合、注目画素の座標(x,y)におけるx及びyは、次式(2)のようになる。   For example, when the thinning-out number is “8” in both the vertical and horizontal directions, x and y in the coordinates (x, y) of the target pixel are expressed by the following equation (2).

Figure 0004687619
Figure 0004687619

式(2)における座標(x,y)の画素の色はG(録)である。後述のベイヤー構造の画素配列図(図8)に示すように、ベイヤー構造においては、G画素が輝度情報の画素を兼ねている。したがって、ベイヤー構造の画素配列においては、次式(3)に示すように、輝度Yを(x,y)の画素値(G)と、(x+1,y)の画素値(青)と、(x,y+1)の画素値(赤)とから求めることになる。   The color of the pixel at coordinates (x, y) in equation (2) is G (record). As shown in a pixel array diagram of the Bayer structure described later (FIG. 8), in the Bayer structure, the G pixel also serves as a pixel of luminance information. Therefore, in the pixel array of the Bayer structure, as shown in the following equation (3), the luminance Y is set to the pixel value (G) of (x, y), the pixel value (blue) of (x + 1, y), ( x, y + 1) and the pixel value (red).

Figure 0004687619
Figure 0004687619

ここで、P(x,y)は(x、y)の画素値である。画像の明るさLumiは、輝度Yの平均として、次式(4)から求める。   Here, P (x, y) is a pixel value of (x, y). The brightness Lumi of the image is obtained from the following equation (4) as an average of the luminance Y.

Figure 0004687619
Figure 0004687619

ただし、Nは間引きした画素の総数である。   Here, N is the total number of thinned pixels.

このようにして、画像の明るさから動き予測の精度を推定すると、次いで、その動き予測の精度の推定結果を判定する(ステップS5)。たとえば、画像の明るさが予め定めた値より大きいか否かを判定する。画像の明るさが予め定めた値より大きい場合は「精度高」(動き予測の精度が高い)と判定し、そうでない場合は、「精度低」(動き予測の精度が低い)と判定する。   If the accuracy of motion prediction is estimated from the brightness of the image in this way, then the estimation result of the accuracy of motion prediction is determined (step S5). For example, it is determined whether the brightness of the image is greater than a predetermined value. If the brightness of the image is greater than a predetermined value, it is determined that the accuracy is high (the accuracy of motion prediction is high), and otherwise it is determined that the accuracy is low (the accuracy of motion prediction is low).

そして、それぞれの判定結果に対応した適切な画像合成処理(ここでは、画像加算の画像合成処理)を選択し(ステップS6、ステップS7)、その選択結果をメモリ部8の加算法保持領域8dに格納する。   Then, an appropriate image composition process (here, image composition process for image addition) corresponding to each determination result is selected (step S6, step S7), and the selection result is stored in the addition method holding area 8d of the memory unit 8. Store.

「精度低」の場合の選択画像合成処理は、「画像S/N優先」の加算法に関するものであり、一方、「精度高」の場合の選択画像合成処理は、「画像解像度優先」の加算法に関するものである。これは、画像がそれほど暗くなく動き予測の精度がよい(精度高)と推定されたときには、画像解像度優先で手振れ補正を行ってもよいが、その逆に、画像が暗く動き予測の精度がよくない(精度低)と推定されたときには、無理して高い解像度を得る手振れ補正を行う(したがって、多くの撮影画像を必要とする)よりも、むしろ解像度を犠牲にして少ない撮影画像枚数で出力画像のS/N改善を優先させた手振れ補正の方が、得策だからである。   The selected image composition processing in the case of “low accuracy” relates to the addition method of “image S / N priority”, while the selected image composition processing in the case of “high accuracy” is the addition of “image resolution priority”. It is about the law. This is because when it is estimated that the image is not so dark and the motion prediction accuracy is good (high accuracy), camera shake correction may be performed with priority on the image resolution, but conversely, the image is dark and the motion prediction accuracy is good. When it is estimated that there is no image (low accuracy), the output image is produced with a small number of captured images at the expense of resolution, rather than performing camera shake correction (for which a large number of captured images are required). This is because camera shake correction with priority on S / N improvement is better.

このように、画像の明るさから動き予測の精度を推定して画像合成処理を選択し、その選択結果に応じた情報(たとえば、「画像S/N優先」→“0”、「画像解像度優先」→“1”)をメモリ部8の加算法保持領域8dに格納する。次に、動き補正パラメータを初期化(動きなし)(ステップS8)した後、メモリ部8の加算法保持領域8dから前記の選択結果に応じた情報(“0”、“1”)を取り出し、その情報が“1”であるか(つまり「画像解像度優先」であるか)、または、“0”であるか(つまり「画像S/N優先」であるか)を判定する(ステップS9)。   As described above, the accuracy of motion prediction is estimated from the brightness of the image, and the image synthesis process is selected. Information corresponding to the selection result (for example, “image S / N priority” → “0”, “image resolution priority”). "→" 1 ") is stored in the addition method holding area 8d of the memory unit 8. Next, after the motion correction parameter is initialized (no motion) (step S8), information (“0”, “1”) corresponding to the selection result is extracted from the addition method holding area 8d of the memory unit 8, It is determined whether the information is “1” (that is, “image resolution priority”) or “0” (that is, “image S / N priority”) (step S9).

ここで、ステップS8で動き補正パラメータを初期化する(動きなしとする)理由は、次のステップS10またはステップS11において実行される画像合成処理(画像解像度優先の加算法によるもの、または、画像S/N優先の加算法によるもの)では、1枚目の画像が処理対象(基準画像)であり、したがって、この段階では、まだ加算すべき画像が存在しないからである。   Here, the reason for initializing the motion correction parameter in step S8 (assuming no motion) is the image composition processing (by the image resolution priority addition method performed in step S10 or step S11, or the image S). This is because the first image is an object to be processed (reference image) and therefore there is no image to be added yet at this stage.

具体的には、たとえば、動き補正パラメータがアフィン変換であるモデルを用いたものである場合、画像合成処理では座標(u,v)から座標(x,y)への変換を、次式(5)を用いて処理がなされる。なお、次式(5)は同次座標表現形式である。   Specifically, for example, when a model whose motion correction parameter is affine transformation is used, in the image synthesis process, conversion from coordinates (u, v) to coordinates (x, y) is performed using the following equation (5). ) Is used for processing. In addition, following Formula (5) is a homogeneous coordinate expression format.

Figure 0004687619
Figure 0004687619

この例の場合、動きが無い場合のパラメータは、(x,y)=(u,v)の関係になるので、そのパラメータは、「a=1,b=0,c=0,d=1,e=0,f=0」となる。   In the case of this example, the parameters when there is no motion are in the relationship of (x, y) = (u, v), so the parameters are “a = 1, b = 0, c = 0, d = 1. , E = 0, f = 0 ”.

このように、メモリ部8の加算法保持領域8dに保持されていた前記の選択結果(「画像解像度優先」または「画像S/N優先」)に対応して、ステップS10またはステップS11で、画像処理部10にて画像解像度優先の加算法による画像合成処理、または、画像S/N優先の加算法による画像合成処理を実行する。画像処理部10は、前式(5)の座標変換を行って、メモリ部8のバッファ領域8aに記録されている一枚目の撮影画像の該当する座標のデータを読み出して、バッファ領域8a内で別領域に確保された画像加算データと加算処理がなされる。バッファ領域8aは、初期化ステップS1で“0”に初期化されていたので、処理後、画像加算データは1枚目の画像だけが反映した画像となる。なお、各処理の詳細は後述する。   In this manner, in step S10 or step S11, the image is selected in accordance with the selection result ("image resolution priority" or "image S / N priority") held in the addition method holding area 8d of the memory unit 8. The processing unit 10 executes image composition processing by the image resolution priority addition method or image S / N priority addition method. The image processing unit 10 performs the coordinate conversion of the above equation (5), reads the data of the corresponding coordinates of the first photographed image recorded in the buffer area 8a of the memory unit 8, and stores the data in the buffer area 8a. Then, the addition processing is performed with the image addition data secured in another area. Since the buffer area 8a has been initialized to “0” in the initialization step S1, after the processing, the image addition data becomes an image reflecting only the first image. Details of each process will be described later.

次に、まだ、シャッタキー13aが押され続けているかを調べる(ステップS12)。シャッタキー13aが押され続けている場合は、そのまま合成処理を継続するために、2枚目以降の高解像度のフレーム画像(以下、2枚目以降画像)を撮影する(ステップS16)。撮影された2枚目以降画像は、先の1枚目画像と同様に、撮像部10の撮像デバイス6から取り出され、不図示のアナログデジタル変換器でデジタル信号に変換された後、メモリ部8のバッファ領域8aに書き込まれる。   Next, it is checked whether the shutter key 13a is still being pressed (step S12). If the shutter key 13a is kept pressed, the second and subsequent high-resolution frame images (hereinafter, the second and subsequent images) are photographed in order to continue the synthesis process (step S16). The captured second and subsequent images are taken out from the imaging device 6 of the imaging unit 10 and converted into digital signals by an analog-to-digital converter (not shown), and then the memory unit 8. Are written in the buffer area 8a.

そして、基準画像(この段階では1枚目画像)の特徴点が、今回撮影した画像(この段階では2枚目画像)のどの位置に移動したかの追跡を行い、基準画像の各特徴点と今回撮影した画像の対応する座標との対応リストを作成する(ステップS17)。この追跡方法としては、たとえば、勾配法やテンプレートマッチング関数などを用いたピクセル位置推定法などを利用することができる。そして、このように追跡手法によって作成した対応リストから、たとえば、RANSAC(Random Sample Consensus Argorithm)などにより、誤った対応点を除外し、残った対応点リストから、前式(5)のパラメータ(a〜f)を最小二乗法によって求める(ステップS18)。   Then, it tracks where the feature point of the reference image (the first image at this stage) has moved to the image captured this time (the second image at this stage). A correspondence list with corresponding coordinates of the image taken this time is created (step S17). As this tracking method, for example, a pixel position estimation method using a gradient method, a template matching function, or the like can be used. Then, from the corresponding list created by the tracking method in this way, for example, by using RANSAC (Random Sample Consensus Argorithm) or the like, an erroneous corresponding point is excluded, and from the remaining corresponding point list, the parameter (a) (a) ˜f) is obtained by the least square method (step S18).

次いで、ステップS18で求めた動き補正パラメータを用いて、現在選択されている画像加算法により画像加算を行って、手振れや被写体振れが無く、しかも、充分なコントラストの出力加算画像を求める。求められた出力加算画像はメモリのバッファ領域8a内の加算画像データを更新する(ステップS10またはステップS11)。   Next, using the motion correction parameter obtained in step S18, image addition is performed by the currently selected image addition method to obtain an output added image having no camera shake or subject shake and having sufficient contrast. The obtained output added image updates the added image data in the buffer area 8a of the memory (step S10 or step S11).

このように、シャッタキー13aが押され続けている間、画像は1枚目、2枚目、3枚目・・・・と連続的に撮影(連写撮影)され、これらの画像が撮影される度に、まずは、1枚目を基準画像として、その基準画像と2枚目との間の動き補正が行われた後、その基準画像と2枚目の画像の画像加算が行われ、以降、基準画像をその加算画像で入れ替えて、その基準画像と3枚目の画像との間の動き補正、その基準画像と2枚目の画像の画像加算・・・・を、シャッタキー13aが押されなくなるまで、すなわち、ユーザの指がシャッタキー13aから離れるまで繰り返される。   In this way, while the shutter key 13a is kept pressed, the first, second, third,... Images are continuously shot (continuous shooting), and these images are shot. First, the first image is used as a reference image, and after the motion correction between the reference image and the second image is performed, the image addition of the reference image and the second image is performed. The shutter key 13a presses the reference image with the added image to correct the motion between the reference image and the third image, and to add the image between the reference image and the second image. The process is repeated until the user's finger leaves the shutter key 13a.

そして、ユーザの指がシャッタキー13aから離れると、ステップS12の判定結果がNOとなり、その時点のメモリバッファ領域8a内の出力加算画像に対して必要な現像処理、たとえば、ホワイトバランス調整やブライト調整、ガンマ(γ)補正及びトーン補正などを行った後(ステップS13)、画像処理部10において現像処理後の画像を画像処理領域8bに転送し、JPEGなどの圧縮処理を行い(ステップS14)、最後に、その圧縮画像を外部記憶部17などに保存処理して(ステップS15)、フローチャートを終了する。   When the user's finger is released from the shutter key 13a, the determination result in step S12 is NO, and necessary development processing for the output added image in the memory buffer area 8a at that time, for example, white balance adjustment or brightness adjustment is performed. Then, after performing gamma (γ) correction and tone correction (step S13), the image processing unit 10 transfers the developed image to the image processing area 8b and performs compression processing such as JPEG (step S14). Finally, the compressed image is stored in the external storage unit 17 or the like (step S15), and the flowchart ends.

このように、このフローチャートによれば、シャッタキー13aの押し下げ直後に1枚目の画像を撮影して、その画像の特徴点を抽出すると共に、たとえば、その画像の明るさから動き予測の精度を推定し、その推定結果に基づいて「画像解像度優先」の画像合成処理を選択するのか、それとも「画像S/N優先」の画像合成処理を選択するのかを決定しておいて、以降、シャッタキー13aが押され続けている間、2枚目以降の画像を逐次に撮影すると共に、基準画像とその基準画像に続いて撮影された画像との間の特徴点の対応リストから誤った対応点を取り除いた残りの対応リストに基づいて、前式(5)のパラメータを求め、上記決定しておいた画像加算法、すなわち、「画像解像度優先」の画像合成処理、または、「画像S/N優先」の画像合成処理を使用して画像加算を行うことにより、手振れや被写体振れが無く、しかも、充分なコントラストの出力加算画像を得ることができる。   As described above, according to this flowchart, the first image is taken immediately after the shutter key 13a is depressed, the feature points of the image are extracted, and, for example, the accuracy of motion prediction is improved from the brightness of the image. Based on the estimation result, it is determined whether to select “image resolution priority” image synthesis processing or “image S / N priority” image synthesis processing. While the button 13a continues to be pressed, the second and subsequent images are sequentially photographed, and an erroneous corresponding point is identified from the feature point correspondence list between the reference image and the image captured subsequent to the reference image. Based on the removed correspondence list, the parameter of the previous equation (5) is obtained, and the image addition method determined above, that is, “image resolution priority” image synthesis processing or “image S / N superiority” is determined. By performing image addition using image synthesis processing ", a hand shake or subject blur is not, moreover, it is possible to obtain an output addition image of sufficient contrast.

<画像加算法>
動き補正を伴う画像加算について説明する。ここで、画像加算とは、時間的に連続して撮影された2枚の画像間の位置ずれを補正し、それらの画像を重なり合わせるようにして、両画像の対応画素同士の情報を加算することをいう。
<Image addition method>
Image addition accompanied by motion correction will be described. Here, image addition corrects a positional shift between two images taken continuously in time, and adds information of corresponding pixels of both images so as to overlap the images. That means.

図8は、加算対象画像の画素配列図である。ここでは、先に説明したベイヤー構造のものを示している。この図において、x軸は列方向、y軸は行方向を表し、各画素の座標は(x,y)である。先にも説明したとおり、ベイヤー構造では、G、B、G、B・・・・の行とR、G、R、G・・・・の行が交互に配列される(ただし、ノンインターレース型の配列)。Rは赤色画素、Gは緑色画素、Bは青色画素である、なお、人間の目によく感じられる緑色画素(G)の割合が多くなっている。これは輝度情報の画素を兼ねるためである。また、R、G、Bの各々に付した二桁の添え字はそれぞれの画素位置(座標)を表している。   FIG. 8 is a pixel array diagram of the addition target image. Here, the thing of the Bayer structure demonstrated previously is shown. In this figure, the x-axis represents the column direction, the y-axis represents the row direction, and the coordinates of each pixel are (x, y). As described above, in the Bayer structure, rows of G, B, G, B,... And rows of R, G, R, G,. Array). R is a red pixel, G is a green pixel, and B is a blue pixel, and the ratio of green pixels (G) that are often felt by human eyes is increasing. This is because it also serves as a pixel for luminance information. In addition, a two-digit subscript attached to each of R, G, and B represents each pixel position (coordinate).

シャッタキー13aが押し下げ続けられている間の入力画像は、図示のようなベイヤー構造の画素配列を有している。このため、入力画像の各画素には1チャンネルの色情報(すなわち、R、G、Bいずれかのカラーデータ)しか含まれていない。これに対して、出力画像をRGBの画像形式とすれば、出力画像の各画素は3チャンネルのカラーデータを持つことになる。   The input image while the shutter key 13a is kept depressed has a pixel array with a Bayer structure as shown. For this reason, each pixel of the input image includes only one-channel color information (that is, color data of any one of R, G, and B). On the other hand, if the output image is in the RGB image format, each pixel of the output image has three channels of color data.

出力画像の座標系を1枚目の画像の座標系と同じに取る。まず、1枚目の画像加算を考える。出力画像の座標系は1枚目の画像の座標系と同じに取っているため、出力画像の座標点(u,v)に対応する入力画像の座標(x,y)は、(u,v)となる。この座標に対応する画素データは、入力画像はベイヤー構造であるので、各画素には1チャンネルのカラーデータしか存在せず、それ以外の画素データは存在しないので、近傍の対応する色の画像データから補間などを用いて求めることになる。   The coordinate system of the output image is set to be the same as the coordinate system of the first image. First, consider the first image addition. Since the coordinate system of the output image is the same as that of the first image, the coordinates (x, y) of the input image corresponding to the coordinate point (u, v) of the output image are (u, v). ) Since pixel data corresponding to these coordinates has a Bayer structure in the input image, only one channel of color data exists for each pixel, and no other pixel data exists, so image data of corresponding colors in the vicinity. From this, interpolation is used.

さて、2枚目以降の画像加算を考える。出力画像の座標点(u,v)に対応する入力画像の対応座標(x,y)は、前式(5)のパラメータにステップS18で求めた動き補正パラメータを用いて求めたものである。このため、求めた座標(x,y)は整数値となることは希である。   Now, consider the addition of the second and subsequent images. The corresponding coordinate (x, y) of the input image corresponding to the coordinate point (u, v) of the output image is obtained by using the motion correction parameter obtained in step S18 as the parameter of the previous equation (5). For this reason, the obtained coordinates (x, y) rarely become an integer value.

図9は、入力画像と出力加算画像との座標対応図である。この図に示すように、q=(x,y)の座標のカラー画素データは、近傍の画像から補間をおこなって求める。   FIG. 9 is a coordinate correspondence diagram between an input image and an output addition image. As shown in this figure, the color pixel data at the coordinates of q = (x, y) is obtained by interpolation from neighboring images.

この補間法には、いろいろな方法が考えられるが、本実施形態では、動き予測パラメータの精度を推定し、精度に応じてこの補間法(画像合成処理)を切り替える点に特徴がある。   Various methods are conceivable for this interpolation method, but this embodiment is characterized in that the accuracy of the motion prediction parameter is estimated and this interpolation method (image synthesis processing) is switched according to the accuracy.

入力画像の座標(x,y)の各色の最近傍の座標を(Xr.Yr)、(Xg,Yg)、(Xb,Yb)とすると、図9の例では、これらは、R45、G44、B34の各画素の座標点となる。入力画像の座標(X,Y)の画素値をP(X,Y)、出力画像の座標(u,v)のRGB成分を、それぞれr(u,v)、g(u,v),b(u,v)とすると、画像解像度優先の補間法の一例は次式(6)で、また、画像S/N優先の補間法の一例は次式(7)〜(10)で与えられる。ただし、次式(7)は赤(R)と青(B)の補間法の一例であって、同じ色の最近傍の画素を中心とした近傍9点の加算平均を行うもの、また、次式(9)は緑(G)の補間法の一例であって、同じ色の最近傍の画素を中心とした近傍13点の加算平均を行うものである。 If the nearest coordinates of each color of the coordinates (x, y) of the input image are (Xr. Yr), (Xg, Yg), (Xb, Yb), these are R 45 , G in the example of FIG. 44, the coordinate point of each pixel of the B 34. The pixel value of the coordinate (X, Y) of the input image is P (X, Y), and the RGB component of the coordinate (u, v) of the output image is r (u, v), g (u, v), b, respectively. Assuming (u, v), an example of an interpolation method giving priority to image resolution is given by the following equation (6), and an example of an interpolation method giving priority to image S / N is given by the following equations (7) to (10). However, the following equation (7) is an example of an interpolation method of red (R) and blue (B), which performs an averaging of nine neighboring points centered on the nearest pixel of the same color. Expression (9) is an example of the green (G) interpolation method, and performs the averaging of 13 neighboring points centered on the nearest pixel of the same color.

Figure 0004687619
Figure 0004687619

Figure 0004687619
Figure 0004687619

Figure 0004687619
Figure 0004687619

Figure 0004687619
Figure 0004687619

Figure 0004687619
Figure 0004687619

図10は、画像S/N優先の補間法の一例(RとBの補間法)を示す図である。この図において、5×5の升目は各々画素を表しており、横方向に付した−2、−1、0、1、2はx座標、縦方向に付した−2、−1、0、1、2はy座標である。座標(0,0)の画素が着目画素である。なお、前式(7)では、r(u,v)、つまり、R画素の補間を行っているが、この式(7)は、B画素の補間式でもある。B画素の補間式とする場合は、r(u,v)をb(u,v)と読み替えると共に、式(7)中のXr、YrをXb、Ybと読み替えればよい。   FIG. 10 is a diagram illustrating an example of an image S / N priority interpolation method (R and B interpolation method). In this figure, each 5 × 5 cell represents a pixel, and −2, −1, 0, 1 and 2 attached in the horizontal direction are x coordinates, −2, −1, 0, and 2 attached in the vertical direction. 1 and 2 are y coordinates. A pixel at coordinates (0, 0) is the pixel of interest. In the previous equation (7), r (u, v), that is, R pixel interpolation is performed, but this equation (7) is also an B pixel interpolation equation. When the B pixel interpolation formula is used, r (u, v) is read as b (u, v), and Xr and Yr in formula (7) are read as Xb and Yb.

図中の右端に列挙した(1)〜(9)までのx座標とy座標の組み合わせは、前式(8)の(k,l)の9個の要素に対応する座標である。図中の5×5の升目の該当箇所に、(1)〜(9)を付してそれらの要素を書き入れてある。これにより、r(u,v)またはb(u,v)の注目画素の補間が、その注目画素と同一色の近傍9点の画素、すなわち、(1)〜(9)までの画素値の加算平均で与えられることが理解されよう。   The combinations of the x and y coordinates (1) to (9) listed at the right end in the figure are the coordinates corresponding to the nine elements (k, l) in the previous equation (8). The elements (1) to (9) are added to the corresponding portions of the 5 × 5 cell in the figure, and the elements are written. As a result, interpolation of the target pixel of r (u, v) or b (u, v) is performed for nine pixels in the vicinity of the same color as the target pixel, that is, pixel values of (1) to (9). It will be understood that it is given as an arithmetic average.

図11は、画像S/N優先の補間法の一例(Gの補間法)を示す図である。この図において、前記と同様に、5×5の升目は各々画素を表しており、横方向に付した−2、−1、0、1、2はx座標、縦方向に付した−2、−1、0、1、2はy座標である。座標(0,0)の画素が着目画素である。   FIG. 11 is a diagram illustrating an example of the image S / N priority interpolation method (G interpolation method). In this figure, as described above, each 5 × 5 cell represents a pixel, and −2, −1, 0, 1 and 2 attached in the horizontal direction are x coordinates, −2 attached in the vertical direction, -1, 0, 1 and 2 are y coordinates. A pixel at coordinates (0, 0) is the pixel of interest.

図中の右端に列挙した(1)〜(13)までのx座標とy座標の組み合わせは、前式(10)の(k,l)の13個の要素に対応する座標である。図中の5×5の升目の該当箇所に、(1)〜(13)を付してそれらの要素を書き入れてある。これにより、g(u,v)の注目画素の補間が、その注目画素と同一色の近傍13点の画素、すなわち、(1)〜(13)までの画素値の加算平均で与えられることが理解されよう。   The combinations of the x and y coordinates (1) to (13) listed at the right end in the figure are the coordinates corresponding to the 13 elements of (k, l) in the previous equation (10). The elements (1) to (13) are added to the corresponding portions of the 5 × 5 cell in the figure, and the elements are written. Thereby, the interpolation of the pixel of interest of g (u, v) is given by 13 pixels in the vicinity of the same color as the pixel of interest, that is, the addition average of the pixel values of (1) to (13). It will be understood.

以上のとおりであるから、本実施形態によれば、以下の特有の効果が得られる。
(イ) 動き検出の精度予測に応じて、画像合成処理(画像加算)を切り替えるようにしたので、具体的には、入力画像が相当暗い場合には動き検出の精度が悪化する(合成精度が悪くなる)と推定して、少ない撮影枚数で充分な画像のS/Nが得られる画像合成処理(画像加算)を採用するようにしたので、むやみに多くの画像を撮影することなく、したがって、撮影者に大きなストレスを与えることなく、品質のよい良好な画像を得ることができる。
(ロ) 他方、入力画像がそれほど暗くない場合には、画像のS/Nが元々高いので、動き検出の精度が低下せず(合成精度が良好)、しかも、合成に必要な撮影枚数が少なくて済むと判断し、このような場合は、解像度を優先した画像合成処理(画像加算)を選択するようにしたので、少ない撮影枚数でありながら、解像度の高い画像を得ることができ、手振れや被写体振れを補正することができる。
(ハ) 以上の(イ)及び(ロ)により、入力画像の明るさのレベルの大小、すなわち、画像が相当暗い場合〜それほど暗くない場合のいずれにおいても、画像合成に必要な撮影枚数が大きく増減せず、したがって、ほぼ一定の撮影枚数にすることができ、撮影者にストレスを与えることなく、満足のいく品質の合成画像を得ることができる。
Since it is as mentioned above, according to this embodiment, the following peculiar effects are acquired.
(A) Since the image composition processing (image addition) is switched according to the accuracy prediction of motion detection, specifically, the accuracy of motion detection deteriorates when the input image is considerably dark (composition accuracy is less Since image synthesis processing (image addition) that can obtain a sufficient image S / N with a small number of shots is employed, it is not necessary to take many images unnecessarily. A good image with good quality can be obtained without giving a great stress to the photographer.
(B) On the other hand, when the input image is not so dark, the S / N of the image is originally high, so the accuracy of motion detection does not decrease (compositing accuracy is good), and the number of images required for combining is small. In such a case, the image composition processing (image addition) giving priority to the resolution is selected. In this case, an image with a high resolution can be obtained while the number of shots is small, Subject shake can be corrected.
(C) Due to the above (a) and (b), the number of shots required for image composition is large regardless of whether the brightness level of the input image is large, that is, when the image is considerably dark to not so dark. Therefore, the number of shots can be made almost constant, and a composite image with satisfactory quality can be obtained without stressing the photographer.

なお、前記の実施形態では、動き予測の精度の推定に「画像の明るさ」を用いているが、これに限定されない。動き予測の精度を表す他の情報または信号を利用して推定してもよい。たとえば、図7のステップS3で、特徴点を抽出する際に用いられる特徴点を検出するための検出器の出力値を利用することも可能である。特徴点の検出にコーナー検出器を用いた場合、このコーナー検出器は特徴点として相応しいものが検出されたときほど大きな出力値を示すからである。したがって、この出力値が予め決められた値より大きいものが検出された場合には「精度高」と判断し、そうでない場合には「精度低」と判断すればよい。   In the above-described embodiment, “image brightness” is used to estimate the accuracy of motion prediction, but the present invention is not limited to this. You may estimate using the other information or signal showing the precision of motion estimation. For example, it is possible to use the output value of the detector for detecting the feature point used when extracting the feature point in step S3 in FIG. This is because when a corner detector is used to detect a feature point, the corner detector shows a larger output value when a suitable feature point is detected. Therefore, if the output value is detected to be larger than a predetermined value, it is determined as “high accuracy”, and if not, it is determined as “low accuracy”.

また、前記の実施形態では、デジタルカメラ1への適用を例にしたが、これに限らず、たとえば、カメラ付き携帯電話機やカメラ付き情報端末等の電子カメラであってもよい。   In the above-described embodiment, the application to the digital camera 1 is taken as an example. However, the present invention is not limited to this.

本実施形態の適用システムの一例を示すデジタルカメラの構成図である。It is a block diagram of the digital camera which shows an example of the application system of this embodiment. 撮像デバイス6の構造図である。2 is a structural diagram of an imaging device 6. FIG. 撮像デバイス6と色フィルタ19とを示す図である。2 is a diagram illustrating an imaging device 6 and a color filter 19. FIG. ベイヤー方式(又は緑市松方式)と呼ばれる色フィルタの原理図である。It is a principle diagram of a color filter called a Bayer method (or a green checkered method). 実際の色フィルタの構成図である。It is a block diagram of an actual color filter. インターレース型CCDセンサの画素配列図である。It is a pixel array diagram of an interlaced CCD sensor. 本実施形態における特徴的な事項を含む制御プログラムのフローチャートを示す図である。It is a figure which shows the flowchart of the control program containing the characteristic matter in this embodiment. 加算対象画像の画素配列図である。It is a pixel arrangement | sequence figure of an addition object image. 入力画像と出力加算画像との座標対応図である。It is a coordinate corresponding | compatible figure of an input image and an output addition image. 画像S/N優先の補間法の一例(RとBの補間法)を示す図である。It is a figure which shows an example (R and B interpolation method) of the image S / N priority interpolation method. 画像S/N優先の補間法の一例(Gの補間法)を示す図である。It is a figure which shows an example (G interpolation method) of the image S / N priority interpolation method.

符号の説明Explanation of symbols

1 デジタルカメラ(画像処理装置)
2 CPU(位置補正手段、画像合成手段、推定手段、画像合成処理選択手段、特徴点抽出手段)
4 撮像部(撮像手段)
1 Digital camera (image processing device)
2 CPU (position correction means, image composition means, estimation means, image composition processing selection means, feature point extraction means)
4 Imaging unit (imaging means)

Claims (9)

周期的に複数枚の画像を生成して出力する撮像手段と、
前記撮像手段から出力される複数の画像を逐次に取り込み、それらの画像間の動きを予測して両画像の位置ずれを補正する位置補正手段と、
所定の画像合成処理を適用して前記位置ずれ補正後の画像を逐次に合成して合成画像を生成出力する画像合成手段と、
前記動き予測の精度を推定する推定手段と、
前記推定手段の推定結果が精度高である場合には前記画像合成手段で使用する所定の画像合成処理として画像解像度優先の画像合成処理を選択する一方、前記推定手段の推定結果が精度低である場合には前記画像合成手段で使用する所定の画像合成処理として画像S/N優先の画像合成処理を選択する画像合成処理選択手段と
を備えたことを特徴とする画像処理装置。
Imaging means for periodically generating and outputting a plurality of images;
A position correcting unit that sequentially captures a plurality of images output from the imaging unit, predicts a motion between the images, and corrects a positional deviation between the two images;
Image synthesizing means for applying a predetermined image synthesizing process and sequentially synthesizing the images after the positional deviation correction to generate a synthesized image;
Estimating means for estimating the accuracy of the motion prediction;
When the estimation result of the estimation means is high in accuracy, the image synthesis priority processing is selected as the predetermined image synthesis processing used in the image synthesis means, while the estimation result of the estimation means is low in accuracy. In this case, the image processing apparatus further comprises: an image composition processing selection unit that selects an image S / N priority image composition process as the predetermined image composition process used by the image composition unit.
前記推定手段は、前記撮像手段から出力される画像の明るさに応じて前記動き予測の精度を推定することを特徴とする請求項1記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the estimation unit estimates the accuracy of the motion prediction according to brightness of an image output from the imaging unit. 前記位置補正手段は、さらに、前記撮像手段から出力される画像の特徴点を、動き予測のために抽出する特徴点抽出手段を備え、前記推定手段は、この特徴点抽出手段の出力に基づいて、前記動き予測の精度を推定することを特徴とする請求項1記載の画像処理装置。   The position correcting unit further includes a feature point extracting unit that extracts a feature point of an image output from the imaging unit for motion prediction, and the estimating unit is based on an output of the feature point extracting unit. The image processing apparatus according to claim 1, wherein accuracy of the motion prediction is estimated. 周期的に複数枚の画像を生成して出力する撮像ステップと、
前記撮像ステップから出力される複数の画像を逐次に取り込み、それらの画像間の動きを予測して両画像の位置ずれを補正する位置補正ステップと、
所定の画像合成処理を適用して前記位置ずれ補正後の画像を逐次に合成して合成画像を生成出力する画像合成ステップと、
前記動き予測の精度を推定する推定ステップと、
前記推定ステップの推定結果が精度高である場合には前記画像合成ステップで使用する所定の画像合成処理として画像解像度優先の画像合成処理を選択する一方、前記推定ステップの推定結果が精度低である場合には前記画像合成ステップで使用する所定の画像合成処理として画像S/N優先の画像合成処理を選択する画像合成処理選択ステップと
を含むことを特徴とする画像処理方法。
An imaging step for periodically generating and outputting a plurality of images;
A position correction step for sequentially capturing a plurality of images output from the imaging step, predicting a motion between the images, and correcting a positional deviation between both images;
An image synthesis step of applying a predetermined image synthesis process and sequentially synthesizing the images after the positional deviation correction to generate and output a synthesized image;
An estimation step for estimating the accuracy of the motion prediction;
When the estimation result of the estimation step is high in accuracy, the image synthesis priority processing is selected as the predetermined image synthesis processing used in the image synthesis step, while the estimation result of the estimation step is low in accuracy. In this case, the image processing method includes: an image composition process selection step for selecting an image composition process with priority for image S / N as the predetermined image composition process used in the image composition step.
前記推定ステップは、前記撮像ステップから出力される画像の明るさに応じて前記動き予測の精度を推定することを特徴とする請求項4記載の画像処理方法。   5. The image processing method according to claim 4, wherein the estimating step estimates the accuracy of the motion prediction according to the brightness of the image output from the imaging step. 前記位置補正ステップは、さらに、前記撮像ステップから出力される画像の特徴点を、動き予測のために抽出する特徴点抽出ステップを含み、前記推定ステップは、この特徴点抽出ステップの出力に基づいて、前記動き予測の精度を推定することを特徴とする請求項4記載の画像処理方法。   The position correction step further includes a feature point extraction step for extracting a feature point of the image output from the imaging step for motion prediction, and the estimation step is based on an output of the feature point extraction step. The image processing method according to claim 4, wherein the accuracy of the motion prediction is estimated. コンピュータに、
周期的に複数枚の画像を生成して出力する撮像手段と、
前記撮像手段から出力される複数の画像を逐次に取り込み、それらの画像間の動きを予測して両画像の位置ずれを補正する位置補正手段と、
所定の画像合成処理を適用して前記位置ずれ補正後の画像を逐次に合成して合成画像を生成出力する画像合成手段と、
前記動き予測の精度を推定する推定手段と、
前記推定手段の推定結果が精度高である場合には前記画像合成手段で使用する所定の画像合成処理として画像解像度優先の画像合成処理を選択する一方、前記推定手段の推定結果が精度低である場合には前記画像合成手段で使用する所定の画像合成処理として画像S/N優先の画像合成処理を選択する画像合成処理選択手段と
を実現させることを特徴とするプログラム。
On the computer,
Imaging means for periodically generating and outputting a plurality of images;
A position correcting unit that sequentially captures a plurality of images output from the imaging unit, predicts a motion between the images, and corrects a positional deviation between the two images;
Image synthesizing means for applying a predetermined image synthesizing process and sequentially synthesizing the images after the positional deviation correction to generate a synthesized image;
Estimating means for estimating the accuracy of the motion prediction;
When the estimation result of the estimation means is high in accuracy, the image synthesis priority processing is selected as the predetermined image synthesis processing used in the image synthesis means, while the estimation result of the estimation means is low in accuracy. In this case, there is provided a program that realizes image composition processing selection means for selecting image S / N priority image composition processing as predetermined image composition processing used by the image composition means.
前記推定手段は、前記撮像手段から出力される画像の明るさに応じて前記動き予測の精度を推定することを特徴とする請求項7記載のプログラム。   The program according to claim 7, wherein the estimation unit estimates the accuracy of the motion prediction according to brightness of an image output from the imaging unit. 前記位置補正手段は、さらに、前記撮像手段から出力される画像の特徴点を、動き予測のために抽出する特徴点抽出手段を備え、前記推定手段は、この特徴点抽出手段の出力に基づいて、前記動き予測の精度を推定することを特徴とする請求項7記載のプログラム。   The position correcting unit further includes a feature point extracting unit that extracts a feature point of an image output from the imaging unit for motion prediction, and the estimating unit is based on an output of the feature point extracting unit. The program according to claim 7, wherein accuracy of the motion prediction is estimated.
JP2006240955A 2006-09-06 2006-09-06 Image processing apparatus, image processing method, and program Expired - Fee Related JP4687619B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006240955A JP4687619B2 (en) 2006-09-06 2006-09-06 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006240955A JP4687619B2 (en) 2006-09-06 2006-09-06 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2008066910A JP2008066910A (en) 2008-03-21
JP4687619B2 true JP4687619B2 (en) 2011-05-25

Family

ID=39289245

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006240955A Expired - Fee Related JP4687619B2 (en) 2006-09-06 2006-09-06 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP4687619B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5515295B2 (en) * 2009-01-16 2014-06-11 株式会社ニコン Photometric device and imaging device
KR102056218B1 (en) 2018-06-27 2019-12-16 한양대학교 산학협력단 Motion estimation method and apparatus using feature point-based motion vectors

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000244803A (en) * 1999-02-23 2000-09-08 Sony Corp Image signal processor and its method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000244803A (en) * 1999-02-23 2000-09-08 Sony Corp Image signal processor and its method

Also Published As

Publication number Publication date
JP2008066910A (en) 2008-03-21

Similar Documents

Publication Publication Date Title
JP4378258B2 (en) Image correction apparatus and control method thereof
US9538085B2 (en) Method of providing panoramic image and imaging device thereof
US8072497B2 (en) Imaging apparatus and recording medium
EP2219366B1 (en) Image capturing device, image capturing method, and image capturing program
US20080101710A1 (en) Image processing device and imaging device
CN108156365B (en) Image pickup apparatus, image pickup method, and recording medium
KR101889932B1 (en) Apparatus and Method for photographing image
JP2009284394A (en) Imaging apparatus and imaging method
EP2602990B1 (en) Image capturing device and program
JP5381142B2 (en) Imaging device and imaging apparatus
JP4985124B2 (en) Image processing apparatus, image processing method, and image processing program
JP2007243917A (en) Imaging apparatus and image processing program
WO2016169488A1 (en) Image processing method and apparatus, computer storage medium and terminal
JP5950755B2 (en) Image processing apparatus, control method, program, and storage medium
JP2016111568A (en) Image blur correction control device, imaging apparatus, control method and program thereof
JP2006287814A (en) Imaging apparatus and method of determining motion vector
US20070269133A1 (en) Image-data noise reduction apparatus and method of controlling same
JP2006148550A (en) Image processor and imaging device
JP4687619B2 (en) Image processing apparatus, image processing method, and program
JP4942572B2 (en) Image adding apparatus and method, and program
JP2014131190A (en) Image pick-up apparatus, control method thereof, and control program
JP2006135501A (en) Imaging apparatus
JP2017201749A (en) Image processing apparatus and control method thereof
JP5482427B2 (en) Imaging apparatus, camera shake correction method, and program
JPH11224324A (en) Image signal processing method and device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090825

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110113

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110118

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110131

R150 Certificate of patent or registration of utility model

Ref document number: 4687619

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140225

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees