JP4693709B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP4693709B2
JP4693709B2 JP2006174584A JP2006174584A JP4693709B2 JP 4693709 B2 JP4693709 B2 JP 4693709B2 JP 2006174584 A JP2006174584 A JP 2006174584A JP 2006174584 A JP2006174584 A JP 2006174584A JP 4693709 B2 JP4693709 B2 JP 4693709B2
Authority
JP
Japan
Prior art keywords
area
captured images
image
focus detection
region
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
JP2006174584A
Other languages
Japanese (ja)
Other versions
JP2008005355A5 (en
JP2008005355A (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2006174584A priority Critical patent/JP4693709B2/en
Publication of JP2008005355A publication Critical patent/JP2008005355A/en
Publication of JP2008005355A5 publication Critical patent/JP2008005355A5/ja
Application granted granted Critical
Publication of JP4693709B2 publication Critical patent/JP4693709B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、撮像した複数の画像からこれらの画像の位置ずれを検出する、デジタルカメラ、デジタルビデオカメラ、カメラつき携帯電話及びパーソナルコンピュータ等の画像処理装置及び画像処理方法に関する。   The present invention relates to an image processing apparatus and an image processing method, such as a digital camera, a digital video camera, a mobile phone with a camera, and a personal computer, which detect a positional shift of these images from a plurality of captured images.

現在のカメラは露出決定やピント合わせ等の撮影にとって重要な作業は全て自動化され、カメラ操作に未熟な人でも撮影失敗を起こす可能性は非常に少なくなっている。また、最近では、カメラに加わる手ぶれを防ぐシステムも研究されており、撮影者の撮影ミスを誘発する要因は殆ど無くなってきている。手ぶれを防ぐ方法としては、加速度、角加速度、角速度、角変位等を検知するセンサを用いて手ぶれによる振動を検出し、その検出値に応じて手ぶれによる光軸変化を補正するように補正レンズを変位させる光学シフト式手ぶれ補正がある。また、手ぶれの生じないような短い露光時間で撮影を繰り返し、撮影された複数の画像の位置を合わせて合成することで、画像毎の構図の違いを補正しつつ、露出の不足を補完する画像合成式の手ぶれ補正も知られている。   With the current camera, all the important tasks for shooting such as determining exposure and focusing are automated, and it is very unlikely that people who are unskilled in camera operation will fail to shoot. Recently, a system for preventing camera shake applied to the camera has been studied, and the cause of the photographer's shooting mistake has almost disappeared. As a method for preventing camera shake, a correction lens is used to detect vibration due to camera shake using a sensor that detects acceleration, angular acceleration, angular velocity, angular displacement, etc., and correct the change in the optical axis due to camera shake according to the detected value. There is an optical shift type image stabilization to be displaced. In addition, by repeating shooting with a short exposure time that does not cause camera shake, and combining the positions of a plurality of shot images, an image that compensates for the lack of exposure while correcting the difference in composition for each image Synthetic image stabilization is also known.

画像合成方式の手ぶれ補正における位置合わせ方法は、例えば特許文献1に記載されている。この方法では、主要被写体が位置しそうな領域を避けた、フレームの周辺領域(背景)を使って動きベクトルを算出することとしている。これは、主要被写体として人物を想定した場合、目の瞬きや手の複雑な動きなどによって被写体ぶれに影響された位置合わせを行う可能性があるからである。   For example, Patent Document 1 discloses an alignment method in image synthesis type camera shake correction. In this method, a motion vector is calculated using a peripheral area (background) of the frame that avoids an area where the main subject is likely to be located. This is because, when a person is assumed as the main subject, there is a possibility of performing alignment that is affected by subject shake due to blinking of eyes or complicated movements of hands.

また、カラー画像の処理方法は、例えば特許文献2に記載されている。この方法では、色成分毎に位置合わせ演算を行い、特に人間の視覚特性上解像度に与える影響の大きい色成分(G成分)に関しては高精度に位置合わせ演算を行い、それ以外の色成分(R、B成分)に関しては、位置合わせ演算の処理を簡略化することとしている。   A color image processing method is described in Patent Document 2, for example. In this method, alignment calculation is performed for each color component, particularly for color components (G component) that have a large influence on the resolution in terms of human visual characteristics, alignment calculation is performed with high accuracy, and other color components (R , B component), the alignment calculation process is simplified.

特開2004−219765号公報JP 2004-219765 A 特開2002−112007号公報JP 2002-112007 A

しかしながら、画像合成式の手ぶれ補正においては、微妙に構図の異なる複数枚の画像に対して位置を合わせて合成を行うため、位置合わせの精度が悪い場合に適切に合成処理が行われず、合成画像にブレが生じてしまう。特に画像信号中のボケ量の大きな領域に対して動きベクトル算出演算を行う場合、精度よく位置合わせを行うことが難しいため、適切に画像合成がなされないことがある。そのため、主要被写体と背景とでボケ量が大きく異なるような画像信号においては、背景領域の動きベクトル算出結果の影響によって高精度な動きベクトルを求めることができず、主要被写体がぶれてしまうという問題があった。   However, in the image composition-type image stabilization, since the composition is performed by aligning a plurality of images with slightly different compositions, the composition processing is not appropriately performed when the alignment accuracy is poor, and the composite image Will be blurred. In particular, when a motion vector calculation operation is performed on a region with a large amount of blur in an image signal, it is difficult to perform alignment accurately, and thus image synthesis may not be performed appropriately. For this reason, in an image signal in which the amount of blur is greatly different between the main subject and the background, a high-precision motion vector cannot be obtained due to the influence of the motion vector calculation result of the background region, and the main subject is blurred. was there.

例えば上記特許文献1においては、所期の目的を達成することはできるものの、フレーム周辺領域を使って動きベクトルを算出するため、背景のボケ量が大きい画像信号に対しては、精度の悪い位置合わせ結果しか得られないという問題がある。また、上記特許文献2についても、画像信号の色成分のみを用いて位置合わせ演算の精度を変更するため、例えば背景に青空等の青色が多いようなシーンに対しては、やはり同様の問題が生じてしまう。   For example, in Patent Document 1, although the intended purpose can be achieved, since the motion vector is calculated using the frame peripheral region, the position with low accuracy is required for an image signal with a large amount of background blur. There is a problem that only the combined result can be obtained. Also, in Patent Document 2 described above, since the accuracy of the alignment calculation is changed using only the color component of the image signal, for example, the same problem is caused for a scene with a lot of blue such as a blue sky in the background. It will occur.

本発明は、上記問題を鑑みてのものであり、高精度な位置ずれを検出することができる画像処理装置及び画像処理方法を提供することを目的とする。   SUMMARY An advantage of some aspects of the invention is that it provides an image processing apparatus and an image processing method capable of detecting a positional deviation with high accuracy.

本願発明者は、前記課題を解決すべく鋭意検討を重ねた結果、以下に示す発明の諸態様に想到した。   As a result of intensive studies to solve the above problems, the present inventor has come up with various aspects of the invention described below.

本発明に係る第1の画像処理装置は、複数の撮影画像のそれぞれに対して撮影時に合焦した焦点検出領域を特定し、前記焦点検出領域から予め定められた範囲内にある第1の領域と被写体までの距離が最も遠い第2の領域との少なくとも2つの領域に区分けする領域判定手段と、記複数の撮影画像間の位置ずれを検出する位置ずれ検出手段と、を有し、前記複数の撮影画像間において前記焦点検出領域が一致している場合、前記位置ずれ検出手段は、前記第2の領域に対して設定する重み付け以上の重み付けを前記第1の領域に対して設定した上で前記位置ずれを検出することを特徴とする。
本発明に係る第2の画像処理装置は、複数の撮影画像のそれぞれに対して、撮影時に合焦した焦点検出領域を特定し、前記焦点検出領域から予め定められた範囲内にある第1の領域と被写体までの距離が最も遠い第2の領域との少なくとも2つの領域に区分けする領域判定手段と、前記複数の撮影画像間の位置ずれを検出する位置ずれ検出手段と、を有し、前記複数の撮影画像間に前記焦点検出領域が一致していないものが含まれている場合、前記位置ずれ検出手段は、前記第1の領域に対して設定する重み付け以上の重み付けを前記第2の領域に対して設定した上で前記位置ずれを検出することを特徴とする。
First image processing apparatus according to the present invention, first with respect to each of the plurality of captured images to identify the focus detection area focused at the time of shooting, before Symbol within a predetermined range from the focus detection area region and the region determination unit distance to the Utsushitai is to divided into at least two regions of the farthest second region, and the displacement detection means for detecting a positional deviation between before Symbol plurality of captured images, the And when the focus detection areas match between the plurality of captured images, the positional deviation detection means assigns a weight to the first area that is greater than or equal to a weight set for the second area. The positional deviation is detected after setting.
The second image processing apparatus according to the present invention specifies a focus detection area focused at the time of shooting for each of a plurality of captured images, and the first image processing apparatus is within a predetermined range from the focus detection area. A region determination unit that divides the region into at least two regions, the second region having the longest distance to the subject, and a displacement detection unit that detects a displacement between the plurality of captured images, If the focus detection area does not match among a plurality of photographed images, the positional deviation detection means assigns a weight that is greater than or equal to the weight set for the first area to the second area. The positional deviation is detected after setting for.

本発明に係る第1の画像処理方法は、複数の撮影画像のそれぞれに対して撮影時に合焦した焦点検出領域を特定し、前記焦点検出領域から予め定められた範囲内にある第1の領域と被写体までの距離が最も遠い第2の領域との少なくとも2つの領域に区分けする領域判定ステップと、記複数の撮影画像間の位置ずれを検出する位置ずれ検出ステップと、を有し、前記複数の撮影画像間において前記焦点検出領域が一致している場合、前記位置ずれ検出ステップにおいて、前記第2の領域に対して設定する重み付け以上の重み付けを前記第1の領域に対して設定した上で前記位置ずれを検出することを特徴とする。
本発明に係る第2の画像処理方法は、複数の撮影画像のそれぞれに対して、撮影時に合焦した焦点検出領域を特定し、前記焦点検出領域から予め定められた範囲内にある第1の領域と被写体までの距離が最も遠い第2の領域との少なくとも2つの領域に区分けする領域判定ステップと、前記複数の撮影画像間の位置ずれを検出する位置ずれ検出ステップと、を有し、前記複数の撮影画像間に前記焦点検出領域が一致していないものが含まれている場合、前記位置ずれ検出ステップにおいて、前記第1の領域に対して設定する重み付け以上の重み付けを前記第2の領域に対して設定した上で前記位置ずれを検出することを特徴とする。
The first image processing method according to the present invention, first with respect to each of the plurality of captured images to identify the focus detection area focused at the time of shooting, before Symbol within a predetermined range from the focus detection area area and the area determination step for dividing into at least two regions of the distance to the Utsushitai is farthest second region, and the positional deviation detection step of detecting a positional deviation between before Symbol plurality of captured images, the And when the focus detection areas match between the plurality of captured images, the first area is given a weight greater than or equal to a weight set for the second area in the misalignment detection step. The positional deviation is detected after setting.
In the second image processing method according to the present invention, a focus detection area focused at the time of shooting is specified for each of a plurality of captured images, and the first image processing method is within a predetermined range from the focus detection area. A region determination step for dividing the region into at least two regions, the second region having the longest distance to the subject, and a displacement detection step for detecting displacement between the plurality of captured images, In the case where the focus detection area does not match between a plurality of captured images, in the misalignment detection step, the second area is weighted more than the weight set for the first area. The positional deviation is detected after setting for.

本発明によれば、測距結果を反映している領域判定の区分けの結果に応じて第1及び第2の領域に対して付与する重み付け量を調整しているため、適切な位置ずれ量を検出することができる。従って、この位置ずれ量を用いて画像合成式の手ぶれ補正を行えば、ピンボケや主要被写体のぶれ等の不具合を防止することができる。   According to the present invention, since the weighting amount to be given to the first and second regions is adjusted according to the result of the region determination division reflecting the distance measurement result, an appropriate positional deviation amount is set. Can be detected. Therefore, by performing image composition type camera shake correction using this positional deviation amount, it is possible to prevent problems such as out-of-focus and blurring of the main subject.

以下、本発明の実施形態について添付の図面を参照して具体的に説明する。   Hereinafter, embodiments of the present invention will be specifically described with reference to the accompanying drawings.

(第1の実施形態)
先ず、本発明の第1の実施形態について、図1〜図5を参照しながら説明する。ここでは、位相差検出方式の自動焦点調節機能により、7点の焦点検出領域(以下、測距点と呼ぶ)を持ったデジタル一眼レフカメラを例にとって説明する。位相差検出方式の自動焦点調節機能は公知である。
(First embodiment)
First, a first embodiment of the present invention will be described with reference to FIGS. Here, a digital single-lens reflex camera having seven focus detection areas (hereinafter referred to as ranging points) by the phase difference detection type automatic focus adjustment function will be described as an example. The phase difference detection type automatic focusing function is known.

先ず、本実施の形態における撮像装置の構成について説明する。図1は、本発明の第1の実施形態に係るカメラの概略構成を示す側方視断面図である。   First, the configuration of the imaging device in the present embodiment will be described. FIG. 1 is a side sectional view showing a schematic configuration of a camera according to the first embodiment of the present invention.

本実施形態に係るカメラは、CCD又はCMOSセンサ等の撮像素子を用いた単板式のデジタルカラーカメラであり、撮像素子を連続的又は単発的に駆動して静止画像を表す画像信号を得る。ここで、撮像素子は、受光した光を画素毎に電気信号に変換して光量に応じた電荷を蓄積し、この蓄積された電荷を読み出すタイプのエリアセンサである。   The camera according to this embodiment is a single-plate digital color camera using an image sensor such as a CCD or CMOS sensor, and obtains an image signal representing a still image by driving the image sensor continuously or once. Here, the image sensor is an area sensor of a type that converts received light into an electrical signal for each pixel, accumulates charges according to the amount of light, and reads the accumulated charges.

図1に示すように、カメラ本体101には、焦点距離の異なる複数のレンズ装置102が着脱可能であり、レンズ装置102を取り換えることにより様々な画角の撮影画面を得ることが可能である。   As shown in FIG. 1, a plurality of lens devices 102 having different focal lengths can be attached to and detached from the camera body 101, and shooting screens with various angles of view can be obtained by replacing the lens devices 102.

レンズ装置102は不図示の駆動機構を有しており、この駆動機構は結像光学系104の一部の要素であるフォーカシングレンズを光軸L1の方向に移動させることにより焦点調節を行わせる。   The lens device 102 has a drive mechanism (not shown), and this drive mechanism adjusts the focus by moving a focusing lens, which is a part of the imaging optical system 104, in the direction of the optical axis L1.

また、レンズ装置102内には、光通過口の開口面積を変化させて撮影光束の光量を調節する絞りと、この絞りを駆動する駆動機構(いずれも不図示)とが配置されている。   Further, in the lens device 102, there are disposed a diaphragm for adjusting the light quantity of the photographing light flux by changing the opening area of the light passage opening, and a drive mechanism (all not shown) for driving the diaphragm.

カメラ本体101内には、光軸L1に沿って、メインミラー105、サブミラー106、フォーカルプレンシャッター107、光学ローパスフィルター108及び撮像素子108が配置されている。   In the camera body 101, a main mirror 105, a sub mirror 106, a focal plane shutter 107, an optical low-pass filter 108, and an image sensor 108 are disposed along the optical axis L1.

メインミラー105は、例えばハーフミラーから構成されている。メインミラー105は、レンズ装置102からの光束の一部を透過し、サブミラー106を介して後述のAFユニット114に導くと共に、残りの光束を反射させることにより、後述のファインダー光学系103へと導く。なお、メインミラー105及びサブミラー106は可動型となっており、撮影光路上(光軸L1上)に斜設された状態と、撮影光路上から退避した状態とを相互に切り替えられる。撮影光路上に斜設された状態では前述のように撮影光束をファインダー光学系103とAFユニット114とに分割するが、撮影光路から退避した状態においては、撮影光束をそのまま後述の撮像素子109へと導くようになっている。   The main mirror 105 is composed of, for example, a half mirror. The main mirror 105 transmits a part of the light beam from the lens device 102 and guides it to an AF unit 114 (described later) via the sub mirror 106 and reflects the remaining light beam to a finder optical system 103 (described later). . The main mirror 105 and the sub mirror 106 are movable, and can be switched between a state of being obliquely provided on the photographing optical path (on the optical axis L1) and a state of being retracted from the photographing optical path. As described above, the photographing light beam is divided into the viewfinder optical system 103 and the AF unit 114 in a state where the photographing light path is obliquely provided. However, in a state where the photographing light beam is retracted from the photographing optical path, the photographing light beam is directly transmitted to the imaging element 109 described later. It comes to lead.

フォーカルプレンシャッター(以下、シャッターと称す)107は、複数枚の遮光羽根で構成される先幕及び後幕を有している。シャッター107は、非撮影時には光通過口となるアパーチャを先幕又は後幕で覆うことにより撮影光束を遮光し、撮影時には先幕及び後幕がスリットを形成しながら走行することで撮影光束を像面側に通過させる。   A focal plane shutter (hereinafter referred to as a shutter) 107 has a front curtain and a rear curtain composed of a plurality of light shielding blades. The shutter 107 shields the photographic light flux by covering the aperture serving as a light passage opening with the front curtain or the rear curtain when not photographing, and images the photographic light flux by traveling while the front curtain and the rear curtain form a slit during photographing. Let it pass to the surface side.

光学ローパスフィルター108は、後述する撮像素子109に被写体像の必要以上に高い空間周波数成分が伝達されないように、入射光束の高周波成分を制限する。   The optical low-pass filter 108 limits the high-frequency component of the incident light beam so that a spatial frequency component higher than necessary for the subject image is not transmitted to the image sensor 109 described later.

撮像素子109は、例えばパッケージに収納されており、例えば、増幅型固体撮像素子の1つであるCMOSプロセスコンパチブルのセンサ(CMOSセンサ)から構成されている。CMOSセンサは、任意の画素へのランダムアクセスが可能という特徴を具備しており、ディスプレイ表示用に間引いた読み出しが容易であって、高い表示レートでリアルタイム表示を行うことができる。また、撮像素子109で捉えられた被写体像は、所定の画像処理を経て、ディスプレイユニット115上に表示される。ディスプレイユニット115は、カメラ本体101の背面に取り付けられており、撮影者がディスプレイユニット115に表示された画像を直接観察できる。ディスプレイユニット115としては、例えば液晶パネルが設けられている。   The image sensor 109 is housed in, for example, a package, and includes, for example, a CMOS process compatible sensor (CMOS sensor) that is one of amplification type solid-state image sensors. The CMOS sensor has a feature that random access to an arbitrary pixel is possible, readout that is thinned for display display is easy, and real-time display can be performed at a high display rate. The subject image captured by the image sensor 109 is displayed on the display unit 115 through predetermined image processing. The display unit 115 is attached to the back surface of the camera body 101 so that a photographer can directly observe an image displayed on the display unit 115. As the display unit 115, for example, a liquid crystal panel is provided.

AFユニット114は、7点の測距点を持つAFユニットであり、位相差検出方式により焦点調節状態を検出する。   The AF unit 114 is an AF unit having seven distance measuring points, and detects a focus adjustment state by a phase difference detection method.

ファインダー光学系103には、フォーカシングスクリーン110、ペンタプリズム111、AEユニット112及び接眼レンズ113が設けられている。   The viewfinder optical system 103 is provided with a focusing screen 110, a pentaprism 111, an AE unit 112, and an eyepiece lens 113.

フォーカシングスクリーン110は、例えば被写体像の予定結像面に配置されている。ペンタプリズム111は、メインミラー105からの光束を複数回反射(正立像に変換)させて接眼レンズ113に導く。接眼レンズ113は、フォーカシングスクリーン110上に形成された被写体像を観察するためのレンズであり、例えば3枚程度のレンズで構成されている。AEユニット112は、自動測光を行うためのセンサである。   The focusing screen 110 is disposed, for example, on the planned image plane of the subject image. The pentaprism 111 reflects the light beam from the main mirror 105 a plurality of times (converts it into an erect image) and guides it to the eyepiece lens 113. The eyepiece 113 is a lens for observing a subject image formed on the focusing screen 110, and is composed of, for example, about three lenses. The AE unit 112 is a sensor for performing automatic photometry.

更に、2段階の押圧操作が可能な静止画撮影用のレリーズボタン116が設けられている。レリーズボタン116が半押し状態となると撮影準備動作(焦点調節動作および測光動作等)が開始され、全押し状態になると撮影動作が開始される。以下の説明では、レリーズボタン116の半押し状態をスイッチSW1がONした状態と表現し、レリーズボタン116の全押し状態をスイッチSW2がONした状態と表現する。   Furthermore, a release button 116 for taking a still image that can be pressed in two stages is provided. When the release button 116 is half pressed, a shooting preparation operation (focus adjustment operation, photometry operation, etc.) is started, and when the release button 116 is fully pressed, a shooting operation is started. In the following description, the half-pressed state of the release button 116 is expressed as a state where the switch SW1 is turned on, and the full-pressed state of the release button 116 is expressed as a state where the switch SW2 is turned on.

次に、本実施形態に係るカメラ(撮像装置)の機能的な構成について説明する。図2は、第1の実施形態に係るカメラの機能的な構成を示すブロック図である。   Next, a functional configuration of the camera (imaging device) according to the present embodiment will be described. FIG. 2 is a block diagram illustrating a functional configuration of the camera according to the first embodiment.

図2に示すように、撮影レンズ201(レンズ装置102)から入射した光線は、絞り202を通過し、ミラーボックス203に到達する。ミラーボックス203はメインミラー105及びサブミラー106から構成されている。ミラーボックス203を駆動することによって、入射光を透過光と反射光とに分割し夫々をAFユニット114及びAEユニット112へと導く状態と、入射光をそのまま撮像部209(撮像素子109)に導く状態とに切り替えることができる。撮像部209は、上述のように、例えばCMOSセンサ)から構成されている。   As shown in FIG. 2, the light beam incident from the photographing lens 201 (lens device 102) passes through the stop 202 and reaches the mirror box 203. The mirror box 203 includes a main mirror 105 and a sub mirror 106. By driving the mirror box 203, the incident light is divided into transmitted light and reflected light, and each is guided to the AF unit 114 and the AE unit 112, and the incident light is directly guided to the imaging unit 209 (imaging device 109). You can switch to the state. As described above, the imaging unit 209 is configured by a CMOS sensor, for example.

撮影レンズ201は、ピント調節のためにレンズ駆動部207によって駆動させ、絞り202は絞り駆動部205によって、ミラーボックスはミラー駆動部204によって、シャッター107はシャッター駆動部206によって、それぞれ駆動される。   The photographing lens 201 is driven by a lens driving unit 207 for focus adjustment, the diaphragm 202 is driven by the diaphragm driving unit 205, the mirror box is driven by the mirror driving unit 204, and the shutter 107 is driven by the shutter driving unit 206.

撮影制御部208は、AEユニット112からの測光情報に基づいて、露光時の絞り値、シャッタースピードを決定し、シャッター駆動部(SH駆動部)206及び絞り駆動部205を制御する。また、撮影制御部208は、AFユニット114からの信号に基づいて、合焦させるために必要なレンズの駆動量を決定し、レンズ駆動部207を制御する。   The imaging control unit 208 determines the aperture value and shutter speed at the time of exposure based on the photometric information from the AE unit 112, and controls the shutter drive unit (SH drive unit) 206 and the aperture drive unit 205. Further, the imaging control unit 208 determines a lens driving amount necessary for focusing based on a signal from the AF unit 114 and controls the lens driving unit 207.

露光時においては、ミラー駆動部204によって、メインミラー105及びサブミラー106を撮影光路上から退避させ、シャッター駆動部206によってシャッター107を駆動し、所定の露光時間だけ露光を行う。この結果、撮影レンズ201からの光束が撮像部209に結像する。   At the time of exposure, the main mirror 105 and the sub mirror 106 are retracted from the photographing optical path by the mirror driving unit 204, the shutter 107 is driven by the shutter driving unit 206, and exposure is performed for a predetermined exposure time. As a result, the light flux from the photographing lens 201 forms an image on the imaging unit 209.

撮像部209から出力された映像信号は、A/D変換部210によりデジタル信号に変換されて信号処理部211に入力される。信号処理部211は、輝度信号及び/又は色信号の生成等の信号処理を行い、この結果、カラー映像信号が生成される。   The video signal output from the imaging unit 209 is converted into a digital signal by the A / D conversion unit 210 and input to the signal processing unit 211. The signal processing unit 211 performs signal processing such as generation of a luminance signal and / or a color signal, and as a result, a color video signal is generated.

表示部215及び記録部216は、夫々、撮影した画像を表示、記録保存し、信号処理部211により生成されたカラー映像信号を表示、記録保存する。   The display unit 215 and the recording unit 216 display, record, and save the captured image, and display, record, and save the color video signal generated by the signal processing unit 211.

本実施形態には、モードスイッチ(図示せず)が設けられており、撮影者が任意に通常撮影モードと画像合成モードとを設定することができる。上述の各部は、いずれの動作モードが選択されている場合でも動作するが、以下のずれ検出部212、座標変換部213、画像記憶部214及び画像合成部217は画像合成モードが選択されている場合に動作する。なお、通常撮影モードは、主に防振を必要としないような明るさの被写体を撮影する場合に選択する動作モードであり、画像合成モードは、例えば撮影被写体が暗く、露光秒時が長くなるために手ぶれが生じる虞がある場合に選択する動作モードである。画像合成モードが選択されている場合、撮影制御部208は、AEセンサ112からの情報に基づいて撮影枚数を決定し、その枚数分の撮影の制御を行う。また、撮影制御部208は、撮影した枚数や、ぞれぞれの画像撮影時に選択された測距点の情報をずれ検出部212に受け渡す。   In this embodiment, a mode switch (not shown) is provided, and the photographer can arbitrarily set the normal shooting mode and the image composition mode. The above-described units operate regardless of which operation mode is selected, but the image detection mode is selected for the following shift detection unit 212, coordinate conversion unit 213, image storage unit 214, and image composition unit 217. Works if. Note that the normal shooting mode is an operation mode that is selected when shooting a subject whose brightness does not require image stabilization. The image composition mode is, for example, a dark subject and a long exposure time. Therefore, the operation mode is selected when there is a risk of camera shake. When the image composition mode is selected, the shooting control unit 208 determines the number of shots based on information from the AE sensor 112, and controls shooting for the number of shots. In addition, the shooting control unit 208 passes the number of shots and information on the distance measuring points selected at the time of shooting each image to the shift detection unit 212.

ずれ検出部212は、信号処理部211から受け取った複数の画像信号及び撮影制御部208から入力された情報に基づいて、2次元の相関演算を行い、各画像間の相対的な位置ずれ量(動きベクトル)を算出する。座標変換部213は、ずれ検出部212によって算出された動きベクトルに合わせて各画像の座標変換を行う。そして、画像記憶部214が座標変換後の各画像を記憶し、記憶された各画像が画像合成部217によって1枚の画像に合成される。この際、表示部215及び記録部216には、合成された画像が表示、保存される。   The deviation detection unit 212 performs a two-dimensional correlation calculation based on the plurality of image signals received from the signal processing unit 211 and the information input from the imaging control unit 208, and the relative positional deviation amount between the images ( Motion vector) is calculated. The coordinate conversion unit 213 performs coordinate conversion of each image in accordance with the motion vector calculated by the deviation detection unit 212. Then, the image storage unit 214 stores the images after coordinate conversion, and the stored images are combined into one image by the image combining unit 217. At this time, the combined image is displayed and stored on the display unit 215 and the recording unit 216.

次に、上述のように構成された第1の実施形態に係るカメラの動作について説明する。図4−1乃至図4−3は、第1の実施形態に係るカメラの動作を示すフローチャートである。   Next, the operation of the camera according to the first embodiment configured as described above will be described. 4A to 4C are flowcharts illustrating the operation of the camera according to the first embodiment.

先ず、図4−1に示すように、カメラの電源が投入されると、撮影制御部208は、ステップS401にて各種設定の初期化を行い、ステップS402へと進む。   First, as shown in FIG. 4A, when the camera is turned on, the imaging control unit 208 initializes various settings in step S401, and proceeds to step S402.

ステップS402において、撮影制御部208は、カメラの撮影モードが複数枚の画像を撮影した後にそれらを合成する画像合成モードに設定されているか、通常の撮影モードに設定されているかを判断する。そして、画像合成モードに設定されている場合はステップS403に進み、通常撮影モードに設定されている場合はステップS419に進む。   In step S <b> 402, the shooting control unit 208 determines whether the shooting mode of the camera is set to an image synthesis mode for combining a plurality of images after shooting or a normal shooting mode. If the image composition mode is set, the process proceeds to step S403. If the normal shooting mode is set, the process proceeds to step S419.

ステップS403において、撮影制御部208は、ユーザによってレリーズボタン116が半押しされるまで待機する。そして、レリーズボタン116が半押しされるとステップS404に進む。   In step S403, the imaging control unit 208 stands by until the user presses the release button 116 halfway. When release button 116 is half-pressed, the process proceeds to step S404.

ステップS404では、自動的に焦点調節及び測光動作を行う。更に、このときの自動焦点調節動作に伴って、撮影制御部208が測距点を以下の5タイプに分類する。
タイプ1:合焦した測距点
タイプ2:タイプ1の測距点に近い測距結果を検出した測距点
タイプ3:全測距点の中で、被写体までの距離が一番遠い測距結果を検出した測距点
タイプ4:タイプ3の測距点に近い測距結果を検出した測距点
タイプ5:上記のどのタイプにも含まれない測距点
In step S404, focus adjustment and photometry are automatically performed. Further, in accordance with the automatic focus adjustment operation at this time, the imaging control unit 208 classifies the distance measuring points into the following five types.
Type 1: Focused distance measuring point Type 2: Distance measuring point that detected a distance measurement result close to Type 1 distance measuring point Type 3: Distance measuring object farthest from all distance measuring points Ranging point that detected the result Type 4: Ranging point that detected the ranging result close to the Ranging point of Type 3 Type 5: Ranging point not included in any of the above types

タイプ2の測距点の分類判定に際しては、例えば、予め閾値α、βをカメラ内部に保持しておき、判定式「α≦|defocus1-defocus|≦β」を満たす測距点をタイプ2として分類する。ここで、「defocus1」はタイプ1の測距点の測距結果であり、「defocus」は注目している測距点の測距結果である。   For classification determination of type 2 ranging points, for example, threshold values α and β are held in the camera in advance, and ranging points satisfying the determination formula “α ≦ | defocus1-defocus | ≦ β” are set as type 2. Classify. Here, “defocus1” is the distance measurement result of the type 1 distance measurement point, and “defocus” is the distance measurement result of the distance measurement point of interest.

タイプ4の測距点の分類判定に際しても、タイプ2と同様に、例えば判定式「α≦|defocus3-defocus|≦β」を満たす測距点をタイプ4として分類する。ここで、「defocus3」はタイプ3の測距点の測距結果である。   In classification determination of type 4 ranging points, as in type 2, for example, ranging points satisfying the determination formula “α ≦ | defocus3-defocus | ≦ β” are classified as type 4. Here, “defocus3” is a distance measurement result of a type 3 distance measurement point.

このような分類基準によれば、タイプ1又は2に分類された測距点はピントの合っている測距点に相当し、タイプ3又は4に分類された測距点は背景部分の測距点に相当することとなる。   According to such a classification standard, a ranging point classified as type 1 or 2 corresponds to a focusing point in focus, and a ranging point classified as type 3 or 4 corresponds to a distance measurement in the background portion. It corresponds to a point.

そして、撮影制御部208は、全測距点に関してタイプ別の分類を決定した後、その結果をバッファメモリに記憶し、ステップS405に進む。   Then, the imaging control unit 208 determines the type-specific classification for all the distance measuring points, stores the result in the buffer memory, and proceeds to step S405.

ステップS405において、撮影制御部208は、ステップS404で得られたAEユニット112の測光結果に応じて、撮影予定枚数Nの決定を行う。撮影する枚数Nは、例えば、そのシーンで1枚撮影する場合に必要な本来の露光時間をTS、複数枚撮影時の一枚あたりの露光時間をTMとしたとき、「TS=TM×N」を満たすようにする。また、露光時間TMは、例えば、手ぶれしない露光時間の目安とされる1/f秒(fは焦点距離)に一致させる。但し、露光時間TM及び撮影枚数Nは、上述のものに限定されない。 In step S405, the imaging control unit 208 determines the scheduled imaging number N according to the photometric result of the AE unit 112 obtained in step S404. Number shoot N, for example, when the original exposure time required when shooting one in the scene T S, the exposure time per one when plural shot was T M, "T S = T M × N ”is satisfied. Further, the exposure time T M is set to be equal to 1 / f second (f is a focal length), for example, which is a guide for the exposure time without camera shake. However, the exposure time T M and the number of shots N are not limited to those described above.

次に、ステップS406において、撮影制御部208は、ユーザによってレリーズボタン116が全押しされたか判断し、全押しされている場合には、現在の撮影枚数のカウント値であるnをn=0とし、ステップS407に進み、N枚の連続撮影を開始する。なお、レリーズボタン116が全押しされていない場合には、ステップS403に戻る。   Next, in step S406, the shooting control unit 208 determines whether or not the release button 116 has been fully pressed by the user. If the release button 116 has been fully pressed, n, which is a count value of the current number of shots, is set to n = 0. Then, the process proceeds to step S407, and N consecutive images are started. If the release button 116 is not fully pressed, the process returns to step S403.

ステップS407において、撮影制御部208は、撮影時の焦点距離f及び絞り値Fをバッファメモリに記憶する。   In step S407, the shooting control unit 208 stores the focal length f and the aperture value F at the time of shooting in the buffer memory.

そして、ステップS408において、撮影処理を行った上で、撮影枚数nのカウントアップをする。   In step S408, the number of shots n is counted up after performing the shooting process.

その後、ステップS409において、撮影制御部208は、現在の撮影枚数がステップS405で決定した撮影予定枚数Nに達したかを判定し、Nに達している場合、即ち必要な回数の撮影を終えていた場合はステップS411に進む。一方、撮影予定枚数Nに達していない場合はステップS410にて自動焦点調節動作を行い、ステップS407に戻る。なお、ステップS410の自動焦点調節動作においては、ステップS404と同様に、測距点を前述のタイプ別に分類し、バッファメモリに記憶する。このように、本実施形態では、自動焦点調節動作を行うたびに測距点をタイプ別に分類して記録する。   Thereafter, in step S409, the shooting control unit 208 determines whether or not the current number of shots has reached the scheduled number of shots N determined in step S405. If the number has reached N, that is, the required number of shots has been completed. If YES, go to step S411. On the other hand, if the planned number of images N has not been reached, an automatic focus adjustment operation is performed in step S410, and the process returns to step S407. In the automatic focus adjustment operation in step S410, as in step S404, the distance measuring points are classified according to the aforementioned types and stored in the buffer memory. As described above, in this embodiment, each time the automatic focus adjustment operation is performed, the ranging points are classified and recorded by type.

ステップS411では、ずれ検出部212が、撮影した複数枚の画像間の位置ずれ量を算出する。ここで、具体的な算出手順の一例について説明する。   In step S411, the deviation detection unit 212 calculates the amount of positional deviation between a plurality of captured images. Here, an example of a specific calculation procedure will be described.

先ず、ずれ検出部212が、信号処理部211から受け取った複数の画像信号の各々に対し、図3に示すように、複数のブロックに分割する。図3には、画像信号の長辺方向を8分割、短辺方向を6分割し、合計48のブロックに分割する例を示しているが、ブロックの分割数は任意である。また、以下の説明では、図3に示すように、一番左上のブロックをA1と表し、その一つ右側のブロックをB1と表し、・・・、一番右下のブロックをH6と表す。つまり、各ブロックをA1〜H6の記号で表すこととする。   First, the deviation detection unit 212 divides each of a plurality of image signals received from the signal processing unit 211 into a plurality of blocks as shown in FIG. FIG. 3 shows an example in which the long side direction of the image signal is divided into eight and the short side direction is divided into six, and divided into a total of 48 blocks. However, the number of divided blocks is arbitrary. In the following description, as shown in FIG. 3, the upper left block is represented as A1, the right block is represented as B1, and the lower right block is represented as H6. That is, each block is represented by symbols A1 to H6.

そして、ずれ検出部212は、複数の画像信号間において、同じ位置のブロック同士について、2次元の相関演算を行い、ブロック毎の位置ずれ量である動きベクトルを算出する。そして、算出された48個のブロックの動きベクトルのヒストグラムを求め、その最頻値をもって画像全体の動きベクトルとする。   Then, the deviation detection unit 212 performs a two-dimensional correlation calculation between the blocks at the same position among a plurality of image signals, and calculates a motion vector that is a positional deviation amount for each block. Then, a histogram of the calculated motion vectors of 48 blocks is obtained, and the mode value is used as the motion vector of the entire image.

このような位置ずれ量の算出方法によれば、後に、各ブロックの動きベクトル演算結果に重み付けを行うことによって特定のブロックの動きベクトル演算結果を優先して最終的な画像信号全体の動きベクトル算出結果に反映させることが容易になる。また、全てのブロックのものを用いずに、特定のブロックのみを用いて、画像全体の動きベクトル算出を行うことも容易になる。   According to such a method for calculating the amount of positional deviation, the motion vector calculation result of a specific block is prioritized by weighting the motion vector calculation result of each block later to calculate the final motion vector of the entire image signal. It becomes easy to reflect in the result. It is also easy to calculate the motion vector of the entire image using only a specific block without using all blocks.

本実施形態では、後述のように、ブロック毎に重み付けを与えて最終的な画像全体の動きベクトルを決定するため、ステップS411では、全ブロックの動きベクトルを算出するところまでを行う。そして、その結果をバッファメモリに記録した上で、ステップS412に進む。   In this embodiment, as will be described later, in order to determine the final motion vector of the entire image by assigning weights to each block, in step S411, the processing up to the calculation of the motion vectors of all the blocks is performed. Then, after recording the result in the buffer memory, the process proceeds to step S412.

ステップS412では、ずれ検出部212が、最終的な画面全体の動きベクトル算出時に動きベクトル算出結果を優先して考慮するブロックに与える重み付け量Wを、撮影時の被写界深度に応じて決定する。後述のように、本実施形態では、各ブロックを次の3種のグループに分類する。
グループA:最終的な画面全体の動きベクトル算出時に、大きく優先して考慮するブロック
グループB:最終的な画面全体の動きベクトル算出時に、優先して考慮するブロック
グループC:最終的な画面全体の動きベクトル算出時に、特に優先、考慮しないブロック
In step S412, the shift detection unit 212 determines a weighting amount W to be given to a block that preferentially considers the motion vector calculation result when calculating the final motion vector of the entire screen according to the depth of field at the time of shooting. . As will be described later, in this embodiment, each block is classified into the following three groups.
Group A: Blocks to be prioritized when calculating the final motion vector of the entire screen Group B: Blocks to be prioritized when calculating the final motion vector of the entire screen Group C: Total of the final screen Blocks that are not particularly prioritized or considered when calculating motion vectors

そして、本実施形態では、ピントの合っている領域、即ちタイプ1又は2の測距点近傍の領域にあるブロックの動きベクトル算出結果を優先し、画像全体の動きベクトルを求めることとする。このため、ステップS412では、前もって、各グループに被写界深度に応じた重み付け量を決定する。   In the present embodiment, the motion vector calculation result of the block in the focused area, that is, the area in the vicinity of the type 1 or 2 distance measuring point is prioritized, and the motion vector of the entire image is obtained. For this reason, in step S412, a weighting amount corresponding to the depth of field is determined for each group in advance.

このとき、撮影時の被写界深度を考えると、被写界深度が浅い場合は、背景のボケ量が大きくなり、背景領域のブロックを用いて動きベクトルを算出した場合の精度は低くなってしまう。そのため、グループCに属するブロックについては、小さな重み付け量を与え、逆にグループA及びBに属するピントの合っているブロックについては、大きな重み付け量を与える。この結果、精度の良く動きベクトルを算出することが可能となる。一方、被写界深度が深い場合は、被写界深度が浅い場合に比べて合焦した測距点近傍の領域とそれ以外の領域でのボケ量の差が小さくなるため、グループ別の重み付け量に大きな差を設ける必要はない。   At this time, considering the depth of field at the time of shooting, when the depth of field is shallow, the amount of blur in the background increases, and the accuracy when the motion vector is calculated using the blocks in the background region is low. End up. Therefore, a small weighting amount is given to the blocks belonging to the group C, and conversely, a large weighting amount is given to the focused blocks belonging to the groups A and B. As a result, it is possible to calculate the motion vector with high accuracy. On the other hand, when the depth of field is deep, the difference in the amount of blur between the area near the focusing point that is in focus and the other areas is smaller than when the depth of field is shallow. There is no need to make a large difference in quantity.

このように、重み付け量Wを決定する際に被写界深度を考慮することにより、より精度の良い動きベクトルを算出することが可能となる。被写界深度は、撮影時のレンズの焦点距離fが大きく絞り値Fが小さいほど浅くなり、逆に焦点距離fが小さく絞り値が大きいほど深くなる。そこで、重み付け量Wの決定のために、図5に示すような焦点距離f及び絞り値Fから一意にWA、WB及びWCを特定するテーブルをカメラ内部に準備しておくことが好ましい。 Thus, by considering the depth of field when determining the weighting amount W, it is possible to calculate a more accurate motion vector. The depth of field decreases as the focal length f of the lens at the time of shooting increases and the aperture value F decreases, and conversely increases as the focal length f decreases and the aperture value increases. Therefore, for the determination of weighting factors W, it is preferable to prepare uniquely W A from the focal length f and the aperture value F as shown in FIG. 5, a table specifying the W B and W C in the camera .

図5に示す例では、テーブルの左上に近付く程、焦点距離fが大きく、かつ絞り値Fが小さくなるため、被写界深度が浅い状態を表することとなる。従って、重み付け量WA及びWBとして大きな値を与え、重み付け量WCとして小さな値を与えることとしている。一方、テーブルの右下に近付く程、焦点距離fが小さく、かつ絞り値Fが大きくなるため、被写界深度が深い状態を表することとなる。従って、重み付け量WA、WB及びWCとして、あまり差の無いような値を用意してある。このようにWA≧WB≧WCを満たすような範囲内で、図5に示すようなテーブルを持つことで重み付け量Wを容易に決定することができる。ステップS412を終えると、ステップS413に進む。 In the example shown in FIG. 5, the closer to the upper left of the table, the larger the focal length f and the smaller the aperture value F, so that the depth of field is shallow. Therefore, a large value is given as the weighting amounts W A and W B , and a small value is given as the weighting amount W C. On the other hand, the closer to the lower right of the table, the smaller the focal length f and the larger the aperture value F, so that the depth of field is deeper. Accordingly, values that are not so different are prepared as the weighting amounts W A , W B, and W C. Thus, the weighting amount W can be easily determined by having a table as shown in FIG. 5 within a range that satisfies W A ≧ W B ≧ W C. When step S412 is completed, the process proceeds to step S413.

ステップS413では、図4−2に示すように、ずれ検出部212が、撮影した全ての画像における測距点のタイプ別分類情報から、全測距点の最終的なタイプを決定する。例えば、図3のような測距点配置が設定され、連続して4枚の画像を撮影した場合の各測距点のタイプ別分類が表1のようになっている場合の処理は、次のようになる。   In step S413, as illustrated in FIG. 4B, the shift detection unit 212 determines the final type of all the distance measurement points from the classification information of the distance measurement point types in all the captured images. For example, in the case where the distance measurement point arrangement as shown in FIG. 3 is set and the four types of images are continuously captured and the classification by type of each distance measurement point is as shown in Table 1, the processing is as follows. become that way.

Figure 0004693709
Figure 0004693709

表1に示す結果が得られた場合、測距点1、3、5及び6については撮影したすべての画像において、測距点のタイプ別分類が同じであるため、これらの測距点については最終的なタイプ別分類も同じタイプとする。一方、測距点2、4及び7については、いずれか1枚の画像撮影時のみ分類されたタイプが異なっている。このような撮影中に1枚でもタイプ別分類の異なるものが含まれている測距点に対しては、総合的にはタイプ5(特に特徴のない測距点)に分類する。但し、タイプ3が1枚でも含まれている測距点に関しては、後の処理の関係上、必ずどこか1点の測距点がタイプ3に分類されるようにする。そこで、タイプ3に分類された回数(枚数)が最も多い測距点を強制的にタイプ3に分類する。このような規則に従って、測距点のタイプ別分類を行うと、最終的に、表2に示す結果が得られる。   When the results shown in Table 1 are obtained, the ranging points 1, 3, 5, and 6 have the same classification according to the type of the ranging points in all the captured images. The final type classification shall be the same type. On the other hand, with respect to the distance measuring points 2, 4 and 7, the types classified only at the time of photographing one of the images are different. Such a distance measuring point including a different type classified by type during photographing is generally classified into type 5 (a distance measuring point having no particular feature). However, with regard to ranging points including at least one type 3, one ranging point is always classified as type 3 because of the subsequent processing. Therefore, the distance measuring point having the largest number of times (number of sheets) classified into type 3 is forcibly classified into type 3. When the distance measuring points are classified according to such rules, the results shown in Table 2 are finally obtained.

Figure 0004693709
Figure 0004693709

一方、図3のような測距点配置が設定され、連続して4枚の画像を撮影した場合の各測距点のタイプ別分類が表3のようになっている場合の処理は、次のようになる。   On the other hand, in the case where the distance measurement point arrangement as shown in FIG. 3 is set and the four types of distance measurement points are classified as shown in Table 3 when four images are continuously captured, the processing is as follows. become that way.

Figure 0004693709
Figure 0004693709

表3に示す結果が得られた場合、測距点2、3、4、6及び7については撮影したすべての画像において、測距点のタイプ別分類が同じであるため、これらの測距点については最終的なタイプ別分類も同じタイプとする。一方、測距点1及び5については、いずれか1枚の画像撮影時のみ分類されたタイプが異なっている。このような撮影中に1枚でもタイプ別分類の異なるものが含まれている測距点に対しては、総合的にはタイプ5(特に特徴のない測距点)に分類する。このような規則に従って、測距点のタイプ別分類を行うと、最終的に、表4に示す結果が得られる。   When the results shown in Table 3 are obtained, the ranging points 2, 3, 4, 6, and 7 have the same classification according to the type of the ranging points in all captured images. The final type classification is the same type. On the other hand, with respect to the distance measuring points 1 and 5, the types classified only at the time of photographing one of the images are different. Such a distance measuring point including a different type classified by type during photographing is generally classified into type 5 (a distance measuring point having no particular feature). When the ranging points are classified according to the type according to such rules, the results shown in Table 4 are finally obtained.

Figure 0004693709
Figure 0004693709

更に、ステップS413では、ずれ検出部212が、撮影した全画像についてタイプ1に分類された測距点を読み込み、それらが全て同じであるかを判定する。そして、タイプ1の測距点が一致している場合にはステップS414に進み、一致していないものがある場合にはステップS415に進む。即ち、最終的な分類にタイプ1が存在することは、合焦した測距点が撮影した全ての画像において同一であることを意味するため、主要被写体が移動していないと判断することができる。一方、最終的な分類にタイプ1が存在しないことは、主要被写体が移動してしまったと判断することができる。ステップS414及びS415では、これらの事情に応じた処理を実行する。   Further, in step S413, the deviation detection unit 212 reads the distance measuring points classified as type 1 for all the captured images, and determines whether or not they are all the same. If the type 1 distance measurement points coincide with each other, the process proceeds to step S414. If there is any type 1 distance measurement point, the process proceeds to step S415. That is, the presence of type 1 in the final classification means that the focused distance measuring point is the same in all the captured images, and therefore it can be determined that the main subject has not moved. . On the other hand, if Type 1 does not exist in the final classification, it can be determined that the main subject has moved. In steps S414 and S415, processing according to these circumstances is executed.

これは、タイプ1の測距点が一致していることは主要被写体が移動していないことを意味しているが、仮にタイプ1の測距点が1回でも異なっている場合には、主要被写体が連続撮影中に動いていると考えられるからである。即ち、タイプ1の測距点近傍のブロックでは撮影したタイミングによって画像が異なって、相関演算時にマッチングがとれずに正確な動きベクトルを算出することができない可能性が高いためである。このため、このような場合には、タイプ1の測距点近傍のブロックよりも、背景と考えられるタイプ3の測距点近傍のブロックの動きベクトルを優先して画像全体の動きベクトルを算出する。   This means that if the type 1 distance measurement points match, the main subject has not moved, but if the type 1 distance measurement points are different even once, the main subject will not move. This is because the subject is considered to be moving during continuous shooting. That is, in the block in the vicinity of the type 1 distance measuring point, the image differs depending on the shooting timing, and there is a high possibility that an accurate motion vector cannot be calculated without matching during correlation calculation. Therefore, in such a case, the motion vector of the entire image is calculated with priority given to the motion vector of the block in the vicinity of the type 3 distance measuring point, which is considered the background, over the block in the vicinity of the type 1 distance measuring point. .

そこで、全画像についてタイプ1の測距点が同じであった場合は、タイプ1の測距点近傍のブロックの動きベクトルを優先して画像全体の動きベクトルを算出するステップS414に進む。一方、同じではなかった場合は、タイプ3の測距点近傍のブロックの動きベクトルを優先して画像全体の動きベクトルを算出するステップS415に進む。   Therefore, if the type 1 ranging points are the same for all images, the process proceeds to step S414 in which the motion vector of the entire image is calculated with priority given to the motion vectors of the blocks near the type 1 ranging points. On the other hand, if they are not the same, the process proceeds to step S415 where the motion vector of the entire image is calculated with priority given to the motion vector of the block near the type 3 distance measuring point.

例えば表1及び表2に示す結果が得られている場合には、タイプ1に分類された測距点がいずれも測距点5であるため、ステップS414に進む。一方、表3及び表4に示す結果が得られている場合には、タイプ1に分類された測距点が、1枚目、3枚目及び4枚目では測距点5であるのに対し、2枚目では測距点1であるため、ステップS415に進む。   For example, when the results shown in Table 1 and Table 2 are obtained, the distance measurement points classified into Type 1 are distance measurement points 5, and the process proceeds to step S414. On the other hand, when the results shown in Tables 3 and 4 are obtained, the distance measuring points classified as Type 1 are distance measuring points 5 in the first, third and fourth images. On the other hand, since the distance measurement point is 1 in the second image, the process proceeds to step S415.

ステップS414及びS415において、ずれ検出部212は、画面内のブロックを前述のグループA、B、Cに分類する。但し、ステップS414とステップS415とでは、主要被写体の移動の有無に応じた処理を行うために、分類に際して参照する基準が相違している。   In steps S414 and S415, the deviation detection unit 212 classifies the blocks in the screen into the groups A, B, and C described above. However, in step S414 and step S415, in order to perform processing according to the presence / absence of the movement of the main subject, the reference to be referred for classification is different.

ステップS414では、主要被写体が移動していないことを前提とした処理を行う。このため、ずれ検出部212は、主要被写体近傍のブロックに大きな重み付けがされる分類を行う。そこで、グループAとしてタイプ1の測距点近傍のブロック、グループBとしてタイプ2の測距点近傍のブロック、グループCとしてこれら以外のブロックを設定する。例えば、表2に示す結果が得られている場合には、グループAに、測距点5に相当するブロックF3及びF4を設定する(図3参照)。また、グループBには、測距点1に相当するブロックD3、D4、E3及びE4を設定する。そして、グループCには、これら以外の全ブロックを設定する。   In step S414, processing is performed on the assumption that the main subject has not moved. For this reason, the deviation detection unit 212 performs classification in which a block near the main subject is heavily weighted. Therefore, a block near the type 1 distance measuring point is set as the group A, a block near the type 2 distance measuring point is set as the group B, and other blocks are set as the group C. For example, when the result shown in Table 2 is obtained, blocks F3 and F4 corresponding to the distance measuring point 5 are set in the group A (see FIG. 3). In group B, blocks D3, D4, E3 and E4 corresponding to distance measuring point 1 are set. In group C, all other blocks are set.

一方、ステップS415では、主要被写体が移動してしまったことを前提とした処理を行う。このため、ずれ検出部は、背景と考えられるブロックに大きな重み付けがされる分類を行う。そこで、グループAとしてタイプ3の測距点近傍のブロック、グループBとしてタイプ4の測距点近傍のブロック、グループCとしてこれら以外のブロックを設定する。例えば、表4に示す結果が得られている場合には、グループAに、測距点2に相当するブロックD2及びE2を設定する。また、グループBには、測距点4又は6に相当するブロックB3、B4、C3及びC4を設定する。そして、グループCには、これら以外の全ブロックを設定する。   On the other hand, in step S415, processing is performed on the assumption that the main subject has moved. For this reason, the shift detection unit performs classification in which a block that is considered to be the background is heavily weighted. Therefore, a block near the type 3 distance measuring point is set as the group A, a block near the type 4 distance measuring point is set as the group B, and other blocks are set as the group C. For example, when the result shown in Table 4 is obtained, blocks D2 and E2 corresponding to the distance measuring point 2 are set in the group A. In group B, blocks B3, B4, C3 and C4 corresponding to distance measuring points 4 or 6 are set. In group C, all other blocks are set.

そして、ステップS414又はS415において各ブロックのグループ分けが終了した後には、ステップS416に進む。   Then, after the grouping of each block is completed in step S414 or S415, the process proceeds to step S416.

ステップS416において、ずれ検出部212は、図3中の各ブロックに対して、ステップS414又はS415における分類の結果に基づいて、ステップS412において求めた重み付け量を付与する。即ち、グループAに分類されたブロックには重み付け量WAを与え、グループBに分類されたブロックには重み付け量WBを与え、グループBに分類されたブロックには重み付け量WCを与える。そして、これらの重み付け量WA、WB又はWCを、ステップS411において求めた動きベクトルに付与した上で、動きベクトルのヒストグラムを作成する。 In step S416, the deviation detection unit 212 assigns the weighting amount obtained in step S412 to each block in FIG. 3 based on the classification result in step S414 or S415. That is, the classified blocks in the group A given amount of weight W A, the classification block to a group B given amount of weight W B, the classified blocks in the group B provide a weighting amount W C. Then, after adding these weighting amounts W A , W B, or W C to the motion vector obtained in step S411, a motion vector histogram is created.

例えば、ステップS414の分類を行った場合には、グループAにはタイプ1の測距点近傍のブロックが属し、グループBにはタイプ2の測距点近傍のブロックが属し、グループCにはその他のブロックが属する。一方、ステップS415の分類を行った場合には、グループAにはタイプ3の測距点近傍のブロックが属し、グループBにはタイプ4の測距点近傍のブロックが属し、グループCにはその他のブロックが属する。そして、グループX(XはA、B、Cのいずれか)に含まれるブロックに重み付け量WX(ただしWA≧WB≧WC)を与えて、最終的な画面全体の動きベクトル算出に用いる。 For example, when the classification in step S414 is performed, the block near the type 1 distance measurement point belongs to the group A, the block near the type 2 distance measurement point belongs to the group B, and the other group belongs to the group C. The block belongs to. On the other hand, when the classification in step S415 is performed, the block near the type 3 distance measurement point belongs to the group A, the block near the type 4 distance measurement point belongs to the group B, and the other group belongs to the group C. The block belongs to. Then, a weight amount W X (W A ≧ W B ≧ W C ) is given to the blocks included in the group X (X is any one of A, B, and C ) to calculate the final motion vector of the entire screen. Use.

重み付けの付与としては、例えば、重み付け量がWのブロックでは、1つの動きベクトル1つにつきWカウントする。そして、その出現頻度をヒストグラムにする。ヒストグラム作成後にはステップS417に進む。   As weighting, for example, in a block having a weighting amount of W, W is counted for each motion vector. Then, the appearance frequency is made into a histogram. After creating the histogram, the process proceeds to step S417.

ステップS417において、ずれ検出部212は、ステップS416にて作成したヒストグラムで最頻出となった動きベクトルを選び、当該動きベクトルをその画像全体の動きベクトルと決定する。   In step S417, the deviation detection unit 212 selects the motion vector that appears most frequently in the histogram created in step S416, and determines the motion vector as the motion vector of the entire image.

次いで、ステップS418において、座標変換部213が座標変換を行い、画像記憶部214が座標変換部213による変換後の画像を記憶し、画像合成部217が画像の合成を行う。但し、単に合成したのでは、構図のずれた画像が合成されることとなり、各画像が重ならない領域が発生してしまう。そこで、ステップS418においては、画像が重なり合わない領域はカットし、複数画像間で重なった領域のみの合成を行った上で拡散補完処理を行うことにより、元のフレームの大きさにする。そして、合成された画像は表示部215に表示され、また、記録部216に画像記録される。このようにして、一連の処理が終了する。   Next, in step S418, the coordinate conversion unit 213 performs coordinate conversion, the image storage unit 214 stores the image after conversion by the coordinate conversion unit 213, and the image composition unit 217 performs image composition. However, if the images are simply combined, images with different compositions will be combined, resulting in an area where the images do not overlap. Therefore, in step S418, the area where the images do not overlap is cut, and only the overlapping area between the plurality of images is combined, and then the diffusion complement process is performed to obtain the original frame size. Then, the synthesized image is displayed on the display unit 215 and recorded on the recording unit 216. In this way, a series of processing ends.

一方、ステップS402からステップS419に進んだ場合、ステップS419において、撮影制御部208は、ユーザによってレリーズボタン116が半押しされるまで待機する。そして、レリーズボタン116が半押しされるとステップS420に進む。   On the other hand, when the process proceeds from step S402 to step S419, in step S419, the imaging control unit 208 waits until the release button 116 is half-pressed by the user. When release button 116 is half-pressed, the process proceeds to step S420.

ステップS420では、自動的に焦点調節及び測光動作を行う。但し、ステップS404とは異なり、測距点の分類は行わない。   In step S420, focus adjustment and photometry are automatically performed. However, unlike step S404, the ranging points are not classified.

次いで、ステップS421において、撮影制御部208は、ユーザによってレリーズボタン116が全押しされたか判断し、全押しされている場合には、現在の撮影枚数のカウント値であるnをn=0とし、ステップS407に進み、N枚の連続撮影を開始する。なお、レリーズボタン116が全押しされていない場合には、ステップS419に戻る。   Next, in step S421, the shooting control unit 208 determines whether or not the release button 116 has been fully pressed by the user. If the release button 116 has been fully pressed, the current shooting number n is set to n = 0, Proceeding to step S407, continuous shooting of N sheets is started. If the release button 116 is not fully pressed, the process returns to step S419.

そして、ステップS422において、撮影処理を行った上で、撮影画像の表示部215への表示及び記録部216への保存を行う。このようにして、一連の処理が終了する。   Then, in step S422, after performing a photographing process, the photographed image is displayed on the display unit 215 and stored in the recording unit 216. In this way, a series of processing ends.

このように、第1の実施形態では、合成画像モードが選択されている場合に、合焦している測距点を示すタイプ1に属するブロックの移動の有無に応じて、重み付け量を調整している。このため、主要被写体の移動の有無に応じた重み付けを行うことが可能となり、全体的な動きベクトルを高い精度で算出することができる。この結果、被写体のぶれが極めて少ない合成画像を得ることができる。   As described above, in the first embodiment, when the composite image mode is selected, the weighting amount is adjusted according to the presence or absence of the movement of the block belonging to the type 1 indicating the focused distance measuring point. ing. For this reason, it is possible to perform weighting according to the presence or absence of the movement of the main subject, and the overall motion vector can be calculated with high accuracy. As a result, it is possible to obtain a composite image with very little subject blur.

(第2の実施の形態)
次に、本発明の第2の実施形態について説明する。第1の実施形態においては、先に撮影画像を分割した全てのブロックについて動きベクトルを計算し、その後、測距点のタイプ別分類に応じて重み付けを行った上で画像全体の動きベクトルを算出している。これに対し、第2の実施形態では、先に測距点をタイプ別に分類し、その後動きベクトルを優先して算出したいブロックに対してのみ動きベクトルを算出して、画像全体の動きベクトルを算出する。以下、第1の実施形態と相違する部分について詳述する。図6−1乃至図6−3は、第2の実施形態に係るカメラの動作を示すフローチャートである。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. In the first embodiment, motion vectors are calculated for all blocks obtained by previously dividing a captured image, and then the motion vectors of the entire image are calculated after weighting is performed according to the type of ranging point type. is doing. On the other hand, in the second embodiment, the distance measurement points are first classified by type, and then the motion vector is calculated only for the block to be calculated with priority given to the motion vector, thereby calculating the motion vector of the entire image. To do. Hereinafter, parts different from the first embodiment will be described in detail. FIGS. 6A to 6C are flowcharts illustrating the operation of the camera according to the second embodiment.

第2の実施形態では、図6−1に示すように、画像合成モードに設定されている場合、ステップS401〜ステップS409の処理を第1の実施形態と同様に行う。但し、ステップS409において、現在の撮影枚数が撮影予定枚数Nに達している場合、即ち必要な回数の撮影を終えていた場合、全ブロックの動きベクトルを算出することなくステップS412に進み、ずれ検出部212が重み付け量Wを計算する。   In the second embodiment, as shown in FIG. 6A, when the image composition mode is set, the processes in steps S401 to S409 are performed in the same manner as in the first embodiment. However, if the current number of shots has reached the scheduled number of shots N in step S409, that is, if the required number of shots has been taken, the process proceeds to step S412 without calculating the motion vectors of all blocks, and deviation detection is performed. The unit 212 calculates the weighting amount W.

次いで、図6−2に示すように、ステップS413において、ずれ検出部212が、撮影した全ての画像における測距点のタイプ別分類情報から、全測距点の最終的なタイプを決定し、タイプ1の測距点が撮影した全画像について同じであるかを判定する。更に、ステップS413では、ずれ検出部212が、撮影した全画像についてタイプ1に分類された測距点を読み込み、それらが全て同じであるかを判定する。そして、タイプ1の測距点が一致している場合にはステップS501に進み、一致していないものがある場合にはステップS502に進む。   Next, as illustrated in FIG. 6B, in step S413, the shift detection unit 212 determines the final types of all the distance measurement points from the classification information of the distance measurement point types in all the captured images. It is determined whether or not the type 1 distance measuring points are the same for all the captured images. Further, in step S413, the deviation detection unit 212 reads the distance measuring points classified as type 1 for all the captured images, and determines whether or not they are all the same. If the type 1 distance measuring points match, the process proceeds to step S501. If there is a distance that does not match, the process proceeds to step S502.

ステップS501及びS502において、ずれ検出部212は、画面内のブロックを前述のグループA、Bに分類する。但し、ステップS501とステップS502とでは、主要被写体の移動の有無に応じた処理を行うために、分類に際して参照する基準が相違している。   In steps S501 and S502, the deviation detection unit 212 classifies the blocks in the screen into the groups A and B described above. However, in step S501 and step S502, in order to perform processing in accordance with the presence or absence of the movement of the main subject, the reference to be referred for classification is different.

ステップS501では、主要被写体が移動していないことを前提とした処理を行う。このため、ずれ検出部212は、主要被写体近傍のブロックに大きな重み付けがされる分類を行う。そこで、グループAとしてタイプ1の測距点近傍のブロック、グループBとしてタイプ2の測距点近傍のブロックを設定する。例えば、表2に示す結果が得られている場合には、グループAに、測距点5に相当するブロックF3及びF4を設定する(図3参照)。また、グループBには、測距点1に相当するブロックD3、D4、E3及びE4を設定する。   In step S501, processing is performed on the assumption that the main subject has not moved. For this reason, the deviation detection unit 212 performs classification in which a block near the main subject is heavily weighted. Therefore, a block near the type 1 distance measuring point is set as the group A, and a block near the type 2 distance measuring point is set as the group B. For example, when the result shown in Table 2 is obtained, blocks F3 and F4 corresponding to the distance measuring point 5 are set in the group A (see FIG. 3). In group B, blocks D3, D4, E3 and E4 corresponding to distance measuring point 1 are set.

一方、ステップS502では、主要被写体が移動してしまったことを前提とした処理を行う。このため、ずれ検出部は、背景と考えられるブロックに大きな重み付けがされる分類を行う。そこで、グループAとしてタイプ3の測距点近傍のブロック、グループBとしてタイプ4の測距点近傍のブロックを設定する。例えば、表4に示す結果が得られている場合には、グループAに、測距点2に相当するブロックD2及びE2を設定する。また、グループBには、測距点4又は6に相当するブロックB3、B4、C3及びC4を設定する。   On the other hand, in step S502, processing is performed on the assumption that the main subject has moved. For this reason, the shift detection unit performs classification in which a block that is considered to be the background is heavily weighted. Therefore, a block near the type 3 distance measuring point is set as the group A, and a block near the type 4 distance measuring point is set as the group B. For example, when the result shown in Table 4 is obtained, blocks D2 and E2 corresponding to the distance measuring point 2 are set in the group A. In group B, blocks B3, B4, C3 and C4 corresponding to distance measuring points 4 or 6 are set.

そして、ステップS501又はS502において各ブロックのグループ分けが終了した後には、ステップS503に進む。   Then, after grouping of each block is completed in step S501 or S502, the process proceeds to step S503.

ステップS503において、ずれ検出部212は、グループA又はグループBに分類されたブロックについてのみ、2次元の相関演算を行い、動きベクトルを算出する。   In step S503, the deviation detection unit 212 performs a two-dimensional correlation calculation only on the blocks classified into the group A or the group B, and calculates a motion vector.

次いで、ステップS504において、ずれ検出部212は、重み付け量Wを考慮しつつ、動きベクトルのヒストグラムを作成する。   Next, in step S504, the deviation detection unit 212 creates a motion vector histogram while taking the weighting amount W into consideration.

その後、第1の実施形態と同様の処理を行う。また、通常撮影モードに設定されている場合も、第1の実施形態と同様の処理を行う。   Thereafter, the same processing as in the first embodiment is performed. Also, when the normal shooting mode is set, the same processing as in the first embodiment is performed.

第2の実施形態においては、上述のように、最終的な画像全体の動きベクトル算出時に、優先して考慮するブロックに対してのみ動きベクトル算出処理を行うこととしている。このため、第1の実施形態と同様の効果の他に、動きベクトル算出にかかる処理時間をより一層短縮することができるという効果が得られる。   In the second embodiment, as described above, the motion vector calculation process is performed only on the blocks to be preferentially considered when calculating the final motion vector of the entire image. For this reason, in addition to the same effect as that of the first embodiment, an effect that the processing time required for motion vector calculation can be further reduced can be obtained.

なお、第1及び第2の実施形態についての説明では、位相差AF方式を前提とした構成について説明しているが、本発明はこれに限ったものではなく、コントラスト検出方式の自動焦点検出を行うカメラについても適用することができる。コントラスト検出方式は、フレーム内の特定の領域(以下この領域のことをコントラスト評価領域と称する)について着目し、その部分のコントラスト評価値が最も高くなるようなレンズの位置をサーチする方式である。このような自動焦点検出の方式がコントラスト検出方式のカメラにおいては、コントラスト評価領域近傍のブロックの動きベクトル算出結果を優先するように重み付けを行えば、本発明を適用することができる。   In the description of the first and second embodiments, the configuration based on the phase difference AF method is described. However, the present invention is not limited to this, and automatic focus detection using a contrast detection method is performed. The present invention can also be applied to a camera to be performed. The contrast detection method focuses on a specific region in the frame (hereinafter, this region is referred to as a contrast evaluation region), and searches for a lens position where the contrast evaluation value of that portion is the highest. In a camera in which such an autofocus detection method is a contrast detection method, the present invention can be applied if weighting is performed so as to give priority to the motion vector calculation results of blocks in the vicinity of the contrast evaluation region.

また、第1及び第2の実施形態についての説明では、位相差AF方式を搭載したデジタル一眼レフカメラにおいて、オートフォーカス機能をONにして複数枚撮影を行った場合について説明している。しかし、オートフォーカス機能をOFFにして(マニュアルフォーカス状態)複数枚撮影を行った際にも、AFユニット114からの焦点検出情報を取得できるため、ピントのあった領域近傍の領域を判定することができ、本発明を適用することができる。   In the description of the first and second embodiments, a case is described in which a single-lens reflex camera equipped with a phase difference AF method is used to capture a plurality of images with the autofocus function turned on. However, since the focus detection information from the AF unit 114 can be acquired even when a plurality of images are taken with the autofocus function turned off (manual focus state), it is possible to determine a region near the focused region. The present invention can be applied.

更に、第1及び第2の実施形態についての説明では、複数の静止画像について、これらの構図ずれである動きベクトルを算出する方法について説明しているが、本発明を動画像に適用することもできる。動画の手ぶれ補正については、特定の画像を基準とし、これと連続した他の画像との位置ずれを検出してこれを補正した画像を再生する技術が公知である。この技術は、例えば特開平11−187303号公報に記載されている。この技術に本発明を組み合わせることにより、動きベクトル算出の高精度化、処理時間の短縮が可能になるため、動画像の再生、記録時にも効果的である。なお、動画の手ぶれ補正に関しては、主要被写体が動くこと等による弊害を避けるため、主要被写体のない領域(背景)、即ち最も遠い測距結果を得られた測距点近傍のブロックの動きベクトルを優先することが望ましい。   Furthermore, in the description of the first and second embodiments, a method of calculating a motion vector that is a composition shift of a plurality of still images has been described. However, the present invention may be applied to a moving image. it can. For moving image blur correction, a technique is known in which a specific image is used as a reference, a positional deviation between this and another continuous image is detected, and an image obtained by correcting this is reproduced. This technique is described in, for example, JP-A-11-187303. Combining the present invention with this technique makes it possible to increase the accuracy of motion vector calculation and shorten the processing time, and is therefore effective during playback and recording of moving images. In addition, in order to avoid the adverse effects of moving the main subject, etc. with regard to the image stabilization of the moving image, the motion vector of the block near the distance measurement point where the distance measurement result is obtained in the area (background) where there is no main subject is obtained. It is desirable to give priority.

また、撮像素子として、CMOSセンサの替わりに、CCDセンサを用いてもよい。   Further, a CCD sensor may be used as the image sensor instead of the CMOS sensor.

また、これらの説明では、カメラ又はビデオカメラ内で動きベクトルの算出を行うこととしているが、本発明はこれに限定されるものではない。例えば、自動焦点検出時の情報がEXIF領域等に書き込まれた画像であれば、カメラ又はネットワーク上から受け取った複数枚の画像に対してもPC等の画像処理装置において、本発明の処理を実行することにより、動きベクトルを算出することができる。   In these descriptions, the motion vector is calculated in the camera or video camera, but the present invention is not limited to this. For example, if the information at the time of automatic focus detection is an image written in an EXIF area or the like, the image processing apparatus such as a PC executes the processing of the present invention for a plurality of images received from the camera or the network. By doing so, a motion vector can be calculated.

つまり、本発明の実施形態は、例えばコンピュータがプログラムを実行することによって実現することができる。また、プログラムをコンピュータに供給するための手段、例えばかかるプログラムを記録したCD−ROM等のコンピュータ読み取り可能な記録媒体又はかかるプログラムを伝送するインタネット等の伝送媒体も本発明の実施形態として適用することができる。また、上記のプログラムも本発明の実施形態として適用することができる。上記のプログラム、記録媒体、伝送媒体及びプログラムプロダクトは、本発明の範疇に含まれる。   That is, the embodiment of the present invention can be realized by, for example, a computer executing a program. Also, means for supplying a program to a computer, for example, a computer-readable recording medium such as a CD-ROM in which such a program is recorded, or a transmission medium such as the Internet for transmitting such a program is also applied as an embodiment of the present invention. Can do. The above program can also be applied as an embodiment of the present invention. The above program, recording medium, transmission medium, and program product are included in the scope of the present invention.

本発明の第1の実施形態に係るカメラの概略構成を示す側方視断面図である。1 is a side sectional view showing a schematic configuration of a camera according to a first embodiment of the present invention. 第1の実施形態に係るカメラの機能的な構成を示すブロック図である。It is a block diagram which shows the functional structure of the camera which concerns on 1st Embodiment. ブロックの分割の例を示す図である。It is a figure which shows the example of the division | segmentation of a block. 第1の実施形態に係るカメラの動作を示すフローチャートである。It is a flowchart which shows operation | movement of the camera which concerns on 1st Embodiment. 図4−1に引き続き、第1の実施形態に係るカメラの動作を示すフローチャートである。FIG. 4 is a flowchart illustrating the operation of the camera according to the first embodiment, following FIG. 4-1. 図4−1に引き続き、第1の実施形態に係るカメラの動作を示すフローチャートである。FIG. 4 is a flowchart illustrating the operation of the camera according to the first embodiment, following FIG. 4-1. 重み付け量の決定テーブルを示す図である。It is a figure which shows the determination table of weighting amount. 本発明の第2の実施形態に係るカメラの動作を示すフローチャートである。It is a flowchart which shows operation | movement of the camera which concerns on the 2nd Embodiment of this invention. 図6−1に引き続き、第2の実施形態に係るカメラの動作を示すフローチャートである。FIG. 6 is a flowchart illustrating the operation of the camera according to the second embodiment, following FIG. 図6−1に引き続き、第2の実施形態に係るカメラの動作を示すフローチャートである。FIG. 6 is a flowchart illustrating the operation of the camera according to the second embodiment, following FIG.

符号の説明Explanation of symbols

114:AFユニット
208:撮像制御部
212:ずれ検出部
213:座標変換手段
214:画像記憶手段
217:画像合成手段
114: AF unit 208: Imaging control unit 212: Deviation detection unit 213: Coordinate conversion unit 214: Image storage unit 217: Image synthesis unit

Claims (7)

複数の撮影画像のそれぞれに対して撮影時に合焦した焦点検出領域を特定し、前記焦点検出領域から予め定められた範囲内にある第1の領域と被写体までの距離が最も遠い第2の領域との少なくとも2つの領域に区分けする領域判定手段と、
記複数の撮影画像間の位置ずれを検出する位置ずれ検出手段と、
を有し、
前記複数の撮影画像間において前記焦点検出領域が一致している場合、前記位置ずれ検出手段は、前記第2の領域に対して設定する重み付け以上の重み付けを前記第1の領域に対して設定した上で前記位置ずれを検出することを特徴とする画像処理装置。
For each of the plurality of captured images to identify the focus detection area focused at the time of shooting, the farthest distance to the first region and the Utsushitai preceding Symbol within a predetermined range from the focus detection area A region determination means for dividing the second region into at least two regions ;
And displacement detection means for detecting a positional deviation between before Symbol plurality of captured images,
Have
When the focus detection areas match between the plurality of captured images, the misregistration detection means sets a weight for the first area that is greater than or equal to the weight set for the second area . An image processing apparatus that detects the positional deviation above.
前記領域判定手段は、前記撮影画像毎に、前記第1及び第2の領域以外の領域内で、前記第1の領域における測距結果から予め定められた範囲内の測距結果を示す領域を第3の領域として区分けし、
前記位置ずれ検出手段は、前記第3の領域における位置ずれを示す情報に対して、前記第1及び第2の領域に対して設定した重み付けを、夫々上限及び下限とする範囲内の重み付けを設定した上で前記位置ずれを検出することを特徴とする請求項に記載の画像処理装置。
The area determination means includes, for each captured image, an area indicating a distance measurement result within a predetermined range from a distance measurement result in the first area within an area other than the first and second areas. As a third area,
The misregistration detection means sets weighting within a range in which the weights set for the first and second areas are set as upper and lower limits for the information indicating the misalignment in the third area, respectively. the image processing apparatus according to claim 1, wherein the detecting the positional deviation in terms of the.
複数の撮影画像のそれぞれに対して、撮影時に合焦した焦点検出領域を特定し、前記焦点検出領域から予め定められた範囲内にある第1の領域と被写体までの距離が最も遠い第2の領域との少なくとも2つの領域に区分けする領域判定手段と、
前記複数の撮影画像間の位置ずれを検出する位置ずれ検出手段と、
を有し、
前記複数の撮影画像間に前記焦点検出領域が一致していないものが含まれている場合、前記位置ずれ検出手段は、前記第1の領域に対して設定する重み付け以上の重み付けを前記第2の領域に対して設定した上で前記位置ずれを検出することを特徴とする画像処理装置。
For each of the plurality of captured images, a focus detection area focused at the time of shooting is specified, and the first area within the predetermined range from the focus detection area and the distance from the subject to the second are the longest. A region determination means for dividing the region into at least two regions;
A displacement detection means for detecting displacement between the plurality of captured images;
Have
When the plurality of captured images include those in which the focus detection areas do not match, the misregistration detection means assigns a weight greater than or equal to a weight set for the first area to the second area. images processor you and detects the positional deviation on set for region.
前記領域判定手段は、前記撮影画像毎に、前記第1及び第2の領域以外の領域内で、前記第2の領域における測距結果から予め定められた範囲内の測距結果を示す領域を第3の領域として区分けし、
前記位置ずれ検出手段は、前記第3の領域における位置ずれを示す情報に対して、前記第1及び第2の領域に対して設定した重み付けを、夫々下限及び上限とする範囲内の重み付けを設定した上で前記位置ずれを検出することを特徴とする請求項に記載の画像処理装置。
The area determination means includes, for each of the captured images, an area indicating a distance measurement result within a predetermined range from a distance measurement result in the second area in an area other than the first and second areas. As a third area,
The misregistration detection means sets weighting within a range in which the weights set for the first and second regions are set as the lower limit and the upper limit, respectively, for the information indicating the misregistration in the third region. The image processing apparatus according to claim 3 , wherein the position shift is detected.
前記位置ずれ検出手段は、前記撮影画像の撮像時の被写界深度に応じて前記重み付けの比率を変更することを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 The positional deviation detection means, the image processing apparatus according to any one of claims 1 to 4, characterized in that to change the ratio of the weighted according to the depth of field at the time of imaging of the captured image. 複数の撮影画像のそれぞれに対して撮影時に合焦した焦点検出領域を特定し、前記焦点検出領域から予め定められた範囲内にある第1の領域と被写体までの距離が最も遠い第2の領域との少なくとも2つの領域に区分けする領域判定ステップと、
記複数の撮影画像間の位置ずれを検出する位置ずれ検出ステップと、
を有し、
前記複数の撮影画像間において前記焦点検出領域が一致している場合、前記位置ずれ検出ステップにおいて、前記第2の領域に対して設定する重み付け以上の重み付けを前記第1の領域に対して設定した上で前記位置ずれを検出することを特徴とする画像処理方法。
For each of the plurality of captured images to identify the focus detection area focused at the time of shooting, the farthest distance to the first region and the Utsushitai preceding Symbol within a predetermined range from the focus detection area An area determination step for dividing the area into at least two areas with the second area ;
A positional deviation detection step of detecting a positional deviation between before Symbol plurality of captured images,
Have
When the focus detection areas match between the plurality of captured images, in the misregistration detection step, a weight equal to or higher than the weight set for the second area is set for the first area . An image processing method characterized by detecting the positional deviation above.
複数の撮影画像のそれぞれに対して、撮影時に合焦した焦点検出領域を特定し、前記焦点検出領域から予め定められた範囲内にある第1の領域と被写体までの距離が最も遠い第2の領域との少なくとも2つの領域に区分けする領域判定ステップと、
前記複数の撮影画像間の位置ずれを検出する位置ずれ検出ステップと、
を有し、
前記複数の撮影画像間に前記焦点検出領域が一致していないものが含まれている場合、前記位置ずれ検出ステップにおいて、前記第1の領域に対して設定する重み付け以上の重み付けを前記第2の領域に対して設定した上で前記位置ずれを検出することを特徴とする画像処理方法。
For each of the plurality of captured images, a focus detection area focused at the time of shooting is specified, and the first area within the predetermined range from the focus detection area and the distance from the subject to the second are the longest. An area determination step for dividing the area into at least two areas;
A displacement detection step for detecting displacement between the plurality of captured images;
Have
If the plurality of captured images include those in which the focus detection areas do not coincide with each other, in the misregistration detection step, a weight equal to or higher than a weight set for the first area is set. images processing how to and detecting the positional deviation on set for region.
JP2006174584A 2006-06-23 2006-06-23 Image processing apparatus and image processing method Expired - Fee Related JP4693709B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006174584A JP4693709B2 (en) 2006-06-23 2006-06-23 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006174584A JP4693709B2 (en) 2006-06-23 2006-06-23 Image processing apparatus and image processing method

Publications (3)

Publication Number Publication Date
JP2008005355A JP2008005355A (en) 2008-01-10
JP2008005355A5 JP2008005355A5 (en) 2009-08-06
JP4693709B2 true JP4693709B2 (en) 2011-06-01

Family

ID=39009351

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006174584A Expired - Fee Related JP4693709B2 (en) 2006-06-23 2006-06-23 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP4693709B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5048542B2 (en) * 2008-02-07 2012-10-17 オリンパス株式会社 Image processing apparatus and image processing program
JP5548023B2 (en) * 2010-05-07 2014-07-16 オリンパスイメージング株式会社 Imaging apparatus and imaging method
US9092875B2 (en) 2011-04-12 2015-07-28 Panasonic Intellectual Property Management Co., Ltd. Motion estimation apparatus, depth estimation apparatus, and motion estimation method
JP5693664B2 (en) * 2013-06-17 2015-04-01 キヤノン株式会社 IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM
JP6630757B2 (en) * 2018-02-14 2020-01-15 東京ガスエンジニアリングソリューションズ株式会社 Gas detector

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004015376A (en) * 2002-06-06 2004-01-15 Canon Inc Apparatus for preventing image shake and camera

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004015376A (en) * 2002-06-06 2004-01-15 Canon Inc Apparatus for preventing image shake and camera

Also Published As

Publication number Publication date
JP2008005355A (en) 2008-01-10

Similar Documents

Publication Publication Date Title
JP5653035B2 (en) Imaging apparatus, focus detection method, and control method
JP5247076B2 (en) Image tracking device, focus adjustment device, and imaging device
JP6506560B2 (en) Focus control device and method therefor, program, storage medium
JP2008292894A (en) Image tracking device, image tracking method and imaging apparatus
JP2011097645A (en) Image synthesizing apparatus, imaging apparatus, and image synthesizing method
JP4693709B2 (en) Image processing apparatus and image processing method
US7805068B2 (en) Imaging apparatus
JP5348258B2 (en) Imaging device
JP6300670B2 (en) Focus adjustment apparatus, focus adjustment method and program, and imaging apparatus
JP2013254166A (en) Imaging device and control method of the same
JP5403111B2 (en) Image tracking device
JP6529387B2 (en) Imaging device, control method therefor, program, storage medium
JP2010109923A (en) Imaging apparatus
JP2009159092A (en) Imaging apparatus and control method thereof
JP2016142999A (en) Imaging device and control method of the same
JP2015043026A (en) Image capturing device and control method therefor
JP2009058762A (en) Imaging apparatus
JP6746398B2 (en) Imaging device, control method thereof, and program
JP5581838B2 (en) Automatic focusing control device, electronic camera and automatic focusing control method
JP4985155B2 (en) Focus adjustment device and imaging device
JP4957435B2 (en) Imaging device
JP2013122495A (en) Focus detector and camera
JP5998820B2 (en) Imaging device, focus state display method, focus state display program
JP2016142924A (en) Imaging apparatus, method of controlling the same, program, and storage medium
JP2008111897A (en) Autofocus device and imaging apparatus

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090619

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090619

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110210

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

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

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

Free format text: PAYMENT UNTIL: 20140304

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4693709

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees