JP2010041416A - Image processing unit, image processing method, image processing program, and imaging apparatus - Google Patents

Image processing unit, image processing method, image processing program, and imaging apparatus Download PDF

Info

Publication number
JP2010041416A
JP2010041416A JP2008202195A JP2008202195A JP2010041416A JP 2010041416 A JP2010041416 A JP 2010041416A JP 2008202195 A JP2008202195 A JP 2008202195A JP 2008202195 A JP2008202195 A JP 2008202195A JP 2010041416 A JP2010041416 A JP 2010041416A
Authority
JP
Japan
Prior art keywords
motion vector
image
contribution
lens
reliability
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.)
Withdrawn
Application number
JP2008202195A
Other languages
Japanese (ja)
Inventor
Nobuyuki Watanabe
伸之 渡辺
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.)
Olympus Corp
Original Assignee
Olympus Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Corp filed Critical Olympus Corp
Priority to JP2008202195A priority Critical patent/JP2010041416A/en
Publication of JP2010041416A publication Critical patent/JP2010041416A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To perform precise alignment to a plurality of images obtained from an imaging apparatus having a lens with aberration. <P>SOLUTION: An image processing unit for performing alignment processing of a plurality of images by deformation of an image includes: a region setting section (103) for setting a plurality of measurement regions for measuring a motion vector; a reliability calculation section (105) for calculating reliability of the motion vector calculated to the plurality of motion vector measurement regions; a lens characteristic acquisition section (107) for acquiring the lens characteristics of a photographing lens for photographing the plurality of images; a contribution amount calculation section (1061) for calculating the amount of contribution of each motion vector, based on the position of the motion vector measurement region in which each motion vector is calculated and the lens characteristics; and an integration operation processing section (1062) for integrating the motion vectors of the plurality of motion vector measurement regions according to the reliability and the contribution amount to calculate at least one motion vector between images. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

複数枚の画像の位置合わせ(画像のブレの補正を含む)を行う画像処理装置、画像処理方法、画像処理プログラム、及び、撮像装置に関する。   The present invention relates to an image processing apparatus, an image processing method, an image processing program, and an imaging apparatus that perform alignment (including image blur correction) of a plurality of images.

従来、画像のブレ補正等において画像の動きベクトルを検出する手段として、ブロックマッチング法や相関演算に基づく相関法が知られている。   Conventionally, a block matching method or a correlation method based on a correlation calculation is known as a means for detecting an image motion vector in image blur correction or the like.

ブロックマッチング法では、入力された画像を、複数の適当な大きさのブロック(例えば8画素×8ライン)に分割する。このブロックの単位で、現在のフィールド(フレーム)と前のフィールドの一定範囲との画素値の差分が計算される。さらに、この差分に基づいて、現在のフィールドのあるブロックに対して相関の高い前のフィールドのブロックを探索する。そして、両ブロック間の相対的なズレが、ブロックの動きベクトルとなる。   In the block matching method, an input image is divided into a plurality of blocks having an appropriate size (for example, 8 pixels × 8 lines). In this block unit, the difference in pixel value between the current field (frame) and a certain range of the previous field is calculated. Further, based on this difference, a block in the previous field having a high correlation with a block in the current field is searched. The relative shift between the two blocks becomes the block motion vector.

ブロックマッチングでの相関の高いブロックの探索方法として、画素値の差分の二乗和である誤差二乗和SSD、画素値の差分の絶対値和である誤差絶対値和SADによって相関を評価することが行われる。SSD、SADが小さいほど相関が高いと評価する。SSDとSADは、それぞれ以下の数式(1)、(2)で表される。   As a search method for blocks having high correlation in block matching, the correlation is evaluated by an error square sum SSD which is a sum of squares of pixel value differences and an error absolute value sum SAD which is an absolute value sum of pixel value differences. Is called. The smaller the SSD and SAD, the higher the correlation. SSD and SAD are represented by the following formulas (1) and (2), respectively.

ここで、pは、現在のフィールドのマッチングの基準ブロック領域I内の画素位置、qは、前のフィールドのマッチングの対象とするブロック領域I'内の画素位置(画素位置pに対応する位置)を示す。従って、p及びqは、2次元の値を持つ量であり、I、I'は、それぞれ、現在のフィールドと前のフィールドの2次元の領域を示す。p∈Iは、座標pが領域Iに含まれていること、q∈I'は、座標qが領域I'に含まれていることを示す。さらに、画素位置p、qの画素値をLp、Lqとする。   Here, p is a pixel position in the reference block area I for matching of the current field, and q is a pixel position in the block area I ′ to be matched in the previous field (position corresponding to the pixel position p). Indicates. Therefore, p and q are quantities having a two-dimensional value, and I and I ′ indicate a two-dimensional area of the current field and the previous field, respectively. pεI indicates that the coordinate p is included in the region I, and qεI ′ indicates that the coordinate q is included in the region I ′. Furthermore, the pixel values at the pixel positions p and q are Lp and Lq.

一方、相関演算に基づく相関法では、マッチングの基準ブロック領域Iおよび対象とするブロック領域I'のそれぞれに含まれる画素p∈Iおよび、q∈I'の平均値Ave(Lp)、Ave(Lq)を算出する。さらに、各ブロックに含まれる画素値とこの平均値の差分を以下の数式(3)により計算する。   On the other hand, in the correlation method based on the correlation calculation, the average values Ave (Lp) and Ave (Lq) of the pixels pεI and qεI ′ included in each of the reference block region I for matching and the target block region I ′ are included. ) Is calculated. Further, the difference between the pixel value included in each block and the average value is calculated by the following formula (3).

続いて、正規化相互相関NCCを数式(4)により計算する。 Subsequently, the normalized cross-correlation NCC is calculated according to Equation (4).

正規化相互相関NCCの大きいブロックを相関の高いブロックと評価し、最も相関の高いブロックI'とIの間のズレを動きベクトルとする。 A block having a large normalized cross-correlation NCC is evaluated as a highly correlated block, and a shift between the most correlated blocks I ′ and I is set as a motion vector.

画像に含まれている被写体や撮影対象が静止している場合、個々の領域での動きと画像全体の動きは一致している。従って、この場合には、上記の相関演算を行うブロックは任意の固定位置に配置して、その動きベクトルを算出すれば良い。   When the subject included in the image or the subject to be photographed is stationary, the movement in each region and the movement of the entire image are the same. Therefore, in this case, the block for performing the above correlation calculation may be arranged at an arbitrary fixed position and its motion vector calculated.

なお、ノイズの影響により信頼性の高い動きベクトルが得られない場合や、ブロックが平坦部又はブロックに比べて大きい構造のエッジ部にかかっており信頼性の高い動きベクトルが得られない場合がある。このような場合を排除する為に、動きベクトルを算出する際の信頼性判定を行う技術が、例えば特許文献1や特許文献2に開示されている。   In addition, there is a case where a highly reliable motion vector cannot be obtained due to the influence of noise, or a highly reliable motion vector cannot be obtained because the block is applied to a flat portion or an edge portion having a structure larger than that of the block. . In order to eliminate such a case, techniques for performing reliability determination when calculating a motion vector are disclosed in, for example, Patent Document 1 and Patent Document 2.

また、画像に含まれている被写体や撮影対象に複数の動きが含まれている場合は、例えばブレ補正を目的として、画像全体の動きベクトルを算出することが課題となる。特許文献3では、被写体を複数の領域に分割し、複数の領域のうちで動きベクトルの大きさや領域の大きさなどで重要な領域を選択し、その領域の動きベクトルを全体の動きベクトルとしている。   In addition, when a subject included in an image or a subject to be photographed includes a plurality of movements, for example, for the purpose of blur correction, it is a problem to calculate a motion vector of the entire image. In Patent Document 3, a subject is divided into a plurality of regions, an important region is selected from among the plurality of regions based on the size of the motion vector, the size of the region, and the like, and the motion vector of the region is used as the entire motion vector. .

この場合、領域選択手段は、以下の(i)-(iv)のいずれかのような重要な領域を選択する。
(i)複数の領域のうち最も範囲が大きな領域
(ii)複数の領域のうち最も動きベクトルが小さな領域
(iii)複数の領域のうち前回選択した領域に重なる範囲が最も大きな領域
(iv)最も範囲が大きな領域と、最も動きベクトルが小さな領域と、前回選択した領域に重なる範囲が最も大きな領域のうちの何れかの領域
ところで、収差の大きいレンズを備える撮像装置に対して電子式ブレ補正等の位置合わせを行う場合に、画像の収差による変形量が画像内の位置ごとに異なるため問題となる。例えば、広角レンズ等では、画像の歪曲収差による変形量が像高毎に異なる。このため、収差の大きいレンズで撮影した複数枚の画像間では、画像間動きベクトル(補正ベクトル)を決定することが困難になる。これは、収差がない場合の像上での動きベクトルと、収差がある場合の像上での動きベクトルとの対応関係が、画像内の位置ごと(例えば、像高毎)に異なるためである。
In this case, the area selection means selects an important area such as one of the following (i) to (iv).
(I) The area with the largest range among the plurality of areas (ii) The area with the smallest motion vector among the plurality of areas (iii) The area with the largest overlapping area with the previously selected area among the plurality of areas (iv) Electronic blur correction, etc., for an imaging device equipped with a lens with a large aberration in any of the region with the largest range, the region with the smallest motion vector, and the region with the largest range that overlaps the previously selected region However, the amount of deformation due to the aberration of the image differs depending on the position in the image. For example, in a wide-angle lens or the like, the amount of deformation due to image distortion varies depending on the image height. For this reason, it becomes difficult to determine an inter-image motion vector (correction vector) between a plurality of images taken with a lens having a large aberration. This is because the correspondence between the motion vector on the image when there is no aberration and the motion vector on the image when there is aberration is different for each position in the image (for example, every image height). .

例えば、図1(a)の樽型の歪曲収差の場合、像高の大きい領域では、画像間の動きベクトルは、収差がない場合より小さく見積もられる。一方、図1(b)の糸巻き型の歪曲収差の場合、逆に、画像間の動きベクトルは、収差がない場合より大きく見積もられる。   For example, in the case of the barrel distortion of FIG. 1A, the motion vector between images is estimated to be smaller in the region where the image height is large than in the case where there is no aberration. On the other hand, in the case of the pincushion type distortion aberration of FIG. 1B, conversely, the motion vector between images is estimated to be larger than the case of no aberration.

特許文献4では、歪曲収差に対する対策として、歪曲収差の補正を行った後の画像に対して、画像間の動きベクトルを決定して電子式ブレ補正を行うことを提案している。
特開平8−163573号公報 特許第3164121号公報 特開平8−251474号公報 特開2007−129587号公報
In Patent Document 4, as a countermeasure against distortion, it is proposed to perform electronic blur correction by determining a motion vector between images with respect to an image after correcting distortion.
JP-A-8-163573 Japanese Patent No. 3164121 JP-A-8-251474 JP 2007-129487 A

一方、電子ブレ補正に於いて、画像が2重化して見えないためには、画角の水平方向に対して1/1000程度の位置合わせの精度が要求される。即ち、水平方向で3000画素の解像度を持っていれば3画素程度の位置合わせの精度が必要になる。   On the other hand, in the electronic blur correction, in order to prevent the image from being duplicated, it is required to have an alignment accuracy of about 1/1000 with respect to the horizontal direction of the angle of view. That is, if the resolution is 3000 pixels in the horizontal direction, the alignment accuracy of about 3 pixels is required.

しかし、特許文献4のように収差の補正を行った後の画像に対して画像間の動きベクトルを決定する場合、像の収差補正の精度が電子ブレ補正での要求精度より劣ると、画像間動きベクトルが正確に決定できない。このため、位置合わせやブレ補正が正確にできなくなる。   However, when determining a motion vector between images with respect to an image after performing aberration correction as in Patent Document 4, if the accuracy of aberration correction of an image is inferior to that required for electronic blur correction, The motion vector cannot be determined accurately. For this reason, alignment and blur correction cannot be performed accurately.

本発明では、収差を有するレンズを備える撮像装置から得られた複数枚の画像に対して、簡易に精度の良い位置合わせを行うことを目的とする。   It is an object of the present invention to easily and accurately align a plurality of images obtained from an imaging device including a lens having aberration.

本発明のある態様に係る画像処理装置は、少なくとも一つの画像間動きベクトルにより特徴付けられる画像の変形により複数枚の画像の位置合わせ処理を行う画像処理装置であって、動きベクトルを測定するための複数の動きベクトル測定領域を設定する動きベクトル測定領域設定部と、前記複数の動きベクトル測定領域の動きベクトルを算出する動きベクトル算出部と、前記算出された動きベクトルの信頼度を算出する動きベクトル信頼度算出部と、前記複数枚の画像を撮影する撮影レンズのレンズ特性を取得するレンズ特性取得部と、各動きベクトルを算出した動きベクトル測定領域の位置と前記レンズ特性とに基づいて、前記少なくとも一つの画像間動きベクトルの算出における各動きベクトルの寄与度を算出する寄与度算出部と、前記動きベクトルの前記信頼度と前記寄与度に応じて、前記複数の動きベクトル測定領域の動きベクトルを統合することにより、前記少なくとも一つの画像間動きベクトルを算出する統合演算処理部と、を備えることを特徴とする。   An image processing apparatus according to an aspect of the present invention is an image processing apparatus that performs alignment processing of a plurality of images by deformation of an image characterized by at least one inter-image motion vector, in order to measure a motion vector A motion vector measurement region setting unit that sets a plurality of motion vector measurement regions, a motion vector calculation unit that calculates motion vectors of the plurality of motion vector measurement regions, and a motion that calculates the reliability of the calculated motion vector Based on a vector reliability calculation unit, a lens characteristic acquisition unit that acquires lens characteristics of a photographing lens that captures the plurality of images, a position of a motion vector measurement region that calculates each motion vector, and the lens characteristics, A contribution calculation unit for calculating a contribution of each motion vector in the calculation of the at least one inter-image motion vector; An integrated calculation processing unit that calculates the at least one inter-image motion vector by integrating the motion vectors of the plurality of motion vector measurement regions according to the reliability and the contribution of the motion vector. It is characterized by.

