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 PDF

Info

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
Application number
JP2006227048A
Other languages
Japanese (ja)
Other versions
JP2007300592A (en
Inventor
義 浅野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kyocera Corp
Original Assignee
Kyocera Corp
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 Kyocera Corp filed Critical Kyocera Corp
Priority to JP2006227048A priority Critical patent/JP5079284B2/en
Priority to PCT/JP2006/325782 priority patent/WO2007074774A1/en
Priority to CN2006800534445A priority patent/CN101390381B/en
Priority to US12/159,366 priority patent/US8542278B2/en
Publication of JP2007300592A publication Critical patent/JP2007300592A/en
Application granted granted Critical
Publication of JP5079284B2 publication Critical patent/JP5079284B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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 Patent Literature 1, when combining captured image information with different exposure conditions to obtain an image with an expanded dynamic range, when synthesizing captured image information at substantially the same time obtained with pixels with different exposure conditions, An imaging apparatus that uses captured image information of at least one exposure condition in an overlapping manner is disclosed.

特許文献2には、カメラに備えた角度検出センサの検出情報と、カメラの焦点距離情報及び絞り情報とにより、撮影者特有の手ぶれ限界露光時間をあらかじめ記憶しておき、適正露光時間が手ぶれ限界露光時間より長くなる場合には、それより短い露光時間で複数回の撮影を行い画像を合成して手ぶれ補正を行う補正装置が開示されている。   In Patent Document 2, camera shake limit exposure time peculiar to a photographer is stored in advance based on detection information of an angle detection sensor provided in the camera, focal length information and aperture information of the camera, and appropriate exposure time is limited to camera shake. When the exposure time is longer than the exposure time, there has been disclosed a correction apparatus that performs camera shake correction by performing image capturing a plurality of times with a shorter exposure time and synthesizing images.

特許文献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には、画像評価を行い、重要と判断された部分は高精細度に、動きが少ない或いは静止している部分は粗い精細度でデータを送信する画像圧縮方式が開示されている。   Patent Document 5 discloses an image compression method that performs image evaluation and transmits data with high definition in a portion judged to be important, and coarse definition in a portion with little movement or stillness.

特開平10−108079号公報Japanese Patent Laid-Open No. 10-108079 特開2004−279514号公報JP 2004-279514 A 特開2003−32559号公報JP2003-32559A 特開平7−177519号公報JP-A-7-177519 特開平6−169452号公報Japanese Patent Laid-Open No. 6-169552

しかし、上述した手ぶれ補正方法においては、多くの撮影枚数を必要とし、撮影間に生じる画像間の位置ズレを補正するため処理時間が長くなってしまうという不利益がある。
本発明は、上述した不利益を解消するために、処理量が少なく高精度な手ぶれ量検出を実施できる手ぶれ量検出装置、手ぶれ補正装置、撮像装置及び手ぶれ量検出方法を提供することを目的とする。
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 imaging apparatus 1 according to the first embodiment.
As illustrated in FIG. 1, the imaging apparatus 1 according to the first embodiment includes a camera 2, a camera shake amount detection unit 3, an image composition unit 4, and a buffer memory 5.

カメラ2は、レンズ、及びCCD(Charged Coupled Device)或いはCMOS(Complementary Metal Oxide Semiconductor)等の撮像素子からなり、レンズを通過した光を撮像素子が光電変換し、カラーフィルタによって色情報を取得して画像データ(RAWデータ)として出力するデジタルカメラモジュールである。カメラ2は、画像の撮影時に手ぶれ補正を行う場合には、連続して撮影した、露出条件が異なる複数の画像を撮影する。手ぶれ量検出のために、この複数の画像の内1枚を基準画像とし、残りのその他の画像を参照画像として使用する。なお、基準画像と参照画像とは露出条件が異なる。カメラ2が撮影した画像は手ぶれ補正処理のために一時的にバッファメモリ5に記憶される。   The camera 2 includes a lens and an image sensor such as a CCD (Charged Coupled Device) or a CMOS (Complementary Metal Oxide Semiconductor). The image sensor photoelectrically converts light passing through the lens, and obtains color information by a color filter. It is a digital camera module that outputs as image data (RAW data). When performing camera shake correction at the time of image capture, the camera 2 captures a plurality of images that are continuously captured and that have different exposure conditions. In order to detect the amount of camera shake, one of the plurality of images is used as a standard image, and the remaining other images are used as reference images. The standard image and the reference image have different exposure conditions. Images taken by the camera 2 are temporarily stored in the buffer memory 5 for camera shake correction processing.

手ぶれ量検出部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 camera 2 and stored in the buffer memory 5.
The camera shake amount detection unit 3 includes a data decimation unit 31, a macroblock division unit 32, a block extraction unit 33, a luminance difference comparison unit 34, a residual acquisition unit 35, a block selection unit 36, A quantity acquisition unit 37 is further included.

データ間引き部31は、カメラ2が撮影した基準画像及び参照画像の生データ(RAWデータ)のデータを間引いて、動き量検出に使用する間引き基準画像および間引き参照画像を作成する。
RAWデータは、カメラ2の撮像素子から得られた信号そのままのデータであり、例えば、原色カラーフィルタを有するカメラにより撮影したRAWデータは、図2に示すように、Gr(緑)、R(赤)、B(青)、Gb(緑)の4種類の色データによって構成されている。
データ間引き部31は、カメラ2が撮影した基準画像及び参照画像それぞれのRAWデータを基に、この4種類の色データのうち先頭の緑のデータ(Gr)のみを抽出したそれぞれの間引き画像を作成する。なお、本実施形態ではGrのみを抽出するが、本発明はこれに限定されず、R、B、Gbのいずれか1つを抽出してもよい。
The data decimation unit 31 decimates the data of the standard image and the reference image raw data (RAW data) captured by the camera 2 to create a decimation standard image and a decimation reference image used for motion amount detection.
The RAW data is data as it is obtained from the image sensor of the camera 2. For example, RAW data taken by a camera having a primary color filter is Gr (green), R (red) as shown in FIG. ), B (blue), and Gb (green).
The data thinning unit 31 creates each thinned image obtained by extracting only the leading green data (Gr) from the four types of color data based on the RAW data of the standard image and the reference image captured by the camera 2. To do. In the present embodiment, only Gr is extracted, but the present invention is not limited to this, and any one of R, B, and Gb may be extracted.

