JP5079284B2 - Camera shake amount detection device, camera shake correction device, imaging device, and camera shake amount detection method - Google Patents
Camera shake amount detection device, camera shake correction device, imaging device, and camera shake amount detection method Download PDFInfo
- Publication number
- JP5079284B2 JP5079284B2 JP2006227048A JP2006227048A JP5079284B2 JP 5079284 B2 JP5079284 B2 JP 5079284B2 JP 2006227048 A JP2006227048 A JP 2006227048A JP 2006227048 A JP2006227048 A JP 2006227048A JP 5079284 B2 JP5079284 B2 JP 5079284B2
- Authority
- JP
- Japan
- Prior art keywords
- residual
- block
- image
- camera shake
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Adjustment Of Camera Lenses (AREA)
- Studio Devices (AREA)
Description
本発明は、手ぶれ補正を行う手ぶれ量検出装置、手ぶれ補正装置、撮像装置及び手ぶれ量検出方法に関する。 The present invention relates to a camera shake amount detection apparatus, a camera shake correction apparatus, an imaging apparatus, and a camera shake amount detection method that perform camera shake correction.
近年、撮像装置としてカメラの小型化が進み、手ぶれ補正技術が注目されてきている。
カメラの小型化により、写真撮影においてホールド性の低下や、携帯電話搭載のカメラなど撮影方法として、片手での撮影など従来の撮影形態と比べ自由度が広がっている。
In recent years, camera miniaturization has progressed as an imaging apparatus, and camera shake correction technology has attracted attention.
Due to the downsizing of the camera, the holdability is reduced in photography, and the degree of freedom is widened as compared with conventional photography forms such as photography with one hand as a photography method such as a camera equipped with a mobile phone.
このように、撮影する際に、種々の方法や安定性のない状態で撮影する場合、シャッターボタンを押した際にカメラがブレて手ぶれが発生してしまう。
例えば、露出時間の長い暗条件での撮影となるとシャッター速度が遅くなりブレてしまうケースが多々ある。
また露出条件で感度を上げて露出時間を短くし撮影した場合は、ノイズがのってしまい粗い画像となってしまう。
As described above, when shooting with various methods or in an unstable state, when the shutter button is pressed, the camera shakes and camera shake occurs.
For example, when shooting under dark conditions with a long exposure time, there are many cases where the shutter speed becomes slow and blurring occurs.
In addition, when the sensitivity is increased under the exposure conditions and the exposure time is shortened, noise is added and the image becomes rough.
この問題を解消すべく、手ぶれ補正を行う装置が、一眼レフや最近ではコンパクトカメラにも搭載されている。
例えば、ブレに合わせてレンズを傾斜させ補正する、光学式手ぶれ補正装置が製品化されているが、近年の小型化や携帯電話カメラへの搭載を考慮するとスペース的に非常に困難である。
In order to solve this problem, a device for correcting camera shake is mounted on a single-lens reflex camera or recently a compact camera.
For example, an optical camera shake correction device that corrects an image by tilting the lens in accordance with a shake has been commercialized, but it is very difficult in terms of space in consideration of recent downsizing and mounting in a mobile phone camera.
また、他の方法として、画像処理により複数枚の画像からぶれの無い画像を得ることができる撮像装置などが種々提案されている。 As other methods, various imaging devices that can obtain a blur-free image from a plurality of images by image processing have been proposed.
例えば、特許文献1には、露光条件が異なる撮像画像情報を合成してダイナミックレンジを拡大した画像を得る際に、露光条件が異なる画素で得られたほぼ同時刻の撮像画像情報の合成に際し、少なくとも一方の露光条件の撮像画像情報を重複して使用する撮像装置が開示されている。
For example, in
特許文献2には、カメラに備えた角度検出センサの検出情報と、カメラの焦点距離情報及び絞り情報とにより、撮影者特有の手ぶれ限界露光時間をあらかじめ記憶しておき、適正露光時間が手ぶれ限界露光時間より長くなる場合には、それより短い露光時間で複数回の撮影を行い画像を合成して手ぶれ補正を行う補正装置が開示されている。
In
特許文献3には、レンズからの光束を2つに分離し、一方の光束を減衰させて得た輝度差のある2つの被写体像を撮像素子の撮像面上の異なる領域に生成し、これら2枚の画像データは電荷蓄積時間及び電荷蓄積スタート時刻を互いに等しくすることによって、拡大されたダイナミックレンジを有する新たな画像データを得る撮像装置が開示されている。 In Patent Literature 3, two subject images having a luminance difference obtained by separating a light flux from a lens into two parts and attenuating one of the light fluxes are generated in different regions on the imaging surface of the image sensor. An image pickup apparatus is disclosed that obtains new image data having an expanded dynamic range by making the charge accumulation time and the charge accumulation start time equal for each piece of image data.
特許文献4には、間引いたブロックごとに動きベクトルを検出し、検出された動きベクトルから内挿補間することによって、検出を行っていないブロックに動きベクトルを与え、最終の動きベクトル検出においてはブロックごとに検出を行う動きベクトル検出方法が開示されている。 In Patent Document 4, a motion vector is detected for each thinned block, and a motion vector is given to an undetected block by interpolation from the detected motion vector. A motion vector detection method for performing detection every time is disclosed.
特許文献5には、画像評価を行い、重要と判断された部分は高精細度に、動きが少ない或いは静止している部分は粗い精細度でデータを送信する画像圧縮方式が開示されている。
しかし、上述した手ぶれ補正方法においては、多くの撮影枚数を必要とし、撮影間に生じる画像間の位置ズレを補正するため処理時間が長くなってしまうという不利益がある。
本発明は、上述した不利益を解消するために、処理量が少なく高精度な手ぶれ量検出を実施できる手ぶれ量検出装置、手ぶれ補正装置、撮像装置及び手ぶれ量検出方法を提供することを目的とする。
However, the above-described camera shake correction method requires a large number of shots, and has a disadvantage that the processing time becomes long because a positional shift between images occurring during shooting is corrected.
An object of the present invention is to provide a camera shake amount detection device, a camera shake correction device, an imaging device, and a camera shake amount detection method that can perform high-precision camera shake amount detection with a small processing amount in order to eliminate the disadvantages described above. To do.
本発明の手ぶれ量検出装置は、露出条件の異なる基準画像と参照画像を基に、マッチング処理を行い手ぶれ量を検出する手ぶれ量検出装置であって、前記基準画像及び参照画像をそれぞれ複数のマクロブロックに分割するマクロブロック分割手段と、前記マクロブロック分割手段が分割した前記基準画像から所定の大きさのマクロブロックによって構成される第1のブロックを抽出し、前記マクロブロック分割手段が分割した参照画像のマクロブロックから所定の大きさのマクロブロックによって構成される第2のブロックを抽出するブロック抽出手段と、前記ブロック抽出手段が抽出した前記第1のブロック及び第2のブロックの残差を取得する残差取得手段と、前記基準画像及び参照画像を間引いて間引き画像を生成するデータ間引き部と、前記データ間引き部が生成した前記間引き画像を用いた粗サーチにて前記残差取得手段が取得した前記残差を基に、前記マクロブロック毎に残差積分値を取得し、該残差積分値が小さいマクロブロックを所定数選出するブロック選出手段と、前記ブロック選出手段が選出した前記各マクロブロックの残差積分値が大きいまたは小さいものから順に並べた時の所定順位の値を手ぶれ量とする手ぶれ量取得手段と、を有し、前記残差取得手段は、前記ブロック選出手段が選出した前記残差積分値が小さいマクロブロックに対して精サーチにて前記間引き画像より少ない間引き量の間引き画像、または非間引き画像の残差を取得し、前記手ぶれ量取得手段に出力する。 A camera shake amount detection apparatus according to the present invention is a camera shake amount detection apparatus that detects a camera shake amount by performing a matching process based on a reference image and a reference image having different exposure conditions, and each of the reference image and the reference image includes a plurality of macros. Macroblock dividing means for dividing into blocks, and a first block constituted by macroblocks of a predetermined size from the reference image divided by the macroblock dividing means, and the reference divided by the macroblock dividing means A block extraction unit that extracts a second block composed of macroblocks of a predetermined size from a macroblock of an image, and obtains a residual between the first block and the second block extracted by the block extraction unit and residual acquisition means for, data thinning unit for generating a thinned image by thinning the reference image and the reference image , Based on the residuals the residual acquisition means has acquired in rough search using the thinned-out image in which the data thinning unit has generated, acquires the residual integral value for each of the macroblocks, said residue difference integration A block selection unit that selects a predetermined number of macroblocks having a small value; and a shake amount that is a value of a predetermined order when the residual integral values of the macroblocks selected by the block selection unit are arranged in order from the largest or the smallest. And the residual acquisition means thins out a thinning amount smaller than the thinned-out image by a fine search for a macroblock having a small residual integral value selected by the block selection means. The residual of the image or the non-decimated image is acquired and output to the camera shake amount acquisition means.
第2の発明の手ぶれ補正装置は、露出条件の異なる基準画像と参照画像を基に、マッチング処理を行い手ぶれ量を検出し当該手ぶれ量を基に手ぶれ補正を行う手ぶれ補正装置であって、前記基準画像及び参照画像をそれぞれ複数のマクロブロックに分割するマクロブロック分割手段と、前記マクロブロック分割手段が分割した前記基準画像から所定の大きさのマクロブロックによって構成される第1のブロックを抽出し、前記マクロブロック分割手段が分割した参照画像のマクロブロックから所定の大きさのマクロブロックによって構成される第2のブロックを抽出するブロック抽出手段と、前記基準画像及び参照画像を間引いて間引き画像を生成するデータ間引き部と、前記データ間引き部が生成した前記間引き画像を用いた粗サーチにて前記ブロック抽出手段が抽出した前記第1のブロック及び第2のブロックの残差を取得する残差取得手段と、前記残差取得手段が取得した前記残差を基に、前記マクロブロック毎に残差積分値を取得し、該残差積分値が小さいマクロブロックを所定数選出するブロック選出手段と、前記ブロック選出手段が選出した前記各マクロブロックの残差積分値が大きいまたは小さいものから順に並べた時の所定順位の値を手ぶれ量とする手ぶれ量取得手段と、前記手ぶれ量算出手段の求めた前記手ぶれ量を基に、前記複数枚の画像を合成する画像合成手段とを有し、前記残差取得手段は、前記ブロック選出手段が選出した前記残差積分値が小さいマクロブロックに対して精サーチにて前記間引き画像より少ない間引き量の間引き画像、または非間引き画像の残差を取得し、前記手ぶれ量取得手段に出力する。 A camera shake correction apparatus according to a second aspect of the present invention is a camera shake correction apparatus that detects a camera shake amount by performing matching processing based on a reference image and a reference image having different exposure conditions, and performs camera shake correction based on the camera shake amount. A macroblock dividing unit that divides the reference image and the reference image into a plurality of macroblocks, and a first block constituted by macroblocks of a predetermined size from the reference image divided by the macroblock dividing unit. Block extracting means for extracting a second block constituted by macroblocks of a predetermined size from the macroblock of the reference image divided by the macroblock dividing means; and a thinned image by thinning the reference image and the reference image a data thinning unit that generates, in coarse search using the thinned-out image in which the data thinning unit has generated Based on the residual acquired by the residual acquisition unit and the residual acquisition unit that acquires the residual of the first block and the second block extracted by the block extraction unit, a residual is obtained for each macroblock. A block selection means for obtaining a difference integral value and selecting a predetermined number of macroblocks having a small residual integral value; and arranging in order from the largest or smallest residual integral value of each macroblock selected by the block selection means. a shake amount acquiring means to shake amount the value of a given rank when the, on the basis of the shake amount calculated in the shake amount calculation means, have a image synthesizing means for synthesizing the images of the plurality, wherein The residual acquisition means is a thinned-out image that is smaller than the thinned-out image or a non-decimated-out image in a fine search for the macroblock having a small residual integrated value selected by the block selecting means. It gets the residual image, and outputs to the camera shake amount acquiring means.
第3の発明の撮像装置は、光学系を通して被写体像を撮影する撮像装置であって、
露出条件の異なる基準画像と参照画像を基に、マッチング処理を行い手ぶれ量を検出する手ぶれ量検出装置を有し、当該手ぶれ量検出装置は、前記基準画像及び参照画像をそれぞれ複数のマクロブロックに分割するマクロブロック分割手段と、前記マクロブロック分割手段が分割した前記基準画像から所定の大きさのマクロブロックによって構成される第1のブロックを抽出し、前記マクロブロック分割手段が分割した参照画像のマクロブロックから所定の大きさのマクロブロックによって構成される第2のブロックを抽出するブロック抽出手段と、前記基準画像及び参照画像を間引いて間引き画像を生成するデータ間引き部と、前記データ間引き部が生成した前記間引き画像を用いた粗サーチにて前記ブロック抽出手段が抽出した前記第1のブロック及び第2のブロックの残差を取得する残差取得手段と、前記残差取得手段が取得した前記残差を基に、前記マクロブロック毎に残差積分値を取得し、該残差積分値が小さいマクロブロックを所定数選出するブロック選出手段と、前記ブロック選出手段が選出した前記各マクロブロックの残差積分値が小さいものから順に並べた時の所定順位の値を手ぶれ量とする手ぶれ量取得手段とを有し、前記残差取得手段は、前記ブロック選出手段が選出した前記残差積分値が小さいマクロブロックに対して精サーチにて前記間引き画像より少ない間引き量の間引き画像、または非間引き画像の残差を取得し、前記手ぶれ量取得手段に出力する。
An imaging apparatus according to a third aspect of the invention is an imaging apparatus that captures a subject image through an optical system,
Based on a reference image and a reference image with different exposure conditions, a camera shake amount detection device that detects a camera shake amount by performing a matching process, and the camera shake amount detection device converts each of the reference image and the reference image into a plurality of macroblocks. A first block composed of macroblocks of a predetermined size is extracted from the base image divided by the macroblock dividing unit, and the reference block divided by the macroblock dividing unit A block extracting means for extracting a second block composed of macroblocks of a predetermined size from a macroblock; a data thinning unit for thinning out the base image and the reference image to generate a thinned image; and the data thinning unit, wherein said block extracting means has extracted with coarse search using the generated the decimated image first Based on the residual acquired by the residual acquiring means for acquiring the residual of the block and the second block, and the residual acquired by the residual acquiring means, a residual integral value is acquired for each macroblock, and the residual integral is obtained. Block selection means for selecting a predetermined number of macroblocks having a small value, and a camera shake amount with a predetermined order value when the respective macroblocks selected by the block selection means are arranged in order from the smallest residual integral value possess a quantity acquisition unit, the residual acquisition means decimated image of the block the decimated image lesser amount of thinning in fine search the residual integral value selecting means has elected for small macroblock or, The residual of the non-decimated image is acquired and output to the camera shake amount acquisition means .
第4の発明の手ぶれ量検出方法は、露出条件の異なる基準画像と参照画像を基に、マッチング処理を行い手ぶれ量を検出する手ぶれ量検出方法であって、前記基準画像及び参照画像をそれぞれ複数のマクロブロックに分割する第1の工程と、前記第1の工程において分割された前記基準画像から所定の大きさのマクロブロックによって構成される第1のブロックを抽出し、前記第1の工程において分割された参照画像のマクロブロックから所定の大きさのマクロブロックによって構成される第2のブロックを抽出する第2の工程と、前記基準画像及び参照画像を間引いて生成した間引き画像を用いた粗サーチにて前記第1のブロック及び第2のブロックの残差を取得する第3の工程と、前記第3の工程において取得された前記残差を基に、前記マクロブロック毎に残差積分値を取得し、該残差積分値が小さい前記マクロブロックを所定数選出する第4の工程と、前記第4の工程において選出された前記各マクロブロックの残差積分値が小さいものから順に並べた時の所定順位の値を手ぶれ量とする第5の工程とを有し、前記第3の工程は、前記第4の工程において選出した前記残差積分値が小さいマクロブロックに対して精サーチにて前記間引き画像より少ない間引き量の間引き画像、または非間引き画像の残差を取得する第6の工程を有する。 A camera shake amount detection method according to a fourth aspect of the present invention is a camera shake amount detection method for detecting a camera shake amount by performing a matching process based on a reference image and a reference image having different exposure conditions, and each of the plurality of reference images and reference images. A first block that is divided into macroblocks, and a first block constituted by macroblocks of a predetermined size from the reference image divided in the first step, and in the first step A second step of extracting a second block composed of macroblocks of a predetermined size from the macroblocks of the divided reference image, and a rough image using a thinned image generated by thinning out the reference image and the reference image a third step of obtaining a residual of the first and second blocks in the search, the residual obtained in the third step based on the front A fourth step of obtaining a residual integral value for each macroblock, selecting a predetermined number of macroblocks having a small residual integral value, and a residual integral of each macroblock selected in the fourth step; have a fifth step of the shake amount the value of a predetermined order when arranged from those values ascending order, the third step, the residual integral value is less was selected in the fourth step A sixth step of acquiring a residual of a thinned-out image or a non-thinned-out image that is smaller than the thinned-out image by a fine search with respect to a macroblock ;
処理量が少なく高精度な手ぶれ量検出を実施できる手ぶれ量検出装置、手ぶれ補正装置、撮像装置及び手ぶれ量検出方法を提供する。 Provided are a camera shake amount detection device, a camera shake correction device, an imaging device, and a camera shake amount detection method that can perform high-precision camera shake amount detection with a small processing amount.
以下、本発明の撮像装置について説明する。
<第1実施形態>
図1は、本第1実施形態の撮像装置1の構成を示すブロック図である。
図1に示すように、本第1実施形態の撮像装置1は、カメラ2、手ぶれ量検出部3、画像合成部4、バッファメモリ5を有する。
Hereinafter, the imaging device of the present invention will be described.
<First Embodiment>
FIG. 1 is a block diagram illustrating a configuration of the
As illustrated in FIG. 1, the
カメラ2は、レンズ、及びCCD(Charged Coupled Device)或いはCMOS(Complementary Metal Oxide Semiconductor)等の撮像素子からなり、レンズを通過した光を撮像素子が光電変換し、カラーフィルタによって色情報を取得して画像データ(RAWデータ)として出力するデジタルカメラモジュールである。カメラ2は、画像の撮影時に手ぶれ補正を行う場合には、連続して撮影した、露出条件が異なる複数の画像を撮影する。手ぶれ量検出のために、この複数の画像の内1枚を基準画像とし、残りのその他の画像を参照画像として使用する。なお、基準画像と参照画像とは露出条件が異なる。カメラ2が撮影した画像は手ぶれ補正処理のために一時的にバッファメモリ5に記憶される。
The
手ぶれ量検出部3は、カメラ2が撮影しバッファメモリ5に記憶した基準画像及び参照画像を基に、画像の手ぶれ量を検出する。
手ぶれ量検出部3は、手ぶれ量検出のための構成として、データ間引き部31、マクロブロック分割部32、ブロック抽出部33、輝度差比較部34、残差取得部35、ブロック選出部36、手ぶれ量取得部37を更に有する。
The camera shake amount detection unit 3 detects the amount of camera shake based on the standard image and the reference image that are captured by the
The camera shake amount detection unit 3 includes a
データ間引き部31は、カメラ2が撮影した基準画像及び参照画像の生データ(RAWデータ)のデータを間引いて、動き量検出に使用する間引き基準画像および間引き参照画像を作成する。
RAWデータは、カメラ2の撮像素子から得られた信号そのままのデータであり、例えば、原色カラーフィルタを有するカメラにより撮影したRAWデータは、図2に示すように、Gr(緑)、R(赤)、B(青)、Gb(緑)の4種類の色データによって構成されている。
データ間引き部31は、カメラ2が撮影した基準画像及び参照画像それぞれのRAWデータを基に、この4種類の色データのうち先頭の緑のデータ(Gr)のみを抽出したそれぞれの間引き画像を作成する。なお、本実施形態ではGrのみを抽出するが、本発明はこれに限定されず、R、B、Gbのいずれか1つを抽出してもよい。
The
The RAW data is data as it is obtained from the image sensor of the
The
マクロブロック分割部32は、データ間引き部31がRAWデータの一部を間引いて作成した間引き画像の基準画像及び参照画像を、それぞれ複数個のマクロブロックに分割する。本実施形態では、マクロブロック分割部32は、それぞれの画像を例えば10×10のマクロブロックに分割する。
The
ブロック抽出部33および残差取得部35は、残差逐次検定法(SSDA:Sequential Similarity Detection Algorithms)により、基準画像内のブロックと対応する参照画像内のブロックとの各画素値の差の絶対値の和(残差)を求め、テンプレートマッチングを行う。
テンプレートマッチングとは、探索対象パターン(探索ブロックI)と事前に用意したテンプレート(テンプレートブロックT)との類似度や相違度を求める手法であり、残差逐次検定法はその手法の1つである。
残差逐次検定法とは、図3に示すように、基準画像からM×N個の画素で構成される探索ブロックIを、参照画像からm×n個の画素で構成されるテンプレートブロックTを抽出し、探索ブロックI上でテンプレートブロックTを動かして比較を行い、テンプレートブロックTと一致する探索ブロックI上の位置を探し出す方法である。なお、M>m、N>nであり、テンプレートブロックTの左上の座標を(x,y)としたとき、残差、すなわち探索ブロックIとテンプレートブロックTとの画素値の差の累積残差E(x,y)、すなわち、残差を基にマクロブロック毎にマクロブロック内の全画素を足し合わせた残差積分値E(x,y)は、(x,y)の関数であり、数式(1)で与えられる。
The
Template matching is a technique for obtaining the degree of similarity or difference between a search target pattern (search block I) and a template (template block T) prepared in advance, and the residual sequential test method is one of the techniques. .
As shown in FIG. 3, the residual sequential test method includes a search block I composed of M × N pixels from the base image and a template block T composed of m × n pixels from the reference image. This is a method of extracting, moving the template block T on the search block I, performing comparison, and finding a position on the search block I that matches the template block T. Note that when M> m and N> n and the upper left coordinate of the template block T is (x, y), the residual, that is, the cumulative residual of the difference between the pixel values of the search block I and the template block T E (x, y), that is, a residual integral value E (x, y) obtained by adding all the pixels in the macro block for each macro block based on the residual is a function of (x, y). It is given by equation (1).
残差積分値E(x,y)が最小になる(x,y)の位置が、テンプレートブロックTと探索ブロックIとが一致する位置である。 The position of (x, y) at which the residual integral value E (x, y) is minimized is the position where the template block T and the search block I match.
本実施形態では、ブロック抽出部33は、図4(a)に示すように、基準画像の10×10のマクロブロックから2×2=4ブロックの探索ブロックIを抽出し、更に、ブロック抽出部33は、図4(b)に示す、対応する参照画像の2×2ブロックの中心部に位置するマクロブロックの縦横2辺のそれぞれ1/4の長さを有する2辺により構成されたブロックが4つ集まって構成されるテンプレートブロックTを抽出する。
次に、残差取得部35が、ブロック抽出部33が抽出した探索ブロックI及びテンプレートブロックTを使用し、上述した残差逐次検定法により残差を取得する。
In the present embodiment, as shown in FIG. 4A, the
Next, the
なお、残差逐次検定法では、E(x,y)を算出するために画素値の差を累積している間に、E(x,y)の値が所定のしきい値Aを超えた場合は、探索ブロックIとテンプレートブロックTとが全く一致しないことを意味するため、その時点でその位置(x,y)に対する残差積分値E(x,y)の算出処理を止め、他の位置(x,y)に対する残差の算出に移行する。これにより、残差逐次検定法によるテンプレートマッチングは、処理時間の短縮と処理量の低減が可能である。所定のしきい値Aの大きさについては、本発明では限定しない。 In the residual sequential test method, the value of E (x, y) exceeds a predetermined threshold A while accumulating pixel value differences to calculate E (x, y). In this case, it means that the search block I and the template block T do not match at all, so that the calculation process of the residual integral value E (x, y) for the position (x, y) is stopped at that time, The process proceeds to calculation of a residual for the position (x, y). Thereby, the template matching by the residual sequential test method can shorten the processing time and the processing amount. The magnitude of the predetermined threshold A is not limited in the present invention.
更に、本実施形態では、ブロック抽出部33が探索ブロックI及びテンプレートブロックTを抽出してから残差取得部35が残差を取得するまでの間に、輝度差比較部34が、各マクロブロックに対し、輝度値の最大値と最小値との差をとり、所定のしきい値Bよりこの差が小さい場合には、そのマクロブロックを残差取得部35が残差を取得する対象から除外する処理を行う。なお、しきい値Bは、基準画像の全画素または参照画像の全画素の輝度値の最大値と最小値との差の所定割合、或いは基準画像と参照画像との全画素の輝度値の最大値と最小値との差の平均値の所定割合とすればよい。
すなわち、輝度値の最大値と最小値との差が小さいブロックは、例えば真っ白な部分等、コントラストが低いブロックであり、こうしたブロックでは手ぶれ量が検出しにくいため、動き量検出処理から除外してしまうのである。
なお、所定のしきい値Bの大きさについては、本発明では限定しない。
Furthermore, in the present embodiment, the luminance
That is, blocks with a small difference between the maximum and minimum luminance values are blocks with low contrast, such as white parts, and are not included in the motion amount detection process because the amount of camera shake is difficult to detect in such blocks. It ends up.
Note that the magnitude of the predetermined threshold B is not limited in the present invention.
ブロック選出部36は、輝度差比較部34が、各マクロブロックに対し、輝度値の最大値と最小値との差をとり、所定のしきい値Bよりこの差が小さい場合には、そのマクロブロックを残差取得部35が残差を取得する対象から除外し、残差取得部35が取得した、全ての探索ブロックIにおける残差積分値E(x,y)の最小値を比較した後、最小値が小さい残差積分値を有する探索ブロックIの小さいものを所定の数だけ抽出する。或いは、所定の数のブロックを抽出する代わりに、全ブロック数の所定の割合のブロックを抽出してもよい。
本実施形態では、例えば、10個のブロックを抽出する。
手ぶれ量取得部37は、探索ブロックI内でブロック選出部36が選出したマクロブロックで間引きせずに積分値E(x,y)を求めて大きいまたは小さいものから順に並べた時の中央値を算出してこの画像の手ぶれ量とする。なお、本実施形態では中央値としたが、本発明はこれに限定されず、所定順位のものであればよい。
手ぶれ量検出部3は、上述した方法で手ぶれ量を検出する。
The
In this embodiment, for example, 10 blocks are extracted.
The camera shake
The camera shake amount detection unit 3 detects the camera shake amount by the method described above.
画像合成部4は、手ぶれ量検出部3が検出した手ぶれ量を基に、カメラ2が撮影した(間引いていない)基準画像と参照画像を合成し、手ぶれ補正を行った補正画像を作成する。
バッファメモリ5は、手ぶれ補正処理に使用される補正前の画像データを一時的に記憶しておくRAM(Random Access Memory)である。
Based on the camera shake amount detected by the camera shake amount detection unit 3, the image composition unit 4 synthesizes the reference image photographed by the camera 2 (not thinned out) and the reference image, and creates a corrected image in which camera shake correction is performed.
The
以下、本実施形態の撮像装置1の撮影時の動作例について説明する。
図5は、撮像装置1の動作例を示すフローチャートである。
Hereinafter, an operation example at the time of shooting of the
FIG. 5 is a flowchart illustrating an operation example of the
ステップST1:
カメラ2は、露出条件を変えて1枚の基準画像と、1または複数枚の参照画像とを撮影する。
ステップST2:
データ間引き部31は、ステップST1においてカメラ2が撮影した基準画像及び参照画像の生データ(RAWデータ)のデータの内、Gr(緑)の成分のみを抽出し、他の成分を間引いて、間引き基準画像および間引き参照画像を作成する。
ステップST3:
マクロブロック分割部32は、ステップST2においてデータ間引き部31が作成した間引き基準画像及び間引き参照画像を、10×10個のマクロブロックに分割する。
Step ST1:
The
Step ST2:
The
Step ST3:
The
ステップST4:
ブロック抽出部33が、ステップST3においてマクロブロック分割部32が10×10個のマクロブロックに分割した間引き基準画像及び間引き参照画像から、図4(a)に示すように、間引き基準画像の10×10のマクロブロックからは2×2=4ブロックの探索ブロックIを抽出し、図4(b)に示すように、間引き参照画像からは、対応する2×2ブロックの中心部に位置するマクロブロックの縦横2辺のそれぞれ1/4の長さを有する2辺により構成されたブロックが4つ集まって構成されるテンプレートブロックTを抽出する。
Step ST4:
From the decimation reference image and decimation reference image which the
ステップST5:
輝度差比較部34は、各画素の輝度値の最大値と最小値との差をとり、所定のしきい値Bよりこの差が小さい場合には、そのマクロブロックを残差取得部35が残差を取得する対象から除外する。
ステップST6:
残差取得部35は、ステップST5において輝度差比較部34が除外しなかった探索ブロックI及びテンプレートブロックTを使用し、上述した残差逐次検定法により残差を取得する。
Step ST5:
The luminance
Step ST6:
The
ステップST7:
ブロック選出部36は、残差取得部35が取得した、全ての探索ブロックIにおける残差積分値E(x,y)が小さいマクロブロックを10個選出する。
ステップST8:
残差取得部35は、RAWデータを間引いていない基準画像及び参照画像をバッファメモリ5から読み出し、ステップST7においてブロック選出部が選出したマクロブロックに対して、間引いていないデータを基に再度残差積分値を算出する。
このステップにおける残差取得部35の処理は、手ぶれ量検出部3の手ぶれ量検出処理全体の精度を上げるためになされる。
Step ST7:
The
Step ST8:
The
The processing of the
ステップST9:
手ぶれ量取得部37は、探索ブロックI内で残差が最小値をとるテンプレートブロックTの位置を、ステップST8において残差取得部35が取得した、間引いていないデータに対する残差積分値を基に求め、ブロック選出部36が選出したマクロブロックで間引きせずに積分値E(x,y)を求めて大きいまたは小さいものから順に並べたときの中央値を抽出する。
Step ST9:
The camera shake
ステップST10:
画像合成部4は、ステップST9において手ぶれ量取得部37が取得した手ぶれ量を基に、カメラ2が撮影した(間引いていない)基準画像と参照画像を合成し、手ぶれ補正を行った補正画像を作成する。
Step ST10:
Based on the camera shake amount acquired by the camera shake
以上説明したように、本実施形態の撮像装置1によれば、手ぶれ量を検出する際に、ブロック選出部36が小さい残差積分値を有するブロックの小さいものを所定の数或いは割合だけ選出し、当該所定の数のブロックを基に残差積分値が最小となるテンプレート画像の位置を求め、それを基に手ぶれ量を検出しているので、手ぶれ量検出処理全体の処理量が少なくて済み、処理にかかる時間も短くて済む。
As described above, according to the
更に、本実施形態の撮像装置1によれば、データ間引き部31が基準画像及び参照画像の生データ(RAWデータ)のデータの内、Gr(緑)の成分のみを抽出し、他の成分を間引いて、間引き基準画像および間引き参照画像を作成し、後の処理において間引き画像を使用しているので、手ぶれ量検出処理全体の処理量が少なくて済み、処理にかかる時間も短くて済む。また、残差取得部35は、間引き画像を基に残差積分値を取得した後、間引いていない画像を基に再度残差積分値を取得しているので、精度の高い手ぶれ量検出処理を行うことができる。
Further, according to the
また、本実施形態の撮像装置1によれば、ブロック抽出部33が探索ブロックI及びテンプレートブロックTを抽出してから残差取得部35が残差積分値を取得するまでの間に、輝度差比較部34が、各マクロブロックに対し、輝度値の最大値と最小値との差をとり、所定のしきい値Bよりこの差が小さい場合には、そのマクロブロックを残差取得部35が残差を取得する対象から除外しているので、コントラストが低く残差積分値を取得できないと予測されるブロックを予め残差取得部35が残差積分値を取得する処理から除外しているので、手ぶれ量検出処理全体の処理量が少なくて済み、処理にかかる時間も短くて済む。
Further, according to the
また、本実施形態の撮像装置1によれば、残差積分値の計算を行う際に累積値が所定の値を超えた時点で残差計算を止める残差逐次検定法によってパターンマッチングを行っているので、手ぶれ量検出処理全体の処理量が少なくて済み、処理にかかる時間も短くて済む。
Further, according to the
<第2実施形態>
撮像装置の第2実施形態は、データ間引き部31が1/8間引き画像と1/2間引き画像を作成し、残差算出部35がまず1/8間引き画像を使用して残差積分値を求め(粗サーチ)た後、残差積分値が小さいブロックを所定数抽出してその中で1/2間引き画像に対して再度残差積分値も求め(精サーチ)ることを除いて、第1実施形態の撮像装置1と同様である。
Second Embodiment
In the second embodiment of the imaging apparatus, the
以下、第1実施形態の撮像装置1と異なる各構成について説明する
データ間引き部31は、カメラ2が撮影した基準画像及び参照画像それぞれのRAWデータを1/2或いは1/8に間引いた間引き画像を作成する。1/2間引き画像は、縦横それぞれの画素のうち2つに1つの画素のみを抽出して作成された間引き画像であり、1/8間引き画像は縦横それぞれの画素のうち8つに1つの画素のみを抽出して作成された間引き画像である。
残差取得部35が、まず1/8間引き画像の探索ブロックI及びテンプレートブロックTを使用し、上述した残差逐次検定法により残差を取得する(粗サーチ)。残差取得時の探索ブロックIとテンプレートブロックTを図6に示す。
図6は、探索ブロックIがテンプレートブロックTに探索される様子を示した図である。図6に示すように、テンプレートブロックTは1画素ずつ移動しながら探索ブロック内をサーチしていく。
Hereinafter, each configuration different from the
The
FIG. 6 is a diagram showing how the search block I is searched for the template block T. As shown in FIG. 6, the template block T searches the search block while moving one pixel at a time.
ブロック選出部36は、輝度差比較部34が、各マクロブロックに対し、輝度値の最大値と最小値との差をとり、所定のしきい値Bよりこの差が小さい場合には、そのマクロブロックを残差取得部35が残差を取得する対象から除外し、残差取得部35が取得した、全ての探索ブロックIにおける残差積分値E(x,y)の最小値を比較した後、最小値が小さい残差積分値を有する探索ブロックIの小さいものを所定の数だけ抽出する。或いは、所定の数のブロックを抽出する代わりに、全ブロック数の所定の割合のブロックを抽出してもよい。
The
次に残差積分値算出部35は、探索ブロックI内でブロック選出部36が選出した9個のマクロブロックに対して、1/2間引き画像で積分値E(x,y)を求める(精サーチ)。
1/2間引き画像の残差積分値を求める際には、上述したブロック抽出部33、残差取得部35及びブロック選出部36が1/8間引き画像に対して求めた残差積分値が小さい画素の近傍の画素のみに対して残差積分値の算出を行えばよいので、手ぶれ量算出部の計算量は従来に比べ格段に少なくなる。
Next, the residual integral
When obtaining the residual integral value of the half-thinned image, the residual integral value obtained by the
ここで、図7と関連付けて1/8間引き画像と、1/2間引き画像との関係について説明する。
図7に示す○印は、1/8間引き画像において残差積分値算出が行われる画素を表しており、図7に示す×印は、1/2間引き画像において残差積分値算出が行われる画素を示している。1/2間引き画像における残差積分値算出が行われる画素の内縦横それぞれ4個毎に1/8間引き画像において残差積分値算出が行われる画素があることがわかる。
すなわち、1/8間引き画像において、図7のaの画素がそのブロックにおける残差積分値最小となる画素であったとすると、1/2間引き画像においては、図7の点線で囲まれた範囲内に残差積分値が最小となる画素が存在していることがわかる。
Here, the relationship between the 1/8 thinned image and the 1/2 thinned image will be described in association with FIG.
The circles shown in FIG. 7 represent pixels for which the residual integral value calculation is performed in the 1/8 thinned image, and the x marks in FIG. 7 are used for the residual integral value calculation in the 1/2 thinned image. A pixel is shown. It can be seen that there are pixels for which the residual integral value calculation is performed in the 1/8 thinned-out image every four pixels in the vertical and horizontal directions of the pixels for which the residual integral value calculation is performed in the half-thinned image.
That is, in the 1/8 thinned image, if the pixel a in FIG. 7 is the pixel having the minimum residual integral value in the block, the 1/2 thinned image is within the range surrounded by the dotted line in FIG. It can be seen that there is a pixel having a minimum residual integral value.
次に、本実施形態の撮像装置1の動作例について説明する。
図8は、第2実施形態の撮像装置1の動作例を示すフローチャートである。
Next, an operation example of the
FIG. 8 is a flowchart illustrating an operation example of the
ステップST11:
カメラ2は、露出条件を変えて1枚の基準画像と、1または複数枚の参照画像とを撮影する。
ステップST12:
データ間引き部31は、ステップST11においてカメラ2が撮影した基準画像及び参照画像の生データから1/8間引き画像および1/2間引き画像を作成する。
ステップST13:
マクロブロック分割部32は、ステップST12においてデータ間引き部31が作成した1/8間引き画像の基準画像及び参照画像を、例えば10×10個のマクロブロックに分割する。
Step ST11:
The
Step ST12:
The
Step ST13:
The
ステップST14:
ブロック抽出部33が、ステップST13においてマクロブロック分割部32が10×10個のマクロブロックに分割した1/8間引き画像の基準画像及び参照画像から、探索ブロックIを抽出し、参照画像からは、テンプレートブロックTを抽出する。
Step ST14:
The
ステップST15:
輝度差比較部34は、各画素の輝度値の最大値と最小値との差をとり、所定のしきい値Bよりこの差が小さい場合には、そのマクロブロックを残差取得部35が残差を取得する対象から除外する。
ステップST16:
残差取得部35は、ステップST15において輝度差比較部34が除外しなかった探索ブロックI及びテンプレートブロックTを使用し、上述した残差逐次検定法により残差を取得する。
Step ST15:
The luminance
Step ST16:
The
ステップST17:
ブロック選出部36は、残差取得部35が取得した、全ての探索ブロックIにおける残差積分値E(x,y)が小さいマクロブロックを9個選出する。
ステップST18:
残差取得部35は、1/2間引き画像の基準画像及び参照画像を、ステップST17においてブロック選出部が選出したマクロブロックに対して、再度残差積分値を算出する。
このステップにおける残差取得部35の処理は、手ぶれ量検出部3の手ぶれ量検出処理全体の精度を上げるためになされる。
Step ST17:
The
Step ST18:
The
The processing of the
ステップST19:
手ぶれ量取得部37は、探索ブロックI内で残差が最小値をとるテンプレートブロックTの位置を、ステップST18において残差取得部35が取得した、1/2間引き画像に対する残差積分値を基に求め、ブロック選出部36が選出したマクロブロックにおいて1/2間引き画像の残差積分値E(x,y)を求めて小さいものから順に並べたときの中央値を抽出する。
Step ST19:
The camera shake
ステップST20:
画像合成部4は、ステップST19において手ぶれ量取得部37が取得した手ぶれ量を基に、カメラ2が撮影した(間引いていない)基準画像と参照画像を合成し、手ぶれ補正を行った補正画像を作成する。
Step ST20:
Based on the camera shake amount acquired by the camera shake
以上説明したように、本第2実施形態の撮像装置1によれば、ブロック抽出部33が探索ブロックI及びテンプレートブロックTを抽出してから残差取得部35が残差積分値を取得するまでの間に、輝度差比較部34が、各マクロブロックに対し、輝度値の最大値と最小値との差をとり、所定のしきい値Bよりこの差が小さい場合には、そのマクロブロックを残差取得部35が残差を取得する対象から除外しているので、コントラストが低く残差積分値を取得できないと予測されるブロックを予め残差取得部35が残差積分値を取得する処理から除外しているので、手ぶれ量検出処理全体の処理量が少なくて済み、処理にかかる時間も短くて済む。
なお、第1実施形態と同様に、手ぶれ量を検出する際にブロック選出部36が小さい残差積分値を有するブロックの小さいものを所定の数或いは割合だけ選出してもよく、また手ぶれ量取得部37は、本実施形態では中央値を手ぶれ量としたが、本発明はこれに限定されず、所定順位のものを手ぶれ量とすればよい。
As described above, according to the
As in the first embodiment, when detecting the amount of camera shake, the
<第3実施形態>
撮像装置1の第3実施形態は、残差積分値が小さいブロックを選出するための残差算出部35の残差算出時に、所定の範囲の残差のみを算出することを除いて、第2実施形態と同様である。
すなわち、残差算出部35は、1/8間引き画像を使用して残差積分値を求め(粗サーチ)る際に、全ての範囲の画素に対して残差積分値を算出せず、所定の範囲のみの画素に対して残差の算出を行う。
<Third Embodiment>
The third embodiment of the
That is, the
本第3実施形態の残差算出部35が粗サーチ時に残差を算出する所定の範囲について、図9と関連付けて説明する。
図9に示すように、残差算出部35は、1/8に間引いた画像の、例えば5%の画素が存在する範囲のみに対して残差算出を行う。すなわち、当該画像が3メガピクセル(2048画素×1536画素)であったならば、水平方向には2048/5/20=約13(画素)のみ残差算出を行い、垂直方向には1535/8/20=約10(画素)に対してのみ残差算出を行う。従って残差算出に要する時間は大幅に短縮される。
A predetermined range in which the
As illustrated in FIG. 9, the
なお、5%という値は一例であり、本発明はこれには限定されない。5%という値は、手ぶれを検出するために最低限必要であるという、経験から導かれた値である。 The value of 5% is an example, and the present invention is not limited to this. The value of 5% is a value derived from experience that it is the minimum necessary to detect camera shake.
以上説明したように、本第3実施形態の残差算出部35は、1/8間引き画像を使用して残差積分値を求め(粗サーチ)る際に、全ての範囲の画素に対して残差積分値を算出せず、所定の範囲のみの画素に対して残差の算出を行うので、残差算出に要する時間は大幅に短縮され、手ぶれ補正に要する時間も少なくて済む。
As described above, the
本発明は上述した実施形態には限定されない。
すなわち、当業者は、本発明の技術的範囲またはその均等の範囲内において、上述した実施形態の構成要素に関し、様々な変更、コンビネーション、サブコンビネーション、並びに代替を行ってもよい。
The present invention is not limited to the embodiment described above.
That is, those skilled in the art may make various modifications, combinations, subcombinations, and alternatives regarding the components of the above-described embodiments within the technical scope of the present invention or an equivalent scope thereof.
また、本実施形態においては、ブロック抽出部33が探索ブロックI及びテンプレートブロックTを抽出してから残差取得部35が残差積分値を取得するまでの間に、輝度差比較部34が、各マクロブロックに対し、輝度値の最大値と最小値との差をとり、所定のしきい値Bよりこの差が小さい場合には、そのマクロブロックを残差取得部35が残差積分値を取得する対象から除外しているが、本発明はこれには限定されず、例えば、輝度差比較部34は、ブロック選出部36が、全ての探索ブロックIにおける残差積分値E(x,y)の最小値を比較し、最小値が小さい残差積分値を有する探索ブロックIの小さいものを所定数抽出した直後に(すなわち、図5におけるステップST9とST10の間で)、輝度差を取得し、輝度差がしきい値以下のブロックに対しては残差積分値を取得する対象から除外する処理を行ってもよい。
In the present embodiment, the luminance
また、本実施形態においては、データ間引き部31はGr成分のみ抽出し残りの成分は間引いていたが、本発明はこれには限定されず、例えば他の成分のみ抽出したり、或いは2つの成分を抽出したりしてもよい。
In this embodiment, the
本実施形態において、手ぶれ検出部3は手ぶれ量検出のための構成として、データ間引き部31、マクロブロック分割部32、ブロック抽出部33、輝度差比較部34、残差取得部35、ブロック選出部36、手ぶれ量取得部37とを更に有していたが、これら手ぶれ検出部3の各構成は、それらの処理を行うためのハードウェアとして撮像装置1に組み込まれていてもよいし、手ぶれ検出部3の制御に従い処理を行うソフトウェアであってもよい。
In the present embodiment, the camera shake detection unit 3 includes a
1…撮像装置、2…カメラ、3…手ぶれ量検出部、31…データ間引き部、32…マクロブロック分割部、33…ブロック抽出部、34…輝度差比較部、35…残差取得部、36…ブロック選出部、37…手ぶれ量算出部、4…画像合成部、5…バッファメモリ
DESCRIPTION OF
Claims (10)
前記基準画像及び参照画像をそれぞれ複数のマクロブロックに分割するマクロブロック分割手段と、
前記マクロブロック分割手段が分割した前記基準画像から所定の大きさのマクロブロックによって構成される第1のブロックを抽出し、前記マクロブロック分割手段が分割した参照画像のマクロブロックから所定の大きさのマクロブロックによって構成される第2のブロックを抽出するブロック抽出手段と、
前記ブロック抽出手段が抽出した前記第1のブロック及び第2のブロックの残差を取得する残差取得手段と、
前記基準画像及び参照画像を間引いて間引き画像を生成するデータ間引き部と、
前記データ間引き部が生成した前記間引き画像を用いた粗サーチにて前記残差取得手段が取得した前記残差を基に、前記マクロブロック毎に残差積分値を取得し、該残差積分値が小さいマクロブロックを所定数選出するブロック選出手段と、
前記ブロック選出手段が選出した前記各マクロブロックの残差積分値が大きいまたは小さいものから順に並べた時の所定順位の値を手ぶれ量とする手ぶれ量取得手段と、
を有し、
前記残差取得手段は、前記ブロック選出手段が選出した前記残差積分値が小さいマクロブロックに対して精サーチにて前記間引き画像より少ない間引き量の間引き画像、または非間引き画像の残差を取得し、前記手ぶれ量取得手段に出力する
手ぶれ量検出装置。 Based on a reference image and a reference image with different exposure conditions, a camera shake amount detection device that detects a camera shake amount by performing a matching process,
Macroblock dividing means for dividing each of the standard image and the reference image into a plurality of macroblocks;
A first block composed of macroblocks of a predetermined size is extracted from the base image divided by the macroblock dividing unit, and a predetermined size is extracted from the macroblock of the reference image divided by the macroblock dividing unit. Block extraction means for extracting a second block constituted by macroblocks;
A residual acquisition unit that acquires residuals of the first block and the second block extracted by the block extraction unit;
A data thinning unit for thinning the standard image and the reference image to generate a thinned image;
Based on the residual acquired by the residual acquisition means in the coarse search using the thinned image generated by the data thinning unit , a residual integrated value is acquired for each macroblock, and the residual integrated value A block selection means for selecting a predetermined number of macroblocks having a small size,
A camera shake amount acquisition unit having a camera shake amount as a value of a predetermined order when a residual integral value of each macroblock selected by the block selection unit is arranged in order from the largest or the smallest;
Have
The residual obtaining unit obtains a residual of a thinned-out image or a non-thinned-out image that is smaller than the thinned-out image by a fine search with respect to a macroblock having a small residual integrated value selected by the block selecting unit. And a camera shake amount detection device for outputting to the camera shake amount acquisition means.
ことを特徴とする請求項1に記載の手ぶれ量検出装置。 The block extracting means extracts a block having a predetermined size located at the center of a plurality of adjacent macroblocks based on the reference image as the second block, and based on the reference image, the reference The camera shake amount detection apparatus according to claim 1, wherein blocks corresponding to a plurality of adjacent macroblocks corresponding to a plurality of adjacent macroblocks in an image are extracted as the first block.
を更に有することを特徴とする請求項2に記載の手ぶれ量検出装置。 Before the residual acquisition unit acquires the residual, the difference between the maximum value and the minimum value of the luminance value is calculated for each macroblock, and the difference is smaller than a predetermined threshold value. 3. The camera shake amount detection apparatus according to claim 2, further comprising: a luminance difference comparison unit that, when determined, excludes a macroblock having the difference from a target from which the residual acquisition unit acquires the residual.
を更に有することを特徴とする請求項2に記載の手ぶれ量検出装置。 After the block selection means selects the predetermined number of the macro blocks, the difference between the maximum value and the minimum value of the luminance value is calculated, and when it is determined that the difference is smaller than a predetermined threshold value, The camera shake amount detection device according to claim 2, further comprising: a luminance difference comparison unit that excludes a macroblock having a difference from a target from which the residual acquisition unit acquires the residual.
前記マクロブロック分割手段及び前記ブロック抽出手段は、前記基準画像及び前記参照画像の代わりに、前記データ間引き部が生成した前記間引き画像を使用する
ことを特徴とする請求項1から4のいずれか一項に記載の手ぶれ量検出装置。 The data thinning unit extracts only predetermined components of the RAW data of the reference image and the reference image, thinning and generating the decimated image,
The macroblock dividing unit and the block extracting unit use the thinned image generated by the data thinning unit instead of the standard image and the reference image. The camera shake amount detecting device according to the item.
ことを特徴とする請求項1に記載の手ぶれ量検出装置。 The residual acquisition means, when performing a fine search for a macroblock having a small residual integral value selected by the block selection means during the coarse search, in the neighborhood where the minimum residual within the block was acquired during the coarse search. The camera shake amount detection apparatus according to claim 1 , wherein residual acquisition is performed only on pixels.
ことを特徴とする請求項1から6のいずれか一項に記載の手ぶれ量検出装置。 The residual acquisition unit does not acquire residuals of all ranges when acquiring residuals of the first block and second block extracted by the block extraction unit, but only residuals of a predetermined range. The camera shake amount detection device according to any one of claims 1 to 6, wherein a difference is acquired.
前記基準画像及び参照画像をそれぞれ複数のマクロブロックに分割するマクロブロック分割手段と、
前記マクロブロック分割手段が分割した前記基準画像から所定の大きさのマクロブロックによって構成される第1のブロックを抽出し、前記マクロブロック分割手段が分割した参照画像のマクロブロックから所定の大きさのマクロブロックによって構成される第2のブロックを抽出するブロック抽出手段と、
前記基準画像及び参照画像を間引いて間引き画像を生成するデータ間引き部と、
前記データ間引き部が生成した前記間引き画像を用いた粗サーチにて前記ブロック抽出手段が抽出した前記第1のブロック及び第2のブロックの残差を取得する残差取得手段と、
前記残差取得手段が取得した前記残差を基に、前記マクロブロック毎に残差積分値を取得し、該残差積分値が小さいマクロブロックを所定数選出するブロック選出手段と、
前記ブロック選出手段が選出した前記各マクロブロックの残差積分値が大きいまたは小さいものから順に並べた時の所定順位の値を手ぶれ量とする手ぶれ量取得手段と、
前記手ぶれ量算出手段の求めた前記手ぶれ量を基に、前記複数枚の画像を合成する画像合成手段と
を有し、
前記残差取得手段は、前記ブロック選出手段が選出した前記残差積分値が小さいマクロブロックに対して精サーチにて前記間引き画像より少ない間引き量の間引き画像、または非間引き画像の残差を取得し、前記手ぶれ量取得手段に出力する
ことを特徴とする手ぶれ補正装置。 A camera shake correction apparatus that performs a matching process based on a reference image and a reference image with different exposure conditions, detects a camera shake amount, and performs camera shake correction based on the camera shake amount,
Macroblock dividing means for dividing each of the standard image and the reference image into a plurality of macroblocks;
A first block composed of macroblocks of a predetermined size is extracted from the base image divided by the macroblock dividing unit, and a predetermined size is extracted from the macroblock of the reference image divided by the macroblock dividing unit. Block extraction means for extracting a second block constituted by macroblocks;
A data thinning unit for thinning the standard image and the reference image to generate a thinned image;
A residual acquisition means for acquiring residuals of the first block and the second block extracted by the block extraction means in a rough search using the thinned image generated by the data thinning unit ;
Based on the residual obtained by the residual obtaining means, obtaining a residual integrated value for each macroblock, and a block selecting means for selecting a predetermined number of macroblocks having a small residual integrated value;
A camera shake amount acquisition unit having a camera shake amount as a value of a predetermined order when a residual integral value of each macroblock selected by the block selection unit is arranged in order from the largest or the smallest;
Based on the shake amount calculated in the shake amount calculation means, have a image synthesizing means for synthesizing the images of the plurality,
The residual obtaining unit obtains a residual of a thinned-out image or a non-thinned-out image that is smaller than the thinned-out image by a fine search with respect to a macroblock having a small residual integrated value selected by the block selecting unit. And a camera shake correction apparatus that outputs the result to the camera shake amount acquisition means .
露出条件の異なる基準画像と参照画像を基に、マッチング処理を行い手ぶれ量を検出する手ぶれ量検出装置を有し、
当該手ぶれ量検出装置は、
前記基準画像及び参照画像をそれぞれ複数のマクロブロックに分割するマクロブロック分割手段と、
前記マクロブロック分割手段が分割した前記基準画像から所定の大きさのマクロブロックによって構成される第1のブロックを抽出し、前記マクロブロック分割手段が分割した参照画像のマクロブロックから所定の大きさのマクロブロックによって構成される第2のブロックを抽出するブロック抽出手段と、
前記基準画像及び参照画像を間引いて間引き画像を生成するデータ間引き部と、
前記データ間引き部が生成した前記間引き画像を用いた粗サーチにて前記ブロック抽出手段が抽出した前記第1のブロック及び第2のブロックの残差を取得する残差取得手段と、
前記残差取得手段が取得した前記残差を基に、前記マクロブロック毎に残差積分値を取得し、該残差積分値が小さいマクロブロックを所定数選出するブロック選出手段と、
前記ブロック選出手段が選出した前記各マクロブロックの残差積分値が小さいものから順に並べた時の所定順位の値を手ぶれ量とする手ぶれ量取得手段と
を有し、
前記残差取得手段は、前記ブロック選出手段が選出した前記残差積分値が小さいマクロブロックに対して精サーチにて前記間引き画像より少ない間引き量の間引き画像、または非間引き画像の残差を取得し、前記手ぶれ量取得手段に出力する
ことを特徴とする撮像装置。 An imaging device that captures a subject image through an optical system,
Based on a reference image and a reference image with different exposure conditions, a camera shake amount detection device that detects a camera shake amount by performing a matching process,
The camera shake detection device is
Macroblock dividing means for dividing each of the standard image and the reference image into a plurality of macroblocks;
A first block composed of macroblocks of a predetermined size is extracted from the base image divided by the macroblock dividing unit, and a predetermined size is extracted from the macroblock of the reference image divided by the macroblock dividing unit. Block extraction means for extracting a second block constituted by macroblocks;
A data thinning unit for thinning the standard image and the reference image to generate a thinned image;
A residual acquisition means for acquiring residuals of the first block and the second block extracted by the block extraction means in a rough search using the thinned image generated by the data thinning unit ;
Based on the residual obtained by the residual obtaining means, obtaining a residual integrated value for each macroblock, and a block selecting means for selecting a predetermined number of macroblocks having a small residual integrated value;
Have a hand shake amount acquiring means to shake amount the value of a predetermined order when said block selection means are arranged from those small residual integral values of the respective macroblocks selected in order,
The residual obtaining unit obtains a residual of a thinned-out image or a non-thinned-out image that is smaller than the thinned-out image by a fine search with respect to a macroblock having a small residual integrated value selected by the block selecting unit. And outputting to the camera shake amount acquisition means .
前記基準画像及び参照画像をそれぞれ複数のマクロブロックに分割する第1の工程と、
前記第1の工程において分割された前記基準画像から所定の大きさのマクロブロックによって構成される第1のブロックを抽出し、前記第1の工程において分割された参照画像のマクロブロックから所定の大きさのマクロブロックによって構成される第2のブロックを抽出する第2の工程と、
前記基準画像及び参照画像を間引いて生成した間引き画像を用いた粗サーチにて前記第1のブロック及び第2のブロックの残差を取得する第3の工程と、
前記第3の工程において取得された前記残差を基に、前記マクロブロック毎に残差積分値を取得し、該残差積分値が小さい前記マクロブロックを所定数選出する第4の工程と、
前記第4の工程において選出された前記各マクロブロックの残差積分値が小さいものから順に並べた時の所定順位の値を手ぶれ量とする第5の工程と
を有し、
前記第3の工程は、前記第4の工程において選出した前記残差積分値が小さいマクロブロックに対して精サーチにて前記間引き画像より少ない間引き量の間引き画像、または非間引き画像の残差を取得する第6の工程を有する
ことを特徴とする手ぶれ量検出方法。 A camera shake amount detection method for detecting a camera shake amount by performing a matching process based on a reference image and a reference image having different exposure conditions,
A first step of dividing each of the reference image and the reference image into a plurality of macroblocks;
A first block composed of macroblocks of a predetermined size is extracted from the base image divided in the first step, and a predetermined size is extracted from the macroblocks of the reference image divided in the first step. A second step of extracting a second block constituted by the macroblock;
A third step of acquiring residuals of the first block and the second block by a coarse search using a thinned image generated by thinning the standard image and the reference image ;
A fourth step of acquiring a residual integral value for each macroblock based on the residual obtained in the third step, and selecting a predetermined number of the macroblocks having a small residual integral value;
Have a fifth step of the shake amount the value of a predetermined order when arranged in order from the residual integral value of elected each macroblock in said fourth step is small,
In the third step, the residual of the thinned-out image or the non-thinned-out image, which is smaller than the thinned-out image in the fine search for the macroblock having a small residual integrated value selected in the fourth step, is obtained. A camera shake amount detection method comprising a sixth step of acquiring .
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006227048A JP5079284B2 (en) | 2005-12-26 | 2006-08-23 | Camera shake amount detection device, camera shake correction device, imaging device, and camera shake amount detection method |
PCT/JP2006/325782 WO2007074774A1 (en) | 2005-12-26 | 2006-12-25 | Blur detecting device, blur correcting device, imaging device, and blur detecting method |
CN2006800534445A CN101390381B (en) | 2005-12-26 | 2006-12-25 | Blur detecting device, blur correcting device, imaging device, and blur detecting method |
US12/159,366 US8542278B2 (en) | 2005-12-26 | 2006-12-25 | Shaking detection device, shaking correction device, imaging device, and shaking detection method |
Applications Claiming Priority (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005373578 | 2005-12-26 | ||
JP2005373578 | 2005-12-26 | ||
JP2006104722 | 2006-04-05 | ||
JP2006104722 | 2006-04-05 | ||
JP2006227048A JP5079284B2 (en) | 2005-12-26 | 2006-08-23 | Camera shake amount detection device, camera shake correction device, imaging device, and camera shake amount detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007300592A JP2007300592A (en) | 2007-11-15 |
JP5079284B2 true JP5079284B2 (en) | 2012-11-21 |
Family
ID=38769672
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006227048A Expired - Fee Related JP5079284B2 (en) | 2005-12-26 | 2006-08-23 | Camera shake amount detection device, camera shake correction device, imaging device, and camera shake amount detection method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5079284B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4689687B2 (en) * | 2008-01-29 | 2011-05-25 | 株式会社モルフォ | Imaging method and imaging apparatus |
JP2011128978A (en) * | 2009-12-18 | 2011-06-30 | Sony Corp | Information processor, information processing method and program |
JP6188533B2 (en) * | 2013-10-24 | 2017-08-30 | キヤノン株式会社 | Image shake correction apparatus, control method therefor, optical apparatus, and imaging apparatus |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3110797B2 (en) * | 1991-06-21 | 2000-11-20 | キヤノン株式会社 | Imaging method and imaging screen synthesis device |
JP3252418B2 (en) * | 1991-11-22 | 2002-02-04 | ソニー株式会社 | Image shake determination device |
JP4075238B2 (en) * | 1999-08-19 | 2008-04-16 | 株式会社デンソー | Motion vector detection method and recording medium |
JP3866957B2 (en) * | 2001-10-23 | 2007-01-10 | オリンパス株式会社 | Image synthesizer |
JP4050498B2 (en) * | 2001-11-07 | 2008-02-20 | オリンパス株式会社 | Image synthesizer |
WO2004062270A1 (en) * | 2002-12-26 | 2004-07-22 | Mitsubishi Denki Kabushiki Kaisha | Image processor |
-
2006
- 2006-08-23 JP JP2006227048A patent/JP5079284B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2007300592A (en) | 2007-11-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8542278B2 (en) | Shaking detection device, shaking correction device, imaging device, and shaking detection method | |
JP4497001B2 (en) | Image processing apparatus, electronic camera, and image processing program | |
JP5484631B2 (en) | Imaging apparatus, imaging method, program, and program storage medium | |
US9489747B2 (en) | Image processing apparatus for performing object recognition focusing on object motion, and image processing method therefor | |
JP5226600B2 (en) | Image deformation apparatus and operation control method thereof | |
JP3974633B1 (en) | Imaging apparatus and imaging method | |
JP3974634B2 (en) | Imaging apparatus and imaging method | |
KR100829470B1 (en) | Image capturing apparatus, control method therefor, image processing apparatus and image processing method | |
JP4896852B2 (en) | Autofocus control circuit, autofocus control method, and imaging apparatus | |
WO2013021767A1 (en) | Device and method for detecting moving objects | |
US20110221869A1 (en) | Imaging device, display method and recording medium | |
JP2007135182A (en) | Imaging device and imaging method | |
JP2010034739A (en) | Panoramic photography device and method, and camera unit loaded with panoramic photography device | |
KR20130061083A (en) | Image pickup apparatus, control method for image pickup apparatus, and storage medium | |
JP2009017155A (en) | Image recognizing device, focus adjusting device and imaging apparatus | |
JP4947576B2 (en) | Imaging apparatus, blur correction method, and imaging method | |
JP5079271B2 (en) | Camera shake amount detection device, camera shake correction device, imaging device, and camera shake amount detection method | |
JP2015073185A (en) | Image processing device, image processing method and program | |
JP2010279054A (en) | Image pickup device, image processing device, image pickup method, and image processing method | |
JP5079284B2 (en) | Camera shake amount detection device, camera shake correction device, imaging device, and camera shake amount detection method | |
US11593958B2 (en) | Imaging device, distance measurement method, distance measurement program, and recording medium | |
JP4692273B2 (en) | Focus detection device and camera | |
JP5079253B2 (en) | Camera shake amount detection device, camera shake correction device, imaging device, and camera shake amount detection method | |
JP2008053787A (en) | Multiple-lens electronic camera and parallax correcting method of multi-lens electronic camera | |
JP4666265B2 (en) | Image blur correction apparatus and correction method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090316 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120313 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120514 |
|
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: 20120807 |
|
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: 20120829 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150907 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |