JP2008236015A - Image processor, imaging apparatus and its program - Google Patents
Image processor, imaging apparatus and its program Download PDFInfo
- Publication number
- JP2008236015A JP2008236015A JP2007068849A JP2007068849A JP2008236015A JP 2008236015 A JP2008236015 A JP 2008236015A JP 2007068849 A JP2007068849 A JP 2007068849A JP 2007068849 A JP2007068849 A JP 2007068849A JP 2008236015 A JP2008236015 A JP 2008236015A
- Authority
- JP
- Japan
- Prior art keywords
- image
- block
- frame image
- search
- acquired
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Closed-Circuit Television Systems (AREA)
- Studio Devices (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、画像処理装置、撮像装置及びそのプログラムに係り、詳しくは、被写体追従機能、つまり、被写体位置を検出していく画像処理装置、撮像装置及びそのプログラムに関する。 The present invention relates to an image processing apparatus, an imaging apparatus, and a program thereof, and more particularly, to an object tracking function, that is, an image processing apparatus that detects a subject position, an imaging apparatus, and a program thereof.
近年、撮像装置、例えば、デジタルカメラにおいては、移動する被写体に追従する(移動する被写体を追跡していく)、つまり、移動する被写体の位置を順次検出する機能を備えた撮像装置が開発された。
この被写体に追従させる技術(被写体を追跡する技術)として、例えば、下記特許文献1に記載されたようなテンプレートマッチング(ブロックマッチングともいう)を用いて被写体の位置を検出するという技術がある。
In recent years, in an imaging apparatus, for example, a digital camera, an imaging apparatus having a function of following a moving subject (tracking the moving subject), that is, a function of sequentially detecting the position of the moving subject has been developed. .
As a technique for tracking the subject (a technique for tracking the subject), for example, there is a technique for detecting the position of the subject using template matching (also referred to as block matching) as described in
具体的には、前フレーム画像から切り出されたテンプレート(追従させたい被写体を含む画像領域)に類似する小画像領域を現フレーム画像の探索範囲から探索することにより、最も類似度の高い(相関度が高い)小画像領域を検出し、この検出された小画像領域内に該被写体が移動したと判断する。また、新たにフレーム画像が撮像されると、該検出した小画像領域をテンプレートとし、上記動作を繰り返すことにより、連続して撮像される各フレーム画像に対して、どの位置に被写体が移動しているのかを順次検出(追跡)していく。 Specifically, by searching a small image area similar to a template cut out from the previous frame image (an image area including a subject to be followed) from the search range of the current frame image, the highest similarity (correlation degree) A small image area is detected, and it is determined that the subject has moved within the detected small image area. In addition, when a new frame image is captured, the subject is moved to which position with respect to each consecutively captured frame image by repeating the above operation using the detected small image region as a template. Sequentially detects (tracks) whether they are present.
つまり、図13に示すように、現フレーム画像52上に設定された探索範囲54(上記特許文献1ではフレーム画像の全範囲)内で、前フレーム画像51から切り出された基準ブロック53(上記テンプレート)と同じ大きさを有する探索ブロック55を順次抽出するとともに、該抽出した各探索ブロック55の中で、基準ブロック53と最も相関度が高くなる探索ブロック55を検出する。
That is, as shown in FIG. 13, the reference block 53 (the template described above) cut out from the previous frame image 51 within the search range 54 (the entire range of the frame image in Patent Document 1) set on the current frame image 52. ) Are sequentially extracted, and among the extracted
ここで、相関度は、基準ブロック53の各画素値と、探索ブロック55の各画素値とを、対応する座標位置の画素間で(例えば、基準ブロック53の中で一番左上にある画素と、探索ブロック55の中で一番左上にある画素)減算し、その二乗の総和(ブロック評価値)をその評価値として求めることができる。そして、この評価値の値が最も小さくなる探索ブロック55を基準ブロック53と最も相関度が高くなる探索ブロック55として検出する。
Here, the degree of correlation refers to the pixel value of the
しかしながら、上記技術によれば、どんな撮影状況においても一律に同じ探索条件でブロックマッチングを行なうので、種々異なる被写体に対して、それぞれに適したブロックマッチングを行なうことができないという問題がある。例えば、ほとんど動きのない被写体に対して、その範囲が比較的広い探索範囲を設定すると、不必要な演算量が増え、CPUに過剰な負荷を与えたり、また、動きの激しい被写体に対してその範囲が比較的狭い探索範囲を設定すると、被写体が探索範囲外に移動してしまい、当該被写体を追跡しきれないといった問題がある。また、例えば、被写体の大きさに比べて小さなサイズの基準ブロックや大きな基準ブロックが設定される場合にも、導出される相関度の精度が低下することで誤検出が発生し、被写体を追跡しきれないといった問題が発生する。 However, according to the above technique, since block matching is uniformly performed under the same search condition in any shooting situation, there is a problem that block matching suitable for each different subject cannot be performed. For example, setting a relatively wide search range for a subject with little movement increases the amount of unnecessary computation, adds excessive load to the CPU, and applies to a subject with intense movement. If a search range having a relatively narrow range is set, there is a problem that the subject moves out of the search range and the subject cannot be tracked. In addition, for example, even when a reference block having a smaller size or a larger reference block than the size of the subject is set, false detection occurs due to a decrease in the accuracy of the derived correlation degree, and the subject is tracked. Problems such as being unable to complete occur.
そこで本発明は、かかる従来の問題点に鑑みてなされたものであり、撮影状況に適したブロックマッチングを行なうことができる画像処理装置、撮像装置及びそのプログラムを提供することを目的とする。 Therefore, the present invention has been made in view of such conventional problems, and an object thereof is to provide an image processing apparatus, an imaging apparatus, and a program thereof that can perform block matching suitable for a shooting situation.
上記目的達成のため、請求項1記載の発明による画像処理装置は、参照フレーム画像内の所定の注目画像領域に対応する画像領域を、探索対象フレーム画像から探索するブロックマッチング処理手段と、
撮影情報を取得する取得手段と、
前記取得手段により取得された撮影情報に応じて、前記画像領域の探索条件を切り換え設定する設定手段と、を備え、
前記ブロックマッチング処理手段は、前記設定手段により設定された探索条件に基づいて、前記注目画像領域に対応する画像領域を探索することを特徴とする。
To achieve the above object, an image processing apparatus according to the first aspect of the present invention comprises a block matching processing unit that searches an image region corresponding to a predetermined image region of interest in a reference frame image from a search target frame image,
Acquisition means for acquiring shooting information;
Setting means for switching and setting search conditions for the image area according to the shooting information acquired by the acquisition means,
The block matching processing unit searches for an image region corresponding to the target image region based on a search condition set by the setting unit.
また、例えば、請求項2に記載されているように、前記設定手段は、
前記取得手段により取得された撮影情報に応じたサイズの探索範囲を、前記探索対象フレーム画像に設定し、
前記ブロックマッチング処理手段は、
前記設定手段によりそのサイズが設定された探索範囲に対して、前記注目画像領域に対応する画像領域を探索するようにしてもよい。
For example, as described in
A search range of a size according to the shooting information acquired by the acquisition unit is set in the search target frame image,
The block matching processing means includes:
An image area corresponding to the target image area may be searched for the search range whose size is set by the setting means.
また、例えば、請求項3に記載されているように、前記設定手段は、
前記取得手段により取得された撮影情報に応じた補正係数マップを設定し、
前記ブロックマッチング処理手段は、
前記注目画像領域との相関度を前記探索対象フレーム画像の各領域毎に導出する相関度導出手段と、前記相関度導出手段により導出した各相関度を前記設定手段により設定された補正係数マップに基づいて補正する相関度補正手段と、を備え、前記相関度補正手段により補正された相関度に基づいて、前記注目画像領域に対応する画像領域を探索するようにしてもよい。
For example, as described in
Set a correction coefficient map according to the shooting information acquired by the acquisition means,
The block matching processing means includes:
Correlation degree deriving means for deriving the degree of correlation with the target image area for each area of the search target frame image, and each correlation degree derived by the correlation degree deriving means in the correction coefficient map set by the setting means Correlation degree correcting means for correcting based on the correlation degree corrected by the correlation degree correcting means, and searching for an image area corresponding to the target image area.
また、例えば、請求項4に記載されているように、前記設定手段は、
前記取得手段により取得された撮影情報に応じたサイズの注目画像領域を、前記参照フレーム画像に設定し、
前記ブロックマッチング処理手段は、
前記設定手段によりそのサイズが設定された注目画像領域に対応する画像領域を探索するようにしてもよい。
For example, as described in
A target image area having a size corresponding to the shooting information acquired by the acquisition unit is set in the reference frame image,
The block matching processing means includes:
You may make it search the image area | region corresponding to the attention image area | region where the size was set by the said setting means.
また、例えば、請求項5に記載されているように、前記設定手段は、
前記取得手段により取得された撮影情報に応じた間引き間隔を設定し、
前記ブロックマッチング処理手段は、
前記設定手段により設定された間引き間隔で、前記参照フレーム画像及び前記探索対象フレーム画像の画素を間引く画素間引き手段を備え、前記画素間引き手段により画素を間引いた前記参照フレーム画像及び前記探索対象フレーム画像に基づいて、注目画像領域に対応する画像領域を探索するようにしてもよい。
For example, as described in
Set a thinning interval according to the shooting information acquired by the acquisition means,
The block matching processing means includes:
The reference frame image and the search target frame image in which pixels are thinned out by the pixel thinning unit, the pixel thinning unit thinning out the pixels of the reference frame image and the search target frame image at the thinning interval set by the setting unit The image area corresponding to the target image area may be searched based on the above.
また、例えば、請求項6に記載されているように、フレーム画像を順次取得するフレーム画像取得手段を備え、
前記ブロックマッチング処理手段は、
前記フレーム画像取得手段により取得されるフレーム画像から前記参照フレーム画像及び前記探索対象フレーム画像を選択する選択手段を備えるようにしてもよい。
Further, for example, as described in
The block matching processing means includes:
You may make it provide the selection means which selects the said reference frame image and the said search object frame image from the frame image acquired by the said frame image acquisition means.
また、例えば、請求項7に記載されているように、前記設定手段は、
前記取得手段により取得された撮影情報に応じたフレームレートを設定し、
前記フレーム画像取得手段は、
前記設定手段により設定されたフレームレートでフレーム画像を順次取得するようにしてもよい。
For example, as described in
Set a frame rate according to the shooting information acquired by the acquisition means,
The frame image acquisition means includes
You may make it acquire a frame image sequentially with the frame rate set by the said setting means.
また、例えば、請求項8に記載されているように、前記選択手段は、
前記フレーム画像取得手段により取得された最新のフレーム画像を前記探索対象フレーム画像として選択するとともに、前記選択した探索対象フレーム画像の直前に取得されたフレーム画像を前記参照フレーム画像として選択するようにしてもよい。
For example, as described in
The latest frame image acquired by the frame image acquisition means is selected as the search target frame image, and the frame image acquired immediately before the selected search target frame image is selected as the reference frame image. Also good.
また、例えば、請求項9に記載されているように、ユーザが任意の撮影シーンを選択するための撮影シーン選択手段を備え、
前記取得手段は、
前記撮影シーン選択手段により選択された撮影シーンを撮影情報として取得するようにしてもよい。
Further, for example, as described in
The acquisition means includes
The shooting scene selected by the shooting scene selection means may be acquired as shooting information.
また、例えば、請求項10に記載されているように、前記ブロックマッチング処理手段による探索結果に基づいて前記参照フレーム画像と前記探索対象フレーム画像と間の動きベクトルを算出する動きベクトル算出手段を備え、
前記取得手段は、
前記動きベクトル算出手段により算出された動きベクトルを撮影情報として取得するようにしてもよい。
Further, for example, as described in
The acquisition means includes
The motion vector calculated by the motion vector calculation means may be acquired as shooting information.
また、例えば、請求項11に記載されているように、前記撮影情報は、
ズーム倍率情報、縦撮り又は横撮り情報であるようにしてもよい。
For example, as described in
It may be zoom magnification information, vertical shooting information or horizontal shooting information.
上記目的達成のため、請求項12記載の発明による撮像装置は、被写体像を光電変換する撮像素子と、
前記撮像素子により光電変換されたフレーム画像を順次取得するフレーム画像取得手段と、
前記フレーム画像取得手段により取得された最新のフレーム画像を探索対象フレーム画像として選択するともに、前記選択した探索対象フレーム画像の直前に取得されたフレーム画像を参照フレーム画像として選択する選択手段と、
前記参照フレーム画像内の所定の注目画像領域に対応する画像領域を、前記探索対象フレーム画像から探索するブロックマッチング処理手段と、
撮影情報を取得する取得手段と、
前記取得手段により取得された撮影情報に応じて、前記画像領域の探索条件を切り換え設定する設定手段と、を備え、
前記ブロックマッチング処理手段は、前記設定手段により設定された探索条件に基づいて、前記注目画像領域に対応する画像領域を探索することを特徴とする。
In order to achieve the above object, an image pickup apparatus according to a twelfth aspect of the invention includes an image pickup device that photoelectrically converts a subject image;
Frame image acquisition means for sequentially acquiring frame images photoelectrically converted by the imaging device;
A selection means for selecting the latest frame image acquired by the frame image acquisition means as a search target frame image, and selecting a frame image acquired immediately before the selected search target frame image as a reference frame image;
Block matching processing means for searching the search target frame image for an image area corresponding to a predetermined image area of interest in the reference frame image;
Acquisition means for acquiring shooting information;
Setting means for switching and setting search conditions for the image area according to the shooting information acquired by the acquisition means,
The block matching processing unit searches for an image region corresponding to the target image region based on a search condition set by the setting unit.
上記目的達成のため、請求項13記載の発明によるプログラムは、コンピュータに、
参照フレーム画像内の所定の注目画像領域に対応する画像領域を、探索対象フレーム画像から探索させるブロックマッチング処理と、
撮影情報を取得させる取得処理と、
前記取得処理で取得させた撮影情報に応じて、前記画像領域の探索条件を切り換え設定させる設定処理と、を実行させ、
前記ブロックマッチング処理は、前記設定処理で設定させた探索条件に基づいて、前記注目画像領域に対応する画像領域を探索させることを特徴とする。
In order to achieve the above object, a program according to
A block matching process for searching the search target frame image for an image area corresponding to a predetermined target image area in the reference frame image;
Acquisition processing to acquire shooting information;
A setting process for switching and setting search conditions for the image area according to the shooting information acquired in the acquisition process;
In the block matching process, an image area corresponding to the target image area is searched based on a search condition set in the setting process.
本発明によれば、撮影状況に適したブロックマッチングを行なうことができる。 According to the present invention, block matching suitable for a shooting situation can be performed.
以下、本実施の形態について、デジタルカメラに適用した一例として図面を参照して詳細に説明する。
[実施の形態]
A.デジタルカメラの構成
図1は、本発明の画像処理装置または撮像装置を実現するデジタルカメラ1の電気的な概略構成を示すブロック図である。
デジタルカメラ1は、撮影レンズ2、レンズ駆動回路3、絞り兼用シャッタ4、CCD5、ドライバ6、TG(timing generator)7、ユニット回路8、メモリ9、CPU10、DRAM11、画像表示部12、フラッシュメモリ13、キー入力部14、バス15を備えている。
Hereinafter, this embodiment will be described in detail with reference to the drawings as an example applied to a digital camera.
[Embodiment]
A. Configuration of Digital Camera FIG. 1 is a block diagram showing an electrical schematic configuration of a
The
撮影レンズ2は、図示しない複数のレンズ群から構成されるフォーカスレンズ、ズームレンズ等を含み、フォーカスレンズ及びズームレンズには、レンズ駆動回路3が接続されている(図示略)。
レンズ駆動回路3は、フォーカスレンズ及びズームレンズを光軸方向にそれぞれ移動させるモータ(図示略)と、CPU10から送られてくる制御信号にしたがってフォーカスモータ及びズームモータをそれぞれ駆動させるモータドライバ(図示略)とから構成されている。
The
The
絞り4は、図示しない駆動回路を含み、駆動回路はCPU10から送られてくる制御信号にしたがって絞りを動作させる。
絞りとは、撮影レンズ2から入ってくる光の量を制御する機構のことをいい、CCD5の露出量は、この絞りとシャッタ速度によって変わる。
The
The diaphragm refers to a mechanism that controls the amount of light entering from the
撮像素子(ここではCCD5)は、ドライバ6によって走査駆動され、一定周期毎に被写体像のRGB値の各色の光の強さを光電変換して撮像信号としてユニット回路8に出力する。このドライバ6、ユニット回路8の動作タイミングはTG7を介してCPU10により制御される。なお、CCD5はベイヤー配列の色フィルターを有しており、電子シャッタとしての機能も有する。この電子シャッタのシャッタ速度は、ドライバ6、TG7を介してCPU10によって制御される。
The image pickup element (
ユニット回路8にはTG7が接続されており、CCD5から出力される撮像信号を相関二重サンプリングして保持するCDS(Correlated Double Sampling)回路、そのサンプリング後の撮像信号の自動利得調整を行うAGC(Automatic Gain Control)回路、その自動利得調整後のアナログの撮像信号をデジタル信号に変換するA/D変換器から構成されており、CCD5の撮像信号は、ユニット回路8を経てデジタル信号としてCPU10に送られる。
A
CPU10は、ユニット回路8から送られてきた画像データに対してガンマ補正、補間処理、ホワイトバランス処理、ヒストグラム生成処理、輝度色差信号(YUVデータ)の生成処理などの画像処理を行う機能を有するとともに、デジタルカメラ1の各部を制御するワンチップマイコンである。
特に、本実施の形態では、CPU10は、2枚のフレーム画像(参照フレーム画像、探索対象フレーム画像)を用いて参照フレーム画像内の注目画像領域に対応する画像領域を、探索対象フレーム画像から探索するブロックマッチング機能、撮影情報を取得する機能、該取得した撮影情報に対応するブロックマッチングの探索条件を設定する機能を有し、該設定された探索条件でブロックマッチングを行なわせる。
The
In particular, in the present embodiment, the
メモリ9には、CPU10の各部の制御に必要な制御プログラム、及び必要なデータ(例えば、探索範囲テーブル、補正係数マップ等)が格納されており、CPU10は、該プログラムに従って動作する。
The
DRAM11は、CCD5によってそれぞれ撮像された後、CPU10に送られてきた画像データを一時記憶するバッファメモリとして使用されるとともに、CPU10のワーキングメモリとして使用される。
画像表示部12は、カラーLCDとその駆動回路を含み、撮影待機状態にあるときには、CCD5によって撮像された被写体をスルー画像として表示し、記録画像の再生時には、フラッシュメモリ13から読み出され、伸張された記録画像を表示させる。
The
The
フラッシュメモリ13は、CCD5によって撮像された画像データなどを保存しておく記録媒体である。
キー入力部14は(撮影シーン選択手段)、半押し全押しの2段階操作可能なシャッタボタン、モード切替キー、撮影シーン選択画面移行キー、メニューキー、十字キー、セットキー等の複数の操作キーを含み、ユーザのキー操作に応じた操作信号をCPU10に出力する。
The
The key input unit 14 (photographing scene selection means), a plurality of operation keys such as a shutter button that can be operated in two steps by half-pressing, a mode switching key, a shooting scene selection screen transition key, a menu key, a cross key, and a set key And an operation signal corresponding to the user's key operation is output to the
B.デジタルカメラ1の動作
本実施の形態は、撮影状況に応じてブロックマッチングにおける探索条件としての探索範囲の大きさ(広さ)を変えて、ブロックマッチングを行なうというものである。
B. Operation of
以下、撮影状況に応じてブロックマッチングにおける探索範囲を変更する場合の動作を図2(a)のフローチャートにしたがって説明する。 Hereinafter, the operation when the search range in block matching is changed according to the shooting situation will be described with reference to the flowchart of FIG.
ユーザにより、キー入力部14のモード切替キーが操作され、撮影モードに設定されると、ステップS1で、CPU10は、所定のフレームレートでCCD5により被写体を撮像させ、順次取得されるフレーム画像データに画像処理を施し、該画像処理が施されたフレーム画像データをバッファメモリ(DRAM11)に記憶させていき(フレーム画像取得手段)、該順次記憶させたフレーム画像データを画像表示部12に表示させていくという、いわゆるスルー画像表示を開始する。このとき、CPU10は、スルー画像上の所定位置(たとえば、中央位置)に、図4(a)に示すような画像領域を指定するための、注目画像指定枠34を表示させる。
When the user operates the mode switching key of the
次いで、ステップS2で、CPU10は、撮影シーン設定モードが選択されたか否かを判断する。この判断は、撮影シーン選択画面移行キーの操作に対応する操作信号がキー入力部14から送られてきたか否かにより判断する。
ステップS2で、撮影シーン設定モードが選択されたと判断すると、ステップS3に進み、CPU10は、撮影シーン選択画面を表示するとともに、撮影シーンの選択が行なわれたか否かを判断する。
Next, in step S2, the
If it is determined in step S2 that the shooting scene setting mode has been selected, the process proceeds to step S3, where the
具体的には、CPU10は、撮影シーン設定モードが設定されたと判断すると、複数種類の撮影シーン(例えばシーンを示す名称や画像)を撮影シーン選択画面として一覧表示させる。この撮影シーンの種類としては、例えば、「人物を写す」、「夜景を写す」、「スポーツを写す」、「子供を写す」等がある。そして、各撮影シーンには、それぞれ、ブロックマッチングにおける探索条件を含む撮影条件が対応付けられている。
そして、ユーザは十字キー及びSETキーを操作することにより、現在の撮影状況に適した撮影シーンを1つ選択することができる。
Specifically, when the
The user can select one shooting scene suitable for the current shooting situation by operating the cross key and the SET key.
そして、ステップS3で、撮影シーンの選択が行なわれていないと判断すると選択されるまでステップS3に留まり、撮影シーンの選択が行なわれたと判断すると、ステップS4に進み、CPU10は、該選択された撮影シーンを撮影情報として取得する(取得手段)。
次いで、ステップS5で、CPU10は、該取得した撮影情報(ここでは撮影シーン)に対応する探索範囲の大きさ(サイズ)をメモリ9の探索範囲テーブルから取得し、該取得した大きさをブロックマッチングの探索範囲の大きさとして設定して(設定手段)、ステップS6に進む。このとき、CPU10は、該設定された探索範囲の大きさを探索範囲記憶領域に記憶させるとともに、スルー画像表示状態に復帰させる。
If it is determined in step S3 that the selection of the shooting scene has not been performed, the process remains in step S3 until it is selected. If it is determined that the selection of the shooting scene has been performed, the process proceeds to step S4, and the
Next, in step S5, the
この探索範囲テーブルには、各撮影シーン(例えばシーンを示す名称や画像)とそれに対応する探索範囲の大きさ(探索条件)とが予め記録されており、該探索範囲テーブルの様子を図2(b)に例示する。
図2(b)に示すように、各撮影シーン毎に探索範囲の大きさ(・・画素×・・画素)が記録されており、CPU10は、該取得した撮影シーン(撮影情報)に応じて図2(b)に示すような探索範囲テーブルから探索範囲の大きさを取得して設定する。
In this search range table, each shooting scene (for example, a name or image indicating a scene) and the size of the search range (search condition) corresponding thereto are recorded in advance, and the state of the search range table is shown in FIG. This is illustrated in b).
As shown in FIG. 2 (b), the size of the search range (..pixel.times..pixel) is recorded for each shooting scene, and the
この撮影シーン毎に記録されている探索範囲の大きさは、被写体の動きが激しい、被写体が広範囲に動くと予想される撮影シーン(たとえば、スポーツを写す、子供を写す)の場合はその探索範囲が広くなり、逆に被写体の動きが少ないと予想される撮影シーン(たとえば、夜景を写す)の場合は探索範囲が狭く(小さく)なるように記録されている。 The size of the search range recorded for each shooting scene is the search range in the case of a shooting scene where the subject is expected to move widely or the subject is expected to move in a wide range (for example, shooting a sport or shooting a child). In contrast, in the case of a shooting scene (for example, shooting a night view) where the movement of the subject is expected to be small, the search range is recorded to be narrow (small).
なお、ここでは撮影モードに設定された当初は、探索範囲記憶領域にデフォルトの探索範囲の大きさ、若しくは、前回の撮影モード時に最終選択された撮影シーンに対応する探索範囲の大きさを予め探索範囲記憶領域に記憶させておき、撮影シーンが選択されると、それに応じて探索範囲記憶領域の記憶を更新させる。
一方、ステップS2で、撮影シーン設定モードが選択されていないと判断するとそのままステップS6に進む。
Here, when the shooting mode is initially set, the size of the default search range in the search range storage area or the size of the search range corresponding to the last selected shooting scene in the previous shooting mode is searched in advance. When the shooting scene is selected, the storage in the search range storage area is updated accordingly.
On the other hand, if it is determined in step S2 that the shooting scene setting mode has not been selected, the process proceeds directly to step S6.
ステップS6に進むと、CPU10は、ユーザによって十字キーの操作が行なわれたか否かを判断する。この判断は、十字キーの操作に対応する操作信号がキー入力部14から送られてきたか否かにより判断する。
ステップS6で、十字キーの操作が行われたと判断すると、ステップS7に進み、CPU10は、該十字キーの操作に従って注目画像指定枠34の表示位置を変更させ、該変更された表示位置に注目画像指定枠34を表示させて、ステップS8に進む。つまり、十字キーの操作に応じて注目画像指定枠34が移動することになる。
In step S6, the
If it is determined in step S6 that the operation of the cross key has been performed, the process proceeds to step S7, and the
例えば、十字キーの「→」が操作されると注目画像指定枠34の表示位置は右に移動し(注目画像指定枠34は右に移動し)、「←」が操作されると注目画像指定枠34の表示位置は左に移動する(注目画像指定枠34は左に移動する)。このとき、ユーザは、撮影したいメインとなる被写体としての追従させたい(追跡したい)被写体(メイン被写体)に注目画像指定枠34が重なるように、または、メイン被写体が注目画像指定枠34内に納まるように、十字キーを操作することによって注目画像指定枠34をメイン被写体に移動させる。なお、ユーザは、当該デジタルカメラ1本体の向きを変えることで、注目画像指定枠34とメイン被写体との相対的な位置関係を調整して、メイン被写体に注目画像指定枠34が重なるように、または、メイン被写体が注目画像指定枠34内に納まるように、注目画像指定枠34をメイン被写体に移動させてもよい。
一方、ステップS6で、十字キーの操作が行われていないと判断するとそのままステップS8に進む。
For example, when the cross key “→” is operated, the display position of the attention
On the other hand, if it is determined in step S6 that the cross key has not been operated, the process proceeds directly to step S8.
ステップS8に進むと、CPU10は、被写体追従を開始するか否かを判断する。この判断は、シャッタボタンの半押し操作に対応する操作信号がキー入力部14から送られてきたか否かにより判断する。
このとき、シャッタボタンの半押し操作により注目画像指定枠34に重なっている被写体に対して被写体追従が開始されることになるので、ユーザは追従させたいメイン被写体が注目画像指定枠34と重なった時にシャッタボタンの半押し操作を行なう。
In step S8, the
At this time, subject tracking starts for the subject that overlaps the target
ステップS8で、被写体追従を開始しないと判断するとステップS2に戻り、上記した動作を繰り返す。これにより、シャッタボタンを半押し操作するまでは、ユーザは自由に注目画像指定枠の表示位置を変更することによって注目画像指定枠とメイン被写体とを合わせることができ、また、現在の撮影状況に応じた撮影シーンの選択変更も行なうことができる。 If it is determined in step S8 that subject tracking is not started, the process returns to step S2 to repeat the above-described operation. Thus, until the shutter button is half-pressed, the user can freely change the display position of the noticeable image designation frame to match the noticeable image designation frame with the main subject. It is also possible to change the selection of the corresponding shooting scene.
また、ステップS8で、被写体追従を開始すると判断すると、ステップS9に進み、CPU10は、該設定された大きさ(探索範囲記憶領域に記憶されている探索範囲の大きさ)の探索範囲を対象として、ブロックマッチング動作を開始することにより被写体追従を開始させる。
If it is determined in step S8 that subject tracking starts, the process proceeds to step S9, and the
図3は、ブロックマッチングにおける探索範囲を説明するための図であり、図3(a)は、その範囲が比較的広い探索範囲が設定された場合を示し、図3(b)は、その範囲が比較的狭い探索範囲が設定された場合を示している。つまり、「スポーツを写す」などといった、被写体の動きが激しいことが想定される撮影シーンが選択されていたときには、図3(a)に示すような、その範囲が比較的広い探索範囲が設定される。また、「夜景を写す」などといった、被写体の動きがあること自体があまり想定されない撮影シーンが選択されていたときには、図3(b)に示すような、その範囲が比較的狭い探索範囲が設定される。 FIG. 3 is a diagram for explaining a search range in block matching. FIG. 3A shows a case where a relatively wide search range is set, and FIG. 3B shows the range. Indicates a case where a relatively narrow search range is set. That is, when a shooting scene that is assumed to be subject to intense movement, such as “shooting sports”, is selected, a search range having a relatively wide range as shown in FIG. 3A is set. The Also, when a shooting scene such as “photographing a night view” that is not expected to have a subject movement itself is selected, a search range having a relatively narrow range as shown in FIG. 3B is set. Is done.
ここで、図3のP(x−1)は前フレーム画像データ(参照フレーム画像)、P(x)は現フレーム画像データ(探索対象フレーム画像)、23は前フレーム画像データP(x−1)に設定される基準ブロック(注目画像領域)、24は基準ブロック23に対応して現フレーム画像データP(x)に設定される探索範囲、25は探索範囲24に基づいて順次抽出される探索ブロック、26は基準ブロック23の基準座標位置(例えば基準ブロック23の中心画素の座標位置)、27は探索範囲24における基準座標位置(例えば探索範囲24における中心画素の座標位置)、28は抽出された探索ブロック25の基準座標位置(例えば抽出される探索ブロック25の中心画素の座標位置)を示している。
3, P (x−1) is the previous frame image data (reference frame image), P (x) is the current frame image data (search target frame image), and 23 is the previous frame image data P (x−1). ) Is set as a reference block (attention image area), 24 is a search range set in the current frame image data P (x) corresponding to the
なお、ここでは、探索ブロック25の基準座標位置28を該探索ブロック25の代表座標位置とし、基準ブロック23の基準座標位置26を該基準ブロック23の代表座標位置とする。
また、ここでは、現フレーム画像データとは最新のフレーム画像データのことを言い、前フレーム画像データとは該最新のフレーム画像データの1つ前のフレーム画像データのことを言う。
Here, the reference coordinate
Also, here, the current frame image data refers to the latest frame image data, and the previous frame image data refers to the frame image data immediately before the latest frame image data.
このブロックマッチング動作による被写体追従について簡単に説明する。シャッタボタンが半押しされた後、新たにフレーム画像データが取得されると、CPU10は、1つ前に取得されていたフレーム画像データ(前回の現フレーム画像データP(x))、つまり、シャッタボタン半押し時に表示されていたフレーム画像データを前フレーム画像データP(x−1)として選択するとともに(選択手段)、当該選択した前フレーム画像データP(x−1)に基準ブロック23を設定する(設定手段)。この基準ブロック23の設定は、シャッタボタン半押し時に表示されていた注目画像指定枠34の位置に基づいて行なわれる。
Subject tracking by this block matching operation will be briefly described. When the frame image data is newly acquired after the shutter button is half-pressed, the
図4(a)は、シャッタボタン半押し時に表示されていたフレーム画像データ31及び注目画像指定枠34の様子を示す図であり、この注目画像指定枠34に基づいて、選択した前フレーム画像データP(x−1)、つまり、シャッタボタン半押し時に表示されていたフレーム画像データ31に、基準ブロック23が設定される。ここでは、この注目画像指定枠34をそのまま基準ブロック23として設定する。
FIG. 4A is a diagram showing the state of the
また、新たに取得したフレーム画像データを現フレーム画像データP(x)として選択するとともに(選択手段)、当該取得した現フレーム画像データP(x)に探索範囲24を設定する(設定手段)。このとき設定される探索範囲24は、当該探索範囲24における基準座標位置27が、基準ブロック23の基準座標位置26に対応する座標位置となるように、そして、当該探索範囲24の大きさが、上述したような探索範囲記憶領域に記憶された探索範囲の大きさとなるように設定される。
Further, the newly acquired frame image data is selected as the current frame image data P (x) (selecting means), and the
そして、探索ブロック25の基準座標位置28が探索範囲24内となるような探索ブロック25を現フレーム画像データP(x)から順次抽出するとともに、つまり、探索範囲24内の各座標位置をその代表座標位置(基準座標位置28)とする探索ブロック25を現フレーム画像データP(x)から順次抽出するとともに、該抽出した各探索ブロック25の中から、基準ブロック23と最も相関度が高くなる探索ブロック25(一致ブロック29)を検出する。
Then, the
図4(b)は、現フレーム画像データP(x)の探索範囲内で検出された一致ブロック29の様子を示すものである。また、このとき、検出された一致ブロック29の基準座標位置28に基づいて、注目画像指定枠34と同じ大きさを有する被写体追従枠を表示させる。なお、ここでは、注目画像指定枠34と、基準ブロック23及び探索ブロック25との大きさは同じなので、該検出された一致ブロック29がそのまま被写体追従枠として表示される。
FIG. 4B shows the state of the
そして、新たにフレーム画像データが取得されると、現フレーム画像データP(x)であるフレーム画像データ32が前フレーム画像データP(x−1)として選択されるとともに、該新たに取得されたフレーム画像データが現フレーム画像データP(x)として選択される。そして、該選択された前フレーム画像データP(x−1)に基準ブロック23を設定する。この基準ブロック23の設定は、該検出された一致ブロック29の基準座標位置28に基づいて行なわれる。例えば、該検出された一致ブロック29がそのままの状態で基準ブロック23として設定される。つまり、図4(c)に示すように該検出された一致ブロック29が新たな基準ブロック23として前フレーム画像データP(x−1)に設定される。
When the frame image data is newly acquired, the
このようにして、順次取得されるフレーム画像から逐次追跡対象の被写体を検出していく。また、撮影状況に応じた大きさの探索範囲24でブロックマッチングを行なうことにより、基準ブロック22と最も相関度が高くなる探索ブロック25、つまり、一致ブロック29を効率良く検出することができる。
In this way, the subject to be tracked is sequentially detected from the sequentially acquired frame images. Further, by performing block matching in the
なお、順次抽出される探索ブロック25の評価値としての相関度は、当該探索ブロック25の探索範囲内での位置に基づいて、それぞれの評価値を補正し、この補正した評価値に基づいて一致ブロック29を検出する構成としてもよい。つまり、基準ブロック23で表現される画像領域に、真に追跡したい被写体に加え、背景としての画像が含まれていたり、被写体の形状自体が変化しながら移動していくようなときには、例えば差分二乗和としての評価値のみでは、誤判断が発生する可能性が高くなるため、例えば撮影シーンに応じて、それぞれの評価値を補正する構成としてもよい。
The degree of correlation as the evaluation value of the
以下、探索ブロック毎に、評価値として算出した差分二乗和をそれぞれ補正することで、各探索ブロックに対する基準ブロックとの相関度を導出する場合を図5のフローチャートに従って説明する。尚、最初に差分二乗和としての評価値の算出を詳細に説明し、次に差分二乗和として算出した評価値の補正を詳細に説明する。 The case of deriving the degree of correlation with the reference block for each search block by correcting the difference sum of squares calculated as the evaluation value for each search block will be described with reference to the flowchart of FIG. First, calculation of the evaluation value as the sum of squared differences will be described in detail, and then correction of the evaluation value calculated as the sum of squared differences will be described in detail.
まず、例えば上述したステップS8で被写体追従を開始すると判断すると、ステップS11で、CPU10は、上述したステップS5で設定された探索範囲24のサイズと、基準ブロック23の基準座標位置26(基準座標位置26に対応する現フレーム画像P(x)上の座標位置)とに基づいて現フレーム画像データP(x)上に探索範囲24を設定する(設定手段)。
つまり、基準ブロック23の基準座標位置(例えば中心座標位置)26に対応する現フレーム画像データでの座標位置が、その基準座標位置(例えば中心座標位置)27となるように、該設定されたサイズで探索範囲24を設定する。
First, for example, when it is determined to start subject tracking in step S8 described above, in step S11, the
That is, the set size is set so that the coordinate position in the current frame image data corresponding to the reference coordinate position (for example, the center coordinate position) 26 of the
次いで、ステップS12で、CPU10は、探索ブロック25の基準座標位置(例えば中心座標位置)28が、該設定された探索範囲24内の座標位置になる探索ブロック25を順次抽出していくとともに、この抽出した各探索ブロック25のブロック評価値Sを算出する(相関度導出手段)。
Next, in step S12, the
ここで、図6(a)は、基準ブロック23、探索ブロック25の様子を例示すものであり、ここでは、基準ブロック23、探索ブロック25ともに8画素×8画素で構成されている。また、図6(a)の黒く塗りつぶした画素を、ブロック(基準ブロック23、探索ブロック25)の基準座標位置とする。
Here, FIG. 6A illustrates the state of the
なお、8画素×8画素のように偶数の画素で構成されたブロックの場合には、中心の画素は存在しないので、基準座標位置は、図6(a)の中央部にある4つの画素であれば(太線で囲まれている4つの画素であれば)、何れの画素であってもよいが、基準ブロック23の基準座標位置26と探索ブロック25の基準座標位置28とは、それぞれのブロック内座標系において同じ座標位置にする必要がある。
Note that in the case of a block composed of an even number of pixels such as 8 pixels × 8 pixels, there is no central pixel, so the reference coordinate position is the four pixels in the center of FIG. 6A. Any pixel may be used as long as there are four pixels surrounded by a thick line, but the reference coordinate
また、図6(b)は、図2のステップS5で設定された探索範囲24の大きさの例を示すものであり、探索範囲24は、現フレーム画像データにおける所定の画素を中心として、例えば、左右にそれぞれ12画素、また、上下にそれぞれ8画素分の範囲からなっている。このとき、現フレーム画像データにおける所定の画素、つまり、探索範囲24の基準座標位置27(図6(b)の斜線部分)は、前フレーム画像データにおける基準ブロックの基準座標位置26に対応している座標位置である。また以下では、探索範囲24の基準座標位置27を(x,y)=(0,0)(但し、探索範囲24内上での座標位置とする)とし、x軸は右方向をプラス、左方向をマイナス、y軸は上方向をプラス、下方向をマイナスとして説明する。
FIG. 6B shows an example of the size of the
そして、探索ブロック25の各画素値と基準ブロック23の各画素値との差分の二乗の総和(ブロック評価値S)を算出するという動作を、探索ブロック25の基準座標位置28が探索範囲24の範囲内となるように抽出される各探索ブロック25に対して行なう。
この差分の二乗の総和(差分二乗和とも記す)としての探索ブロック25毎のブロック評価値Sは、以下に示す数1によって求めることができる。
The operation of calculating the sum of the squares of the differences between the pixel values of the
The block evaluation value S for each
数1における、kは、基準ブロック23内又は探索ブロック25内の各画素のアドレスを示している。つまり、図6(a)に示す例では、基準ブロック23及び探索ブロック25は8×8画素で構成されているので、画素の数は全部で64個となり、アドレスkが0〜63までとなる。
また、Y1は、探索ブロック25の各画素の輝度値を表し、Y2は、基準ブロック23の各画素の輝度値を表している。
In
Y1 represents the luminance value of each pixel of the
また、「xy」は、各探索ブロックの識別番号としてのそれぞれの基準座標位置28を表している。
図7は、探索ブロック25の基準座標位置28が探索範囲24内となるように現フレーム画像データP(x)から順次抽出される探索ブロック25を説明するための図である。
図を見ると、探索ブロック25の基準座標位置(黒く塗りつぶしている画素の座標位置)28が(x,y)=(0,0)のときに、抽出される探索ブロック25の範囲は、図7のAのような範囲となり、Y1x=0,y=0は、該Aに示すような範囲の探索ブロック25の画素の輝度値を表している。また、探索ブロック25の基準座標位置28が(x,y)=(−12,8)のときに、抽出される探索ブロック25の範囲は図7のBに示すような範囲となり、Y1x=−12,y=8は、該Bに示すような範囲の探索ブロック25の画素の輝度値を表している。
“ Xy ” represents each reference coordinate
FIG. 7 is a diagram for explaining the
As shown in the figure, when the reference coordinate position (coordinate position of a pixel painted black) 28 of the
また、Y1xykは、探索ブロック25の基準座標位置28が、(x,y)のときに抽出される探索ブロック25の各アドレスの輝度値を表しており、k=0のときは、該抽出される探索ブロック29のアドレス0の画素の輝度値、k=1のときは、該抽出される探索ブロック29のアドレス1の画素の輝度値を表している。
Y1 xy k represents the luminance value of each address of the
なお、Y2kとは、基準ブロック23の各アドレスの画素の輝度値を表しており、k=0のときは、基準ブロック23のアドレス0の画素の輝度値、k=1のときは、基準ブロック23のアドレス1の画素の輝度値を表している。また、このアドレスkに対応する基準ブロック23、探索ブロック25の画素は、ブロック内でそれぞれ同じ位置である必要がある。例えば、アドレス0を基準ブロックの一番左上の画素とする場合には、アドレス0に対応する探索ブロック25の画素も一番左上とする必要がある。なぜならば、探索ブロック25の各画素値と基準ブロック24の各画素値とを同じ位置の画素同士で減算するからである。
Y2k represents the luminance value of the pixel at each address of the
つまり、上記した数式によって、探索ブロック25の基準座標位置28が(x,y)のときに抽出される探索ブロック25の各画素値と、基準ブロック23の各画素値とが対応する座標位置の画素同士で減算され、その二乗の総和が該(x,y)を基準座標位置28とする探索ブロックのブロック評価値Sxyとして算出されることになる。この(x,y)の値を変えることにより、探索範囲24内の座標位置を基準座標位置28とする各探索ブロック25に対してブロック評価値Sxyを求めることができる。
In other words, according to the above formula, each pixel value of the
図8は、探索範囲24の座標位置を基準座標位置28とする各探索ブロック25に対して算出されたブロック評価値Sの様子を示すものであり、探索範囲24の画素の数と同じ数だけのブロック評価値Sが算出されている。なお、図8においては、ブロック評価値を全てSで表示させているが、全てのブロック評価値が同じ値ということを示しているのではなく、あくまでもブロック評価値を意味しているに過ぎない。このブロック評価値Sの値が高くなればなるほど相関度は小さくなる。
FIG. 8 shows the state of the block evaluation value S calculated for each
次に、差分二乗和として算出された各探索ブロック25に対するブロック評価値Sの補正について説明する。
Next, correction of the block evaluation value S for each
図5のフローチャートに戻り、図2のステップS5で設定された探索範囲24のサイズ、又は、図2のステップS4で取得した撮影シーンに対応する補正係数マップを設定し(設定手段)、該設定した補正係数マップを用いて、上述したように算出したブロック評価値Sを探索ブロック25毎に補正する(相関度補正手段)。
なお、メモリ9には、各探索範囲24のサイズ、又は、撮影シーンに対応する補正係数マップがそれぞれ予め記録されている。
Returning to the flowchart of FIG. 5, the size of the
In the
図9は、図2のステップS5で設定された探索範囲24のサイズに対応する補正係数マップ、又は、図2のステップS4で取得された撮影シーンに対応する補正係数マップの例を示すものである。
この補正係数マップは、ブロック評価値を補正するための補正係数mが探索ブロック25の基準座標位置28に対応してそれぞれ記録されている。なお、図2のステップS4で設定された探索範囲24のサイズと、補正係数マップのサイズは等しくなるように、つまり、探索範囲24における画素の数と、補正係数マップに記録されている補正係数の数は等しくなるように記録されている。
FIG. 9 shows an example of a correction coefficient map corresponding to the size of the
In this correction coefficient map, a correction coefficient m for correcting the block evaluation value is recorded corresponding to the reference coordinate
ここで、図8に示したように探索範囲のサイズにおいて縦方向に並ぶ画素を17画素(−8〜8)、横方向に並ぶ画素を25画素(−12〜12)とした場合には、図9に示すように、補正係数マップにおける補正係数も縦方向に17(−8〜8)、横方向に25(−12〜12)だけの数の補正係数が、それぞれ対応する座標位置とともに記録されている。そして、この補正係数マップでは、補正係数の座標位置が(x,y)=(0,0)に近いほど(探索範囲24の基準座標位置27としての中心座標位置に近いほど)補正係数mが小さく、また、遠いほど補正係数mが大きくなっている。ここでは、最小の補正係数mは、補正係数マップの中心付近の「64」であり、最大の補正係数mは、補正係数マップの四隅の「255」である。
Here, as shown in FIG. 8, when the pixels arranged in the vertical direction in the size of the search range are 17 pixels (−8 to 8) and the pixels arranged in the horizontal direction are 25 pixels (−12 to 12), As shown in FIG. 9, the correction coefficients in the correction coefficient map are also recorded with 17 (−8 to 8) correction coefficients in the vertical direction and 25 (−12 to 12) in the horizontal direction together with the corresponding coordinate positions. Has been. In this correction coefficient map, the correction coefficient m becomes closer to the coordinate position of the correction coefficient closer to (x, y) = (0, 0) (the closer to the center coordinate position as the reference coordinate
そして、この補正係数マップを用いて、ブロック評価値Sを探索ブロック25毎に補正する。
具体的には、ブロック評価値が算出された探索ブロック25を順次選択する。そして、選択した探索ブロック25毎に、当該探索ブロック25の基準座標位置28に対応して記録されている補正係数を補正係数マップから選択し、この選択した補正係数をブロック評価値Sに乗算することによりブロック評価値Sを補正する。つまり、ブロック評価値Sを補正することで、基準ブロック23と各探索ブロック25との相関度を補正する。
Then, the block evaluation value S is corrected for each
Specifically, the search blocks 25 whose block evaluation values are calculated are sequentially selected. Then, for each selected
例えば、基準座標位置28が(x,y)=(0,0)となっている探索ブロック25のブロック評価値Sを補正する場合には、この探索ブロック25のブロック評価値Sに、補正係数マップにおける座標位置が(x,y)=(0,0)となっている補正係数m(m=64)を乗算する。また、例えば、基準座標位置28が(x,y)=(4,−3)となっている探索ブロック25のブロック評価値Sを補正する場合には、この探索ブロック25のブロック評価値Sに、補正係数マップにおける座標位置が(x,y)=(4,−3)となっている補正係数m(m=86)を乗算する。また、例えば、基準座標位置28が(x,y)=(−12,8)となっている探索ブロック25のブロック評価値Sを補正する場合には、この探索ブロック25のブロック評価値Sに、補正係数マップにおける座標位置が(x,y)=(−12,8)となっている補正係数m(m=255)を乗算する。
For example, when correcting the block evaluation value S of the
このように、補正係数マップとして記録されている補正係数は、探索ブロック25が探索範囲24の基準座標位置27(x,y)=(0,0)から離れれば離れるほどその値が大きくなるので、それに従って、各補正後のブロック評価値Sの値は、基準座標位置27(x,y)=(0,0)から離れれば離れるほど大きくなりやすい(相関度は小さくなりやすい)。これにより、基準ブロック23に対応する座標位置付近で抽出される探索ブロック25のブロック評価値を低くさせやすく(相関度を大きくさせやすく)なり、基準ブロック23に対応する座標位置を重点とした一致ブロック29を検出することができる。つまり、座標位置毎に、例えば被写体が移動している可能性としての確率を相関度に反映させることができる。
Thus, the correction coefficient recorded as the correction coefficient map increases in value as the
図5のフローチャートに戻り、補正係数マップを用いて各ブロック評価値Sを補正すると、ステップS14に進み、CPU10は、該補正後のブロック評価値Sのうち、最もブロック評価値Sの値が小さくなる探索ブロック25を検出する。そして、該検出した探索ブロック25を基準ブロック23と最も相関度が高い探索ブロック25(一致ブロック29)とする。
Returning to the flowchart of FIG. 5, when each block evaluation value S is corrected using the correction coefficient map, the process proceeds to step S <b> 14, and the
C.以上のように、本実施の形態においては、ユーザによって選択された撮影シーンに応じてブロックマッチングの探索条件(探索範囲24の大きさ)を変えて、ブロックマッチングを行なうので、撮影状況に応じたブロックマッチングを行なうことができる。
また、各ブロック評価値を、探索範囲24の基準座標位置27に近くなればなるほど補正係数が小さくなる補正係数マップを用いて補正するようにしたので、基準ブロック23の座標位置に近い探索ブロック25を優先的に該基準ブロック23と最も相関度の高い探索ブロック25(一致ブロック29)として検出し易くすることができ、探索範囲24の中央を重点とした一致ブロックの検出を行なうことができる。つまり、座標位置毎に、被写体が移動している可能性としての確率を相関度に反映させることで、より誤判断の発生を低減させて、真に追跡したい被写体を追跡することができる。
C. As described above, in the present embodiment, block matching is performed by changing the block matching search condition (the size of the search range 24) according to the shooting scene selected by the user. Block matching can be performed.
In addition, each block evaluation value is corrected using a correction coefficient map in which the correction coefficient becomes smaller as the reference coordinate
[変形例]
D.上記実施の形態は、以下のような変形例も可能である。
(1)上記実施の形態においては、ユーザによって選択された撮影シーン(取得した撮影シーン)に応じて探索範囲24の大きさ(ブロックマッチングの探索条件)を変えるようにしたが、探索範囲24に替えて、基準ブロック23の大きさ(ブロックマッチングの探索条件)を変える(設定する)ようにしてもよい(設定手段)。つまり、選択された撮影シーンに応じて基準ブロック23の大きさを変えるようにしてもよい。この場合は、基準ブロック23の大きさに伴い探索ブロック25の大きさも変わる。
この場合は、図2のステップS5で、該取得された撮影シーンに対応する基準ブロック23のサイズを取得し、該取得したサイズをブロックマッチングの基準ブロック23のサイズとして前フレーム画像データP(x−1)に設定する(設定手段)。その後、ステップS6で、該設定された基準ブロック23のサイズで、ブロックマッチング動作を開始する。
[Modification]
D. The above-described embodiment can be modified as follows.
(1) In the above embodiment, the size of the search range 24 (block matching search condition) is changed according to the shooting scene (acquired shooting scene) selected by the user. Instead, the size (block matching search condition) of the
In this case, in step S5 in FIG. 2, the size of the
図10は、設定された大きさの基準ブロック23でのブロックマッチングを説明するための図である。
図10(a)は、例えば、追跡したい被写体の画角内サイズが比較的小さくなるような撮影シーンが選択されたことによって設定された基準ブロック23の大きさの様子を示しており、図10(b)は、例えば、追跡したい被写体の画角内サイズが比較的大きくなるような撮影シーンが選択されたことによって設定された基準ブロック23の大きさの様子を示している。
つまり、図10(a)は、基準ブロック23及び探索ブロックが比較的小さな範囲として設定される場合を示し、図10(b)は、基準ブロック23及び探索ブロックが比較的広い範囲として設定される場合を示している。
FIG. 10 is a diagram for explaining block matching in the
FIG. 10A shows the size of the
That is, FIG. 10A shows a case where the
このように、撮影状況に応じた大きさの基準ブロック23でブロックマッチングを行なうことにより、基準ブロック22と最も相関度が高い一致ブロックを効率良く検出することができ、撮影状況に応じたブロックマッチングを行なうことができる。
Thus, by performing block matching with the
(2)また、上記実施の形態及び上記変形例(1)においては、基準ブロック23の全画素を用いてブロックマッチングを行なうようにしたが、ユーザによって選択された撮影シーン(取得した撮影シーン)に応じた画素間引き間隔(ブロックマッチングの探索条件)を設定し(設定手段)、該設定された間隔で基準ブロック23の画素を間引き(間引き手段)、該間引かれた後の基準ブロック23の残りの画素を用いてブロックマッチングを行なうようにしてもよい。このときは、探索ブロック25も基準ブロック23の間引きに応じて間引かれることになる。
この場合は、図2のステップS5で、該取得された撮影シーンに対応する間引き間隔を取得し、該取得した間隔を、基準ブロック23のブロックの画素の間引き間隔として設定する(設定手段)。その後、ステップS6で、該設定された間引き間隔で間引かれた後の基準ブロック23の画素を用いて、ブロックマッチング動作を開始する。
(2) In the embodiment and the modification (1), the block matching is performed using all the pixels of the
In this case, in step S5 of FIG. 2, a thinning interval corresponding to the acquired shooting scene is acquired, and the acquired interval is set as a pixel thinning interval of the block of the reference block 23 (setting unit). Thereafter, in step S6, a block matching operation is started using the pixels of the
図11は、設定された間引き間隔の様子を示す図であり、間引き後に残った画素を斜線部分で表している。
図11(a)は、例えば、比較的被写体の濃淡が激しい撮影シーンが選択されたことによって設定された基準ブロック23の画素の間引き間隔の様子を示しており、図11(b)は、例えば、比較的被写体の濃淡が緩やかな撮影シーンが選択されたことによって設定された基準ブロック23の画素の間引き間隔の様子を示している。なお、ここでは、基準ブロック23を12画素×12画素で構成させている。
FIG. 11 is a diagram showing a state of the set thinning interval, and the pixels remaining after the thinning are represented by hatched portions.
FIG. 11A shows a state of the pixel thinning interval of the
つまり、図11(a)は、間引き画素が比較的少なく設定される場合を示し、図11(b)は、間引き画素が比較的多く設定される場合を示している。
このように、撮影状況に応じた大きさの間引き間隔で間引いた後でブロックマッチングを行なうことにより、基準ブロック22と最も相関度が高い一致ブロックを効率良く検出することができ、撮影状況に応じたブロックマッチングを行なうことができる。
That is, FIG. 11A shows a case where the number of thinned pixels is set relatively small, and FIG. 11B shows a case where the number of thinned pixels is set relatively large.
In this way, by performing block matching after thinning at a thinning interval corresponding to the shooting situation, a matching block having the highest correlation with the
なお、前フレーム画像データP(x−1)においての間引き対象は、基準ブロック23のみに限定するものではなく、前フレーム画像データP(x−1)全体に亘って、画素間引きを行う構成としてもよい。また、現フレーム画像データP(x−1)においての間引き対象は、抽出される各探索ブロック25のみに限定するものではなく、現フレーム画像データP(x)全体に亘って、画素間引きを行う構成としてもよい。
Note that the thinning target in the previous frame image data P (x−1) is not limited to the
(3)また、上記実施の形態においては、撮影シーンに応じて、探索範囲の大きさを変え、それに伴って補正係数マップも変えるようにしたが、ユーザによって選択された撮影シーンに応じて補正係数マップのみを変える(設定する)ようにしてもよい。この場合は、各撮影シーンに対応する補正係数マップをメモリ9に記録させておく。
また、撮影シーンに応じて探索範囲を変えずに、撮影シーンに応じて、補正係数マップと、基準ブロック23の大きさ又は/及び間引き間隔とを変えるようにしてもよい。
(3) In the above embodiment, the size of the search range is changed according to the shooting scene, and the correction coefficient map is changed accordingly, but the correction is made according to the shooting scene selected by the user. Only the coefficient map may be changed (set). In this case, a correction coefficient map corresponding to each shooting scene is recorded in the
Also, the correction coefficient map and the size or / and the thinning interval of the
(4)また、上記実施の形態においては、各探索ブロック24のブロック評価値Sを算出すると(図5のステップS12)、該算出した各ブロック評価値Sを補正係数マップに基づいて補正し(ステップS13)、該補正後のブロック評価値Sの中で最もブロック評価値Sの値が小さくなる探索ブロック25を検出し、それを、基準ブロック23と最も相関度が高くなる一致ブロックとするようにしたが、各探索ブロック25のブロック評価値Sを算出すると、ブロック評価値Sの補正を行なわずに、ブロック評価値Sの値が小さいものから順に予め設定されている数だけ探索ブロック25を選択し、該選択した探索ブロック25の中で、その基準座標位置28が最も探索範囲24の基準座標位置27に近い探索ブロック25を検出し、該検出した探索ブロック25を一致ブロック29とするようにしてもよい。
(4) In the above embodiment, when the block evaluation value S of each
この変形例(4)の動作を図12のフローチャートにしたがって説明する。
前フレーム画像データの基準ブロック23と最も相関度が高くなる現フレーム画像データのブロックの検出を開始すると、ステップS21で、CPU10は、図2のステップS5で設定された探索範囲24のサイズと、基準ブロック23の基準座標位置26とに基づいて現フレーム画像データ上に探索範囲24を設定する。
つまり、基準ブロック23の基準座標位置26に対応する現フレーム画像データでの座標位置が探索範囲24の基準座標位置27となるように、該設定されたサイズで探索範囲24を設定する。
The operation of this modification (4) will be described with reference to the flowchart of FIG.
When the detection of the block of the current frame image data having the highest degree of correlation with the
That is, the
次いで、ステップS22で、CPU10は、探索ブロック25の基準座標位置28が探索範囲24内となるような探索ブロック25を現フレーム画像データP(x)から抽出していき、各探索ブロック25のブロック評価値を算出する。
ここでも、図8に示すようなブロック評価値Sが算出されたものとする。
Next, in step S <b> 22, the
Also here, it is assumed that a block evaluation value S as shown in FIG. 8 is calculated.
次いで、ステップS23で、CPU10は、該算出された各探索ブロック25のブロック評価値Sに基づいて、ブロック評価値Sの値が小さいものから順に予め設定されている数だけ探索ブロック25を選択する。
ここでは、図8の太線の四角で囲まれている座標位置を基準座標位置28とする探索ブロック25が、ステップS23で、選択された探索ブロック25とする。
Next, in step S23, the
Here, the
次いで、ステップS24で、CPU10は、選択した複数の探索ブロック25のうち、その基準座標位置28が探索範囲24の基準座標位置27((x,y)=(0,0))に最も近い探索ブロック25を、基準ブロック23と最も相関度が高い探索ブロック25(一致ブロック29)として検出する。
図8の例では、ブロック評価値Sに基づいて選択された各探索ブロック25の基準座標位置28は、それぞれ、(x,y)=(−8,5)、(x,y)=(−3,−3)、(x,y)=(−2,1)、(x,y)=(5,−4),(x,y)=(6,2)なので、その基準座標位置28が探索範囲24の基準座標位置27に最も近くなっている探索ブロック25は、(x,y)=(−2,1)に対応するものであるため、(x,y)=(−2,1)を基準座標位置28とする探索ブロック25を基準ブロック23と最も相関度が高い探索ブロック25(一致ブロック29)として検出する。
Next, in step S <b> 24, the
In the example of FIG. 8, the reference coordinate
これにより、ブロック評価値Sを補正することなく、基準ブロック23の位置付近に位置している探索ブロック25を優先的に該基準ブロック23と最も相関度の高い探索ブロック25(一致ブロック29)として検出し易くすることができ、探索範囲24の中央を重点とした一致ブロック29の検出を行なうことができる。
Thereby, without correcting the block evaluation value S, the
(5)また、上記実施の形態においては、図5のステップS13で、各探索ブロック25のブロック評価値Sを補正すると、ステップS14で、該補正後のブロック評価値Sの中で最もブロック評価値Sの値が小さくなる探索ブロック25を一致ブロック29とするようにしたが、図5のステップS13で、各探索ブロック25のブロック評価値Sを補正すると、上記変形例(3)で説明した図12のステップS23のように、該補正後のブロック評価値Sの中でブロック評価値Sの値が小さいものから順に予め設定されている数だけ探索ブロック25を選択し、この中で、その基準座標位置28が探索範囲24の基準座標位置27((x,y)=(0,0))に最も近い探索ブロック25を、基準ブロック23と最も相関度が高い探索ブロック25(一致ブロック29)として検出するようにしてもよい。
これにより、更に探索範囲24の中央を重点とした一致ブロックの検出を行なうことができる。
(5) In the above embodiment, when the block evaluation value S of each
This makes it possible to detect a matching block with an emphasis on the center of the
(6)また、上記実施の形態においては、図2のステップS4で取得した撮影シーン(選択された撮影シーンに対応するブロックマッチングの探索条件)に基づいて、処理の演算量を算出し、該算出した演算量に基づいて、フレーム画像データを撮像するフレームキャプチャレートを変える(設定する)ようにしてもよい(設定手段)。つまり、演算量の多さに比例してキャプチャレートを遅くする。これにより、取得されるフレーム画像データのレートが変わる。
この演算量の多さに比例したキャプチャレートとは、例えば、算出した演算量が所定値より少ない場合は、フレーム画像データを所定のキャプチャレートで撮像し、算出した演算量が所定値より多い場合には、その比率に応じてキャプチャレートを遅くする。
これにより、フレーム画像の撮像をスムーズに行なうことができる。演算量が多すぎてCPU10の処理が間に合わない場合は、フレーム画像がスムーズに撮像されないからである。
なお、フレームキャプチャレートに対応する表示レートで該撮像されたフレーム画像データを表示させ、フレームキャプチャレートが遅くなった場合は、それに応じて表示レートも遅くする。
(6) In the above embodiment, the amount of processing is calculated based on the shooting scene (block matching search condition corresponding to the selected shooting scene) acquired in step S4 in FIG. The frame capture rate for capturing frame image data may be changed (set) based on the calculated calculation amount (setting means). That is, the capture rate is slowed in proportion to the amount of calculation. Thereby, the rate of the acquired frame image data changes.
The capture rate proportional to the amount of calculation is, for example, when the calculated calculation amount is smaller than a predetermined value, when the frame image data is captured at a predetermined capture rate, and the calculated calculation amount is larger than the predetermined value. The capture rate is reduced according to the ratio.
Thereby, it is possible to smoothly capture the frame image. This is because when the amount of calculation is too large and the processing of the
When the captured frame image data is displayed at a display rate corresponding to the frame capture rate, and the frame capture rate is slow, the display rate is also slowed accordingly.
(7)また、上記実施の形態においては、ユーザによって選択された撮影シーン(撮影情報)に応じてブロックマッチングの探索条件を設定するようにしたが、撮影シーンに限らず、ユーザによって選択されたズーム倍率(フレーム画像データが撮像された時のズーム倍率)や、カメラを横にして撮影する(横撮りする)場合と、カメラを縦にして撮影する(縦撮りする)場合等(撮影情報)に応じてブロックマッチングの探索条件を設定するようにしてもよい。これにより、撮影状況に応じたブロックマッチングを行なうことができる。 (7) In the above embodiment, the search condition for block matching is set according to the shooting scene (shooting information) selected by the user. However, the search condition is not limited to the shooting scene and is selected by the user. Zoom magnification (zoom magnification when the frame image data was captured), shooting with the camera sideways (landscape shooting), shooting with the camera vertically (shooting vertically), etc. (shooting information) Depending on the block matching search condition, it may be set. Thereby, block matching according to a photography situation can be performed.
(8)また、上記実施の形態において、基準ブロック23の基準座標位置26と検出された一致ブロック29の基準座標位置28とに基づいて動きベクトル(撮影情報)を算出し(動きベクトル算出手段)、該算出した動きベクトルに応じて、ブロックマッチングの探索条件の設定を変更するようにしてもよい。例えば、動きベクトルが大きく検出されたときには、大きな探索範囲24を設定し、動きベクトルが小さく検出されたときには、小さな探索範囲24を設定する。また、所定の方向への動きベクトルが大きく検出されたときには、その所定の方向に対する大きさが大きな探索範囲24を設定し、所定の方向への動きベクトルが小さく検出されたときには、その所定の方向に対する大きさが小さな探索範囲24を設定する。これにより、撮影状況に応じたブロックマッチングを行なうことができる。
(8) In the above embodiment, a motion vector (photographing information) is calculated based on the reference coordinate
(9)また、上記実施の形態においては、各撮影シーン又は各探索範囲24の大きさに対応する補正係数マップをそれぞれ設けたが、フレーム画像データの全範囲の補正係数マップを1つ備え、探索範囲24の大きさに応じて、該補正係数マップの使用範囲を変えるようにしてもよい。
(9) In the above embodiment, each correction coefficient map corresponding to the size of each shooting scene or each
(10)また、上記実施の形態においては、ブロックマッチングの対象となるフレーム画像(前フレーム画像データ、現フレーム画像データ)は、現にCCD5により順次撮像されるフレーム画像データであってもよいし、CCD5によって撮像され既に記録された動画データであってもよい。
現にCCD5によって撮像されているフレーム画像データに基づいてブロックマッチングを行なう場合は、該フレーム画像データが撮像された撮影シーン等に応じてブロックマッチングの探索条件を設定し、既に記録されている動画データに基づいてブロックマッチングを行なう場合は、該動画データが撮像された時の撮影シーン等によってブロックマッチングの探索条件を設定する。
なお、既に記録された動画データに関連付けて、該動画データが撮影された時の撮影シーン等を示す情報を関連付けて記録しておく必要がある。
(10) In the above-described embodiment, the frame image (previous frame image data, current frame image data) to be subjected to block matching may be frame image data that is actually sequentially captured by the
When block matching is performed based on frame image data actually captured by the
In addition, it is necessary to associate and record information indicating a shooting scene or the like when the moving image data is captured in association with the already recorded moving image data.
(11)また、上記実施の形態においては、最新のフレーム画像データを現フレーム画像データP(x)として選択し、その1つ前に撮像されたフレーム画像データP(x−1)とを前フレーム画像データとして選択し、該選択した2枚のフレーム画像データを用いてブロックマッチングを行なうようにしたが、選択するフレーム画像データ間は必ずしも連続している必要はなく、2つのフレーム画像データを用いてブロックマッチングを行えばよい。 (11) In the above embodiment, the latest frame image data is selected as the current frame image data P (x), and the previous frame image data P (x−1) is captured. The frame image data is selected and block matching is performed using the two selected frame image data. However, the frame image data to be selected does not necessarily have to be continuous. And block matching may be performed.
(12)また、上記実施の形態においては、ブロックマッチングを用いて被写体追従を行なう場合に、撮影シーン等によってブロックマッチングの探索条件を変更させるようにしたが、被写体追従に限らず、ブレ補正処理や動きベクトルを算出処理等に用いられるブロックマッチングにおいても、本発明を適用してもよい。つまり、ブレ補正処理や動きベクトル算出処理においても、撮影シーン等に応じてブロックマッチングの探索条件を変更させるようにしてもよい。 (12) In the above-described embodiment, when subject tracking is performed using block matching, the search condition for block matching is changed depending on the shooting scene or the like. The present invention may also be applied to block matching used for calculation processing of motion vectors and the like. That is, also in the blur correction process and the motion vector calculation process, the block matching search condition may be changed according to the shooting scene or the like.
(13)また、上記(1)〜(12)を矛盾が生じない範囲で任意に組み合わせた実施の形態に変更するようにしてもよい。 (13) Further, the above (1) to (12) may be changed to an embodiment arbitrarily combined within a range where no contradiction occurs.
(14)、本発明の上記実施形態は、何れも最良の実施形態としての単なる例に過ぎず、本発明の原理や構造等をより良く理解することができるようにするために述べられたものであって、添付の特許請求の範囲を限定する趣旨のものでない。
したがって、本発明の上記実施形態に対してなされ得る多種多様な変形ないし修正はすべて本発明の範囲内に含まれるものであり、添付の特許請求の範囲によって保護されるものと解さなければならない。
(14) The above embodiments of the present invention are merely examples as the best embodiments, and are described in order to better understand the principle and structure of the present invention. However, it is not intended to limit the scope of the appended claims.
Therefore, it should be understood that all the various variations and modifications that can be made to the above-described embodiments of the present invention are included in the scope of the present invention and protected by the appended claims.
最後に、上記各実施の形態においては、本発明の画像処理装置をデジタルカメラ1に適用した場合について説明したが、上記の実施の形態に限定されるものではなく、要は、画像データを処理することができる機器であれば適用可能である。
Finally, in each of the above embodiments, the case where the image processing apparatus of the present invention is applied to the
1 デジタルカメラ
2 撮影レンズ
3 レンズ駆動回路
4 絞り兼用シャッタ
5 CCD
6 ドライバ
7 TG
8 ユニット回路
9 メモリ
10 CPU
11 DRAM
12 画像表示部
13 フラッシュメモリ
14 キー入力部
15 バス
1
6
8
11 DRAM
12
Claims (13)
撮影情報を取得する取得手段と、
前記取得手段により取得された撮影情報に応じて、前記画像領域の探索条件を切り換え設定する設定手段と、を備え、
前記ブロックマッチング処理手段は、前記設定手段により設定された探索条件に基づいて、前記注目画像領域に対応する画像領域を探索することを特徴とする画像処理装置。 Block matching processing means for searching an image area corresponding to a predetermined image area of interest in a reference frame image from a search target frame image;
Acquisition means for acquiring shooting information;
Setting means for switching and setting search conditions for the image area according to the shooting information acquired by the acquisition means,
The image processing apparatus, wherein the block matching processing unit searches for an image region corresponding to the attention image region based on a search condition set by the setting unit.
前記取得手段により取得された撮影情報に応じたサイズの探索範囲を、前記探索対象フレーム画像に設定し、
前記ブロックマッチング処理手段は、
前記設定手段によりそのサイズが設定された探索範囲に対して、前記注目画像領域に対応する画像領域を探索することを特徴とする請求項1記載の画像処理装置。 The setting means includes
A search range of a size according to the shooting information acquired by the acquisition unit is set in the search target frame image,
The block matching processing means includes:
2. The image processing apparatus according to claim 1, wherein an image area corresponding to the target image area is searched for a search range whose size is set by the setting means.
前記取得手段により取得された撮影情報に応じた補正係数マップを設定し、
前記ブロックマッチング処理手段は、
前記注目画像領域との相関度を前記探索対象フレーム画像の各領域毎に導出する相関度導出手段と、前記相関度導出手段により導出した各相関度を前記設定手段により設定された補正係数マップに基づいて補正する相関度補正手段と、を備え、前記相関度補正手段により補正された相関度に基づいて、前記注目画像領域に対応する画像領域を探索することを特徴とする請求項1又は2記載の画像処理装置。 The setting means includes
Set a correction coefficient map according to the shooting information acquired by the acquisition means,
The block matching processing means includes:
Correlation degree deriving means for deriving the degree of correlation with the target image area for each area of the search target frame image, and each correlation degree derived by the correlation degree deriving means in the correction coefficient map set by the setting means And a correlation degree correcting means for correcting the image area based on the correlation degree corrected by the correlation degree correcting means. 3. An image area corresponding to the target image area is searched for. The image processing apparatus described.
前記取得手段により取得された撮影情報に応じたサイズの注目画像領域を、前記参照フレーム画像に設定し、
前記ブロックマッチング処理手段は、
前記設定手段によりそのサイズが設定された注目画像領域に対応する画像領域を探索することを特徴とする請求項1乃至3の何れかに記載の画像処理装置。 The setting means includes
A target image area having a size corresponding to the shooting information acquired by the acquisition unit is set in the reference frame image,
The block matching processing means includes:
4. The image processing apparatus according to claim 1, wherein an image region corresponding to the target image region whose size is set by the setting unit is searched.
前記取得手段により取得された撮影情報に応じた間引き間隔を設定し、
前記ブロックマッチング処理手段は、
前記設定手段により設定された間引き間隔で、前記参照フレーム画像及び前記探索対象フレーム画像の画素を間引く画素間引き手段を備え、前記画素間引き手段により画素を間引いた前記参照フレーム画像及び前記探索対象フレーム画像に基づいて、注目画像領域に対応する画像領域を探索することを特徴とする請求項1乃至4の何れかに記載の画像処理装置。 The setting means includes
Set a thinning interval according to the shooting information acquired by the acquisition means,
The block matching processing means includes:
The reference frame image and the search target frame image in which pixels are thinned out by the pixel thinning unit, the pixel thinning unit thinning out the pixels of the reference frame image and the search target frame image at the thinning interval set by the setting unit The image processing apparatus according to claim 1, wherein an image region corresponding to the target image region is searched based on the image.
前記ブロックマッチング処理手段は、
前記フレーム画像取得手段により取得されるフレーム画像から前記参照フレーム画像及び前記探索対象フレーム画像を選択する選択手段を備えることを特徴とする請求項1乃至5の何れかに記載の画像処理装置。 Frame image acquisition means for sequentially acquiring frame images;
The block matching processing means includes:
6. The image processing apparatus according to claim 1, further comprising a selection unit that selects the reference frame image and the search target frame image from the frame image acquired by the frame image acquisition unit.
前記取得手段により取得された撮影情報に応じたフレームレートを設定し、
前記フレーム画像取得手段は、
前記設定手段により設定されたフレームレートでフレーム画像を順次取得することを特徴とする請求項6記載の画像処理装置。 The setting means includes
Set a frame rate according to the shooting information acquired by the acquisition means,
The frame image acquisition means includes
The image processing apparatus according to claim 6, wherein frame images are sequentially acquired at a frame rate set by the setting unit.
前記フレーム画像取得手段により取得された最新のフレーム画像を前記探索対象フレーム画像として選択するとともに、前記選択した探索対象フレーム画像の直前に取得されたフレーム画像を前記参照フレーム画像として選択することを特徴とする請求項6又は7記載の画像処理装置。 The selection means includes
The latest frame image acquired by the frame image acquisition unit is selected as the search target frame image, and the frame image acquired immediately before the selected search target frame image is selected as the reference frame image. The image processing apparatus according to claim 6 or 7.
前記取得手段は、
前記撮影シーン選択手段により選択された撮影シーンを撮影情報として取得することを特徴とする請求項1乃至8の何れかに記載の画像処理装置。 A shooting scene selection means for the user to select an arbitrary shooting scene;
The acquisition means includes
9. The image processing apparatus according to claim 1, wherein a shooting scene selected by the shooting scene selection unit is acquired as shooting information.
前記取得手段は、
前記動きベクトル算出手段により算出された動きベクトルを撮影情報として取得することを特徴とする請求項1乃至9の何れかに記載の画像処理装置。 A motion vector calculating means for calculating a motion vector between the reference frame image and the search target frame image based on a search result by the block matching processing means;
The acquisition means includes
The image processing apparatus according to claim 1, wherein the motion vector calculated by the motion vector calculation unit is acquired as shooting information.
ズーム倍率情報、縦撮り又は横撮り情報であることを特徴とする請求項1乃至10の何れかに記載の画像処理装置。 The shooting information is
11. The image processing apparatus according to claim 1, wherein the image processing apparatus is zoom magnification information, vertical shooting information, or horizontal shooting information.
前記撮像素子により光電変換されたフレーム画像を順次取得するフレーム画像取得手段と、
前記フレーム画像取得手段により取得された最新のフレーム画像を探索対象フレーム画像として選択するともに、前記選択した探索対象フレーム画像の直前に取得されたフレーム画像を参照フレーム画像として選択する選択手段と、
前記参照フレーム画像内の所定の注目画像領域に対応する画像領域を、前記探索対象フレーム画像から探索するブロックマッチング処理手段と、
撮影情報を取得する取得手段と、
前記取得手段により取得された撮影情報に応じて、前記画像領域の探索条件を切り換え設定する設定手段と、を備え、
前記ブロックマッチング処理手段は、前記設定手段により設定された探索条件に基づいて、前記注目画像領域に対応する画像領域を探索することを特徴とする撮像装置。 An image sensor that photoelectrically converts a subject image;
Frame image acquisition means for sequentially acquiring frame images photoelectrically converted by the imaging device;
A selection means for selecting the latest frame image acquired by the frame image acquisition means as a search target frame image, and selecting a frame image acquired immediately before the selected search target frame image as a reference frame image;
Block matching processing means for searching the search target frame image for an image area corresponding to a predetermined image area of interest in the reference frame image;
Acquisition means for acquiring shooting information;
Setting means for switching and setting search conditions for the image area according to the shooting information acquired by the acquisition means,
The block matching processing unit searches for an image region corresponding to the target image region based on a search condition set by the setting unit.
参照フレーム画像内の所定の注目画像領域に対応する画像領域を、探索対象フレーム画像から探索させるブロックマッチング処理と、
撮影情報を取得させる取得処理と、
前記取得処理で取得させた撮影情報に応じて、前記画像領域の探索条件を切り換え設定させる設定処理と、を実行させ、
前記ブロックマッチング処理は、前記設定処理で設定させた探索条件に基づいて、前記注目画像領域に対応する画像領域を探索させることを特徴とするプログラム。
On the computer,
A block matching process for searching the search target frame image for an image area corresponding to a predetermined target image area in the reference frame image;
Acquisition processing to acquire shooting information;
A setting process for switching and setting search conditions for the image area according to the shooting information acquired in the acquisition process;
The block matching process searches for an image area corresponding to the target image area based on a search condition set in the setting process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007068849A JP4807582B2 (en) | 2007-03-16 | 2007-03-16 | Image processing apparatus, imaging apparatus, and program thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007068849A JP4807582B2 (en) | 2007-03-16 | 2007-03-16 | Image processing apparatus, imaging apparatus, and program thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008236015A true JP2008236015A (en) | 2008-10-02 |
JP4807582B2 JP4807582B2 (en) | 2011-11-02 |
Family
ID=39908331
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007068849A Expired - Fee Related JP4807582B2 (en) | 2007-03-16 | 2007-03-16 | Image processing apparatus, imaging apparatus, and program thereof |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4807582B2 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011024035A (en) * | 2009-07-16 | 2011-02-03 | Sharp Corp | Motion detection device, image capturing apparatus, method of detecting motion, program, and design method |
JP2011060149A (en) * | 2009-09-11 | 2011-03-24 | Fujifilm Corp | Image analysis apparatus and method, and program |
JP2013088336A (en) * | 2011-10-20 | 2013-05-13 | Ricoh Co Ltd | Speed detection device, moving member carrier unit, and image forming apparatus |
JP2013172320A (en) * | 2012-02-21 | 2013-09-02 | Rhythm Watch Co Ltd | Detection system, signal processing method therefor, and program |
WO2014132349A1 (en) * | 2013-02-27 | 2014-09-04 | 株式会社日立製作所 | Image analysis device, image analysis system, and image analysis method |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08205194A (en) * | 1995-01-24 | 1996-08-09 | Nec Corp | Device for prediction between motion compensated frames |
JPH1098730A (en) * | 1996-09-20 | 1998-04-14 | Nec Corp | Method and device for detecting moving vector |
JP2001057659A (en) * | 1999-08-17 | 2001-02-27 | Nikon Corp | Electronic camera and storage medium recording program for picture reproduction |
JP2002027480A (en) * | 2000-07-10 | 2002-01-25 | Fujitsu Ltd | Moving image processing method and moving image processing apparatus |
JP2003274280A (en) * | 2002-03-14 | 2003-09-26 | Minolta Co Ltd | Electronic camera |
JP2005204076A (en) * | 2004-01-15 | 2005-07-28 | Canon Inc | Encoder and encoding method |
JP2006115470A (en) * | 2004-09-16 | 2006-04-27 | Ntt Docomo Inc | Video evaluation device, frame rate determination device, video process device, video evaluation method, and video evaluation program |
-
2007
- 2007-03-16 JP JP2007068849A patent/JP4807582B2/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08205194A (en) * | 1995-01-24 | 1996-08-09 | Nec Corp | Device for prediction between motion compensated frames |
JPH1098730A (en) * | 1996-09-20 | 1998-04-14 | Nec Corp | Method and device for detecting moving vector |
JP2001057659A (en) * | 1999-08-17 | 2001-02-27 | Nikon Corp | Electronic camera and storage medium recording program for picture reproduction |
JP2002027480A (en) * | 2000-07-10 | 2002-01-25 | Fujitsu Ltd | Moving image processing method and moving image processing apparatus |
JP2003274280A (en) * | 2002-03-14 | 2003-09-26 | Minolta Co Ltd | Electronic camera |
JP2005204076A (en) * | 2004-01-15 | 2005-07-28 | Canon Inc | Encoder and encoding method |
JP2006115470A (en) * | 2004-09-16 | 2006-04-27 | Ntt Docomo Inc | Video evaluation device, frame rate determination device, video process device, video evaluation method, and video evaluation program |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011024035A (en) * | 2009-07-16 | 2011-02-03 | Sharp Corp | Motion detection device, image capturing apparatus, method of detecting motion, program, and design method |
JP2011060149A (en) * | 2009-09-11 | 2011-03-24 | Fujifilm Corp | Image analysis apparatus and method, and program |
JP2013088336A (en) * | 2011-10-20 | 2013-05-13 | Ricoh Co Ltd | Speed detection device, moving member carrier unit, and image forming apparatus |
JP2013172320A (en) * | 2012-02-21 | 2013-09-02 | Rhythm Watch Co Ltd | Detection system, signal processing method therefor, and program |
WO2014132349A1 (en) * | 2013-02-27 | 2014-09-04 | 株式会社日立製作所 | Image analysis device, image analysis system, and image analysis method |
JP6005837B2 (en) * | 2013-02-27 | 2016-10-12 | 株式会社日立製作所 | Image analysis apparatus, image analysis system, and image analysis method |
Also Published As
Publication number | Publication date |
---|---|
JP4807582B2 (en) | 2011-11-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11012614B2 (en) | Image processing device, image processing method, and program | |
JP4872797B2 (en) | Imaging apparatus, imaging method, and imaging program | |
JP5159515B2 (en) | Image processing apparatus and control method thereof | |
JP6157242B2 (en) | Image processing apparatus and image processing method | |
US10630891B2 (en) | Image processing apparatus, image processing method, and program | |
US8988535B2 (en) | Photographing control method and apparatus according to motion of digital photographing apparatus | |
JP2008009263A (en) | Imaging apparatus and program thereof | |
TW201351980A (en) | Image processing device, image processing method, program | |
JP2009177503A (en) | Imaging apparatus | |
JP2012120151A (en) | Image capturing apparatus, image capturing control method, and program | |
JP2008017169A (en) | Electronic camera | |
JP2004349750A (en) | Digital camera and control method therefor | |
JP4807582B2 (en) | Image processing apparatus, imaging apparatus, and program thereof | |
JP2009089220A (en) | Imaging apparatus | |
JP5217451B2 (en) | Imaging device | |
JP4716266B2 (en) | Image processing apparatus, imaging apparatus, and program thereof | |
JP6645711B2 (en) | Image processing apparatus, image processing method, and program | |
JP4807623B2 (en) | Imaging apparatus, imaging method, and imaging program | |
JP2001255451A (en) | Automatic focusing device, digital camera and portable information input device | |
JP5278483B2 (en) | Imaging apparatus, imaging method, and imaging program | |
JP5451364B2 (en) | Subject tracking device and control method thereof | |
JP2008048152A (en) | Moving picture processing apparatus, moving picture photographing apparatus and moving picture photographing program | |
JP2014064061A (en) | Imaging apparatus and control method thereof | |
JP5182395B2 (en) | Imaging apparatus, imaging method, and imaging program | |
JP5332668B2 (en) | Imaging apparatus and subject detection program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100303 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110426 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110623 |
|
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: 20110721 |
|
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: 20110803 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140826 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4807582 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 |