マクロブロック分割部32は、データ間引き部31がRAWデータの一部を間引いて作成した間引き画像の基準画像及び参照画像を、それぞれ複数個のマクロブロックに分割する。本実施形態では、マクロブロック分割部32は、それぞれの画像を例えば10×10のマクロブロックに分割する。   The macroblock dividing unit 32 divides the reference image and the reference image of the thinned image created by the data thinning unit 31 by thinning a part of the RAW data into a plurality of macroblocks. In the present embodiment, the macroblock dividing unit 32 divides each image into, for example, 10 × 10 macroblocks.

ブロック抽出部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 block extraction unit 33 and the residual acquisition unit 35 calculate the absolute value of the difference between the pixel values of the block in the reference image and the block in the reference image corresponding to the residual sequential test method (SSDA: Sequential Similarity Detection Algorithms). Is calculated (residual) and template matching is performed.
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).

Figure 0005079284
Figure 0005079284

残差積分値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 block extraction unit 33 extracts a search block I of 2 × 2 = 4 blocks from a 10 × 10 macroblock of the reference image, and further, a block extraction unit Reference numeral 33 denotes a block composed of two sides each having a length of 1/4 of the two vertical and horizontal sides of the macroblock located at the center of the 2 × 2 block of the corresponding reference image shown in FIG. A template block T composed of four is extracted.
Next, the residual acquisition unit 35 uses the search block I and the template block T extracted by the block extraction unit 33 to acquire a residual by the above-described residual sequential test method.

なお、残差逐次検定法では、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 difference comparison unit 34 includes each macroblock after the block extraction unit 33 extracts the search block I and the template block T until the residual acquisition unit 35 acquires the residual. On the other hand, the difference between the maximum value and the minimum value of the luminance value is taken, and if this difference is smaller than the predetermined threshold value B, the macroblock is excluded from the target from which the residual acquisition unit 35 acquires the residual. Perform the process. The threshold B is a predetermined ratio of the difference between the maximum value and the minimum value of the luminance values of all the pixels of the standard image or all the pixels of the reference image, or the maximum luminance value of all the pixels of the standard image and the reference image. What is necessary is just to set it as the predetermined ratio of the average value of the difference of a value and a minimum value.
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 block selection unit 36 takes the difference between the maximum value and the minimum value of the luminance value for each macroblock, and if this difference is smaller than a predetermined threshold B, the block selection unit 36 After the block is excluded from the target from which the residual acquisition unit 35 acquires residuals, and the minimum values of the residual integral values E (x, y) in all search blocks I acquired by the residual acquisition unit 35 are compared. A predetermined number of search blocks I having a residual integral value with a small minimum value are extracted. Alternatively, instead of extracting a predetermined number of blocks, a predetermined percentage of the total number of blocks may be extracted.
In this embodiment, for example, 10 blocks are extracted.
The camera shake amount acquisition unit 37 obtains the median value when the integral value E (x, y) is obtained without decimating the macroblock selected by the block selection unit 36 in the search block I and arranged in order from the largest or smallest. The amount of camera shake of this image is calculated. In the present embodiment, the median value is used. However, the present invention is not limited to this and may be of a predetermined order.
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 buffer memory 5 is a RAM (Random Access Memory) that temporarily stores image data before correction used for camera shake correction processing.

以下、本実施形態の撮像装置1の撮影時の動作例について説明する。
図5は、撮像装置1の動作例を示すフローチャートである。
Hereinafter, an operation example at the time of shooting of the imaging apparatus 1 of the present embodiment will be described.
FIG. 5 is a flowchart illustrating an operation example of the imaging apparatus 1.

ステップST1:
カメラ2は、露出条件を変えて1枚の基準画像と、1または複数枚の参照画像とを撮影する。
ステップST2:
データ間引き部31は、ステップST1においてカメラ2が撮影した基準画像及び参照画像の生データ(RAWデータ)のデータの内、Gr(緑)の成分のみを抽出し、他の成分を間引いて、間引き基準画像および間引き参照画像を作成する。
ステップST3:
マクロブロック分割部32は、ステップST2においてデータ間引き部31が作成した間引き基準画像及び間引き参照画像を、10×10個のマクロブロックに分割する。
Step ST1:
The camera 2 captures one standard image and one or a plurality of reference images while changing the exposure conditions.
Step ST2:
The data decimation unit 31 extracts only the Gr (green) component from the standard image and reference image raw data (RAW data) captured by the camera 2 in step ST1, and decimates the other components. A reference image and a thinned reference image are created.
Step ST3:
The macroblock dividing unit 32 divides the thinning standard image and the thinning reference image created by the data thinning unit 31 in step ST2 into 10 × 10 macroblocks.

ステップ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 block extraction unit 33 divides into 10 × 10 macroblocks in step ST3, as shown in FIG. The search block I of 2 × 2 = 4 blocks is extracted from 10 macroblocks, and as shown in FIG. 4B, the macroblock located at the center of the corresponding 2 × 2 block is extracted from the thinned reference image. A template block T composed of four blocks each composed of two sides each having a length of 1/4 of the two vertical and horizontal sides is extracted.

ステップST5:
輝度差比較部34は、各画素の輝度値の最大値と最小値との差をとり、所定のしきい値Bよりこの差が小さい場合には、そのマクロブロックを残差取得部35が残差を取得する対象から除外する。
ステップST6:
残差取得部35は、ステップST5において輝度差比較部34が除外しなかった探索ブロックI及びテンプレートブロックTを使用し、上述した残差逐次検定法により残差を取得する。
Step ST5:
The luminance difference comparison unit 34 takes the difference between the maximum value and the minimum value of the luminance value of each pixel. If this difference is smaller than a predetermined threshold value B, the residual acquisition unit 35 stores the macroblock. Exclude from the target to get the difference.
Step ST6:
The residual acquisition unit 35 uses the search block I and the template block T that are not excluded by the luminance difference comparison unit 34 in step ST5, and acquires a residual by the above-described residual sequential test method.

ステップST7:
ブロック選出部36は、残差取得部35が取得した、全ての探索ブロックIにおける残差積分値E(x,y)が小さいマクロブロックを10個選出する。
ステップST8:
残差取得部35は、RAWデータを間引いていない基準画像及び参照画像をバッファメモリ5から読み出し、ステップST7においてブロック選出部が選出したマクロブロックに対して、間引いていないデータを基に再度残差積分値を算出する。
このステップにおける残差取得部35の処理は、手ぶれ量検出部3の手ぶれ量検出処理全体の精度を上げるためになされる。
Step ST7:
The block selection unit 36 selects ten macroblocks acquired by the residual acquisition unit 35 and having a small residual integral value E (x, y) in all the search blocks I.
Step ST8:
The residual acquisition unit 35 reads from the buffer memory 5 the standard image and reference image from which RAW data has not been thinned out, and re-residuals the macroblock selected by the block selection unit in step ST7 based on the data that has not been thinned out. Calculate the integral value.
The processing of the residual acquisition unit 35 in this step is performed in order to increase the accuracy of the overall camera shake amount detection process of the camera shake amount detection unit 3.