本発明の別の態様に係る画像処理方法は、少なくとも一つの画像間動きベクトルにより特徴付けられる画像の変形により複数枚の画像の位置合わせ処理を行う画像処理方法であって、動きベクトルを測定するための複数の動きベクトル測定領域を設定する動きベクトル測定領域設定ステップと、前記複数の動きベクトル測定領域の動きベクトルを算出する動きベクトル算出ステップと、前記算出された動きベクトルの信頼度を算出する動きベクトル信頼度算出ステップと、前記複数枚の画像を撮影する撮影レンズのレンズ特性を取得するレンズ特性取得ステップと、各動きベクトルを算出した動きベクトル測定領域の位置と前記レンズ特性とに基づいて、前記少なくとも一つの画像間動きベクトルの算出における各動きベクトルの寄与度を算出する寄与度算出ステップと、前記動きベクトルの前記信頼度と前記寄与度に応じて、前記複数の動きベクトル測定領域の動きベクトルを統合することにより、前記少なくとも一つの画像間動きベクトルを算出する統合演算処理ステップと、を備えることを特徴とする。   An image processing method according to another aspect of the present invention is an image processing method for performing alignment processing of a plurality of images by deformation of an image characterized by at least one inter-image motion vector, and measuring a motion vector. A motion vector measurement region setting step for setting a plurality of motion vector measurement regions, a motion vector calculation step for calculating a motion vector of the plurality of motion vector measurement regions, and a reliability of the calculated motion vector Based on the motion vector reliability calculation step, the lens characteristic acquisition step for acquiring the lens characteristics of the photographing lens that captures the plurality of images, the position of the motion vector measurement region where each motion vector is calculated, and the lens characteristics Calculating the contribution of each motion vector in the calculation of the at least one inter-image motion vector. A step of calculating a contribution degree, and an integration for calculating the at least one inter-image motion vector by integrating motion vectors of the plurality of motion vector measurement regions according to the reliability and the contribution degree of the motion vector. An arithmetic processing step.

本発明のさらに別の態様に係る画像処理プログラムは、少なくとも一つの画像間動きベクトルにより特徴付けられる画像の変形により複数枚の画像の位置合わせ処理を行う画像処理プログラムであって、動きベクトルを測定するための複数の動きベクトル測定領域を設定する動きベクトル測定領域設定手順と、前記複数の動きベクトル測定領域の動きベクトルを算出する動きベクトル算出手順と、前記算出された動きベクトルの信頼度を算出する動きベクトル信頼度算出手順と、前記複数枚の画像を撮影する撮影レンズのレンズ特性を取得するレンズ特性取得手順と、各動きベクトルを算出した動きベクトル測定領域の位置と前記レンズ特性とに基づいて、前記少なくとも一つの画像間動きベクトルの算出における各動きベクトルの寄与度を算出する寄与度算出手順と、前記動きベクトルの前記信頼度と前記寄与度に応じて、前記複数の動きベクトル測定領域の動きベクトルを統合することにより、前記少なくとも一つの画像間動きベクトルを算出する統合演算処理手順と、を備えることを特徴とする。   An image processing program according to still another aspect of the present invention is an image processing program for performing alignment processing of a plurality of images by deformation of an image characterized by at least one inter-image motion vector, and measuring a motion vector A motion vector measurement region setting procedure for setting a plurality of motion vector measurement regions to calculate, a motion vector calculation procedure for calculating a motion vector of the plurality of motion vector measurement regions, and calculating a reliability of the calculated motion vector Based on the motion vector reliability calculation procedure to be performed, the lens characteristic acquisition procedure to acquire the lens characteristics of the photographing lens that captures the plurality of images, the position of the motion vector measurement area where each motion vector was calculated, and the lens characteristics The contribution of each motion vector in the calculation of the at least one inter-image motion vector The at least one inter-image motion vector is calculated by integrating the motion vectors of the plurality of motion vector measurement regions according to the contribution degree calculation procedure to be output, the reliability of the motion vector, and the contribution degree. And an integrated calculation processing procedure.

本発明のさらに別の態様に係る撮像装置は、撮影レンズと、前記撮影レンズによって形成される光学像を電気信号に変換する撮像部とを有し、少なくとも一つの画像間動きベクトルにより特徴付けられる画像の変形により、前記撮像部から取得した複数枚の画像の位置合わせ処理を行う撮像装置であって、動きベクトルを測定するための複数の動きベクトル測定領域を設定する動きベクトル測定領域設定部と、前記複数の動きベクトル測定領域の動きベクトルを算出する動きベクトル算出部と、前記算出された動きベクトルの信頼度を算出する動きベクトル信頼度算出部と、前記撮影レンズのレンズ特性を取得するレンズ特性取得部と、各動きベクトルを算出した動きベクトル測定領域の位置と前記レンズ特性とに基づいて、前記少なくとも一つの画像間動きベクトルの算出における各動きベクトルの寄与度を算出する寄与度算出部と、前記動きベクトルの前記信頼度と前記寄与度に応じて、前記複数の動きベクトル測定領域の動きベクトルを統合することにより、前記少なくとも一つの画像間動きベクトルを算出する統合演算処理部と、を備えることを特徴とする。   An imaging apparatus according to yet another aspect of the present invention includes a photographic lens and an imaging unit that converts an optical image formed by the photographic lens into an electrical signal, and is characterized by at least one inter-image motion vector. A motion vector measurement region setting unit configured to set a plurality of motion vector measurement regions for measuring a motion vector, the image capturing device performing alignment processing of a plurality of images acquired from the image capturing unit by deformation of an image; A motion vector calculation unit that calculates motion vectors of the plurality of motion vector measurement regions, a motion vector reliability calculation unit that calculates reliability of the calculated motion vector, and a lens that acquires lens characteristics of the photographing lens Based on the characteristic acquisition unit, the position of the motion vector measurement region where each motion vector is calculated, and the lens characteristic, the at least A degree-of-motion calculation unit that calculates the degree of contribution of each motion vector in calculating the motion vector between two images, and integrating the motion vectors of the plurality of motion vector measurement regions according to the reliability and the degree of contribution of the motion vector And an integrated arithmetic processing unit that calculates the at least one inter-image motion vector.

これらの態様によれば、動きベクトル測定領域の位置とレンズ特性とに基づいて、画像間動きベクトルの算出における各動きベクトルの寄与度が算出される。このため、収差を考慮した寄与度が算出できる。例えば、レンズ特性により収差の絶対値の小さい画像内の位置を求め、その位置にある測定領域の動きベクトルの寄与度を大きくすることができる。また、動きベクトルの寄与度と信頼度に応じて、複数の動きベクトル測定領域の動きベクトルを統合することにより、画像間動きベクトルが的確に算出される。   According to these aspects, the contribution of each motion vector in calculating the inter-image motion vector is calculated based on the position of the motion vector measurement region and the lens characteristics. For this reason, the contribution which considered the aberration can be calculated. For example, it is possible to obtain a position in an image with a small absolute value of aberration based on lens characteristics, and to increase the contribution of the motion vector of the measurement region at that position. Further, by integrating the motion vectors of the plurality of motion vector measurement regions according to the contribution degree and reliability of the motion vector, the inter-image motion vector is accurately calculated.

このため、収差補正する前の段階でも、複数枚の画像に対し収差の影響を除去して、画像間動きベクトルを決定することができる。従って、収差補正を行った後の複数枚の画像に対して画像間動きベクトルを決定する場合より、的確に画像間動きベクトルを決定することができる場合がある。さらに、この的確な画像間動きベクトルに特徴付けられる画像の変形により、収差補正に精度がない場合でも、精度良い画像の位置合わせ処理が可能となる。   For this reason, even before the aberration correction, it is possible to determine the inter-image motion vector by removing the influence of the aberration on a plurality of images. Therefore, there are cases where the inter-image motion vector can be determined more accurately than when the inter-image motion vector is determined for a plurality of images after aberration correction. Furthermore, due to the deformation of the image characterized by this accurate inter-image motion vector, even when aberration correction is not accurate, it is possible to perform image alignment processing with high accuracy.

また、動きベクトルの算出の前に収差補正を必要としないので位置合わせ処理の構成の自由度が上がる。例えば、収差補正後に画像間動きベクトル算出を行うようなシーケンシャルな処理を必要とせず、収差補正と画像間動きベクトルの算出を並列処理することもできる。   In addition, since aberration correction is not required before the motion vector is calculated, the degree of freedom in the configuration of the alignment process is increased. For example, the aberration correction and the calculation of the inter-image motion vector can be performed in parallel without requiring a sequential process for calculating the inter-image motion vector after the aberration correction.

本発明によれば、収差による画像の歪がある場合でも、画像間動きベクトルが的確に算出され、この画像間動きベクトルにより特徴付けられる画像の変形により複数枚の画像の位置合わせ処理が的確に行える。また、画像間動きベクトル算出の前に収差補正を必要としないので位置合わせ処理の構成の自由度が上がる。   According to the present invention, even when there is image distortion due to aberration, an inter-image motion vector is accurately calculated, and the alignment processing of a plurality of images is accurately performed by deformation of the image characterized by the inter-image motion vector. Yes. In addition, since aberration correction is not required before calculating the inter-image motion vector, the degree of freedom in the configuration of the alignment process is increased.

[第一実施形態]
図2を参照して、第一実施形態に係る画像処理装置について説明する。なお、画像処理装置は、画像取得装置と一体化してデジタルカメラやデジタルビデオカメラ等の撮像装置(撮像用電子機器)を形成するものとして第一実施形態を説明する。しかし、本発明はこれに限定されることなく適用可能である。例えば、画像取得装置と画像処理装置をそれぞれ個別の装置として連携させて使用する構成でもよい。
[First embodiment]
The image processing apparatus according to the first embodiment will be described with reference to FIG. The first embodiment will be described on the assumption that the image processing apparatus is integrated with the image acquisition apparatus to form an imaging apparatus (imaging electronic device) such as a digital camera or a digital video camera. However, the present invention is applicable without being limited to this. For example, a configuration in which the image acquisition device and the image processing device are used in cooperation as individual devices may be employed.

撮像装置1は、画像取得装置としての画像取得部2と、画像処理装置として画像処理部3から構成される。画像処理部3は、画像取得部2で撮像された複数枚の画像の位置合わせと加算処理を行う。   The imaging device 1 includes an image acquisition unit 2 as an image acquisition device and an image processing unit 3 as an image processing device. The image processing unit 3 performs alignment and addition processing of a plurality of images captured by the image acquisition unit 2.

画像取得部2は、撮影レンズ部10と撮像部12とを有している。撮影レンズ部10は、複数枚の画像を撮影(又は撮像)する際に用いられる。撮影レンズ部10は、一つ以上のレンズ要素から構成され外部から取り込んだ光を結像する撮影レンズ(又は撮像レンズ)1100を有する。さらに、撮影レンズ部10は、この撮影レンズ1100に取り付けられたROM(読み出し専用メモリ)1101をレンズ特性データの記憶部として有している。撮像部12は、イメージャ(CCD)と、イメージャからの信号を処理する信号処理部からなる。撮像部12は、撮影レンズ1100により撮像部12に結像された光学像を電気信号に変換する。さらに、撮像部12は、この電気信号をデジタル信号に変換し画像データを生成する。この際、電気信号からオプチカルブラック(即ち、光強度ゼロ)の電気信号を差し引く等の処理を行う。   The image acquisition unit 2 includes a photographing lens unit 10 and an imaging unit 12. The taking lens unit 10 is used when taking (or taking) a plurality of images. The photographic lens unit 10 includes a photographic lens (or an imaging lens) 1100 that is composed of one or more lens elements and forms an image of light taken from outside. Further, the taking lens unit 10 has a ROM (read only memory) 1101 attached to the taking lens 1100 as a storage unit for lens characteristic data. The imaging unit 12 includes an imager (CCD) and a signal processing unit that processes a signal from the imager. The imaging unit 12 converts an optical image formed on the imaging unit 12 by the photographing lens 1100 into an electrical signal. Further, the imaging unit 12 converts the electrical signal into a digital signal and generates image data. At this time, processing such as subtracting the electrical signal of optical black (that is, light intensity zero) from the electrical signal is performed.

画像処理部(又は画像処理装置)3は、複数枚の画像を格納するフレームメモリ102と、基準画像に対して所定の動きベクトル測定領域を設定する動きベクトル測定領域設定部103とを有する。また、画像処理部3は、動きベクトル測定領域の動きベクトルを演算する動きベクトル算出部104と、動きベクトルの演算結果の信頼度を算出する動きベクトル信頼度算出部105も有する。   The image processing unit (or image processing apparatus) 3 includes a frame memory 102 that stores a plurality of images, and a motion vector measurement region setting unit 103 that sets a predetermined motion vector measurement region for a reference image. The image processing unit 3 also includes a motion vector calculation unit 104 that calculates the motion vector of the motion vector measurement region, and a motion vector reliability calculation unit 105 that calculates the reliability of the motion vector calculation result.

さらに、画像処理部3は、上記演算した動きベクトルに基づいて、画像間の動きベクトルの代表値を算出する動きベクトル統合処理部106と、この代表値に応じて画像の加算を行うフレーム加算部109とを有する。また、画像処理部3は、撮影レンズ1100の特性に関するレンズ特性データをROM1101から取得するレンズ特性取得部107と、このレンズ特性データに基づいて収差の補正を行う収差補正部108とを有する。   Further, the image processing unit 3 includes a motion vector integration processing unit 106 that calculates a representative value of motion vectors between images based on the calculated motion vector, and a frame addition unit that adds images according to the representative value. 109. The image processing unit 3 also includes a lens characteristic acquisition unit 107 that acquires lens characteristic data related to the characteristics of the photographing lens 1100 from the ROM 1101 and an aberration correction unit 108 that corrects aberrations based on the lens characteristic data.

画像処理部3は、上記各部の制御を行うメインコントローラ100を有する。メインコントローラ100は、画像処理部3の各部の動作の制御を行うとともに、撮影レンズ1100の自動焦点(AF)調整制御やズーム動作の制御(倍率変更制御)を行う。メインコントローラ100は、例えばDSP(デジタルシグナルプロセッサ)などのCPU(中央演算処理装置)等から構成される。なお、図2において、点線はメインコントローラの制御信号、細線は動きベクトルや信頼度等のデータの流れ、太線は画像データの流れを表している。   The image processing unit 3 includes a main controller 100 that controls the above-described units. The main controller 100 controls the operation of each part of the image processing unit 3 and also performs automatic focus (AF) adjustment control of the photographing lens 1100 and zoom operation control (magnification change control). The main controller 100 includes a CPU (Central Processing Unit) such as a DSP (Digital Signal Processor). In FIG. 2, the dotted line represents the control signal of the main controller, the thin line represents the flow of data such as motion vectors and reliability, and the thick line represents the flow of image data.

以下、本明細書において、動きベクトル測定領域を「測定領域」と、動きベクトル測定領域設定部を「領域設定部」と、動きベクトル算出部を「ベクトル算出部」と呼ぶ。また、動きベクトル信頼度算出部を「信頼度算出部」と、動きベクトル統合処理部を「統合処理部」と、レンズ特性取得部を「特性取得部」と呼ぶ。さらに、画像間の動きベクトルの代表値を、単に、画像間動きベクトル、又は補正ベクトルと呼ぶことがある。   Hereinafter, in this specification, the motion vector measurement region is referred to as “measurement region”, the motion vector measurement region setting unit is referred to as “region setting unit”, and the motion vector calculation unit is referred to as “vector calculation unit”. The motion vector reliability calculation unit is referred to as a “reliability calculation unit”, the motion vector integration processing unit is referred to as an “integration processing unit”, and the lens characteristic acquisition unit is referred to as a “characteristic acquisition unit”. Furthermore, the representative value of the motion vector between images may be simply referred to as an inter-image motion vector or a correction vector.

