JP2015012482A - Image processing apparatus and image processing method - Google Patents
Image processing apparatus and image processing method Download PDFInfo
- Publication number
- JP2015012482A JP2015012482A JP2013136923A JP2013136923A JP2015012482A JP 2015012482 A JP2015012482 A JP 2015012482A JP 2013136923 A JP2013136923 A JP 2013136923A JP 2013136923 A JP2013136923 A JP 2013136923A JP 2015012482 A JP2015012482 A JP 2015012482A
- Authority
- JP
- Japan
- Prior art keywords
- images
- alignment
- movement vector
- image processing
- image
- 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.)
- Abandoned
Links
Images
Abstract
Description
本発明は、撮影で得られた複数の画像を位置合わせして合成する画像処理装置及び画像処理方法に関する。 The present invention relates to an image processing apparatus and an image processing method for aligning and synthesizing a plurality of images obtained by photographing.
移動している被写体のスピード感を表現する撮影技術として流し撮りがある。前記撮影技術は、撮影者が被写体の動きに合わせてカメラをパンニングすることにより、移動している被写体を撮影画像内では静止させて背景は流れるように写すことを目的とする。一般的な流し撮りは、撮影したい被写体(主被写体)の移動速度に合わせてシャッター速度を通常より遅めに調節することで撮影を行う。しかしながら、シャッター速度を遅くしているため、手ぶれや主被写体の移動速度とパンニング速度の差の影響により、主被写体までぶれた画像になることも多い。前記問題を鑑み、画像処理技術による流し撮りの容易化が望まれている。 There is panning as a shooting technique that expresses the speed of moving subjects. The purpose of the photographing technique is to make the photographer pan the camera in accordance with the movement of the subject so that the moving subject is stopped in the photographed image and the background flows. In general panning, shooting is performed by adjusting the shutter speed slower than usual in accordance with the moving speed of the subject (main subject) to be shot. However, since the shutter speed is slow, the main subject is often blurred due to camera shake or the difference between the moving speed of the main subject and the panning speed. In view of the above problem, facilitation of panning using an image processing technique is desired.
例えば、特許文献1では、複数の画像に含まれる動体の動きの方向に対する先頭位置を検出し、検出した先頭位置がそれぞれの画像上において同じ位置になるように、動体の位置を調整する画像処理装置が開示されている。特許文献2では、まず、ある一つの画像から特徴点を抽出し、特徴点から基準位置へのベクトルを算出する。次に、もう一つの画像からも特徴点を抽出し、最初の画像から算出された結果に基づいて、対応するベクトルの指し示す画素位置を算出する。そして、画素位置の算出回数を各画素ごとに集計し、集計結果に基づいて、二つの画像の位置を合わせる位置合わせ装置が開示されている。
For example, in
しかしながら、上述の特許文献1に開示された従来技術では、動体の先頭位置を基準に位置を合わせているため、先頭位置の動き検出に誤りがあった場合には影響を受けやすい。また、動体の先頭位置以外をどのように扱うかまでは開示されていない。
However, in the prior art disclosed in
特許文献2に開示された従来技術では、2画像間における位置合わせを前提としており、3画像以上の位置合わせにおける画像間の関係性までは開示されていない。
The prior art disclosed in
そこで、本発明の目的は、3以上の画像の位置合わせにおいて、移動ベクトル誤検出時の影響を抑制して位置を合わせる画像処理装置及び画像処理方法を提供すること。また、主被写体のある一部分のぶれを重点的に抑制した位置合わせを可能とする画像処理装置及び画像処理方法を提供することである。 SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide an image processing apparatus and an image processing method for aligning three or more images by aligning the positions while suppressing the influence of erroneous movement vector detection. It is another object of the present invention to provide an image processing apparatus and an image processing method that enable alignment while focusing on blurring of a part of a main subject.
上記目的を達成するために、本発明の画像処理装置は、撮像手段により撮像される少なくとも3以上の複数の画像において、分割した領域ごとの移動ベクトルを算出する算出手段と、前記算出手段により算出される移動ベクトルに基づいて前記複数の画像を位置合わせする位置合わせ手段と、前記分割した領域ごとに、前記位置合わせ手段で用いられる移動ベクトルを有した回数をカウントするカウント手段と、を有し、前記位置合わせ手段は、前記算出手段により算出される移動ベクトルから、前記カウント手段によりカウントされる回数を用いて、画像間の位置合わせで用いる移動ベクトルを特定することを特徴とする。 In order to achieve the above object, an image processing apparatus of the present invention calculates a movement vector for each divided area in at least three or more images captured by an imaging unit, and calculates by the calculation unit. Positioning means for aligning the plurality of images based on the movement vector to be performed, and counting means for counting the number of times the movement vector used in the alignment means is used for each of the divided areas. The alignment means specifies a movement vector used for alignment between images using the number of times counted by the counting means from the movement vector calculated by the calculation means.
本発明によれば、3以上の画像の位置合わせにおいて、移動ベクトル誤検出時の影響を抑制して位置を合わせることができる。また、主被写体のある一部分のぶれを重点的に抑制した位置合わせを可能とする。 According to the present invention, in the alignment of three or more images, it is possible to align the positions while suppressing the influence at the time of erroneous detection of the movement vector. In addition, it is possible to perform alignment while mainly suppressing the shake of a part of the main subject.
(第1の実施形態)
図1は、本発明の第1の実施形態にかかわる画像処理装置の一例としての撮像装置のブロック図である。
(First embodiment)
FIG. 1 is a block diagram of an imaging apparatus as an example of an image processing apparatus according to the first embodiment of the present invention.
撮像装置100は、デジタルカメラ、デジタルビデオカメラのようなカメラはもとより、カメラ機能付き携帯電話、カメラ付きコンピュータ、スキャナなど、撮像機能を備える任意の電子機器であっても良い。また、本実施形態における撮像装置100の一部あるいは全部をもって本実施形態における画像処理装置とすることができる。画像処理装置としては必ずしも撮像機能を有する必要はなく、撮像素子102から出力される画像あるいは各記憶装置に記憶されている画像を処理する機能を有していればよい。
The
光学系101は、レンズ、シャッター、絞りから構成されており、被写体からの光束を撮像素子102に導き、被写体の光学像を撮像素子102上に結像する。そして、焦点距離、シャッター速度、絞り値などの情報を中央演算装置(以降、CPU)103へ伝達する。
The
CCD(Charge Coupled Device)、CMOS(Complementary Metal Oxide Semiconductor)などの撮像素子102は、光学系101により結像された光学像を電気信号に変換する。その後AD変換器を通してデジタル化した後、一次記憶装置104に記憶する。また、本実施形態では、撮像素子102の画素配列はRGBの画素によるBayer配列とするが、本発明の適用はこの画素配置に限られない。例えば補色の色フィルタの画素の配列であってもよいし、このような撮影用の画素とは別に測色、測距などの目的で機能画素などを配していてもよい。なお、撮像素子102の電気的利得(以降、ISO感度)は、CPU103によって設定される。
An
ジャイロセンサなどの角速度センサ105は、振れを検出し、電気信号として変換してCPU103へ伝達する。
An
制御部として機能するCPU103は、入力された信号や予め記憶されたプログラムに従い、撮像装置100を構成する各部を制御することで、撮像装置100の各機能を実現させる。なお、以下の説明において、CPU103がプログラムを実行して実現する機能の少なくとも一部は、ASIC(Application Specific Integrated Circuit)などの専用ハードウェアによって実現されても良い。
The
一次記憶装置104は、例えばRAM(Random Access Memory)のような揮発性装置であり、CPU103の作業用に使われる。また、一次記憶装置104に記憶されている情報は、画像処理部106で利用されたり、記録媒体107へ記録されたりもする。
The
二次記憶装置108は、例えばEEPROMのような不揮発性記憶装置であり、撮像装置100を制御するためのプログラム(ファームウェア)や各種の設定情報を記憶し、CPU103によって利用される。
The
記録媒体107は、一次記憶装置104に記憶されている、撮影により得られた画像のデータなどを記録する。なお、記録媒体107は、例えば半導体メモリカードのように撮像装置100から取り外し可能であり、記録されたデータはパーソナルコンピュータなど他の機器で読み出し可能である。つまり、撮像装置100は、記録媒体107の着脱機構及び読み書き機能を有する。
The
表示部109は、CPU103の指示により一時記憶装置104内に表示用に記憶される情報を表示する機能を有する。本実施形態では、撮像素子102から連続的に取得される画像の少なくとも一部を順次表示するライブビュー(ビューファインダ)表示の機能を有する。また、撮影後記録媒体107等に記録されている記録画像の再生表示、対話的な操作のためのGUI(Graphical User Interface)などの表示の機能を有する。
The
操作部110は、ユーザの操作を受け付けてCPU103へ入力情報を伝達する入力デバイス群であり、例えばボタン、レバー、タッチパネル等はもちろん、音声や視線などを用いた入力機器であっても良い。なお、本実施形態の撮像装置100は、画像処理装置106が撮像画像に適用する画像処理のパターンを複数有し、パターンを撮像モードとして操作部110から設定可能である。
The
画像処理部106は、いわゆる現像処理と呼ばれる画像処理をはじめ、撮影モードに応じた色調の調整なども行う。例えばデモザイキング処理などの補間処理、ホワイトバランス処理、収差、歪などの補正処理、シャープネス、ガンマ処理、マトリクス演算、ルックアップテーブル等による色変換処理などがあげられる。表示部109で表示するためのリサイズ、ガンマ変換等の表示用処理、記録媒体107への記録時の符号化、圧縮等の記録用処理も画像処理部106により行う。また、本実施形態にある流し撮り画像を生成する処理も画像処理部106が行う。合成される複数の画像や処理過程で生成される画像データは、例えば一次記憶装置104に記憶される。なお、画像処理部106の機能の少なくとも一部は、CPU103がソフトウェア的に実現しても良い。
The
図2は、流し撮り撮影モードでの撮影、記録に関するCPU103の処理に関するフローチャートである。
FIG. 2 is a flowchart relating to processing of the
なお、本実施形態では、画像の撮影、記録までの指示が2段階になっており、以降に出てくる操作部110のS1は、撮影準備の指示を意味し、操作部110のS2は、本画像の撮影、記録の指示を意味する。また、本実施形態では、S1を操作部110のシャッターボタンの半押し、S2をシャッターボタンの全押しと対応付けてユーザが入力可能なようにしている。この他にも操作部110がタッチパネルである場合、タッチパネルへのタッチ操作を変えることが考えられ、任意の操作をS1、S2に割り当てることが可能である。
Note that in this embodiment, there are two steps for capturing and recording an image. S1 of the
S201で、CPU103は、操作部110からのユーザの入力を受け付ける。
In step S <b> 201, the
S202で、CPU103は、入力された情報を基に、光学系101の焦点距離、シャッター速度、絞り値などの設定を調節する。
In step S202, the
S203で、CPU103は、入力された情報を基に、撮像素子102のISO感度などの設定を調節する。
In step S <b> 203, the
S204で、CPU103は、変更された設定に関する情報を表示部109でユーザに提示する。
In step S <b> 204, the
S205で、CPU103は、角速度センサ105で検出された撮像装置100の角速度の情報を受信する。また、S205をS202やS203と同様に常に実行することで、焦点距離、シャッター速度、絞り値、ISO感度などの情報と併せて、角速度の情報も画像情報として埋め込むことができる。そして、撮影済みの画像に対して、カメラ内での再処理や、PCアプリケーションでの後加工を容易にする。記録する角速度の情報としては、角速度自体であっても良いし、画像間で移動した角度、角変位であっても良い。
In step S <b> 205, the
なお、S201〜S205の順番はこの限りではなく、処理に応じて自由に順番を入れ替えることができる。 The order of S201 to S205 is not limited to this, and the order can be freely changed according to the process.
S206で、操作部110のS1の入力の有無(ON/OFF)を判定し、操作部110のS1が入力されない限り、CPU103は、S201〜S205の動作を繰り返し行う。
In S206, the presence or absence (ON / OFF) of the input of S1 of the
以降は、S206で、操作部110のS1が入力(ON)された後の処理である。
The subsequent processing is processing after S1 of the
S207で、CPU103は、光学系101の一部である測光センサを用いて明るさを計測する。また、自動露出制御を行うAE(Auto Exposure)モードの場合は、シャッター速度と絞り値、ISO感度を用いて、自動的に露出を調節する。
In step S <b> 207, the
S208で、CPU103は、自動焦点調節制御を行うAF(Auto Focus)モードの場合、光学系101の一部あるいは撮像素子102内に配されている測距センサを用いて、被写体距離を測定し、デフォーカス量に基づいて焦点調節を行う。
In S208, in the AF (Auto Focus) mode in which automatic focus adjustment control is performed, the
なお、S207、S208の順番はこの限りではなく、処理に応じて自由に順番を入れ替えることができる。 Note that the order of S207 and S208 is not limited to this, and the order can be freely changed according to the processing.
S209では、操作部110のS2の入力の有無(ON/OFF)を判定し、操作部110のS2が入力されない限り,CPU103は、S201〜S208の動作を繰り返し行う。また、S209において操作部110のS1の入力が継続されているかどうかの検出を行い、操作部110のS1の入力が行われていない(OFF)の場合、ステップS201に戻るように構成してもよい。
In S209, the presence or absence (ON / OFF) of the input of S2 of the
以降は、S209で、操作部110のS2が入力(ON)された後の処理である。
The subsequent processing is processing after S2 of the
S210では、操作部10からのS2の撮影指示を受けて、流し撮り処理に必要な数の画像を撮影する。この際、流し撮りモードでは、ユーザが、流し撮り効果を得るため、撮像装置100(あるいは撮像素子102を含むその一部)をパンニングして撮影を行うことを想定している。流し撮りに用いる画像の数はユーザによりあらかじめ設定されていてもよいし、主被写体の速度、パンニングの量、背景領域をぼかす程度の設定などから自動的に算出される数であってもよい。
In S210, in response to the shooting instruction in S2 from the
S211では、S210で撮影された画像データに対して画像処理部106が上述したような現像処理を行う。
In S211, the
S212では、CPU103は、複数の画像間の分割した領域ごとの移動ベクトルを検出することによる主被写体領域の検出と、検出された主被写体領域での位置合わせ処理を行う。ここで、本実施形態で主被写体領域とは、撮影画像の画像内において後述する背景領域と区別して検出される被写体領域のことを指し、当該領域内の被写体が例えば複数の人物から構成されていてもよいものとする。また、本実施形態では、流し撮りの主被写体領域として、動いている被写体の領域(動体領域)を検出することとする。すなわち、複数の撮影の中で静止している被写体(静止体)は背景として取り扱われる。ただし、上述したとおり、パンニングして撮影が行われることを想定している場合、画像間で比較すると、パンニング方向の逆方向にパンニング量に対応するような動きをする被写体が元は静止している被写体である。パンニング方向に、パンニング量と同様の量の動きをする被写体が動体と判定される。詳細は後述する。一方、三脚等で固定して撮影が行われることを想定している場合、動きベクトルが大きく検出できる領域が主被写体領域と考えられる。
In S212, the
S213では、CPU103は、画像処理部106によってS212で主被写体領域が一致するように位置合わせが行われた複数枚の画像を合成し、流し撮り画像として合成画像を生成する。流し撮りと同様の視覚効果のある合成画像の生成方法としては複数の方法が考えられる。本実施形態では、撮影で得られた複数の画像の背景領域に、画像間の背景の移動量に基づいたぼかし量(タップ数)でぼかし処理(フィルタ処理等)を施し、主被写体領域が撮影された複数の画像間で一致するように位置合わせを行って加算平均で合成する。ここで、背景の移動量は、角速度センサ105によって得られる角速度から算出できる。これに限らず、例えば、主被写体領域が撮影された複数の画像間で一致するように位置合わせを行って加算し、さらに合成後の画像の主被写体領域、つまり動体の存在する動体領域以外の背景領域にぼかし処理を施してもよい。また、合成後の画像を上記のようにぼかした画像と、ぼかす前の画像とをさらに合成した画像を最終的な合成画像としてもよい。
In S213, the
S214では、CPU103は、S213で生成された合成画像データやその元となった合成前の画像データに画像処理部106によって表示用処理が施された画像データを、表示部109に表示する。
In S <b> 214, the
そして、S215では、CPU103は、記録媒体107にS213で生成された合成画像データやその元となった合成前の画像データに、記録用に符号化、圧縮等の処理が施された画像データを記録する。また、本実施形態では、記録画像の設定として、現像処理等を行っていないRAW画像の記録や、現像処理を施し規格に準拠したJPEG画像の記録などを設定可能である。それらの設定によってはS210の現像処理やS216での符号化等の処理は適用されない場合もある。
In step S215, the
また、本実施形態では、S211における現像処理後の画像に対してS212の主被写体の検出処理、及びS213の流し撮り合成処理を行ったが、これに限らず、現像処理前の画像に対して各処理を適用することも可能である。 In this embodiment, the main subject detection process in S212 and the panning composition process in S213 are performed on the image after the development process in S211. However, the present invention is not limited to this, and the image before the development process is processed. Each process can also be applied.
また、S212の主被写体領域の検出処理では、主被写体の位置が移動ベクトルを検出する探索領域内におさまることを前提としており、各画像の主被写体の位置が探索領域内におさまらない場合は、主被写体の位置が探索領域内に収まるようにする必要がある。本実施例では、S212で、画像を縮小し、低コントラストな被写体の特徴点も拾える十分な大きさの探索用ブロックを用いて移動ベクトルを検出、低精度でも主被写体の位置が探索領域におさまるようにした後、より高精度な移動ベクトル検出を行う。図3は、ユーザが車両を主被写体としてパンニングをしながら撮影を行った3枚の画像から車両を主被写体として検出し、画像間を主被写体で位置合わせする様子を示したものである。画像301、画像304、画像305がこの順で撮影された画像をそのまま表示した様子を示し、画像306は主被写体を特定するために求められるブロック単位の移動ベクトルの例を示している。画像301、画像304間で画像306のように移動ベクトル306を検出し、画像301の主被写体を302aと検出し、画像301において主被写体302aのいる領域を探索領域303として設定する。画像304、画像305において、画像301の画角内と同じ領域に設定された探索領域303に主被写体302b、302cがおさまっていないことが分かる。このような場合、主被写体302b、主被写体302cが探索領域303におさまるよう画像304、画像305を画像308、画像309のようにメモリ内で移動する。画像308、画像309における点線は、移動前の画像304、画像305での画像の端を示している。なお、図3では、画像301が基準画像であるため、画像307は移動していない。
In the main subject area detection processing in S212, it is assumed that the position of the main subject is within the search area for detecting the movement vector. If the position of the main subject in each image does not fall within the search area, The position of the main subject needs to be within the search area. In this embodiment, in S212, the motion vector is detected using a search block large enough to reduce the image and pick up the feature points of the low-contrast subject, and the position of the main subject fits in the search region even with low accuracy. After that, more accurate movement vector detection is performed. FIG. 3 shows a state in which a user is detected as a main subject from three images taken by the user while panning with the vehicle as the main subject, and the images are aligned with the main subject. An
図4(a)は、図2のS212で行われる主被写体領域(動体領域)の検出、および主被写体領域での画像間の位置合わせ処理の詳細を示したフローチャートである。 FIG. 4A is a flowchart showing details of detection of the main subject area (moving body area) and registration processing between images in the main subject area performed in S212 of FIG.
S401で、CPU103は、画像を複数の領域に分割した探索用ブロックを設定し、探索用ブロック単位で画像間における移動ベクトルを検出する。検出した移動ベクトルの中で、ほぼ同じベクトルとなるものの数を数える。計数後の状態を横軸にベクトルの大きさ、縦軸に数(度数)でヒストグラム化したものを図4(b)に示す。横軸は0を境に、移動ベクトルの方向を区別している。まず、角速度センサ105で検出される振れ(すなわち複数の画像間の撮像手段の動き情報)に基づく背景の移動量410を基準として図のように移動ベクトルが背景の移動量から離れた主被写体成分411と背景の移動量近傍の背景成分412に分類する。次に、分類された主被写体成分411の移動ベクトルの中で、数が最も多かった移動ベクトルを主被写体ベクトル413とする。ここで角速度センサ105で検出される振れの情報を用いずに移動ベクトルのヒストグラムから主被写体と背景を分類することも可能である。この場合、例えば流し撮りがユーザのパンニング撮影によって各画像でほぼ中心付近に主被写体がいると仮定し、ベクトルの大きさがゼロに近く、画像内で連続した領域に固まって存在する移動ベクトルに対応する領域が、主被写体領域と考えられる。しかし、移動ベクトルの探索領域の大きさによっては移動ベクトルの誤検出も存在するため、上記実施形態のように、センサからの振れ情報を参照した方がより精度良く主被写体と背景を分類できる。
In step S401, the
上述のようにして、S402で、CPU103は、主被写体領域に該当する移動ベクトルを検出した探索用ブロックが、それ以前の画像の位置合わせで用いられた移動ベクトルを持ったことがある場合、その回数に相当する重みを付加する。
As described above, in step S402, the
S403で、CPU103は、主被写体領域に対応する移動ベクトルを特定する。本実施形態では、角速度センサ105からの信号に基づいて対象の画像間での背景の移動量を推定し、背景に対応する移動ベクトルを除いたときに、数が最多である移動ベクトルを主被写体に対応する移動ベクトルと推定する。ただし、カウントし、移動ベクトル間で比較する数はS402で領域ごとに付加される重みを踏まえた数である。また、本実施形態では、撮像装置100の角速度を角速度センサ105によって検出しているが、これに限らず、加速度センサ、その他位置を計測するセンサ等を用いてもよい。
In step S403, the
また、S401で移動ベクトルの数を数える際、S402の探索用ブロックの重みを考慮して(重みの分、カウントするなどして)同時に処理を行っても良い。 Further, when counting the number of movement vectors in S401, the processing may be performed simultaneously in consideration of the weight of the search block in S402 (for example, counting the weight).
S404で、CPU103は、当該主被写体の移動ベクトルを用いて、一次記憶装置104のメモリ内でシフト移動による画像の位置合わせを行う。ここでは、主被写体の移動ベクトルの決定方法として、撮影がパンニングを伴って行われていることを想定しているので、上記方法で背景の移動ベクトルを分類した。上記のように背景の移動ベクトルを角速度センサ105の信号によって分類できない場合には、2番目に多い移動ベクトルを判定したり、当該移動ベクトルを持つ領域がある程度のかたまりを持って存在しているかを検出して、主被写体の移動ベクトルを推定する。また、三脚を使って撮像装置100を固定して撮影を行う場合を想定している場合、単に画像上で最多な移動ベクトルを主被写体の移動ベクトルと判定することも出来る。また、移動ベクトルは、H方向、V方向を別々に扱っても良いし、合せたものを扱っても良い。
In step S <b> 404, the
S405で、CPU103は、主被写体に対応する移動ベクトルと推定された移動ベクトルが算出された探索用ブロックに、次の探索に用いるために重みを付加する。
In step S <b> 405, the
最後に、S406で、位置合わせする残りの画像の有無を判定する。すなわち、位置合わせする画像がある限り、S401に戻り次の画像の位置合わせを行い、全ての画像の位置合わせが終了した際、図2のS212の処理を終了する。 Finally, in S406, it is determined whether there is a remaining image to be aligned. That is, as long as there is an image to be aligned, the process returns to S401, the next image is aligned, and when the alignment of all the images is completed, the process of S212 in FIG.
図4(a)の位置合わせ処理における主被写体領域の移動ベクトルの推定方法の詳細を、さらに図5(a)、(b)を用いて説明する。 Details of the method of estimating the movement vector of the main subject area in the alignment process of FIG. 4A will be described with reference to FIGS. 5A and 5B.
図5(a)において、501〜504は、連続して撮影された画像とし、領域505における位置合わせを例として取り上げる。領域505を拡大して探索用ブロックを配置したものが506である。各探索用ブロックに対して、図3の306のような移動ベクトルを検出する。
In FIG. 5A,
図5(b)は506のように設定された各探索用ブロックに対応する重みを示したものであり、RAM上に探索用ブロックの位置と対応づけられて一時的に記憶されている。507が初期値であり、本実施形態では初期値0を取る。508は、画像501と画像502の移動ベクトルの検出結果であり、512、515は、それぞれ画像502と画像503の移動ベクトルの検出結果、画像503と画像504との検出結果を示している。そして検出結果508、512、515の移動ベクトルから主被写体の移動ベクトルを算出する際に用いる重み分布はそれぞれ509、513、516である。対応する重み分布509における模様510aは検出結果508の中で最も数の多い移動ベクトルとほぼ同じベクトルである領域を示している。模様511aは、検出結果508の中で、2番目に数の多い移動ベクトルとほぼ同じベクトルである領域を示している。さらに、検出結果512に対応する重み分布513における模様510b、模様511bは、移動ベクトルの検出結果512の中で、最も数の多い移動ベクトル、2番目に数の多い移動ベクトルとそれぞれほぼ同じベクトルである領域を示している。また、検出結果515に対応する重み分布516における模様510c、模様511cは、移動ベクトルの検出結果515の中で、最も数の多い移動ベクトル、2番目に数の多い移動ベクトルとそれぞれほぼ同じベクトルである領域を示している。
FIG. 5B shows the weight corresponding to each search block set as 506, and is temporarily stored in the RAM in association with the position of the search block.
検出結果509では、重み分布509における各探索用ブロックの重みは初期値の0であるため、移動ベクトルの数が最も多い移動ベクトルを主被写体の移動ベクトルとすれば良い。したがって、重み分布509にて模様510aと模様511aの移動ベクトルの数を比較すると、模様510aが5個、模様511bが4個で模様510aの方が大きい。このため、模様510aの移動ベクトルが主被写体領域の移動ベクトルとして、後の位置合わせ処理にて用いられる。
In the
次に、検出結果512では、重み分布513において、画像501と画像502の位置合わせで用いられた移動ベクトルを持つ探索用ブロックに、重みとして1が加算されている。本例では、模様510bが移動ベクトルの数が4個、探索用ブロックの重みが2の合計6となる。したがって、模様510bの移動ベクトルを用いて位置合わせを行う。ちなみに、重みを踏まえて合計を比較したときに、最有力候補となる移動ベクトルが2種類以上になる場合は、移動ベクトルの数と探索用ブロックの重みのどちらかにより比重を与えておき、決定するものとする。あるいは、検出順に従うものとする。
Next, in the
最後に、検出結果515では、重み分布516において、画像503と画像504の位置合わせで用いられた移動ベクトルを持つ探索用ブロックに、今までの重みを引き継いだ上で1が加算されている。模様510cは、移動ベクトルの数が4個、探索用ブロックの重みが4の合計8。また、模様511cは、移動ベクトルの数が4個、探索用ブロックの重みが3の合計7となる。したがって、模様510cの移動ベクトルを主被写体領域に対応する移動ベクトルとして用いて位置合わせを行う。
Finally, in the
以上のように、本実施形態では、過去に位置合わせに用いられた被写体領域と同じ領域からの評価値を優先的に見て位置合わせする。こうすることで、501と502、502と503、503と504のように直接移動ベクトルを検出していない501と504のような関係にある画像も、画像のずれを抑えることができる。また、同じ領域の移動ベクトルを単に用いているわけではなく、重みをつけて優先的に扱うようにしている。すなわち、移動ベクトルの誤検出が発生した際も、他領域の移動ベクトルと積み重ねられてきた重みを利用することで、誤検出の影響を抑制することができる。 As described above, in the present embodiment, alignment is performed with priority given to evaluation values from the same region as the subject region used for alignment in the past. By doing so, image misalignment can also be suppressed for images such as 501 and 502, 502 and 503, and 503 and 504 that have a relationship such as 501 and 504 that do not directly detect a movement vector. In addition, the movement vectors in the same region are not simply used, but weights are given priority for handling. That is, even when an erroneous detection of a movement vector occurs, the influence of the erroneous detection can be suppressed by using the weight accumulated with the movement vector of another area.
なお、図5では、ブロックの重みを1として説明しているが、この限りではなく、重みとなる係数を自由に調節することができる。例えば、係数を0から1の間に設定し、位置合わせで用いられた回数をかけることで重みとしても良い。 In FIG. 5, the block weight is described as 1. However, the present invention is not limited to this, and the weight coefficient can be freely adjusted. For example, the coefficient may be set between 0 and 1, and the weight may be obtained by multiplying the number of times used for alignment.
以上のように、本実施形態では、3以上の画像の位置合わせにおいて、画像間で検出された主被写体の移動ベクトルに対応する領域に重みを付けて次の画像間の主被写体の移動ベクトル算出に用いる。このようにすることで、移動ベクトル誤検出時の影響を抑制して位置を合わせることができる。また、この位置合わせ手法を用いて適切な流し撮り風の合成画像を生成することができる。 As described above, in the present embodiment, in the alignment of three or more images, the area corresponding to the movement vector of the main subject detected between the images is weighted to calculate the movement vector of the main subject between the next images. Used for. By doing in this way, the position can be aligned while suppressing the influence at the time of erroneous detection of the movement vector. In addition, an appropriate panning-like composite image can be generated using this alignment method.
(第2の実施形態)
第1の実施形態では、複数の画像を主被写体で順次位置合わせする際に、画像間で検出された主被写体の移動ベクトルに対応する領域に重みを付けていき、位置合わせの精度を向上させる処理を示した。本実施形態ではさらに、角速度センサ105の信号や、公知の画像解析による顔検出、人体検出などの被写体検出結果などの補助情報を用いて、主被写体領域の中でも特にぶれさせたくない領域で位置合わせが行われるようにする。第2の実施形態にかかる撮像装置の構成は図1に示す第1の実施形態での構成と同様であるため、説明を省略する。
(Second Embodiment)
In the first embodiment, when sequentially aligning a plurality of images with a main subject, a region corresponding to the movement vector of the main subject detected between the images is weighted to improve the alignment accuracy. Processing was shown. Further, in the present embodiment, alignment is performed in an area in the main subject area that is not desired to be shaken by using auxiliary information such as a signal from the
図6は、流し撮り撮影モードでの撮影、記録に関するCPU103の処理に関するフローチャートである。
FIG. 6 is a flowchart relating to processing of the
図2と同様のステップには同一のステップ番号を付して説明を省略する。S601では、角速度センサ105の信号から検出される角速度や、公知の被写体検出結果を用いて主被写体領域と主被写体領域の中でもとくに重要とされるであろう特定の領域を決定し、この特定の領域を基準に位置合わせを行う。
Steps similar to those in FIG. 2 are denoted by the same step numbers and description thereof is omitted. In step S601, a specific area that is particularly important among the main subject area and the main subject area is determined using the angular velocity detected from the signal of the
図7は、図6のS601で行われる補助情報を用いた主被写体検出および位置合わせの処理の詳細を示したフローチャートである。なお、図4と同様の処理を行うステップには同一のステップ番号を付して説明を省略する。 FIG. 7 is a flowchart showing details of main subject detection and alignment processing using auxiliary information performed in S601 of FIG. Note that steps that perform the same processing as in FIG.
本実施形態では、S701で、CPU103は、角速度センサ105で検出される撮像装置100の角速度や、前述した被写体検出結果などから決まる被写体内で重要となる領域を基に、探索用ブロックに重みを設定する。図8を用いてより詳細に説明する。
In the present embodiment, in step S701, the
ここでは、撮像装置100の角速度からパンニング方向が判別でき、領域ごとの移動ベクトルから相対的に主被写体の移動方向901が判別できたとする。このとき、重み分布902の重みを左の色塗り部903のように主被写体の先頭を優先するように設定する。なお、色塗り部904のように主被写体の先頭の一部、例えば、主被写体の最先端を優先するように重みを設定しても良い。
Here, it is assumed that the panning direction can be determined from the angular velocity of the
画像処理部106内に組み込まれた顔検出回路等の被写体検出手段によって顔が検出された場合は、検出した被写体(領域)内の、重要となるであろう領域905、たとえば顔領域内の目の領域を中心に、重み分布906のように探索用ブロックの重みを設定する。また例えば、重み分布902と、重み分布906の考え方を組み合わせて重み分布907のように探索用ブロックの重みを設定してもよい。重要な特定の領域を決定する他の方法としては、AF動作における合焦領域の情報に基づいて合焦位置に対応する主被写体領域を特定の領域としても良い。
When a face is detected by subject detection means such as a face detection circuit incorporated in the
以上のように、本実施形態では、過去に位置合わせに用いられた被写体領域と同じ領域からの評価値を優先的に見て位置合わせする。こうすることで、画像501と画像504のような直接移動ベクトルを検出していない関係にある画像も、画像のずれを抑えることができる。特に本実施形態では、撮像装置の動き情報あるいは被写体検出情報に基づいて、特に基準としたい特定の領域を決定している。また、同じ領域の移動ベクトルを単に用いているわけではなく、重みを付けて優先的に扱うようにしている。すなわち、移動ベクトルの誤検出が発生した際も、他領域の移動ベクトルと積み重ねられてきた重みを利用することで、誤検出の影響を抑制することができる。
As described above, in the present embodiment, alignment is performed with priority given to evaluation values from the same region as the subject region used for alignment in the past. By doing so, image misalignment can also be suppressed for images such as the
また、本実施形態では、探索用ブロックに重みを付加することで、主被写体のある一部分のぶれを重点的に抑制した位置合わせが可能となる。また、撮像装置100の角速度のような撮影条件や、顔検出や人体検出のような被写体認識を用いることで、主被写体の特徴のある部分でぶれを抑制することが可能なため、より被写体ぶれの目立ちにくい画像を提供することができる。
Further, in the present embodiment, by adding a weight to the search block, it is possible to perform an alignment that mainly suppresses blurring of a part of the main subject. Further, by using shooting conditions such as the angular velocity of the
上記各実施形態において生成される合成後の画像のイメージを図9(a)〜(d)に示す。画像904は、画像901,902、903に基づいてステップS213で合成を行い生成された画像のイメージ図である。動体であり、主被写体である車両がくっきりと写り、背景の木が流れて写っている。本方法では、撮影間隔(フレームレート)や合成枚数、ぼかし処理のタップ数等によって背景の流れ方を変更、制御することができる。
Images of the combined images generated in the above embodiments are shown in FIGS. An
(他の実施形態)
本発明の目的は以下のようにしても達成できる。すなわち、前述した各実施形態の機能を実現するための手順が記述されたソフトウェアのプログラムコードを記録した記憶媒体を、システムまたは装置に供給する。そしてそのシステムまたは装置のコンピュータ(またはCPU、MPU等)が記憶媒体に格納されたプログラムコードを読み出して実行するのである。
(Other embodiments)
The object of the present invention can also be achieved as follows. That is, a storage medium in which a program code of software in which a procedure for realizing the functions of the above-described embodiments is described is recorded is supplied to the system or apparatus. The computer (or CPU, MPU, etc.) of the system or apparatus reads out and executes the program code stored in the storage medium.
この場合、記憶媒体から読み出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記憶媒体およびプログラムは本発明を構成することになる。 In this case, the program code itself read from the storage medium realizes the novel function of the present invention, and the storage medium and program storing the program code constitute the present invention.
また、プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスクなどが挙げられる。また、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−RAM、DVD−RW、DVD−R、磁気テープ、不揮発性のメモリカード、ROM等も用いることができる。 Examples of the storage medium for supplying the program code include a flexible disk, a hard disk, an optical disk, and a magneto-optical disk. Further, a CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD-R, magnetic tape, nonvolatile memory card, ROM, or the like can also be used.
また、コンピュータが読み出したプログラムコードを実行可能とすることにより、前述した各実施形態の機能が実現される。さらに、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって前述した各実施形態の機能が実現される場合も含まれる。 Further, by making the program code read by the computer executable, the functions of the above-described embodiments are realized. Furthermore, when the OS (operating system) running on the computer performs part or all of the actual processing based on the instruction of the program code, the functions of the above-described embodiments are realized by the processing. Is also included.
更に、以下の場合も含まれる。まず記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれる。その後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行う。 Furthermore, the following cases are also included. First, the program code read from the storage medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. Thereafter, based on the instruction of the program code, the CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing.
また、本発明はデジタルカメラのような撮影を主目的とした機器にかぎらず、携帯電話、パーソナルコンピュータ(ラップトップ型、デスクトップ型、タブレット型など)、ゲーム機など、撮像装置を内蔵もしくは外部接続する任意の機器に適用可能である。従って、本明細書における「撮像装置」は、撮像機能を備えた任意の電子機器を包含することが意図されている。 In addition, the present invention is not limited to devices such as digital cameras, but includes built-in or external connection of imaging devices such as mobile phones, personal computers (laptop type, desktop type, tablet type, etc.), game machines, etc. It can be applied to any device. Therefore, the “imaging device” in this specification is intended to include any electronic device having an imaging function.
100 撮像装置
101 光学系
102 撮像素子
103 中央演算装置(CPU)
104 一次記憶装置
105 画像処理装置
106 記録媒体
107 二次記憶装置
108 表示部
109 操作部
DESCRIPTION OF
104
Claims (12)
前記算出手段により算出される移動ベクトルに基づいて前記複数の画像の中の一部分を位置合わせする位置合わせ手段と、
前記分割した領域ごとに、前記位置合わせ手段で用いられる移動ベクトルを有した回数をカウントするカウント手段と、を有し、
前記位置合わせ手段は、前記算出手段により算出される移動ベクトルから、前記カウント手段によりカウントされる回数を用いて、画像間の位置合わせで用いる移動ベクトルを特定することを特徴とする画像処理装置。 Calculating means for calculating a movement vector for each divided region in at least three or more images picked up by the image pickup means;
Alignment means for aligning a part of the plurality of images based on the movement vector calculated by the calculation means;
Counting means for counting the number of movement vectors used in the alignment means for each of the divided areas;
The image processing apparatus characterized in that the alignment unit specifies a movement vector used for alignment between images from the movement vector calculated by the calculation unit, using the number of times counted by the counting unit.
前記分割した領域ごとの移動ベクトルに、前記カウント手段によりカウントされる回数に応じた重みを付けて、前記画像間の位置合わせで用いる移動ベクトルを特定することを特徴とする請求項1に記載の画像処理装置。 The alignment means includes
The movement vector used for the alignment between the images is specified by adding a weight according to the number of times counted by the counting unit to the movement vector for each divided area. Image processing device.
前記算出手段により算出される移動ベクトルから、主被写体領域であり位置合わせの基準とする特定の領域に対応する移動ベクトルを特定して画像間の位置合わせに用い、
前記複数の画像間での前記複数の画像を撮像する撮像手段の動き情報に基づいて、前記分割した領域ごとの移動ベクトルから、前記複数の画像における背景に対応する移動ベクトルを推定することを特徴とする請求項1または2に記載の画像処理装置。 The alignment means includes
From the movement vector calculated by the calculating means, a movement vector corresponding to a specific area which is a main subject area and is used as a reference for alignment is specified and used for alignment between images.
A motion vector corresponding to a background in the plurality of images is estimated from a motion vector for each of the divided regions based on motion information of an imaging unit that captures the plurality of images between the plurality of images. The image processing apparatus according to claim 1 or 2.
前記算出手段により算出される移動ベクトルから、主被写体領域であり位置合わせの基準とする特定の領域に対応する移動ベクトルを特定して画像間の位置合わせに用い、
前記複数の画像間での前記複数の画像を撮像する撮像手段の動き情報と、前記移動ベクトルとに基づいて、主被写体の移動方向を判別し、分割した領域ごとに前記主被写体の移動方向に応じた重みを付けて、前記画像間の位置合わせで用いる移動ベクトルを特定することを特徴とする請求項1乃至3のいずれか1つに記載の画像処理装置。 The alignment means includes
From the movement vector calculated by the calculating means, a movement vector corresponding to a specific area which is a main subject area and is used as a reference for alignment is specified and used for alignment between images.
Based on the movement information of the imaging means that captures the plurality of images between the plurality of images and the movement vector, the moving direction of the main subject is determined, and the moving direction of the main subject is determined for each divided region. 4. The image processing apparatus according to claim 1, wherein a movement vector to be used for alignment between the images is specified by assigning a corresponding weight. 5.
前記位置合わせ手段は、前記被写体検出手段により検出される前記特定の被写体に対応する領域の移動ベクトルを前記画像間の位置合わせで用いる移動ベクトルとして特定することを特徴とする請求項1乃至5のいずれか1つに記載の画像処理装置。 Subject detection means for detecting a specific subject in the plurality of images;
6. The alignment unit according to claim 1, wherein the alignment unit specifies a movement vector of an area corresponding to the specific subject detected by the subject detection unit as a movement vector used for alignment between the images. The image processing apparatus according to any one of the above.
前記複数の画像における合焦位置に対応する領域の移動ベクトルを前記画像間の位置合わせで用いる移動ベクトルとして特定することを特徴とする請求項1乃至6のいずれか1つに記載の画像処理装置。 The alignment means includes
The image processing apparatus according to claim 1, wherein a movement vector of an area corresponding to an in-focus position in the plurality of images is specified as a movement vector used for alignment between the images. .
前記算出手段により算出される移動ベクトルに基づいて前記複数の画像を位置合わせする位置合わせステップと、
前記分割した領域ごとに、前記位置合わせ手段で用いられる移動ベクトルを有した回数をカウントするカウントステップと、を有し、
前記位置合わせステップでは、前記算出手段により算出される移動ベクトルから、前記カウント手段によりカウントされる回数を用いて、画像間の位置合わせで用いる移動ベクトルを特定することを特徴とする画像処理方法。 A calculation step of calculating a movement vector for each divided region in at least three or more images captured by the imaging means;
An alignment step of aligning the plurality of images based on a movement vector calculated by the calculation means;
A counting step for counting the number of movement vectors used in the alignment means for each of the divided areas;
The image processing method characterized in that, in the alignment step, a movement vector to be used for alignment between images is specified from the movement vector calculated by the calculation means using the number of times counted by the counting means.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013136923A JP2015012482A (en) | 2013-06-28 | 2013-06-28 | Image processing apparatus and image processing method |
US14/286,848 US9432575B2 (en) | 2013-06-28 | 2014-05-23 | Image processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013136923A JP2015012482A (en) | 2013-06-28 | 2013-06-28 | Image processing apparatus and image processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2015012482A true JP2015012482A (en) | 2015-01-19 |
Family
ID=52305266
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013136923A Abandoned JP2015012482A (en) | 2013-06-28 | 2013-06-28 | Image processing apparatus and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2015012482A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016171460A (en) * | 2015-03-12 | 2016-09-23 | キヤノン株式会社 | Image processing system, image processing method, program and storage medium |
JP2017103688A (en) * | 2015-12-03 | 2017-06-08 | キヤノン株式会社 | Motion vector detection device and its control method |
JP2018036366A (en) * | 2016-08-30 | 2018-03-08 | キヤノン株式会社 | Image tremor correction device, imaging device and control method |
JP2018513640A (en) * | 2015-04-10 | 2018-05-24 | クゥアルコム・インコーポレイテッドQualcomm Incorporated | Automatic panning shot generation |
CN108093181A (en) * | 2018-01-16 | 2018-05-29 | 奇酷互联网络科技(深圳)有限公司 | Picture shooting method, device, readable storage medium storing program for executing and mobile terminal |
JP2019120631A (en) * | 2018-01-10 | 2019-07-22 | 株式会社デンソーテン | Camera deviation detection device, and camera deviation detection method |
US20200192932A1 (en) * | 2018-12-13 | 2020-06-18 | Sap Se | On-demand variable feature extraction in database environments |
-
2013
- 2013-06-28 JP JP2013136923A patent/JP2015012482A/en not_active Abandoned
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016171460A (en) * | 2015-03-12 | 2016-09-23 | キヤノン株式会社 | Image processing system, image processing method, program and storage medium |
JP2018513640A (en) * | 2015-04-10 | 2018-05-24 | クゥアルコム・インコーポレイテッドQualcomm Incorporated | Automatic panning shot generation |
JP2017103688A (en) * | 2015-12-03 | 2017-06-08 | キヤノン株式会社 | Motion vector detection device and its control method |
JP2018036366A (en) * | 2016-08-30 | 2018-03-08 | キヤノン株式会社 | Image tremor correction device, imaging device and control method |
JP2019120631A (en) * | 2018-01-10 | 2019-07-22 | 株式会社デンソーテン | Camera deviation detection device, and camera deviation detection method |
CN108093181A (en) * | 2018-01-16 | 2018-05-29 | 奇酷互联网络科技(深圳)有限公司 | Picture shooting method, device, readable storage medium storing program for executing and mobile terminal |
CN108093181B (en) * | 2018-01-16 | 2021-03-30 | 奇酷互联网络科技(深圳)有限公司 | Picture shooting method and device, readable storage medium and mobile terminal |
US20200192932A1 (en) * | 2018-12-13 | 2020-06-18 | Sap Se | On-demand variable feature extraction in database environments |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9489747B2 (en) | Image processing apparatus for performing object recognition focusing on object motion, and image processing method therefor | |
JP6271990B2 (en) | Image processing apparatus and image processing method | |
KR101521441B1 (en) | Image pickup apparatus, control method for image pickup apparatus, and storage medium | |
US9865064B2 (en) | Image processing apparatus, image processing method, and storage medium | |
JP5237721B2 (en) | Imaging device | |
JP2015012482A (en) | Image processing apparatus and image processing method | |
JP2008271241A (en) | Imaging apparatus, image processing apparatus, imaging method, and image processing method | |
US20150381893A1 (en) | Image processing apparatus, method for controlling the same, and storage medium | |
JP2015072324A (en) | Image processor, imaging device and image processing method | |
KR101728042B1 (en) | Digital photographing apparatus and control method thereof | |
TWI469085B (en) | Image processing apparatus, image processing method and computer readable storage medium | |
JP5936358B2 (en) | Image display device, image display method, imaging device and control method thereof, program, and storage medium storing the same | |
JP6261205B2 (en) | Image processing device | |
JP5144724B2 (en) | Imaging apparatus, image processing apparatus, imaging method, and image processing method | |
JP6300670B2 (en) | Focus adjustment apparatus, focus adjustment method and program, and imaging apparatus | |
JP6326631B2 (en) | Imaging device | |
JP4807582B2 (en) | Image processing apparatus, imaging apparatus, and program thereof | |
JP2011066827A (en) | Image processing apparatus, image processing method and program | |
JP6645711B2 (en) | Image processing apparatus, image processing method, and program | |
JP2015041865A (en) | Image processing apparatus and image processing method | |
JP2006243609A (en) | Autofocus device | |
JP6089232B2 (en) | Imaging device | |
JP2014138378A (en) | Image pickup device, control method thereof, and control program thereof | |
JP2014131188A (en) | Imaging apparatus, control method of the same, and control program | |
JP5447579B2 (en) | Tracking device, focus adjustment device, and photographing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160614 |
|
A762 | Written abandonment of application |
Free format text: JAPANESE INTERMEDIATE CODE: A762 Effective date: 20160804 |