ステップST9:
手ぶれ量取得部37は、探索ブロックI内で残差が最小値をとるテンプレートブロックTの位置を、ステップST8において残差取得部35が取得した、間引いていないデータに対する残差積分値を基に求め、ブロック選出部36が選出したマクロブロックで間引きせずに積分値E(x,y)を求めて大きいまたは小さいものから順に並べたときの中央値を抽出する。
Step ST9:
The camera shake amount acquisition unit 37 determines the position of the template block T in which the residual value has the minimum value in the search block I based on the residual integrated value for the non-thinned data acquired by the residual acquisition unit 35 in step ST8. Then, the integral value E (x, y) is obtained without thinning out the macroblocks selected by the block selection unit 36, and the median when they are arranged in order from the largest or smallest is extracted.

ステップST10:
画像合成部4は、ステップST9において手ぶれ量取得部37が取得した手ぶれ量を基に、カメラ2が撮影した(間引いていない)基準画像と参照画像を合成し、手ぶれ補正を行った補正画像を作成する。
Step ST10:
Based on the camera shake amount acquired by the camera shake amount acquisition unit 37 in step ST9, the image composition unit 4 combines the reference image photographed by the camera 2 (not thinned out) with the reference image, and obtains a corrected image subjected to camera shake correction. create.

以上説明したように、本実施形態の撮像装置1によれば、手ぶれ量を検出する際に、ブロック選出部36が小さい残差積分値を有するブロックの小さいものを所定の数或いは割合だけ選出し、当該所定の数のブロックを基に残差積分値が最小となるテンプレート画像の位置を求め、それを基に手ぶれ量を検出しているので、手ぶれ量検出処理全体の処理量が少なくて済み、処理にかかる時間も短くて済む。   As described above, according to the imaging apparatus 1 of the present embodiment, when detecting the amount of camera shake, the block selection unit 36 selects a small number of blocks having a small residual integral value by a predetermined number or ratio. Since the position of the template image that minimizes the residual integral value is obtained based on the predetermined number of blocks and the camera shake amount is detected based on the template image position, the overall amount of camera shake detection processing can be reduced. The processing time can be shortened.

更に、本実施形態の撮像装置1によれば、データ間引き部31が基準画像及び参照画像の生データ(RAWデータ)のデータの内、Gr(緑)の成分のみを抽出し、他の成分を間引いて、間引き基準画像および間引き参照画像を作成し、後の処理において間引き画像を使用しているので、手ぶれ量検出処理全体の処理量が少なくて済み、処理にかかる時間も短くて済む。また、残差取得部35は、間引き画像を基に残差積分値を取得した後、間引いていない画像を基に再度残差積分値を取得しているので、精度の高い手ぶれ量検出処理を行うことができる。   Further, according to the imaging apparatus 1 of the present embodiment, the data thinning unit 31 extracts only the Gr (green) component from the raw data (RAW data) of the standard image and the reference image, and extracts the other components. Since the thinned-out reference image and the thinned-out reference image are created by thinning out and the thinned-out image is used in the subsequent processing, the overall amount of camera shake detection processing can be reduced, and the processing time can be shortened. In addition, since the residual acquisition unit 35 acquires the residual integral value based on the thinned image and then acquires the residual integral value again based on the image that has not been thinned, highly accurate camera shake amount detection processing is performed. It can be carried out.

また、本実施形態の撮像装置1によれば、ブロック抽出部33が探索ブロックI及びテンプレートブロックTを抽出してから残差取得部35が残差積分値を取得するまでの間に、輝度差比較部34が、各マクロブロックに対し、輝度値の最大値と最小値との差をとり、所定のしきい値Bよりこの差が小さい場合には、そのマクロブロックを残差取得部35が残差を取得する対象から除外しているので、コントラストが低く残差積分値を取得できないと予測されるブロックを予め残差取得部35が残差積分値を取得する処理から除外しているので、手ぶれ量検出処理全体の処理量が少なくて済み、処理にかかる時間も短くて済む。   Further, according to the imaging apparatus 1 of the present embodiment, the luminance difference between the time when the block extraction unit 33 extracts the search block I and the template block T and the time when the residual acquisition unit 35 acquires the residual integral value. The comparison unit 34 takes the difference between the maximum value and the minimum value of the luminance values for each macroblock, and if this difference is smaller than a predetermined threshold value B, the residual acquisition unit 35 selects the macroblock. Since the residual is excluded from the target for acquiring the residual, the block that is predicted to have a low contrast and cannot acquire the residual integrated value is excluded in advance from the process in which the residual acquiring unit 35 acquires the residual integrated value. The processing amount of the entire camera shake detection process can be reduced, and the processing time can be shortened.

