JP6274778B2 - Image processing method, image processing apparatus, and computer program - Google Patents

Image processing method, image processing apparatus, and computer program Download PDF

Info

Publication number
JP6274778B2
JP6274778B2 JP2013170606A JP2013170606A JP6274778B2 JP 6274778 B2 JP6274778 B2 JP 6274778B2 JP 2013170606 A JP2013170606 A JP 2013170606A JP 2013170606 A JP2013170606 A JP 2013170606A JP 6274778 B2 JP6274778 B2 JP 6274778B2
Authority
JP
Japan
Prior art keywords
alignment
image
alignment target
candidate
images
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
JP2013170606A
Other languages
Japanese (ja)
Other versions
JP2015041802A5 (en
JP2015041802A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2013170606A priority Critical patent/JP6274778B2/en
Publication of JP2015041802A publication Critical patent/JP2015041802A/en
Publication of JP2015041802A5 publication Critical patent/JP2015041802A5/en
Application granted granted Critical
Publication of JP6274778B2 publication Critical patent/JP6274778B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理方法、画像処理装置、及びコンピュータプログラムに関し、特に、複数の画像の位置合わせを行うために用いて好適なものである。   The present invention relates to an image processing method, an image processing apparatus, and a computer program, and is particularly suitable for use in aligning a plurality of images.

従来から、時間的に連続した複数の画像を、位置合わせをした上で合成する技術が多数提案されている。かかる技術の一例として、手振れの影響を受けない程度のシャッター速度で複数の画像を撮影し、それら複数の画像を、位置合わせを行った上で加算平均することで、電子的に手振れを補正する技術が提案されている。また、かかる技術の他の例として、露出の異なる複数の画像を撮影し、それら複数の画像を、位置合わせを行った後に、明るさに合わせて重みを変えながら合成することで、ダイナミックレンジの拡張された画像を得る技術が提案されている。
このような技術においては、画像の加重加算を行うために、画像の位置が合っていない領域では、合成された画像においてエッジ部が多重に見える等の弊害が生じる。従って、画像の位置合わせの精度の向上は必須の課題となっている。
Conventionally, many techniques for combining a plurality of temporally continuous images after aligning them have been proposed. As an example of such a technique, a plurality of images are captured at a shutter speed that is not affected by camera shake, and the plurality of images are aligned and averaged, thereby electronically correcting camera shake. Technology has been proposed. As another example of such a technique, a plurality of images with different exposures are photographed, and after aligning these images, the dynamic range is adjusted by changing the weight according to the brightness. Techniques for obtaining extended images have been proposed.
In such a technique, since weighted addition of images is performed, in an area where the positions of the images are not aligned, there is a problem such that the edge portion looks multiple in the synthesized image. Therefore, improvement of image alignment accuracy is an essential issue.

そこで、特許文献1、2に記載の技術が提案されている。特許文献1では、画像間で複数の対応点を求めておき、当該複数の対応点の中から画面全体の動きを表す信頼性の高い対応点を抽出し、抽出した対応点から動きパラメータを算出し、算出した動きパラメータに基づき画像の位置合わせを行う技術が提案されている。
また、特許文献2では、複数の画像の中の特定のフレームから顔領域を予め検出しておき、当該顔領域で検出された動きベクトルの重み付けを大きくして、画面全体の移動パラメータを算出する技術が提案されている。
Therefore, techniques described in Patent Documents 1 and 2 have been proposed. In Patent Document 1, a plurality of corresponding points are obtained between images, a highly reliable corresponding point representing the movement of the entire screen is extracted from the plurality of corresponding points, and a motion parameter is calculated from the extracted corresponding points. A technique for aligning images based on the calculated motion parameters has been proposed.
Further, in Patent Document 2, a face area is detected in advance from a specific frame in a plurality of images, the motion vector detected in the face area is increased in weight, and the movement parameter of the entire screen is calculated. Technology has been proposed.

特開2006−229868号公報JP 2006-229868 A 特開2007−81682号公報JP 2007-81682 A

特許文献1に記載の技術では、位置合わせを行う2つの画像間で最適となる動きパラメータを算出する。しかしながら、実際の撮影シーンでは、主要な被写体と背景とのそれぞれの動きが異なる場合がある。この場合の例として、主要な被写体が人物等の移動体である場合や、主要な被写体と背景との間の距離差が原因となる場合等が挙げられる。そのような場合においては、特許文献1の技術では、次のような課題が生じる。   In the technique described in Patent Document 1, a motion parameter that is optimal between two images to be aligned is calculated. However, in an actual shooting scene, the movements of the main subject and the background may be different. Examples of this case include a case where the main subject is a moving body such as a person, or a case where a cause is a distance difference between the main subject and the background. In such a case, the technique of Patent Document 1 causes the following problems.

図17は、特許文献1における画像の合成方法を説明する図である。
図17では、3つ以上の画像が入力された場合に、位置合わせを行う各フレーム間で動きパラメータを算出する領域がばらつき、結果として合成画像1704の画質が劣化することを示す。図17に示す例では、1つ目の画像1701(基準画像)と2つ目の画像1702とでは、被写体Aで動きパラメータを算出して位置合わせを行う。一方、1つ目の画像1701と3つ目の画像1703とでは、背景Bで動きパラメータを算出して位置合わせを行う。このように異なる被写体A、Bで位置合わせを行うため、合成画像1704では、どちらの被写体A、Bにも位置が合わなくなる。
FIG. 17 is a diagram illustrating an image composition method in Patent Document 1.
FIG. 17 shows that when three or more images are input, the region for calculating the motion parameter varies between the frames to be aligned, and as a result, the image quality of the composite image 1704 deteriorates. In the example shown in FIG. 17, the first image 1701 (reference image) and the second image 1702 are adjusted by calculating the motion parameter for the subject A. On the other hand, in the first image 1701 and the third image 1703, the motion parameter is calculated for the background B and the alignment is performed. As described above, since the positions of the different subjects A and B are adjusted, the positions of the subjects A and B are not aligned in the composite image 1704.

また、特許文献2では、特定のフレームで検出された顔領域に重みをつけて動きを求める。このため、前述した位置合わせ領域のばらつきという問題は低減する。しかしながら、特に、顔領域が大きな移動量を持つ移動体である場合には、顔以外の背景領域も顔の動きに合わせて位置合わせされる。このため、結果的に背景領域の位置が大きくずれ、合成画像が劣化するという課題が生じる。   Further, in Patent Document 2, a motion is obtained by weighting a face area detected in a specific frame. For this reason, the problem of the dispersion | variation in the alignment area mentioned above reduces. However, particularly when the face area is a moving body having a large amount of movement, the background area other than the face is also aligned in accordance with the movement of the face. For this reason, the position of a background area | region will shift | deviate greatly as a result and the subject that a synthesized image deteriorates arises.

本発明は、以上のような課題に鑑みてなされたものであり、複数の画像の位置合わせを行って合成した画像の劣化を抑制することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to suppress deterioration of an image synthesized by aligning a plurality of images.

本発明の画像処理方法は、位置合わせが行われる少なくとも3つ以上の画像のうちの1つの画像である基準画像と、当該3つ以上の画像のうちの前記基準画像と異なる画像である位置合わせ対象画像のそれぞれとの位置合わせを行う画像処理方法であって、前記位置合わせ対象画像のそれぞれから、前記位置合わせを行う領域の候補である位置合わせ候補領域を抽出する候補領域抽出工程と、前記位置合わせ対象画像のそれぞれにおける前記位置合わせ候補領域の相関に基づいて、前記位置合わせ対象画像における前記位置合わせを行う領域である位置合わせ領域を導出する領域導出工程と、前記位置合わせ領域における前記基準画像と前記位置合わせ対象画像との位置のずれに基づいて、前記基準画像と、前記位置合わせ対象画像との位置合わせを行う位置合わせ工程と、を有することを特徴とする。   The image processing method according to the present invention includes a reference image that is one of at least three images to be aligned and a registration that is different from the reference image among the three or more images. An image processing method for performing alignment with each of target images, a candidate region extracting step of extracting a registration candidate region that is a candidate for the region to be aligned from each of the alignment target images; and An area deriving step for deriving an alignment area, which is an area for performing the alignment in the alignment target image, based on the correlation of the alignment candidate areas in each of the alignment target images, and the reference in the alignment area Based on the positional deviation between the image and the alignment target image, the position of the reference image and the alignment target image And having a positioning process of performing Align, a.

本発明によれば、複数の画像の位置合わせを行って合成した画像の劣化を抑制することができる。   According to the present invention, it is possible to suppress deterioration of an image synthesized by aligning a plurality of images.

撮像装置の構成の第1の例を示すブロック図である。It is a block diagram which shows the 1st example of a structure of an imaging device. 位置合わせ候補領域記憶部の処理を示すフローチャートである。It is a flowchart which shows the process of a registration candidate area | region memory | storage part. ステップS204における処理を示すフローチャートである。It is a flowchart which shows the process in step S204. 検出ブロックを示す図である。It is a figure which shows a detection block. ステップS205における処理を示すフローチャートである。It is a flowchart which shows the process in step S205. 座標変換された点と動きベクトルが示す点との距離を示す図である。It is a figure which shows the distance of the point by which the coordinate conversion was carried out, and the point which a motion vector shows. 位置合わせ候補領域を示す図である。It is a figure which shows the alignment candidate area | region. 位置合わせ候補領域の情報を示す図である。It is a figure which shows the information of a registration candidate area | region. 位置ズレ補正部における処理を示すフローチャートである。It is a flowchart which shows the process in a position shift correction | amendment part. 撮像装置の構成の第2の例を示すブロック図である。It is a block diagram which shows the 2nd example of a structure of an imaging device. 位置合わせ候補領域群記憶部の処理を示すフローチャートである。It is a flowchart which shows the process of a registration candidate area group memory | storage part. ステップS1105における処理を示すフローチャートである。It is a flowchart which shows the process in step S1105. 動きベクトルの選択の方法を説明する図である。It is a figure explaining the method of selection of a motion vector. 位置合わせ候補領域の情報を示す図である。It is a figure which shows the information of a registration candidate area | region. 位置合わせ領域決定部における処理を示すフローチャートである。It is a flowchart which shows the process in the alignment area | region determination part. 位置合わせ領域を導出する方法を説明する図である。It is a figure explaining the method of deriving an alignment area. 従来の画像の合成方法を説明する図である。It is a figure explaining the synthesis method of the conventional image.

次に、図面を参照しながら、本発明の実施形態について詳細に説明する。
(第1の実施形態)
まず、第1の実施形態について説明する。
図1は、本実施形態の画像処理装置を適用可能な撮像装置の構成の一例を示すブロック図である。
Next, embodiments of the present invention will be described in detail with reference to the drawings.
(First embodiment)
First, the first embodiment will be described.
FIG. 1 is a block diagram illustrating an example of the configuration of an imaging apparatus to which the image processing apparatus of the present embodiment can be applied.

撮像部101は、撮像レンズ群と、CMOSセンサやCCDセンサ等の半導体撮像素子と、を有する。撮像部101において、同一の被写体に対して複数回の撮影が行われ、撮影された映像信号(アナログ信号)はA/D変換部102に出力される。
A/D変換部102は、入力された映像信号をデジタル画像データに変換し、信号処理部103に出力する。信号処理部103は、入力されたデジタル画像データに対し、階調変換やノイズ低減等の所定の処理を施し、画像処理部104に出力する。
The imaging unit 101 includes an imaging lens group and a semiconductor imaging device such as a CMOS sensor or a CCD sensor. The imaging unit 101 captures the same subject a plurality of times, and the captured video signal (analog signal) is output to the A / D conversion unit 102.
The A / D conversion unit 102 converts the input video signal into digital image data and outputs the digital image data to the signal processing unit 103. The signal processing unit 103 performs predetermined processing such as gradation conversion and noise reduction on the input digital image data, and outputs the result to the image processing unit 104.

画像処理部104は、入力された複数の画像データの位置合わせを行う位置合わせ部105と、前記位置合わせが施された画像データの合成処理を行う画像合成部110とを有する。尚、以下の説明では、画像処理部104に入力される画像データを必要に応じて「入力画像」と称し、画像処理部104で合成処理が行われて出力される画像データを必要に応じて「合成画像データ」と称する。
画像表示部111は、画像処理部104で生成された合成画像データを、例えば、撮像装置100本体が備える液晶モニタに表示する。さらに、画像記憶部112は、画像処理部104で生成された画像データを、記録媒体へ記録する。
The image processing unit 104 includes a registration unit 105 that performs registration of a plurality of input image data, and an image synthesis unit 110 that performs synthesis processing of the image data subjected to the registration. In the following description, image data input to the image processing unit 104 is referred to as an “input image” as necessary, and image data output after being subjected to a synthesis process by the image processing unit 104 is used as necessary. This is referred to as “composite image data”.
The image display unit 111 displays the composite image data generated by the image processing unit 104, for example, on a liquid crystal monitor included in the main body of the imaging apparatus 100. Further, the image storage unit 112 records the image data generated by the image processing unit 104 on a recording medium.

次に、位置合わせ部105について、詳細な説明を行う。位置合わせ部105は、メモリ部106、位置合わせ候補領域記憶部107、位置合わせ領域決定部108、および位置ズレ補正部109を有する。
メモリ部106には、信号処理部103で所定の処理が施された複数の入力画像が記憶される。本実施形態では、入力画像の数は、3つ以上である。
Next, the alignment unit 105 will be described in detail. The alignment unit 105 includes a memory unit 106, an alignment candidate area storage unit 107, an alignment area determination unit 108, and a position shift correction unit 109.
The memory unit 106 stores a plurality of input images that have been subjected to predetermined processing by the signal processing unit 103. In the present embodiment, the number of input images is three or more.

<位置合わせ候補領域記憶部107>
図2は、位置合わせ候補領域記憶部107における処理の流れの一例を示すフローチャートである。
まず、ステップS201において、位置合わせ候補領域記憶部107は、メモリ部106に記憶された複数の入力画像を読み出す。
次に、ステップS202において、位置合わせ候補領域記憶部107は、ステップS201で読み出した複数の入力画像の中から、基準画像を1つ決定する。ここで基準画像とは、位置合わせを行う際の基準となる画像である。本実施形態では、複数の入力画像の中で最初に撮像された画像(1枚目の画像)を基準画像とする。
<Alignment candidate area storage unit 107>
FIG. 2 is a flowchart illustrating an example of a process flow in the alignment candidate area storage unit 107.
First, in step S <b> 201, the alignment candidate area storage unit 107 reads a plurality of input images stored in the memory unit 106.
Next, in step S202, the alignment candidate area storage unit 107 determines one reference image from the plurality of input images read in step S201. Here, the reference image is an image serving as a reference when performing alignment. In the present embodiment, an image captured first (first image) among a plurality of input images is set as a reference image.

次に、ステップS203において、位置合わせ候補領域記憶部107は、ステップS201で読み出した複数の入力画像のうち、基準画像以外の入力画像の中から、位置合わせ対象画像を1つ選択する。本実施形態では、位置合わせ対象画像は、複数の入力画像の中で最初に撮像された画像の次の画像(2枚目の画像)から撮像順に順次選択されるものとする。
次に、ステップS204において、位置合わせ候補領域記憶部107は、ステップS203で選択された位置合わせ対象画像の各検出ブロックにおける動きベクトルを検出する動きベクトル検出処理を行う。ステップS204における処理の詳細について、図3および図4を用いて説明を行う。図3は、ステップS204における処理の流れの一例を示すフローチャートである。図4は、検出ブロックの一例を示す図である。
Next, in step S203, the registration candidate area storage unit 107 selects one registration target image from the input images other than the reference image among the plurality of input images read out in step S201. In this embodiment, it is assumed that the alignment target image is sequentially selected from the next image (second image) of the first image captured among the plurality of input images in the order of image capturing.
Next, in step S204, the alignment candidate area storage unit 107 performs a motion vector detection process for detecting a motion vector in each detection block of the alignment target image selected in step S203. Details of the processing in step S204 will be described with reference to FIGS. FIG. 3 is a flowchart showing an example of the processing flow in step S204. FIG. 4 is a diagram illustrating an example of the detection block.

まず、ステップS301において、位置合わせ候補領域記憶部107は、図4に示すように、位置合わせ対象画像400を、水平方向にnH分割、垂直方向にnV分割した複数の検出ブロックに分割する。ここで、各検出ブロックをblk[0]〜blk[N-1](ただし、N=nH×nV)で識別するものとする。
次に、ステップS302において、位置合わせ候補領域記憶部107は、カウンターiの値に0(ゼロ)を設定する(i=0)。
First, in step S301, as shown in FIG. 4, the registration candidate area storage unit 107 divides the registration target image 400 into a plurality of detection blocks that are divided by n H in the horizontal direction and n V in the vertical direction. . Here, each detection block is identified by blk [0] to blk [N−1] (where N = n H × n V ).
Next, in step S302, the alignment candidate area storage unit 107 sets 0 (zero) as the value of the counter i (i = 0).

次に、ステップS303において、位置合わせ候補領域記憶部107は、次の処理を行う。すなわち、位置合わせ候補領域記憶部107は、i番目の検出ブロックblk[i]について、ステップS202で決定した基準画像と、ステップS203で選択した位置合わせ対象画像との間の相対的な位置ズレ量を表す動きベクトルを検出する。動きベクトルの検出は、例えば、特開2012−114722号公報に記載されているように、差分絶対値和を評価値としたパターンマッチング処理を行うことにより実現できるので、その詳細な説明を省略する。
次に、ステップS304において、位置合わせ候補領域記憶部107は、最後の検出ブロックblk[N-1]における動きベクトルを検出したか否かを判定する。この判定の結果、最後の検出ブロックblk[N-1]における動きベクトルを検出していない場合には、ステップS305に進む。ステップS305に進むと、位置合わせ候補領域記憶部107は、カウンターiの値をインクリメントする。そして、ステップS303に戻り、ステップS301で分割された全ての検出ブロックblk[0]〜blk[N-1]における動きベクトルが検出されるまで、ステップS303〜S305の処理を繰り返し行う。
こうして、ステップS301で分割された全ての検出ブロックblk[0]〜blk[N-1]における動きベクトルが検出されると、図3のフローチャートによる処理を終了し、図2のステップS205に進む。
Next, in step S303, the alignment candidate area storage unit 107 performs the following process. That is, the registration candidate area storage unit 107 calculates the relative positional deviation amount between the reference image determined in step S202 and the registration target image selected in step S203 for the i-th detection block blk [i]. Is detected. The detection of the motion vector can be realized by performing pattern matching processing using the sum of absolute differences as an evaluation value as described in, for example, Japanese Patent Application Laid-Open No. 2012-114722, and thus detailed description thereof is omitted. .
Next, in step S304, the alignment candidate area storage unit 107 determines whether a motion vector in the last detection block blk [N-1] has been detected. As a result of the determination, if the motion vector in the last detection block blk [N-1] has not been detected, the process proceeds to step S305. In step S305, the registration candidate area storage unit 107 increments the value of the counter i. Then, the process returns to step S303, and the processes in steps S303 to S305 are repeated until motion vectors in all the detection blocks blk [0] to blk [N-1] divided in step S301 are detected.
Thus, when the motion vectors in all the detection blocks blk [0] to blk [N−1] divided in step S301 are detected, the process according to the flowchart of FIG. 3 is terminated, and the process proceeds to step S205 of FIG.

ステップS205に進むと、位置合わせ候補領域記憶部107は、位置合わせ候補領域となる検出ブロックを、全ての位置合わせ対象画像について導出する位置合わせ候補領域導出処理を行う。ステップS205における処理の詳細について、図5を用いて説明を行う。図5は、ステップS205における処理の流れの一例を示すフローチャートである。   In step S205, the alignment candidate area storage unit 107 performs alignment candidate area derivation processing for deriving the detection blocks that become the alignment candidate areas for all the alignment target images. Details of the processing in step S205 will be described with reference to FIG. FIG. 5 is a flowchart showing an example of the processing flow in step S205.

まず、ステップS501において、位置合わせ候補領域記憶部107は、ステップS203で選択した位置合わせ対象画像の全ての検出ブロックにおける動きベクトルを、位置合わせ候補領域の初期状態として設定する。
次に、ステップS502において、位置合わせ候補領域記憶部107は、ステップS501で設定した位置合わせ候補領域に含まれる動きベクトルから、仮の変換パラメータを算出する。ここで、「仮の」と名付けている理由は、この仮の変換パラメータは、位置合わせのために画像を変形する変換パラメータとは異なることを明示するためである。仮の変換パラメータの例としては、射影変換係数やアフィン変換係数が挙げられる。
First, in step S501, the registration candidate area storage unit 107 sets motion vectors in all detection blocks of the registration target image selected in step S203 as an initial state of the registration candidate area.
Next, in step S502, the alignment candidate area storage unit 107 calculates a temporary conversion parameter from the motion vector included in the alignment candidate area set in step S501. Here, the reason for naming it “temporary” is to clearly indicate that this temporary conversion parameter is different from the conversion parameter for deforming an image for alignment. Examples of temporary conversion parameters include projective conversion coefficients and affine conversion coefficients.

次に、ステップS503において、位置合わせ候補領域記憶部107は、カウンターiの値に0(ゼロ)を設定する(i=0)。
図6は、仮の変換パラメータにより座標変換された点と動きベクトルが示す点との距離の一例を示す図である。
ステップS504において、位置合わせ候補領域記憶部107は、ステップS502で算出した仮の変換パラメータを用いて、検出ブロックblk[i]の中央座標601を座標変換する。
次に、ステップS505において、位置合わせ候補領域記憶部107は、ステップS504で座標変換した点602(座標)と、検出ブロックblk[i]における動きベクトル603が示す点(座標)との間の距離err[i]を算出する。
Next, in step S503, the alignment candidate area storage unit 107 sets 0 (zero) as the value of the counter i (i = 0).
FIG. 6 is a diagram illustrating an example of a distance between a point coordinate-converted by a temporary conversion parameter and a point indicated by a motion vector.
In step S504, the alignment candidate area storage unit 107 performs coordinate conversion of the central coordinate 601 of the detection block blk [i] using the temporary conversion parameter calculated in step S502.
Next, in step S505, the alignment candidate area storage unit 107 determines the distance between the point 602 (coordinate) whose coordinates are converted in step S504 and the point (coordinates) indicated by the motion vector 603 in the detection block blk [i]. Calculate err [i].

次に、ステップS506において、位置合わせ候補領域記憶部107は、カウンターiの値がN−1であるか否かを判定する。すなわち、位置合わせ候補領域記憶部107は、ステップS203で選択した位置合わせ対象画像の全ての検出ブロックblk[0]〜blk[N-1]について距離err[i]を算出したか否かを判定する。
この判定の結果、カウンターiの値がN−1でない場合には、ステップS507に進む。ステップS507に進むと、位置合わせ候補領域記憶部107は、カウンターiの値をインクリメントする。そして、ステップS504に戻り、ステップS203で選択した位置合わせ対象画像の全ての検出ブロックblk[0]〜blk[N-1]について距離err[i]が算出されるまで、ステップS504〜S507の処理を繰り返し行う。
こうして、ステップS203で選択した位置合わせ対象画像の全ての検出ブロックblk[0]〜blk[N-1]について距離err[i]が算出されると、ステップS508に進む。
Next, in step S506, the alignment candidate area storage unit 107 determines whether or not the value of the counter i is N-1. That is, the registration candidate area storage unit 107 determines whether or not the distance err [i] has been calculated for all the detection blocks blk [0] to blk [N−1] of the registration target image selected in step S203. To do.
If the value of the counter i is not N−1 as a result of this determination, the process proceeds to step S507. In step S507, the registration candidate area storage unit 107 increments the value of the counter i. Then, the process returns to step S504, and the processes in steps S504 to S507 are performed until the distance err [i] is calculated for all the detection blocks blk [0] to blk [N-1] of the alignment target image selected in step S203. Repeat.
When the distance err [i] is calculated for all the detection blocks blk [0] to blk [N−1] of the alignment target image selected in step S203, the process proceeds to step S508.

次に、ステップS508において、位置合わせ候補領域記憶部107は、ステップS505で算出した距離err[i]の最大値が、所定の閾値よりも大きいか否かを判定する。この判定の結果、距離err[i]の最大値が、所定の閾値よりも大きい場合には、ステップS509に進む。ステップS509に進むと、位置合わせ候補領域記憶部107は、前記最大値をとる検出ブロックを、位置合わせ候補領域から除外する。そして、ステップS502に戻る。ステップS502では、ステップS509で除外した位置合わせ候補領域を除く位置合わせ候補領域に含まれる動きベクトルから、仮の変換パラメータを算出する。そして、距離err[i]の最大値が、所定の閾値よりも大きくないと判定されるまで、前述したようにしてステップS502〜S508の処理を繰り返す。そして、ステップS508において、距離err[i]の最大値が、所定の閾値よりも大きくないと判定されると、ステップS510に進む。
ステップS510に進むと、位置合わせ候補領域記憶部107は、この時点で除外されていない位置合わせ候補領域を、ステップS203で選択した位置合わせ対象画像についての最終的な位置合わせ候補領域として確定する。そして、図5のフローチャートによる処理を終了し、図2のステップS206に進む。
Next, in step S508, the alignment candidate area storage unit 107 determines whether the maximum value of the distance err [i] calculated in step S505 is larger than a predetermined threshold value. As a result of this determination, if the maximum value of the distance err [i] is larger than the predetermined threshold value, the process proceeds to step S509. In step S509, the registration candidate area storage unit 107 excludes the detection block having the maximum value from the registration candidate area. Then, the process returns to step S502. In step S502, a temporary conversion parameter is calculated from the motion vector included in the alignment candidate area excluding the alignment candidate area excluded in step S509. Then, the processes in steps S502 to S508 are repeated as described above until it is determined that the maximum value of the distance err [i] is not larger than the predetermined threshold value. If it is determined in step S508 that the maximum value of the distance err [i] is not greater than the predetermined threshold value, the process proceeds to step S510.
In step S510, the registration candidate area storage unit 107 determines the registration candidate area that is not excluded at this time as the final registration candidate area for the registration target image selected in step S203. Then, the process according to the flowchart of FIG. 5 ends, and the process proceeds to step S206 of FIG.

図2のステップS206に進むと、位置合わせ候補領域記憶部107は、全ての位置合わせ対象画像について位置合わせ候補領域を求めたか否かを判定する。この判定の結果、全ての位置合わせ対象画像について位置合わせ候補領域を求めていない場合には、ステップS203に戻る。ステップS203に戻ると、位置合わせ候補領域記憶部107は、未選択の位置合わせ対象画像を1つ選択する。そして、全ての位置合わせ対象画像について位置合わせ候補領域を求めたと判定されるまで、前述したようにしてステップS203〜S206の処理を繰り返し行う。そして、ステップS206において、全ての位置合わせ対象画像について位置合わせ候補領域を求めたと判定されると、図2のフローチャートによる処理を終了する。
以上のように本実施形態の位置合わせ候補領域記憶部107は、位置合わせ候補領域を抽出する候補領域抽出処理と、位置合わせ領域を導出する領域導出処理を行う。また、候補領域抽出処理では、動きベクトル検出処理と、仮変換係数の演算処理と、距離導出処理とが行われる。
In step S206 of FIG. 2, the registration candidate area storage unit 107 determines whether registration candidate areas have been obtained for all the registration target images. If the result of this determination is that the alignment candidate areas have not been obtained for all the alignment target images, the process returns to step S203. Returning to step S203, the alignment candidate area storage unit 107 selects one unselected alignment target image. The processes in steps S203 to S206 are repeated as described above until it is determined that the alignment candidate areas have been obtained for all the alignment target images. If it is determined in step S206 that the alignment candidate areas have been obtained for all the alignment target images, the processing according to the flowchart of FIG. 2 ends.
As described above, the alignment candidate area storage unit 107 according to the present embodiment performs the candidate area extraction process for extracting the alignment candidate area and the area derivation process for deriving the alignment area. In the candidate area extraction process, a motion vector detection process, a temporary conversion coefficient calculation process, and a distance derivation process are performed.

<位置合わせ領域決定部108>
図7は、位置合わせ領域決定部108における処理内容の一例を説明する図であり、3つの画像について、位置合わせ候補領域になる検出ブロックと位置合わせ候補領域にならない検出ブロックをそれぞれ示す図である。図8は、位置合わせ領域決定部108における処理内容の一例を説明する図であり、図7に示す3つの画像について、位置合わせ候補領域の情報を表形式で示す図である。
<Alignment area determination unit 108>
FIG. 7 is a diagram for explaining an example of processing contents in the alignment region determination unit 108, and shows a detection block that becomes a registration candidate region and a detection block that does not become a registration candidate region for three images. . FIG. 8 is a diagram for explaining an example of processing contents in the alignment region determination unit 108, and is a diagram showing information on alignment candidate regions in a table format for the three images shown in FIG.

図7および図8では、位置合わせ対象画像701a〜701c(画像1〜画像3)が3つであり、ブロック分割数Nが12(N=12)の場合を例に挙げて示す。
図7および図8に示すように、位置合わせ領域決定部108は、全ての位置合わせ対象画像に対する位置合わせ候補領域を入力し、入力した位置合わせ候補領域に共通(重複)する検出ブロックを抽出する。そして、位置合わせ領域決定部108は、抽出した検出ブロックの集合を、位置合わせ領域として決定する。図7に示す例では、グレーで塗りつぶされている検出ブロックを位置合わせ候補領域にならない検出ブロックとし、その他の検出ブロックを位置合わせ候補領域になる検出ブロックとしている。また、図7の検出ブロック内に示す数字は、検出ブロックを識別するブロック番号である。図7および図8に示す例では、ブロック番号が「0」、「1」、「5」、「6」、「7」、「11」の6個の検出ブロックが、3つの位置合わせ対象画像に共通する位置合わせ候補領域に対応する検出ブロックである。したがって、これら6個のブロックの集合が位置合わせ領域として決定される。
7 and 8 exemplify a case where there are three alignment target images 701a to 701c (image 1 to image 3) and the block division number N is 12 (N = 12).
As shown in FIGS. 7 and 8, the alignment region determination unit 108 inputs alignment candidate regions for all alignment target images, and extracts detection blocks that are common (overlapping) to the input alignment candidate regions. . Then, the alignment area determination unit 108 determines the set of extracted detection blocks as the alignment area. In the example illustrated in FIG. 7, detection blocks that are filled in gray are detection blocks that do not become alignment candidate areas, and other detection blocks are detection blocks that become alignment candidate areas. The numbers shown in the detection blocks in FIG. 7 are block numbers for identifying the detection blocks. In the example shown in FIGS. 7 and 8, the six detection blocks having the block numbers “0”, “1”, “5”, “6”, “7”, “11” have three alignment target images. This is a detection block corresponding to the alignment candidate area common to the two. Therefore, a set of these six blocks is determined as an alignment region.

<位置ズレ補正部109>
図9、位置ズレ補正部109における処理の流れの一例を示すフローチャートである。
まず、ステップS901において、位置ズレ補正部109は、位置合わせ対象画像を1つ選択する。ここでは、撮影順に1つずつ位置合わせ対象画像が選択されるものとする。
次に、ステップS902において、位置ズレ補正部109は、位置合わせ領域決定部108において決定された位置合わせ領域を入力し、当該位置合わせ領域で検出されている動きベクトルから、位置合わせを行うための変換パラメータを推定する。ここでは、変換パラメータは射影変換係数とし、変換パラメータの推定の手法は最小二乗法とする。
<Position shift correction unit 109>
FIG. 9 is a flowchart illustrating an example of a processing flow in the positional deviation correction unit 109.
First, in step S901, the positional deviation correction unit 109 selects one alignment target image. Here, it is assumed that the alignment target images are selected one by one in the shooting order.
Next, in step S902, the positional deviation correction unit 109 inputs the alignment region determined by the alignment region determination unit 108, and performs alignment from the motion vector detected in the alignment region. Estimate conversion parameters. Here, the transformation parameter is a projective transformation coefficient, and the method of estimating the transformation parameter is a least square method.

次に、ステップS903において、位置ズレ補正部109は、ステップS902で推定した変換パラメータを用いて、処理している位置合わせ対象画像の座標変換を行い、基準画像との位置合わせを実行する。
次に、ステップS904において、位置ズレ補正部109は、全ての位置合わせ対象画像の座標変換を行って基準画像との位置合わせを実行したか否かを判定する。この判定の結果、全ての位置合わせ対象画像の座標変換を行って基準画像との位置合わせを実行していない場合には、ステップS905に進む。ステップS905に進むと、位置ズレ補正部109は、処理対象の位置合わせ対象画像を未選択の位置合わせ対象画像に変更する。そして、ステップS902、S903の処理により、変更した位置合わせ対象画像の座標変換を行って基準画像との位置合わせを実行する。そして、ステップS904において、全ての位置合わせ対象画像の座標変換を行って基準画像との位置合わせを実行したと判定されるまで、ステップS902〜S905の処理を繰り返し行う。こうして、ステップS904において、全ての位置合わせ対象画像の座標変換を行って基準画像との位置合わせを実行したと判定されると、図9のフローチャートによる処理を終了する。
Next, in step S903, the positional deviation correction unit 109 performs coordinate conversion of the alignment target image being processed using the conversion parameter estimated in step S902, and performs alignment with the reference image.
Next, in step S904, the positional deviation correction unit 109 determines whether or not alignment with the reference image has been performed by performing coordinate conversion of all the alignment target images. If the result of this determination is that coordinate conversion of all alignment target images has not been performed and alignment with the reference image has not been executed, processing proceeds to step S905. In step S905, the positional deviation correction unit 109 changes the processing target alignment target image to an unselected alignment target image. Then, by the processing in steps S902 and S903, coordinate conversion of the changed alignment target image is performed to perform alignment with the reference image. In step S904, the processes in steps S902 to S905 are repeated until it is determined that the coordinate conversion of all the alignment target images has been performed and the alignment with the reference image has been executed. In this way, if it is determined in step S904 that the coordinate conversion of all the alignment target images has been performed and the alignment with the reference image has been executed, the processing according to the flowchart of FIG.

以上、位置合わせ候補領域記憶部107、位置合わせ領域決定部108、位置ズレ補正部109の処理により、前記複数の入力画像の位置合わせが実行される。以上が、位置合わせ部105の処理内容である。   As described above, the registration of the plurality of input images is executed by the processing of the registration candidate area storage unit 107, the registration area determination unit 108, and the positional deviation correction unit 109. The above is the processing content of the alignment unit 105.

以上説明したように、本実施形態では、3つ以上の入力画像の1つを基準画像とし、残りを位置合わせ対象画像とする。全ての位置合わせ対象画像について以下の処理を行って、位置合わせ対象画像を分割した複数の検出ブロックにより定まる位置合わせ候補領域を確定する。すなわち、各検出ブロックにおける仮の変換パラメータを用いて各検出ブロックの所定の位置を座標変換した点と、各検出ブロックの当該所定の位置から動きベクトルとに基づく位置だけ離れた点との距離err[i]との導出を行う。そして、この距離err[i]の最大値が閾値よりも大きくなる検出ブロックを含まない検出ブロックの組み合わせを探索し、探索した組み合わせを位置合わせ候補領域として確定する。次に、全ての位置合わせ対象画像の位置合わせ候補領域で共通する検出ブロック(の組み合わせ)を位置合わせ領域とし、位置合わせ領域における動きベクトルから変換パラメータを導出することを全ての位置合わせ対象画像について行う。このようにして導出した変換パラメータを用いて位置合わせ対象画像のそれぞれと基準画像との位置合わせを行い、合成する。   As described above, in the present embodiment, one of the three or more input images is set as the reference image, and the rest is set as the alignment target image. The following processing is performed for all the alignment target images to determine alignment candidate areas determined by a plurality of detection blocks obtained by dividing the alignment target image. That is, a distance err between a point obtained by coordinate conversion of a predetermined position of each detection block using a temporary conversion parameter in each detection block and a point separated from the predetermined position of each detection block by a position based on a motion vector Derived from [i]. Then, a combination of detection blocks not including a detection block in which the maximum value of the distance err [i] is larger than the threshold is searched, and the searched combination is determined as a registration candidate region. Next, the detection block common to the alignment candidate areas of all the alignment target images is set as the alignment area, and conversion parameters are derived from the motion vectors in the alignment areas for all the alignment target images. Do. Using the conversion parameters derived in this way, each of the alignment target images and the reference image are aligned and synthesized.

このように、位置合わせ対象画像のそれぞれに対して、位置合わせを行う候補となる領域を保持しておき、その中から、位置合わせ対象画像間で共通する部分のみを選択し、位置合わせのための変換パラメータを推定する領域とする。したがって、位置合わせ対象画像の全体を通して、最も位置の相関が大きい領域で位置合わせを行うことができる。よって、位置合わせを行う領域が画像間でばらつく悪影響を低減でき、また、局所的な移動体で位置合わせを行う悪影響も低減することができる。以上のように本実施形態では、複数の画像の位置合わせを行って合成した画像の劣化を抑制することができる。   In this way, for each of the alignment target images, an area that is a candidate for alignment is held, and only a portion that is common between the alignment target images is selected from among the regions, and for alignment It is assumed that the transformation parameter is estimated. Therefore, alignment can be performed in the region where the correlation of the position is the largest throughout the entire alignment target image. Therefore, it is possible to reduce the adverse effect that the region to be aligned varies between images, and it is also possible to reduce the adverse effect of performing alignment with a local moving body. As described above, in the present embodiment, it is possible to suppress deterioration of an image synthesized by aligning a plurality of images.

(第2の実施形態)
次に、本発明の第2の実施形態について説明する。
第1の実施形態では、夫々の位置合わせ対象画像に対して位置合わせ候補領域を1つずつ求め、位置合わせ対象画像の位置合わせ領域で共通する検出ブロックを用いて位置合わせを行った。これに対し、本実施形態では、夫々の位置合わせ対象画像に対して位置合わせ候補領域を複数求める。そして、求めた複数の位置合わせ候補領域から、各位置合わせ対象画像で位置の相関が最も大きくなる位置合わせ候補領域の組み合わせを位置合わせ領域とする。このように本実施形態と第1の実施形態とでは、位置合わせ領域を導出する際の処理の一部が主として異なる。したがって、本実施形態の説明において、第1の実施形態と同一の部分については、図1〜図9に付した符号と同一の符号を付す等して詳細な説明を省略する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described.
In the first embodiment, one alignment candidate area is obtained for each alignment target image, and alignment is performed using detection blocks common to the alignment areas of the alignment target images. On the other hand, in the present embodiment, a plurality of alignment candidate areas are obtained for each alignment target image. Then, a combination of alignment candidate areas having the largest position correlation in each alignment target image from the obtained plurality of alignment candidate areas is set as the alignment area. As described above, the present embodiment and the first embodiment mainly differ in a part of the processing when deriving the alignment region. Therefore, in the description of the present embodiment, the same parts as those in the first embodiment are denoted by the same reference numerals as those in FIGS.

図10は、本実施形態の画像処理装置を適用可能な撮像装置の構成の一例を示すブロック図である。
図1に示した第1の実施形態の撮像装置100と比較すると、本実施形態の撮像装置1000は、画像処理部1001における位置合わせ部1002の構成の一部が異なる。具体的に説明すると、本実施形態の撮像装置1000は、位置合わせ候補領域記憶部107の代わりに、位置合わせ候補領域群記憶部1003を有する。また、本実施形態の撮像装置1000は、位置合わせ領域決定部108の代わりに、位置合わせ領域決定部1004を有する。本実施形態の撮像装置1000のこれら以外の構成は、第1の実施形態の撮像装置100と同じである。従って、ここでは、位置合わせ候補領域群記憶部1003および位置合わせ領域決定部1004の処理内容の一例について詳細に説明を行う。
FIG. 10 is a block diagram illustrating an example of the configuration of an imaging apparatus to which the image processing apparatus of this embodiment can be applied.
Compared with the imaging apparatus 100 of the first embodiment shown in FIG. 1, the imaging apparatus 1000 of the present embodiment is different in part of the configuration of the alignment unit 1002 in the image processing unit 1001. Specifically, the imaging apparatus 1000 according to the present embodiment includes a registration candidate area group storage unit 1003 instead of the registration candidate area storage unit 107. Further, the imaging apparatus 1000 according to the present embodiment includes an alignment region determination unit 1004 instead of the alignment region determination unit 108. Other configurations of the imaging apparatus 1000 of the present embodiment are the same as those of the imaging apparatus 100 of the first embodiment. Therefore, here, an example of processing contents of the alignment candidate area group storage unit 1003 and the alignment area determination unit 1004 will be described in detail.

<位置合わせ候補領域群記憶部1003>
図11は、位置合わせ候補領域群記憶部1003における処理の流れの一例を示すフローチャートである。図11のフローチャートは、第1の実施形態における図2のフローチャートと対応しており、図2との差異は、図2のステップS205の位置合わせ候補領域導出処理の代わりに、ステップS1105の位置合わせ候補領域群導出処理を行う点である。
従って、ここではステップS1105の処理内容の一例について、図12〜図14を用いて、詳細な説明を行う。
<Alignment candidate area group storage unit 1003>
FIG. 11 is a flowchart illustrating an example of a process flow in the alignment candidate area group storage unit 1003. The flowchart in FIG. 11 corresponds to the flowchart in FIG. 2 in the first embodiment. The difference from FIG. 2 is that the alignment candidate area derivation process in step S205 in FIG. The candidate area group derivation process is performed.
Therefore, here, an example of the processing content of step S1105 will be described in detail with reference to FIGS.

図12は、ステップS1105における処理の流れの一例を示すフローチャートである。
まず、ステップS1201において、位置合わせ候補領域群記憶部1003は、ステップS1104で検出された各検出ブロックにおける動きベクトルを所定の順番でソートする。本実施形態では、前記所定の順番でソートするとは、位置合わせ対象画像の中央から検出ブロックまでの距離が近い検出ブロックから順番にソートすることとする。
FIG. 12 is a flowchart illustrating an example of the processing flow in step S1105.
First, in step S1201, the alignment candidate area group storage unit 1003 sorts the motion vectors in the respective detection blocks detected in step S1104 in a predetermined order. In the present embodiment, sorting in the predetermined order means sorting in order from detection blocks having a short distance from the center of the alignment target image to the detection block.

次に、ステップS1202において、位置合わせ候補領域群記憶部1003は、前記所定の順番でソートされた検出ブロックのうち、先頭の検出ブロックから所定の数の検出ブロックまでの中のA個の検出ブロックにおける(A個の)動きベクトルを選択する。ここで選択する動きベクトルの個数(A)は、後述の変換パラメータの算出が可能な数とする。
図13は、動きベクトルの選択の方法の一例を説明する図である。具体的に図13(a)は、動きベクトルのソートの基準となる位置合わせ対象画像の中央の位置(基準点1301)の一例を示す図である。また、図13(b)は、選択した動きベクトルの組み合わせの一例を示す図である。図13では、検出ブロックの数Nが12(N=12)であり、選択する動きベクトルの数Aが3(A=3)であり、前記所定の数が12である場合を例に挙げて示す。
Next, in step S1202, the registration candidate region group storage unit 1003 includes A detection blocks from the first detection block to a predetermined number of detection blocks among the detection blocks sorted in the predetermined order. Select (A) motion vectors at. The number (A) of motion vectors to be selected here is a number that allows calculation of conversion parameters described later.
FIG. 13 is a diagram illustrating an example of a method for selecting a motion vector. Specifically, FIG. 13A is a diagram illustrating an example of the center position (reference point 1301) of the alignment target image that is a reference for sorting motion vectors. FIG. 13B is a diagram illustrating an example of combinations of selected motion vectors. In FIG. 13, as an example, the number N of detection blocks is 12 (N = 12), the number A of motion vectors to be selected is 3 (A = 3), and the predetermined number is 12. Show.

図13(a)の各検出ブロック内に示す数字は、検出ブロックを識別するブロック番号を示す。また、図13(b)において、ブロック番号の順序の欄の下に示す数字は、ブロック番号を示し、左に示すブロック番号であるほどソートの順番が上位(早い)ことを示す。また、動きベクトルの組み合わせの欄の下に示す数字は、動きベクトルの組み合わせを識別する番号である。この番号として、1から昇順に整数が与えられる。前述したように、図13では、検出ブロックの数Nが12であり、選択する動きベクトルの数Aが3であるので、動きベクトルを選択する組み合わせは、全体で123通り存在する。
図13(b)では、丸(〇)が付されたブロック番号で識別される検出ブロックの動きベクトルが選択されることを示す。また、基準点1301からの距離が同じ複数の検出ブロックについては、ブロック番号が小さい検出ブロックであるほど上位の順番になるように(早い順番なるように)ソートされるものとする。
例えば、番号「1」の動きベクトルの組み合わせは、ブロック番号「1」、「5」、「6」の検出ブロックにおける動きベクトルの組み合わせからなる。また、ブロック番号「5」の検出ブロックにおける動きベクトルが最も早い順番になり、ブロック番号「5」の検出ブロックにおける動きベクトルが最も早い順番になる。
The numbers shown in each detection block in FIG. 13A indicate a block number for identifying the detection block. In FIG. 13B, the number shown below the column of the block number order indicates the block number, and the block number shown on the left indicates that the sorting order is higher (earlier). The numbers shown below the motion vector combination column are numbers for identifying the motion vector combinations. As this number, an integer is given in ascending order from 1. As described above, in FIG. 13, since the number N of detection blocks is 12 and the number A of motion vectors to be selected is 3, there are 12 C 3 combinations in total for selecting motion vectors.
FIG. 13B shows that the motion vector of the detection block identified by the block number with a circle (◯) is selected. Further, a plurality of detection blocks having the same distance from the reference point 1301 are sorted so that the detection block with the smaller block number is in the higher order (in order of higher order).
For example, the combination of motion vectors of number “1” is a combination of motion vectors in the detection blocks of block numbers “1”, “5”, and “6”. Also, the motion vectors in the detection block with the block number “5” are in the earliest order, and the motion vectors in the detection block with the block number “5” are in the earliest order.

図12の説明に戻り、ステップS1203において、位置合わせ候補領域群記憶部1003は、ステップS1202で選択したA個の動きベクトルから、仮の変換パラメータを算出する。仮の変換パラメータの例としては、射影変換係数やアフィン変換係数が挙げられる。
次に、ステップS1204において、位置合わせ候補領域群記憶部1003は、カウンターiの値に0(ゼロ)を設定する(i=0)。
次に、ステップS1205において、位置合わせ候補領域群記憶部1003は、ステップS1203で算出した仮の変換パラメータを用いて、検出ブロックblk[i]の中央座標を座標変換する(図6を参照)。
Returning to the description of FIG. 12, in step S1203, the registration candidate region group storage unit 1003 calculates temporary conversion parameters from the A motion vectors selected in step S1202. Examples of temporary conversion parameters include projective conversion coefficients and affine conversion coefficients.
Next, in step S1204, the alignment candidate area group storage unit 1003 sets 0 (zero) as the value of the counter i (i = 0).
Next, in step S1205, the alignment candidate area group storage unit 1003 performs coordinate conversion of the central coordinates of the detection block blk [i] using the temporary conversion parameter calculated in step S1203 (see FIG. 6).

次に、ステップS1206において、位置合わせ候補領域群記憶部1003は、ステップS1205で座標変換した点(座標)と、検出ブロックblk[i]における動きベクトルが示す点(座標)との間の距離err[i]を算出する(図6を参照)。
次に、ステップS1207において、位置合わせ候補領域群記憶部1003は、カウンターiの値がN−1であるか否かを判定する。すなわち、位置合わせ候補領域群記憶部1003は、ステップS1003で選択した位置合わせ対象画像の全ての検出ブロックblk[0]〜blk[N-1]について距離err[i]を算出したか否かを判定する。
Next, in step S1206, the registration candidate region group storage unit 1003 determines the distance err between the point (coordinate) coordinate-converted in step S1205 and the point (coordinate) indicated by the motion vector in the detection block blk [i]. [i] is calculated (see FIG. 6).
Next, in step S1207, the alignment candidate area group storage unit 1003 determines whether or not the value of the counter i is N-1. That is, the registration candidate region group storage unit 1003 determines whether or not the distance err [i] has been calculated for all the detection blocks blk [0] to blk [N−1] of the registration target image selected in step S1003. judge.

この判定の結果、カウンターiの値がN−1でない場合には、ステップS1208に進む。ステップS1208に進むと、位置合わせ候補領域群記憶部1003は、カウンターiの値をインクリメントする。そして、ステップS1205に戻り、ステップS1003で選択した位置合わせ対象画像の全ての検出ブロックblk[0]〜blk[N-1]について距離err[i]が算出されるまで、ステップS1205〜S1208の処理を繰り返し行う。
こうして、ステップS1003で選択した位置合わせ対象画像の全ての検出ブロックblk[0]〜blk[N-1]について距離err[i]が算出されると、ステップS1209に進む。
As a result of the determination, if the value of the counter i is not N−1, the process proceeds to step S1208. In step S1208, the registration candidate area group storage unit 1003 increments the value of the counter i. Then, the process returns to step S1205, and the processes in steps S1205 to S1208 are performed until the distance err [i] is calculated for all the detection blocks blk [0] to blk [N-1] of the alignment target image selected in step S1003. Repeat.
When the distance err [i] is calculated for all the detection blocks blk [0] to blk [N−1] of the alignment target image selected in step S1003, the process proceeds to step S1209.

ステップS1209に進むと、位置合わせ候補領域群記憶部1003は、距離err[i]の値が所定の閾値以下となる動きベクトルである候補ベクトルの数と、当該候補ベクトルに対応するブロック番号とを記憶する。
次に、ステップS1210において、位置合わせ候補領域群記憶部1003は、前記ステップS1202〜S1209の処理を、所定の組み合わせ数だけ行ったか否かを判定する。この判定の結果、ステップS1202〜S1209の処理を、所定の組み合わせ数だけ行っていない場合には、ステップS1202に戻る。ステップS1202では、位置合わせ候補領域群記憶部1003は、以下の処理を行う。すなわち、前記所定の順番でソートされた検出ブロックのうち、先頭の検出ブロックから所定の数の検出ブロックまでの中のA個の検出ブロックにおける(A個の)動きベクトルの組み合わせであって未選択の組み合わせを選択する。そして、ステップS1210において、ステップS1202〜S1209の処理を、所定の組み合わせ数だけ行ったと判定されるまで、ステップS1202〜S1210の処理を繰り返し行う。そして、ステップS1210において、ステップS1202〜S1209の処理を、所定の組み合わせ数だけ行ったと判定されると、図12のフローチャートを終了して図11のステップS1106に進む。
In step S1209, the registration candidate region group storage unit 1003 determines the number of candidate vectors that are motion vectors for which the value of the distance err [i] is equal to or less than a predetermined threshold, and the block number corresponding to the candidate vector. Remember.
Next, in step S1210, the alignment candidate area group storage unit 1003 determines whether or not the processes in steps S1202 to S1209 have been performed for a predetermined number of combinations. As a result of the determination, when the processes of steps S1202 to S1209 are not performed for a predetermined number of combinations, the process returns to step S1202. In step S1202, the alignment candidate area group storage unit 1003 performs the following processing. That is, among the detection blocks sorted in the predetermined order, a combination of (A) motion vectors in A detection blocks from the first detection block to a predetermined number of detection blocks and not selected Select a combination. In step S1210, the processes in steps S1202 to S1210 are repeated until it is determined that the processes in steps S1202 to S1209 have been performed for a predetermined number of combinations. If it is determined in step S1210 that the processes in steps S1202 to S1209 have been performed for a predetermined number of combinations, the flowchart in FIG. 12 is terminated and the process proceeds to step S1106 in FIG.

ステップS1210の結果として、前記組み合わせの夫々に対応した候補ベクトルの集合が出力される。以下の説明では、候補ベクトルの集合を必要に応じて位置合わせ候補領域と称する。
図14は、図13の場合において、前記所定の組み合わせ数を10組とした場合の位置合わせ候補領域の情報の一例を表形式で示す図である。
図14に示す例では、夫々の組み合わせに対応した、10個の位置合わせ候補領域が出力される。すなわち、動きベクトルの組み合わせの番号が「11」以降の位置合わせ候補領域を求めない。尚、図14の動きベクトルの組み合わせの番号と図13(b)の動きベクトルの組み合わせの番号は相互に対応する。例えば、図14の番号「1」の動きベクトルの組み合わせに対応する候補ベクトルは、図13(b)の番号「1」の動きベクトルの組み合わせに対応する。
As a result of step S1210, a set of candidate vectors corresponding to each of the combinations is output. In the following description, a set of candidate vectors is referred to as an alignment candidate area as necessary.
FIG. 14 is a diagram showing an example of information on alignment candidate areas in the form of a table when the predetermined number of combinations is 10 in the case of FIG.
In the example shown in FIG. 14, ten alignment candidate areas corresponding to each combination are output. In other words, the alignment candidate area whose motion vector combination number is “11” or later is not obtained. Note that the motion vector combination number in FIG. 14 and the motion vector combination number in FIG. 13B correspond to each other. For example, the candidate vector corresponding to the combination of motion vectors of number “1” in FIG. 14 corresponds to the combination of motion vectors of number “1” in FIG.

以下の説明では、ステップS1105により出力される複数の位置合わせ候補領域を、必要に応じて位置合わせ候補領域群と称する。以上が、ステップS1105の処理内容である。
最後に、図11のステップS1106において、位置合わせ候補領域群記憶部1003は、全ての位置合わせ対象画像について位置合わせ候補領域群を求めたか否かを判定する。この判定の結果、全ての位置合わせ対象画像について位置合わせ候補領域群を求めていない場合には、ステップS1103に戻る。ステップS1103に戻ると、位置合わせ候補領域群記憶部1003は、未選択の位置合わせ対象画像を1つ選択する。そして、全ての位置合わせ対象画像につい位置合わせ候補領域群を求めたと判定されるまで、前述したようにしてステップS1103〜S1106の処理を繰り返し行う。そして、ステップS1106において、全ての位置合わせ対象画像について位置合わせ候補領域群を求めたと判定されると、図11のフローチャートによる処理を終了する。
以上が、位置合わせ候補領域群記憶部1003の処理内容の一例であり、位置合わせ候補領域群記憶部1003の処理の結果として、図14に例示したような位置合わせ候補領域群が、位置合わせ対象画像の数分だけ出力される。
以上のように本実施形態の位置合わせ候補領域群記憶部1003は、位置合わせ候補領域を抽出する候補領域抽出処理と、位置合わせ領域を導出する領域導出処理を行う。また、候補領域抽出処理では、動きベクトル検出処理と、動きベクトル選択処理と、仮変換係数の演算処理と、距離導出処理とが行われる。
In the following description, the plurality of alignment candidate areas output in step S1105 are referred to as alignment candidate area groups as necessary. The above is the processing content of step S1105.
Finally, in step S1106 of FIG. 11, the alignment candidate area group storage unit 1003 determines whether or not alignment candidate area groups have been obtained for all the alignment target images. As a result of the determination, if the registration candidate region group has not been obtained for all the alignment target images, the process returns to step S1103. Returning to step S1103, the alignment candidate area group storage unit 1003 selects one unselected alignment target image. Then, the processes in steps S1103 to S1106 are repeated as described above until it is determined that the alignment candidate area group has been obtained for all the alignment target images. If it is determined in step S1106 that the alignment candidate area group has been obtained for all the alignment target images, the processing according to the flowchart of FIG. 11 ends.
The above is an example of the processing contents of the registration candidate region group storage unit 1003. As a result of the processing of the registration candidate region group storage unit 1003, the registration candidate region group illustrated in FIG. Only the number of images is output.
As described above, the alignment candidate area group storage unit 1003 according to the present embodiment performs the candidate area extraction process for extracting the alignment candidate area and the area derivation process for deriving the alignment area. In the candidate area extraction process, a motion vector detection process, a motion vector selection process, a temporary conversion coefficient calculation process, and a distance derivation process are performed.

<位置合わせ領域決定部1004>
図15は、位置合わせ領域決定部1004における処理の流れの一例を示すフローチャートである。また、図16は、位置合わせ候補領域群記憶部1003と位置合わせ領域決定部1004の処理内容(位置合わせ領域を導出する方法)の一例を説明する図である。以下、位置合わせ領域決定部1004の動作の一例を、図15および図16を参照しながら説明する。
<Alignment area determination unit 1004>
FIG. 15 is a flowchart illustrating an example of a processing flow in the alignment region determination unit 1004. FIG. 16 is a diagram for explaining an example of processing contents (a method for deriving an alignment area) of the alignment candidate area group storage unit 1003 and the alignment area determination unit 1004. Hereinafter, an example of the operation of the alignment region determination unit 1004 will be described with reference to FIGS. 15 and 16.

まず、ステップS1501において、位置合わせ領域決定部1004は、各位置合わせ対象画像の位置合わせ候補領域群の中から、候補ベクトルの数が多い順に所定の数だけ位置合わせ候補領域を抽出する。図16では、4つの入力画像のうちの1つが基準画像1601であり、残りの3つが位置合わせ対象画像1602a〜1602cであり、候補ベクトルの数が上位5位までの位置合わせ候補領域を抽出する場合の例を示す。ただし、図16において、位置合わせ候補領域群を求める際の設定は、図13および図14と同一とする。   First, in step S1501, the alignment region determination unit 1004 extracts a predetermined number of alignment candidate regions from the alignment candidate region group of each alignment target image in descending order of the number of candidate vectors. In FIG. 16, one of the four input images is the reference image 1601, the remaining three are the alignment target images 1602 a to 1602 c, and the alignment candidate regions having the top five candidate vectors are extracted. An example of the case is shown. However, in FIG. 16, the settings for obtaining the alignment candidate region group are the same as those in FIGS. 13 and 14.

次に、ステップS1502において、位置合わせ領域決定部1004は、ステップS1501で抽出した位置合わせ候補領域の中から、全ての位置合わせ対象画像で共通(重複)する検出ブロックの数が最も多くなる位置合わせ候補領域の組み合わせを抽出する。共通する検出ブロックは、例えば、第1の実施形態で説明した方法(位置合わせ位置合わせ候補領域に共通する検出ブロックを抽出する方法)と同じ処理により抽出することができる(図8を参照)。
最後に、ステップS1503において、位置合わせ領域決定部1004は、ステップS1502で抽出された位置合わせ候補領域の組み合わせを、それぞれの位置合わせ対象画像に対する位置合わせ領域とする。
図16では、位置合わせ対象画像1602a、1602b、1602cに対して、候補ベクトルの数が、それぞれ、3番目、1番目、2番目に多い位置合わせ候補領域の組み合わせで、共通する検出ブロックの数が最大になる場合を示す。
Next, in step S1502, the alignment area determination unit 1004 performs alignment that maximizes the number of detection blocks that are common (overlapping) in all alignment target images from among the alignment candidate areas extracted in step S1501. Extract candidate area combinations. The common detection block can be extracted, for example, by the same process as the method described in the first embodiment (the method for extracting the detection block common to the alignment position candidate regions) (see FIG. 8).
Finally, in step S1503, the alignment region determination unit 1004 sets the combination of alignment candidate regions extracted in step S1502 as alignment regions for the respective alignment target images.
In FIG. 16, for the alignment target images 1602a, 1602b, and 1602c, the number of candidate vectors is the combination of the third, first, and second largest number of alignment candidate regions, and the number of common detection blocks is. Indicates the maximum case.

以上が、位置合わせ領域決定部1004の処理内容である。位置合わせ領域決定部1004の処理の結果として、位置合わせ候補領域群記憶部1003で算出された複数の位置合わせ候補領域の中から、全ての位置合わせ対象画像間で共通の検出ブロック数が最も多くなる位置合わせ候補領域が選択される。そして、選択された位置合わせ候補領域が位置合わせ領域として出力される。すなわち、全ての位置合わせ対象画像間で位置の相関が最も大きくなるような位置合わせ候補領域が選択され、位置合わせ領域として出力される。   The above is the processing content of the alignment area determination unit 1004. As a result of the processing of the alignment area determination unit 1004, the number of detection blocks common to all the alignment target images is the largest among the plurality of alignment candidate areas calculated by the alignment candidate area group storage unit 1003. An alignment candidate area is selected. Then, the selected alignment candidate area is output as the alignment area. That is, an alignment candidate area that maximizes the position correlation among all the alignment target images is selected and output as an alignment area.

以上説明したように、本実施形態では、全ての位置合わせ対象画像について以下の処理を行って、各位置合わせ対象画像について位置合わせ候補領域を個別に導出する。すなわち、位置合わせ領域を分割した全ての検出ブロックから、所定数(複数)の検出ブロックの組み合わせを複数通り抽出する。そして、抽出した検出ブロックにおける動きベクトルから仮の変換パラメータを導出して距離err[i]を導出し、距離err[i]が閾値以下となる動きベクトルを候補ベクトルとして導出する。この候補ベクトルの導出を複数通りの検出ブロックの組み合わせのそれぞれについて行う。この候補ベクトルに対応する検出ブロックを位置合わせ候補領域とする。そして、全ての位置合わせ対象画像で共通する検出ブロックの数が最大となる位置合わせ候補領域を、全ての位置合わせ対象画像から抽出し、各位置合わせ対象画像における位置合わせ領域とする。   As described above, in the present embodiment, the following processing is performed for all the alignment target images, and alignment candidate areas are individually derived for each alignment target image. That is, a plurality of combinations of a predetermined number (plurality) of detection blocks are extracted from all detection blocks obtained by dividing the alignment region. Then, a temporary conversion parameter is derived from the motion vector in the extracted detection block to derive the distance err [i], and a motion vector in which the distance err [i] is equal to or less than a threshold is derived as a candidate vector. The candidate vectors are derived for each of a plurality of combinations of detection blocks. A detection block corresponding to this candidate vector is set as an alignment candidate area. Then, the alignment candidate area that maximizes the number of detection blocks common to all the alignment target images is extracted from all the alignment target images and is set as the alignment area in each alignment target image.

このように、位置合わせ対象画像のそれぞれに対して、位置合わせを行う候補となる複数の位置合わせ候補領域を保持しておき、その中から位置合わせ対象画像間で共通部分が大きくなるような位置合わせ候補領域の組み合わせを選択する。そして、選択した位置合わせ候補領域を位置合わせのための変換パラメータを推定する領域とする。したがって、第1の実施形態と同様に、位置合わせ対象画像の全体を通して、最も位置の相関が大きい領域で位置合わせを行うことができる。よって、位置合わせを行う領域が画像間でばらつく悪影響を低減でき、また、局所的な移動体で位置合わせを行う悪影響も低減することができる。以上のように、本実施形態においても、第1の実施形態と同様に、複数の画像の位置合わせを行って合成した画像の劣化を抑制することができる。
さらに、第1の実施形態では、各位置合わせ対象画像に対して、位置合わせ候補領域として候補ベクトルの集合を1パターンのみ求めた。これに対し、本実施形態では、複数パターンの位置合わせ候補領域を保持しておき、位置の相関が大きくなる位置合わせ候補領域を抽出する。従って、第1の実施形態と比較して、より相関の強い領域で位置合わせを行うことができる。
In this way, for each of the alignment target images, a plurality of alignment candidate areas that are candidates for alignment are held, and a position where the common portion between the alignment target images becomes large among them. Select a combination of matching candidate areas. Then, the selected alignment candidate area is set as an area for estimating a conversion parameter for alignment. Therefore, as in the first embodiment, alignment can be performed in the region having the largest positional correlation throughout the entire alignment target image. Therefore, it is possible to reduce the adverse effect that the region to be aligned varies between images, and it is also possible to reduce the adverse effect of performing alignment with a local moving body. As described above, also in this embodiment, as in the first embodiment, it is possible to suppress deterioration of an image synthesized by aligning a plurality of images.
Furthermore, in the first embodiment, only one pattern of candidate vector sets is obtained as an alignment candidate area for each alignment target image. On the other hand, in the present embodiment, alignment candidate areas of a plurality of patterns are held, and the alignment candidate areas where the correlation between the positions is increased are extracted. Therefore, as compared with the first embodiment, alignment can be performed in a region having a higher correlation.

尚、前述した実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。   The above-described embodiments are merely examples of implementation in carrying out the present invention, and the technical scope of the present invention should not be construed in a limited manner. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.

(その他の実施例)
本発明は、以下の処理を実行することによっても実現される。即ち、まず、以上の実施形態の機能を実現するソフトウェア(コンピュータプログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給する。そして、そのシステム或いは装置のコンピュータ(又はCPUやMPU等)が当該コンピュータプログラムを読み出して実行する。
(Other examples)
The present invention is also realized by executing the following processing. That is, first, software (computer program) for realizing the functions of the above embodiments is supplied to a system or apparatus via a network or various storage media. Then, the computer (or CPU, MPU, etc.) of the system or apparatus reads and executes the computer program.

107 位置合わせ候補領域記憶部、108 位置合わせ領域決定部、109 位置ズレ補正部   107 Positioning candidate area storage unit, 108 Positioning area determination unit, 109 Position shift correction unit

Claims (10)

位置合わせが行われる少なくとも3つ以上の画像のうちの1つの画像である基準画像と、当該3つ以上の画像のうちの前記基準画像と異なる画像である位置合わせ対象画像のそれぞれとの位置合わせを行う画像処理方法であって、
前記位置合わせ対象画像のそれぞれから、前記位置合わせを行う領域の候補である位置合わせ候補領域を抽出する候補領域抽出工程と、
前記位置合わせ対象画像のそれぞれにおける前記位置合わせ候補領域の相関に基づいて、前記位置合わせ対象画像における前記位置合わせを行う領域である位置合わせ領域を導出する領域導出工程と、
前記位置合わせ領域における前記基準画像と前記位置合わせ対象画像との位置のずれに基づいて、前記基準画像と、前記位置合わせ対象画像との位置合わせを行う位置合わせ工程と、を有することを特徴とする画像処理方法。
Alignment between a reference image that is one of at least three images to be aligned and each of the alignment target images that are different from the reference image among the three or more images An image processing method for performing
A candidate region extraction step of extracting a registration candidate region that is a candidate for a region to be aligned from each of the alignment target images;
An area derivation step for deriving an alignment area that is an area for performing the alignment in the alignment target image based on the correlation of the alignment candidate areas in each of the alignment target images;
An alignment step of performing alignment between the reference image and the alignment target image based on a positional shift between the reference image and the alignment target image in the alignment region. Image processing method.
記領域導出工程は、前記位置合わせ対象画像の全ての前記位置合わせ候補領域で共通する領域を、前記位置合わせ対象画像のそれぞれにおける前記位置合わせ領域として導出することを特徴とする請求項1に記載の画像処理方法。 Before SL region deriving step is a common area for all of the positioning candidate region of said alignment target image, to claim 1, wherein the deriving as said alignment region in each of said alignment target image The image processing method as described. 前記候補領域抽出工程は、前記位置合わせ対象画像のそれぞれから、前記位置合わせを行う領域の候補である位置合わせ候補領域を少なくとも2つずつ抽出し、
前記領域導出工程は、前記位置合わせ対象画像の全てから1つずつ選択される前記位置合わせ候補領域の組み合わせのうち、当該選択される前記位置合わせ候補領域の全てで共通する領域が最も大きくなる組み合わせを、前記位置合わせ対象画像のそれぞれにおける前記位置合わせ領域として導出することを特徴とする請求項1に記載の画像処理方法。
In the candidate area extraction step, at least two alignment candidate areas that are candidates for the area to be aligned are extracted from each of the alignment target images.
In the region deriving step, among the combinations of the alignment candidate regions selected one by one from all the alignment target images, the combination in which the region common to all of the selected alignment candidate regions is the largest The image processing method according to claim 1, wherein the image is derived as the alignment region in each of the alignment target images.
前記候補領域抽出工程は、
前記位置合わせ対象画像を複数に分割した全てのブロックにおける前記基準画像との間の動きベクトルを検出することを、前記位置合わせ対象画像のそれぞれについて行う前記動きベクトル検出工程と、
前記動きベクトル検出工程により検出された動きベクトルの全てまたは一部に基づいて、位置のずれを評価する仮の変換係数を導出することを、前記位置合わせ対象画像のそれぞれについて行う仮変換係数の演算工程と、
前記演算工程により導出された仮の変換係数を用いて前記ブロックの所定の位置の座標変換を行った点と、当該所定の位置から当該ブロックにおける前記動きベクトルに基づく位置だけ離れた点との距離を、前記位置合わせ対象画像を複数に分割した全てのブロックについて導出することを、前記位置合わせ対象画像のそれぞれについて行う距離導出工程と、を有し、
前記位置合わせ対象画像を複数に分割した全てのブロックのうち、前記距離導出工程により導出された距離が閾値よりも大きくなるブロックを除いたブロックの組み合わせを、当該ブロックが属する前記位置合わせ対象画像に対する前記位置合わせ候補領域として導出することを、前記位置合わせ対象画像のそれぞれについて行うことを特徴とする請求項1〜3の何れか1項に記載の画像処理方法。
The candidate area extraction step includes:
Detecting the motion vector between the reference image in all the blocks obtained by dividing the alignment target image into a plurality of the motion vector detection steps for each of the alignment target images;
A temporary conversion coefficient calculation is performed for each of the alignment target images to derive a temporary conversion coefficient for evaluating a positional shift based on all or part of the motion vector detected by the motion vector detection step. Process,
A distance between a point obtained by performing coordinate transformation of the predetermined position of the block using the temporary transformation coefficient derived by the calculation step and a point separated from the predetermined position by a position based on the motion vector in the block A distance deriving step for deriving all the blocks obtained by dividing the alignment target image into a plurality of the alignment target images,
Among all the blocks obtained by dividing the alignment target image, a combination of blocks excluding a block whose distance derived by the distance deriving step is larger than a threshold is set to the alignment target image to which the block belongs. The image processing method according to claim 1, wherein derivation as the alignment candidate area is performed for each of the alignment target images.
前記候補領域抽出工程は、
前記位置合わせ対象画像を複数に分割した全てのブロックにおける前記基準画像との間の動きベクトルを検出することを、前記位置合わせ対象画像のそれぞれについて行う動きベクトル検出工程と、
前記動きベクトル検出工程により検出された動きベクトルの全てに基づいて、位置のずれを評価する仮の変換係数を導出することを、前記位置合わせ対象画像のそれぞれについて行う仮変換係数の演算工程と、
前記演算工程により導出された仮の変換係数を用いて前記ブロックの所定の位置の座標変換を行った点と、当該所定の位置から当該ブロックにおける前記動きベクトルに基づく位置だけ離れた点との距離を、前記位置合わせ対象画像を複数に分割した全てのブロックについて導出することを、前記位置合わせ対象画像のそれぞれについて行う距離導出工程と、を有し、
前記位置合わせ対象画像を複数に分割した全てのブロックの中から、前記距離導出工程により導出された距離が閾値よりも大きくなるブロックを含まないブロックの組み合わせを、当該位置合わせ対象画像に対する前記位置合わせ候補領域として導出することを、前記位置合わせ対象画像のそれぞれについて行うことを特徴とする請求項2に記載の画像処理方法。
The candidate area extraction step includes:
Detecting a motion vector between the reference image in all blocks obtained by dividing the alignment target image into a plurality of motion vector detection steps for each of the alignment target images;
A temporary conversion coefficient calculation step for each of the alignment target images, deriving a temporary conversion coefficient for evaluating positional deviation based on all the motion vectors detected by the motion vector detection step;
A distance between a point obtained by performing coordinate transformation of the predetermined position of the block using the temporary transformation coefficient derived by the calculation step and a point separated from the predetermined position by a position based on the motion vector in the block A distance deriving step for deriving all the blocks obtained by dividing the alignment target image into a plurality of the alignment target images,
Among all blocks obtained by dividing the alignment target image into a plurality of blocks, a combination of blocks not including a block whose distance derived by the distance deriving step is larger than a threshold is registered with the alignment target image. The image processing method according to claim 2, wherein derivation as a candidate area is performed for each of the alignment target images.
前記候補領域抽出工程は、
前記位置合わせ対象画像を複数に分割した全てのブロックにおける前記基準画像との間の動きベクトルを検出することを、前記位置合わせ対象画像のそれぞれについて行う動きベクトル検出工程と、
前記位置合わせ対象画像を複数に分割したブロックの一部かつ複数のブロックに対して前記動きベクトル検出工程により検出された動きベクトルの組み合わせを、複数通り選択することを、前記位置合わせ対象画像のそれぞれについて行う動きベクトル選択工程と、
前記動きベクトル選択工程により選択された動きベクトルの組み合わせに基づいて、位置のずれを評価する仮の変換係数を導出することを、前記動きベクトルの組み合わせのそれぞれ並びに前記位置合わせ対象画像のそれぞれについて行う仮変換係数の演算工程と、
前記演算工程により導出された仮の変換係数を用いて前記ブロックの所定の位置の座標変換を行った点と、当該所定の位置から当該ブロックにおける前記動きベクトルに基づく位置だけ離れた点との距離を、前記位置合わせ対象画像を複数に分割した全てのブロックについて導出することを、前記仮の変換係数のそれぞれ並びに前記位置合わせ対象画像のそれぞれについて行う距離導出工程と、を有し、
前記位置合わせ対象画像を複数に分割した全てのブロックの中から、前記距離導出工程により導出された距離が閾値よりも大きくなるブロックを除いたブロックの組み合わせを、当該ブロックが属する前記位置合わせ対象画像に対する前記位置合わせ候補領域として導出することを、前記距離導出工程により導出された距離のそれぞれ並びに前記位置合わせ対象画像のそれぞれについて行うことを特徴とする請求項3に記載の画像処理方法。
The candidate area extraction step includes:
Detecting a motion vector between the reference image in all blocks obtained by dividing the alignment target image into a plurality of motion vector detection steps for each of the alignment target images;
Selecting a plurality of combinations of motion vectors detected by the motion vector detection step for a part of a plurality of blocks obtained by dividing the alignment target image and a plurality of blocks, A motion vector selection step performed on
Based on the combination of motion vectors selected in the motion vector selection step, a temporary conversion coefficient for evaluating a positional deviation is derived for each of the combination of motion vectors and each of the alignment target images. A process of calculating a temporary conversion coefficient;
A distance between a point obtained by performing coordinate transformation of the predetermined position of the block using the temporary transformation coefficient derived by the calculation step and a point separated from the predetermined position by a position based on the motion vector in the block A distance deriving step for deriving all the blocks obtained by dividing the alignment target image into a plurality of the temporary transform coefficients and the alignment target images,
A combination of blocks excluding a block in which the distance derived by the distance deriving step is larger than a threshold among all the blocks obtained by dividing the alignment target image into a plurality of the alignment target images to which the block belongs The image processing method according to claim 3, wherein the deriving as the alignment candidate region with respect to is performed for each of the distance derived by the distance deriving step and each of the alignment target images.
前記位置合わせ工程により位置合わせが行われた前記基準画像と、前記位置合わせ対象画像のそれぞれとを合成する画像合成工程を有することを特徴とする請求項1〜6の何れか1項に記載の画像処理方法。   7. The image synthesizing method according to claim 1, further comprising an image synthesizing step of synthesizing the reference image that has been aligned by the alignment step and each of the alignment target images. Image processing method. 前記基準画像は、最初に入力された画像であり、
前記位置合わせ対象画像は、前記基準画像よりも後に入力された画像であることを特徴とする請求項1〜7の何れか1項に記載の画像処理方法。
The reference image is an image input first,
The image processing method according to claim 1, wherein the alignment target image is an image input after the reference image.
位置合わせが行われる少なくとも3つ以上の画像のうちの1つの画像である基準画像と、当該3つ以上の画像のうちの前記基準画像と異なる画像である位置合わせ対象画像のそれぞれとの位置合わせを行う画像処理装置であって、
前記位置合わせ対象画像のそれぞれから、前記位置合わせを行う領域の候補である位置合わせ候補領域を抽出する候補領域抽出手段と、
前記位置合わせ対象画像のそれぞれにおける前記位置合わせ候補領域の相関に基づいて、前記位置合わせ対象画像における前記位置合わせを行う領域である位置合わせ領域を導出する領域導出手段と、
前記位置合わせ領域における前記基準画像と前記位置合わせ対象画像との位置のずれに基づいて、前記基準画像と、前記位置合わせ対象画像との位置合わせを行う位置合わせ手段と、を有することを特徴とする画像処理装置。
Alignment between a reference image that is one of at least three images to be aligned and each of the alignment target images that are different from the reference image among the three or more images An image processing apparatus for performing
Candidate area extraction means for extracting an alignment candidate area that is a candidate for an area to be aligned from each of the alignment target images;
Area deriving means for deriving an alignment area that is an area for performing the alignment in the alignment target image based on the correlation of the alignment candidate areas in each of the alignment target images;
An alignment unit configured to perform alignment between the reference image and the alignment target image based on a positional shift between the reference image and the alignment target image in the alignment region; An image processing apparatus.
請求項1〜8の何れか1項に記載の画像処理方法の各工程をコンピュータに実行させることを特徴とするコンピュータプログラム。   A computer program that causes a computer to execute each step of the image processing method according to claim 1.
JP2013170606A 2013-08-20 2013-08-20 Image processing method, image processing apparatus, and computer program Expired - Fee Related JP6274778B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013170606A JP6274778B2 (en) 2013-08-20 2013-08-20 Image processing method, image processing apparatus, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013170606A JP6274778B2 (en) 2013-08-20 2013-08-20 Image processing method, image processing apparatus, and computer program

Publications (3)

Publication Number Publication Date
JP2015041802A JP2015041802A (en) 2015-03-02
JP2015041802A5 JP2015041802A5 (en) 2016-09-29
JP6274778B2 true JP6274778B2 (en) 2018-02-07

Family

ID=52695755

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013170606A Expired - Fee Related JP6274778B2 (en) 2013-08-20 2013-08-20 Image processing method, image processing apparatus, and computer program

Country Status (1)

Country Link
JP (1) JP6274778B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3006560B2 (en) * 1997-09-10 2000-02-07 日本電気株式会社 Alignment device and computer-readable recording medium storing alignment program
JP4136044B2 (en) * 1997-12-24 2008-08-20 オリンパス株式会社 Image processing apparatus and image processing method therefor
US7605845B2 (en) * 2005-04-28 2009-10-20 Texas Instruments Incorporated Motion stabilization
JP4781233B2 (en) * 2006-11-07 2011-09-28 キヤノン株式会社 Image processing apparatus, imaging apparatus, and image processing method
JP4506875B2 (en) * 2008-05-19 2010-07-21 ソニー株式会社 Image processing apparatus and image processing method

Also Published As

Publication number Publication date
JP2015041802A (en) 2015-03-02

Similar Documents

Publication Publication Date Title
EP3540637A1 (en) Neural network model training method, device and storage medium for image processing
JP5213613B2 (en) Image processing apparatus, image processing method, imaging apparatus, and program
JP3944647B2 (en) Object measuring apparatus, object measuring method, and program
JP5803467B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP5722381B2 (en) Video analysis
JP5569357B2 (en) Image processing apparatus, image processing method, and image processing program
JP2010118862A (en) Image processor, imaging apparatus and image processing method
JP4373840B2 (en) Moving object tracking method, moving object tracking program and recording medium thereof, and moving object tracking apparatus
JP5500163B2 (en) Image processing system, image processing method, and image processing program
US10142613B2 (en) Image processing apparatus, image processing system, and image processing method
JP2019004305A (en) Image processing device, image processing method, and program
JP5082856B2 (en) Image processing method, image processing program, image processing apparatus, and imaging apparatus
JP2015036841A (en) Image processing apparatus, distance measuring apparatus, imaging apparatus, and image processing method
JP7027776B2 (en) Movement vector calculation method, device, program, and movement vector calculation method including noise reduction processing.
JP2009260671A (en) Image processing apparatus and imaging device
JP2016164709A (en) Image processing device, imaging apparatus, and image processing program
JP6579727B1 (en) Moving object detection device, moving object detection method, and moving object detection program
JP6153318B2 (en) Image processing apparatus, image processing method, image processing program, and storage medium
JP6274778B2 (en) Image processing method, image processing apparatus, and computer program
JP2006215655A (en) Method, apparatus, program and program storage medium for detecting motion vector
JP6604783B2 (en) Image processing apparatus, imaging apparatus, and image processing program
KR102450466B1 (en) System and method for removing camera movement in video
JP5334241B2 (en) Frame image motion vector estimation apparatus and program
JP2010039968A (en) Object detecting apparatus and detecting method
JP2021077091A (en) Image processing device and image processing method

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160810

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160810

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170313

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170509

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170628

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: 20171212

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180109

R151 Written notification of patent or utility model registration

Ref document number: 6274778

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees