JP2007318292A - Motion vector detector and its program - Google Patents

Motion vector detector and its program Download PDF

Info

Publication number
JP2007318292A
JP2007318292A JP2006143861A JP2006143861A JP2007318292A JP 2007318292 A JP2007318292 A JP 2007318292A JP 2006143861 A JP2006143861 A JP 2006143861A JP 2006143861 A JP2006143861 A JP 2006143861A JP 2007318292 A JP2007318292 A JP 2007318292A
Authority
JP
Japan
Prior art keywords
motion vector
frame data
block
current frame
search range
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006143861A
Other languages
Japanese (ja)
Inventor
Toshiya Kiso
俊也 木曽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2006143861A priority Critical patent/JP2007318292A/en
Publication of JP2007318292A publication Critical patent/JP2007318292A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a motion vector detector and its program capable of detecting blurring while alleviating too much burden. <P>SOLUTION: When blurring detection processing is started, a frame interval (frame rate) of frames photographed in moving video by a CCD3 is acquired (S1), and the width of a searching area corresponding to the acquired frame rate is established based on a searching area graph table memorized at a memory 8 (S2). Then, a frame rate in photographing is acquired from the CCD3, and a motion vector of the acquired frame rate is detected within the established width of the searching area by a block matching method (S4). Then, it is determined whether the blurring detection processing should be ended or not (S5). When it is determined that the processing should not be ended, it is determined whether the searching area should be adjusted or not based on the detected motion vector and the established width of the searching area (S6). The width of the searching area is reestablished if necessary (S7). <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、動きベクトル検出装置及びそのプログラムに係り、詳しくは、動きベクトルを検出する動きベクトル検出装置及びそのプログラムに関する。   The present invention relates to a motion vector detection device and a program thereof, and more particularly to a motion vector detection device and a program thereof that detect a motion vector.

従来、画像データから動きベクトルを算出し、該算出した動きベクトルに基づいて画像データのトリミング位置を決定して画像データを切り出すことによりブレを補正するという技術がある(特許文献1)。   Conventionally, there is a technique of correcting motion blur by calculating a motion vector from image data, determining a trimming position of the image data based on the calculated motion vector, and cutting out the image data (Patent Document 1).

また、この動きベクトルの算出方法として、代表的なものとしてブロックマッチング法というものがあり、特許文献2に示すように、M×N画素を1ブロックとして、現在のフレームデータを複数のブロックに区分けする。
そして、図6(a)に示すように、現フレームデータ21のある1つのブロック23と、1つ前のフレームデータ(前フレームデータ)22の探索範囲24内にある探索ブロック25(M×N画素)とを用いて動きベクトルを算出する。
As a representative method for calculating the motion vector, there is a block matching method. As shown in Patent Document 2, M × N pixels are used as one block, and current frame data is divided into a plurality of blocks. To do.
Then, as shown in FIG. 6A, one block 23 having the current frame data 21 and a search block 25 (M × N) within the search range 24 of the previous frame data (previous frame data) 22. The motion vector is calculated using (pixel).

この動きベクトルの算出方法として、現フレームデータ21のブロック23と同じ位置に探索ブロック25を前フレームデータ内に位置させ、そのときの、ブロック23の各画素値と探索ブロック25の各画素値との差分の絶対値の総和を求める。この求めた総和の値がブロック評価値となる。
そして、図6(b)に示すように探索ブロックを右に1画素、下に1画素移動させ、そのときの、ブロック23の各画素値と探索ブロック25の画素値との差分の絶対値の総和からブロック評価値を求めるというように、探索ブロック25を探索範囲24内で移動させ、そのときのブロック評価値を求める。
As a method of calculating the motion vector, the search block 25 is positioned in the previous frame data at the same position as the block 23 of the current frame data 21, and each pixel value of the block 23 and each pixel value of the search block 25 at that time Find the sum of absolute values of the differences. The calculated sum value is the block evaluation value.
Then, as shown in FIG. 6B, the search block is moved one pixel to the right and one pixel down, and the absolute value of the difference between each pixel value of the block 23 and the pixel value of the search block 25 at that time The search block 25 is moved within the search range 24 so that the block evaluation value is obtained from the sum, and the block evaluation value at that time is obtained.

そして、求めたブロック評価値がもっとも最小値となる探索ブロック25の位置が現フレームデータ21のブロック23と一致すると判断し、つまり、ブロック評価値がもっとも最小値となる探索ブロック25の位置のブロックが現フレームデータの21と最も相関度の高いブロックと判断され、該ブロック23と一致すると判断された探索ブロック25の位置に基づいて、現フレームデータ21のブロック23の動きベクトルを算出する。
このような動作を、現フレームデータ21の区分けされた全てのブロックに対して行うことにより、区分けされた全てのブロックの動きベクトルを算出し、該算出した各ブロックの動きベクトルに基づいて現フレームデータ21の動きベクトルを算出するというものである。
Then, it is determined that the position of the search block 25 having the smallest block evaluation value is the same as the block 23 of the current frame data 21, that is, the block at the position of the search block 25 having the smallest block evaluation value. Is determined to be the block having the highest correlation with 21 of the current frame data, and the motion vector of the block 23 of the current frame data 21 is calculated based on the position of the search block 25 determined to match the block 23.
By performing such an operation on all the divided blocks of the current frame data 21, the motion vector of all the divided blocks is calculated, and the current frame is calculated based on the calculated motion vector of each block. The motion vector of the data 21 is calculated.

公開特許公報 特開平10−136304号Japanese Patent Laid-Open No. 10-136304

公開特許公報 特開2005−202921Japanese Patent Laid-Open No. 2005-202921

しかしながら、上記技術によれば、探索範囲は一律であるため、画質、例えば、フレームレートが早い場合には、フレームの動きベクトルを算出する処理負担が大きくなるという問題がある。また、フレームレートが早い場合は、低い場合に比べ、フレーム間でのブレ量が少なく、無駄な処理を行なっている場合もある。   However, according to the above technique, since the search range is uniform, when the image quality, for example, the frame rate is high, there is a problem that the processing load for calculating the motion vector of the frame becomes large. In addition, when the frame rate is high, there is a case where the amount of blur between frames is small compared to the case where the frame rate is low and wasteful processing is performed.

そこで本発明は、かかる従来の問題点に鑑みてなされたものであり、過度の負担を軽減してブレを検出することができる動きベクトル検出装置及びそのプログラムを提供することを目的とする。   Therefore, the present invention has been made in view of such a conventional problem, and an object of the present invention is to provide a motion vector detection device and a program thereof that can detect blurring while reducing an excessive burden.

上記目的達成のため、請求項1記載の発明による動きベクトル検出装置は、現フレームデータを複数のブロックに区分けし、現フレームデータのブロックに対応する前フレームデータの探索範囲内で、該現フレームデータのブロックと相関度が最も高いブロックを検出することにより、該現フレームデータのブロックの動きベクトルを検出する動きベクトル検出装置であって、
画像の画質情報を取得する画質情報取得手段と、
前記画質情報取得手段により取得された画質情報に応じて、前記探索範囲の広さを設定する設定手段と、
前記設定手段により設定された探索範囲の広さ内で、現フレームデータのブロックと相関度の最も高いブロックを検出することにより、該現フレームデータのブロックの動きベクトルを検出する動きベクトル検出手段と、
を備えたことを特徴とする。
In order to achieve the above object, a motion vector detecting apparatus according to the first aspect of the present invention divides current frame data into a plurality of blocks, and the current frame data is searched within a search range of previous frame data corresponding to the block of the current frame data. A motion vector detecting device for detecting a motion vector of a block of the current frame data by detecting a block having the highest correlation with the block of data,
Image quality information acquisition means for acquiring image quality information of an image;
Setting means for setting the width of the search range according to the image quality information acquired by the image quality information acquisition means;
Motion vector detecting means for detecting a motion vector of a block of the current frame data by detecting a block having the highest degree of correlation with the block of the current frame data within the range of the search range set by the setting means; ,
It is provided with.