また、本実施形態の撮像装置1によれば、残差積分値の計算を行う際に累積値が所定の値を超えた時点で残差計算を止める残差逐次検定法によってパターンマッチングを行っているので、手ぶれ量検出処理全体の処理量が少なくて済み、処理にかかる時間も短くて済む。   Further, according to the imaging apparatus 1 of the present embodiment, pattern matching is performed by the residual sequential test method that stops the residual calculation when the accumulated value exceeds a predetermined value when calculating the residual integral value. Therefore, the processing amount of the entire camera shake amount detection process can be reduced, and the processing time can be shortened.

<第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 data decimation unit 31 creates a 1/8 decimation image and a 1/2 decimation image, and the residual calculation unit 35 first uses the 1/8 decimation image to calculate the residual integral value. After obtaining (rough search), a predetermined number of blocks having a small residual integral value are extracted, and the residual integral value is also obtained again for the half-thinned image (fine search). It is the same as the imaging device 1 of one embodiment.

以下、第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 imaging device 1 of the first embodiment will be described. The data thinning unit 31 is a thinned image obtained by thinning the raw data of the standard image and the reference image captured by the camera 2 to 1/2 or 1/8. Create The half-thinned image is a thinned image created by extracting only one pixel in two of the vertical and horizontal pixels, and the 1/8 thinned image is one pixel in eight of the vertical and horizontal pixels. This is a thinned image created by extracting only.
The residual acquisition unit 35 first uses the search block I and the template block T of the 1/8 thinned-out image, and acquires a residual by the above-described residual sequential test method (coarse search). FIG. 6 shows the search block I and the template block T when the residual is acquired.
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 block selection unit 36 takes the difference between the maximum value and the minimum value of the luminance value for each macroblock, and if this difference is smaller than a predetermined threshold B, the block selection unit 36 After the block is excluded from the target from which the residual acquisition unit 35 acquires residuals, and the minimum values of the residual integral values E (x, y) in all search blocks I acquired by the residual acquisition unit 35 are compared. A predetermined number of search blocks I having a residual integral value with a small minimum value are extracted. Alternatively, instead of extracting a predetermined number of blocks, a predetermined percentage of the total number of blocks may be extracted.

次に残差積分値算出部35は、探索ブロックI内でブロック選出部36が選出した9個のマクロブロックに対して、1/2間引き画像で積分値E(x,y)を求める(精サーチ)。
1/2間引き画像の残差積分値を求める際には、上述したブロック抽出部33、残差取得部35及びブロック選出部36が1/8間引き画像に対して求めた残差積分値が小さい画素の近傍の画素のみに対して残差積分値の算出を行えばよいので、手ぶれ量算出部の計算量は従来に比べ格段に少なくなる。
Next, the residual integral value calculation unit 35 obtains an integral value E (x, y) as a half-thinned image for the nine macroblocks selected by the block selection unit 36 in the search block I (precisely). search).
When obtaining the residual integral value of the half-thinned image, the residual integral value obtained by the block extraction unit 33, the residual acquisition unit 35, and the block selection unit 36 described above for the 1/8 thinned image is small. Since it is only necessary to calculate the residual integral value for only the pixels in the vicinity of the pixel, the amount of calculation of the camera shake amount calculation unit is significantly smaller than that in the past.

ここで、図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 imaging device 1 of the present embodiment will be described.
FIG. 8 is a flowchart illustrating an operation example of the imaging apparatus 1 according to the second embodiment.

ステップST11:
カメラ2は、露出条件を変えて1枚の基準画像と、1または複数枚の参照画像とを撮影する。
ステップST12:
データ間引き部31は、ステップST11においてカメラ2が撮影した基準画像及び参照画像の生データから1/8間引き画像および1/2間引き画像を作成する。
ステップST13:
マクロブロック分割部32は、ステップST12においてデータ間引き部31が作成した1/8間引き画像の基準画像及び参照画像を、例えば10×10個のマクロブロックに分割する。
Step ST11:
The camera 2 captures one standard image and one or a plurality of reference images while changing the exposure conditions.
Step ST12:
The data decimation unit 31 creates a 1/8 decimation image and a 1/2 decimation image from the standard image and the reference image raw data captured by the camera 2 in step ST11.
Step ST13:
The macroblock dividing unit 32 divides the standard image and reference image of the 1/8 thinned image created by the data thinning unit 31 in step ST12 into, for example, 10 × 10 macroblocks.