ここで、撮影レンズ部10に取り付けられたROM1101に記憶されているレンズ特性データについて説明しておく。レンズ特性データは、撮影レンズのレンズ特性に関するデータである。レンズ特性は、撮影レンズ1100の種類を識別するためのレンズ識別子(例えば、レンズ型名やシリアルナンバー)や、撮影レンズ1100の光学的特性を与えるレンズパラメータを含む。このレンズパラメータの例として、レンズ1100の焦点距離fや歪曲収差DT(%)が挙げられる。   Here, lens characteristic data stored in the ROM 1101 attached to the photographing lens unit 10 will be described. The lens characteristic data is data relating to the lens characteristics of the photographing lens. The lens characteristics include a lens identifier (for example, a lens model name and serial number) for identifying the type of the photographing lens 1100 and lens parameters that give optical characteristics of the photographing lens 1100. Examples of this lens parameter include the focal length f of the lens 1100 and distortion DT (%).

歪曲収差DT(%)は、実像高Y’及び理想像高Yを用いて、以下の式(5)のように表せる。実像高Y’及び理想像高Yの関係は、式(6)のように表せる。そのため、歪曲収差に関する他のレンズパラメータの例として、式(7)のように、歪曲収差DT(%)を理想像高の二乗(Y2)で展開して多項式化した場合の係数a1、a2、a3も挙げられる。 The distortion aberration DT (%) can be expressed by the following equation (5) using the real image height Y ′ and the ideal image height Y. The relationship between the real image height Y ′ and the ideal image height Y can be expressed as Equation (6). Therefore, as another example of lens parameters relating to distortion, as shown in Equation (7), a coefficient a 1 when the distortion DT (%) is expanded by the square of the ideal image height (Y 2 ) and polynomialized, Examples include a 2 and a 3 .

なお、レンズ特性の例として、歪曲収差DT(%)を理想像高の二乗(Y2)で展開し多項式化した場合の係数a1、a2、a3を挙げたが、これに限られるものではない。歪曲収差DT(%)を理想像高Yで展開し多項式化した場合の係数もレンズ特性としてもよい。これにより、光軸がずれている場合など、光学系の歪曲収差が像の中心に関して対象でない場合も取り扱うことができる。 As examples of the lens characteristics, coefficients a 1 , a 2 , and a 3 in the case where the distortion aberration DT (%) is expanded with the square of the ideal image height (Y 2 ) and polynomialized are listed, but the present invention is not limited to this. It is not a thing. The coefficient when the distortion aberration DT (%) is expanded at the ideal image height Y and converted into a polynomial may be used as the lens characteristic. Thereby, it is possible to handle the case where the distortion of the optical system is not a target with respect to the center of the image, such as when the optical axis is deviated.

また、レンズパラメータを撮影レンズ1100の配置情報と対応させてROM1101が記憶することにより、特性取得部107は、撮影レンズの配置情報に応じて、レンズ特性を取得できる。このため、後述する寄与度算出部1061は、レンズの配置(レンズ位置)毎の収差データ(像の歪データ)を求めることもできる。例えば、撮影レンズ1100のズーム移動時や自動焦点調整時の像ズレも考慮した形で収差を求めることができる。   Further, by storing the lens parameters in association with the arrangement information of the photographing lens 1100 in the ROM 1101, the characteristic acquisition unit 107 can acquire the lens characteristics according to the arrangement information of the photographing lens. Therefore, the contribution calculation unit 1061 described later can also obtain aberration data (image distortion data) for each lens arrangement (lens position). For example, the aberration can be obtained in consideration of image shift during zoom movement of the photographing lens 1100 or automatic focus adjustment.

ここで、一例として、図3に、樽型の歪曲収差が存在する場合の像高と歪曲収差の関係を示しておく。図3では、像高0.5程度であれば、収差は2%程度である。2つの画像のズレが150画素程度でも、像高0.5程度では画像の収差補正をしなくても位置合わせの精度は3画素に収まる。従って、この2つの画像が2重化して見えない位置合わせができる。しかし、像高1では、収差は12%で、画像の収差補正をしない場合の位置合わせの精度は18画素となる。このため、このような像高にある測定領域の動きベクトルの影響を画像間動きベクトルの計算において排除する必要がある。   Here, as an example, FIG. 3 shows the relationship between image height and distortion when barrel distortion is present. In FIG. 3, if the image height is about 0.5, the aberration is about 2%. Even if the misalignment between the two images is about 150 pixels, if the image height is about 0.5, the alignment accuracy can be reduced to 3 pixels without correcting the aberration of the image. Therefore, it is possible to align the two images so that they cannot be seen. However, at an image height of 1, the aberration is 12%, and the alignment accuracy without correcting the aberration of the image is 18 pixels. For this reason, it is necessary to eliminate the influence of the motion vector of the measurement region at the image height in the calculation of the inter-image motion vector.

次に、図4を参照して、統合処理部106の構成の詳細を説明する。統合処理部106は、寄与度算出部1061と統合演算処理部1062とを備える。寄与度算出部1061は、位置関係算出部1060を含む。   Next, details of the configuration of the integration processing unit 106 will be described with reference to FIG. The integration processing unit 106 includes a contribution degree calculation unit 1061 and an integration calculation processing unit 1062. The contribution calculation unit 1061 includes a positional relationship calculation unit 1060.

位置関係算出部1060は、撮像された像の中心(x0,y0)と測定領域の重心(中心)位置Bi=(bxi,byi)に基づいて、測定領域の重心位置の像高Yi或いは像高の二乗Yi2等を算出する。ここで、像の中心とは、撮影レンズの光軸と撮像部12における画像平面との交点に相当する位置である。寄与度算出部1061では、画像間動きベクトルの算出における、i番目の測定領域の動きベクトルViの寄与度Kiを算出する。寄与度算出部1061は、像高Yiや像高の二乗Yi2から歪曲収差DTを求め、歪曲収差DTから寄与度Kiを計算する。統合演算処理部1062は、信頼度Si及び寄与度Kiに応じて、各測定領域に対して算出された動きベクトルViを統合することにより、唯一の画像間動きベクトルとして補正ベクトルVFrameを算出する。 Based on the center (x0, y0) of the captured image and the centroid (center) position Bi = (bxi, byi) of the measurement area, the positional relationship calculation unit 1060 determines the image height Yi or image height of the centroid position of the measurement area. The square Yi 2 etc. is calculated. Here, the center of the image is a position corresponding to the intersection of the optical axis of the photographing lens and the image plane in the imaging unit 12. The contribution calculation unit 1061 calculates the contribution Ki of the motion vector Vi of the i-th measurement region in the calculation of the inter-image motion vector. The contribution calculation unit 1061 calculates the distortion aberration DT from the image height Yi and the square of the image height Yi 2 , and calculates the contribution Ki from the distortion aberration DT. The integrated arithmetic processing unit 1062 calculates the correction vector V Frame as the only inter-image motion vector by integrating the motion vectors Vi calculated for each measurement region according to the reliability Si and the contribution Ki. .

次に、図5のフローチャートを参照して、画像処理部3が行う画像処理の手順について説明する。   Next, the procedure of image processing performed by the image processing unit 3 will be described with reference to the flowchart of FIG.

ステップS10において、フレームメモリ102は、撮像部12から入力された複数枚の画像に関する画像データを一度格納する。   In step S <b> 10, the frame memory 102 once stores image data regarding a plurality of images input from the imaging unit 12.

ステップS11において、領域設定部103は、基準画像に対して、動きベクトルを測定するための所定の測定領域1001を設定する。例えば、領域設定部103は、測定領域1001として、基準画像中にブロックを格子状に設定する(図9(a)参照)。   In step S11, the region setting unit 103 sets a predetermined measurement region 1001 for measuring a motion vector with respect to the reference image. For example, the area setting unit 103 sets blocks in the reference image as a measurement area 1001 in a grid pattern (see FIG. 9A).

ステップS12において、ベクトル算出部104は、基準となる画像である基準画像(又は基準フレーム)と比較の対象となる画像である対象画像(又は対象フレーム)の間の動きベクトルを算出する。ベクトル算出部104は、基準画像の測定領域に対して、対象画像中の最も相関の高い領域の位置の相対的なズレを動きベクトルとして算出する。ここで、ベクトル算出部104は、フレームメモリ102に格納された基準画像と対象画像の画像データと、領域設定部103で設定された測定領域に関するデータを使用する。相関の高い領域を検出するために、誤差二乗和SSD、誤差絶対値和SAD、正規化相互相関NCC等の相関演算が用いられる。   In step S12, the vector calculation unit 104 calculates a motion vector between a reference image (or reference frame) that is a reference image and a target image (or target frame) that is a comparison target image. The vector calculation unit 104 calculates, as a motion vector, a relative shift in the position of the region having the highest correlation in the target image with respect to the measurement region of the reference image. Here, the vector calculation unit 104 uses the reference image and the image data of the target image stored in the frame memory 102 and the data related to the measurement region set by the region setting unit 103. In order to detect a region having a high correlation, a correlation calculation such as an error square sum SSD, an error absolute value sum SAD, or a normalized cross-correlation NCC is used.

ステップS13において、信頼度算出部105は、各測定領域1001について算出した動きベクトルの信頼度Si(i=1〜n)を演算する。信頼度Siは、ベクトル算出部104での動きベクトルの算出結果の正確さの程度を示す指標である。なお、動きベクトルの信頼度の詳細な算出方法は後述する。   In step S <b> 13, the reliability calculation unit 105 calculates the reliability Si (i = 1 to n) of the motion vector calculated for each measurement region 1001. The reliability Si is an index indicating the degree of accuracy of the motion vector calculation result in the vector calculation unit 104. A detailed method for calculating the reliability of the motion vector will be described later.

ステップS14において、特性取得部107は、撮影レンズ1100のレンズ特性を記憶部としてのROM1101から取得する。レンズ特性は、寄与度の算出及び歪曲収差の補正に用いられる。なお、ここで、レンズの識別を、ROM1101に記憶されたレンズの識別情報(例えば、レンズ型名やシリアルナンバー)に基づいて行ってよい。   In step S14, the characteristic acquisition unit 107 acquires the lens characteristics of the photographing lens 1100 from the ROM 1101 serving as a storage unit. The lens characteristics are used for calculating the contribution and correcting distortion. Here, lens identification may be performed based on lens identification information (for example, a lens model name or serial number) stored in the ROM 1101.

ステップS15において、統合処理部106は、各測定領域の動きベクトルのデータの統合を行って、画像間の動きベクトルの唯一の代表値としての補正ベクトルを算出する。この算出は、ベクトル算出部104で算出された動きベクトルのデータと、信頼度算出部105で算出された信頼度と、特性取得部107で取得したレンズ特性に基づいて為される。ここで、特許文献4に記載の従来技術と異なり、補正ベクトルは、歪曲収差の補正をする前の画像に対して求められているので、図2に示すように、収差補正と動きベクトル算出を並列化することができる。なお、動きベクトルの統合処理の詳細は、後述する。   In step S15, the integration processing unit 106 integrates the motion vector data of each measurement region, and calculates a correction vector as the only representative value of the motion vector between images. This calculation is performed based on the motion vector data calculated by the vector calculation unit 104, the reliability calculated by the reliability calculation unit 105, and the lens characteristics acquired by the characteristic acquisition unit 107. Here, unlike the prior art described in Patent Document 4, since the correction vector is obtained for the image before the correction of the distortion aberration, the aberration correction and the motion vector calculation are performed as shown in FIG. Can be parallelized. Details of the motion vector integration processing will be described later.

ステップS16において、収差補正部108は、フレームメモリ102の画像データに対して歪曲収差の補正を行う。歪曲収差の補正は、式(6)又は(7)を用いて、実像高Y’を理想像高Yに変換することにより為される。なお、図5のフローチャートに示した順序に限られず、ステップS11−S15の動きベクトル算出及びベクトル統合処理と、ステップS16の収差補正を並列的に処理することができる。   In step S <b> 16, the aberration correction unit 108 corrects distortion for the image data in the frame memory 102. The distortion is corrected by converting the real image height Y ′ to the ideal image height Y using the equation (6) or (7). The motion vector calculation and vector integration processing in steps S11 to S15 and the aberration correction in step S16 can be processed in parallel, not limited to the order shown in the flowchart of FIG.

ステップS17において、フレーム加算部109は、収差の補正を行った後の基準画像と対象画像を、算出した補正ベクトルに基づいて位置合わせしてフレーム加算処理を行う。このフレーム加算処理において、補正ベクトルに対応した量だけ対象画像を基準画像に対して相対的に平行移動させるシフト処理を行っている。シフト処理による位置合わせの後に、基準画像と対象画像の画素値が加算される。フレーム加算処理の後の合成画像を使用して、いわゆる超解像処理等を行うこともできる。   In step S <b> 17, the frame addition unit 109 performs frame addition processing by aligning the reference image after correction of aberration and the target image based on the calculated correction vector. In this frame addition process, a shift process is performed in which the target image is translated relative to the reference image by an amount corresponding to the correction vector. After the alignment by the shift process, the pixel values of the reference image and the target image are added. A so-called super-resolution process or the like can also be performed using the composite image after the frame addition process.

次に、上述のステップS13における動きベクトルの信頼度算出の詳細を説明する。   Next, details of motion vector reliability calculation in step S13 will be described.

動きベクトルの信頼度の算出は、様々な方法が知られているが、ここでは、基準画像の測定領域とこれに対応する対象画像の画像領域との間の相関値に基づいて信頼度を算出する。相関値として、例えば、基準画像のブロックIi(測定領域)と、これに対応する対象画像のブロックIjに含まれる画素値の差分の二乗和SSDを用いる。この二乗和SSDは、以下の数式(8)で表される。   Various methods are known for calculating the reliability of the motion vector. Here, the reliability is calculated based on the correlation value between the measurement area of the reference image and the corresponding image area of the target image. To do. As the correlation value, for example, a square sum SSD of differences between pixel values included in the block Ii (measurement region) of the reference image and the block Ij of the target image corresponding thereto is used. This square sum SSD is represented by the following mathematical formula (8).