また、例えば、請求項2に記載されているように、前記取得手段は、
画像の画質情報として、フレームレートの速さを取得し、
前記設定手段は、
前記フレームレートの速さに応じて探索範囲を可変設定するようにしてもよい。
For example, as described in claim 2, the acquisition unit includes:
Get the frame rate speed as the image quality information,
The setting means includes
The search range may be variably set according to the speed of the frame rate.

また、例えば、請求項3に記載されているように、前記設定手段は、
前記フレームレートが速い場合には探索範囲を狭く設定し、前記フレームレートが遅い場合には探索範囲を広く設定するようにしてもよい。
For example, as described in claim 3, the setting unit includes:
The search range may be set narrow when the frame rate is high, and the search range may be set wide when the frame rate is slow.

また、例えば、請求項4に記載されているように、前記動きベクトル検出手段により検出されたブロックの動きベクトルの大きさに基づいて、前記設定手段により設定された探索範囲の広さを調整する調整手段を備えるようにしてもよい。   Further, for example, as described in claim 4, the size of the search range set by the setting unit is adjusted based on the magnitude of the motion vector of the block detected by the motion vector detection unit. You may make it provide an adjustment means.

また、例えば、請求項5に記載されているように、被写体の動画を撮像する動画撮像手段を備え、
前記動きベクトル検出手段は、
前記動画撮像手段により撮像された動画データに基づいて、フレームデータのブロックの動きベクトルを検出するようにしてもよい。
Further, for example, as described in claim 5, a moving image capturing unit that captures a moving image of a subject is provided,
The motion vector detecting means includes
A motion vector of a block of frame data may be detected based on moving image data picked up by the moving image pickup means.

また、例えば、請求項6に記載されているように、記録されている動画データを取得する動画取得手段を備え、
前記動きベクトル検出手段は、
前記動画データ取得手段により取得された動画データに基づいて、フレームデータのブロックの動きベクトルを検出するようにしてもよい。
Further, for example, as described in claim 6, a moving image acquisition means for acquiring recorded moving image data is provided,
The motion vector detecting means includes
You may make it detect the motion vector of the block of frame data based on the moving image data acquired by the said moving image data acquisition means.

また、例えば、請求項7に記載されているように、前記動きベクトル検出手段は、
補間画素を含むフレームデータに基づいて、現フレームデータのブロックの動きベクトルを検出する場合は、補間画素以外の画素を用いて該ブロックの動きベクトルを検出するようにしてもよい。
For example, as described in claim 7, the motion vector detection unit includes:
When detecting the motion vector of the block of the current frame data based on the frame data including the interpolation pixel, the motion vector of the block may be detected using a pixel other than the interpolation pixel.

また、例えば、請求項8に記載されているように、前記動きベクトル検出手段は、
現フレームデータの複数のブロックの動きベクトルを検出するようにしてもよい。
For example, as described in claim 8, the motion vector detection unit includes:
You may make it detect the motion vector of several blocks of the present frame data.

また、例えば、請求項9に記載されているように、前記動きベクトル検出手段により検出された各ブロックの動きベクトルに基づいて前記現フレームデータの動きベクトルを算出する算出手段を備えるようにしてもよい。   Further, for example, as described in claim 9, calculation means for calculating a motion vector of the current frame data based on a motion vector of each block detected by the motion vector detection means may be provided. Good.

また、例えば、請求項10に記載されているように、前記算出手段は、
前記各ブロックの動きベクトルに基づいて算出された各ブロックの動きベクトルの平均値又は動きベクトルの加重平均値、又は、前記各ブロックの動きベクトルのヒストグラムが最大となる動きベクトルを、現フレームデータの動きベクトルとするようにしてもよい。
Further, for example, as described in claim 10, the calculation means includes:
The average value of the motion vectors of each block or the weighted average value of the motion vectors calculated based on the motion vector of each block, or the motion vector that maximizes the histogram of the motion vector of each block is represented in the current frame data. A motion vector may be used.

また、例えば、請求項11に記載されているように、前記算出手段により算出された現フレームデータの動きベクトルに基づいてトリミングされた現フレームデータを表示手段に表示させる表示制御手段を備え、
前記表示制御手段は、
前記算出手段により算出された現フレームデータの動きベクトルが所定値以下の場合は、現フレームデータを表示せずに、既に表示されているトリミングされた前フレームデータをそのまま表示させるようにしてもよい。
Further, for example, as described in claim 11, the display control means for displaying the current frame data trimmed based on the motion vector of the current frame data calculated by the calculation means on the display means,
The display control means includes
When the motion vector of the current frame data calculated by the calculating means is less than or equal to a predetermined value, the trimmed previous frame data that is already displayed may be displayed as it is without displaying the current frame data. .

また、例えば、請求項12に記載されているように、前記算出手段により算出された現フレームデータの動きベクトルに基づいてトリミングされた現フレームデータを記録手段に記録する記録制御手段を備え、
前記記録制御手段は、
前記算出手段により算出された現フレームデータの動きベクトルが所定値以下の場合は、現フレームデータの替わりに、既に記録したトリミングされた前フレームデータを続けて記録させるようにしてもよい。
Further, for example, as described in claim 12, the recording control means for recording the current frame data trimmed based on the motion vector of the current frame data calculated by the calculation means in the recording means,
The recording control means includes
When the motion vector of the current frame data calculated by the calculating means is less than or equal to a predetermined value, the previously recorded trimmed previous frame data may be continuously recorded instead of the current frame data.

上記目的達成のため、請求項13記載の発明によるプログラムは、現フレームデータを複数のブロックに区分けし、現フレームデータのブロックに対応する前フレームデータの探索範囲内で、該現フレームデータのブロックと相関度が最も高いブロックを検出することにより、該現フレームデータのブロックの動きベクトルを検出する動きベクトル検出装置を実行させるためのプログラムであって、
画像の画質情報を取得する画質情報取得処理と、
前記画質情報取得手段により取得された画質情報に応じて、前記探索範囲の広さを設定する設定処理と、
前記設定処理により設定された探索範囲の広さ内で、現フレームデータのブロックと相関度の最も高いブロックを検出することにより、該現フレームデータのブロックの動きベクトルを検出する動きベクトル検出処理と、
を含み、上記各処理を実行することを特徴とする。
In order to achieve the above object, a program according to the invention described in claim 13 divides current frame data into a plurality of blocks, and blocks the current frame data within a search range of previous frame data corresponding to the current frame data block. And a program for executing a motion vector detecting device for detecting a motion vector of a block of the current frame data by detecting a block having the highest degree of correlation with
Image quality information acquisition processing for acquiring image quality information of the image;
A setting process for setting the width of the search range according to the image quality information acquired by the image quality information acquisition means;
A motion vector detection process for detecting a motion vector of a block of the current frame data by detecting a block having the highest degree of correlation with the block of the current frame data within the search range set by the setting process; ,
And each of the above processes is executed.

本発明によれば、画質に応じて探索範囲の広さを変えて動画のフレームデータのブロックの動きベクトルを検出するようにしたので、無駄な処理を行うことがなく、処理負担を軽減することができる。   According to the present invention, since the motion vector of the block of the frame data of the moving image is detected by changing the size of the search range according to the image quality, the processing load is reduced without performing unnecessary processing. Can do.

