JP2962266B2 - Image alignment method - Google Patents
Image alignment methodInfo
- Publication number
- JP2962266B2 JP2962266B2 JP5606097A JP5606097A JP2962266B2 JP 2962266 B2 JP2962266 B2 JP 2962266B2 JP 5606097 A JP5606097 A JP 5606097A JP 5606097 A JP5606097 A JP 5606097A JP 2962266 B2 JP2962266 B2 JP 2962266B2
- Authority
- JP
- Japan
- Prior art keywords
- similarity measure
- image
- residual
- overlapping area
- overlapping
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 99
- 238000011524 similarity measure Methods 0.000 claims description 191
- 238000012545 processing Methods 0.000 claims description 88
- 238000004364 calculation method Methods 0.000 claims description 59
- 230000008569 process Effects 0.000 claims description 42
- 230000015654 memory Effects 0.000 description 148
- 238000010586 diagram Methods 0.000 description 14
- 238000004891 communication Methods 0.000 description 12
- 230000014509 gene expression Effects 0.000 description 10
- 230000000694 effects Effects 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 238000003491 array Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 230000015572 biosynthetic process Effects 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000003786 synthesis reaction Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 230000001771 impaired effect Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Landscapes
- Image Analysis (AREA)
Description
【0001】[0001]
【発明の属する技術分野】本発明は、基準となる画像に
対して位置合わせ対象となる画像を最もうまく重ね合わ
せることができる位置を求める画像の位置合わせ方法に
関する。[0001] 1. Field of the Invention [0002] The present invention relates to a method of aligning an image to obtain a position where an image to be aligned can be superimposed best on a reference image.
【0002】[0002]
【従来の技術】従来の画像間の位置合わせ処理では、画
像間の重ね合わせのよさを評価するために残差や相互相
関係数の指標を利用している。相互相関係数をはじめと
する、重なり部分の統計的性質を利用した位置合わせ処
理では実数演算が必要で、計算量の面で問題がある。こ
れに対し残差を利用した位置合わせ処理では、単純な整
数演算だけで実現可能であり、残差を計算する過程にお
いても残差逐次検定法などの高速化手法が適用できると
いうメリットがあるため、多くの場合に利用されてい
る。これらの手法の詳細については、「共立出版、bi
t別冊『コンピュータ・サイエンス』,エーシーエム・
コンピューティング・サーベイズ’92、77〜119
頁」、「昭晃堂、『画像処理ハンドブック』、303〜
305頁「東京大学出版会、『画像解析ハンドブッ
ク』、707〜746頁」および「尾上他、"残差逐次
検定法による画像の重ね合わせ"、情報処理、Vol.
17、No.7、1976頁」に詳しく説明されている
ため割愛する。2. Description of the Related Art In a conventional registration process between images, an index of a residual or a cross-correlation coefficient is used to evaluate the superposition of images. The alignment process using the statistical properties of the overlapping portion such as the cross-correlation coefficient requires a real number operation, which is problematic in terms of the amount of calculation. On the other hand, registration processing using residuals can be realized only by simple integer arithmetic, and has the merit that high-speed methods such as residual sequential testing can be applied in the process of calculating residuals. , Is often used. For details of these methods, see "Kyoritsu Shuppan, bi
t Separate volume "Computer Science", ACM
Computing Surveys '92, 77-119
Page, "Shokodo, Image Processing Handbook, 303-
305 "The University of Tokyo Press," Image Analysis Handbook ", pp. 707-746" and "Onoe et al.," Superposition of Images by Residual Sequential Test ", Information Processing, Vol.
17, No. 7, page 1976 "and will not be described.
【0003】このように残差を利用する位置合わせ処理
は、相互相関係数を利用した位置合わせ処理に比べて多
くのメリットを有しているが、残差を利用する従来の位
置合わせ処理では、「対象画像が基準画像に完全に包含
されている」という仮定があり、残差が最小となる位置
を求めている。そのため、図13の様に重なり部分の大
きさ、形状が画像間の位置関係によって変化する場合に
は、残差が最小となる位置が必ずしも最良の結果とはな
らず、誤った結果を導く可能性が高いという問題があっ
た。勿論、相互相関係数等の重なり部分の統計的性質を
利用した位置合わせ処理ではこのような問題は回避され
るものの、前述したように実数演算が必要であったり、
高速化手法が適用できないため、計算量の面で問題が発
生する。[0003] As described above, the alignment processing using the residual has many advantages as compared with the alignment processing using the cross-correlation coefficient. However, in the conventional alignment processing using the residual, the alignment processing is not performed. , "The target image is completely included in the reference image", and the position where the residual is minimum is obtained. Therefore, when the size and the shape of the overlapping portion change depending on the positional relationship between the images as shown in FIG. 13, the position where the residual is minimized is not always the best result, and may lead to an incorrect result. There was a problem of high performance. Of course, such a problem is avoided in the alignment processing using the statistical property of the overlapping portion such as the cross-correlation coefficient, but the real number operation is required as described above,
Since the high-speed technique cannot be applied, a problem occurs in terms of the amount of calculation.
【0004】そこで、基準画像と対象画像との重なり部
分の大きさ、形状の影響を受けずに位置合わせ結果を求
めることができる方法として、特開平2−297148
号公報に見られるような位置合わせ方法が提案されてい
る。この方法は、基準画像と対象画像とをそれぞれm×
nのメッシュに分割して、各々のメッシュ中に含まれる
黒画素数を計数して得られる二次元配列a,bを作成
し、二次元配列a,bを上下左右に相対的にずらしなが
ら、下記の式で与えられる、重ね合わせのよさを示す指
標Dを計算する。Therefore, as a method for obtaining the alignment result without being affected by the size and shape of the overlapping portion between the reference image and the target image, Japanese Patent Application Laid-Open No. 2-297148 discloses a method.
Japanese Patent Application Laid-Open Publication No. HEI 9-202, proposes an alignment method. In this method, the reference image and the target image are each mx
n, and the two-dimensional arrays a and b obtained by counting the number of black pixels included in each mesh are created. The two-dimensional arrays a and b are relatively shifted vertically and horizontally. An index D, which is given by the following equation and indicates the goodness of superposition, is calculated.
【0005】D=Σi,j|a(xd+i,yd+j)−
b(i,j)|×1/S (xd+i,yd+j),(i,j)∈E xd,Yd:二次元配列a,bの相対位置 E:演算を行う領域 S:領域Eの面積 そして、この指標Dが最小となる位置を、重ね合わせの
概略位置とする。D = Σi, j | a (xd + i, yd + j)-
b (i, j) | × 1 / S (xd + i, yd + j), (i, j) ∈Exd, Yd: Relative position of two-dimensional arrays a, b E: Area to be operated S: Area of area E and The position where the index D is minimum is set as the approximate position of the superposition.
【0006】次に基準画像と対象画像との文書物理構造
を解析して、各々の文書構成要素を抽出し、抽出した文
書構成要素をもとに、前記概略位置を基準にして各文書
構成要素の重ね合わせ位置を正確に決定する。Next, the document physical structure of the reference image and the target image is analyzed, and each document component is extracted. Based on the extracted document component, each document component is referenced based on the approximate position. Is determined accurately.
【0007】[0007]
【発明が解決しようとする課題】上記の特開平2−29
7148号公報に記載された技術によれば、重複領域の
残差をその重複領域の大きさで正規化した指標を使って
いるために、基準画像と対象画像との重なり部分の大き
さ、形状の影響を受けずに概略位置を求めることができ
る。また、各文書構成要素を抽出し、概略位置を基準に
各文書構成要素の重ね合わせ位置を決定するため、正確
な位置合わせが可能であり、計算量を削減できる。The above-mentioned JP-A-2-29
According to the technology described in Japanese Patent No. 7148, since the index of the residual of the overlapping area is normalized by the size of the overlapping area, the size and shape of the overlapping portion between the reference image and the target image are used. The approximate position can be obtained without being affected by the above. In addition, since each document component is extracted and the superposition position of each document component is determined based on the approximate position, accurate alignment is possible, and the amount of calculation can be reduced.
【0008】しかしながら、上記の従来技術では、文書
を含む画像を対象としており、文書構成要素を活用して
位置合わせを行っているため、文書を含まない一般的な
画像には適用することができない。勿論、上記の従来技
術の第1段目の処理のみを利用し、分割するメッシュの
サイズを画素単位まで縮小する方法も考えられるが、そ
うすると計算量が膨大になってしまうという問題が生じ
る。[0008] However, in the above-mentioned prior art, an image including a document is targeted, and the alignment is performed by utilizing a document component. Therefore, it cannot be applied to a general image including no document. . Of course, a method of reducing the size of the mesh to be divided to pixel units by using only the first-stage processing of the above-described conventional technique is conceivable, but this causes a problem that the amount of calculation becomes enormous.
【0009】そこで本発明は、このような従来の技術が
抱えていた問題を解決し、画像間の位置関係によって重
なり部分の大きさや形状が変化する場合にも正確な位置
合わせが行え、然も、高速な位置合わせが可能な方法を
提供することにある。Accordingly, the present invention solves such a problem of the prior art, and can perform accurate alignment even when the size or shape of the overlapping portion changes due to the positional relationship between images. And a method capable of high-speed alignment.
【0010】[0010]
【課題を解決するための手段】本発明は、基準となる画
像に対して位置合わせ対象となる画像を最もうまく重ね
合わせることができる位置を求める画像の位置合わせ方
法であって、基準画像と対象画像との位置合わせのよさ
の指標として、基準画像と対象画像との重複領域におけ
る残差をその重複領域に含まれる要素数により正規化し
た類似測度を用い、対象画像の基準画像に対する各重な
り位置の候補における類似測度のうち、最良の類似測度
が得られた重なり位置の候補を基準画像に対するその対
象画像の位置合わせ位置とする方法において、対象画像
の基準画像に対する各重なり位置の候補における類似測
度を求める際、今回の重なり位置の候補による両画像の
重複領域の要素数と今までの最良類似測度とから今回の
類似測度算出で使用する計算打切り用の閾値を設定する
ステップと、今回の重なり位置の候補による両画像の重
複領域における残差を計算する過程において、計算途中
の残差が前記閾値を超過した場合には残りの残差計算を
取り止めて次の重なり位置の候補における類似測度の算
出に進み、前記閾値を超過することなく残差計算が終了
した場合には得られた残差をその重複領域に含まれる要
素数により正規化した類似測度で最良類似測度を更新す
るステップとを含むことを特徴とする。また、重複領域
の要素数と今までの最良類似測度とを乗じた値を前記閾
値とすることを特徴とする。SUMMARY OF THE INVENTION The present invention relates to a method of aligning an image to obtain a position at which an image to be aligned can be superimposed best on a reference image. Using the similarity measure obtained by normalizing the residual in the overlapping area between the reference image and the target image by the number of elements included in the overlapping area as an index of the good alignment with the image, each overlapping position of the target image with respect to the reference image is used. Among the similarity measures of the candidates, the candidate of the overlap position where the best similarity measure is obtained is set as the registration position of the target image with respect to the reference image. When calculating the similarity measure, the number of elements in the overlapping area of both images based on the candidate for the overlap position and the best similarity measure so far are used in this time. Setting a threshold for calculation abort, and calculating the residual in the overlapping region of both images by the candidate of the current overlap position, when the residual in the middle of the calculation exceeds the threshold, the remaining residual Cancel the difference calculation and proceed to the calculation of the similarity measure in the next candidate of the overlapping position.If the residual calculation is completed without exceeding the threshold, the obtained residual is calculated by the number of elements included in the overlapping area. Updating the best similarity measure with the normalized similarity measure. Further, a value obtained by multiplying the number of elements of the overlapping area by the best similarity measure up to now is set as the threshold value.
【0011】このように画像間の重ね合わせのよさを評
価する指標として基準画像と対象画像との重複領域にお
ける残差をその重複領域に含まれる要素数により正規化
した類似測度を用いたことにより、画像間の位置関係に
よって重なり部分の大きさや形状が変化する場合にも正
確な位置合わせが行え、また、対象画像の基準画像に対
する或る重なり位置における類似測度を算出するに際し
て、両画像の重複部分の要素数と今までの最良類似測度
とを乗じた値を、今回の類似測度算出で使用する閾値の
値として設定し、重複領域における計算途中の残差が閾
値を超過した場合には、それまでの最良値を更新しない
ことが判明するため、残差計算を打切ることで、全体の
計算量が削減され、高速な位置合わせが可能となる。As described above, the similarity measure obtained by normalizing the residual in the overlapping area between the reference image and the target image by the number of elements included in the overlapping area is used as an index for evaluating the degree of superposition between images. In addition, accurate alignment can be performed even when the size or shape of the overlapping portion changes due to the positional relationship between the images, and when calculating the similarity measure at a certain overlapping position of the target image with respect to the reference image, the two images may overlap. The value obtained by multiplying the number of elements of the part by the best similarity measure up to now is set as a threshold value used in this similarity measure calculation, and when the residual in the middle of calculation in the overlap region exceeds the threshold, Since it is found that the best value up to that point is not updated, by canceling the residual calculation, the total calculation amount is reduced, and high-speed alignment becomes possible.
【0012】[0012]
【発明の実施の形態】次に本発明の実施の形態の例につ
いて図面を参照して詳細に説明する。DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, embodiments of the present invention will be described in detail with reference to the drawings.
【0013】図1は本発明の一実施例の方法を実施する
位置合わせ処理装置100の構成例を示すブロック図で
ある。この例の位置合わせ処理装置100は、制御手段
1、位置パラメータ候補群設定手段2、位置パラメータ
候補選択手段3、重複領域設定手段4、重複領域要素数
計算手段5、重複領域要素選択手段6、残差更新手段
7、残差初期化手段8、残差閾値比較手段9、閾値設定
手段10、最良類似測度更新手段11および最良類似測
度初期化手段12といった機能部と、位置パラメータ候
補メモリ13、画像メモリ14、重複領域メモリ15、
残差メモリ16、閾値メモリ17および最良類似測度メ
モリ18といった記憶部とを有し、外部との通信を行う
ための通信手段20に接続されている。位置合わせ処理
装置100中の各要素は以下のような機能等を有する。FIG. 1 is a block diagram showing an example of the configuration of an alignment processing apparatus 100 for implementing a method according to an embodiment of the present invention. The alignment processing apparatus 100 in this example includes a control unit 1, a position parameter candidate group setting unit 2, a position parameter candidate selection unit 3, an overlapping region setting unit 4, an overlapping region element number calculating unit 5, a overlapping region element selecting unit 6, Functional units such as a residual updating unit 7, a residual initializing unit 8, a residual threshold comparing unit 9, a threshold setting unit 10, a best similarity measure updating unit 11 and a best similarity measure initializing unit 12, and a position parameter candidate memory 13, Image memory 14, overlapping area memory 15,
It has storage units such as a residual memory 16, a threshold memory 17 and a best similarity memory 18, and is connected to a communication unit 20 for performing external communication. Each element in the alignment processing apparatus 100 has the following functions and the like.
【0014】画像メモリ14は、位置合わせ処理の基準
となる画像(基準画像)、位置合わせ処理の対象となる
画像(対象画像)、およびそれぞれの画像のサイズなど
の属性値を保存するメモリである。The image memory 14 is a memory for storing an image serving as a reference for the alignment processing (reference image), an image to be subjected to the alignment processing (target image), and attribute values such as the size of each image. .
【0015】位置パラメータ候補メモリ13は、基準画
像に対する対象画像がとりうる位置を示す位置パラメー
タの候補の集合を保存するメモリである。The position parameter candidate memory 13 is a memory for storing a set of position parameter candidates indicating the positions of the target image with respect to the reference image.
【0016】位置パラメータ候補群設定手段2は、基準
画像に対する対象画像がとりうる位置を示す位置パラメ
ータの候補の集合を通信手段20を通して外部から取得
し、位置パラメータ候補メモリ13に格納する手段であ
る。The position parameter candidate group setting means 2 is a means for externally acquiring a set of position parameter candidates indicating a position of the target image with respect to the reference image through the communication means 20 and storing the set in the position parameter candidate memory 13. .
【0017】位置パラメータ候補選択手段3は、位置パ
ラメータ候補メモリ13に格納されている位置パラメー
タ候補群中から位置パラメータ候補を順番にかつ重複な
く選択する手段である。The position parameter candidate selection means 3 is a means for sequentially selecting position parameter candidates from the position parameter candidate group stored in the position parameter candidate memory 13 without duplication.
【0018】重複領域設定手段4は、位置パラメータ候
補選択手段3により選択された位置パラメータ候補が示
す位置に対象画像を基準画像に重ねた場合の両画像の重
複領域を求め、この求めた重複領域を重複領域メモリ1
5に格納する手段である。The overlapping area setting means 4 obtains an overlapping area of the two images when the target image is superimposed on the reference image at the position indicated by the position parameter candidate selected by the position parameter candidate selecting means 3. To the overlapping area memory 1
5 is a means for storing.
【0019】重複領域要素数計算手段5は、重複領域設
定手段4で求められた重複領域に含まれる要素数を計算
し、重複領域メモリ15に格納する手段である。The overlapping area element number calculating means 5 is a means for calculating the number of elements included in the overlapping area obtained by the overlapping area setting means 4 and storing it in the overlapping area memory 15.
【0020】重複領域メモリ15は、重複領域設定手段
4により求められた基準画像と対象画像の重複領域と、
この重複領域について重複領域要素数計算手段5で計算
された要素数とを保持するメモリである。The overlapping area memory 15 stores an overlapping area between the reference image and the target image obtained by the overlapping area setting means 4.
This is a memory that holds the number of elements calculated by the overlapping area element number calculation means 5 for this overlapping area.
【0021】重複領域要素選択手段6は、重複領域メモ
リ15に格納されている重複領域中の要素を順番にかつ
重複なく選択する手段である。The overlapping area element selecting means 6 is a means for sequentially selecting elements in the overlapping area stored in the overlapping area memory 15 without overlapping.
【0022】残差メモリ16は、位置パラメータ候補選
択手段3により選択された位置パラメータ候補の良否を
判断する指標である類似測度を求めるために計算される
残差の途中経過を格納するメモリである。The residual memory 16 is a memory for storing the progress of the residual calculated to obtain a similarity measure which is an index for judging the quality of the position parameter candidate selected by the position parameter candidate selecting means 3. .
【0023】残差初期化手段8は、残差メモリ16に格
納されている値を新たな重複領域における残差の計算に
先立って初期化する手段である。The residual initialization means 8 is a means for initializing the values stored in the residual memory 16 prior to the calculation of the residual in the new overlapping area.
【0024】残差更新手段7は、重複領域要素選択手段
6により選択された重複領域中の要素に対応する、基準
画像および対象画像それぞれの画素値から残差を求め、
残差メモリ16中の値を更新する手段である。The residual updating means 7 obtains a residual from the pixel values of the reference image and the target image corresponding to the elements in the overlapping area selected by the overlapping area element selecting means 6,
This is a means for updating the value in the residual memory 16.
【0025】最良類似測度メモリ18は、位置パラメー
タ候補メモリ13に格納されている位置パラメータ候補
群中のすでに類似測度が求められた位置パラメータ候補
のうちで、最良の類似測度となった位置パラメータ候補
と、その位置パラメータ候補により得られた重複領域の
要素数および類似測度を保持するメモリである。The best similarity measure memory 18 is a position parameter candidate having the best similarity measure among the position parameter candidates for which the similarity measure has already been obtained from the position parameter candidate group stored in the position parameter candidate memory 13. And a memory for holding the number of elements of the overlapping area and the similarity measure obtained by the position parameter candidates.
【0026】最良類似測度初期化手段12は、最良類似
測度メモリ18の内容を初期化する手段である。The best similarity measure initializing means 12 is means for initializing the contents of the best similarity measure memory 18.
【0027】閾値設定手段10は、重複領域に対する残
差を求める処理において、処理の継続可否を判断し位置
合わせ処理の処理量を軽減するために利用される閾値
を、最良類似測度メモリ18に格納されている最良類似
測度と、重複領域メモリ15に格納されている重複領域
の要素数とから求め、閾値メモリ17に設定する手段で
ある。The threshold setting means 10 stores, in the best similarity measure memory 18, a threshold used for determining the continuation of the processing and reducing the processing amount of the alignment processing in the processing for obtaining the residual for the overlapping area. This is a means for obtaining the best similarity measure and the number of elements of the overlapping area stored in the overlapping area memory 15 and setting the same in the threshold memory 17.
【0028】閾値メモリ17は、閾値設定手段10によ
って設定された閾値を保持するメモリである。The threshold memory 17 is a memory for holding the threshold set by the threshold setting means 10.
【0029】残差閾値比較手段9は、重複領域に対する
残差を求める処理において、閾値メモリ17に設定され
た閾値とそれまでに得られている残差とを比較すること
で、残差を求める一連の処理の継続可否を判断し、残差
が閾値を超過していれば残差を求める処理を中断し、位
置合わせ処理の処理量を軽減する手段である。In the process of calculating the residual for the overlap area, the residual threshold comparing means 9 compares the threshold set in the threshold memory 17 with the residual obtained up to that time to determine the residual. This is a means for determining whether or not a series of processes can be continued, and if the residual exceeds a threshold, suspends the process for obtaining the residual, thereby reducing the processing amount of the positioning process.
【0030】最良類似測度更新手段11は、位置パラメ
ータ候補メモリ13に格納されている位置パラメータ候
補群中のすでに類似測度が求められた位置パラメータ候
補のうちで、最良の類似測度となった位置パラメータ候
補と、その位置パラメータ候補により得られた重複領域
の要素数および類似測度を、最良類似測度メモリ18に
格納する手段である。The best similarity measure updating means 11 is a position parameter candidate having the best similarity measure among the position parameter candidates for which the similarity measure has already been obtained from the position parameter candidate group stored in the position parameter candidate memory 13. This is a means for storing in the best similarity measure memory 18 the candidates and the number of elements and the similarity measure of the overlapping area obtained from the position parameter candidates.
【0031】制御手段1は、基準画像に対して対象画像
を最もうまく重ね合わせることができる位置を求めるた
めに、予め定められた手順に従って各手段を制御する手
段である。The control means 1 is a means for controlling each means in accordance with a predetermined procedure in order to determine a position where the target image can be superimposed on the reference image most effectively.
【0032】図2は位置合わせ処理装置100の処理の
一例を示すフローチャートである。以下、図1および図
2を参照して、位置合わせ処理装置100の動作の概略
を説明する。FIG. 2 is a flowchart showing an example of the processing of the alignment processing apparatus 100. Hereinafter, an outline of the operation of the alignment processing apparatus 100 will be described with reference to FIGS. 1 and 2.
【0033】制御手段1は、先ず、通信手段20によ
り、位置合わせ処理の対象となる対象画像および位置合
わせ処理の基準となる基準画像を外部から画像メモリ1
4に読み込む(ステップA0)。次に、位置パラメータ
候補群設定手段2により、基準画像に対して対象画像が
とりうる位置パラメータの候補の集合を位置パラメータ
候補メモリ13に格納する(ステップA1)。そして、
最良類似測度初期化手段12により、最良類似測度メモ
リ18の内容(最良類似測度を与えた位置パラメータ候
補、その位置パラメータ候補により得られた重複領域の
要素数および類似測度の各項目)を初期化する(ステッ
プA2)。First, the control means 1 transmits the target image to be subjected to the positioning process and the reference image to be the reference of the positioning process from the image memory 1 through the communication unit 20.
4 (step A0). Next, the set of position parameter candidates that can be taken by the target image with respect to the reference image is stored in the position parameter candidate memory 13 by the position parameter candidate group setting means 2 (step A1). And
The best similarity measure initializing means 12 initializes the contents of the best similarity measure memory 18 (position parameter candidates to which the best similarity measure has been given, items of the number of elements in the overlapping area obtained by the position parameter candidates, and each item of the similarity measure). (Step A2).
【0034】続いて制御手段1は、位置パラメータ候補
選択手段3により、位置パラメータ候補メモリ13から
1つの位置パラメータ候補を選択し(ステップA3)、
この選択された位置パラメータ候補を対象画像に適用し
た際に対象画像と基準画像とが重なり合う部分である重
複領域を重複領域設定手段4により求めて重複領域メモ
リ15に設定し(ステップA4)、また、重複領域要素
数計算手段5によりその重複領域に含まれる要素数を計
算し(ステップA5)、それぞれを重複領域メモリ15
に格納する。さらに、制御手段1は、閾値設定手段10
により、重複領域メモリ15に格納された重複領域の要
素数と、最良類似測度メモリ18に格納されている今ま
での最良類似測度(従って、最初はステップA2で初期
化された類似測度)とから閾値を求めて閾値メモリ17
に設定する(ステップA6)。この閾値は、重複領域に
おける残差を計算する以下の手続きにおいて、手続きを
途中で打ち切るかどうかを判断するために利用される。
次に、制御手段1は、重複領域設定手段4により設定さ
れた重複領域に対する残差を求めるにあたり、残差初期
化手段8により、残差計算の途中経過を格納する残差メ
モリ16を初期化する(ステップA7)。Subsequently, the control means 1 selects one position parameter candidate from the position parameter candidate memory 13 by the position parameter candidate selection means 3 (step A3).
When the selected position parameter candidate is applied to the target image, an overlapping region, which is a portion where the target image and the reference image overlap, is determined by the overlapping region setting means 4 and set in the overlapping region memory 15 (step A4). The number of elements included in the overlapping area is calculated by the overlapping area element number calculating means 5 (step A5).
To be stored. Further, the control means 1 includes a threshold setting means 10
From the number of elements of the overlap area stored in the overlap area memory 15 and the best similarity measure stored so far in the best similarity measure memory 18 (hence, the similarity measure initially initialized in step A2) Threshold memory 17
(Step A6). This threshold value is used in the following procedure for calculating the residual in the overlapping area to determine whether or not the procedure should be interrupted.
Next, the control means 1 initializes the residual memory 16 for storing the progress of the residual calculation by the residual initializing means 8 when obtaining the residual for the overlapping area set by the overlapping area setting means 4. (Step A7).
【0035】そして制御手段1は、重複領域要素選択手
段6により選択された重複領域内の要素に対応する、基
準画像と対象画像の画素値を画像メモリ14から読み取
り、それぞれの画素値から残差メモリ16内の値を残差
更新手段7により更新する(ステップA8、A9)。更
新された残差メモリ16内の値は、残差閾値比較手段9
により、閾値メモリ17内の閾値と比較され(ステップ
A10)、残差メモリ16内の値が閾値を上回っている
場合には、重複領域に対する残差を求める手続きを中断
し、ステップA3に戻って、位置パラメータ候補群内の
次の位置パラメータ候補に対して、ステップA3以降と
同様の処理を行う。一方、更新された残差メモリ16内
の値が閾値未満の場合には、重複領域内の次の要素を重
複領域要素選択手段6により選択し、同様に残差メモリ
16内の値を更新する処理を引き続き行う。The control means 1 reads the pixel values of the reference image and the target image corresponding to the elements in the overlapping area selected by the overlapping area element selecting means 6 from the image memory 14 and calculates the residual value from each pixel value. The value in the memory 16 is updated by the residual updating means 7 (steps A8 and A9). The updated value in the residual memory 16 is stored in the residual threshold comparing unit 9.
Is compared with the threshold value in the threshold value memory 17 (step A10). If the value in the residual value memory 16 exceeds the threshold value, the procedure for obtaining the residual value for the overlapping area is interrupted, and the process returns to step A3. The same processing as in step A3 and subsequent steps is performed on the next position parameter candidate in the position parameter candidate group. On the other hand, if the updated value in the residual memory 16 is less than the threshold value, the next element in the overlapping area is selected by the overlapping area element selecting means 6, and the value in the residual memory 16 is similarly updated. Continue the process.
【0036】重複領域内の全ての要素に対して残差更新
手段7による残差メモリ16内の値を更新する処理を終
えた場合は、得られた結果に基づき、最良類似測度メモ
リ18内の位置パラメータ候補、その位置パラメータを
対象画像に適用した場合に得られる重複領域の残差、そ
の位置パラメータを対象画像に適用した場合に得られる
重複領域の残差、その重複領域に含まれる要素数のそれ
ぞれを、最良類似測度更新手段11により更新する(ス
テップA11)。そして、ステップA3に戻って、位置
パラメータ候補群の次の位置パラメータ候補を位置パラ
メータ候補選択手段3により選択し、ステップA3以降
の処理を繰り返す。When the processing for updating the values in the residual memory 16 by the residual updating means 7 for all the elements in the overlapping area is completed, based on the obtained result, the best similarity measure memory 18 Position parameter candidates, residuals of the overlap region obtained when the position parameters are applied to the target image, residuals of the overlap region obtained when the position parameters are applied to the target image, and the number of elements included in the overlap region Are updated by the best similarity measure updating means 11 (step A11). Then, returning to step A3, the next position parameter candidate of the position parameter candidate group is selected by the position parameter candidate selection means 3, and the processing after step A3 is repeated.
【0037】位置パラメータ候補群内の全ての位置パラ
メータ候補を位置パラメータ候補選択手段3により選択
し、それらに対して上記の処理を適用し終えると、最良
類似測度メモリ18には、位置パラメータ候補群内で最
良の類似測度を与えた位置パラメータと、その位置パラ
メータにより得られる重複領域の類似測度と、その重複
領域の要素数とが格納されていることになる。制御手段
1は、これらの値を位置合わせ結果とする。When all the position parameter candidates in the position parameter candidate group are selected by the position parameter candidate selection means 3 and the above processing is applied to them, the best similarity measure memory 18 stores the position parameter candidate group in the best similarity memory 18. , The position parameter giving the best similarity measure, the similarity measure of the overlapping area obtained by the position parameter, and the number of elements of the overlapping area are stored. The control unit 1 uses these values as the alignment result.
【0038】以下、本発明の動作についてより具体的に
説明する。Hereinafter, the operation of the present invention will be described more specifically.
【0039】先ず、図3を参照して、基準画像と対象画
像とについて説明する。位置合わせ処理の基準となる基
準画像(I)101と位置合わせ処理の対象となる対象
画像(T)102とは、例えば各画素が0から255の
範囲内の整数値をとる濃淡画像であり、基準画像101
の座標(x,y)の画素の画素値をI(x,y)、同様
に対象画像102の座標(x,y)の画素の画素値をT
(x,y)と表現する。また、対象画像102の位置
は、対象画像102の左上隅の点を原点とする、X軸お
よびY軸がそれぞれの画像のX軸、Y軸と平行な基準画
像座標系104で表現される。First, the reference image and the target image will be described with reference to FIG. The reference image (I) 101 serving as a reference for the positioning process and the target image (T) 102 serving as the target of the positioning process are, for example, grayscale images in which each pixel takes an integer value in the range of 0 to 255. Reference image 101
Is the pixel value of the pixel at the coordinates (x, y) of I (x, y), and similarly the pixel value of the pixel at the coordinates (x, y) of the target image 102 is T
Expressed as (x, y). The position of the target image 102 is represented by a reference image coordinate system 104 whose origin is the point at the upper left corner of the target image 102 and whose X and Y axes are parallel to the X and Y axes of the respective images.
【0040】次に、図1乃至図3を参照して基準画像1
01に対して対象画像102を最もうまく重ね合わせる
ことができる位置を求める処理の詳細について説明す
る。Next, the reference image 1 will be described with reference to FIGS.
The details of the processing for finding the position where the target image 102 can be superimposed best on 01 will be described.
【0041】まず、制御手段1は、通信手段20を介し
て、基準画像101および対象画像102を画像サイズ
などの属性値とともに画像メモリ14に読み込む(ステ
ップA0)。次に、位置パラメータ候補群設定手段2
は、通信手段20を介して外部から位置パラメータ候補
群を読み込み、位置パラメータ候補メモリ13に格納す
る(ステップA1)。First, the control unit 1 reads the reference image 101 and the target image 102 into the image memory 14 via the communication unit 20 together with attribute values such as the image size (step A0). Next, position parameter candidate group setting means 2
Reads the position parameter candidate group from the outside via the communication means 20 and stores it in the position parameter candidate memory 13 (step A1).
【0042】ここで、位置パラメータ候補群は対象画像
102が基準画像座標系104において取りうる位置の
集合であり、 P={(u,v)|U0≦u≦U1,V0≦v≦V1,u,v,U0,U1,V 0,V1は整数} (式1) のように表現されている。Here, the position parameter candidate group is a set of positions that the target image 102 can take in the reference image coordinate system 104, and P = {(u, v) | U0 ≦ u ≦ U1, V0 ≦ v ≦ V1, u, v, U0, U1, V0, and V1 are represented as integers} (Equation 1).
【0043】位置パラメータ候補メモリ13に格納され
たこの位置パラメータ候補群Pは、後述するように位置
パラメータ候補選択手段3により、順番にかつ重複なく
選択されていく。この位置パラメータ候補群Pの各要素
には、位置パラメータ候補選択手段3により選択される
順に、重複なく順番に番号が付けられているものとす
る。この番号を位置パラメータ番号と呼ぶことにする。
位置パラメータ番号の例としては、集合Pの各要素を座
標と考えた場合にラスタ走査を行う順に番号をつけるも
のが考えられるが、この番号は説明の便宜を図るために
設定するものであり、本発明の本質に影響を与えるもの
ではない。The position parameter candidate group P stored in the position parameter candidate memory 13 is selected sequentially and without duplication by the position parameter candidate selection means 3 as described later. It is assumed that the elements of the position parameter candidate group P are sequentially numbered without duplication in the order selected by the position parameter candidate selection means 3. This number is called a position parameter number.
As an example of the position parameter number, when each element of the set P is considered as a coordinate, a number may be assigned in the order of performing raster scanning, but this number is set for convenience of explanation, It does not affect the essence of the invention.
【0044】制御手段1は、この位置パラメータ候補群
Pの中から、基準画像101に対して対象画像102が
最もうまく重なる位置パラメータを決定するために、各
位置パラメータ候補に対して類似測度を計算する。本発
明による位置合わせ処理では、位置パラメータ候補によ
り生成される重複領域にて定義される残差を、その重複
領域の要素数で正規化した類似測度を利用することで、
残差が抱える「重なり部分の大きさ、形状の変化の影響
を受けて誤った解を導くことがある」という問題を解消
する。The control means 1 calculates a similarity measure for each position parameter candidate from the group of position parameter candidates P in order to determine a position parameter at which the target image 102 best overlaps the reference image 101. I do. In the registration process according to the present invention, by using a similarity measure obtained by normalizing the residual defined in the overlapping region generated by the position parameter candidate by the number of elements of the overlapping region,
This solves the problem of residuals, which may lead to erroneous solutions under the influence of changes in the size and shape of the overlapping portion.
【0045】位置パラメータ候補群Pの或る位置パラメ
ータ(u,v)を対象画像102に適用した場合に、基
準画像101と対象画像102とが重なり合う図3の重
複領域(D)103中の要素の集合をDとすると、重複
領域103における残差S(u,v)および類似測度A
(u,v)は、 S(u,v)=SUM{D,|I(p,q)−T(p−u,q−v)|} (式2−1) A(u,v)=S(u,v)÷NUM(D) (式2−2) となる。ただし、SUM{D,s(p,q)}は重複領
域Dの全ての要素(p,q)に対するs(p,q)の和
を、NUM(D)は重複領域Dに含まれる要素の数を、
それぞれ示す。類似測度は、重複領域103における画
素単位の残差を表しており、重複領域103において、
基準画像101と対象画像102の類似性が高いほど小
さくなる性質を持つ。When a certain position parameter (u, v) of the position parameter candidate group P is applied to the target image 102, the element in the overlapping area (D) 103 in FIG. Is the set of D, the residual S (u, v) and the similarity measure A in the overlapping area 103
(U, v) is given by: S (u, v) = SUM {D, | I (p, q) -T (pu, qv) |} (Equation 2-1) A (u, v) = S (u, v) ÷ NUM (D) (Equation 2-2). Here, SUM {D, s (p, q)} is the sum of s (p, q) for all the elements (p, q) of the overlapping area D, and NUM (D) is the sum of the elements included in the overlapping area D. Number
Shown respectively. The similarity measure represents a pixel-by-pixel residual in the overlapping area 103. In the overlapping area 103,
The higher the similarity between the reference image 101 and the target image 102 is, the smaller the similarity is.
【0046】制御手段1は、基準画像101と対象画像
102の位置合わせ処理の結果として、位置パラメータ
候補メモリ13内の各位置パラメータ(u,v)の中
で、最小の類似測度A(u,v)を与える位置パラメー
タを、図2におけるステップA2〜ステップA11の処
理により、選択する。以下、これらの処理について詳細
に説明する。As a result of the positioning process between the reference image 101 and the target image 102, the control means 1 determines the minimum similarity measure A (u, v) among the position parameters (u, v) in the position parameter candidate memory 13. The position parameter giving v) is selected by the processing of steps A2 to A11 in FIG. Hereinafter, these processes will be described in detail.
【0047】まず、制御手段1は、最良類似測度メモリ
18内のデータを最良類似測度初期化手段12により初
期化する(ステップA2)。最良類似測度メモリ18
は、位置パラメータ候補群Pの要素のうち、既に類似測
度を求めた要素の中で、それまでの最良の(すなわち最
小の)類似測度A0、A0を与えた位置パラメータ候補
(u0,v0)およびその位置パラメータ候補により得
られた重複領域D0の要素数R0を保持するものである
が、1つの要素についても類似測度が求められていない
初期化の時点では、(u0,v0)、R0は初期化せず
に未定義のままとし、A0を、 A0←255 (式3) と初期化する。この255の値は、各画像が0から25
5までの画素値を持つ濃淡画像であるときに、最大(す
なわち重複領域103において、基準画像101と対象
画像102の類似性が最も低い)と考えられる類似測度
である。First, the control means 1 initializes the data in the best similarity measure memory 18 by the best similarity measure initializing means 12 (step A2). Best similarity measure memory 18
Among the elements of the position parameter candidate group P, among the elements for which the similarity measure has already been obtained, the position parameter candidates (u0, v0) and the best (that is, the smallest) similarity measure A0, A0 that have been given so far. Although the number of elements R0 of the overlapping area D0 obtained by the position parameter candidate is held, at the time of initialization when the similarity measure is not obtained for one element, (u0, v0) and R0 are the initial values. A0 is initialized as A0 ← 255 (Equation 3) without being defined. The value of 255 is 0 to 25 for each image.
This is a similarity measure that is considered to be the maximum (that is, the similarity between the reference image 101 and the target image 102 is the lowest in the overlapping area 103) when the grayscale image has pixel values up to 5.
【0048】次に図2におけるステップA3以降では、
最良類似測度メモリ18内の、A0よりも小さな、すな
わち、基準画像101と対象画像102の類似性がより
高い類似測度が得られる度に最良類似測度メモリ18内
のデータを更新することで、最良の類似測度とその類似
測度を与える位置パラメータおよび重複領域中の要素数
を常に保持する処理が行われる。Next, after step A3 in FIG.
By updating the data in the best similarity measure memory 18 each time a similarity measure smaller than A0 in the best similarity measure memory 18 is obtained, that is, the similarity between the reference image 101 and the target image 102 is higher, the best similarity measure memory 18 is updated. , A process of always holding the similarity measure, the position parameter giving the similarity measure, and the number of elements in the overlapping area.
【0049】まず、制御手段1は、位置パラメータ候補
選択手段3により、位置パラメータ候補メモリ13内の
位置パラメータ候補(u,v)を順番にかつ重複なく選
択する。そして、各要素に対して図2におけるステップ
A4〜ステップA11の処理を適用する。First, the control means 1 selects the position parameter candidates (u, v) in the position parameter candidate memory 13 in order and without duplication by the position parameter candidate selection means 3. Then, the processing of steps A4 to A11 in FIG. 2 is applied to each element.
【0050】ステップA4では、選択された位置パラメ
ータ候補(u,v)を対象画像102に適用した場合に
得られる、基準画像101と対象画像102とが重なり
あう重複領域103を重複領域設定手段4により求め、
重複領域メモリ15に格納する。ここでは、重複領域1
03は、 D={(p,q)|P0≦p≦P1、Q0≦q≦Q1,p,q,P0,P1, Q0,Q1は整数} (式4) という集合で表現される矩形領域に含まれるすべての画
素である。ここでP0、P1、Q0、Q1は位置パラメ
ータ候補(u,v)の値、および各画像の大きさにより
決定される整数であり、基準画像座標系104で表現さ
れる。In step A4, an overlapping area 103 where the reference image 101 and the target image 102 overlap each other, which is obtained when the selected position parameter candidate (u, v) is applied to the target image 102, is set in the overlapping area setting means 4. Sought,
It is stored in the overlapping area memory 15. Here, overlapping area 1
03 is a rectangular area represented by a set of D = {(p, q) | P0 ≦ p ≦ P1, Q0 ≦ q ≦ Q1, p, q, P0, P1, Q0, and Q1 are integers (Equation 4) Are all pixels included in. Here, P0, P1, Q0, and Q1 are integers determined by the values of the position parameter candidates (u, v) and the size of each image, and are represented by the reference image coordinate system 104.
【0051】例えば、各画像が(0,0)から(15
9,119)の座標で表わされる160×120画素の
大きさを持つ場合、 (u,v)=(80,60) (式5) ならば、 D={(p,q)|80≦p≦159、60≦q≦119,p,qは整数} (式6) となる。For example, each image is (0,0) to (15
(U, v) = (80,60) (Equation 5) If D has a size of 160 × 120 pixels represented by coordinates of (9,119), then D = {(p, q) | 80 ≦ p ≦ 159, 60 ≦ q ≦ 119, p and q are integers} (Equation 6).
【0052】以下では、この重複領域103の各要素に
は、重複領域要素選択手段6により選択される順に1か
ら重複なく整数で番号が付けられているものとし、これ
を重複領域要素番号と呼ぶことにする。位置パラメータ
番号と同様に、この重複領域要素番号の例として、重複
領域103をラスタ走査する順に番号をつけるものが考
えられるが、これは本発明の動作を説明するために便宜
上設定するものであり、本発明の本質には影響を与えな
い。In the following, it is assumed that the respective elements of the overlapping area 103 are numbered in an integer from 1 in the order of selection by the overlapping area element selecting means 6 without duplication, and are referred to as overlapping area element numbers. I will. Similar to the position parameter number, as an example of the overlap area element number, a number may be assigned in the order of raster scanning of the overlap area 103, but this is set for convenience to explain the operation of the present invention. , Does not affect the essence of the present invention.
【0053】次に制御手段1は、ステップA5におい
て、重複領域103の要素数Rを、重複領域要素数計算
手段5により、 R=NUM(D)=(P1−P0+1)×(Q1−Q0+1) (式7) と求め、重複領域メモリ15に格納する。Next, in step A5, the control means 1 determines the number of elements R of the overlapping area 103 by using the overlapping area element number calculating means 5 as follows: R = NUM (D) = (P1-P0 + 1) × (Q1-Q0 + 1) (Equation 7) is obtained and stored in the overlapping area memory 15.
【0054】次に制御手段1は、ステップA6におい
て、上記重複領域要素数計算手段5により求めた重複領
域103の要素数R、および最良類似測度メモリ18内
にある、それまでに得られた最良の類似測度A0から、 t←A0×R (式8) により定義される閾値tを、閾値設定手段10により計
算し、閾値メモリ17に格納する。この閾値tは、図2
におけるステップA7〜A11の、重複領域103に対
する残差を求める手続きにおいて、今回の位置パラメー
タ候補(u,v)により得られる重複領域103の類似
測度が、現在の最良類似測度A0を更新する見込みがあ
るかどうかを判定するために利用される。Next, in step A 6, the control means 1 determines the number R of elements of the overlapping area 103 obtained by the above-described overlapping area element number calculating means 5 and the best number obtained in the best similarity memory 18. From the similarity measure A0, the threshold value t defined by t ← A0 × R (Equation 8) is calculated by the threshold value setting means 10 and stored in the threshold value memory 17. This threshold value t
In steps A7 to A11 in the procedure for obtaining the residual for the overlapping area 103, the similarity measure of the overlapping area 103 obtained by the current position parameter candidate (u, v) is expected to update the current best similarity measure A0. Used to determine if there is.
【0055】次に制御手段1は、ステップA7におい
て、残差初期化手段8により残差メモリ16の残差を初
期化し、ステップA8において重複領域要素番号iの要
素が重複領域要素選択手段6により選択される度に、ス
テップA9において残差更新手段7により残差メモリ1
6の残差を更新していく。重複領域103における残差
は前述した式2−1により定義される。重複領域103
における残差を求める手続きでは、重複領域要素番号i
(1≦i≦R)に対して、次のように定義される部分残
差S(i)を利用する。Next, in step A7, the control means 1 initializes the residual of the residual memory 16 by the residual initializing means 8, and in step A8, the element of the overlapping area element number i is changed by the overlapping area element selecting means 6. Every time a selection is made, the residual memory 1 is updated by the residual updating means 7 in step A9.
The residual of 6 is updated. The residual in the overlap area 103 is defined by the above-described equation 2-1. Overlapping area 103
In the procedure for obtaining the residual in, the overlapping area element number i
For (1 ≦ i ≦ R), a partial residual S (i) defined as follows is used.
【0056】 S(i)=S(i−1)+|I(p(i),q(i))−T(p(i)−u ,q(i)−v)| (式9) ここで、 S(i):重複領域要素番号iに対する部分残差 p(i):重複領域要素番号iの要素のX方向成分 q(i):重複領域要素番号iの要素のY方向成分 である。このとき、 S(R)=重複領域Dにおける残差 (式10) となる。本実施例においては、重複領域D内のすべての
要素について、式9により部分残差S(i)を計算する
ことで、重複領域Dに対する残差を求める。この部分残
差S(i)の値は残差メモリ16に格納されており、初
期化時には残差初期化手段8により、 S(0)=0 (式11) として初期化され(ステップA7)、重複領域要素番号
iの要素が重複領域要素選択手段6により選択される度
に(ステップA8)、残差更新手段7により、式9に従
って更新される(ステップA9)。S (i) = S (i−1) + | I (p (i), q (i)) − T (p (i) −u, q (i) −v) | (Equation 9) Here, S (i): the partial residual for the overlapping area element number i, p (i): the X direction component of the element of the overlapping area element number i, q (i): the Y direction component of the element of the overlapping area element number i, is there. At this time, S (R) = residual in overlap area D (Equation 10). In the present embodiment, the residual for the overlapping region D is obtained by calculating the partial residual S (i) using Equation 9 for all the elements in the overlapping region D. The value of the partial residual S (i) is stored in the residual memory 16 and is initialized by the residual initializing means 8 as S (0) = 0 (Equation 11) at the time of initialization (step A7). Each time the element of the overlapping area element number i is selected by the overlapping area element selecting means 6 (step A8), the element is updated by the residual updating means 7 according to equation 9 (step A9).
【0057】図4に重複領域Dにおける残差計算の特徴
を説明するためのグラフの例を示す。この図4のグラフ
において、横軸は重複領域要素番号iを、縦軸は重複領
域要素番号iに対する部分残差S(i)の値を示してい
る。式9および図4のグラフにあるように、部分残差S
(i)は重複領域要素番号iの増加に対して単調増加す
る。FIG. 4 shows an example of a graph for explaining the characteristics of the residual calculation in the overlapping area D. In the graph of FIG. 4, the horizontal axis represents the overlapping area element number i, and the vertical axis represents the value of the partial residual S (i) for the overlapping area element number i. As shown in Equation 9 and the graph of FIG. 4, the partial residual S
(I) monotonically increases as the overlap area element number i increases.
【0058】他方図5は本発明における閾値tを説明す
るためのグラフである。この図5のグラフは、最良類似
測度メモリ18に格納されている、既に求めた各位置パ
ラメータ候補に対する類似測度の中でそれまでの最良の
類似測度A0、A0を与えた位置パラメータ候補(u
0,v0)、およびその位置パラメータ候補(u0,v
0)により得られる重複領域Dにおける残差S0の関係
を図示したものである。図5のグラフにおいて、原点と
現在の最良類似測度を表す最良類似測度点301とを結
んだ直線の傾きがA0に相当する。この直線上の点に対
応する重複領域の要素数と残差を持つ重複領域は、重複
領域D0と同じ類似測度を持つ。重複領域の要素数がR
の場合にはこの直線上の点に対応する残差は、 A0×R (式12) となる。FIG. 5 is a graph for explaining the threshold value t in the present invention. The graph of FIG. 5 shows the position parameter candidates (u which have been given the best similarity measures A0 and A0 among the similarity measures for each of the previously obtained position parameter candidates stored in the best similarity measure memory 18.
0, v0) and its position parameter candidates (u0, v0)
FIG. 6 illustrates the relationship of the residual S0 in the overlap region D obtained by (0). In the graph of FIG. 5, the slope of the straight line connecting the origin and the best similarity measure point 301 representing the current best similarity measure corresponds to A0. The overlap area having the number of elements and the residual of the overlap area corresponding to the point on this straight line has the same similarity measure as the overlap area D0. Number of elements in overlapping area is R
In the case of, the residual corresponding to the point on this straight line is A0 × R (Equation 12).
【0059】先の部分残差S(i)の重複領域要素番号
iの増加に対して単調増加であるという性質から、部分
残差S(i)がこの閾値tを超過した場合には、S(i
+1)〜S(R)もすべてtよりも大きな値となる。す
なわち、 S(R)≧S(R−1)≧…≧S(i+1)≧S(i)>A0×R (式1 3) であり、各辺をR(>0)で割ると、 S(R)÷R≧S(R−1)÷R≧…≧S(i+1)÷R≧S(i)÷R> A0×R÷R=A0 (式14) が成立する。これは、S(i)がA0×Rを超えると、
重複領域Dにおける類似測度は必ずA0よりも大きくな
り、重複領域要素番号がi+1以降の処理を継続して
も、重複領域Dにおける類似測度が現在の最良類似測度
A0を更新する可能性がないことを示している。Since the partial residual S (i) is monotonically increasing with respect to the increase of the overlapping area element number i, if the partial residual S (i) exceeds the threshold value t, S (I
+1) to S (R) also take values larger than t. That is, S (R) ≧ S (R−1) ≧... ≧ S (i + 1) ≧ S (i)> A0 × R (Equation 13) When each side is divided by R (> 0), S (R) ÷ R ≧ S (R−1) ÷ R ≧... ≧ S (i + 1) ÷ R ≧ S (i) ÷ R> A0 × R ÷ R = A0 (Equation 14) holds. This is because when S (i) exceeds A0 × R,
The similarity measure in the overlapping area D is always larger than A0, and there is no possibility that the similarity measure in the overlapping area D will update the current best similarity measure A0 even if the processing of the overlapping area element number i + 1 or later is continued. Is shown.
【0060】また、全てのiに対して、 S(i)<A0×R (式15) ならば、 S(R)<A0×R (式16) であるから、重複領域Dにおける類似測度は、式16よ
り、 S(R)÷R<A0 (式17) となり、必ず、それまでの最良類似測度A0よりも、小
さな値を持つ。For all i, if S (i) <A0 × R (Equation 15), then S (R) <A0 × R (Equation 16), the similarity measure in the overlapping area D is From Expression 16, S (R) ÷ R <A0 (Expression 17), and always has a smaller value than the best similarity measure A0.
【0061】類似測度、残差、重複領域要素数のこれら
の性質を利用して、本実施例では式8に従って閾値t
(=A0×R)を設定し、次のようにして計算量の削減
と最良類似測度の更新を実現する。Using these properties of the similarity measure, the residual, and the number of overlapping area elements, in this embodiment, the threshold t
(= A0 × R) is set, and the calculation amount is reduced and the best similarity measure is updated as follows.
【0062】すなわち、ステップA9において部分残差
S(i)を更新する度に、ステップA10において閾値
tと更新した部分残差を比較し、 S(i)>t (式18) が成立した場合には、重複領域Dにおける部分残差更新
処理を中止して、次の位置パラメータ候補選択の手続き
(ステップA3)に戻るのである。一度も式18が成立
せず、全ての重複領域要素について、部分残差の更新を
行うことができた場合には、最良類似測度更新手段11
により、最良類似測度メモリ18内の最良類似測度A
0、A0を与えた位置パラメータ候補(u0,v0)お
よびその位置パラメータ候補により得られる重複領域D
の要素数R0を、それぞれ、 A0←S(R)÷R (式19−1) (u0,v0)←(u,v) (式19−2) R0←R (式19−3) に従って、更新する。そして、次の位置パラメータ候補
に対して同様の処理を行うべく、ステップA3以降を繰
り返すことで、全ての位置パラメータ候補の中で最良の
類似測度を与えるものを探し出し、基準画像101に対
して対象画像102が最もうまく重ね合わせることがで
きる位置を決定する。That is, every time the partial residual S (i) is updated in step A9, the threshold t is compared with the updated partial residual in step A10, and if S (i)> t (Equation 18) holds. Then, the partial residual update process in the overlapping area D is stopped, and the procedure returns to the next position parameter candidate selection procedure (step A3). If the expression 18 has never been satisfied and the partial residuals can be updated for all overlapping region elements, the best similarity measure updating unit 11
The best similarity measure A in the best similarity measure memory 18
0, A0 given position parameter candidate (u0, v0) and the overlapping area D obtained by the position parameter candidate
A0 ← S (R) ÷ R (Equation 19-1) (u0, v0) ← (u, v) (Equation 19-2) R0 ← R (Equation 19-3) Update. Then, in order to perform the same processing for the next position parameter candidate, the process that repeats step A3 and thereafter is performed to find the one that gives the best similarity measure among all the position parameter candidates, Determine the position where the image 102 can be best superimposed.
【0063】以上本発明の実施例について説明したが、
本発明は以上の実施例にのみ限定されず各種の付加変更
が可能である。以下、その変形例等について説明する。The embodiments of the present invention have been described above.
The present invention is not limited to the above embodiments, and various additions and changes are possible. Hereinafter, the modified examples and the like will be described.
【0064】上記の実施例では、最良類似測度を式3に
より初期化したが、最良類似測度を或る程度予測できる
場合にはより解に近い値を最小類似測度の初期値として
設定しても良い。図4および図5より分かるように、最
良類似測度の初期値が解に近ければ近いほど、残差計算
が打ち切られるタイミングも早く(すなわち、重複領域
要素番号が小さいうちに)処理が中断されるため、この
場合にはより計算量を削減することが可能となる。In the above embodiment, the best similarity measure is initialized by Equation 3, but if the best similarity measure can be predicted to some extent, a value closer to the solution may be set as the initial value of the minimum similarity measure. good. As can be seen from FIGS. 4 and 5, the closer the initial value of the best similarity measure is to the solution, the earlier the timing at which the residual calculation is terminated (that is, while the overlapping area element number is small), the processing is interrupted. Therefore, in this case, the calculation amount can be further reduced.
【0065】上記の実施例では、位置パラメータ候補と
して平行移動を与えるものだけを対象としたが、本発明
は、回転をはじめとするより複雑な位置パラメータに対
しても利用可能である。例えば、平行移動に、画像の左
上隅を中心とした時計方向の回転のパラメータを加え
た、 P={(u,v,θ)|U0≦u≦U1,V0≦v≦V1,Θ0≦θ≦Θ1 } (式20) に対しても同様に、類似測度を定義可能であり、それま
での類似測度と重複領域要素数から設定される閾値によ
り類似測度計算の計算量を削減することが可能である。In the above-described embodiment, only the one that gives a parallel movement as a position parameter candidate is targeted. However, the present invention can also be used for more complicated position parameters such as rotation. For example, P = {(u, v, θ) | U0 ≦ u ≦ U1, V0 ≦ v ≦ V1, Θ0 ≦ θ, in which a parameter for clockwise rotation about the upper left corner of the image is added to the translation. Similarly, a similarity measure can be defined for ≦ {1} (Equation 20), and the amount of similarity measure calculation can be reduced by a threshold set from the similarity measure up to then and the number of overlapping area elements. It is.
【0066】上記の実施例では、重複領域に含まれる要
素を基準画像と対象画像の重なり部分に存在する全ての
画素としたが、図7に示すように、基準画像と対象画像
との重なり部分に存在する全画素のうち或る規則に従っ
て選択した一部の画素を重複領域要素501とし、これ
ら重複領域要素501で重複領域を構成することも可能
である。例えば、X方向に対しては1つ置きに、Y方向
に関しては2つ置きに位置する画素のみを重複領域構成
要素501とすれば、重複領域要素数を6分の1にする
ことが可能であり、計算量を削減できる。残差を要素数
により正規化した類似測度を利用しているため、このよ
うに重複領域要素を基準画像と対象画像の重なり部分か
ら選択的に構成したとしても、正しい位置合わせ結果を
得ることができるのも本発明における大きな特徴であ
る。In the above embodiment, the elements included in the overlapping area are all the pixels existing in the overlapping portion between the reference image and the target image. However, as shown in FIG. It is also possible to configure some of the pixels selected according to a certain rule among all the pixels existing in the region as the overlap region element 501, and configure the overlap region with these overlap region elements 501. For example, if only every other pixel in the X direction and every other pixel in the Y direction are set as the overlapping area component 501, the number of overlapping area elements can be reduced to 1/6. Yes, the amount of calculation can be reduced. Since the similarity measure in which the residual is normalized by the number of elements is used, a correct alignment result can be obtained even if the overlapping area element is selectively configured from the overlapping portion of the reference image and the target image. What is possible is a major feature of the present invention.
【0067】上記の実施例では、通信手段20を通じて
外部から位置パラメータ候補群を読み込んだが、画像メ
モリ14内の画像データを参照して位置パラメータ候補
群を設定するようにしても良い。図6はこの方法で基準
画像401に対して対象画像402の位置パラメータ候
補を設定する一例を示している。位置パラメータ候補群
403は、対象画像402が基準画像401と重なりを
持つ全ての場合から構成されており、例えば、各画像が
(0,0)から(159,119)の座標で表わされる
160×120画素の大きさであれば、 P={(u,v)|−159≦u≦159,−119≦v≦119)} ( 式21) と設定される。これにより、外部から位置パラメータ候
補群を読み込むことなく、画像のみが入力された場合に
も位置合わせ処理を実行することが可能となる。なお、
上記の例は、対象画像402が基準画像401と重なり
を持つ全ての場合から構成される位置パラメータ候補群
を示したが、各画像を取得するためのカメラの位置の情
報や画像間の相対関係を示す情報が画像に付加されてい
るような場合、その情報を利用することで、位置パラメ
ータ候補群をより限定した領域に設定することもでき
る。In the above embodiment, the position parameter candidate group is read from the outside through the communication means 20, but the position parameter candidate group may be set by referring to the image data in the image memory 14. FIG. 6 shows an example of setting the position parameter candidates of the target image 402 with respect to the reference image 401 by this method. The position parameter candidate group 403 is composed of all cases where the target image 402 overlaps the reference image 401. For example, each of the images has a size of 160 × represented by coordinates from (0,0) to (159,119). If the size is 120 pixels, P = {(u, v) | -159≤u≤159, -119≤v≤119)} (Equation 21). This makes it possible to execute the positioning process even when only an image is input without reading the position parameter candidate group from the outside. In addition,
In the above example, the position parameter candidate group composed of all cases where the target image 402 overlaps the reference image 401 is shown. However, information on the position of the camera for acquiring each image and the relative relationship between the images are shown. Is added to the image, the position parameter candidate group can be set to a more limited area by using the information.
【0068】次に本発明における第2の実施の形態の例
について図面を参照して詳細に説明する。Next, an example of the second embodiment of the present invention will be described in detail with reference to the drawings.
【0069】第2の実施の形態の例は、画像マスクを適
用した画像間の位置合わせ処理において、ある位置パラ
メータ候補に対する類似測度を求める際に、本発明の第
1の実施例と同様に、閾値を利用して残差計算を打ち切
ることで、全体の計算量が削減され、高速な位置合わせ
が可能となる手法を適用するものである。The example of the second embodiment is similar to the first embodiment of the present invention, when a similarity measure for a certain position parameter candidate is obtained in the registration processing between images to which an image mask is applied. By terminating the residual calculation using the threshold value, a method of reducing the overall calculation amount and applying high-speed alignment is applied.
【0070】図10は画像マスクの例である。画像マス
クは、画像の各画素が有効画素(すなわち画像処理や表
示の対象となる画素)であるのか、または無効画素(す
なわち画像処理や表示の対象とならない画素)であるの
かを示す情報を保持している。画像マスクを利用するこ
とで、画像中の特定の範囲だけを画像処理の対象とする
ことが可能となる。図10においては、画像中心部の楕
円領域内に対応する画素が有効画素、楕円領域外の要素
が無効画素であることを示している。画像マスクを利用
した画像処理については「昭晃堂、『画像処理ハンドブ
ック』、252〜254頁」に詳細な説明があるのでこ
こでは割愛する。FIG. 10 shows an example of an image mask. The image mask holds information indicating whether each pixel of the image is a valid pixel (that is, a pixel to be processed or displayed) or an invalid pixel (that is, a pixel that is not to be processed or displayed). doing. By using an image mask, only a specific range in an image can be subjected to image processing. FIG. 10 shows that pixels corresponding to an elliptical area at the center of the image are valid pixels, and elements outside the elliptical area are invalid pixels. The image processing using an image mask is described in detail in "Shokodo," Image Processing Handbook ", pp. 252 to 254, and will not be described here.
【0071】図11は画像マスクを適用した画像間の位
置合わせ処理を説明するための図である。図11におい
て、位置合わせ処理の基準となる基準画像と位置合わせ
処理の対象となる対象画像が重複領域Dを形成している
が、重複領域Dの要素のうち画像間の重ね合わせのよさ
を評価する指標である類似測度を求める対象となるの
は、基準画像および対象画像の双方が有効画素を持つ有
効重複領域Eに含まれる要素である。FIG. 11 is a diagram for explaining the registration process between images to which the image mask is applied. In FIG. 11, a reference image serving as a reference for the alignment processing and a target image to be subjected to the alignment processing form an overlapping area D. Among the elements of the overlapping area D, the superimposition of images is evaluated. The target for which the similarity measure, which is the index to be calculated, is an element included in the effective overlapping area E in which both the reference image and the target image have effective pixels.
【0072】本発明の第1の実施例において説明したよ
うに、画像マスクを利用した位置合わせ処理等画像間の
有効重複領域が矩形とはならない場合でも、有効重複領
域Eに含まれる要素数とそれまでの最良類似測度とから
求めた閾値により、残差計算を打ち切ることで全体の計
算量が削減され、高速な位置合わせが可能である。As described in the first embodiment of the present invention, the number of elements included in the effective overlapping area E can be reduced even when the effective overlapping area between the images is not rectangular, such as in the alignment processing using an image mask. By terminating the residual calculation based on the threshold value obtained from the best similarity measure up to that time, the overall calculation amount is reduced, and high-speed alignment is possible.
【0073】しかしながら、有効重複領域Eの形状が複
雑な場合、すなわち有効重複領域Eに含まれる要素数
(有効重複領域要素数)を系統的に求めることが困難な
場合がある。この場合は有効重複領域の要素数を求める
処理における処理コストが増大し、閾値を利用して残差
計算を打ち切るという本発明の効果が失われてしまう問
題が発生する場合がある。However, when the shape of the effective overlapping area E is complicated, it may be difficult to systematically determine the number of elements included in the effective overlapping area E (the number of effective overlapping area elements). In this case, the processing cost in the process of obtaining the number of elements of the effective overlapping area increases, and a problem may occur in which the effect of the present invention of terminating the residual calculation using the threshold is lost.
【0074】本実施例はこの問題を回避し、画像マスク
を利用した画像間の位置合わせ処理においても高速に位
置合わせが行えるようにするために、ある位置パラメー
タ候補における類似測度を算出する際に、基準画像と対
象画像の重複領域の要素数と、無効領域要素数(または
有効領域要素数)と、それまでの最良類似測度とから求
めた値を閾値として利用するように構成したものであ
る。In this embodiment, in order to avoid this problem and perform high-speed alignment even in the alignment process between images using an image mask, a similarity measure for a certain position parameter candidate is calculated. , A value obtained from the number of elements of the overlapping area between the reference image and the target image, the number of invalid area elements (or the number of valid area elements), and the best similarity measure up to that time is used as a threshold value. .
【0075】以下、本発明の第2の実施例を図面を用い
て詳細に説明する。Hereinafter, a second embodiment of the present invention will be described in detail with reference to the drawings.
【0076】図8は、本発明の第2の実施例の方法を実
施する位置合わせ処理装置200の構成例を示すブロッ
ク図である。この例の位置合わせ処理装置200は、第
1の実施例の方法を実施する位置合わせ処理装置100
と比較して、機能部においては領域要素数初期化手段3
1、領域要素数更新手段32、領域要素判定手段33
が、記憶部においてはマスクメモリ34、領域要素数メ
モリ35が追加された構成となっている。位置合わせ処
理装置200中の各要素は以下のような機能等を有す
る。FIG. 8 is a block diagram showing an example of the configuration of a positioning apparatus 200 for implementing the method of the second embodiment of the present invention. The alignment processing apparatus 200 of this example includes a positioning processing apparatus 100 that performs the method of the first embodiment.
In the functional unit, the area element number initialization means 3
1, area element number updating means 32, area element determining means 33
However, the storage unit has a configuration in which a mask memory 34 and a region element number memory 35 are added. Each element in the alignment processing apparatus 200 has the following functions and the like.
【0077】図8において本発明の第2の実施例の方法
を実施する位置合わせ処理装置200の各要素のうち、
制御手段1、位置パラメータ候補群設定手段2、位置パ
ラメータ候補選択手段3、重複領域設定手段4、重複領
域要素数計算手段5、重複領域要素選択手段6、残差更
新手段7、残差初期化手段8、残差閾値比較手段9、最
良類似測度初期化手段12、位置パラメータ候補メモリ
13、画像メモリ14、重複領域メモリ15、残差メモ
リ16、閾値メモリ17は、図1において本発明の第1
の実施例の方法を実施する位置合わせ処理装置100に
記載の同名の要素と同様の機能を有する。Referring to FIG. 8, among the components of the alignment processing apparatus 200 for implementing the method according to the second embodiment of the present invention,
Control means 1, position parameter candidate group setting means 2, position parameter candidate selection means 3, overlapping area setting means 4, overlapping area element number calculating means 5, overlapping area element selecting means 6, residual updating means 7, residual initialization The means 8, the residual threshold value comparing means 9, the best similarity measure initializing means 12, the position parameter candidate memory 13, the image memory 14, the overlapping area memory 15, the residual memory 16, and the threshold memory 17 are shown in FIG. 1
It has the same function as the element of the same name described in the alignment processing apparatus 100 that performs the method of the embodiment.
【0078】また、図1において本発明の第1の実施例
の方法を実施する位置合わせ処理装置100に記載され
た手段と同名を持つ、閾値設定手段10、最良類似測度
更新手段11、最良類似測度メモリ18は、それぞれ、
次の機能を有する。Further, in FIG. 1, the threshold setting means 10, the best similarity measure updating means 11, the best similarity means having the same names as the means described in the positioning processing apparatus 100 for implementing the method of the first embodiment of the present invention. The measure memories 18 are:
It has the following functions.
【0079】閾値設定手段10は、重複領域に対する残
差を求める処理において、処理の継続可否を判断し位置
合わせ処理の処理量を軽減するために利用される閾値
を、最良類似測度メモリ18に格納されている最良類似
測度と、重複領域メモリ15に格納されている重複領域
の要素数と、領域要素数メモリ35に格納されている領
域要素数とから求め、閾値メモリ17に設定する。The threshold setting means 10 stores, in the best similarity measure memory 18, a threshold used for determining the continuation of the processing and reducing the processing amount of the alignment processing in the processing for obtaining the residual for the overlapping area. From the best similarity measure, the number of elements of the overlapping area stored in the overlapping area memory 15, and the number of area elements stored in the area element number memory 35, and set them in the threshold memory 17.
【0080】最良類似測度更新手段11は、位置パラメ
ータ候補メモリ13に格納されている位置パラメータ候
補群中のすでに類似測度が求められた位置パラメータ候
補のうちで、最良の類似測度となった位置パラメータ候
補と、その位置パラメータ候補により得られた重複領域
の要素数と、その位置パラメータ候補により得られた有
効重複領域の要素数または無効重複領域の要素数を示す
領域要素数および最良類似測度を、最良類似測度メモリ
18に格納する。The best similarity measure updating means 11 selects the position parameter having the best similarity measure among the position parameter candidates for which the similarity measure has already been obtained from the position parameter candidate group stored in the position parameter candidate memory 13. Candidates, the number of elements of the overlapping area obtained by the position parameter candidate, and the number of area elements and the best similarity measure indicating the number of elements of the effective overlapping area or the number of elements of the invalid overlapping area obtained by the position parameter candidate, It is stored in the best similarity measure memory 18.
【0081】最良類似測度メモリ18は、処理の過程に
おいて、それまでに得られている最良の類似測度と、そ
の類似測度を与えた位置パラメータ候補と、その位置パ
ラメータ候補により得られる重複領域の全要素数および
領域要素数とを格納するメモリである。During the processing, the best similarity measure memory 18 stores the best similarity measure that has been obtained up to now, the position parameter candidate to which the similarity measure has been given, and the overlapping area obtained by the position parameter candidate. This is a memory for storing the number of elements and the number of area elements.
【0082】また、図1における本発明の第1の実施例
の方法を実施する位置合わせ処理装置100と比較して
追加された、領域要素数初期化手段31、領域要素数更
新手段32、領域要素判定手段33、マスクメモリ3
4、領域要素数メモリ35は、それぞれ、次の機能を有
する。Further, a region element number initializing unit 31, a region element number updating unit 32, and a region adding unit are added in comparison with the positioning processing apparatus 100 for executing the method of the first embodiment of the present invention in FIG. Element determination means 33, mask memory 3
4. The area element number memory 35 has the following functions.
【0083】マスクメモリ34は、画像メモリ14に保
存された画像の各画素が有効画(すなわち画像処理や表
示の対象となる画素)であるのか、または無効画素(す
なわち画像処理や表示の対象とならない画素)であるの
かを示す画像マスクを格納するメモリである。The mask memory 34 determines whether each pixel of the image stored in the image memory 14 is an effective image (that is, a pixel to be processed or displayed) or an invalid pixel (that is, a pixel to be processed or displayed). This is a memory that stores an image mask that indicates whether the pixel is an unrecognized pixel.
【0084】領域要素数メモリ35は、重複領域の各要
素のうち、基準画像または対象画像のいずれか(または
両方)が無効画素である要素の数を示す無効領域要素数
と、基準画像と対象画像の両方が有効画素である要素の
数を示す有効領域要素数とを表す領域要素数を格納する
メモリである。The area element number memory 35 stores the number of invalid area elements indicating the number of elements in which either (or both) of the reference image and the target image are invalid pixels among the elements of the overlapping area, It is a memory for storing the number of effective area elements indicating the number of elements in which both of the images are effective pixels.
【0085】領域要素数初期化手段31は、領域要素数
メモリ35内の領域要素数を初期化する手段である。The area element number initializing means 31 is means for initializing the number of area elements in the area element number memory 35.
【0086】領域要素判定手段33は、与えられた重複
領域の要素が類似測度計算の対象となる要素か否かをマ
スクメモリ34を参照して判定する手段である。The area element determining means 33 determines whether or not the element of the given overlapping area is an element to be subjected to similarity measure calculation with reference to the mask memory 34.
【0087】領域要素数更新手段32は、領域要素判定
手段33により判別された重複領域要素の種別に従っ
て、領域要素数メモリ35内の領域要素数を更新する手
段である。The area element number updating means 32 is means for updating the number of area elements in the area element number memory 35 according to the type of the overlapping area element determined by the area element determining means 33.
【0088】図9は位置合わせ処理装置200の処理の
一例を示すフローチャートである。FIG. 9 is a flowchart showing an example of the processing of the alignment processing apparatus 200.
【0089】以下、図8および図9を参照して、位置合
わせ処理装置200の動作の概略を説明する。Hereinafter, an outline of the operation of the positioning apparatus 200 will be described with reference to FIGS.
【0090】制御手段1は、先ず、通信手段20によ
り、位置合わせ処理の対象となる対象画像および位置合
わせ処理の基準となる基準画像を画像メモリ14に、そ
れぞれの画像マスクをマスクメモリ34に読み込む(ス
テップB0)。次に、位置パラメータ候補群設定手段2
により、基準画像に対して対象画像がとりうる位置パラ
メータの候補の集合を位置パラメータ候補メモリ13に
格納する(ステップB1)。そして、最良類似測度初期
化手段12により、最良類似測度メモリ18に含まれる
各値を初期化する(ステップB2)。The control means 1 first reads the target image to be subjected to the positioning processing and the reference image to be the reference of the positioning processing into the image memory 14 and the respective image masks into the mask memory 34 by the communication means 20. (Step B0). Next, position parameter candidate group setting means 2
Thus, a set of position parameter candidates that can be taken by the target image with respect to the reference image is stored in the position parameter candidate memory 13 (step B1). Then, each value included in the best similarity measure memory 18 is initialized by the best similarity measure initializing means 12 (step B2).
【0091】続いて制御手段1は、位置パラメータ候補
選択手段3により、位置パラメータ候補メモリ13から
1つの位置パラメータ候補を選択し(ステップB3)、
この選択された位置パラメータ候補を対象画像に適用し
た際に、対象画像と基準画像とが重なり合う部分である
重複領域を重複領域設定手段4により求めて重複領域メ
モリ15に設定し(ステップB4)、また、重複領域要
素数計算手段5によりその重複領域に含まれるすべての
要素数を計算し(ステップB5)、それぞれを重複領域
メモリ15に格納する。さらに、制御手段1は、領域要
素数メモリ35に格納されている、重複領域に含まれる
無効領域の要素数および有効領域の要素数を領域要素数
初期化手段31により初期化する(ステップB6)。そ
して、制御手段1は、重複領域設定手段4により設定さ
れた重複領域に含まれる要素のうち類似測度計算の対象
となる要素に対して残差を求める処理を開始する前に、
残差初期化手段8により、残差計算の途中経過を格納す
る残差メモリ16を初期化する(ステップB7)。Subsequently, the control means 1 selects one position parameter candidate from the position parameter candidate memory 13 by the position parameter candidate selection means 3 (step B3).
When the selected position parameter candidate is applied to the target image, an overlapping region, which is a portion where the target image and the reference image overlap, is determined by the overlapping region setting means 4 and set in the overlapping region memory 15 (step B4). Also, the number of all elements included in the overlapping area is calculated by the overlapping area element number calculating means 5 (step B5), and each is stored in the overlapping area memory 15. Further, the control means 1 initializes the number of invalid areas and the number of valid areas included in the overlapping area, stored in the area element number memory 35, by the area element number initializing means 31 (step B6). . Then, before starting the process of obtaining the residual for the element to be subjected to the similarity measure calculation among the elements included in the overlapping area set by the overlapping area setting means 4,
The residual memory 16 for storing the progress of the residual calculation is initialized by the residual initialization means 8 (step B7).
【0092】制御手段1は、重複領域要素選択手段6に
より重複領域内の一要素を選択し(ステップB8)、領
域要素判定手段33により、マスクメモリ34に格納さ
れている基準画像および対象画像それぞれの画像マスク
の情報から、選択された重複領域要素が、類似測度計算
の対象となる有効領域要素なのか、または、類似測度計
算の対象とならない無効領域要素なのかを判定する(ス
テップB9)。The control means 1 selects one element in the overlapping area by the overlapping area element selecting means 6 (step B8), and the area element determining means 33 controls the reference image and the target image stored in the mask memory 34, respectively. It is determined whether the selected overlapping area element is an effective area element to be subjected to similarity measure calculation or an invalid area element not to be subjected to similarity measure calculation from the information of the image mask (step B9).
【0093】選択された重複領域要素が有効領域要素の
場合は、第1の実施例を実施する位置合わせ処理装置1
00の処理の一例を示すフローチャートである図2にお
いて、部分残差を更新する処理(ステップA9)と同様
の手続きにより残差メモリ16内の部分残差を更新する
(ステップB10)。そして、領域要素数を更新し(ス
テップB11)、閾値設定手段10により、最良類似測
度メモリ18に格納されているそれまでの最良類似測度
と、重複領域メモリ15に格納されている重複領域に含
まれる全要素数と、領域要素数メモリ35内の無効領域
要素数または有効領域要素数とから閾値を求め、閾値メ
モリ17に設定する(ステップB12)。そして、図2
におけるステップA10と同様の手続きにより残差メモ
リ16内の部分残差と閾値メモリ17内の閾値を比較し
(ステップB13)、部分残差が閾値を超えた場合には
現在の位置パラメータに対する類似測度計算を中止し、
ステップB3以降を繰り返す。部分残差が閾値よりも小
さい場合は、他の重複領域要素に対して処理を適用する
ためにステップB8以降を繰り返す。When the selected overlapping area element is an effective area element, the positioning processing apparatus 1 according to the first embodiment is used.
In FIG. 2 which is a flowchart showing an example of the process of 00, the partial residual in the residual memory 16 is updated by the same procedure as the process of updating the partial residual (step A9) (step B10). Then, the number of area elements is updated (step B11), and the threshold setting unit 10 includes the best similarity measure stored in the best similarity measure memory 18 and the overlapped area stored in the overlapped area memory 15. A threshold is obtained from the total number of elements to be read and the number of invalid area elements or the number of valid area elements in the area element number memory 35, and is set in the threshold memory 17 (step B12). And FIG.
The partial residual in the residual memory 16 is compared with the threshold in the threshold memory 17 by the same procedure as step A10 in step B13 (step B13). If the partial residual exceeds the threshold, the similarity measure for the current position parameter Stop the calculation,
Step B3 and subsequent steps are repeated. If the partial residual is smaller than the threshold value, step B8 and subsequent steps are repeated to apply the processing to other overlapping region elements.
【0094】選択された重複領域要素が無効領域要素の
場合は、残差メモリ16内の部分残差を更新し(ステッ
プB15)、領域要素数更新手段32により領域要素数
メモリ35に格納されている無効領域要素数と有効領域
要素数を更新し(ステップB16)、他の重複領域要素
に対して処理を適用するためにステップB8以降を繰り
返す。If the selected overlapping area element is an invalid area element, the partial residual in the residual memory 16 is updated (step B15) and stored in the area element number memory 35 by the area element number updating means 32. The number of invalid area elements and the number of valid area elements are updated (step B16), and step B8 and subsequent steps are repeated to apply processing to other overlapping area elements.
【0095】ステップB8において、現在の位置パラメ
ータ候補により生じる重複領域要素のすべてに対してス
テップB8以降の処理を適用した場合は、最良類似測度
更新手段11により、残差メモリ16内に格納されてい
る部分残差、重複領域メモリ15に格納されている重複
領域に含まれる全要素数、および領域要素数メモリ35
に格納されている重複領域に含まれる無効領域要素数ま
たは有効領域要素数から類似測度を計算し最良類似測度
メモリ18に格納されている最良類似測度を更新する。
同時に、現在の位置パラメータ候補、その位置パラメー
タ候補により得られた重複領域に含まれる全要素数およ
び無効領域要素数または有効領域要素数を最良類似測度
メモリ18に格納する(ステップB14)。そして、他
の位置パラメータ候補に対して類似測度を求めるため
に、ステップB3以降を繰り返す。In step B8, when the processing after step B8 is applied to all the overlapping area elements generated by the current position parameter candidates, the best similarity measure updating means 11 stores the data in the residual memory 16. Partial residual, the total number of elements included in the overlapping area stored in the overlapping area memory 15, and the area element number memory 35.
The similarity measure is calculated from the number of invalid area elements or the number of effective area elements included in the overlapping area stored in the best similarity measure memory 18 and the best similarity measure stored in the best similarity measure memory 18 is updated.
At the same time, the current position parameter candidate, the total number of elements included in the overlapping area obtained by the position parameter candidate, and the number of invalid area elements or valid area elements are stored in the best similarity measure memory 18 (step B14). Then, in order to obtain a similarity measure for another position parameter candidate, the steps from step B3 are repeated.
【0096】ステップB3において、位置パラメータ候
補選択手段3がすべての位置パラメータ候補に対してス
テップB4以降の処理を適用したと判断された場合は、
処理を終了する。この時、最良類似測度メモリ18に格
納されている類似測度が位置パラメータ候補群に対する
最良の類似測度であり、同じく最良類似測度メモリ18
に格納されている位置パラメータ候補が位置合わせ処理
の結果として得られる位置パラメータとなる。If it is determined in step B3 that the position parameter candidate selection means 3 has applied the processing from step B4 to all the position parameter candidates,
The process ends. At this time, the similarity measure stored in the best similarity measure memory 18 is the best similarity measure for the position parameter candidate group.
Are the position parameters obtained as a result of the positioning process.
【0097】以下、本発明の第2の実施例の動作につい
てより具体的に説明する。Hereinafter, the operation of the second embodiment of the present invention will be described more specifically.
【0098】図11において、基準画像I601と対象
画像T602の画素値および位置は、第1の実施例と同
様の方法で表現されているものとする。In FIG. 11, it is assumed that the pixel values and positions of the reference image I601 and the target image T602 are expressed in the same manner as in the first embodiment.
【0099】本実施例では画像マスクは基準画像、対象
画像と同じ大きさを持ち、有効画素であれば1を、無効
画素であれば0の値を持つ2値画像で表現されるものと
する。すなわち、基準画像Iの画像マスクをMi(x,
y)、対象画像の画像マスクをMt(x,y)とする
と、 Mi(x,y)=0 : I(x,y)が無効画素の場合 (式21−1) =1 : I(x,y)が有効画素の場合 (式21−2) Mt(x,y)=0 : T(x,y)が無効画素の場合 (式22−1) =1 : T(x,y)が有効画素の場合 (式22−2) である。対象となる位置(x,y)の画素が無効画素で
ある場合、その画素は位置合わせ処理をはじめとする画
像処理の対象とならない。In this embodiment, the image mask has the same size as the reference image and the target image, and is represented by a binary image having a value of 1 for an effective pixel and a value of 0 for an invalid pixel. . That is, the image mask of the reference image I is set to Mi (x,
y), assuming that the image mask of the target image is Mt (x, y), Mi (x, y) = 0: when I (x, y) is an invalid pixel (Equation 21-1) = 1: I (x , Y) is an effective pixel (Equation 21-2) Mt (x, y) = 0: T (x, y) is an invalid pixel (Equation 22-1) = 1: T (x, y) is In the case of an effective pixel (Equation 22-2). When the pixel at the target position (x, y) is an invalid pixel, the pixel is not subjected to image processing such as alignment processing.
【0100】なお、本実施例における画像マスクの形態
は説明の都合上2値画像としたが、これは本発明の適用
範囲を限定するものではない。各画素が有効画素である
のか無効画素であるのかを判断できるものであれば何で
もよく、多値画像や無効画素位置を記録した変換テーブ
ルなど他の形態を利用することも可能である。また、各
画像毎に異なる画像マスクを利用するものとしたが、各
画像の有効画素領域の大きさおよび形状が同じであれ
ば、単一の画像マスクを利用することも可能である。Although the form of the image mask in this embodiment is a binary image for the sake of explanation, this does not limit the scope of the present invention. Any method can be used as long as it can determine whether each pixel is an effective pixel or an invalid pixel. Other forms such as a multi-valued image or a conversion table in which invalid pixel positions are recorded can also be used. Although different image masks are used for each image, a single image mask can be used as long as the size and shape of the effective pixel area of each image are the same.
【0101】まず、制御手段1は、通信手段20を介し
て、基準画像I601および対象画像T602を画像サ
イズなどの属性値とともに画像メモリ14に、それぞれ
の画像マスクMiおよびMtをマスクメモリ34に読み
込み(ステップB0)、位置パラメータ候補群設定手段
2により、通信手段20を介して外部から位置パラメー
タ候補群を位置パラメータ候補メモリ13に読み込む
(ステップB1)。位置パラメータ候補群は、対象画像
T602が基準画像座標系604において取りうる位置
の集合であり、第1の実施例と同様に式1で表現されて
おり、位置パラメータ候補群Pの各要素は、位置パラメ
ータ番号に従って、位置パラメータ候補選択手段3によ
り順番にかつ重複なく選択されていく。位置パラメータ
番号は説明の便宜を図るために設定するものであり、本
発明の本質に影響を与えるものではないことも第1の実
施例と同様である。First, the control means 1 reads the reference image I 601 and the target image T 602 together with the attribute values such as the image size into the image memory 14 and the respective image masks Mi and Mt into the mask memory 34 via the communication means 20. (Step B0) The position parameter candidate group setting means 2 reads the position parameter candidate group from the outside into the position parameter candidate memory 13 via the communication means 20 (Step B1). The position parameter candidate group is a set of positions that the target image T602 can take in the reference image coordinate system 604, and is expressed by Expression 1 as in the first embodiment. Each element of the position parameter candidate group P In accordance with the position parameter number, the position parameter candidate selection means 3 selects them sequentially and without duplication. The position parameter numbers are set for convenience of description, and do not affect the essence of the present invention, as in the first embodiment.
【0102】制御手段1は、基準画像I601に対して
対象画像T602が最もうまく重なる位置パラメータを
決定するために、各位置パラメータ候補に対して類似測
度を計算するが、本実施例では、第1の実施例と同様の
類似測度、すなわち、位置パラメータ候補により生成さ
れる有効重複領域にて定義される残差を、その有効重複
領域の要素数で正規化した類似測度を利用する。この
時、位置パラメータ候補群Pのある位置パラメータ
(u,v)を対象画像T602に適用した場合に、基準
画像I601と対象画像T602とが重なり合う図11
の有効重複領域E605において、残差S(u,v)お
よび類似測度A(u,v)は、 S(u,v)=SUM{E,|I(p,q)−T(p−u,q−v)|} (式23−1) A(u,v)=S(u,v)÷NUM(E) (式23−2) と定義される。The control means 1 calculates a similarity measure for each position parameter candidate in order to determine a position parameter at which the target image T602 overlaps best with the reference image I601. A similarity measure similar to that of the embodiment, that is, a similarity measure obtained by normalizing the residual defined by the effective overlap region generated by the position parameter candidate by the number of elements of the effective overlap region is used. At this time, when a certain position parameter (u, v) of the position parameter candidate group P is applied to the target image T602, the reference image I601 and the target image T602 overlap.
, The residual S (u, v) and the similarity measure A (u, v) are: S (u, v) = SUM {E, | I (p, q) -T (pu) , Q−v) |} (Equation 23-1) A (u, v) = S (u, v) ÷ NUM (E) (Equation 23-2)
【0103】次に制御手段1は、第1の実施例と同様
に、最良類似測度メモリ18に含まれる各項目を初期化
する(ステップB2)。すなわち、それまでの最良の
(最小の)類似測度A0を、式3に従って初期化する。Next, as in the first embodiment, the control means 1 initializes each item included in the best similarity measure memory 18 (step B2). That is, the best (smallest) similarity measure A0 up to that point is initialized according to Equation 3.
【0104】図9におけるステップB3以降の処理は、
第1の実施例の方法を実施する例におけるステップA3
以降の処理と同様に、最良類似測度メモリ18内の、A
0よりも小さな、すなわち、基準画像I601と対象画
像T602の類似性がより高い類似測度が得られる度に
最良類似測度メモリ18内のデータを更新することで、
最良の類似測度とその類似測度を与える位置パラメータ
および重複領域中の要素数を常に保持する処理を行うも
のである。The processing after step B3 in FIG.
Step A3 in the example of implementing the method of the first embodiment
As in the subsequent processing, A in the best similarity measure memory 18
By updating the data in the best similarity measure memory 18 each time a similarity measure smaller than 0, that is, a higher similarity between the reference image I601 and the target image T602 is obtained,
The best similarity measure, a position parameter that gives the similarity measure, and the number of elements in the overlapping area are always held.
【0105】本実施例では、ステップB4において、位
置パラメータ候補(u,v)を対象画像T602に適用
した場合に得られる、基準画像I601と対象画像T6
02とが重なりあう重複領域D603を重複領域設定手
段4により求め、重複領域メモリ15に格納する。この
とき重複領域D603は、第1の実施例の方法を実施す
る例と同様に、式4で表現される矩形領域に含まれるす
べての位置である。この重複領域は、画像マスクの形状
に関係なく求められるものであり、第1の実施例の方法
を実施する例と同様に、重複領域要素数計算手段5によ
り、式7に従って、その要素数Rを系統的に求めること
が可能である(ステップB5)。以下では、この重複領
域D603の各要素には、第1の実施例の方法を実施す
る例と同様に、重複領域要素選択手段6により選択され
る順に1から重複なく整数で重複領域要素番号が付加さ
れているものとする。これは本発明の動作を説明するた
めに便宜上設定するものであり、本発明の本質には影響
を与えない。In this embodiment, the reference image I601 and the target image T6 obtained when the position parameter candidate (u, v) is applied to the target image T602 in step B4.
02 is obtained by the overlapping area setting means 4 and stored in the overlapping area memory 15. At this time, the overlapping area D603 is all positions included in the rectangular area expressed by Expression 4, as in the example of implementing the method of the first embodiment. This overlapping area is obtained irrespective of the shape of the image mask, and the number of elements R is calculated by the overlapping area element number calculating means 5 in accordance with Expression 7 in the same manner as in the example in which the method of the first embodiment is performed. Can be obtained systematically (step B5). In the following, each element of the overlapping area D603 has an overlapping area element number as an integer without a duplication from 1 in the order selected by the overlapping area element selecting means 6, as in the example of implementing the method of the first embodiment. It shall be added. This is set for convenience in describing the operation of the present invention, and does not affect the essence of the present invention.
【0106】重複領域に含まれる各要素は類似測度計算
の対象となる有効領域要素か、類似測度計算の対象とな
らない無効領域要素のいずれかに分類できる。有効領域
要素とは基準画像I601と対象画像T602の両方の
画素が有効画素である重複領域要素であり、いずれか一
方(または両方)の画素が無効画素の場合は無効領域要
素となる。すなわち、重複領域D603は有効領域要素
から構成される有効重複領域E605と、無効領域要素
から構成される無効重複領域F606の2つに分割でき
る。Each element included in the overlapping area can be classified into either an effective area element for which the similarity measure is to be calculated or an invalid area element which is not to be calculated for the similarity measure. The effective area element is an overlapping area element in which both pixels of the reference image I601 and the target image T602 are effective pixels. If one (or both) of the pixels is an invalid pixel, the element is an invalid area element. That is, the overlapping area D603 can be divided into two, an effective overlapping area E605 composed of valid area elements, and an invalid overlapping area F606 composed of invalid area elements.
【0107】式23−1および式23−2にあるよう
に、位置パラメータ候補(u,v)に対する類似測度は
有効重複領域E605において定義されており、第1の
実施例におけるのと同様に処理を高速化するための閾値
および類似測度そのものを設定するためには、有効重複
領域E605の要素数Re(=NUM(E))を求める
必要がある。しかしながら、画像マスクの形状が複雑な
場合は系統的に求めることができず、重複領域D603
のすべての要素について、画像マスクを参照して有効領
域要素であるか否かを調べることで有効領域要素数を求
める処理を必要とする。しかしながらこの処理は、重複
領域D603における残差を求める処理と同様の処理コ
ストが必要であり、本発明の第1の実施例における閾値
を利用した残差計算打ち切りによる計算量削減の効果が
損なわれてしまうという問題がある。そこで、本実施例
では、最初に有効重複領域E605に含まれる要素数を
計算することは行わず、重複領域D603内の各要素を
順番にかつ重複無く選択しながら部分残差を更新してい
く過程において、すでに処理の終了した重複領域要素に
含まれていた無効領域要素数を加味した閾値を随時設定
することで、この問題を解消する。As shown in Expressions 23-1 and 23-2, the similarity measure for the position parameter candidate (u, v) is defined in the effective overlapping area E605, and is processed in the same manner as in the first embodiment. In order to set the threshold value and the similarity measure itself for speeding up, it is necessary to obtain the number of elements Re (= NUM (E)) of the effective overlapping area E605. However, when the shape of the image mask is complicated, it cannot be obtained systematically, and the overlapping area D603
It is necessary to determine the number of effective area elements by checking whether or not all elements are effective area elements with reference to the image mask. However, this processing requires the same processing cost as the processing for obtaining the residual in the overlap region D603, and the effect of the reduction in the amount of calculation due to the termination of the residual calculation using the threshold in the first embodiment of the present invention is impaired. Problem. Therefore, in the present embodiment, the number of elements included in the effective overlapping area E605 is not calculated first, and the partial residual is updated while selecting each element in the overlapping area D603 in order and without duplication. In the process, this problem is solved by setting a threshold value in consideration of the number of invalid area elements included in the already processed overlapping area elements.
【0108】そのために、領域要素数メモリ35に格納
されている、それまでに見つけた無効領域要素の数F
(i)および有効領域要素の数E(i)を、 E(0)←0 (式24−1) F(0)←0 (式24−2) により初期化する(ステップB6)。また、第1の実施
例の方法を実施する例におけるステップA7と同様に、
有効重複領域E605に対する残差を求めるために利用
する、残差メモリ16に格納されている部分残差S
(i)を、 S(0)←0 (式25) により初期化する(ステップB7)。Therefore, the number F of invalid area elements found so far stored in the area element number memory 35
(I) and the number of effective area elements E (i) are initialized by E (0) ← 0 (Equation 24-1) F (0) ← 0 (Equation 24-2) (step B6). Further, similarly to step A7 in the example of implementing the method of the first embodiment,
The partial residual S stored in the residual memory 16 and used to determine the residual for the effective overlap area E605
(I) is initialized by S (0) ← 0 (Equation 25) (Step B7).
【0109】次に、重複領域D603に含まれる各重複
領域要素i(1≦i≦R)に対して以下の処理を適用す
る(ステップB8)。Next, the following processing is applied to each overlapping area element i (1 ≦ i ≦ R) included in the overlapping area D603 (step B8).
【0110】まず、領域要素判定手段33により、重複
領域要素iが有効領域要素であるか無効領域要素である
かを基準画像および対象画像の画像マスクを参照するこ
とで決定する(ステップB9)。すなわち、 Mi(p(i),q(i))=1 かつ Mt(p(i)−u,q(i)v )=1 (式26−1) であれば、重複領域要素iは有効領域要素であり、この
条件を満たさない場合、すなわち、 Mi(p(i),q(i))=0 または Mt(p(i)−u,q(i) −v)=0 (式26−2) であれば、重複領域要素iは無効領域要素である。ここ
で、第1の実施例の方法を実施する例の説明と同様に、 p(i):重複領域要素番号iの要素のX方向成分 q(i):重複領域要素番号iの要素のY方向成分 である。First, the area element determination means 33 determines whether the overlapping area element i is an effective area element or an invalid area element by referring to the reference image and the image mask of the target image (step B9). That is, if Mi (p (i), q (i)) = 1 and Mt (p (i) -u, q (i) v) = 1 (Equation 26-1), the overlapping area element i is valid. If the element is a region element and does not satisfy this condition, that is, Mi (p (i), q (i)) = 0 or Mt (p (i) -u, q (i) -v) = 0 (Equation 26) -2) If, the overlapping area element i is an invalid area element. Here, similarly to the description of the example of implementing the method of the first embodiment, p (i): the X-direction component of the element of the overlapping area element number i q (i): the Y of the element of the overlapping area element number i It is a directional component.
【0111】重複領域要素iが無効領域要素であった場
合は、部分残差S(i)の値を残差更新手段7により、 S(i)←S(i−1) (式27) に従って更新し(ステップB15)、同時に、領域要素
数更新手段32により、 E(i)←E(i−1) (式28−1) F(i)←F(i−1)+1 (式28−2) に従って有効領域要素数E(i)、無効領域要素数F
(i)を更新する(ステップB16)。If the overlapping area element i is an invalid area element, the value of the partial residual S (i) is updated by the residual updating means 7 according to S (i) ← S (i-1) (Equation 27). E (i) ← E (i−1) (Equation 28-1) F (i) ← F (i−1) +1 (Equation 28−) 2) The number of effective area elements E (i) and the number of invalid area elements F according to
(I) is updated (step B16).
【0112】重複領域要素iが無効領域要素ではない場
合、すなわち、有効領域要素であった場合は、第1の実
施例の方法を実施する例の説明と同様に、残差更新手段
7により、 S(i)=S(i−1)+|I(p(i),q(i))−T(p(i)−u ,q(i)−v)| (式29) に従って残差メモリ16内の残差S(i)を更新する
(ステップB10)。また、領域要素数更新手段32に
より、有効領域要素数E(i)、無効領域要素数F
(i)を、 E(i)←E(i−1)+1 (式30−1) F(i)←F(i−1) (式30−2) と更新する(ステップB11)。If the overlapping area element i is not an invalid area element, that is, if the overlapping area element i is an effective area element, the residual updating unit 7 executes the same processing as in the description of the example of implementing the method of the first embodiment. S (i) = S (i-1) + | I (p (i), q (i))-T (p (i) -u, q (i) -v) | The residual S (i) in the memory 16 is updated (step B10). Further, the number of effective area elements E (i) and the number of invalid area elements F
(I) is updated to E (i) ← E (i-1) +1 (Equation 30-1) F (i) ← F (i-1) (Equation 30-2) (Step B11).
【0113】図12は、本発明における第2の実施例に
おける閾値T(i)を説明するためのグラフであり、第
1の実施例の方法を説明するための図5と同様に、既に
求めた各位置パラメータ候補に対する類似測度の中でそ
れまでの最良の類似測度A0、A0を与えた位置パラメ
ータ候補、およびその位置パラメータ候補により得られ
る有効重複領域数R0に対する残差の関係を図示したも
のである。図12のグラフにおいて、原点と現在の最良
類似測度A0を表す最良類似測度点301とを結んだ直
線の傾きがA0に相当する。この直線上の点に対応する
要素数と残差を与える有効重複領域は、類似測度点30
1を与える位置パラメータ候補により得られる有効重複
領域と同じ類似測度を持つ。FIG. 12 is a graph for explaining the threshold value T (i) in the second embodiment of the present invention. As shown in FIG. 5 for explaining the method of the first embodiment, FIG. FIG. 7 illustrates the relationship between residual parameters and the number of effective overlapping regions R0 obtained by the best similarity measure A0, A0 among the similarity measures for the respective position parameter candidates. It is. In the graph of FIG. 12, the slope of a straight line connecting the origin and the best similarity measure point 301 representing the current best similarity measure A0 corresponds to A0. The number of elements corresponding to the point on this straight line and the effective overlapping area giving the residual are the similarity measure points 30
It has the same similarity measure as the effective overlapping area obtained by the position parameter candidate giving 1.
【0114】図12において、点701は、初期の閾値
に対応する点を示している。この時は、重複領域D60
3に含まれる全ての重複領域要素を有効領域要素とみな
した場合の閾値になる。しかしながら、重複領域D60
5には無効領域要素も含まれているため、この閾値は有
効領域要素E605に対する真の閾値A0×Reよりも
大きく、閾値を変更せずに有効重複領域E605に対す
る残差計算を続行した場合は、重複領域要素E605の
要素数Reがあらかじめわかっている場合には行う必要
のない残差更新処理が含まれる場合がある。In FIG. 12, a point 701 indicates a point corresponding to the initial threshold value. At this time, the overlapping area D60
3 is a threshold value when all of the overlapping area elements included in 3 are regarded as effective area elements. However, the overlapping area D60
5 includes an invalid area element, the threshold value is larger than the true threshold value A0 × Re for the valid area element E605, and when the residual calculation for the effective overlapping area E605 is continued without changing the threshold value, If the number of elements Re of the overlapping area element E605 is known in advance, a residual update process that is not necessary may be included.
【0115】残差計算の過程において無効領域要素を発
見することは、重複領域D603に含まれる無効領域要
素数、すなわち無効重複領域F606の要素数の下限が
増加することに相当することから、相対的に重複領域D
603に含まれる有効領域要素、すなわち有効重複領域
E605の要素数の上限が減少することになる。これ
は、閾値を小さくできることを意味しており、本発明に
おける第2の実施例では、重複領域要素iに対する閾値
T(i)を、 T(i)←A0×(R−F(i)) (式31−1) または T(i)=A0×(R−i+E(i)) (式31−2) により逐次求める(ステップB12)。Finding an invalid area element in the process of residual calculation is equivalent to increasing the lower limit of the number of invalid area elements included in the overlapping area D603, that is, the lower limit of the number of elements of the invalid overlapping area F606. Overlapping area D
The upper limit of the number of elements of the effective area included in the effective area 603, that is, the effective overlapping area E605 is reduced. This means that the threshold value can be reduced. In the second embodiment of the present invention, the threshold value T (i) for the overlapping area element i is calculated as follows: T (i) ← A0 × (R−F (i)) (Equation 31-1) or T (i) = A0 × (R−i + E (i)) (Equation 31-2) (Step B12).
【0116】ここで閾値T(i)と部分残差S(i)の
関係を考える。Here, the relationship between the threshold value T (i) and the partial residual S (i) will be considered.
【0117】本実施例では、ステップB9において領域
要素判定手段33により、重複領域要素iが有効領域要
素であるか無効領域要素であるかを判定し、重複領域要
素iが無効領域要素ではない(すなわち有効領域要素で
ある)場合のみ式29に基づいて部分残差が加算される
ように構成していることから、 S(1)≦S(2)≦…≦S(i)≦…≦S(R)=有効重複領域E605 における残差 (式32) となる。In this embodiment, in step B9, the area element determining means 33 determines whether the overlapping area element i is an effective area element or an invalid area element, and the overlapping area element i is not an invalid area element ( In other words, the partial residual is added based on Equation 29 only when the element is an effective area element), so that S (1) ≦ S (2) ≦ ... ≦ S (i) ≦ ... ≦ S (R) = residual in the effective overlap area E605 (Equation 32)
【0118】式28−2および式30−2より、無効領
域要素数F(i)はiに関して単調増加であり、また、
すべての重複領域要素に対して処理を適用した場合の無
効領域要素数F(R)はNUM(F)と一致し、各重複
領域要素は無効領域要素または有効領域要素のいずれか
に必ず分類されることから、 0=F(0)≦F(1)≦…≦F(i−1)≦F(i)≦F(i+1)≦… ≦F(R)=NUM(F)=R−Re (式33−1) 0=E(0)≦E(1)≦…≦E(i−1)≦E(i)≦E(i+1)≦… ≦E(R)=NUM(E)=Re (式33−2) i=F(i)+E(i) (式33−3) がそれぞれ成立する。式33−1に式31−1を適用す
ると、T(1)=A0×(R−F(1))=A0×R≧
T(2)=A0×(R−F(2))≧…≧T(i)=A
0×(R−F(i))≧…≧T(R)=A0×(R−F
(R))=A0×Re (式34−1) であり、有効重複領域E605に対する本来の閾値A0
×ReとT(i)の間に、 T(1)≧T(2)≧…≧T(i)≧…≧T(R)=A0×Re (式34 −2) が成立する。これは、式31により求めた閾値T(i)
が有効重複領域E605に対する本来の閾値に収束する
ことを示しており、図12においては、閾値に対応する
点が、初期の閾値に対応する点701から有効重複領域
E605に対する真の閾値に対応する点702に徐々に
移動することに対応する。From equations 28-2 and 30-2, the number of invalid area elements F (i) monotonically increases with respect to i.
The number of invalid area elements F (R) when processing is applied to all overlapping area elements matches NUM (F), and each overlapping area element is always classified as either an invalid area element or a valid area element. Therefore, 0 = F (0) ≤F (1) ≤ ... ≤F (i-1) ≤F (i) ≤F (i + 1) ≤ ... ≤F (R) = NUM (F) = R-Re (Equation 33-1) 0 = E (0) ≤E (1) ≤ ... ≤E (i-1) ≤E (i) ≤E (i + 1) ≤ ... ≤E (R) = NUM (E) = Re (Equation 33-2) i = F (i) + E (i) (Equation 33-3) holds. Applying Equation 31-1 to Equation 33-1 gives T (1) = A0 × (R−F (1)) = A0 × R ≧
T (2) = A0 × (R−F (2)) ≧ ... ≧ T (i) = A
0 × (R−F (i)) ≧ ... ≧ T (R) = A0 × (R−F
(R)) = A0 × Re (Equation 34-1), and the original threshold value A0 for the effective overlap area E605
T (1) ≧ T (2) ≧... ≧ T (i) ≧... ≧ T (R) = A0 × Re (Formula 34-2) holds between × Re and T (i). This is equivalent to the threshold value T (i) determined by equation 31.
Indicates that the threshold value converges to the original threshold value for the effective overlap area E605. In FIG. 12, the point corresponding to the threshold value corresponds to the true threshold value for the effective overlap area E605 from the point 701 corresponding to the initial threshold value. This corresponds to gradually moving to the point 702.
【0119】ここで、部分残差S(i)が閾値T(i)
を越えたとすると、S(i)が単調増加であることか
ら、 S(R)≧S(i)>T(i)≧A0×Re (式35) であり、各項をRe(>0)で割ると、 A(u,v)=S(R)÷Re≧S(i)÷Re>A0×(R−F(i)) ÷Re≧A0 (式36) が成立する。これは、部分残差S(i)が閾値T(i)
を越えた場合は、有効重複領域E605における類似測
度が最良類似測度A0よりも必ず大きくなることを示し
ており、第1の実施例における方法の例と同様に、重複
領域要素i+1以降に対して処理を継続しても最良類似
測度を更新する可能性がないことを示している。そこ
で、残差閾値比較手段9は、部分残差S(i)と閾値T
(i)を比較して重複領域D605に対する処理の継続
是非を判断する(ステップB13)。すなわち、 S(i)>T(i) (式37) が成立すれば、その位置パラメータ候補に対する処理を
中断し、次の位置パラメータ候補に対してステップB3
以降の類似測度計算の処理をあらためて適用する。式3
7が成立しない場合は、次の重複領域要素i+1に対し
てステップB8以降の処理を適用する。Here, the partial residual S (i) is equal to the threshold T (i).
, Since S (i) increases monotonically, S (R) ≧ S (i)> T (i) ≧ A0 × Re (Equation 35), and each term is expressed as Re (> 0). A (u, v) = S (R) ÷ Re ≧ S (i) ÷ Re> A0 × (R−F (i)) ÷ Re ≧ A0 (Equation 36) This is because the partial residual S (i) is equal to the threshold T (i)
In the case of exceeding, it indicates that the similarity measure in the effective overlap area E605 is always larger than the best similarity measure A0, and as in the example of the method in the first embodiment, the similarity measure is equal to or less than the overlap area element i + 1. This indicates that there is no possibility of updating the best similarity measure even if the processing is continued. Therefore, the residual threshold comparing means 9 calculates the partial residual S (i) and the threshold T
By comparing (i), it is determined whether to continue the processing for the overlapping area D605 (step B13). That is, if S (i)> T (i) (Equation 37) holds, the processing for the position parameter candidate is interrupted, and the process proceeds to step B3 for the next position parameter candidate.
The subsequent similarity measure calculation processing is applied again. Equation 3
If No. 7 is not satisfied, the processing after step B8 is applied to the next overlapping area element i + 1.
【0120】逆に、すべてのiについて式37が成立し
なかった場合、すなわち、 S(R)≦T(R) (式38) が成立した場合、式31から、 S(R)≦T(R)=A0×(R−F(R))=A0×(R−R+E(R) )=A0×Re (式39) が成立する。各項をRe(>0)で割ると、 A(u,v)=S(R)÷Re≦A0 (式40) であり、有効重複領域E605の類似測度は最良類似測
度A0を更新する。そこで、すべての重複領域要素に対
してステップB9以降の処理を適用した場合は、最良類
似測度更新手段11により、最良類似測度メモリ18に
格納されている各項目を更新する(ステップB13)。
すなわち、最良類似測度、最良類似測度を与えた位置パ
ラメータ候補、その位置パラメータ候補により得られる
重複領域の全要素数および無効領域要素数および有効領
域要素数を、 最良類似測度A0←S(R)÷(R−F(R))(式41−1) 位置パラメータ候補←(u,v) (式41−2) 重複領域要素数←R (式41−3) 無効重複領域要素数←F(R) (式41−4) 有効重複領域要素数←E(R) (式41−5) と更新する。Conversely, if Equation 37 does not hold for all i, ie, if S (R) ≦ T (R) (Equation 38) holds, then from Equation 31, S (R) ≦ T ( R) = A0 × (R−F (R)) = A0 × (RR−E (R)) = A0 × Re (Equation 39) When each term is divided by Re (> 0), A (u, v) = S (R) ÷ Re ≦ A0 (Equation 40), and the similarity measure of the effective overlapping area E605 updates the best similarity measure A0. Therefore, when the processing after step B9 is applied to all the overlapping area elements, the best similarity measure updating means 11 updates each item stored in the best similarity measure memory 18 (step B13).
That is, the best similarity measure, the position parameter candidate given the best similarity measure, the total number of elements of the overlapping area, the number of invalid area elements, and the number of effective area elements obtained from the position parameter candidate are represented by the best similarity measure A0 ← S (R) ÷ (R−F (R)) (Equation 41-1) Position parameter candidate ← (u, v) (Equation 41-2) Number of overlapping area elements ← R (Equation 41-3) Number of invalid overlapping area elements ← F ( R) (Equation 41-4) The number of effective overlapping area elements ← E (R) (Equation 41-5) is updated.
【0121】なお、上記の説明において、ステップB1
5では部分残差S(i)の値が、ステップB16におい
ては有効領域要素数E(i)の値が、ステップB11に
おいては無効領域要素数F(i)の値が、それぞれ式2
7、式28−1、式30−2により更新されるものとし
て説明したが、これは説明の便宜を図るためのものであ
り、本発明の適用をこれに限定するものではない。各更
新処理の前後で、それぞれの値は変化しないため、残差
メモリ16内の部分残差、領域要素数メモリ35内の有
効領域要素数および無効領域要素数が、それぞれ一つの
レジスタにより表現されている場合はこれらの更新処理
は必要としない。また有効領域要素数と無効領域要素数
の間には常に式33−3の関係が存在するため、有効領
域要素数または無効領域要素数のいずれか一方のみを記
録/更新するように構成することも可能である。In the above description, step B1
5, the value of the partial residual S (i), the value of the number of effective area elements E (i) in Step B16, and the value of the number of invalid area elements F (i) in Step B11 are expressed by Equation 2
7, but have been described as being updated by Expression 28-1 and Expression 30-2, but this is for convenience of description, and the application of the present invention is not limited to this. Since the respective values do not change before and after each update process, the partial residual in the residual memory 16 and the number of effective area elements and the number of invalid area elements in the area element number memory 35 are each represented by one register. If they do, these update processes are not required. Also, since there is always the relationship of Expression 33-3 between the number of valid area elements and the number of invalid area elements, it is necessary to record / update only one of the number of valid area elements and the number of invalid area elements. Is also possible.
【0122】本発明の第2の実施例においても、第1の
実施例と同様の拡張が可能である。In the second embodiment of the present invention, the same extension as in the first embodiment is possible.
【0123】すなわち、第2の実施例の説明において
は、位置パラメータ候補として平行移動を与えるものだ
けを対象としたが、回転をはじめとするより複雑な位置
パラメータに対しても利用可能である。また、図7に示
すように、基準画像と対象画像との重なり部分に存在す
る全画素のうち或る規則にしたがって選択した一部の画
素を重複領域要素とし、これら重複領域要素で重複領域
Dを構成することも可能である。さらには、上記の説明
では通信手段20を通じて外部から位置パラメータ候補
群を読み込んだが、画像メモリ14内の画像データを参
照して位置パラメータ候補群を設定するようにしても良
い。さらには、対象画像が基準画像と重なりを持つ全て
の場合から構成される位置パラメータ候補群を示した
が、各画像を取得するためのカメラの位置の情報や画像
間の相対関係を示す情報が画像に付加されているような
場合、その情報を利用することで、位置パラメータ候補
群をより限定した領域に設定することもできる。That is, in the description of the second embodiment, only the position parameter candidate that gives a parallel movement is used, but the present invention can be used for more complicated position parameters such as rotation. As shown in FIG. 7, some pixels selected according to a certain rule among all pixels existing in the overlapping portion between the reference image and the target image are set as overlapping region elements, and the overlapping region D is determined by these overlapping region elements. Can also be configured. Further, in the above description, the position parameter candidate group is read from the outside through the communication means 20, but the position parameter candidate group may be set with reference to the image data in the image memory 14. Furthermore, although the position parameter candidate group composed of all cases where the target image overlaps the reference image is shown, information on the position of the camera for acquiring each image and information indicating the relative relationship between the images are not shown. In the case where the position parameter candidate is added to an image, the position parameter candidate group can be set to a more limited area by using the information.
【0124】本発明が対象とする画像の位置合わせは画
像処理の基本的な処理の一つであるため、各種の画像処
理分野に適用できる。本出願人は先の特許出願(特願平
08−26350号)において、撮像装置により撮像し
た対象の部分画像を撮像装置の移動によって複数取得
し、これら部分画像群から画像合成処理により合成画像
を生成する画像入力装置を提案したが、本発明はこのよ
うな装置における画像合成処理時における画像の位置合
わせに対しても勿論適用可能である。[0124] Positioning of an image targeted by the present invention is one of the basic processes of image processing, and therefore can be applied to various image processing fields. In the prior patent application (Japanese Patent Application No. 08-26350), the present applicant acquires a plurality of target partial images captured by an imaging device by moving the imaging device, and synthesizes a composite image from the partial image group by image synthesis processing. Although an image input device for generating images has been proposed, the present invention is of course applicable to image alignment in image synthesis processing in such an apparatus.
【0125】[0125]
【発明の効果】以上説明したように本発明によれば以下
のような効果を得ることができる。As described above, according to the present invention, the following effects can be obtained.
【0126】第1の効果は、位置合わせ処理の結果が基
準画像と対象画像との重なり部分の大きさ、形状の変化
の影響を受けず、基準画像に対して対象画像を最もうま
く重ね合わせることができる位置を正確に求めることが
できることである。これは、基準画像と対象画像との重
複領域における残差そのものを指標とするのではなく、
その残差を重複領域の要素数で正規化した類似測度を指
標として基準画像と対象画像との位置合わせのよさを評
価しているためである。The first effect is that the target image is superimposed best on the reference image without being affected by changes in the size and shape of the overlapping portion between the reference image and the target image. That is, it is possible to accurately determine the position at which it can be performed. This does not use the residual itself in the overlapping area between the reference image and the target image as an index,
This is because the goodness of alignment between the reference image and the target image is evaluated using the similarity measure obtained by normalizing the residual by the number of elements of the overlapping area as an index.
【0127】第2の効果は、高速な位置合わせが可能な
ことである。これは、対象画像の基準画像に対する各重
なり位置における類似測度を求める過程において、計算
途中の残差が、それまでの最良類似測度と重複領域の要
素数とから設定した閾値を超過し、最良類似測度を更新
する見込みがなくなった時点で、今回の残差の計算を打
ち切るようにして計算量を削減しているためである。The second effect is that high-speed positioning can be performed. This is because, in the process of calculating the similarity measure at each overlapping position of the target image with respect to the reference image, the residual in the middle of the calculation exceeds the threshold set from the best similarity measure up to then and the number of elements in the overlapping area, This is because, when there is no longer any possibility of updating the measure, the calculation of the residual is cut off to reduce the amount of calculation.
【0128】第3の効果は、画像マスクを利用した複雑
な形状を持つ画像間の位置合わせ処理においても、基準
画像と対象画像との重なり部分の大きさ、形状の変化の
影響を受けず、基準画像に対して対象画像を最もうまく
重ね合わせることができる位置を正確に求めることがで
きることである。これは、基準画像と対象画像との重複
領域における残差そのものを指標とするのではなく、そ
の残差を重複領域の要素数で正規化した類似測度を指標
として基準画像と対象画像との位置合わせのよさを評価
しているためである。The third effect is that, even in the alignment process between images having a complex shape using an image mask, the size and shape of the overlapping portion between the reference image and the target image are not affected by the change. That is, a position where the target image can be superimposed best on the reference image can be accurately obtained. This is not to use the residual itself in the overlapping area between the reference image and the target image as an index, but to use the similarity measure obtained by normalizing the residual by the number of elements of the overlapping area as an index to determine the position between the reference image and the target image. This is because they are evaluating the suitability.
【0129】第4の効果は、画像マスクを利用した複雑
な形状を持つ画像間の位置合わせ処理においても高速な
位置合わせが可能なことである。これは、対象画像の基
準画像に対する各重なり位置における類似測度を求める
過程において、計算途中の残差を、それまでの最良類似
測度と重複領域の要素数とそれまでに発見した類似測度
計算の対象となる有効領域要素の数(または類似測度計
算の対象とならない無効領域要素の数)とから設定した
閾値と比較し、閾値を超過した時には最良類似測度を更
新する見込みがなくなったと判断し、残差の計算を打ち
切るようにして計算量を削減しているためである。A fourth effect is that high-speed positioning can be performed even in a positioning process between images having a complicated shape using an image mask. This is because, in the process of calculating the similarity measure at each overlapping position of the target image with respect to the reference image, the residual in the middle of the calculation is the best similarity measure up to that point, the number of elements in the overlapping area, and the similarity measure target found so far. From the number of effective area elements (or the number of invalid area elements that are not subject to similarity measure calculation), and when the threshold value is exceeded, it is determined that the best similarity measure is no longer likely to be updated. This is because the amount of calculation is reduced by terminating the calculation of the difference.
【図1】本発明の方法を実施する位置合わせ処理装置の
構成の一例を示すブロック図である。FIG. 1 is a block diagram illustrating an example of a configuration of a positioning processing apparatus that performs a method of the present invention.
【図2】本発明の方法を実施する位置合わせ処理装置の
処理の一例を示すフローチャートである。FIG. 2 is a flowchart illustrating an example of a process performed by a registration processing apparatus that implements the method of the present invention.
【図3】基準画像と対象画像との説明図である。FIG. 3 is an explanatory diagram of a reference image and a target image.
【図4】基準画像と対象画像との重複領域における残差
計算の特徴を説明するためのグラフの例を示す図であ
る。FIG. 4 is a diagram illustrating an example of a graph for explaining a feature of residual calculation in an overlapping region between a reference image and a target image.
【図5】本発明における閾値を説明するためのグラフの
一例を示す図である。FIG. 5 is a diagram illustrating an example of a graph for explaining a threshold according to the present invention.
【図6】画像メモリ内の画像データを参照して位置パラ
メータ候補群を設定する方法の説明図である。FIG. 6 is an explanatory diagram of a method of setting a position parameter candidate group with reference to image data in an image memory.
【図7】基準画像と対象画像との重なり部分に存在する
画素のうちの一部の画素を重複領域要素として選択する
例の説明図である。FIG. 7 is an explanatory diagram of an example in which some of the pixels existing in an overlapping portion between a reference image and a target image are selected as overlapping region elements.
【図8】本発明の方法を実施する位置合わせ処理装置の
構成の一例を示すブロック図である。FIG. 8 is a block diagram illustrating an example of a configuration of a positioning processing apparatus that performs the method of the present invention.
【図9】本発明の方法を実施する位置合わせ処理装置の
処理の一例を示すフローチャートである。FIG. 9 is a flowchart illustrating an example of a process performed by a registration processing apparatus that implements the method of the present invention.
【図10】画像マスクを説明するための説明図である。FIG. 10 is an explanatory diagram for explaining an image mask.
【図11】本発明の第2の実施例における基準画像と対
象画像との説明図である。FIG. 11 is an explanatory diagram of a reference image and a target image according to a second embodiment of the present invention.
【図12】本発明の第2の実施例における閾値を説明す
るためのグラフの一例を示す図である。FIG. 12 is a diagram illustrating an example of a graph for explaining a threshold value according to the second embodiment of the present invention.
【図13】従来技術の問題点の説明図である。FIG. 13 is an explanatory diagram of a problem of the related art.
1 制御手段 2 位置パラメータ候補群設定手段 3 位置パラメータ候補選択手段 4 重複領域設定手段 5 重複領域要素数計算手段 6 重複領域要素選択手段 7 残差更新手段 8 残差初期化手段 9 残差閾値比較手段 10 閾値設定手段 11 最良類似測度更新手段 12 最良類似測度初期化手段 13 位置パラメータ候補メモリ 14 画像メモリ 15 重複領域メモリ 16 残差メモリ 17 閾値メモリ 18 最良類似測度メモリ 20 通信手段 31 領域要素数初期化手段 32 領域要素数更新手段 33 領域要素数判定手段 34 マスクメモリ 35 領域要素数メモリ 100 位置合わせ処理装置 101 基準画像I 102 対象画像T 103 重複領域D 104 基準画像座標系 200 位置合わせ処理装置 301 現在の最良類似測度を与える点 401 基準画像 402 対象画像 403 位置パラメータ候補群 501 重複領域要素 600 画像マスク 601 基準画像I 602 対象画像T 603 重複領域D 604 基準画像座標系 605 有効重複領域E 606 無効重複領域F 701 初期閾値点 702 最適閾値点 REFERENCE SIGNS LIST 1 control means 2 position parameter candidate group setting means 3 position parameter candidate selecting means 4 overlapping area setting means 5 overlapping area element number calculating means 6 overlapping area element selecting means 7 residual updating means 8 residual initializing means 9 residual threshold comparing Means 10 Threshold setting means 11 Best similarity measure updating means 12 Best similarity measure initializing means 13 Position parameter candidate memory 14 Image memory 15 Overlapping area memory 16 Residual memory 17 Threshold memory 18 Best similarity measure memory 20 Communication means 31 Initial number of area elements Converting means 32 area element number updating means 33 area element number determining means 34 mask memory 35 area element number memory 100 positioning processing apparatus 101 reference image I 102 target image T 103 overlapping area D 104 reference image coordinate system 200 positioning processing apparatus 301 Point that gives the current best similarity measure 4 1 Reference Image 402 Target Image 403 Position Parameter Candidate Group 501 Overlapping Area Element 600 Image Mask 601 Reference Image I 602 Target Image T 603 Overlapping Area D 604 Reference Image Coordinate System 605 Effective Overlapping Area E 606 Invalid Overlapping Area F 701 Initial Threshold Point 702 Optimal threshold point
フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06T 7/00 Continuation of front page (58) Field surveyed (Int.Cl. 6 , DB name) G06T 7/00
Claims (8)
なる画像を最もうまく重ね合わせることができる位置を
求める画像の位置合わせ方法であって、基準画像と対象
画像との位置合わせのよさの指標として、基準画像と対
象画像との重複領域における残差をその重複領域に含ま
れる要素数により正規化した類似測度を用い、対象画像
の基準画像に対する各重なり位置の候補における類似測
度のうち、最良の類似測度が得られた重なり位置の候補
を基準画像に対するその対象画像の位置合わせ位置とす
る方法において、 対象画像の基準画像に対する各重なり位置の候補におけ
る類似測度を求める際、今回の重なり位置の候補による
両画像の重複領域の要素数と今までの最良類似測度とか
ら今回の類似測度算出で使用する計算打切り用の閾値を
設定するステップと、 今回の重なり位置の候補による両画像の重複領域におけ
る残差を計算する過程において、計算途中の残差が前記
閾値を超過した場合には残りの残差計算を取り止めて次
の重なり位置の候補における類似測度の算出に進み、前
記閾値を超過することなく残差計算が終了した場合には
得られた残差をその重複領域に含まれる要素数により正
規化した類似測度で最良類似測度を更新するステップと
を含むことを特徴とする画像の位置合わせ方法。An image positioning method for determining a position where an image to be aligned can be superimposed best on a reference image, the method comprising: As an index, using a similarity measure obtained by normalizing the residual in the overlapping area between the reference image and the target image by the number of elements included in the overlapping area, among the similarity measures in the candidates for each overlapping position of the target image with respect to the reference image, In a method in which the candidate of the overlapping position where the best similarity measure is obtained is used as the alignment position of the target image with respect to the reference image, when the similarity measure of each candidate of the overlapping position of the target image with respect to the reference image is obtained, the current overlapping position From the number of elements in the overlapping region of both images by the candidate and the best similarity measure so far, the threshold for calculation discontinuation used in this similarity measure calculation is In the step of setting, and in the process of calculating the residual in the overlap region of both images due to the candidate of the current overlap position, if the residual in the middle of calculation exceeds the threshold, the remaining residual calculation is stopped and the next Proceed to the calculation of the similarity measure for the candidate of the overlapping position, and when the residual calculation is completed without exceeding the threshold, the obtained residual is best calculated by the similarity measure normalized by the number of elements included in the overlapping area. Updating the similarity measure.
とを乗じた値を前記閾値とすることを特徴とする請求項
1記載の画像の位置合わせ方法。2. The method according to claim 1, wherein a value obtained by multiplying the number of elements of the overlapping area by the best similarity measure so far is used as the threshold.
り位置の候補を外部の機器から読み込むようにしたこと
を特徴とする請求項2記載の画像の位置合わせ方法。3. The method according to claim 2, wherein a candidate for an overlapping position of the target image with respect to the reference image is read from an external device.
り位置を基準画像と対象画像とに基づいて自動的に設定
することを特徴とする請求項2記載の画像の位置合わせ
方法。4. The method according to claim 2, wherein an overlapping position of the target image with respect to the reference image is automatically set based on the reference image and the target image.
なる画像に対して位置合わせ対象となる画像を最もうま
く重ね合わせることができる位置を求める画像の位置合
わせ方法であって、基準画像と対象画像との位置合わせ
のよさの指標として、基準画像と対象画像との重複領域
における残差をその重複領域に含まれる要素数により正
規化した類似測度を用い、対象画像の基準画像に対する
各重なり位置の候補における類似測度のうち、最良の類
似測度が得られた重なり位置の候補を基準画像に対する
その対象画像の位置合わせ位置とする方法において、 今回の重なり位置の候補による前記基準画像と前記対象
画像の両画像の重複領域における残差を計算するステッ
プが、 対象画像の基準画像に対する各重なり位置の候補におけ
る類似測度を求める際、今回の重なり位置の候補による
両画像の重複領域の要素数と、今までの最良類似測度
と、それまでに確認した類似測度計算の対象となる有効
領域要素数または類似測度計算の対象とならない無効領
域要素数とから今回の類似測度算出で使用する計算打切
り用の閾値を設定するステップと、 計算途中の残差が前記閾値を超過した場合には残りの残
差計算を取り止めて次の重なり位置の候補における類似
測度の算出に進み、前記閾値を超過することなく残差計
算が終了した場合には得られた残差をその重複領域に含
まれる要素数により正規化した類似測度で最良類似測度
を更新するステップとを含むことを特徴とする画像の位
置合わせ方法。5. An image alignment method for obtaining a position at which an image to be aligned with a reference image can be superimposed best on an image as a reference by image processing using an image mask, the method comprising: As an index of good alignment with the target image, a similarity measure obtained by normalizing a residual in an overlap region between the reference image and the target image by the number of elements included in the overlap region is used, and each overlap of the target image with the reference image is used. A method of determining, from among the similarity measures of the position candidates, the candidate of the overlapping position at which the best similarity measure is obtained as the alignment position of the target image with respect to the reference image, comprising: Calculating the residual in the overlapping region of both images of the image, the similarity measure in each candidate of the overlapping position of the target image with respect to the reference image; When calculating, the number of elements in the overlapping area of both images due to the candidate for the current overlap position, the best similarity measure so far, and the number of effective area elements or similarity measure targets to be calculated for the similarity measure confirmed so far Setting a threshold for calculation termination to be used in this similarity measure calculation from the number of invalid area elements that do not result in the calculation. If the residual in the middle of the calculation exceeds the threshold, the remaining residual calculation is stopped and the next Proceed to the calculation of the similarity measure in the candidate of the overlapping position, and when the residual calculation is completed without exceeding the threshold, the obtained residual is calculated by the similarity measure normalized by the number of elements included in the overlapping area. Updating the best similarity measure.
数からそれまでに処理を適用した無効領域要素数を減じ
た値とを乗じた値を前記閾値とすることを特徴とする請
求項5記載の画像の位置合わせ方法。6. The threshold value is a value obtained by multiplying the best similarity measure up to now and a value obtained by subtracting the number of invalid area elements to which processing has been applied up to the number of elements of the overlapping area. Item 5. The method for aligning images according to Item 5.
り位置の候補を外部の機器から読み込むようにしたこと
を特徴とする請求項6記載の画像の位置合わせ方法。7. The method according to claim 6, wherein a candidate for an overlapping position of the target image with respect to the reference image is read from an external device.
り位置を基準画像と対象画像とに基づいて自動的に設定
することを特徴とする請求項6記載の画像の位置合わせ
方法。8. The method according to claim 6, wherein an overlapping position of the target image with respect to the reference image is automatically set based on the reference image and the target image.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP5606097A JP2962266B2 (en) | 1996-05-31 | 1997-03-11 | Image alignment method |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP16118796 | 1996-05-31 | ||
| JP8-161187 | 1996-05-31 | ||
| JP5606097A JP2962266B2 (en) | 1996-05-31 | 1997-03-11 | Image alignment method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH1049681A JPH1049681A (en) | 1998-02-20 |
| JP2962266B2 true JP2962266B2 (en) | 1999-10-12 |
Family
ID=26396979
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP5606097A Expired - Fee Related JP2962266B2 (en) | 1996-05-31 | 1997-03-11 | Image alignment method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2962266B2 (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3109469B2 (en) | 1998-02-20 | 2000-11-13 | 日本電気株式会社 | Image input device |
| US6625332B1 (en) | 1999-10-05 | 2003-09-23 | Nec Corporation | Computer-implemented image registration |
| JP3969984B2 (en) * | 2001-09-25 | 2007-09-05 | ダイハツ工業株式会社 | Recognition method for moving objects |
| KR100981147B1 (en) * | 2009-11-16 | 2010-09-10 | 재단법인대구경북과학기술원 | Method and apparatus of measuring image similarity using high-speed processing |
| US8279500B2 (en) * | 2011-01-27 | 2012-10-02 | Seiko Epson Corporation | System and method for integrated pair-wise registration of images using image based information and sensor coordinate and error information |
| JP6767811B2 (en) * | 2016-08-31 | 2020-10-14 | キヤノン株式会社 | Position detection method, position detection device, lithography device and article manufacturing method |
-
1997
- 1997-03-11 JP JP5606097A patent/JP2962266B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH1049681A (en) | 1998-02-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108520247B (en) | Method, device, terminal and readable medium for identifying object nodes in images | |
| RU2424561C2 (en) | Training convolutional neural network on graphics processing units | |
| US6438507B1 (en) | Data processing method and processing device | |
| US7352919B2 (en) | Method and system of generating a high-resolution image from a set of low-resolution images | |
| US6820137B2 (en) | Computer-readable recording medium storing resolution converting program, resolution converting device and resolution converting method | |
| CN113838138B (en) | A system calibration method, system, device and medium for optimizing feature extraction | |
| CN113344986A (en) | Point cloud registration result evaluation method, device, equipment and storage medium | |
| CN112330671B (en) | Method, device, computer equipment and storage medium for analyzing cell distribution state | |
| KR20220093492A (en) | System and method for establishing structural exterior map using image stitching | |
| CN115115606B (en) | Image coordinate matching method, terminal and computer readable storage medium | |
| JP2962266B2 (en) | Image alignment method | |
| JP2021135977A (en) | Information processing equipment and methods | |
| CN114677588A (en) | Method, device, robot and storage medium for obstacle detection | |
| CN117291957B (en) | Cross-modal optical-SAR image registration method, device, equipment and medium | |
| US6681057B1 (en) | Image registration system and method implementing PID control techniques | |
| CN113393498B (en) | Image registration method, device, computer equipment and storage medium | |
| CN119399297B (en) | Lens distortion correction coefficient calibration method, system, device and distortion correction method | |
| US20200202140A1 (en) | Method and device for evaluating images, operating assistance method, and operating device | |
| JP6355206B2 (en) | Camera calibration method, camera calibration device, and camera calibration program | |
| JPH1186003A (en) | Alignment device and computer-readable recording medium storing alignment program | |
| CN115222631B (en) | Distorted image correction method, device and equipment and readable storage medium | |
| JP5928465B2 (en) | Degradation restoration system, degradation restoration method and program | |
| CN114332447B (en) | License plate correction method, license plate correction device and computer readable storage medium | |
| CN115134521A (en) | Anti-jitter method, device and equipment for video shooting and storage medium | |
| JP2007034964A (en) | Camera viewpoint movement and three-dimensional information restoration and lens distortion parameter estimation method, apparatus, camera viewpoint movement and three-dimensional information restoration and lens distortion parameter estimation program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 19990706 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20070806 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080806 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080806 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090806 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090806 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100806 Year of fee payment: 11 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110806 Year of fee payment: 12 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110806 Year of fee payment: 12 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120806 Year of fee payment: 13 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130806 Year of fee payment: 14 |
|
| LAPS | Cancellation because of no payment of annual fees |