ここで、座標(bxi,byi)は、領域設定部103で設定された基準画像のi番目のブロックの中心位置(又は重心位置)を示し、ブロックの番号iの数nだけ用意されている。h,vは、それぞれ、ブロックの水平、垂直方向の大きさである。座標(bxj,byj)は、基準画像のブロックに対応する対象画像のj番目のブロック(対象ブロック)の中心位置を示し、ブロックマッチングの探索範囲に対応して用意されている。 Here, the coordinates (bxi, byi) indicate the center position (or barycentric position) of the i-th block of the reference image set by the region setting unit 103, and the number n corresponding to the block number i is prepared. h and v are the horizontal and vertical sizes of the block, respectively. The coordinates (bxj, byj) indicate the center position of the j-th block (target block) of the target image corresponding to the block of the reference image, and are prepared corresponding to the search range of block matching.

i番目のブロックの二乗和SSD(i,j)は、対象ブロックの番号jによって種々の値をと
るが、i番目のブロックの動きベクトルの信頼度Siは、SSD(i,j)の最小値および平均値
との差分に基づいて求められる。例えば、信頼度Siは、SSD(i,j)の最小値および平均値との差分とすればよい。
The square sum SSD (i, j) of the i-th block takes various values depending on the number j of the target block, but the reliability Si of the motion vector of the i-th block is the minimum value of the SSD (i, j). And obtained based on the difference from the average value. For example, the reliability Si may be a difference between the minimum value and the average value of SSD (i, j).

なお、相関値SSDの統計性に基づく信頼度は、領域の構造特徴と以下の概念で対応付けられる。(i)エッジ構造が鮮鋭な領域の場合に、その領域に対して算出された動きベクトルの信頼度が高く、結果として、SSDの最小値を示す対象画像のブロックの位置の誤差は少ない。SSDのヒストグラムをとった場合に、最小値を示す位置付近に小さなSSDが集中する。従って、SSDの最小値と平均値の差分が大きい。(ii)テクスチャや平坦な構造の場合、SSDのヒストグラムが平坦になり、結果としてSSDの最小値と平均値の差が小さく、信頼度は低い。(iii)繰り返し構造の場合、SSDの最小値と最大値を示す対象ブロックの位置が近く、SSDが小さい値を示す位置が分散している。結果として最小値と平均値の差が小さく、信頼度は低い。この様に、SSD(i,j)の最小値および平均値との差分に基づいて、i番目のブロックに対応した、信頼度の高い動きベクトルを選択する。   Note that the reliability based on the statistical property of the correlation value SSD is associated with the structural feature of the region by the following concept. (I) In the case of a region having a sharp edge structure, the reliability of the motion vector calculated for the region is high, and as a result, the error in the position of the block of the target image indicating the minimum value of the SSD is small. When the SSD histogram is taken, small SSDs are concentrated in the vicinity of the position indicating the minimum value. Therefore, the difference between the minimum value and the average value of the SSD is large. (Ii) In the case of a texture or a flat structure, the SSD histogram is flat. As a result, the difference between the minimum value and the average value of the SSD is small, and the reliability is low. (Iii) In the case of a repetitive structure, the positions of target blocks indicating the minimum and maximum SSD values are close, and the positions indicating small SSD values are dispersed. As a result, the difference between the minimum value and the average value is small, and the reliability is low. In this manner, a highly reliable motion vector corresponding to the i-th block is selected based on the difference between the minimum value and the average value of SSD (i, j).

なお、信頼度に関して、各ブロックのエッジの量から信頼度を求めることもできる。   Regarding the reliability, the reliability can also be obtained from the amount of edge of each block.

次に、図6のフローチャートを参照して、上述のステップS15の動きベクトル統合処理の詳細な手順を説明する。   Next, a detailed procedure of the motion vector integration process in step S15 described above will be described with reference to the flowchart in FIG.

ステップS21において、位置関係算出部1060は、式(9)の演算を行う。位置関係算出部1060は、像の中心位置(x0,y0)とブロック(測定領域)の中心位置Bi=(bxi,byi)から、像の中心とブロックの中心とのx軸及びy軸方向の間隔Rxi、Ryiを算出する。さらに、位置関係算出部1060は、間隔Rxi、Ryiから、i番目のブロックの中心の像高Yiの二乗Yi2等を算出する。 In step S21, the positional relationship calculation unit 1060 performs the calculation of Expression (9). The positional relationship calculation unit 1060 calculates the x-axis and y-axis directions between the center of the image and the center of the block from the center position (x0, y0) of the image and the center position Bi = (bxi, byi) of the block (measurement region). The intervals Rxi and Ryi are calculated. Further, the positional relationship calculation unit 1060 calculates a square Yi 2 or the like of the image height Yi at the center of the i-th block from the intervals Rxi and Ryi.

なお、位置関係算出部1060は、ブロックが設定された時にブロックの番号iごとに像高Yiを計算し、番号iと像高Yiとの関係を示す参照テーブルを画像処理部3のメモリに保存しておいても良い。この場合、寄与度算出部1061は、必要に応じて、この参照テーブルを参照して、ブロックの番号iから計算しておいた像高Yiを獲得できる。   The positional relationship calculation unit 1060 calculates the image height Yi for each block number i when the block is set, and stores a reference table indicating the relationship between the number i and the image height Yi in the memory of the image processing unit 3. You can keep it. In this case, the contribution degree calculation unit 1061 can acquire the image height Yi calculated from the block number i with reference to the reference table as necessary.

ステップS22において、寄与度算出部1061は、特性取得部107で取得したレンズパラメータa1、a2、a3を読込む。寄与度算出部1061は、ステップS21で求めた像高の二乗Yi2から歪曲収差DT(%)を式(10)のように算出する。 In step S <b> 22, the contribution calculation unit 1061 reads the lens parameters a 1 , a 2 , and a 3 acquired by the characteristic acquisition unit 107. The contribution calculation unit 1061 calculates the distortion aberration DT (%) from the square Yi 2 of the image height obtained in step S21 as shown in Expression (10).

なお、式(10)のように歪曲収差DT(%)をYi2の関数として得ることができる。 It should be noted that the distortion aberration DT (%) can be obtained as a function of Yi 2 as shown in equation (10).

別法として、寄与度算出部1061は、像高Yと歪曲収差DTとの関係を与える参照テーブルを参照することにより、像高Yi(=(Rxi2+Ryi2)1/2)から歪曲収差DT(Yi)を取得してもよい。 Alternatively, the contribution degree calculating unit 1061 refers to the reference table providing the relation between the image height Y and distortion DT, distortion from the image height Yi (= (Rxi 2 + Ryi 2) 1/2) DT (Yi) may be acquired.

ステップS23において、寄与度算出部1061は、図7に示すような歪曲収差DTと寄与度Kiの関数(関係)に基づいて、歪曲収差DTから寄与度Kiを計算する(Ki=Ki(DT))。図7のように、歪曲収差の絶対値|DT|が小さい測定領域で、寄与度Kiを大きくしたので、補正ベクトルVFrameが正確に算出できる。なお、歪曲収差の絶対値|DT|が像の中心に近いほど小さいので、寄与度Kiは、i番目の測定領域が像の中心(x0,y0)に近いほど高くなるように算出されている。 In step S23, the contribution calculation unit 1061 calculates the contribution Ki from the distortion DT based on the function (relationship) between the distortion DT and the contribution Ki as shown in FIG. 7 (Ki = Ki (DT)). ). As shown in FIG. 7, since the contribution degree Ki is increased in the measurement region where the absolute value | DT | of the distortion aberration is small, the correction vector V Frame can be accurately calculated. Since the absolute value | DT | of the distortion aberration is smaller as it is closer to the center of the image, the contribution Ki is calculated so as to be higher as the i-th measurement region is closer to the center (x0, y0) of the image. .

ステップS24において、統合演算処理部1062は、各測定領域に対して算出された動きベクトルViを、信頼度Siと寄与度Kiに応じて統合することにより、補正ベクトルVFrameを算出する。 In step S24, the integrated arithmetic processing unit 1062 calculates the correction vector V Frame by integrating the motion vectors Vi calculated for each measurement region according to the reliability Si and the contribution degree Ki.

図8は、上述のステップS24において、統合演算処理部1062が行う統合演算処理のフローチャートを示している。   FIG. 8 shows a flowchart of the integrated calculation process performed by the integrated calculation processing unit 1062 in step S24 described above.

ステップS31では、信頼度Siの閾値処理を行い、信頼度Siが閾値S_Thrより大きいか否か判断している。ステップS32では、信頼度Siが閾値S_Thrより大きい場合、閾値より大きい信頼度Siはそのままに維持し、最終的な信頼度STiをSiに設定する。ステップS33では、信頼度Siが閾値S_Thrより小さい場合、閾値以下の信頼度Siの動きベクトルの寄与を0とすべく、最終的な信頼度STiを0に設定する。このように補正ベクトルVframeの演算に用いられる最終的な信頼度STiを求めている。これにより、動きベクトルの統合結果が安定する、即ち正確な補正ベクトルが求められる。 In step S31, a threshold value process of reliability Si is performed, and it is determined whether or not reliability Si is greater than threshold value S_Thr. In step S32, when the reliability Si is larger than the threshold S_Thr, the reliability Si larger than the threshold is maintained as it is, and the final reliability STi is set to Si. In step S33, if the reliability Si is smaller than the threshold value S_Thr, the final reliability STi is set to 0 so that the contribution of the motion vector of the reliability Si below the threshold value is 0. In this way, the final reliability STi used for the calculation of the correction vector V frame is obtained. Thereby, the motion vector integration result is stabilized, that is, an accurate correction vector is obtained.

ステップS34において、最終的な信頼度STi、寄与度Ki、i番目の測定領域の動きベクトルViから、補正ベクトルVFrameが算出される。具体的には、数式(11)のように、最終的な信頼度STiと寄与度Kiに応じて重み係数を設定して、動きベクトルViを重み付け加算(又は加重平均)することにより、補正ベクトルVFrameが算出される。 In step S34, a correction vector V Frame is calculated from the final reliability STi, contribution Ki, and motion vector Vi of the i-th measurement region. Specifically, the correction vector is set by weighted addition (or weighted average) of the motion vector Vi by setting a weighting coefficient according to the final reliability STi and the contribution degree Ki, as in Expression (11). V Frame is calculated.

ここで、右辺の分母ΣSTiKiは正規化の係数である。重み係数(STi・Ki/ΣSTiKi)
が、最終的な信頼度STiと寄与度Kiの積に応じて設定されている。これにより、信頼度STiまたは寄与度Kiの両方を考慮して、適切な補正ベクトルVFrameが算出できる。さらに、信頼度と寄与度の一方が小さい測定領域の動きベクトルの影響を小さくするとともに、信頼度と寄与度の両方が大きい測定領域の動きベクトルの影響を大きくして、画像間動きベクトル(補正ベクトル)を的確に算出できる。
Here, the denominator ΣSTiKi on the right side is a normalization coefficient. Weighting factor (STi / Ki / ΣSTiKi)
Is set according to the product of the final reliability STi and the contribution Ki. Accordingly, an appropriate correction vector V Frame can be calculated in consideration of both the reliability STi and the contribution degree Ki. Furthermore, while reducing the influence of the motion vector in the measurement area where one of the reliability and contribution is small, and increasing the influence of the motion vector in the measurement area where both the reliability and contribution are large, the inter-image motion vector (correction) Vector) can be calculated accurately.

このように、ステップS31−S34において、動きベクトルViが信頼度Siと寄与度Kiに基づいて重み付け加算され、補正ベクトルVFrameが算出される。なお、ステップS31−S33の処理を行わずに、最終的な信頼度STiの代わりに当初の信頼度Siを数式(11)において使用して、補正ベクトルVFrameを算出することもできる。 As described above, in steps S31 to S34, the motion vector Vi is weighted and added based on the reliability Si and the contribution degree Ki, and the correction vector V Frame is calculated. Note that the correction vector V Frame can be calculated by using the initial reliability Si in Equation (11) instead of the final reliability STi without performing the processing of steps S31 to S33.

上記のように、像高(測定領域の位置)と歪曲収差に関するレンズ特性とに基づいて歪曲収差を算出し、算出された歪曲収差から寄与度を算出する。これにより、収差に応じて的確に寄与度を算出でき、さらに、この寄与度に応じて測定領域の動きベクトルを統合することにより、的確に画像間動きベクトル(補正ベクトル)を算出できる。   As described above, the distortion aberration is calculated based on the image height (position of the measurement region) and the lens characteristics relating to the distortion aberration, and the contribution is calculated from the calculated distortion aberration. As a result, the degree of contribution can be accurately calculated according to the aberration, and the inter-image motion vector (correction vector) can be accurately calculated by integrating the motion vectors of the measurement region according to the degree of contribution.

次に、第一実施形態の作用効果について、図9を参照して詳細に説明する。図9(a)は、動きベクトルを算出する測定領域(ブロック)1001の位置を表している。図9(b)は、歪曲収差DTの絶対値|DT|が小さい領域1202を示す。従って、この領域1202では、動きベクトルの算出の精度が高い。なお、歪曲収差を有する像面202のうち像高Yが小さい領域で、歪曲収差の絶対値|DT|が小さくなっている(図3参照)。図9(c)は、動きベクトルの算出精度が高い(即ち、歪曲収差DTの絶対値|DT|が小さい)領域1202内に位置する測定領域(ブロック)1203を示す。本実施形態では、歪曲収差の絶対値|DT|が小さい測定領域1203で、図7に示すように寄与度Kiが大きく設定される。このため、歪曲収差の絶対値|DT|が小さい測定領域の動きベクトルの影響を大きくし、絶対値|DT|が大きい測定領域の動きベクトルの影響を小さくして、補正ベクトルVFrameが正確に算出できる。 Next, the effect of 1st embodiment is demonstrated in detail with reference to FIG. FIG. 9A shows the position of a measurement region (block) 1001 for calculating a motion vector. FIG. 9B shows a region 1202 where the absolute value | DT | of the distortion aberration DT is small. Therefore, in this area 1202, the accuracy of motion vector calculation is high. It should be noted that the absolute value | DT | of the distortion aberration is small in a region where the image height Y is small in the image surface 202 having distortion aberration (see FIG. 3). FIG. 9C shows a measurement region (block) 1203 located in a region 1202 where the motion vector calculation accuracy is high (that is, the absolute value | DT | of the distortion aberration DT is small). In the present embodiment, the contribution Ki is set large as shown in FIG. 7 in the measurement region 1203 where the absolute value | DT | of the distortion aberration is small. Therefore, the absolute value of distortion | DT | is highly sensitive to motion vectors in small measurement area, the absolute value | DT | to reduce the influence of motion vectors is large measurement area, the correction vector V Frame exactly It can be calculated.