以下、本実施の形態について、本発明の動きベクトル検出装置をデジタルカメラに適用した一例として図面を参照して詳細に説明する。
[第1の実施の形態]
A.デジタルカメラの構成
図1は、本発明の動きベクトル検出装置を実現するデジタルカメラ1の電気的な概略構成を示すブロック図である。
デジタルカメラ1は、撮影レンズ2、CCD3、垂直ドライバ4、TG(timing
generator)5、ユニット回路6、DMAコントローラ(以下、DMAという)7、メモリ8、DMA9、画像生成部10、DMA11、DMA12、表示部13、DMA14、圧縮部15、DMA16、フラッシュメモリ17、CPU18、キー入力部19、バス20を備えている。
Hereinafter, the present embodiment will be described in detail with reference to the drawings as an example in which the motion vector detection device of the present invention is applied to a digital camera.
[First embodiment]
A. Configuration of Digital Camera FIG. 1 is a block diagram showing a schematic electrical configuration of a digital camera 1 that implements the motion vector detection device of the present invention.
The digital camera 1 includes a taking lens 2, a CCD 3, a vertical driver 4, a TG (timing
generator) 5, unit circuit 6, DMA controller (hereinafter referred to as DMA) 7, memory 8, DMA 9, image generation unit 10, DMA 11, DMA 12, display unit 13, DMA 14, compression unit 15, DMA 16, flash memory 17, CPU 18, A key input unit 19 and a bus 20 are provided.

撮影レンズ2は、被写体の光をCCD3に投影させるものであり、CCD3は、垂直ドライバ4によって走査駆動され、一定周期毎に投影された被写体の光の強さを光電変換して撮像信号(画像データ)としてユニット回路6に出力する。ここでは、CCD3は、ベイヤー配列の色フィルタを有しているので、投影された被写体の光はRGB値の各色の光の量に光電変換される。この垂直ドライバ4、ユニット回路6の動作タイミングはTG5を介してCPU18により制御される。   The photographing lens 2 projects the light of the subject onto the CCD 3, and the CCD 3 is scan-driven by the vertical driver 4, and photoelectrically converts the intensity of the light of the subject projected at a fixed period to obtain an imaging signal (image). Data) to the unit circuit 6. Here, since the CCD 3 has a Bayer array color filter, the projected light of the subject is photoelectrically converted into the amount of light of each color of RGB values. The operation timing of the vertical driver 4 and the unit circuit 6 is controlled by the CPU 18 via the TG 5.

ユニット回路6にはTG5が接続されており、CCD3から出力される撮像信号を相関二重サンプリングして保持するCDS(Correlated Double Sampling)回路、そのサンプリング後の撮像信号の自動利得調整を行うAGC(Automatic Gain Control)回路、その自動利得調整後のアナログの撮像信号をデジタル信号に変換するA/D変換器から構成されており、CCD3の撮像信号は、ユニット回路6を経た後、DMA7によってベイヤーデータの状態でメモリ8に記憶される。   A TG 5 is connected to the unit circuit 6, a CDS (Correlated Double Sampling) circuit that holds the imaged signal output from the CCD 3 by correlated double sampling, and an AGC (AGC (automatic gain adjustment) for the imaged signal after the sampling. Automatic gain control) circuit and an A / D converter that converts the analog image pickup signal after the automatic gain adjustment into a digital signal. The image pickup signal of the CCD 3 passes through the unit circuit 6 and is then transferred to the Bayer data by the DMA 7. Is stored in the memory 8.

メモリ8は、少なくともCCD3によって撮像された連続する2フレーム分の画像データを記憶させておく。つまり、メモリ8に新たなフレームデータが記憶されても、1つ前のフレームデータはそのまま保持されている。例えば、3枚目のフレームデータが記憶されても、2枚目のフレームデータはそのまま記憶されており、4枚目のフレームデータが記憶されると、2枚目のフレームデータの記憶を消去してもよいようになっている。   The memory 8 stores at least image data for two consecutive frames imaged by the CCD 3. That is, even when new frame data is stored in the memory 8, the previous frame data is held as it is. For example, even if the third frame data is stored, the second frame data is stored as it is, and when the fourth frame data is stored, the second frame data is erased. It ’s okay.

DMA9は、CPU18によって決められた切り出し範囲(トリミング範囲)に基づいて、メモリ8に新たに記憶されたべイヤーデータを切り出して読出し、画像生成部10に出力する。
画像生成部10は、DMA9から送られてきたベイヤーデータの画像データに対して、画素補間処理、γ補正、ホワイトバランス処理等を施すとともに、輝度色差信号(YUVデータ)を生成する処理を行う。
DMA11は、画像生成部10で生成された輝度色差信号の画像データを、メモリ8に記憶させる。このとき、上記ベイヤーデータとは別の領域に輝度色差信号の画像データを記憶させる。
The DMA 9 cuts out and reads out the Bayer data newly stored in the memory 8 based on the cut-out range (trimming range) determined by the CPU 18 and outputs it to the image generation unit 10.
The image generation unit 10 performs pixel interpolation processing, γ correction, white balance processing, and the like on the image data of the Bayer data sent from the DMA 9, and performs processing for generating a luminance color difference signal (YUV data).
The DMA 11 stores in the memory 8 the image data of the luminance color difference signal generated by the image generation unit 10. At this time, the image data of the luminance color difference signal is stored in a region different from the Bayer data.

DMA12は、メモリ8に記憶されているYUVデータの画像データを読出し、表示部13に出力する。
表示部13は、カラーLCDとその駆動回路を含み、DMA12から出力された画像データを表示させる。
The DMA 12 reads the image data of YUV data stored in the memory 8 and outputs it to the display unit 13.
The display unit 13 includes a color LCD and its driving circuit, and displays the image data output from the DMA 12.

DMA14は、動画撮影記録時は、メモリ8に記憶されているYUVデータの画像データや圧縮された画像データ(圧縮画像データ)を圧縮部15に出力したり、圧縮部15により圧縮された画像データや、伸張された画像データをメモリ8に記憶させたりする。
圧縮部15は、画像データの圧縮・伸張(例えば、MPEG形式の圧縮・伸張)を行なう部分である。
DMA16は、メモリ8に記憶された圧縮画像データを読み出して、フラッシュメモリ17に記録したり、フラッシュメモリ17に記録された圧縮画像データをメモリ8に記憶させる。
The DMA 14 outputs image data of YUV data or compressed image data (compressed image data) stored in the memory 8 to the compression unit 15 or image data compressed by the compression unit 15 during moving image shooting / recording. Or, the decompressed image data is stored in the memory 8.
The compression unit 15 is a part that performs compression / decompression of image data (for example, compression / decompression of MPEG format).
The DMA 16 reads the compressed image data stored in the memory 8 and records it in the flash memory 17 or stores the compressed image data recorded in the flash memory 17 in the memory 8.

CPU18は、デジタルカメラ1の各部を制御する機能を有するワンチップマイコンからなり、特に本発明の特徴部分となるフレームデータの動きベクトルを算出する機能を有する。
キー入力部19は、シャッタボタン、モード切替キー、セットキー等の複数の操作キーを含み、ユーザのキー操作に対応した操作信号をCPU18に出力する。
メモリ8は、さらに、CPU18の制御に必要なプログラム、及び必要なデータが記録されているとともに、フレームレートの速さに応じた探索範囲をグラフ化した探索範囲グラフ化テーブルも格納されている。この探索範囲グラフ化テーブルについては後述する。
The CPU 18 is composed of a one-chip microcomputer having a function of controlling each unit of the digital camera 1, and particularly has a function of calculating a motion vector of frame data that is a characteristic part of the present invention.
The key input unit 19 includes a plurality of operation keys such as a shutter button, a mode switching key, and a set key, and outputs an operation signal corresponding to a user key operation to the CPU 18.
The memory 8 further stores a program and necessary data necessary for the control of the CPU 18, and also stores a search range graphing table in which a search range corresponding to the frame rate is graphed. This search range graphing table will be described later.