ステップST14:
ブロック抽出部33が、ステップST13においてマクロブロック分割部32が10×10個のマクロブロックに分割した1/8間引き画像の基準画像及び参照画像から、探索ブロックIを抽出し、参照画像からは、テンプレートブロックTを抽出する。
Step ST14:
The block extraction unit 33 extracts the search block I from the standard image and the reference image of the 1/8 thinned-out image divided by the macroblock dividing unit 32 into 10 × 10 macroblocks in step ST13, and from the reference image, A template block T is extracted.

ステップST15:
輝度差比較部34は、各画素の輝度値の最大値と最小値との差をとり、所定のしきい値Bよりこの差が小さい場合には、そのマクロブロックを残差取得部35が残差を取得する対象から除外する。
ステップST16:
残差取得部35は、ステップST15において輝度差比較部34が除外しなかった探索ブロックI及びテンプレートブロックTを使用し、上述した残差逐次検定法により残差を取得する。
Step ST15:
The luminance difference comparison unit 34 takes the difference between the maximum value and the minimum value of the luminance value of each pixel. If this difference is smaller than a predetermined threshold value B, the residual acquisition unit 35 stores the macroblock. Exclude from the target to get the difference.
Step ST16:
The residual acquisition unit 35 uses the search block I and the template block T that are not excluded by the luminance difference comparison unit 34 in step ST15, and acquires the residual by the above-described residual sequential test method.

ステップST17:
ブロック選出部36は、残差取得部35が取得した、全ての探索ブロックIにおける残差積分値E(x,y)が小さいマクロブロックを9個選出する。
ステップST18:
残差取得部35は、1/2間引き画像の基準画像及び参照画像を、ステップST17においてブロック選出部が選出したマクロブロックに対して、再度残差積分値を算出する。
このステップにおける残差取得部35の処理は、手ぶれ量検出部3の手ぶれ量検出処理全体の精度を上げるためになされる。
Step ST17:
The block selection unit 36 selects nine macro blocks acquired by the residual acquisition unit 35 and having a small residual integral value E (x, y) in all the search blocks I.
Step ST18:
The residual acquisition unit 35 calculates a residual integral value again with respect to the macroblock selected by the block selection unit in step ST <b> 17 for the standard image and the reference image of the half-thinned image.
The processing of the residual acquisition unit 35 in this step is performed in order to increase the accuracy of the overall camera shake amount detection process of the camera shake amount detection unit 3.

ステップST19:
手ぶれ量取得部37は、探索ブロックI内で残差が最小値をとるテンプレートブロックTの位置を、ステップST18において残差取得部35が取得した、1/2間引き画像に対する残差積分値を基に求め、ブロック選出部36が選出したマクロブロックにおいて1/2間引き画像の残差積分値E(x,y)を求めて小さいものから順に並べたときの中央値を抽出する。
Step ST19:
The camera shake amount acquisition unit 37 determines the position of the template block T at which the residual is the smallest value in the search block I based on the residual integrated value for the half-thinned image acquired by the residual acquisition unit 35 in step ST18. In the macroblock selected by the block selection unit 36, the residual integrated value E (x, y) of the half-thinned image is obtained, and the median when they are arranged in order from the smallest is extracted.

ステップST20:
画像合成部4は、ステップST19において手ぶれ量取得部37が取得した手ぶれ量を基に、カメラ2が撮影した(間引いていない)基準画像と参照画像を合成し、手ぶれ補正を行った補正画像を作成する。
Step ST20:
Based on the camera shake amount acquired by the camera shake amount acquisition unit 37 in step ST19, the image composition unit 4 combines the reference image photographed by the camera 2 (not thinned out) with the reference image, and obtains a corrected image that has undergone camera shake correction. create.

以上説明したように、本第2実施形態の撮像装置1によれば、ブロック抽出部33が探索ブロックI及びテンプレートブロックTを抽出してから残差取得部35が残差積分値を取得するまでの間に、輝度差比較部34が、各マクロブロックに対し、輝度値の最大値と最小値との差をとり、所定のしきい値Bよりこの差が小さい場合には、そのマクロブロックを残差取得部35が残差を取得する対象から除外しているので、コントラストが低く残差積分値を取得できないと予測されるブロックを予め残差取得部35が残差積分値を取得する処理から除外しているので、手ぶれ量検出処理全体の処理量が少なくて済み、処理にかかる時間も短くて済む。
なお、第1実施形態と同様に、手ぶれ量を検出する際にブロック選出部36が小さい残差積分値を有するブロックの小さいものを所定の数或いは割合だけ選出してもよく、また手ぶれ量取得部37は、本実施形態では中央値を手ぶれ量としたが、本発明はこれに限定されず、所定順位のものを手ぶれ量とすればよい。
As described above, according to the imaging apparatus 1 of the second embodiment, after the block extraction unit 33 extracts the search block I and the template block T, the residual acquisition unit 35 acquires the residual integral value. In the meantime, the luminance difference comparison unit 34 takes the difference between the maximum value and the minimum value of the luminance value for each macroblock, and if this difference is smaller than a predetermined threshold value B, the macroblock is selected. Since the residual acquisition unit 35 excludes the residual from the target from which the residual is acquired, a process in which the residual acquisition unit 35 acquires the residual integral value in advance for blocks predicted to have low contrast and cannot acquire the residual integral value. Therefore, the processing amount of the entire camera shake detection process can be reduced and the processing time can be shortened.
As in the first embodiment, when detecting the amount of camera shake, the block selection unit 36 may select a small number of blocks having a small residual integral value by a predetermined number or ratio, and obtain the amount of camera shake. In the present embodiment, the unit 37 uses the median as the amount of camera shake in the present embodiment, but the present invention is not limited to this.