このように、収差補正する前の段階でも、複数枚の画像に対し収差の影響を除去して画像間動きベクトル(補正ベクトル)を正確に決定することができる。従って、収差補正が正確でない時に収差補正を行った後の画像に対して画像間動きベクトルを決定する場合より、的確に画像間動きベクトルを決定することができる。さらに、この的確な画像間動きベクトルに特徴付けられる画像の変形(ここでは平行移動)により、精度良い画像の位置合わせ処理が可能となる。   Thus, even before the aberration correction, the influence of aberration can be removed from a plurality of images and the inter-image motion vector (correction vector) can be accurately determined. Therefore, the inter-image motion vector can be determined more accurately than when the inter-image motion vector is determined for the image after the aberration correction is performed when the aberration correction is not accurate. Further, the image alignment characterized by the accurate inter-image motion vector (here, parallel movement) enables accurate image alignment processing.

なお、第一実施形態は、収差の例として歪曲収差をとり挙げているが、歪曲収差以外の収差(像面歪曲等)でも第一実施形態が適応できることは明白である。例えば、像高Y(又は測定領域の位置)と収差DTの関係が分かれば、どのような収差に対しても図6のように収差を求められ、収差から寄与度Kiが算出できる。この寄与度に応じて、複数の測定領域の動きベクトルを統合することにより、画像間動きベクトルを算出できる。   Although the first embodiment uses distortion as an example of aberration, it is obvious that the first embodiment can be applied to aberrations other than distortion (such as image plane distortion). For example, if the relationship between the image height Y (or the position of the measurement region) and the aberration DT is known, the aberration can be obtained for any aberration as shown in FIG. 6, and the contribution Ki can be calculated from the aberration. An inter-image motion vector can be calculated by integrating the motion vectors of a plurality of measurement regions according to the contribution.

また、レンズ1100のレンズパラメータは、撮影レンズに取り付けられたROM1101に記憶されている場合を説明した。しかし、画像処理部内のメモリにレンズパラメータを記憶しておき、レンズの種類を判別してからこのレンズの種類に応じて当該他のメモリからレンズパラメータを読み出す構成とすることもできる。   Further, the case where the lens parameters of the lens 1100 are stored in the ROM 1101 attached to the photographing lens has been described. However, the lens parameter may be stored in a memory in the image processing unit, and the lens parameter may be read from the other memory in accordance with the lens type after the lens type is determined.

[第一実施形態の第一変形例]
上述の実施形態において、図6のフローチャートのようにベクトル統合処理(S15)を行ったが、第一実施形態の第一の変形例として、図10のフローチャートのようにベクトル統合処理を行ってもよい。
[First Modification of First Embodiment]
In the above-described embodiment, the vector integration process (S15) is performed as in the flowchart of FIG. 6, but as a first modification of the first embodiment, the vector integration process is also performed as in the flowchart of FIG. Good.

図10のフローチャートを参照すると、ステップS41において、位置関係算出部1060は、像の中心と測定領域の中心間のx軸及びy軸方向の間隔(Rxi、Ryi)を算出する。さらに、寄与度Kiを式(12)の関数Ki=K(Rxi,Ryi,a1,a2,a3) から直接的に算出する。 Referring to the flowchart of FIG. 10, in step S41, the positional relationship calculation unit 1060 calculates the distances (Rxi, Ryi) in the x-axis and y-axis directions between the center of the image and the center of the measurement region. Furthermore, directly to calculate the contribution Ki function Ki = K of the formula (12) from (Rxi, Ryi, a 1, a 2, a 3).

ステップS42において、信頼度Siと寄与度Kiに応じて、動きベクトルViを重み付け加算することにより、補正ベクトルVFrameを算出する。 In step S42, the correction vector V Frame is calculated by weighted addition of the motion vector Vi according to the reliability Si and the contribution degree Ki.

この変形例において、測定領域の位置と、収差に関するレンズパラメータとに基づいて、寄与度を算出することにより、収差を考慮した寄与度が算出できる。また、寄与度Kiを関数Ki=K(Rxi,Ryi,a1,a2,a3) から直接的に算出するため、算出ステップが少なくて済み、寄与度の算出が簡便に行える。 In this modification, by calculating the contribution based on the position of the measurement region and the lens parameter related to the aberration, the contribution considering the aberration can be calculated. Moreover, the contribution Ki Function Ki = K (Rxi, Ryi, a 1, a 2, a 3) for calculating directly from, requires less calculation step, the calculation of the contribution can be performed conveniently.

なお、第一の変形例は、収差の例として歪曲収差をとり挙げているが、収差が歪曲収差以外の収差(像面歪曲等)の場合でも適応できることは明白である。例えば、測定領域の位置と収差に関するレンズパラメータから、どのような収差であっても寄与度Kiが算出できる。この寄与度に応じて、複数の測定領域の動きベクトルを統合することにより、画像間動きベクトルを算出できる。さらに、この画像間動きベクトルに特徴付けられる画像の変形により、精度良い画像の位置合わせ処理が可能となる。   In the first modification, distortion is taken as an example of aberration, but it is apparent that the first modification can be applied even when the aberration is an aberration other than distortion (such as image surface distortion). For example, the contribution Ki can be calculated from any lens aberration related to the position of the measurement region and the aberration. An inter-image motion vector can be calculated by integrating the motion vectors of a plurality of measurement regions according to the contribution. Further, the image alignment characterized by the inter-image motion vector enables accurate image alignment processing.

[第一実施形態の第二変形例]
上述の実施形態において、図6のフローチャートのようにベクトル統合処理(S15)を行ったが、第一実施形態の第二の変形例として、図11のフローチャートのようにベクトル統合処理を行ってもよい。
[Second Modification of First Embodiment]
In the above-described embodiment, the vector integration process (S15) is performed as in the flowchart of FIG. 6, but as a second modification of the first embodiment, the vector integration process is performed as in the flowchart of FIG. Good.

ステップS51において、位置関係算出部1060は、像の中心と測定領域の中心間のx軸及びy軸方向の間隔(Rxi、Ryi)を算出する。さらに、ブロック中心の像高Yiを算出する。   In step S51, the positional relationship calculation unit 1060 calculates an interval (Rxi, Ryi) between the center of the image and the center of the measurement region in the x-axis and y-axis directions. Further, the image height Yi at the block center is calculated.

ステップS52において、寄与度算出部1061は、下記の表1、表2のように、像高Yi毎に寄与度Kiを与える参照テーブルを参照して、像高Yiから寄与度Kiを計算する。参照テーブルは、画像処理部3のメモリにおいて、レンズ識別子から判定できるレンズの種類毎に定められ記憶されている。レンズ識別子は、特性取得部107により取得される。従って、寄与度算出部1061は、測定領域の位置と寄与度との関係から、撮影レンズの種類と測定領域の位置に応じて寄与度を算出できる。表1、表2のように、歪曲収差の絶対値|DT|が小さい測定領域の像高(測定領域の位置)で、寄与度Kiが大きく設定される。   In step S52, the contribution calculation unit 1061 calculates the contribution Ki from the image height Yi with reference to a reference table that gives the contribution Ki for each image height Yi as shown in Tables 1 and 2 below. The reference table is determined and stored for each type of lens that can be determined from the lens identifier in the memory of the image processing unit 3. The lens identifier is acquired by the characteristic acquisition unit 107. Therefore, the contribution calculation unit 1061 can calculate the contribution according to the type of the photographing lens and the position of the measurement region from the relationship between the position of the measurement region and the contribution. As shown in Tables 1 and 2, the contribution Ki is set to be large at the image height (measurement region position) of the measurement region where the absolute value | DT | of the distortion aberration is small.

データが存在しない像高に対しては、像高を内挿して寄与度Kiを得るようにしても良い。即ち、データのない像高に対して、存在するデータからの補間により寄与度Kiを得るようにしても良い。なお、表1、表2において、説明の便宜上、歪曲収差DTを示しているが、歪曲収差DTは省略できるものである。   For image heights for which no data exists, the contribution level Ki may be obtained by interpolating the image height. That is, the contribution degree Ki may be obtained by interpolation from existing data for an image height having no data. In Tables 1 and 2, the distortion aberration DT is shown for convenience of explanation, but the distortion aberration DT can be omitted.

なお、表1、表2から分かるように、同じ像高Yでも、寄与度Kiは、撮影レンズの焦点距離fが大きいほど大きくなる。撮影レンズの焦点距離fが大きいほど、歪曲収差DTの絶対値が小さくなることを考慮して寄与度Kiが設定されているためである。これにより、焦点距離fに応じて的確に寄与度Kiを算出し、正確に画像間動きベクトルを算出できる。   As can be seen from Tables 1 and 2, even with the same image height Y, the contribution Ki increases as the focal length f of the photographing lens increases. This is because the contribution degree Ki is set in consideration of the fact that the absolute value of the distortion aberration DT becomes smaller as the focal length f of the photographing lens becomes larger. Thereby, the degree of contribution Ki can be accurately calculated according to the focal length f, and the inter-image motion vector can be accurately calculated.

ステップS53において、統合演算処理部1062は、各測定領域に対して算出された動きベクトルViを、信頼度Siと寄与度Kiに応じて統合することにより、補正ベクトルVFrameを算出する。 In step S53, the integrated calculation processing unit 1062 calculates the correction vector V Frame by integrating the motion vectors Vi calculated for each measurement region according to the reliability Si and the contribution degree Ki.

この第二変形例では、画像内の位置と寄与度の関係を予め定めてさえおけば、歪曲収差を具体的に計算する必要はなく、簡便に寄与度が求められる。   In the second modified example, as long as the relationship between the position in the image and the contribution degree is determined in advance, it is not necessary to calculate the distortion aberration specifically, and the contribution degree can be easily obtained.

なお、第二変形例は、収差の例として歪曲収差をとり挙げているが、収差は歪曲収差以外でも適応できることは明白である。例えば、表1、2のように、像高と寄与度の関係を収差に基づいて予め定めてさえおけば、像高(測定領域の位置)及びレンズの種類(レンズ特性)に対応して寄与度を算出できる。従って、歪曲収差以外の収差がある場合でも、測定領域の位置とレンズ特性とに基づいて、画像間動きベクトルの算出における各動きベクトルの寄与度を算出できる。この寄与度に応じて、複数の測定領域の動きベクトルを統合することにより、画像間動きベクトルを算出できる。   In the second modification, distortion is taken as an example of aberration, but it is obvious that the aberration can be applied other than distortion. For example, as shown in Tables 1 and 2, as long as the relationship between the image height and the degree of contribution is determined in advance based on the aberration, the contribution is made corresponding to the image height (position of the measurement region) and the type of lens (lens characteristics) The degree can be calculated. Therefore, even when there is an aberration other than distortion, the contribution of each motion vector in calculating the inter-image motion vector can be calculated based on the position of the measurement region and the lens characteristics. An inter-image motion vector can be calculated by integrating the motion vectors of a plurality of measurement regions according to the contribution.

[第一実施形態の第三変形例]
次に、第一実施形態の第三変形例について、図12を参照して説明する。図2、図5においてフレーム加算の例を示したが、フレーム加算に代えて動画のブレ補正を行うこともできる。図12は、補正ベクトルに基づいて、基準画像に対する対象画像の位置合わせを行う動画ブレ補正を行う場合の構成図を示す。図12において、フレームブレ補正部110は、対象画像を、基準画像に対してブレが少なくなるように相対移動させて、図示しない表示装置又は記憶装置に対象画像データを転送する。
[Third Modification of First Embodiment]
Next, a third modification of the first embodiment will be described with reference to FIG. Although examples of frame addition are shown in FIGS. 2 and 5, motion blur correction can be performed instead of frame addition. FIG. 12 is a configuration diagram in the case of performing the moving image blur correction in which the target image is aligned with the reference image based on the correction vector. In FIG. 12, the frame blur correction unit 110 moves the target image relative to the reference image so as to reduce blur, and transfers the target image data to a display device or storage device (not shown).

なお、第三変形例は、収差が歪曲収差以外の場合でも、適応できることは明白である。   It is apparent that the third modification can be applied even when the aberration is other than distortion.

[第二実施形態]
次に、第二実施形態について、図13、図14を参照して説明する。第一実施形態では、動きベクトルの重み付け加算(数式(11))によって補正ベクトル(画像間動きベクトル)を求めたが、これと異なる方法で補正ベクトルを求める。他の構成は、第一実施形態と同様である。
[Second Embodiment]
Next, a second embodiment will be described with reference to FIGS. In the first embodiment, the correction vector (inter-image motion vector) is obtained by weighted addition of motion vectors (Formula (11)), but the correction vector is obtained by a different method. Other configurations are the same as those in the first embodiment.

第二実施形態では、動きベクトルVi=(xi,yi)をビン(階級)に分類することにより、度数分布(又はヒストグラム)を求める。度数分布における出現頻度(出現度数)が最も高いベクトルは、画像間の動きを代表する代表ベクトルであり、これを補正ベクトルとして採用する。なお、以下のように、出現頻度の計数において、信頼度STiと寄与度Kiが考慮されている。   In the second embodiment, a frequency distribution (or histogram) is obtained by classifying motion vectors Vi = (xi, yi) into bins (classes). The vector having the highest appearance frequency (appearance frequency) in the frequency distribution is a representative vector representing the motion between images, and this is adopted as a correction vector. As described below, the reliability STi and the contribution Ki are taken into account in the appearance frequency counting.

図13のように、動きベクトルViに関するビンは二次元であり、ここではx軸方向の幅がbin_xで、y軸方向の幅がbin_yの正方形とする。図13に示すように、動きベクトルViの水平・垂直方向座標をxi,yiとして、xi,yiがs番目(s=0…N|(N=l×m))のビンに入った場合に、ビンの出現頻度を増加させる。別な言い方では、s番目のビンに入った動きベクトルVi は、s番目のビンに分類され、s番目のビンの中心(重心)ベクトルVbin_sに量子化される。 As shown in FIG. 13, the bin relating to the motion vector Vi is two-dimensional, and here, it is assumed that the width in the x-axis direction is bin_x and the width in the y-axis direction is bin_y. As shown in FIG. 13, when the horizontal and vertical coordinates of the motion vector Vi are xi and yi, and xi and yi enter the s-th (s = 0... N | (N = l × m)) bin. , Increase the appearance frequency of bins. In another way, the motion vector Vi enters the s-th bin is classified into the s-th bin is quantized to s-th center of the bottle (centroid) vector V bin_s.

図14(a)のように、通常の度数分布では、動きベクトルVi がs番目のビンに入った場合に出現頻度を1だけ増加させるが、本実施形態では、信頼度STiと寄与度Kiが考慮されている。   As shown in FIG. 14A, in the normal frequency distribution, when the motion vector Vi enters the s-th bin, the appearance frequency is increased by 1. However, in this embodiment, the reliability STi and the contribution Ki are Has been taken into account.