B.デジタルカメラ1の動作
実施の形態におけるデジタルカメラ1の動作を図2のフローチャートに従って説明する。
B. Operation of Digital Camera 1 The operation of the digital camera 1 in the embodiment will be described with reference to the flowchart of FIG.

ブレ検出処理を開始すると、CPU18は、CCD3のフレームレートを取得する(ステップS1)。このとき、CCD3による所定のフレームレートで被写体の撮像が行なわれており(スルー画像表示や動画記録撮影などの動画撮像処理が行なわれており)、該CCD3のフレームレートを取得する。このフレームレートは、ユーザによって画質設定モードにより設定された画質に応じたフレームレートを取得する。なお、画質の設定にかかわらずに個別にフレームレートをユーザが設定できるようにしてもよい。   When the blur detection process is started, the CPU 18 acquires the frame rate of the CCD 3 (step S1). At this time, the subject is imaged at a predetermined frame rate by the CCD 3 (moving image imaging processing such as through image display and moving image recording is performed), and the frame rate of the CCD 3 is acquired. As the frame rate, a frame rate corresponding to the image quality set by the user in the image quality setting mode is acquired. Note that the user may be able to individually set the frame rate regardless of the image quality setting.

次いで、CPU18は、探索範囲グラフ化テーブルに基づいて、該取得したフレームレートに対応する探索範囲の広さを設定する(ステップS2)。
図3は、メモリ8に記憶されている探索範囲グラフ化テーブルの様子を示すものである。
図3を見るとわかるように、フレームレートが速い(高い)場合には(撮像されるフレームの間隔が短い場合には)探索範囲が狭くなり(小さくなり)、フレームレートが遅く(低く)なるにつれて(撮像されるフレームの間隔が長くなるにつれて)探索範囲が広くなっている(大きくなっている)。
Next, the CPU 18 sets the size of the search range corresponding to the acquired frame rate based on the search range graphing table (step S2).
FIG. 3 shows the state of the search range graphing table stored in the memory 8.
As can be seen from FIG. 3, when the frame rate is fast (high) (when the interval between frames to be captured is short), the search range becomes narrow (small) and the frame rate slows (low). The search range becomes wider (becomes larger) as the interval between captured frames becomes longer.

次いで、CPU18は、CCDから出力され、ユニット回路6、DMA7を介してメモリ8に新たに記憶されたフレームデータを取得し(ステップS3)、該設定された探索範囲の広さで、ブロックマッチング法により該取得したフレームデータの動きベクトルを検出する(ステップS4)。
具体的に説明すると、新たに取得したフレームデータ(現フレームデータ)をブロック毎に区分けし、該区分けされた各ブロックに対応するメモリ8に記憶されている1つ前のフレームデータの該設定された広さでの探索範囲内で探索ブロックを移動させることにより、該区分けされた各ブロックと最も相関度の高いブロックを検出することにより現フレームデータの各ブロックの動きベクトルを検出し、該検出された現フレームデータの各ブロックの動きベクトルに基づいて現フレームデータの動きベクトルを検出する。
Next, the CPU 18 obtains the frame data output from the CCD and newly stored in the memory 8 via the unit circuit 6 and the DMA 7 (step S3), and the block matching method is performed with the set search range width. Thus, a motion vector of the acquired frame data is detected (step S4).
More specifically, the newly acquired frame data (current frame data) is divided for each block, and the setting of the previous frame data stored in the memory 8 corresponding to each of the divided blocks is set. The motion vector of each block of the current frame data is detected by detecting the block having the highest correlation with each of the divided blocks by moving the search block within the search range of a wide area, and the detection The motion vector of the current frame data is detected based on the motion vector of each block of the current frame data.

図4は、フレームレートの速さ(高さ)に応じて設定される探索範囲の広さの様子を示す一例である。
図4の21は現フレームデータであり、22は1つ前のフレームデータ、23は現フレームデータの区分けされたある1つのブロックであり、24は該ブロック23に対応する探索範囲であり、25は探索ブロックを示す。
図4(a)は、フレームレートが遅いとき(例えば、フレームレートの速さが15fps(1秒間に15フレーム))の探索範囲の広さの様子を示し、(b)は、フレームレートが割りと速いとき(例えば、フレームレートの速さが30fps)の探索範囲の広さを示している。図4の(a)と(b)とを見比べると、フレームレートの速さに応じて探索範囲の広さが変わっていることがわかる。
FIG. 4 is an example showing how the search range is set according to the speed (height) of the frame rate.
In FIG. 4, 21 is the current frame data, 22 is the previous frame data, 23 is one block into which the current frame data is divided, 24 is the search range corresponding to the block 23, 25 Indicates a search block.
FIG. 4 (a) shows how the search range is wide when the frame rate is low (for example, the frame rate is 15 fps (15 frames per second)). The search range is wide when it is fast (for example, the frame rate is 30 fps). Comparing (a) and (b) of FIG. 4, it can be seen that the search range changes depending on the speed of the frame rate.

このように、フレームレートが遅い(低い)場合には撮像されるフレームの撮像間隔も長いため、1つ前のフレームと現フレームとの間では被写体ブレ、手振れなどのブレが大きくなりやすいので探索範囲を広く設定し、フレームレートが速い場合には撮像されるフレームの撮像間隔も短いため、1つ前のフレームと現フレームとの間では被写体ブレ、手振れなどのブレが小さいので探索範囲を狭くし、もって無駄な処理を行わずに、CPU18の処理負担を軽減させることが可能となる。   As described above, when the frame rate is low (low), the imaging interval of the frames to be imaged is long, so that blurring such as subject blurring and camera shake tends to increase between the previous frame and the current frame. If the range is set wide and the frame rate is fast, the imaging interval of the frames to be captured is also short, so subject blur, camera shake, etc. are small between the previous frame and the current frame, so the search range is narrow Therefore, it is possible to reduce the processing load on the CPU 18 without performing useless processing.

また、検出された現フレームの各ブロックの動きベクトルから現フレームの動きベクトルの検出方法として、各ブロックの動きベクトルを単に平均したものを現フレームの動きベクトルとするようにしてもよいし、各ブロックの動きベクトルを加重平均したものを現フレームの動きベクトルとするようにしてもよい。また、各ブロックの動きベクトルのヒストグラム(各ブロックの動きベクトルを、動きベクトルの軸とブロックの数の軸で表したグラフ)に基づいて、最大となる動きベクトルを現フレームの動きベクトル、つまり、各ブロックの動きベクトルのうち、一番多かった動きベクトルを現フレームの動きベクトルとするようにしてもよい。要は、各ブロックの動きベクトルからフレームの動きベクトルを検出方法であればよい。   Further, as a method of detecting the motion vector of the current frame from the detected motion vector of each block of the current frame, a simple average of the motion vectors of each block may be used as the motion vector of the current frame. A weighted average of the motion vectors of the blocks may be used as the motion vector of the current frame. Also, based on the motion vector histogram of each block (a graph representing the motion vector of each block with the motion vector axis and the number of blocks), the maximum motion vector is the motion vector of the current frame, that is, Of the motion vectors of each block, the motion vector having the largest number may be used as the motion vector of the current frame. In short, any method may be used as long as it detects a frame motion vector from the motion vector of each block.