<第3実施形態>
撮像装置1の第3実施形態は、残差積分値が小さいブロックを選出するための残差算出部35の残差算出時に、所定の範囲の残差のみを算出することを除いて、第2実施形態と同様である。
すなわち、残差算出部35は、1/8間引き画像を使用して残差積分値を求め(粗サーチ)る際に、全ての範囲の画素に対して残差積分値を算出せず、所定の範囲のみの画素に対して残差の算出を行う。
<Third Embodiment>
The third embodiment of the imaging apparatus 1 is different from the second embodiment except that only a residual in a predetermined range is calculated at the time of residual calculation of the residual calculation unit 35 for selecting a block having a small residual integral value. This is the same as the embodiment.
That is, the residual calculation unit 35 does not calculate the residual integral value for all the range of pixels when obtaining the residual integral value (coarse search) using the 1/8 thinned image, The residual is calculated for pixels in only the range.

本第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 residual calculation unit 35 of the third embodiment calculates the residual during the coarse search will be described with reference to FIG.
As illustrated in FIG. 9, the residual calculation unit 35 performs the residual calculation only on a range where, for example, 5% of pixels exist in the image thinned out to 1/8. That is, if the image is 3 megapixels (2048 pixels × 1536 pixels), the residual is calculated only for 2048/5/20 = about 13 (pixels) in the horizontal direction, and 1535/8 in the vertical direction. Residual calculation is performed only for / 20 = about 10 (pixels). Therefore, the time required for calculating the residual is greatly reduced.

なお、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 residual calculation unit 35 of the third embodiment uses the 1/8 thinned image to obtain the residual integrated value (coarse search), and applies to the pixels in the entire range. Since the residual is calculated only for pixels within a predetermined range without calculating the residual integral value, the time required for calculating the residual is greatly shortened, and the time required for camera shake correction can be reduced.

本発明は上述した実施形態には限定されない。
すなわち、当業者は、本発明の技術的範囲またはその均等の範囲内において、上述した実施形態の構成要素に関し、様々な変更、コンビネーション、サブコンビネーション、並びに代替を行ってもよい。
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 difference comparison unit 34, after the block extraction unit 33 extracts the search block I and the template block T, until the residual acquisition unit 35 acquires the residual integral value, For each macroblock, the difference between the maximum value and the minimum value of the luminance value is taken, and if this difference is smaller than a predetermined threshold B, the residual acquisition unit 35 sets the residual integral value for that macroblock. However, the present invention is not limited to this. For example, the luminance difference comparison unit 34, the block selection unit 36, the residual integral value E (x, y) in all search blocks I. ) To obtain a luminance difference immediately after extracting a predetermined number of small search blocks I having a residual integral value having a small minimum value (that is, between steps ST9 and ST10 in FIG. 5). Brightness difference It may be performed to exclude processing from the object to get the residual integral values for the following block value.

また、本実施形態においては、データ間引き部31はGr成分のみ抽出し残りの成分は間引いていたが、本発明はこれには限定されず、例えば他の成分のみ抽出したり、或いは2つの成分を抽出したりしてもよい。   In this embodiment, the data thinning unit 31 extracts only the Gr component and thins out the remaining components. However, the present invention is not limited to this. For example, only the other components are extracted or two components are extracted. Or may be extracted.