図14(b)のように、動きベクトルViの信頼度STiのみを考慮する場合、動きベクトルVi がs番目のビンに入ると、そのビンの出現頻度を(STi×1)だけ増加させる。従って、図14(b)の縦軸は、あるビンに属する動きベクトルViの信頼度STiの合計(ΣSTi)を示す。なお、図14(b)では、信頼度STiを最大の信頼度で規格化して、STiを1以下としている。   As shown in FIG. 14B, when considering only the reliability STi of the motion vector Vi, when the motion vector Vi enters the sth bin, the appearance frequency of the bin is increased by (STi × 1). Accordingly, the vertical axis of FIG. 14B indicates the total reliability (ΣSTi) of the motion vectors Vi belonging to a certain bin. In FIG. 14B, the reliability STi is normalized with the maximum reliability, and STi is 1 or less.

図14(c)のように、動きベクトルViの信頼度STi及び寄与度Kiを考慮する場合、動きベクトルVi がs番目のビンに入ると、そのビンの出現頻度を(STi×Ki×1)だけ増加させる。従って、図14(c)の縦軸は、あるビンに属する動きベクトルViの信頼度STiと寄与度Kiの積の合計(ΣSTi・Ki)を示す。なお、信頼度STi及び寄与度Kiは、第一実施形態と同様に求めることができる。   As shown in FIG. 14C, when considering the reliability STi and the contribution degree Ki of the motion vector Vi, when the motion vector Vi enters the s-th bin, the appearance frequency of the bin is (STi × Ki × 1). Only increase. Accordingly, the vertical axis of FIG. 14C represents the sum (ΣSTi · Ki) of the products of the reliability STi and the contribution Ki of the motion vector Vi belonging to a certain bin. The reliability STi and the contribution degree Ki can be obtained in the same manner as in the first embodiment.

第二実施形態では、信頼度の高い動きベクトルの出現頻度に基づき補正ベクトルを求める。図14(c)のように、動きベクトルViの出現頻度を信頼度STiと寄与度Kiの積(STi・Ki)として計数して求めた度数分布(ヒストグラム)を使用する。この度数分布において、最大の出現頻度を示すビンの中心ベクトルVbin_s(ここでは、Vbin_s(s=2))を補正ベクトルVFrameに設定する。つまり、同一のビンに分類される動きベクトルViに対する信頼度STiと寄与度Kiの積の合計(ΣSTi・Ki)が最大となる場合に、そのビンの中心ベクトルVbin_sを補正ベクトルVFrameとする。なお、上記において、中心ベクトルVbin_sは、ビン(階級)を代表するベクトル(階級値)の一例として示したもので、ビンを代表するベクトルを中心ベクトルVbin_s以外に設定してもよい。 In the second embodiment, a correction vector is obtained based on the appearance frequency of a highly reliable motion vector. As shown in FIG. 14C, a frequency distribution (histogram) obtained by counting the appearance frequency of the motion vector Vi as the product of the reliability STi and the contribution Ki (STi · Ki) is used. In this frequency distribution, a bin center vector V bin — s (here, V bin — s (s = 2)) indicating the maximum appearance frequency is set as the correction vector V Frame . That is, when the sum (ΣSTi · Ki) of the product of the reliability STi and the contribution Ki for the motion vector Vi classified into the same bin is maximized, the center vector V bin_s of that bin is used as the correction vector V Frame . . In the above, the center vector Vbin_s is shown as an example of a vector (class value) representing a bin (class), and a vector representing the bin may be set to other than the center vector Vbin_s .

このように、第二実施形態では、信頼度と寄与度の積の合計が最大となるような画像間動きベクトルが求められる。このため、信頼度または寄与度が低い動きベクトルViの影響を排除して、適切な画像間動きベクトルが算出される。   Thus, in the second embodiment, an inter-image motion vector that maximizes the sum of products of reliability and contribution is obtained. Therefore, an appropriate inter-image motion vector is calculated by eliminating the influence of the motion vector Vi having a low reliability or contribution.

なお、第二実施形態は、収差が歪曲収差以外の場合でも、適応できることは明白である。   It is obvious that the second embodiment can be applied even when the aberration is other than distortion.

[第三実施形態]
次に、第三実施形態について、図15、図16を参照して説明する。第一実施形態と第二実施形態では、唯一の画像間ベクトルとしての補正ベクトルを算出した。そして、この補正ベクトルに対応した量だけ対象画像を基準画像に対して平行移動して、基準画像と対象画像を位置合わせした。つまり、第一実施形態と第二実施形態では、平行移動(水平移動・垂直移動)に係る変形パラメータのみを考慮して、対象画像を変形して位置合わせした。
[Third embodiment]
Next, a third embodiment will be described with reference to FIGS. 15 and 16. In the first embodiment and the second embodiment, a correction vector as a single inter-image vector is calculated. Then, the target image is translated with respect to the reference image by an amount corresponding to the correction vector, and the reference image and the target image are aligned. That is, in the first embodiment and the second embodiment, the target image is deformed and aligned in consideration of only the deformation parameter related to the parallel movement (horizontal movement / vertical movement).

しかし、第三実施形態では、複数個の画像間動きベクトルに基づいて平行移動以外の変形パラメータを算出し、平行移動以外の変形パラメータも考慮して画像を変形して位置合わせする。他の構成は、第二実施形態と同様である。   However, in the third embodiment, deformation parameters other than parallel movement are calculated based on a plurality of inter-image motion vectors, and the image is deformed and aligned in consideration of deformation parameters other than parallel movement. Other configurations are the same as those of the second embodiment.

これにより、平行移動以外に画像間の変形として回転移動等も考慮でき、補正ベクトルに基づく平行移動のみで変形を行う場合より適切に基準画像と対象画像の位置合わせができる場合がある。なお、平行移動以外の変形パラメータは、互いに異なる複数の画像間ベクトルに基づいて求めることができる。   Thereby, in addition to the parallel movement, a rotational movement or the like can be considered as the deformation between the images, and there are cases where the reference image and the target image can be aligned more appropriately than when the deformation is performed only by the parallel movement based on the correction vector. The deformation parameters other than the parallel movement can be obtained based on a plurality of different inter-image vectors.

本実施形態では、射影変換により画像を変形して位置合わせを行う例を示す。以下の(A)−(C)に、この画像の変形を例示する。なお、(A)のユークリッド変換と(B)のアフィン変換は、変形パラメータの数は通常の射影変換の8つより少なくなっているが、射影変換の特殊な例であり射影変換の範疇に含まれるものである。
(A)3パラメータ:ユークリッド変換(水平移動、垂直移動、回転から合成される変換)
(B)6パラメータ:アフィン変換(水平移動、垂直移動、回転、拡大縮小、鏡映、せん断から合成される変換)
(C)8パラメータ:通常の射影変換
なお、これらは代表的なものであり、その他の変換を行っても良い。
In the present embodiment, an example in which an image is deformed by projective transformation to perform alignment is shown. The following (A)-(C) illustrate the deformation of this image. The Euclidean transformation in (A) and the affine transformation in (B) have fewer deformation parameters than the normal projection transformation, but are special examples of the projection transformation and are included in the category of the projection transformation. It is what
(A) Three parameters: Euclidean transformation (transformation synthesized from horizontal movement, vertical movement, and rotation)
(B) 6 parameters: Affine transformation (transformation synthesized from horizontal movement, vertical movement, rotation, enlargement / reduction, reflection, and shear)
(C) 8 parameters: normal projective transformation These are representative ones, and other transformations may be performed.

図15において、変形パラメータ算出部112は、複数の画像間動きベクトルに基づいて変形パラメータを算出する。フレーム加算部109は、算出した変形パラメータを用いて対象画像を変形して、基準画像に対して位置合わせを行う。   In FIG. 15, a deformation parameter calculation unit 112 calculates a deformation parameter based on a plurality of inter-image motion vectors. The frame addition unit 109 deforms the target image using the calculated deformation parameter, and performs alignment with the reference image.

図16のフローチャートに第三実施形態の処理の流れを示す。ここで、ステップS60―S64の処理は、第一実施形態のステップS10―S14の処理と同じであり説明を省略する。   The flowchart of FIG. 16 shows the flow of processing of the third embodiment. Here, the processing of steps S60 to S64 is the same as the processing of steps S10 to S14 of the first embodiment, and a description thereof will be omitted.

ステップS65において、各測定領域の動きベクトルに基づいて、画像間動きベクトル(画像間の動きベクトルの代表値)を複数個算出する。例えば、第二実施形態の図14(c)に示す度数分布において、信頼度STiと寄与度Kiの積の合計(ΣSTi・Ki)が大きい順に複数個のビンを選択する。次に、選択したビンを代表する中心ベクトルVbin_sを画像間動きベクトルとして算出する。例えば、4つの画像間動きベクトルを算出する場合には、図14(c)において、ビン番号2、3、4、5のビンの中心ベクトルVbin_sが、4つの画像間動きベクトルとなる。これにより、信頼度STiまたは寄与度Kiが大きい画像間動きベクトルを優先的に考慮して、適切な変形パラメータが算出できる。 In step S65, a plurality of inter-image motion vectors (representative values of inter-image motion vectors) are calculated based on the motion vectors of each measurement region. For example, in the frequency distribution shown in FIG. 14C of the second embodiment, a plurality of bins are selected in descending order of the sum of products of reliability STi and contribution Ki (ΣSTi · Ki). Then, to calculate the central vector V Bin_s representing the selected bin as the inter-image motion vector. For example, when calculating a motion vector between the four images in FIG. 14 (c), the central vector V Bin_s bin bin number 2, 3, 4, 5, the motion vector between the four images. As a result, an appropriate deformation parameter can be calculated by preferentially considering an inter-image motion vector having a large reliability STi or contribution Ki.

ステップS66において、複数の画像間動きベクトルから、射影変換に関する変形パラメータを算出する。つまり、複数の画像間動きベクトルに特徴づけられる変形の変形パラメータが算出される。なお、変形パラメータの算出の詳細は、後述する。   In step S66, deformation parameters relating to projective transformation are calculated from a plurality of inter-image motion vectors. That is, deformation parameters for deformation characterized by a plurality of inter-image motion vectors are calculated. The details of the deformation parameter calculation will be described later.

ステップS67において、複数枚の画像に対して収差の補正が行われる。この処理は、前述の図5のステップS16の処理と同様である。なお、図16のフローチャートに示した順序に限られず、ステップS61−S66の動きベクトル算出及び変形パラメータ算出と、ステップS67の収差補正を並列的に処理することもできる。   In step S67, aberration correction is performed on a plurality of images. This process is the same as the process in step S16 of FIG. Note that the order is not limited to the order shown in the flowchart of FIG. 16, and the motion vector calculation and deformation parameter calculation in steps S61 to S66 and the aberration correction in step S67 can be processed in parallel.

ステップS68において、このようにして求められた変形パラメータに基づく変形を、基準画像に対して位置あわせを行う対象画像全体に行う。続いて、基準画像と対象画像が加算される。   In step S68, the deformation based on the deformation parameter thus obtained is performed on the entire target image to be aligned with the reference image. Subsequently, the reference image and the target image are added.

以下に、変形パラメータの算出の詳細をアフィン変換による変形を例にして説明する。ここでは、変形パラメータを複数の画像間動きベクトルに基づいて最小二乗法で求める例を説明する。なお、ここで、複数の画像間動きベクトルの数は4つであるが、これに限定されるものではない。   Hereinafter, details of the calculation of the deformation parameter will be described by taking the deformation by affine transformation as an example. Here, an example in which the deformation parameter is obtained by the least square method based on a plurality of inter-image motion vectors will be described. Here, the number of inter-image motion vectors is four, but is not limited to this.

まず、算出した4つの画像間動きベクトル(V1,V2,V3,V4)に対応する測定領域の中心位置に関して、その画像間動きベクトルにより移動する中心位置の始点と終点を以下のように設定する。なお、画像間動きベクトルに対応する測定領域とは、その画像間動きベクトルに量子化される動きベクトルが測定された測定領域のことである。 First, regarding the center position of the measurement region corresponding to the calculated four inter-image motion vectors (V 1 , V 2 , V 3 , V 4 ), the start point and end point of the center position moved by the inter-image motion vector are set as follows: Set as follows. Note that the measurement region corresponding to the inter-image motion vector is a measurement region where the motion vector quantized to the inter-image motion vector is measured.

とする。 And

即ち、4つの画像間動きベクトル(V1,V2,V3,V4)は以下の数式(15)のようになる。 That is, the four inter-image motion vectors (V 1 , V 2 , V 3 , V 4 ) are expressed by the following formula (15).

一方、アフィン変換の行列表記は以下の数式(16)のようになる。   On the other hand, the matrix notation of the affine transformation is as shown in the following formula (16).

上記の始点がアフィン変換により写像される終点
は、以下の数式(18)から求められる。
End point where the above start point is mapped by affine transformation
Is obtained from the following equation (18).

変形パラメータa,b,c,d,e,fの最適値は、以下の数式(19)のように最小二乗解で求める。   The optimum values of the deformation parameters a, b, c, d, e, and f are obtained by the least square solution as shown in the following equation (19).

なお、上記では、アフィン変換の例を示したが、その他の射影変換でも同様に複数の画像間動きベクトルに基づいて最小二乗法で求められる。   Although an example of affine transformation has been described above, other projection transformations are similarly obtained by the least square method based on a plurality of inter-image motion vectors.

また、上記では最小二乗法で求める例を示したが、以下のように最小数の画像間動きベクトルを用いて、方程式を解くことにより、変形パラメータを簡単に求めることもできる。   Moreover, although the example calculated | required by the least square method was shown above, a deformation | transformation parameter can also be easily calculated | required by solving an equation using the minimum number of motion vectors between images as follows.

例えば、ユークリッド変換では、2つの画像間動きベクトル(即ち、2組の始点、終点)に基づいて、以下の数式(20)の方程式を解くことにより変形パラメータを求められる。   For example, in the Euclidean transformation, the deformation parameter can be obtained by solving the following equation (20) based on two inter-image motion vectors (that is, two sets of start and end points).

ここで、θは回転角度、cは水平移動の変形パラメータ、fは垂直移動の変形パラメータを示す。 Here, θ is a rotation angle, c is a deformation parameter for horizontal movement, and f is a deformation parameter for vertical movement.

また、アフィン変換では、3つの画像間動きベクトル(即ち、3組の始点、終点)に基づいて、以下の数式(21)の方程式を解くことにより変形パラメータ(a−f)を求められる。   In the affine transformation, the deformation parameter (af) is obtained by solving the following equation (21) based on three inter-image motion vectors (that is, three sets of start and end points).

このように、第三実施形態では、複数の互いに異なる画像間動きベクトルから平行移動以外の変形パラメータが算出できる。このため、平行移動以外の変形(回転等)を含む場合でも、この変形パラメータを用いた変形により複数の画像間の正確な位置合わせが可能になる。   Thus, in the third embodiment, deformation parameters other than parallel movement can be calculated from a plurality of different inter-image motion vectors. For this reason, even when deformation (rotation or the like) other than parallel movement is included, accurate alignment between a plurality of images becomes possible by deformation using this deformation parameter.