次いで、CPU18は、ブレ検出処理を終了するか否かの判断を行う(ステップS5)この判断は、スルー画像表示が終了し静止画撮影が行なわれた場合や動画記録撮影が終了された場合、更にユーザのキー入力部19の操作によりブレ検出処理を中止する旨の操作信号が送られてきた場合などは、ブレ検出処理を終了すると判断する。
ステップS5で、ブレ検出処理を終了しないと判断すると、CPU18は、探索範囲の広さ(大きさ)の調整が必要か否かを判断する(ステップS6)。この判断は、検出したフレームの動きベクトルの大きさと、探索範囲の広さとに基づいて判断する。つまり、検出された動きベクトルの大きさを探索範囲の広さにフィードバックさせる必要させるか否かで判断する。
Next, the CPU 18 determines whether or not to end the blur detection process (step S5). This determination is made when the through image display is ended and the still image shooting is performed or when the moving image recording shooting is ended. Further, when an operation signal for stopping the shake detection process is sent by the user's operation of the key input unit 19, it is determined that the shake detection process is to be ended.
If it is determined in step S5 that the blur detection process is not to be terminated, the CPU 18 determines whether or not it is necessary to adjust the size (size) of the search range (step S6). This determination is made based on the magnitude of the detected motion vector of the frame and the search range. That is, the determination is made based on whether or not it is necessary to feed back the magnitude of the detected motion vector to the size of the search range.

例えば、動きベクトルの大きさによっては探索範囲を超えてしまうので、事前に動きベクトルの大きさによって、探索範囲を超えてしまう可能性がある場合には探索範囲の広さの調整が必要と判断する。また、検出された動きベクトルの大きさが探索範囲のより遥かに小さい場合は、不必要な動きベクトルの検出を行なっているので、かかる場合も探索範囲の広さの調整が必要と判断する。   For example, the search range may be exceeded depending on the size of the motion vector, so it is determined that the search range needs to be adjusted if there is a possibility that the search range may be exceeded depending on the size of the motion vector in advance. To do. If the detected motion vector is much smaller than the search range, an unnecessary motion vector is detected. In such a case, it is determined that the search range needs to be adjusted.

ステップS6で、探索範囲の調整が必要でないと判断するとステップS3に戻り、探索範囲の調整が必要であると判断すると探索範囲を再設定して、(ステップS7)、ステップS3に戻る。この探索範囲の再設定は、検出されたフレームの動きベクトルの大きさと既に設定されている探索範囲の広さに基づいて行なう。
例えば、動きベクトルの大きさが探索範囲に超えてしまう可能性がある場合、つまり、探索範囲内であるが動きベクトルの大きさが探索範囲に比べ割と大きい場合は、探索範囲を広く再設定し、動きベクトルの大きさが探索範囲より遥かに小さい場合は探索範囲を狭く設定する。つまり、検出された動きベクトルの大きさを探索範囲の広さにフィードバックさせる。
If it is determined in step S6 that adjustment of the search range is not necessary, the process returns to step S3. If it is determined that adjustment of the search range is necessary, the search range is reset (step S7), and the process returns to step S3. The search range is reset based on the magnitude of the detected motion vector of the frame and the already set search range.
For example, if there is a possibility that the size of the motion vector may exceed the search range, that is, if it is within the search range but the motion vector size is relatively large compared to the search range, the search range is widened again. If the magnitude of the motion vector is much smaller than the search range, the search range is set to be narrow. That is, the magnitude of the detected motion vector is fed back to the search range.

C.以上のように、第1の実施の形態においては、フレームレートの速さに応じて、探索範囲を狭くするようにしたので、無駄な動作を行なわなくて済み、処理負担を軽減することができ、迅速に動きベクトルを検出することができる。
また、実際に検出されたフレームの動きベクトルの大きさに応じて、探索範囲を調整するので、撮影する状態、状況等に実情に沿う探索範囲を設定することができ、無駄な処理を行うことがない。
C. As described above, in the first embodiment, the search range is narrowed according to the speed of the frame rate, so that unnecessary operations are not required and the processing load can be reduced. The motion vector can be detected quickly.
In addition, since the search range is adjusted according to the magnitude of the motion vector of the actually detected frame, the search range can be set according to the actual situation according to the shooting state, situation, etc., and wasteful processing is performed. There is no.

[第2の実施の形態]
次に、第2の実施の形態について説明する。
第2の実施の形態は、検出された動きベクトルを用いて、ブレを補正するというものである。
[Second Embodiment]
Next, a second embodiment will be described.
In the second embodiment, blurring is corrected using a detected motion vector.

D.デジタルカメラ1の動作
第2の実施の形態も、図1に示したものと同様の構成を有するデジタルカメラ1を用いることにより本発明の撮像装置を実現する。
以下、第2の実施の形態のデジタルカメラ1の動作を図5のフローチャートにしたがって説明する。
D. Operation of Digital Camera 1 In the second embodiment, the imaging apparatus of the present invention is realized by using the digital camera 1 having the same configuration as that shown in FIG.
Hereinafter, the operation of the digital camera 1 according to the second embodiment will be described with reference to the flowchart of FIG.

ブレ補正処理が開始されると、CPU18は、CCD3により新たに撮像されメモリ8に記憶されたフレームデータ(現フレームデータ)を取得する(ステップS11)。このとき、CCD3による所定のフレームレートで被写体の撮像が行なわれている(スルー画像表示や動画記録撮影などの動画撮像処理が行なわれている)。   When the blur correction process is started, the CPU 18 acquires frame data (current frame data) newly captured by the CCD 3 and stored in the memory 8 (step S11). At this time, the subject is imaged at a predetermined frame rate by the CCD 3 (moving image capturing processing such as through image display and moving image recording / capturing is performed).

次いで、CPU18は、該取得した現フレームデータの動きベクトルを検出する(ステップS12)。この動きベクトルの検出は、上記第1の実施の形態で示した方法で動きベクトルを検出する。なお、上記第1の実施の形態で示した方法以外の他の方法で検出された動きベクトルであってもよいし、センサジャイロなどにより、検出されたブレ量であってもよい。   Next, the CPU 18 detects a motion vector of the acquired current frame data (step S12). The motion vector is detected by the method described in the first embodiment. It may be a motion vector detected by a method other than the method described in the first embodiment, or may be a shake amount detected by a sensor gyro or the like.

次いで、CPU18は、該取得した現フレームデータの動きベクトルが所定値以下であるか否かを判断する(ステップS13)。この所定値とは0の場合もあり、所定値が0の場合は、動きベクトルが0であるか否かの判断を行うことになる。
ステップS13で、該取得した現フレームデータの動きベクトルが所定値以下でないと判断すると、前回のトリミング位置と該検出した現フレームデータの動きベクトルに基づいてトリミング位置を決定し、該決定したトリミング位置及び予め定められているトリミングサイズに基づいてトリミング範囲を決定する(ステップS14)。
Next, the CPU 18 determines whether or not the acquired motion vector of the current frame data is equal to or less than a predetermined value (step S13). The predetermined value may be 0. When the predetermined value is 0, it is determined whether or not the motion vector is 0.
If it is determined in step S13 that the motion vector of the acquired current frame data is not less than a predetermined value, a trimming position is determined based on the previous trimming position and the detected motion vector of the current frame data, and the determined trimming position A trimming range is determined based on a predetermined trimming size (step S14).

次いで、ステップS15で、CPU18は、DMA9に、該決定されたトリミング範囲に基づいて、メモリ8に記憶された現フレームデータを切り出して読み出させ、画像生成部10によって生成された輝度色差信号の画像データを、DMA11、DMA12を介して表示部13に表示させて(動画記録撮影の場合には、表示させた該画像データを記録するようにしてもよい)、ステップS17に進む。   Next, in step S15, the CPU 18 causes the DMA 9 to cut out and read out the current frame data stored in the memory 8 based on the determined trimming range, and the luminance color difference signal generated by the image generation unit 10 is read out. The image data is displayed on the display unit 13 via the DMAs 11 and 12 (in the case of moving image recording, the displayed image data may be recorded), and the process proceeds to step S17.