本実施形態において、手ぶれ検出部3は手ぶれ量検出のための構成として、データ間引き部31、マクロブロック分割部32、ブロック抽出部33、輝度差比較部34、残差取得部35、ブロック選出部36、手ぶれ量取得部37とを更に有していたが、これら手ぶれ検出部3の各構成は、それらの処理を行うためのハードウェアとして撮像装置1に組み込まれていてもよいし、手ぶれ検出部3の制御に従い処理を行うソフトウェアであってもよい。   In the present embodiment, the camera shake detection unit 3 includes a data thinning unit 31, a macroblock division unit 32, a block extraction unit 33, a luminance difference comparison unit 34, a residual acquisition unit 35, and a block selection unit as a configuration for detecting the amount of camera shake. 36, the camera shake amount acquisition unit 37 is further included. However, each component of the camera shake detection unit 3 may be incorporated in the imaging apparatus 1 as hardware for performing the processing, or camera shake detection. Software that performs processing according to the control of the unit 3 may be used.

図1は、第1実施形態の撮像装置1の構成を示すブロック図である。FIG. 1 is a block diagram illustrating a configuration of the imaging apparatus 1 according to the first embodiment. 図2は、RAW画像データの構成の一例を示す図である。FIG. 2 is a diagram illustrating an example of the configuration of RAW image data. 図3は、残差逐次検定法について説明するための図である。FIG. 3 is a diagram for explaining the residual sequential test method. 図4は、本実施形態におけるブロック抽出部33のブロック抽出の具体例を示す図である。FIG. 4 is a diagram illustrating a specific example of block extraction by the block extraction unit 33 in the present embodiment. 図5は、本実施形態の撮像装置1の撮影時の動作例を示すフローチャートである。FIG. 5 is a flowchart illustrating an operation example at the time of shooting of the imaging apparatus 1 of the present embodiment. 図6は、テンプレートブロックTが探索ブロックIを探索する様子を示した図である。FIG. 6 is a diagram showing how the template block T searches for the search block I. 図7は、1/8間引き画像と1/2間引き画像における残差積分値最小の画素がある範囲を示した図である。FIG. 7 is a diagram illustrating a range in which a pixel having a minimum residual integral value exists in the 1/8 thinned image and the 1/2 thinned image. 図8は、第2実施形態の撮像装置1の撮影時の動作例を示すフローチャートである。FIG. 8 is a flowchart illustrating an operation example at the time of photographing of the imaging apparatus 1 according to the second embodiment. 図9は、第3実施形態の残差算出部35が粗サーチ時に残差を算出する所定の範囲について説明するための図である。FIG. 9 is a diagram for explaining a predetermined range in which the residual calculation unit 35 of the third embodiment calculates the residual during the rough search.

符号の説明Explanation of symbols

1…撮像装置、2…カメラ、3…手ぶれ量検出部、31…データ間引き部、32…マクロブロック分割部、33…ブロック抽出部、34…輝度差比較部、35…残差取得部、36…ブロック選出部、37…手ぶれ量算出部、4…画像合成部、5…バッファメモリ   DESCRIPTION OF SYMBOLS 1 ... Imaging device, 2 ... Camera, 3 ... Camera shake amount detection part, 31 ... Data thinning part, 32 ... Macroblock division part, 33 ... Block extraction part, 34 ... Luminance difference comparison part, 35 ... Residual acquisition part, 36 ... block selection unit, 37 ... blurring amount calculation unit, 4 ... image synthesis unit, 5 ... buffer memory

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.
前記ブロック抽出手段は、前記参照画像を基に、隣接する複数のマクロブロックの中央に位置する所定の大きさのブロックを抽出して前記第2のブロックとし、前記基準画像を基に、前記参照画像の隣接する複数のマクロブロックに対応する隣接する複数のマクロブロック分のブロックを抽出して前記第1のブロックとする
ことを特徴とする請求項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.
前記データ間引き部は、前記基準画像及び参照画像のRAWデータの所定の成分のみを抽出し、間引いて前記間引き画像を生成し、
前記マクロブロック分割手段及び前記ブロック抽出手段は、前記基準画像及び前記参照画像の代わりに、前記データ間引き部が生成した前記間引き画像を使用する
ことを特徴とする請求項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.
前記残差取得手段は、前記粗サーチ時にブロック選出手段が選出した前記残差積分値が小さいマクロブロックに対して精サーチする際に、粗サーチ時にブロック内で最小の残差を取得した近傍の画素に対してのみ残差取得を行う
ことを特徴とする請求項に記載の手ぶれ量検出装置。
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のブロック及び第2のブロックの残差を取得する際に、全ての範囲の残差を取得せず、所定の範囲のみの残差を取得する
ことを特徴とする請求項1からのいずれか一項に記載の手ぶれ量検出装置。
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 .
JP2006227048A 2005-12-26 2006-08-23 Camera shake amount detection device, camera shake correction device, imaging device, and camera shake amount detection method Expired - Fee Related JP5079284B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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