また、射影変換の変形パラメータを求めるので、簡便に変形パラメータを求められる。最小二乗法を使用すれば、射影変換の変形パラメータを正確に求めることができる。さらに、射影変換が、6個以下の変形パラメータを有するアフィン変換等であれば、一般的な射影変換の変形パラメータの数(8個)より変形パラメータの数が減り、変形パラメータを求める演算処理が簡便になる。   In addition, since the transformation parameter for projective transformation is obtained, the transformation parameter can be easily obtained. If the least square method is used, the transformation parameter of the projective transformation can be accurately obtained. Furthermore, if the projective transformation is an affine transformation or the like having six or fewer deformation parameters, the number of deformation parameters is reduced from the number of general deformation parameters (eight) of the projective transformation, and calculation processing for obtaining the deformation parameters It becomes simple.

なお、第三実施形態は、収差が歪曲収差以外の場合でも、適応できることは明白である。   It is obvious that the third embodiment can be applied even when the aberration is other than distortion.

[第三実施形態の変形例]
上記の第三実施形態では、射影変換により画像を変形して位置合わせを行う例を示した。しかし、いわゆる弾性マッチングを用いて画像を変形して位置合わせを行うこともできる。これにより平行移動に係る変形パラメータ以外のパラメータも考慮でき、平行移動のみで変形を行う場合より適切に基準画像と対象画像の位置合わせができる。
[Modification of Third Embodiment]
In the third embodiment, the example in which the image is deformed by projective transformation to perform alignment is shown. However, it is also possible to perform alignment by deforming images using so-called elastic matching. Accordingly, parameters other than the deformation parameters related to the parallel movement can be taken into consideration, and the reference image and the target image can be more appropriately aligned than when the deformation is performed only by the parallel movement.

例えば、第二実施形態の図14(c)に示す度数分布において、信頼度STiと寄与度Kiの積の合計(ΣSTi・Ki)が大きい順に複数個のビンの中心ベクトルVbin_sを複数の画像間動きベクトルとして算出する。例えば、これらの複数の画像間動きベクトルによる変形を再現するように、弾性マッチングを行う。これにより、信頼度Siと寄与度Kiのいずれも大きい測定領域の動きベクトルの影響を大きくし、且つ弾性マッチングにより局所的な変形も考慮しつつ適切に基準画像と対象画像の位置合わせができる。 For example, in the frequency distribution shown in FIG. 14C of the second embodiment, a plurality of bin center vectors V bin — s are displayed in a descending order of the sum of products of reliability STi and contribution Ki (ΣSTi · Ki). Calculated as an inter-motion vector. For example, elastic matching is performed so as to reproduce the deformation caused by the plurality of inter-image motion vectors. Thereby, it is possible to appropriately align the reference image and the target image while increasing the influence of the motion vector in the measurement region where both the reliability Si and the contribution Ki are large, and considering local deformation by elastic matching.

なお、この第三実施形態の変形例は、収差が歪曲収差以外の場合でも、適応可能であることは明白である。   It is obvious that the modification of the third embodiment can be applied even when the aberration is other than distortion.

[その他の実施形態]
上述した各実施形態の説明では、画像処理部(画像処理装置)が行う処理としてハードウェアによる処理を前提としていたが、このような構成に限定される必要はない。例えば、別途ソフトウェアにて処理する構成も可能である。この場合、画像処理部は、CPU、RAM等の主記憶装置、上記処理の全て或いは一部を実現させるためのプログラムが記憶されたコンピュータ読み取り可能な記憶媒体を備えている。ここでは、このプログラムを画像処理プログラムと呼ぶ。そして、CPUが上記記憶媒体に記憶されている画像処理プログラムを読み出して、情報の加工・演算処理を実行することにより、上述の画像処理部と同様の処理を実現させる。
[Other Embodiments]
In the description of each embodiment described above, processing by hardware is assumed as processing performed by the image processing unit (image processing apparatus), but it is not necessary to be limited to such a configuration. For example, a configuration in which processing is performed separately by software is also possible. In this case, the image processing unit includes a main storage device such as a CPU and a RAM, and a computer-readable storage medium storing a program for realizing all or part of the above processing. Here, this program is called an image processing program. Then, the CPU reads out the image processing program stored in the storage medium and executes information processing / calculation processing, thereby realizing the same processing as the above-described image processing unit.

ここで、コンピュータ読み取り可能な記録媒体とは、磁気ディスク、光磁気ディスク、CD−ROM、DVD−ROM、半導体メモリ等をいう。また、この画像処理プログラムを通信回線によってコンピュータに配信し、この配信を受けたコンピュータが当該画像処理プログラムを実行するようにしても良い。   Here, the computer-readable recording medium refers to a magnetic disk, a magneto-optical disk, a CD-ROM, a DVD-ROM, a semiconductor memory, and the like. Alternatively, the image processing program may be distributed to a computer via a communication line, and the computer that has received the distribution may execute the image processing program.

本発明は上記の実施形態に限定されずに、その技術的な思想の範囲内において種々の変更がなしうることは明白である。   The present invention is not limited to the above-described embodiment, and it is obvious that various modifications can be made within the scope of the technical idea.

(a)樽型の歪曲収差を示す図である。(b)糸巻き型の歪曲収差を示す図である。なお、図1において、点線は、歪曲収差がない理想的な像を示し、実線は、歪曲収差がある実際の像を示している。(A) It is a figure which shows barrel distortion. (B) It is a figure which shows the pincushion type | mold distortion aberration. In FIG. 1, a dotted line indicates an ideal image without distortion, and a solid line indicates an actual image with distortion. 第一実施形態に係る画像処理装置を示す概略構成図である。1 is a schematic configuration diagram illustrating an image processing apparatus according to a first embodiment. 収差と像高の関係の一例を示す図である。It is a figure which shows an example of the relationship between an aberration and image height. 第一実施形態に係る統合処理部の構成を示す概略構成図である。It is a schematic block diagram which shows the structure of the integrated process part which concerns on 1st embodiment. 第一実施形態に係る画像処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the image processing which concerns on 1st embodiment. 第一実施形態に係る動きベクトル統合処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the motion vector integration process which concerns on 1st embodiment. 収差と寄与度との関係を示すグラフである。It is a graph which shows the relationship between an aberration and contribution. 第一実施形態に係る統合演算処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the integrated calculation process which concerns on 1st embodiment. (a)動きベクトルを算出する測定領域(ブロック)の配置を示す図である。(b)歪曲収差の絶対値が小さい領域を示す図である。(c)動きベクトルの算出精度が高い測定領域(ブロック)を示す図である。(A) It is a figure which shows arrangement | positioning of the measurement area | region (block) which calculates a motion vector. (B) It is a figure which shows the area | region where the absolute value of a distortion aberration is small. (C) It is a figure which shows the measurement area | region (block) with high calculation accuracy of a motion vector. 第一実施形態に係る動きベクトル統合処理の変形例を示すフローチャートである。It is a flowchart which shows the modification of the motion vector integration process which concerns on 1st embodiment. 第一実施形態に係る動きベクトル統合処理の他の変形例を示すフローチャートである。It is a flowchart which shows the other modification of the motion vector integration process which concerns on 1st embodiment. 第一実施形態に係る画像処理装置の変形例を示す概略構成図である。It is a schematic block diagram which shows the modification of the image processing apparatus which concerns on 1st embodiment. 第二実施形態に係る動きベクトルの分類方法及び度数分布作成を示す図である。It is a figure which shows the motion vector classification method and frequency distribution preparation which concern on 2nd embodiment. (a)通常の度数分布(ヒストグラム)を示す図である。(b)動きベクトルの信頼度を考慮した度数分布を示す図である。(c)第二実施形態に係る動きベクトルの信頼度と寄与度を考慮した度数分布を示す図である。(A) It is a figure which shows normal frequency distribution (histogram). (B) It is a figure which shows the frequency distribution which considered the reliability of the motion vector. (C) It is a figure which shows the frequency distribution which considered the reliability and contribution of the motion vector which concern on 2nd embodiment. 第三実施形態に係る画像処理装置を示す概略構成図である。It is a schematic block diagram which shows the image processing apparatus which concerns on 3rd embodiment. 第三実施形態に係る画像処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the image process which concerns on 3rd embodiment.

符号の説明Explanation of symbols

1 撮像装置
2 画像取得部(画像取得装置)
3 画像処理部(画像処理装置)
10 撮影レンズ部
12 撮像部
100 メインコントローラ
102 フレームメモリ
103 動きベクトル測定領域設定部(領域設定部)
104 動きベクトル算出部(ベクトル算出部)
105 動きベクトル信頼度算出部(信頼度算出部)
106 動きベクトル統合処理部(統合処理部)
107 レンズ特性取得部(特性取得部)
108 収差補正部
109 フレーム加算部
1060 位置関係算出部
1061 寄与度算出部
1062 統合演算処理部
DESCRIPTION OF SYMBOLS 1 Imaging device 2 Image acquisition part (image acquisition device)
3 Image processing unit (image processing device)
DESCRIPTION OF SYMBOLS 10 Shooting lens part 12 Imaging part 100 Main controller 102 Frame memory 103 Motion vector measurement area setting part (area setting part)
104 Motion vector calculation unit (vector calculation unit)
105 Motion vector reliability calculation unit (reliability calculation unit)
106 Motion vector integration processing unit (integration processing unit)
107 Lens characteristic acquisition unit (characteristic acquisition unit)
108 Aberration Correction Unit 109 Frame Addition Unit 1060 Positional Relationship Calculation Unit 1061 Contribution Calculation Unit 1062 Integrated Operation Processing Unit

Claims (21)