一方、ステップS13で、該取得した現フレームデータの動きベクトルが所定値以下であると判断すると、殆どブレ(1つ前のフレームの画像を基準にした現フレームのブレのことをいう)は発生していないので、ステップS16で、既に表示させたトリミングされた前フレームデータをそのまま表示させて(動画記録撮影の場合には、現フレームデータの替わりに、既に記録したトリミングされた前フレームデータを続けて記録するようにしてもよい)、ステップS17に進む。これにより、動きベクトルが所定値以下の場合は、トリミング処理や画像処理などを行なわなくて済み処理が軽減することができる。   On the other hand, when it is determined in step S13 that the motion vector of the acquired current frame data is equal to or less than a predetermined value, most of the blur (refers to blur of the current frame based on the image of the previous frame) occurs. In step S16, the trimmed previous frame data already displayed is displayed as it is (in the case of moving image recording, the trimmed previous frame data already recorded is used instead of the current frame data). Recording may be continued), and the process proceeds to step S17. As a result, when the motion vector is equal to or smaller than the predetermined value, the trimming process and the image process are not performed, and the completed process can be reduced.

ステップS17に進むと、CPU18は、ブレ補正処理を終了するか否かを判断し、ブレ補正処理を終了しないと判断するとステップS11に戻り、新たに撮像されたフレームデータを取得する。この判断は、スルー画像表示が終了し静止画撮影が行なわれた場合や動画記録撮影が終了された場合、更にユーザのキー入力部19の操作によりブレ補正処理を中止する旨の操作信号が送られてきた場合などは、ブレ補正処理を終了すると判断する。   In step S17, the CPU 18 determines whether or not to end the blur correction process. If it determines not to end the blur correction process, the CPU 18 returns to step S11 and acquires newly captured frame data. This determination is made when an operation signal indicating that the camera shake correction processing is to be stopped is transmitted by the user's operation of the key input unit 19 when the through image display is finished and the still image shooting is performed or the moving image recording shooting is ended. If it has been received, it is determined that the blur correction process is to be terminated.

E.以上のように、第2の実施の形態においては、CCD3により新たに撮像され、取得した現フレームデータの動きベクトルが所定値以下の場合は、現フレームデータをトリミングして表示(記録)させるという動作を行わずに、既に表示したトリミングされた前フレームデータをそのまま継続して表示(記録)させるので、補正処理の負担を軽減することができる。 E. As described above, in the second embodiment, when the motion vector of the current frame data newly captured by the CCD 3 and acquired is below a predetermined value, the current frame data is trimmed and displayed (recorded). Since the previously displayed trimmed previous frame data is continuously displayed (recorded) as it is without performing the operation, the burden of the correction process can be reduced.

[変形例]
F.上記各実施の形態は以下のような変形例も可能である。
(1)上記各実施の形態においては、動画撮像時において説明したが動画再生時に適用してもよい。つまり、第1の実施の形態においては、動画再生時には、再生する動画データのフレームレートを取得し、該取得したフレームレートに応じて探索範囲の広さを設定して、フレームの動きベクトルを検出する。また、第2の実施の形態においては、該検出されたフレームの動きベクトルに基づいて決定されたトリミング範囲に基づいてトリミングすることによりブレ補正を行なって記録されている動画データを再生表示するようにしてもよい。
[Modification]
F. Each of the above embodiments can be modified as follows.
(1) In each of the above embodiments, the description has been given at the time of moving image capturing, but it may be applied at the time of moving image reproduction. In other words, in the first embodiment, at the time of video playback, the frame rate of the video data to be played back is acquired, the search range is set according to the acquired frame rate, and the motion vector of the frame is detected. To do. In the second embodiment, the moving image data recorded by performing blur correction by trimming based on the trimming range determined based on the detected motion vector of the frame is reproduced and displayed. It may be.

(2)また、動画記録撮影の場合には、該検出したフレームの動きベクトルと該フレームとを関連付けて撮像された動画データを記録させるようにしてもよい。
また、この記録された動画データの再生時においては、フレームに関連付けられて記録されている動きベクトルに基づいて該フレームのトリミング範囲を決定してブレ補正して、動画データを再生表示する。
(2) In the case of moving image recording and shooting, moving image data captured by associating the detected motion vector of the frame with the frame may be recorded.
Further, when the recorded moving image data is reproduced, the trimming range of the frame is determined based on the motion vector recorded in association with the frame, blur correction is performed, and the moving image data is reproduced and displayed.

(3)また、第1の実施の形態においては、補間画素を含む動画データに基づいてフレームの動きベクトルを検出する場合においては、現フレームデータの補間画素値以外の画素値と前フレームデータの補間画素値以外の画素値とに基づいて動きベクトルを検出するようにしてもよい。つまり、CCD3によって撮像された画素値のみを用いて動きベクトルを検出する。また、この補間画素を含む動画データとしては、例えば、デジタルズームがされた動画データなどがある。   (3) In the first embodiment, when a frame motion vector is detected based on moving image data including an interpolation pixel, a pixel value other than the interpolation pixel value of the current frame data and the previous frame data You may make it detect a motion vector based on pixel values other than an interpolation pixel value. That is, the motion vector is detected using only the pixel value imaged by the CCD 3. In addition, as the moving image data including the interpolation pixel, for example, there is moving image data subjected to digital zoom.

(4)また、上記第1の実施の形態においては、ユーザにより設定された画質に応じてフレームレートを変え、フレームレートに応じて探索範囲の広さを設定するようにしたが、他の画質の要素に基づいて探索範囲の広さを設定するようにしてもよい。例えば、他の画質の要素として、CCD3から読み出す画素の数に応じて探索範囲の広さを設定するようにしてもよい。
具体的に説明すると、間引き読出しによって間引かれる画素間隔(1画素おきや2画素おき等)、画素加算駆動によって加算される画素の数に応じて、読み出される画素の数は異なり、間引き読出しにより間引かれる画素間隔や画素加算駆動による加算される画素の数が増えれば増える程、読み出される画素の数は少なくなるので、探索範囲を広く設定する。
読み出される画素が少なくなれば、探索範囲を広く設定しても、動きベクトルを検出する処理負担は大きくならないからである。
(4) In the first embodiment, the frame rate is changed according to the image quality set by the user, and the search range is set according to the frame rate. The size of the search range may be set on the basis of these elements. For example, as another element of image quality, the width of the search range may be set according to the number of pixels read from the CCD 3.
More specifically, the number of pixels to be read differs depending on the pixel interval (every other pixel, every other pixel, etc.) thinned out by thinning readout and the number of pixels added by pixel addition driving. As the number of pixels to be thinned out and the number of pixels added by pixel addition driving increase, the number of pixels to be read out decreases, so the search range is set wider.
This is because if the number of pixels to be read out decreases, the processing load for detecting a motion vector does not increase even if the search range is set wide.

(5)また、上記第1の実施の形態においては、最初に現在のフレームレートに応じて探索範囲の広さを設定し、その後、探索範囲を調整するようにしたが、フレームレートに応じた探索範囲の広さの設定を行なわないようにしてもよい。
具体的に説明すると、図2のステップS1及び2の動作を行わずに、予め定められている探索範囲に設定して、ステップS3に進み、その後の動作は、第1の実施の形態と同様の動作を行なうようにする。
(5) In the first embodiment, the search range is first set according to the current frame rate, and then the search range is adjusted. However, the search range is adjusted according to the frame rate. The search range may not be set.
Specifically, without performing the operations in steps S1 and S2 in FIG. 2, the search range is set in advance, and the process proceeds to step S3. The subsequent operations are the same as in the first embodiment. To perform the operation.

(6)また、上記各実施の形態においては、動画データのフレームの動きベクトルを検出し、該検出した動きベクトルに基づいてブレを補正する場合について説明したが、該検出された動きベクトルは他の用途、例えば、MPEG圧縮や、動いている被写体に追従してAF処理を行う場合(動きベクトルに基づいてAFエリアを動かす場合)や、動いている被写体に追従してデジタルズームを行なう場合(動きベクトルに基づいてトリミング位置を動かす場合)などにも適用してもよい。   (6) Further, in each of the above embodiments, a case has been described in which a motion vector of a frame of moving image data is detected, and blurring is corrected based on the detected motion vector. For example, when performing MPEG compression, AF processing following a moving subject (moving an AF area based on a motion vector), or digital zooming following a moving subject (motion The present invention may also be applied to a case where the trimming position is moved based on a vector).