少なくとも一つの画像間動きベクトルにより特徴付けられる画像の変形により複数枚の画像の位置合わせ処理を行う画像処理装置であって、
動きベクトルを測定するための複数の動きベクトル測定領域を設定する動きベクトル測定領域設定部と、
前記複数の動きベクトル測定領域の動きベクトルを算出する動きベクトル算出部と、
前記算出された動きベクトルの信頼度を算出する動きベクトル信頼度算出部と、
前記複数枚の画像を撮影する撮影レンズのレンズ特性を取得するレンズ特性取得部と、
各動きベクトルを算出した動きベクトル測定領域の位置と前記レンズ特性とに基づいて、前記少なくとも一つの画像間動きベクトルの算出における各動きベクトルの寄与度を算出する寄与度算出部と、
前記動きベクトルの前記信頼度と前記寄与度に応じて、前記複数の動きベクトル測定領域の動きベクトルを統合することにより、前記少なくとも一つの画像間動きベクトルを算出する統合演算処理部と、
を備えることを特徴とする画像処理装置。
An image processing apparatus that performs alignment processing of a plurality of images by deformation of an image characterized by at least one inter-image motion vector,
A motion vector measurement region setting unit for setting a plurality of motion vector measurement regions for measuring a motion vector;
A motion vector calculation unit for calculating a motion vector of the plurality of motion vector measurement regions;
A motion vector reliability calculation unit for calculating the reliability of the calculated motion vector;
A lens characteristic acquisition unit that acquires lens characteristics of a photographing lens that captures the plurality of images;
A contribution calculation unit that calculates the contribution of each motion vector in calculating the at least one inter-image motion vector based on the position of the motion vector measurement region where each motion vector is calculated and the lens characteristic;
An integrated operation processing unit that calculates the at least one inter-image motion vector by integrating the motion vectors of the plurality of motion vector measurement regions according to the reliability and the contribution of the motion vector;
An image processing apparatus comprising:
前記画像処理装置は、前記画像の変形として唯一の画像間動きベクトルに基づく平行移動により、前記複数枚の画像の位置合わせ処理を行い、
前記統合演算処理部は、前記信頼度と前記寄与度に応じて重み係数を設定して、前記複数の動きベクトル測定領域の動きベクトルを前記重み係数に応じて重み付け加算することにより、前記唯一の画像間動きベクトルを算出することを特徴とする請求項1に記載の画像処理装置。
The image processing apparatus performs alignment processing of the plurality of images by parallel movement based on a unique inter-image motion vector as a modification of the image,
The integrated arithmetic processing unit sets a weighting factor according to the reliability and the contribution, and weights and adds motion vectors of the plurality of motion vector measurement regions according to the weighting factor, thereby obtaining the only one The image processing apparatus according to claim 1, wherein an inter-image motion vector is calculated.
前記統合演算処理部は、前記動きベクトル信頼度算出部により算出された前記信頼度が閾値より小さい場合に当該信頼度をゼロに再設定することを特徴とする請求項2に記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the integrated calculation processing unit resets the reliability to zero when the reliability calculated by the motion vector reliability calculation unit is smaller than a threshold value. . 前記統合演算処理部は、i番目の動きベクトル測定領域に関する前記動きベクトルをVi、前記信頼度をSTi、前記寄与度をKiとして、i番目の動きベクトル測定領域の動きベクトルの前記重み係数を前記信頼度STiと前記寄与度Kiの積に基づいて計算し、
前記唯一の画像間動きベクトルVFrame
により算出することを特徴とする請求項2又は3に記載の画像処理装置。
The integrated arithmetic processing unit sets the weighting coefficient of the motion vector in the i-th motion vector measurement region as Vi, the motion vector related to the i-th motion vector measurement region as Vi, the reliability as STi, and the contribution as Ki. Calculate based on the product of the reliability STi and the contribution Ki,
The only inter-image motion vector V Frame
The image processing apparatus according to claim 2, wherein the image processing apparatus is calculated by:
前記画像処理装置は、前記画像の変形として唯一の画像間動きベクトルに基づく平行移動により、前記複数枚の画像の位置合わせ処理を行い、
前記統合演算処理部は、前記複数の動きベクトル測定領域の動きベクトルを階級に分類し、同一の階級に属する動きベクトルの前記信頼度と前記寄与度の積の合計が最大となる場合に、その階級を代表するベクトルを前記唯一の画像間動きベクトルとして設定することを特徴とする請求項1に記載の画像処理装置。
The image processing apparatus performs alignment processing of the plurality of images by parallel movement based on a unique inter-image motion vector as a modification of the image,
The integrated arithmetic processing unit classifies the motion vectors of the plurality of motion vector measurement regions into classes, and when the sum of products of the reliability and the contribution of motion vectors belonging to the same class is maximized, The image processing apparatus according to claim 1, wherein a vector representing a class is set as the only inter-image motion vector.
前記画像処理装置は、平行移動以外の変形を含む前記画像の変形により前記複数枚の画像の位置合わせ処理を行い、
前記統合演算処理部は、前記画像の変形を特徴付ける変形パラメータを求めるための複数の画像間動きベクトルを算出し、
前記画像処理装置は、前記複数の画像間動きベクトルから前記変形パラメータを算出する変形パラメータ算出部を備えることを特徴とする請求項1に記載の画像処理装置。
The image processing device performs alignment processing of the plurality of images by deformation of the image including deformation other than parallel movement;
The integrated calculation processing unit calculates a plurality of inter-image motion vectors for obtaining a deformation parameter characterizing the deformation of the image;
The image processing apparatus according to claim 1, further comprising a deformation parameter calculation unit that calculates the deformation parameter from the plurality of inter-image motion vectors.
前記統合演算処理部は、前記複数の動きベクトル測定領域の動きベクトルを階級に分類し、同一の階級に属する動きベクトルの前記信頼度と前記寄与度の積の合計が大きい順に複数の階級を選択し、選択した前記複数の階級の各階級をそれぞれ代表するベクトルを前記複数の画像間動きベクトルとして設定することを特徴とする請求項6に記載の画像処理装置。   The integrated arithmetic processing unit classifies motion vectors of the plurality of motion vector measurement regions into classes, and selects a plurality of classes in descending order of the sum of products of the reliability and the contribution of motion vectors belonging to the same class. The image processing apparatus according to claim 6, wherein a vector representing each of the selected classes is set as the plurality of inter-image motion vectors. 前記変形パラメータ算出部は、前記変形パラメータとして射影変換の変形パラメータを求めることを特徴とする請求項6に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the deformation parameter calculation unit obtains a deformation parameter for projective transformation as the deformation parameter. 前記レンズ特性取得部は、前記レンズ特性として、収差に関するレンズ特性を取得することを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the lens characteristic acquisition unit acquires a lens characteristic related to aberration as the lens characteristic. 前記寄与度算出部は、前記動きベクトル測定領域の位置と、前記収差に関するレンズ特性とに基づいて、前記寄与度を算出することを特徴とする請求項9に記載の画像処理装置。   The image processing apparatus according to claim 9, wherein the contribution calculation unit calculates the contribution based on a position of the motion vector measurement region and a lens characteristic related to the aberration. 前記寄与度算出部は、前記動きベクトル測定領域の位置としての像高と、前記収差としての歪曲収差に関するレンズ特性とに基づいて、前記歪曲収差を算出し、さらに、算出された前記歪曲収差から前記寄与度を算出することを特徴とする請求項10に記載の画像処理装置。   The contribution calculation unit calculates the distortion aberration based on an image height as a position of the motion vector measurement region and a lens characteristic related to the distortion aberration as the aberration, and further, from the calculated distortion aberration The image processing apparatus according to claim 10, wherein the contribution degree is calculated. 前記寄与度算出部は、前記歪曲収差の絶対値が小さいほど前記寄与度を大きく算出することを特徴とする請求項11に記載の画像処理装置。   The image processing apparatus according to claim 11, wherein the contribution calculation unit calculates the contribution larger as the absolute value of the distortion aberration is smaller. 前記レンズ特性取得部は、前記レンズ特性としての前記撮影レンズの種類を示す識別子を取得し、
前記寄与度算出部は、前記撮影レンズの種類毎に収差に基づいて定められた、前記動きベクトル測定領域の位置と前記寄与度との関係から、前記撮影レンズの種類と前記動きベクトル測定領域の位置に応じて前記寄与度を算出することを特徴とする請求項1に記載の画像処理装置。
The lens characteristic acquisition unit acquires an identifier indicating the type of the photographing lens as the lens characteristic,
The contribution calculation unit determines the type of the photographing lens and the motion vector measurement region based on the relationship between the position of the motion vector measurement region and the contribution determined based on the aberration for each type of the photographing lens. The image processing apparatus according to claim 1, wherein the contribution degree is calculated according to a position.
前記寄与度算出部は、前記動きベクトル測定領域が前記収差の絶対値の小さい位置にあるほど、その動きベクトル測定領域の動きベクトルの前記寄与度を大きく算出することを特徴とする請求項13に記載の画像処理装置。   The contribution degree calculation unit calculates the contribution degree of the motion vector of the motion vector measurement region to be larger as the motion vector measurement region is at a position where the absolute value of the aberration is smaller. The image processing apparatus described. 前記撮影レンズは、前記レンズ特性として、前記撮影レンズのレンズパラメータを、前記撮影レンズの配置情報と対応させて記憶する記憶部を有し、
前記レンズ特性取得部は、前記撮影レンズの配置情報に応じて、前記記憶部に記憶された前記レンズ特性を取得することを特徴とする請求項1に記載の画像処理装置。
The photographic lens has a storage unit that stores the lens parameters of the photographic lens in correspondence with the arrangement information of the photographic lens as the lens characteristics,
The image processing apparatus according to claim 1, wherein the lens characteristic acquisition unit acquires the lens characteristic stored in the storage unit according to arrangement information of the photographing lens.
前記画像処理装置は、前記複数枚の画像の前記収差を補正する収差補正部を備え、
前記統合演算処理部は、前記収差を補正する前の前記複数枚の画像に対して、前記少なくとも一つの画像間動きベクトルを算出することを特徴とする請求項9又は13に記載の画像処理装置。
The image processing apparatus includes an aberration correction unit that corrects the aberration of the plurality of images.
The image processing apparatus according to claim 9, wherein the integrated arithmetic processing unit calculates the at least one inter-image motion vector for the plurality of images before the aberration is corrected. .
前記複数枚の画像を位置合わせして加算する加算部を備えることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, further comprising an adding unit that aligns and adds the plurality of images. 前記少なくとも一つの画像間動きベクトルにより特徴付けられる画像の変形により前記複数枚の画像を位置合わせして、画像間のブレを補正するブレ補正部を備えることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, further comprising: a blur correction unit that aligns the plurality of images by deformation of an image characterized by the at least one inter-image motion vector and corrects blur between the images. Image processing device. 撮影レンズと、前記撮影レンズによって形成される光学像を電気信号に変換する撮像部とを有し、
少なくとも一つの画像間動きベクトルにより特徴付けられる画像の変形により、前記撮像部から取得した複数枚の画像の位置合わせ処理を行う撮像装置であって、
動きベクトルを測定するための複数の動きベクトル測定領域を設定する動きベクトル測定領域設定部と、
前記複数の動きベクトル測定領域の動きベクトルを算出する動きベクトル算出部と、
前記算出された動きベクトルの信頼度を算出する動きベクトル信頼度算出部と、
前記撮影レンズのレンズ特性を取得するレンズ特性取得部と、
各動きベクトルを算出した動きベクトル測定領域の位置と前記レンズ特性とに基づいて、前記少なくとも一つの画像間動きベクトルの算出における各動きベクトルの寄与度を算出する寄与度算出部と、
前記動きベクトルの前記信頼度と前記寄与度に応じて、前記複数の動きベクトル測定領域の動きベクトルを統合することにより、前記少なくとも一つの画像間動きベクトルを算出する統合演算処理部と、
を備えることを特徴とする撮像装置。
A photographing lens, and an imaging unit that converts an optical image formed by the photographing lens into an electrical signal;
An imaging apparatus that performs alignment processing of a plurality of images acquired from the imaging unit by deformation of an image characterized by at least one inter-image motion vector,
A motion vector measurement region setting unit for setting a plurality of motion vector measurement regions for measuring a motion vector;
A motion vector calculation unit for calculating a motion vector of the plurality of motion vector measurement regions;
A motion vector reliability calculation unit for calculating the reliability of the calculated motion vector;
A lens characteristic acquisition unit that acquires lens characteristics of the photographing lens;
A contribution calculation unit that calculates the contribution of each motion vector in calculating the at least one inter-image motion vector based on the position of the motion vector measurement region where each motion vector is calculated and the lens characteristic;
An integrated operation processing unit that calculates the at least one inter-image motion vector by integrating the motion vectors of the plurality of motion vector measurement regions according to the reliability and the contribution of the motion vector;
An imaging apparatus comprising:
少なくとも一つの画像間動きベクトルにより特徴付けられる画像の変形により複数枚の画像の位置合わせ処理を行う画像処理方法であって、
動きベクトルを測定するための複数の動きベクトル測定領域を設定する動きベクトル測定領域設定ステップと、
前記複数の動きベクトル測定領域の動きベクトルを算出する動きベクトル算出ステップと、
前記算出された動きベクトルの信頼度を算出する動きベクトル信頼度算出ステップと、
前記複数枚の画像を撮影する撮影レンズのレンズ特性を取得するレンズ特性取得ステップと、
各動きベクトルを算出した動きベクトル測定領域の位置と前記レンズ特性とに基づいて、前記少なくとも一つの画像間動きベクトルの算出における各動きベクトルの寄与度を算出する寄与度算出ステップと、
前記動きベクトルの前記信頼度と前記寄与度に応じて、前記複数の動きベクトル測定領域の動きベクトルを統合することにより、前記少なくとも一つの画像間動きベクトルを算出する統合演算処理ステップと、
を備えることを特徴とする画像処理方法。
An image processing method for performing alignment processing of a plurality of images by deformation of an image characterized by at least one inter-image motion vector,
A motion vector measurement region setting step for setting a plurality of motion vector measurement regions for measuring a motion vector;
A motion vector calculating step of calculating a motion vector of the plurality of motion vector measurement regions;
A motion vector reliability calculation step of calculating the reliability of the calculated motion vector;
A lens characteristic acquisition step of acquiring lens characteristics of a photographic lens that captures the plurality of images;
A contribution calculation step of calculating a contribution of each motion vector in calculating the at least one inter-image motion vector based on the position of the motion vector measurement region where each motion vector is calculated and the lens characteristic;
An integration operation processing step of calculating the at least one inter-image motion vector by integrating the motion vectors of the plurality of motion vector measurement regions according to the reliability and the contribution of the motion vector;
An image processing method comprising:
少なくとも一つの画像間動きベクトルにより特徴付けられる画像の変形により複数枚の画像の位置合わせ処理を行う画像処理プログラムであって、
動きベクトルを測定するための複数の動きベクトル測定領域を設定する動きベクトル測定領域設定手順と、
前記複数の動きベクトル測定領域の動きベクトルを算出する動きベクトル算出手順と、
前記算出された動きベクトルの信頼度を算出する動きベクトル信頼度算出手順と、
前記複数枚の画像を撮影する撮影レンズのレンズ特性を取得するレンズ特性取得手順と、
各動きベクトルを算出した動きベクトル測定領域の位置と前記レンズ特性とに基づいて、前記少なくとも一つの画像間動きベクトルの算出における各動きベクトルの寄与度を算出する寄与度算出手順と、
前記動きベクトルの前記信頼度と前記寄与度に応じて、前記複数の動きベクトル測定領域の動きベクトルを統合することにより、前記少なくとも一つの画像間動きベクトルを算出する統合演算処理手順と、
を備えることを特徴とする画像処理プログラム。
An image processing program for performing alignment processing of a plurality of images by deformation of an image characterized by at least one inter-image motion vector,
A motion vector measurement region setting procedure for setting a plurality of motion vector measurement regions for measuring a motion vector;
A motion vector calculation procedure for calculating a motion vector of the plurality of motion vector measurement regions;
A motion vector reliability calculation procedure for calculating the reliability of the calculated motion vector;
A lens characteristic acquisition procedure for acquiring a lens characteristic of a photographic lens that captures the plurality of images;
A contribution calculation procedure for calculating a contribution of each motion vector in calculating the at least one inter-image motion vector based on the position of the motion vector measurement region where each motion vector is calculated and the lens characteristic;
An integrated calculation processing procedure for calculating the at least one inter-image motion vector by integrating the motion vectors of the plurality of motion vector measurement regions according to the reliability and the contribution of the motion vector;
An image processing program comprising:
JP2008202195A 2008-08-05 2008-08-05 Image processing unit, image processing method, image processing program, and imaging apparatus Withdrawn JP2010041416A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008202195A JP2010041416A (en) 2008-08-05 2008-08-05 Image processing unit, image processing method, image processing program, and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008202195A JP2010041416A (en) 2008-08-05 2008-08-05 Image processing unit, image processing method, image processing program, and imaging apparatus

Publications (1)

Publication Number Publication Date
JP2010041416A true JP2010041416A (en) 2010-02-18

Family

ID=42013480

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008202195A Withdrawn JP2010041416A (en) 2008-08-05 2008-08-05 Image processing unit, image processing method, image processing program, and imaging apparatus

Country Status (1)

Country Link
JP (1) JP2010041416A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018116239A (en) * 2017-01-20 2018-07-26 キヤノン株式会社 Image blur correction device, method for controlling the same, imaging device, program, and storage medium
US10567658B2 (en) 2016-03-28 2020-02-18 Olympus Corporation Image processing device, image processing method, image processing program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10567658B2 (en) 2016-03-28 2020-02-18 Olympus Corporation Image processing device, image processing method, image processing program
JP2018116239A (en) * 2017-01-20 2018-07-26 キヤノン株式会社 Image blur correction device, method for controlling the same, imaging device, program, and storage medium

Similar Documents

Publication Publication Date Title
JP5074322B2 (en) Image processing apparatus, image processing method, image processing program, and imaging apparatus
JP5075757B2 (en) Image processing apparatus, image processing program, image processing method, and electronic apparatus
US20210281816A1 (en) System and Methods for Calibration of an Array Camera
JP4095491B2 (en) Distance measuring device, distance measuring method, and distance measuring program
JP6363863B2 (en) Information processing apparatus and information processing method
WO2014061372A1 (en) Image-processing device, image-processing method, and image-processing program
US8111877B2 (en) Image processing device and storage medium storing image processing program
JP2009230537A (en) Image processor, image processing program, image processing method, and electronic equipment
US9183634B2 (en) Image processing apparatus and image processing method
CN112270719B (en) Camera calibration method, device and system
JP2015036841A (en) Image processing apparatus, distance measuring apparatus, imaging apparatus, and image processing method
JP2008298589A (en) Device and method for detecting positions
JP4198536B2 (en) Object photographing apparatus, object photographing method and object photographing program
JP2009301181A (en) Image processing apparatus, image processing program, image processing method and electronic device
JP6153318B2 (en) Image processing apparatus, image processing method, image processing program, and storage medium
JP5727969B2 (en) Position estimation apparatus, method, and program
JP5446285B2 (en) Image processing apparatus and image processing method
US11438570B2 (en) Data processing apparatus and data processing method for generation of calibration data for performing image processing
US20230260159A1 (en) Information processing apparatus, information processing method, and non-transitory computer readable medium
JP2009302731A (en) Image processing apparatus, image processing program, image processing method, and electronic device
JP2010041416A (en) Image processing unit, image processing method, image processing program, and imaging apparatus
US20090244275A1 (en) Compound eye photographing apparatus, control method therefor, and program
JP4789964B2 (en) Image processing apparatus, image processing program, image processing method, and electronic apparatus
JP4996585B2 (en) Image calibration evaluation apparatus and image calibration evaluation program
JP6452414B2 (en) Image processing apparatus, imaging apparatus, image processing method, and program

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20111101