(7)また、上記第1の実施の形態においては、ブロックマッチング法において使用される探索範囲の広さを、画質に応じて可変設定するようにしたが、ブロックマッチング法以外の方法であってもよい。つまり、他の方法によって動きベクトルを検出する方法であって、探索範囲と同等の概念を用いて動きベクトルを検出する場合においても、本発明を適用できる。   (7) In the first embodiment, the size of the search range used in the block matching method is variably set according to the image quality. However, this is a method other than the block matching method. Also good. That is, the present invention can also be applied to a method of detecting a motion vector by another method and detecting a motion vector using a concept equivalent to the search range.

(8)また、上記第1の実施の形態においては、動きベクトルの大きさと設定されている探索範囲の広さに基づいて、探索範囲を再設定(調整)するようにしたが、探索範囲の調整を行なわなくてもよい。つまり、図2のステップS5で、ブレ検出処理終了しないと判断した場合はそのままステップS3に戻るようにしてもよい。   (8) In the first embodiment, the search range is reset (adjusted) based on the magnitude of the motion vector and the set search range. There is no need to make adjustments. That is, if it is determined in step S5 in FIG. 2 that the blur detection process is not finished, the process may return to step S3 as it is.

(9)また、本発明の動きベクトル検出装置は、デジタルカメラ1に限定されるものではなく、携帯電話、PDA、パソコン、デジタルビデオカメラ等でもよく、要は動画データを扱う機能を備えた機器であればよい。   (9) The motion vector detection device of the present invention is not limited to the digital camera 1, but may be a mobile phone, a PDA, a personal computer, a digital video camera, etc. Essentially, a device having a function for handling moving image data If it is.

本発明の実施の形態のデジタルカメラのブロック図である。1 is a block diagram of a digital camera according to an embodiment of the present invention. 第1の実施の形態のデジタルカメラ1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the digital camera 1 of 1st Embodiment. メモリ8に記憶されている探索範囲グラフ化テーブルの様子を示す図ある。It is a figure which shows the mode of the search range graphing table memorize | stored in the memory. フレームレートの速さに応じて設定される探索範囲の広さの様子を示す図である。It is a figure which shows the mode of the breadth of the search range set according to the speed of a frame rate. 第2の実施の形態のデジタルカメラ1の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the digital camera 1 of 2nd Embodiment. ブロックマッチング法を説明するための図である。It is a figure for demonstrating the block matching method.

符号の説明Explanation of symbols

1 デジタルカメラ
2 撮影レンズ
3 CCD
4 垂直ドライバ
5 TG
6 ユニット回路
7 DMA
8 メモリ
9 DMA
10 画像生成部
11 DMA
12 DMA
13 表示部
14 DMA
15 圧縮部
16 DMA
17 フラッシュメモリ
18 CPU
19 キー入力部
20 バス
1 Digital Camera 2 Shooting Lens 3 CCD
4 Vertical driver 5 TG
6 Unit circuit 7 DMA
8 memory 9 DMA
10 Image generator 11 DMA
12 DMA
13 Display 14 DMA
15 Compression unit 16 DMA
17 Flash memory 18 CPU
19 Key input section 20 Bus

Claims (13)

現フレームデータを複数のブロックに区分けし、現フレームデータのブロックに対応する前フレームデータの探索範囲内で、該現フレームデータのブロックと相関度が最も高いブロックを検出することにより、該現フレームデータのブロックの動きベクトルを検出する動きベクトル検出装置であって、
画像の画質情報を取得する画質情報取得手段と、
前記画質情報取得手段により取得された画質情報に応じて、前記探索範囲の広さを設定する設定手段と、
前記設定手段により設定された探索範囲の広さ内で、現フレームデータのブロックと相関度の最も高いブロックを検出することにより、該現フレームデータのブロックの動きベクトルを検出する動きベクトル検出手段と、
を備えたことを特徴とする動きベクトル検出装置。
By dividing the current frame data into a plurality of blocks and detecting a block having the highest correlation with the block of the current frame data within the search range of the previous frame data corresponding to the block of the current frame data, A motion vector detection device for detecting a motion vector of a block of data,
Image quality information acquisition means for acquiring image quality information of an image;
Setting means for setting the width of the search range according to the image quality information acquired by the image quality information acquisition means;
Motion vector detecting means for detecting a motion vector of a block of the current frame data by detecting a block having the highest degree of correlation with the block of the current frame data within the range of the search range set by the setting means; ,
A motion vector detection device comprising:
前記取得手段は、
画像の画質情報として、フレームレートの速さを取得し、
前記設定手段は、
前記フレームレートの速さに応じて探索範囲を可変設定することを特徴とする請求項1記載の動きベクトル検出装置。
The acquisition means includes
Get the frame rate speed as the image quality information,
The setting means includes
The motion vector detection apparatus according to claim 1, wherein a search range is variably set according to the speed of the frame rate.
前記設定手段は、
前記フレームレートが速い場合には探索範囲を狭く設定し、前記フレームレートが遅い場合には探索範囲を広く設定することを特徴とする請求項2記載の撮像装置。
The setting means includes
The imaging apparatus according to claim 2, wherein when the frame rate is fast, the search range is set narrow, and when the frame rate is slow, the search range is set wide.
前記動きベクトル検出手段により検出されたブロックの動きベクトルの大きさに基づいて、前記設定手段により設定された探索範囲の広さを調整する調整手段を備えたことを特徴とする請求項1乃至3の何れかに記載の動きベクトル検出装置。 4. An adjustment means for adjusting the size of the search range set by the setting means based on the magnitude of the motion vector of the block detected by the motion vector detection means. The motion vector detection device according to any one of the above. 被写体の動画を撮像する動画撮像手段を備え、
前記動きベクトル検出手段は、
前記動画撮像手段により撮像された動画データに基づいて、フレームデータのブロックの動きベクトルを検出することを特徴とする請求項1乃至4の何れかに記載の動きベクトル検出装置。
A moving image capturing means for capturing a moving image of a subject;
The motion vector detecting means includes
5. The motion vector detection device according to claim 1, wherein a motion vector of a block of frame data is detected based on moving image data picked up by the moving image pickup means.
記録されている動画データを取得する動画取得手段を備え、
前記動きベクトル検出手段は、
前記動画データ取得手段により取得された動画データに基づいて、フレームデータのブロックの動きベクトルを検出することを特徴とする請求項1乃至4の何れかに記載の動きベクトル検出装置。
Provided with a video acquisition means for acquiring recorded video data;
The motion vector detecting means includes
5. The motion vector detection device according to claim 1, wherein a motion vector of a block of frame data is detected based on the moving image data acquired by the moving image data acquisition means.
前記動きベクトル検出手段は、
補間画素を含むフレームデータに基づいて、現フレームデータのブロックの動きベクトルを検出する場合は、補間画素以外の画素を用いて該ブロックの動きベクトルを検出することを特徴とする請求項1乃至6の何れかに記載の撮像装置。
The motion vector detecting means includes
7. When detecting a motion vector of a block of current frame data based on frame data including an interpolation pixel, the motion vector of the block is detected using a pixel other than the interpolation pixel. The imaging device according to any one of the above.
前記動きベクトル検出手段は、
現フレームデータの複数のブロックの動きベクトルを検出することを特徴とする請求項1乃至7の何れかに記載の動きベクトル検出装置。
The motion vector detecting means includes
8. The motion vector detection apparatus according to claim 1, wherein motion vector detection is performed for a plurality of blocks of current frame data.
前記動きベクトル検出手段により検出された各ブロックの動きベクトルに基づいて前記現フレームデータの動きベクトルを算出する算出手段を備えたことを特徴とする請求項8記載の動きベクトル検出装置。 9. The motion vector detection apparatus according to claim 8, further comprising a calculation unit that calculates a motion vector of the current frame data based on a motion vector of each block detected by the motion vector detection unit. 前記算出手段は、
前記各ブロックの動きベクトルに基づいて算出された各ブロックの動きベクトルの平均値又は動きベクトルの加重平均値、又は、前記各ブロックの動きベクトルのヒストグラムが最大となる動きベクトルを、現フレームデータの動きベクトルとすることを特徴とする請求項9記載の動きベクトル検出装置。
The calculating means includes
The average value of the motion vectors of each block or the weighted average value of the motion vectors calculated based on the motion vector of each block, or the motion vector that maximizes the histogram of the motion vector of each block is represented in the current frame data. The motion vector detection device according to claim 9, wherein the motion vector is a motion vector.
前記算出手段により算出された現フレームデータの動きベクトルに基づいてトリミングされた現フレームデータを表示手段に表示させる表示制御手段を備え、
前記表示制御手段は、
前記算出手段により算出された現フレームデータの動きベクトルが所定値以下の場合は、現フレームデータを表示せずに、既に表示されているトリミングされた前フレームデータをそのまま表示させることを特徴とする請求項9又は10記載の動きベクトル検出装置。
Display control means for causing the display means to display the current frame data trimmed based on the motion vector of the current frame data calculated by the calculation means;
The display control means includes
When the motion vector of the current frame data calculated by the calculation means is less than or equal to a predetermined value, the current frame data is not displayed, but the already trimmed previous frame data is displayed as it is. The motion vector detection device according to claim 9 or 10.
前記算出手段により算出された現フレームデータの動きベクトルに基づいてトリミングされた現フレームデータを記録手段に記録する記録制御手段を備え、
前記記録制御手段は、
前記算出手段により算出された現フレームデータの動きベクトルが所定値以下の場合は、現フレームデータの替わりに、既に記録したトリミングされた前フレームデータを続けて記録させることを特徴とする請求項9又は10記載の動きベクトル検出装置。
Recording control means for recording the current frame data trimmed based on the motion vector of the current frame data calculated by the calculation means in the recording means;
The recording control means includes
10. The previously recorded trimmed previous frame data is continuously recorded instead of the current frame data when the motion vector of the current frame data calculated by the calculating means is equal to or less than a predetermined value. Alternatively, the motion vector detection device according to 10.
現フレームデータを複数のブロックに区分けし、現フレームデータのブロックに対応する前フレームデータの探索範囲内で、該現フレームデータのブロックと相関度が最も高いブロックを検出することにより、該現フレームデータのブロックの動きベクトルを検出する動きベクトル検出装置を実行させるためのプログラムであって、
画像の画質情報を取得する画質情報取得処理と、
前記画質情報取得手段により取得された画質情報に応じて、前記探索範囲の広さを設定する設定処理と、
前記設定処理により設定された探索範囲の広さ内で、現フレームデータのブロックと相関度の最も高いブロックを検出することにより、該現フレームデータのブロックの動きベクトルを検出する動きベクトル検出処理と、
を含み、上記各処理を実行することを特徴とするプログラム。
By dividing the current frame data into a plurality of blocks and detecting a block having the highest correlation with the block of the current frame data within the search range of the previous frame data corresponding to the block of the current frame data, A program for executing a motion vector detection device for detecting a motion vector of a block of data,
Image quality information acquisition processing for acquiring image quality information of the image;
A setting process for setting the width of the search range according to the image quality information acquired by the image quality information acquisition means;
A motion vector detection process for detecting a motion vector of a block of the current frame data by detecting a block having the highest degree of correlation with the block of the current frame data within the search range set by the setting process; ,
And executing the above-described processes.
JP2006143861A 2006-05-24 2006-05-24 Motion vector detector and its program Pending JP2007318292A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006143861A JP2007318292A (en) 2006-05-24 2006-05-24 Motion vector detector and its program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006143861A JP2007318292A (en) 2006-05-24 2006-05-24 Motion vector detector and its program

Publications (1)

Publication Number Publication Date
JP2007318292A true JP2007318292A (en) 2007-12-06

Family

ID=38851782

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006143861A Pending JP2007318292A (en) 2006-05-24 2006-05-24 Motion vector detector and its program

Country Status (1)

Country Link
JP (1) JP2007318292A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010066863A (en) * 2008-09-09 2010-03-25 Fujifilm Corp Face detection device and method
JP2010246005A (en) * 2009-04-09 2010-10-28 Sanyo Electric Co Ltd Image processing apparatus and imaging apparatus mounted with the same
JP2012242759A (en) * 2011-05-23 2012-12-10 Canon Inc Imaging apparatus, control method therefor, and program
JP2014017571A (en) * 2012-07-06 2014-01-30 Canon Inc Encoder
JP2016046666A (en) * 2014-08-22 2016-04-04 キヤノン株式会社 Imaging apparatus, control method therefor, and program
JP2017097297A (en) * 2015-11-27 2017-06-01 キヤノン株式会社 Image shake correction device and image shake correction control method, program and recording medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010066863A (en) * 2008-09-09 2010-03-25 Fujifilm Corp Face detection device and method
JP2010246005A (en) * 2009-04-09 2010-10-28 Sanyo Electric Co Ltd Image processing apparatus and imaging apparatus mounted with the same
JP2012242759A (en) * 2011-05-23 2012-12-10 Canon Inc Imaging apparatus, control method therefor, and program
JP2014017571A (en) * 2012-07-06 2014-01-30 Canon Inc Encoder
JP2016046666A (en) * 2014-08-22 2016-04-04 キヤノン株式会社 Imaging apparatus, control method therefor, and program
JP2017097297A (en) * 2015-11-27 2017-06-01 キヤノン株式会社 Image shake correction device and image shake correction control method, program and recording medium

Similar Documents

Publication Publication Date Title
US7853134B2 (en) Imaging device with image blurring reduction function
KR101578600B1 (en) Image processing device, image processing method, and computer readable storage medium
JP4916513B2 (en) Imaging device
JP4761146B2 (en) Imaging apparatus and program thereof
US8294779B2 (en) Image sensing apparatus and storage medium
US7567753B2 (en) Video camera and image extracting apparatus utilized for same
US8593545B2 (en) Imaging apparatus, imaging method, and computer-readable recording medium with switched image capturing mode
JP2009182905A (en) Imaging apparatus and its program
TWI492618B (en) Image pickup device and computer readable recording medium
JP2009130577A (en) Imaging device and its program
JP2009065573A (en) Imaging apparatus, focus control method, and focus control program
JP2007318292A (en) Motion vector detector and its program
JP2008028747A (en) Imaging device and program thereof
JP4748375B2 (en) IMAGING DEVICE, IMAGE REPRODUCING DEVICE, AND PROGRAM THEREOF
JP2008301355A (en) Imaging apparatus and program therefor
JP2007189295A (en) Imaging apparatus and program thereof
JP6090494B2 (en) Movie shooting apparatus, moving image shake correction method, and program
JP2006287814A (en) Imaging apparatus and method of determining motion vector
JP2010183460A (en) Image capturing apparatus and method of controlling the same
JP5910565B2 (en) Movie shooting apparatus, moving image shake correction method, and program
JP5067475B2 (en) Imaging apparatus and program thereof
JP4989243B2 (en) Imaging device and subject detection method thereof
JP5455485B2 (en) Imaging device
JP2010062825A (en) Imaging device and method of controlling imaging
JP2010226749A (en) Image pickup device and its program