JP3828048B2 - Image encoding method and apparatus, and image decoding method and apparatus - Google Patents

Image encoding method and apparatus, and image decoding method and apparatus Download PDF

Info

Publication number
JP3828048B2
JP3828048B2 JP2002172963A JP2002172963A JP3828048B2 JP 3828048 B2 JP3828048 B2 JP 3828048B2 JP 2002172963 A JP2002172963 A JP 2002172963A JP 2002172963 A JP2002172963 A JP 2002172963A JP 3828048 B2 JP3828048 B2 JP 3828048B2
Authority
JP
Japan
Prior art keywords
layer
image
key frame
generation unit
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002172963A
Other languages
Japanese (ja)
Other versions
JP2004023271A (en
Inventor
仰三 秋吉
信雄 秋吉
Original Assignee
株式会社モノリス
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社モノリス filed Critical 株式会社モノリス
Priority to JP2002172963A priority Critical patent/JP3828048B2/en
Publication of JP2004023271A publication Critical patent/JP2004023271A/en
Application granted granted Critical
Publication of JP3828048B2 publication Critical patent/JP3828048B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、画像符号化および復号技術に関し、とくにキーフレームとそれらの間の対応点情報を利用する技術に関する。
【0002】
【従来の技術】
動画圧縮の事実上の世界標準であるMPEG(Motion Picture Expert Group)は、CDなどストレージメディアからネットワークや放送などの伝送メディアへとそのターゲットエリアが広がった。放送のデジタル化はMPEGを中心とする圧縮符号化技術なしに考えることはできない。放送と通信の垣根が崩れ、サービス事業の多様化は必須になり、ブロードバンド時代にデジタル文化がいかなる進展を遂げるか、予測がつきにくい状況にある。
【0003】
【発明が解決しようとする課題】
そうした混沌の中でも、動画の圧縮技術に関する方向性について確かなことがある。すなわち、より高い圧縮率と画質の両立である。MPEGは周知のごとく高圧縮化をブロック歪みが阻むことがある。
【0004】
本発明はそうした状況に鑑みてなされたものであり、その目的は画像データを高い効率で圧縮しながら、同時に画像の歪みや色のあいまいさを排除した良質な画質を実現する符号化技術および復号技術の提供にある。
【0005】
【課題を解決するための手段】
以下、本発明の画像符号化技術および画像復号技術は、主に動画について説明するが、モーフィング、ウォークスルーなどの映像効果など、用途は動画に限られない。
【0006】
本発明のある態様は、画像符号化方法に関する。この方法は、複数のキーフレームの画像をそれぞれレイヤーに分割するステップと、隣接するキーフレームのデータに対してレイヤーごとにマッチング処理を行い、キーフレーム間の対応情報をレイヤーごとに生成するステップとを含む。
【0007】
ここで「キーフレーム」とはマッチングその他の処理を行う対象となるフレームのことであり、「フレーム」は画像の単位ではあるが、以下特に必要がない限り、これと「画像」を区別しない。
【0008】
この方法は、キーフレームデータとレイヤーごとの対応情報とレイヤーどうしの相対位置情報とからなるデータストリームを生成するステップをさらに含んでもよい。
【0009】
また前記対応情報を生成するステップは、ふたつのレイヤーからそれぞれ特異点を抽出することによってそれらを多重解像度化するステップと、同一解像度レベル間においてそれらのレイヤー間のマッチングを例えば画素単位で計算するステップと、その結果を異なる解像度レベルにおけるマッチング計算に継承しながら最終的に最も解像度の細かいレベルにおける画素単位の対応関係を取得するステップとを含んでもよい。
【0010】
本発明の別の態様は、画像復号方法に関する。この方法は、キーフレームデータとキーフレームのレイヤーごとの対応情報ファイルとレイヤーどうしの相対位置情報とを含むデータストリームを取得するステップと、キーフレームの各レイヤーと前記対応情報ファイルから、隣接するキーフレーム間の中間画像をレイヤーごとに生成するステップと、前記レイヤーごとに生成された中間画像を合成するステップとを含む。
【0011】
本発明のさらに別の態様は、画像符号化装置に関する。この装置は、複数のキーフレームの画像をそれぞれレイヤーに分割するレイヤー生成部と、隣接するキーフレームのデータに対してレイヤーごとにマッチング処理を行い、キーフレーム間の対応情報をレイヤーごとに生成するレイヤー別対応情報生成部とを含む。
【0012】
この装置は、キーフレームデータとレイヤーごとの対応情報とレイヤーどうしの相対位置情報とからなるデータストリームを生成するデータストリーム生成部をさらに含んでもよい。
【0013】
画像をレイヤーに分割するには、例えば以下の方法が挙げられる。
【0014】
1.複数のキーフレームのエッジ検出結果とオクルージョンの有無を判定した結果をもとに、オブジェクトどうしの相対位置情報を取得し、この情報をもとにオブジェクトと対応づけて画像を分割する。
2.画像に付随するレイヤー情報を検出し、これに基づいて画像を分割する。
【0015】
前記レイヤー生成部はまた、全てのキーフレームが同一の階層構造のレイヤーとなるよう調整する機能を含んでもよい。ここで階層構造とはレイヤーの数と前記レイヤーどうしの相対位置情報に基づく構造のことであり、相対位置情報には画像の奥行きに対する相対位置の他、同一平面上の上下左右の位置関係も含まれる。
【0016】
また、前記レイヤー別対応情報生成部は、隣接する第1、第2のキーフレームに対して、例えば次のような規則に従いマッチング処理を行う。
【0017】
1.第1のキーフレームの最も後方にあるレイヤーから前方のレイヤーへと順次マッチング計算を行う。
2.第1のキーフレームのレイヤーと、そのレイヤーより後方にある第2のキーフレームのレイヤーとのマッチング計算を禁止する。
3.第1のキーフレームのレイヤーと、そのレイヤーと同じ位置にあるか、より前方にある第2のキーフレームのレイヤーとのマッチング計算を行い、前記第2のキーフレームのレイヤーの画像領域内に第1のキーフレームのレイヤー画像の対応点を見出したときは、その対応点を前記第1のキーフレームのレイヤーと同じ位置のレイヤーへの対応点として記憶する。
4.第1のキーフレームにおける最前のレイヤーのマッチング計算が終了しても、第1のキーフレームからの対応点が見出せなかった第2のキーフレーム内の画素は、第1のキーフレーム以外のキーフレームとのマッチング計算を行うことによって得られた対応情報をもとに、第1のキーフレームの当該レイヤー上に対応点を決定する。
【0018】
本発明のさらに別の態様は、画像復号装置に関する。この装置は、キーフレームデータとキーフレームのレイヤーごとの対応情報ファイルとレイヤーどうしの相対位置情報とを含むデータストリームを入力する入力部と、キーフレームの各レイヤーと前記対応情報ファイルから、隣接するキーフレーム間の中間画像をレイヤーごとに生成するレイヤー別中間画像生成部と、前記レイヤーごとに生成された中間画像を合成する中間画像合成部とを含む。
【0019】
この装置は、入力されたデータストリームに組み込まれたキーフレームデータが、同じくデータストリームに組み込まれた対応情報ファイルのレイヤーと同一の階層構造となるように調整するレイヤー生成部を含んでもよい。
【0020】
また前記中間画像合成部は、同じ画素に複数のレイヤーの画素が重なったとき、レイヤーの相対位置情報をもとに、より前方にあるレイヤーの画素を優先的に選択するなど、所定の規則に基づきレイヤーを合成することにより、隣接するキーフレーム間の中間画像を生成する。
【0021】
以上の態様のうち、キーフレーム間の対応点情報を生成する部分、およびそれを利用して中間画像を生成する部分は、本出願人が先に特許第2927350号にて提案した技術(以下「前提技術」という)を利用することができる。
【0022】
以上の各構成、工程を任意に入れ替えたり、方法と装置の間で表現を一部または全部入れ替え、または追加したり、表現をコンピュータプログラム、記録媒体等に変更したものもまた、本発明として有効である。
【0023】
【発明の実施の形態】
はじめに、実施の形態で利用する多重解像度特異点フィルタ技術とそれを用いた画像マッチング処理を「前提技術」として詳述する。これらの技術は本出願人がすでに特許第2927350号を得ている技術であり、本発明との組合せに最適である。ただし、実施の形態で採用可能な画像マッチング技術はこれに限られない。図19以降、前提技術を利用した画像データ符号化および復号技術を具体的に説明する。
【0024】
[前提技術の実施の形態]
最初に[1]で前提技術の要素技術を詳述し、[2]で処理手順を具体的に説明する。さらに[3]で前提技術に基づき改良を施した点について述べる。
【0025】
[1]要素技術の詳細
[1.1]イントロダクション
特異点フィルタと呼ばれる新たな多重解像度フィルタを導入し、画像間のマッチングを正確に計算する。オブジェクトに関する予備知識は一切不要である。画像間のマッチングの計算は、解像度の階層を進む間、各解像度において計算される。その際、粗いレベルから精細なレベルへと順に解像度の階層を辿っていく。計算に必要なパラメータは、人間の視覚システムに似た動的計算によって完全に自動設定される。画像間の対応点を人手で特定する必要はない。
【0026】
本前提技術は、例えば完全に自動的なモーフィング、物体認識、立体写真測量、ボリュームレンダリング、少ないフレームからの滑らかな動画像の生成などに応用できる。モーフィングに用いる場合、与えられた画像を自動的に変形することができる。ボリュームレンダリングに用いる場合、断面間の中間的な画像を正確に再構築することができる。断面間の距離が遠く、断面の形状が大きく変化する場合でも同様である。
【0027】
[1.2]特異点フィルタの階層
前提技術に係る多重解像度特異点フィルタは、画像の解像度を落としながら、しかも画像に含まれる各特異点の輝度及び位置を保存することができる。ここで画像の幅をN、高さをMとする。以下簡単のため、N=M=2(nは自然数)と仮定する。また、区間[0,N]⊂RをIと記述する。(i,j)における画像の画素をp(i,j)と記述する(i,j∈I)。
【0028】
ここで多重解像度の階層を導入する。階層化された画像群は多重解像度フィルタで生成される。多重解像度フィルタは、もとの画像に対して二次元的な探索を行って特異点を検出し、検出された特異点を抽出してもとの画像よりも解像度の低い別の画像を生成する。ここで第mレベルにおける各画像のサイズは2×2(0≦m≦n)とする。特異点フィルタは次の4種類の新たな階層画像をnから下がる方向で再帰的に構築する。
【0029】
【数1】

Figure 0003828048
ただしここで、
【数2】
Figure 0003828048
とする。以降これら4つの画像を副画像(サブイメージ)と呼ぶ。minx≦t≦x+1、maxx≦t≦x+1をそれぞれα及びβと記述すると、副画像はそれぞれ以下のように記述できる。
【0030】
(m,0)=α(x)α(y)p(m+1,0)
(m,1)=α(x)β(y)p(m+1,1)
(m,2)=β(x)α(y)p(m+1,2
(m,3)=β(x)β(y)p(m+1,3)
すなわち、これらはαとβのテンソル積のようなものと考えられる。副画像はそれぞれ特異点に対応している。これらの式から明らかなように、特異点フィルタはもとの画像について2×2画素で構成されるブロックごとに特異点を検出する。その際、各ブロックのふたつの方向、つまり縦と横について、最大画素値または最小画素値をもつ点を探索する。画素値として、前提技術では輝度を採用するが、画像に関するいろいろな数値を採用することができる。ふたつの方向の両方について最大画素値となる画素は極大点、ふたつの方向の両方について最小画素値となる画素は極小点、ふたつの方向の一方について最大画素値となるとともに、他方について最小画素値となる画素は鞍点として検出される。
【0031】
特異点フィルタは、各ブロックの内部で検出された特異点の画像(ここでは1画素)でそのブロックの画像(ここでは4画素)を代表させることにより、画像の解像度を落とす。特異点の理論的な観点からすれば、α(x)α(y)は極小点を保存し、β(x)β(y)は極大点を保存し、α(x)β(y)及びβ(x)α(y)は鞍点を保存する。
【0032】
はじめに、マッチングをとるべき始点(ソース)画像と終点(デスティネーション)画像に対して別々に特異点フィルタ処理を施し、それぞれ一連の画像群、すなわち始点階層画像と終点階層画像を生成しておく。始点階層画像と終点階層画像は、特異点の種類に対応してそれぞれ4種類ずつ生成される。
【0033】
この後、一連の解像度レベルの中で始点階層画像と終点階層画像のマッチングがとられていく。まずp(m,0)を用いて極小点のマッチングがとられる。次に、その結果に基づき、p(m,1)を用いて鞍点のマッチングがとられ、p(m,2)を用いて他の鞍点のマッチングがとられる。そして最後にp(m,3)を用いて極大点のマッチングがとられる。
【0034】
図1(c)と図1(d)はそれぞれ図1(a)と図1(b)の副画像p(5,0)を示している。同様に、図1(e)と図1(f)はp(5,1)、図1(g)と図1(h)はp(5,2)、図1(i)と図1(j)はp(5,3)をそれぞれ示している。これらの図からわかるとおり、副画像によれば画像の特徴部分のマッチングが容易になる。まずp(5,0)によって目が明確になる。目は顔の中で輝度の極小点だからである。p(5,1)によれば口が明確になる。口は横方向で輝度が低いためである。p(5,2)によれば首の両側の縦線が明確になる。最後に、p(5,3)によって耳や頬の最も明るい点が明確になる。これらは輝度の極大点だからである。
【0035】
特異点フィルタによれば画像の特徴が抽出できるため、例えばカメラで撮影された画像の特徴と、予め記録しておいたいくつかのオブジェクトの特徴を比較することにより、カメラに映った被写体を識別することができる。
【0036】
[1.3]画像間の写像の計算
始点画像の位置(i,j)の画素をp(n) (i,j)と書き、同じく終点画像の位置(k,l)の画素をq(n) (k,l)で記述する。i,j,k,l∈Iとする。画像間の写像のエネルギー(後述)を定義する。このエネルギーは、始点画像の画素の輝度と終点画像の対応する画素の輝度の差、及び写像の滑らかさによって決まる。最初に最小のエネルギーを持つp(m,0)とq(m,0)間の写像f(m,0):p(m,0)→q(m,0)が計算される。f(m,0)に基づき、最小エネルギーを持つp(m,1)、q(m,1)間の写像f(m,1)が計算される。この手続は、p(m,3)とq(m,3)の間の写像f(m,3)の計算が終了するまで続く。各写像f(m,i)(i=0,1,2,…)を副写像と呼ぶことにする。f(m,i)の計算の都合のために、iの順序は次式のように並べ替えることができる。並べ替えが必要な理由は後述する。
【0037】
【数3】
Figure 0003828048
ここでσ(i)∈{0,1,2,3}である。
【0038】
[1.3.1]全単射
始点画像と終点画像の間のマッチングを写像で表現する場合、その写像は両画像間で全単射条件を満たすべきである。両画像に概念上の優劣はなく、互いの画素が全射かつ単射で接続されるべきだからである。しかしながら通常の場合とは異なり、ここで構築すべき写像は全単射のデジタル版である。前提技術では、画素は格子点によって特定される。
【0039】
始点副画像(始点画像について設けられた副画像)から終点副画像(終点画像について設けられた副画像)への写像は、f(m,s):I/2n−m×I/2n−m→I/2n−m×I/2n−m(s=0,1,…)によって表される。ここで、f(m,s)(i,j)=(k,l)は、始点画像のp(m,s) (i,j)が終点画像のq(m,s) (k,l)に写像されることを意味する。簡単のために、f(i,j)=(k,l)が成り立つとき画素q(k,l)をqf(i,j)と記述する。
【0040】
前提技術で扱う画素(格子点)のようにデータが離散的な場合、全単射の定義は重要である。ここでは以下のように定義する(i,i’,j,j’,k,lは全て整数とする)。まず始めに、始点画像の平面においてRによって表記される各正方形領域、
【数4】
Figure 0003828048
を考える(i=0,…,2−1、j=0,…,2−1)。ここでRの各辺(エッジ)の方向を以下のように定める。
【0041】
【数5】
Figure 0003828048
この正方形は写像fによって終点画像平面における四辺形に写像されなければならない。f(m,s)(R)によって示される四辺形、
【数6】
Figure 0003828048
は、以下の全単射条件を満たす必要がある。
【0042】
1.四辺形f(m,s)(R)のエッジは互いに交差しない。
2.f(m,s)(R)のエッジの方向はRのそれらに等しい(図2の場合、時計回り)。
3.緩和条件として収縮写像(リトラクション:retractions)を許す。
【0043】
何らかの緩和条件を設けないかぎり、全単射条件を完全に満たす写像は単位写像しかないためである。ここではf(m,s)(R)のひとつのエッジの長さが0、すなわちf(m,s)(R)は三角形になってもよい。しかし、面積が0となるような図形、すなわち1点または1本の線分になってはならない。図2(R)がもとの四辺形の場合、図2(A)と図2(D)は全単射条件を満たすが、図2(B)、図2(C)、図2(E)は満たさない。
【0044】
実際のインプリメンテーションでは、写像が全射であることを容易に保証すべく、さらに以下の条件を課してもよい。つまり始点画像の境界上の各画素は、終点画像において同じ位置を占める画素に写影されるというものである。すなわち、f(i,j)=(i,j)(ただしi=0,i=2−1,j=0,j=2−1の4本の線上)である。この条件を以下「付加条件」とも呼ぶ。
【0045】
[1.3.2]写像のエネルギー
[1.3.2.1]画素の輝度に関するコスト
写像fのエネルギーを定義する。エネルギーが最小になる写像を探すことが目的である。エネルギーは主に、始点画像の画素の輝度とそれに対応する終点画像の画素の輝度の差で決まる。すなわち、写像f(m,s)の点(i,j)におけるエネルギーC(m,s) (i,j)は次式によって定まる。
【0046】
【数7】
Figure 0003828048
ここで、V(p(m,s) (i,j))及びV(q(m,s) f(i,j))はそれぞれ画素p(m,s) (i,j)及びq(m,s) f(i,j)の輝度である。fのトータルのエネルギーC(m,s)は、マッチングを評価するひとつの評価式であり、つぎに示すC(m,s) (i,j)の合計で定義できる。
【0047】
【数8】
Figure 0003828048
[1.3.2.2]滑らかな写像のための画素の位置に関するコスト
滑らかな写像を得るために、写像に関する別のエネルギーDfを導入する。このエネルギーは画素の輝度とは関係なく、p(m,s) (i,j)およびq(m,s) f(i,j)の位置によって決まる(i=0,…,2−1,j=0,…,2−1)。点(i,j)における写像f(m,s)のエネルギーD(m,s) (i,j)は次式で定義される。
【0048】
【数9】
Figure 0003828048
ただし、係数パラメータηは0以上の実数であり、また、
【数10】
Figure 0003828048
【数11】
Figure 0003828048
とする。ここで、
【数12】
Figure 0003828048
であり、i’<0およびj’<0に対してf(i’,j’)は0と決める。Eは(i,j)及びf(i,j)の距離で決まる。Eは画素があまりにも離れた画素へ写影されることを防ぐ。ただしEは、後に別のエネルギー関数で置き換える。Eは写像の滑らかさを保証する。Eは、p(i,j)の変位とその隣接点の変位の間の隔たりを表す。以上の考察をもとに、マッチングを評価する別の評価式であるエネルギーDは次式で定まる。
【0049】
【数13】
Figure 0003828048
[1.3.2.3]写像の総エネルギー
写像の総エネルギー、すなわち複数の評価式の統合に係る総合評価式はλC(m,s) +D(m,s) で定義される。ここで係数パラメータλは0以上の実数である。目的は総合評価式が極値をとる状態を検出すること、すなわち次式で示す最小エネルギーを与える写像を見いだすことである。
【0050】
【数14】
Figure 0003828048
λ=0及びη=0の場合、写像は単位写像になることに注意すべきである(すなわち、全てのi=0,…,2−1及びj=0,…,2−1に対してf(m,s)(i,j)=(i,j)となる)。後述のごとく、本前提技術では最初にλ=0及びη=0の場合を評価するため、写像を単位写像から徐々に変形していくことができる。仮に総合評価式のλの位置を変えてC(m,s) +λD(m,s) と定義したとすれば、λ=0及びη=0の場合に総合評価式がC(m,s) だけになり、本来何等関連のない画素どうしが単に輝度が近いというだけで対応づけられ、写像が無意味なものになる。そうした無意味な写像をもとに写像を変形していってもまったく意味をなさない。このため、単位写像が評価の開始時点で最良の写像として選択されるよう係数パラメータの与えかたが配慮されている。
【0051】
オプティカルフローもこの前提技術同様、画素の輝度の差と滑らかさを考慮する。しかし、オプティカルフローは画像の変換に用いることはできない。オブジェクトの局所的な動きしか考慮しないためである。前提技術に係る特異点フィルタを用いることによって大域的な対応関係を検出することができる。
【0052】
[1.3.3]多重解像度の導入による写像の決定
最小エネルギーを与え、全単射条件を満足する写像fminを多重解像度の階層を用いて求める。各解像度レベルにおいて始点副画像及び終点副画像間の写像を計算する。解像度の階層の最上位(最も粗いレベル)からスタートし、各解像度レベルの写像を、他のレベルの写像を考慮に入れながら決定する。各レベルにおける写像の候補の数は、より高い、つまりより粗いレベルの写像を用いることによって制限される。より具体的には、あるレベルにおける写像の決定に際し、それよりひとつ粗いレベルにおいて求められた写像が一種の拘束条件として課される。
【0053】
まず、
【数15】
Figure 0003828048
が成り立つとき、p(m−1,s) (i’,j’)、q(m−1,s) (i’,j’)をそれぞれp(m,s) (i,j)、q(m,s) (i,j)のparentと呼ぶことにする。[x]はxを越えない最大整数である。またp(m,s) (i,j)、q(m,s) (i,j)をそれぞれp(m−1,s) (i’,j’)、q(m−1,s) (i’,j’)のchildと呼ぶ。関数parent(i,j)は次式で定義される。
【0054】
【数16】
Figure 0003828048
(m,s) (i,j)とq(m,s) (k,l)の間の写像f(m,s)は、エネルギー計算を行って最小になったものを見つけることで決定される。f(m,s)(i,j)=(k,l)の値はf(m−1,s)(m=1,2,…,n)を用いることによって、以下のように決定される。まず、q(m,s) (k,l)は次の四辺形の内部になければならないという条件を課し、全単射条件を満たす写像のうち現実性の高いものを絞り込む。
【0055】
【数17】
Figure 0003828048
ただしここで、
【数18】
Figure 0003828048
である。こうして定めた四辺形を、以下p(m,s) (i,j)の相続(inherited)四辺形と呼ぶことにする。相続四辺形の内部において、エネルギーを最小にする画素を求める。
【0056】
図3は以上の手順を示している。同図において、始点画像のA,B,C,Dの画素は、第m−1レベルにおいてそれぞれ終点画像のA’,B’,C’,D’へ写影される。画素p(m,s) (i,j)は、相続四辺形A’B’C’D’の内部に存在する画素q(m,s) f(m)(i,j)へ写影されなければならない。以上の配慮により、第m−1レベルの写像から第mレベルの写像への橋渡しがなされる。
【0057】
先に定義したエネルギーEは、第mレベルにおける副写像f(m,0)を計算するために、次式に置き換える。
【0058】
【数19】
Figure 0003828048
また、副写像f(m,s)を計算するためには次式を用いる。
【0059】
【数20】
Figure 0003828048
こうしてすべての副写像のエネルギーを低い値に保つ写像が得られる。式20により、異なる特異点に対応する副写像が、副写像どうしの類似度が高くなるように同一レベル内で関連づけられる。式19は、f(m,s)(i,j)と、第m−1レベルの画素の一部と考えた場合の(i,j)が射影されるべき点の位置との距離を示している。
【0060】
仮に、相続四辺形A’B’C’D’の内部に全単射条件を満たす画素が存在しない場合は以下の措置をとる。まず、A’B’C’D’の境界線からの距離がL(始めはL=1)である画素を調べる。それらのうち、エネルギーが最小になるものが全単射条件を満たせば、これをf(m,s)(i,j)の値として選択する。そのような点が発見されるか、またはLがその上限のL(m)maxに到達するまで、Lを大きくしていく。L(m)maxは各レベルmに対して固定である。そのような点が全く発見されない場合、全単射の第3の条件を一時的に無視して変換先の四辺形の面積がゼロになるような写像も認め、f(m,s)(i,j)を決定する。それでも条件を満たす点が見つからない場合、つぎに全単射の第1及び第2条件を外す。
【0061】
多重解像度を用いる近似法は、写像が画像の細部に影響されることを回避しつつ、画像間の大域的な対応関係を決定するために必須である。多重解像度による近似法を用いなければ、距離の遠い画素間の対応関係を見いだすことは不可能である。その場合、画像のサイズはきわめて小さなものに限定しなければならず、変化の小さな画像しか扱うことができない。さらに、通常写像に滑らかさを要求するため、そうした画素間の対応関係を見つけにくくしている。距離のある画素から画素への写像のエネルギーは高いためである。多重解像度を用いた近似法によれば、そうした画素間の適切な対応関係を見いだすことができる。それらの距離は、解像度の階層の上位レベル(粗いレベル)において小さいためである。
【0062】
[1.4]最適なパラメータ値の自動決定
既存のマッチング技術の主な欠点のひとつに、パラメータ調整の困難さがある。大抵の場合、パラメータの調整は人手作業によって行われ、最適な値を選択することはきわめて難しい。前提技術に係る方法によれば、最適なパラメータ値を完全に自動決定することができる。
【0063】
前提技術に係るシステムはふたつのパラメータ、λ及びηを含む。端的にいえば、λは画素の輝度の差の重みであり、ηは写像の剛性を示している。これらのパラメータの値は初期値が0であり、まずη=0に固定してλを0から徐々に増加させる。λの値を大きくしながら、しかも総合評価式(式14)の値を最小にする場合、各副写像に関するC(m,s) の値は一般に小さくなっていく。このことは基本的にふたつの画像がよりマッチしなければならないことを意味する。しかし、λが最適値を超えると以下の現象が発生する。
【0064】
1.本来対応すべきではない画素どうしが、単に輝度が近いというだけで誤って対応づけられる。
2.その結果、画素どうしの対応関係がおかしくなり、写像がくずれはじめる。
3.その結果、式14においてD(m,s) が急激に増加しようとする。 4.その結果、式14の値が急激に増加しようとするため、D(m,s) の急激な増加を抑制するようf(m,s)が変化し、その結果C(m,s) が増加する。
したがって、λを増加させながら式14が最小値をとるという状態を維持しつつC(m,s) が減少から増加に転じる閾値を検出し、そのλをη=0における最適値とする。つぎにηを少しずつ増やしてC(m,s) の挙動を検査し、後述の方法でηを自動決定する。そのηに対応してλも決まる。
【0065】
この方法は、人間の視覚システムの焦点機構の動作に似ている。人間の視覚システムでは、一方の目を動かしながら左右両目の画像のマッチングがとられる。オブジェクトがはっきりと認識できるとき、その目が固定される。
【0066】
[1.4.1]λの動的決定
λは0から所定の刻み幅で増加されていき、λの値が変わる度に副写像が評価される。式14のごとく、総エネルギーはλC(m,s) +D(m,s) によって定義される。式9のD(m,s) は滑らかさを表すもので、理論的には単位写像の場合に最小になり、写像が歪むほどEもEも増加していく。Eは整数であるから、D(m,s) の最小刻み幅は1である。このため、現在のλC(m,s) (i,j)の変化(減少量)が1以上でなければ、写像を変化させることによって総エネルギーを減らすことはできない。なぜなら、写像の変化に伴ってD(m,s) は1以上増加するため、λC(m,s) (i,j)が1以上減少しない限り総エネルギーは減らないためである。
【0067】
この条件のもと、λの増加に伴い、正常な場合にC(m,s) (i,j)が減少することを示す。C(m,s) (i,j)のヒストグラムをh(l)と記述する。h(l)はエネルギーC(m,s) (i,j)がlである画素の数である。λl≧1が成り立つために、例えばl=1/λの場合を考える。λがλからλまで微小量変化するとき、
【数21】
Figure 0003828048
で示されるA個の画素が、
【数22】
Figure 0003828048
のエネルギーを持つより安定的な状態に変化する。ここでは仮に、これらの画素のエネルギーがすべてゼロになると近似している。この式はC(m,s) の値が、
【数23】
Figure 0003828048
だけ変化することを示し、その結果、
【数24】
Figure 0003828048
が成立する。h(l)>0であるから、通常C(m,s) は減少する。しかし、λが最適値を越えようとするとき、上述の現象、つまりC(m,s) の増加が発生する。この現象を検出することにより、λの最適値を決定する。
【0068】
なお、H(h>0)及びkを定数とするとき、
【数25】
Figure 0003828048
と仮定すれば、
【数26】
Figure 0003828048
が成り立つ。このときk≠−3であれば、
【数27】
Figure 0003828048
となる。これがC(m,s) の一般式である(Cは定数)。
【0069】
λの最適値を検出する際、さらに安全を見て、全単射条件を破る画素の数を検査してもよい。ここで各画素の写像を決定する際、全単射条件を破る確率をpと仮定する。この場合、
【数28】
Figure 0003828048
が成立しているため、全単射条件を破る画素の数は次式の率で増加する。
【0070】
【数29】
Figure 0003828048
従って、
【数30】
Figure 0003828048
は定数である。仮にh(l)=Hlを仮定するとき、例えば、
【数31】
Figure 0003828048
は定数になる。しかしλが最適値を越えると、上の値は急速に増加する。この現象を検出し、Bλ3/2+k/2/2の値が異常値B0thresを越えるかどうかを検査し、λの最適値を決定することができる。同様に、Bλ3/2+k/2/2の値が異常値B1thresを越えるかどうかを検査することにより、全単射の第3の条件を破る画素の増加率Bを確認する。ファクター2を導入する理由は後述する。このシステムはこれら2つの閾値に敏感ではない。これらの閾値は、エネルギーC(m,s) の観察では検出し損なった写像の過度の歪みを検出するために用いることができる。
【0071】
なお実験では、副写像f(m,s)を計算する際、もしλが0.1を越えたらf(m,s)の計算は止めてf(m,s+1)の計算に移行した。λ>0.1のとき、画素の輝度255レベル中のわずか「3」の違いが副写像の計算に影響したためであり、λ>0.1のとき正しい結果を得ることは困難だったためである。
【0072】
[1.4.2]ヒストグラムh(l)
(m,s) の検査はヒストグラムh(l)に依存しない。全単射及びその第3の条件の検査の際、h(l)に影響を受けうる。実際に(λ,C(m,s) )をプロットすると、kは通常1付近にある。実験ではk=1を用い、BλとBλを検査した。仮にkの本当の値が1未満であれば、BλとBλは定数にならず、ファクターλ(1−k)/2に従って徐々に増加する。h(l)が定数であれば、例えばファクターはλ1/2である。しかし、こうした差は閾値B0thresを正しく設定することによって吸収することができる。
【0073】
ここで次式のごとく始点画像を中心が(x,y)、半径rの円形のオブジェクトであると仮定する。
【数32】
Figure 0003828048
一方、終点画像は、次式のごとく中心(x,y)、半径がrのオブジェクトであるとする。
【数33】
Figure 0003828048
ここでc(x)はc(x)=xの形であるとする。中心(x,y)及び(x,y)が十分遠い場合、ヒストグラムh(l)は次式の形となる。
【数34】
Figure 0003828048
k=1のとき、画像は背景に埋め込まれた鮮明な境界線を持つオブジェクトを示す。このオブジェクトは中心が暗く、周囲にいくに従って明るくなる。k=−1のとき、画像は曖昧な境界線を持つオブジェクトを表す。このオブジェクトは中心が最も明るく、周囲にいくに従って暗くなる。一般のオブジェクトはこれらふたつのタイプのオブジェクトの中間にあると考えてもさして一般性を失わない。したがって、kは−1≦k≦1として大抵の場合をカバーでき、式27が一般に減少関数であることが保障される。
【0074】
なお、式34からわかるように、rは画像の解像度に影響されること、すなわちrは2mに比例することに注意すべきである。このために[1.4.1]においてファクター2mを導入した。
【0075】
[1.4.3]ηの動的決定
パラメータηも同様の方法で自動決定できる。はじめにη=0とし、最も細かい解像度における最終的な写像f(n)及びエネルギーC(n) を計算する。つづいて、ηをある値Δηだけ増加させ、再び最も細かい解像度における最終写像f(n)及びエネルギーC(n) を計算し直す。この過程を最適値が求まるまで続ける。ηは写像の剛性を示す。次式の重みだからである。
【0076】
【数35】
Figure 0003828048
ηが0のとき、D(n) は直前の副写像と無関係に決定され、現在の副写像は弾性的に変形され、過度に歪むことになる。一方、ηが非常に大きな値のとき、D(n) は直前の副写像によってほぼ完全に決まる。このとき副写像は非常に剛性が高く、画素は同じ場所に射影される。その結果、写像は単位写像になる。ηの値が0から次第に増えるとき、後述のごとくC(n) は徐々に減少する。しかしηの値が最適値を越えると、図4に示すとおり、エネルギーは増加し始める。同図のX軸はη、Y軸はCである。
【0077】
この方法でC(n) を最小にする最適なηの値を得ることができる。しかし、λの場合に比べていろいろな要素が計算に影響する結果、C(n) は小さく揺らぎながら変化する。λの場合は、入力が微小量変化するたびに副写像を1回計算しなおすだけだが、ηの場合はすべての副写像が計算しなおされるためである。このため、得られたC(n) の値が最小であるかどうかを即座に判断することはできない。最小値の候補が見つかれば、さらに細かい区間を設定することによって真の最小値を探す必要がある。
【0078】
[1.5]スーパーサンプリング
画素間の対応関係を決定する際、自由度を増やすために、f(m,s)の値域をR×Rに拡張することができる(Rは実数の集合)。この場合、終点画像の画素の輝度が補間され、非整数点、
【数36】
Figure 0003828048
における輝度を持つf(m,s)が提供される。つまりスーパーサンプリングが行われる。実験では、f(m,s)は整数及び半整数値をとることが許され、
【数37】
Figure 0003828048
は、
【数38】
Figure 0003828048
によって与えられた。
【0079】
[1.6]各画像の画素の輝度の正規化
始点画像と終点画像がきわめて異なるオブジェクトを含んでいるとき、写像の計算に元の画素の輝度がそのままでは利用しにくい。輝度の差が大きいために輝度に関するエネルギーC(m,s) が大きくなりすぎ、正しい評価がしづらいためである。
【0080】
例えば、人の顔と猫の顔のマッチングをとる場合を考える。猫の顔は毛で覆われており、非常に明るい画素と非常に暗い画素が混じっている。この場合、ふたつの顔の間の副写像を計算するために、まず副画像を正規化する。すなわち、最も暗い画素の輝度を0、最も明るいそれを255に設定し、他の画素の輝度は線形補間によって求めておく。
【0081】
[1.7]インプリメンテーション
始点画像のスキャンに従って計算がリニアに進行する帰納的な方法を用いる。始めに、1番上の左端の画素(i,j)=(0,0)についてf(m,s)の値を決定する。次にiを1ずつ増やしながら各f(m,s)(i,j)の値を決定する。iの値が画像の幅に到達したとき、jの値を1増やし、iを0に戻す。以降、始点画像のスキャンに伴いf(m,s)(i,j)を決定していく。すべての点について画素の対応が決まれば、ひとつの写像f(m,s)が決まる。
【0082】
あるp(i,j)について対応点qf(i,j)が決まれば、つぎにp(i,j+1)の対応点qf(i,j+1)が決められる。この際、qf(i,j+1)の位置は全単射条件を満たすために、qf(i,j)の位置によって制限される。したがって、先に対応点が決まる点ほどこのシステムでは優先度が高くなる。つねに(0,0)が最も優先される状態がつづくと、求められる最終の写像に余計な偏向が加わる。本前提技術ではこの状態を回避するために、f(m,s)を以下の方法で決めていく。
【0083】
まず(s mod 4)が0の場合、(0,0)を開始点としi及びjを徐々に増やしながら決めていく。(s mod 4)が1の場合、最上行の右端点を開始点とし、iを減少、jを増加させながら決めていく。(s mod 4)が2のとき、最下行の右端点を開始点とし、i及びjを減少させながら決めていく。(smod 4)が3の場合、最下行の左端点を開始点とし、iを増加、jを減少させながら決めていく。解像度が最も細かい第nレベルには副写像という概念、すなわちパラメータsが存在しないため、仮にs=0及びs=2であるとしてふたつの方向を連続的に計算した。
【0084】
実際のインプリメンテーションでは、全単射条件を破る候補に対してペナルティを与えることにより、候補(k,l)の中からできる限り全単射条件を満たすf(m,s)(i,j)(m=0,…,n)の値を選んだ。第3の条件を破る候補のエネルギーD(k、l)にはφを掛け、一方、第1または第2の条件を破る候補にはψを掛ける。今回はφ=2、ψ=100000を用いた。
【0085】
前述の全単射条件のチェックのために、実際の手続として(k,l)=f(m,s)(i,j)を決定する際に以下のテストを行った。すなわちf(m,s)(i,j)の相続四辺形に含まれる各格子点(k,l)に対し、次式の外積のz成分が0以上になるかどうかを確かめる。
【0086】
【数39】
Figure 0003828048
ただしここで、
【数40】
Figure 0003828048
【数41】
Figure 0003828048
である(ここでベクトルは三次元ベクトルとし、z軸は直交右手座標系において定義される)。もしWが負であれば、その候補についてはD(m,s) (k,l)にψを掛けることによってペナルティを与え、できるかぎり選択しないようにする。
【0087】
図5(a)、図5(b)はこの条件を検査する理由を示している。図5(a)はペナルティのない候補、図5(b)はペナルティがある候補をそれぞれ表す。隣接画素(i,j+1)に対する写像f(m,s)(i,j+1)を決定する際、Wのz成分が負であれば始点画像平面上において全単射条件を満足する画素は存在しない。なぜなら、q(m,s) (k,l)は隣接する四辺形の境界線を越えるためである。
【0088】
[1.7.1]副写像の順序
インプリメンテーションでは、解像度レベルが偶数のときにはσ(0)=0、σ(1)=1、σ(2)=2、σ(3)=3、σ(4)=0を用い、奇数のときはσ(0)=3、σ(1)=2、σ(2)=1、σ(3)=0、σ(4)=3を用いた。このことで、副写像を適度にシャッフルした。なお、本来副写像は4種類であり、sは0〜3のいずれかである。しかし、実際にはs=4に相当する処理を行った。その理由は後述する。
【0089】
[1.8]補間計算
始点画像と終点画像の間の写像が決定された後、対応しあう画素の輝度が補間される。実験では、トライリニア補間を用いた。始点画像平面における正方形p(i,j)(i+1,j)(i,j+1)(i+1,j+1)が終点画像平面上の四辺形qf(i,j)f(i+1,j)f(i,j+1)f(i+1,j+1)に射影されると仮定する。簡単のため、画像間の距離を1とする。始点画像平面からの距離がt(0≦t≦1)である中間画像の画素r(x,y,t)(0≦x≦N−1,0≦y≦M−1)は以下の要領で求められる。まず画素r(x,y,t)の位置(ただしx,y,t∈R)を次式で求める。
【0090】
【数42】
Figure 0003828048
つづいてr(x,y,t)における画素の輝度が次の式を用いて決定される。
【0091】
【数43】
Figure 0003828048
ここでdx及びdyはパラメータであり、0から1まで変化する。
【0092】
[1.9]拘束条件を課したときの写像
いままでは拘束条件がいっさい存在しない場合の写像の決定を述べた。しかし、始点画像と終点画像の特定の画素間に予め対応関係が規定されているとき、これを拘束条件としたうえで写像を決定することができる。
【0093】
基本的な考えは、まず始点画像の特定の画素を終点画像の特定の画素に移す大まかな写像によって始点画像を大まかに変形し、しかる後、写像fを正確に計算する。
【0094】
まず始めに、始点画像の特定の画素を終点画像の特定の画素に射影し、始点画像の他の画素を適当な位置に射影する大まかな写像を決める。すなわち、特定の画素に近い画素は、その特定の画素が射影される場所の近くに射影されるような写像である。ここで第mレベルの大まかな写像をF(m)と記述する。
【0095】
大まかな写像Fは以下の要領で決める。まず、いくつかの画素について写像を特定する。始点画像についてn個の画素、
【数44】
Figure 0003828048
を特定するとき、以下の値を決める。
【数45】
Figure 0003828048
始点画像の他の画素の変位量は、p(ih,jh)(h=0,…,n−1)の変位に重み付けをして求められる平均である。すなわち画素p(i,j)は、終点画像の以下の画素に射影される。
【0096】
【数46】
Figure 0003828048
ただしここで、
【数47】
Figure 0003828048
【数48】
Figure 0003828048
とする。
【0097】
つづいて、F(m)に近い候補写像fがより少ないエネルギーを持つように、その写像fのエネルギーD(m,s) (i,j)を変更する。正確には、D(m,s) (i,j)は、
【数49】
Figure 0003828048
である。ただし、
【数50】
Figure 0003828048
であり、κ,ρ≧0とする。最後に、前述の写像の自動計算プロセスにより、fを完全に決定する。
【0098】
ここで、f(m,s)(i,j)がF(m)(i,j)に十分近いとき、つまりそれらの距離が、
【数51】
Figure 0003828048
以内であるとき、E (m,s) (i,j)が0になることに注意すべきである。そのように定義した理由は、各f(m,s)(i,j)がF(m)(i,j)に十分近い限り、終点画像において適切な位置に落ち着くよう、その値を自動的に決めたいためである。この理由により、正確な対応関係を詳細に特定する必要がなく、始点画像は終点画像にマッチするように自動的にマッピングされる。
【0099】
[2]具体的な処理手順
[1]の各要素技術による処理の流れを説明する。
図6は前提技術の全体手順を示すフローチャートである。同図のごとく、まず多重解像度特異点フィルタを用いた処理を行い(S1)、つづいて始点画像と終点画像のマッチングをとる(S2)。ただし、S2は必須ではなく、S1で得られた画像の特徴をもとに画像認識などの処理を行ってもよい。
【0100】
図7は図6のS1の詳細を示すフローチャートである。ここではS2で始点画像と終点画像のマッチングをとることを前提としている。そのため、まず特異点フィルタによって始点画像の階層化を行い(S10)、一連の始点階層画像を得る。つづいて同様の方法で終点画像の階層化を行い(S11)、一連の終点階層画像を得る。ただし、S10とS11の順序は任意であるし、始点階層画像と終点階層画像を並行して生成していくこともできる。
【0101】
図8は図7のS10の詳細を示すフローチャートである。もとの始点画像のサイズは2×2とする。始点階層画像は解像度が細かいほうから順に作られるため、処理の対象となる解像度レベルを示すパラメータmをnにセットする(S100)。つづいて第mレベルの画像p(m,0)、p(m,1)、p(m,2)、p(m,3)から特異点フィルタを用いて特異点を検出し(S101)、それぞれ第m−1レベルの画像p(m−1,0)、p(m−1,1)、p(m−1,2)、p(m−1,3)を生成する(S102)。ここではm=nであるため、p(m,0)=p(m,1)=p(m,2)=p(m,3)=p(n)であり、ひとつの始点画像から4種類の副画像が生成される。
【0102】
図9は第mレベルの画像の一部と、第m−1レベルの画像の一部の対応関係を示している。同図の数値は各画素の輝度を示す。同図のp(m,s)はp(m,0)〜p(m,3)の4つの画像を象徴するもので、p(m−1,0)を生成する場合には、p(m,s)はp(m,0)であると考える。[1.2]で示した規則により、p(m−1,0)は例えば同図で輝度を記入したブロックについて、そこに含まれる4画素のうち「3」、p(m−1,1)は「8」、p(m−1,2)は「6」、p(m−1,3)を「10」をそれぞれ取得し、このブロックをそれぞれ取得したひとつの画素で置き換える。したがって、第m−1レベルの副画像のサイズは2m−1×2m−1になる。
【0103】
つづいてmをデクリメントし(図8のS103)、mが負になっていないことを確認し(S104)、S101に戻ってつぎに解像度の粗い副画像を生成していく。この繰り返し処理の結果、m=0、すなわち第0レベルの副画像が生成された時点でS10が終了する。第0レベルの副画像のサイズは1×1である。
【0104】
図10はS10によって生成された始点階層画像をn=3の場合について例示している。最初の始点画像のみが4つの系列に共通であり、以降特異点の種類に応じてそれぞれ独立に副画像が生成されていく。なお、図8の処理は図7のS11にも共通であり、同様の手順を経て終点階層画像も生成される。以上で図6のS1による処理が完了する。
【0105】
前提技術では、図6のS2に進むためにマッチング評価の準備をする。図11はその手順を示している。同図のごとく、まず複数の評価式が設定される(S30)。[1.3.2.1]で導入した画素に関するエネルギーC(m,s) と[1.3.2.2]で導入した写像の滑らかさに関するエネルギーD(m,s) がそれである。つぎに、これらの評価式を統合して総合評価式を立てる(S31)。[1.3.2.3]で導入した総エネルギーλC(m,s) +D(m,s) がそれであり、[1.3.2.2]で導入したηを用いれば、
【数52】
Figure 0003828048
となる。ただし、総和はi、jについてそれぞれ0、1…、2−1で計算する。以上でマッチング評価の準備が整う。
【0106】
図12は図6のS2の詳細を示すフローチャートである。[1]で述べたごとく、始点階層画像と終点階層画像のマッチングは互いに同じ解像度レベルの画像どうしでとられる。画像間の大域的なマッチングを良好にとるために、解像度が粗いレベルから順にマッチングを計算する。特異点フィルタを用いて始点階層画像および終点階層画像を生成しているため、特異点の位置や輝度は解像度の粗いレベルでも明確に保存されており、大域的なマッチングの結果は従来に比べて非常に優れたものになる。
【0107】
図12のごとく、まず係数パラメータηを0、レベルパラメータmを0に設定する(S20)。つづいて、始点階層画像中の第mレベルの4つの副画像と終点階層画像中の第mレベルの4つの副画像のそれぞれの間でマッチングを計算し、それぞれ全単射条件を満たし、かつエネルギーを最小にするような4種類の副写像f(m,s)(s=0,1,2,3)を求める(S21)。全単射条件は[1.3.3]で述べた相続四辺形を用いて検査される。この際、式17、18が示すように、第mレベルにおける副写像は第m−1レベルのそれらに拘束されるため、より解像度の粗いレベルにおけるマッチングが順次利用されていく。これは異なるレベル間の垂直的参照である。なお、いまm=0であってそれより粗いレベルはないが、この例外的な処理は図13で後述する。
【0108】
一方、同一レベル内における水平的参照も行われる。[1.3.3]の式20のごとく、f(m,3)はf(m,2)に、f(m,2)はf(m,1)に、f(m,1)はf(m,0)に、それぞれ類似するように決める。その理由は、特異点の種類が違っても、それらがもともと同じ始点画像と終点画像に含まれている以上、副写像がまったく異なるという状況は不自然だからである。式20からわかるように、副写像どうしが近いほどエネルギーは小さくなり、マッチングが良好とみなされる。
【0109】
なお、最初に決めるべきf(m,0)については同一のレベルで参照できる副写像がないため、式19に示すごとくひとつ粗いレベルを参照する。ただし、実験ではf(m,3)まで求まった後、これを拘束条件としてf(m,0)を一回更新するという手続をとった。これは式20にs=4を代入し、f(m,4)を新たなf(m,0)とすることに等しい。f(m,0)とf(m,3)の関連度が低くなり過ぎる傾向を回避するためであり、この措置によって実験結果がより良好になった。この措置に加え、実験では[1.7.1]に示す副写像のシャッフルも行った。これも本来特異点の種類ごとに決まる副写像どうしの関連度を密接に保つ趣旨である。また、処理の開始点に依存する偏向を回避するために、sの値にしたがって開始点の位置を変える点は[1.7]で述べたとおりである。
【0110】
図13は第0レベルにおいて副写像を決定する様子を示す図である。第0レベルでは各副画像がただひとつの画素で構成されるため、4つの副写像f(0,s)はすべて自動的に単位写像に決まる。図14は第1レベルにおいて副写像を決定する様子を示す図である。第1レベルでは副画像がそれぞれ4画素で構成される。同図ではこれら4画素が実線で示されている。いま、p(1,s)の点xの対応点をq(1,s)の中で探すとき、以下の手順を踏む。
【0111】
1.第1レベルの解像度で点xの左上点a、右上点b、左下点c、右下点dを求める。
2.点a〜dがひとつ粗いレベル、つまり第0レベルにおいて属する画素を探す。図14の場合、点a〜dはそれぞれ画素A〜Dに属する。ただし、画素A〜Cは本来存在しない仮想的な画素である。
3.第0レベルですでに求まっている画素A〜Dの対応点A’〜D’をq(1,s)の中にプロットする。画素A’〜C’は仮想的な画素であり、それぞれ画素A〜Cと同じ位置にあるものとする。
4.画素Aの中の点aの対応点a’が画素A’の中にあるとみなし、点a’をプロットする。このとき、点aが画素Aの中で占める位置(この場合、右下)と、点a’が画素A’の中で占める位置が同じであると仮定する。
5.4と同様の方法で対応点b’〜d’をプロットし、点a’〜d’で相続四辺形を作る。
6.相続四辺形の中でエネルギーが最小になるよう、点xの対応点x’を探す。対応点x’の候補として、例えば画素の中心が相続四辺形に含まれるものに限定してもよい。図14の場合、4つの画素がすべて候補になる。
【0112】
以上がある点xの対応点の決定手順である。同様の処理を他のすべての点について行い、副写像を決める。第2レベル以上のレベルでは、次第に相続四辺形の形が崩れていくと考えられるため、図3に示すように画素A’〜D’の間隔が空いていく状況が発生する。
【0113】
こうして、ある第mレベルの4つの副写像が決まれば、mをインクリメントし(図12のS22)、mがnを超えていないことを確かめて(S23)、S21に戻る。以下、S21に戻るたびに次第に細かい解像度のレベルの副写像を求め、最後にS21に戻ったときに第nレベルの写像f(n)を決める。この写像はη=0に関して定まったものであるから、f(n)(η=0)と書く。
【0114】
つぎに異なるηに関する写像も求めるべく、ηをΔηだけシフトし、mをゼロクリアする(S24)。新たなηが所定の探索打切り値ηmaxを超えていないことを確認し(S25)、S21に戻り、今回のηに関して写像f(n)(η=Δη)を求める。この処理を繰り返し、S21でf(n)(η=iΔη)(i=0,1,…)を求めていく。ηがηmaxを超えたときS26に進み、後述の方法で最適なη=ηoptを決定し、f(n)(η=ηopt)を最終的に写像f(n)とする。
【0115】
図15は図12のS21の詳細を示すフローチャートである。このフローチャートにより、ある定まったηについて、第mレベルにおける副写像が決まる。副写像を決める際、前提技術では副写像ごとに最適なλを独立して決める。
【0116】
同図のごとく、まずsとλをゼロクリアする(S210)。つぎに、そのときのλについて(および暗にηについて)エネルギーを最小にする副写像f(m,s)を求め(S211)、これをf(m,s)(λ=0)と書く。異なるλに関する写像も求めるべく、λをΔλだけシフトし、新たなλが所定の探索打切り値λmaxを超えていないことを確認し(S213)、S211に戻り、以降の繰り返し処理でf(m,s)(λ=iΔλ)(i=0,1,…)を求める。λがλmaxを超えたときS214に進み、最適なλ=λoptを決定し、f(m,s)(λ=λopt)を最終的に写像f(m,s)とする(S214)。
【0117】
つぎに、同一レベルにおける他の副写像を求めるべく、λをゼロクリアし、sをインクリメントする(S215)。sが4を超えていないことを確認し(S216)、S211に戻る。s=4になれば上述のごとくf(m,3)を利用してf(m,0)を更新し、そのレベルにおける副写像の決定を終了する。
【0118】
図16は、あるmとsについてλを変えながら求められたf(m,s)(λ=iΔλ)(i=0,1,…)に対応するエネルギーC(m,s) の挙動を示す図である。[1.4]で述べたとおり、λが増加すると通常C(m,s) は減少する。しかし、λが最適値を超えるとC(m,s) は増加に転じる。そこで本前提技術ではC(m,s) が極小値をとるときのλをλoptと決める。同図のようにλ>λoptの範囲で再度C(m,s) が小さくなっていっても、その時点ではすでに写像がくずれていて意味をなさないため、最初の極小点に注目すればよい。λoptは副写像ごとに独立して決めていき、最後にf(n)についてもひとつ定まる。
【0119】
一方、図17は、ηを変えながら求められたf(n)(η=iΔη)(i=0,1,…)に対応するエネルギーC(n) の挙動を示す図である。ここでもηが増加すると通常C(n) は減少するが、ηが最適値を超えるとC(n) は増加に転じる。そこでC(n) が極小値をとるときのηをηoptと決める。図17は図4の横軸のゼロ付近を拡大した図と考えてよい。ηoptが決まればf(n)を最終決定することができる。
【0120】
以上、本前提技術によれば種々のメリットが得られる。まずエッジを検出する必要がないため、エッジ検出タイプの従来技術の課題を解消できる。また、画像に含まれるオブジェクトに対する先験的な知識も不要であり、対応点の自動検出が実現する。特異点フィルタによれば、解像度の粗いレベルでも特異点の輝度や位置を維持することができ、オブジェクト認識、特徴抽出、画像マッチングに極めて有利である。その結果、人手作業を大幅に軽減する画像処理システムの構築が可能となる。
【0121】
なお、本前提技術について次のような変形技術も考えられる。
(1)前提技術では始点階層画像と終点階層画像の間でマッチングをとる際にパラメータの自動決定を行ったが、この方法は階層画像間ではなく、通常の2枚の画像間のマッチングをとる場合全般に利用できる。
【0122】
たとえば2枚の画像間で、画素の輝度の差に関するエネルギーEと画素の位置的なずれに関するエネルギーEのふたつを評価式とし、これらの線形和Etot=αE+Eを総合評価式とする。この総合評価式の極値付近に注目してαを自動決定する。つまり、いろいろなαについてEtotが最小になるような写像を求める。それらの写像のうち、αに関してEが極小値をとるときのαを最適パラメータと決める。そのパラメータに対応する写像を最終的に両画像間の最適マッチングとみなす。
【0123】
これ以外にも評価式の設定にはいろいろな方法があり、例えば1/Eと1/Eのように、評価結果が良好なほど大きな値をとるものを採用してもよい。総合評価式も必ずしも線形和である必要はなく、n乗和(n=2、1/2、−1、−2など)、多項式、任意の関数などを適宜選択すればよい。
【0124】
パラメータも、αのみ、前提技術のごとくηとλのふたつの場合、それ以上の場合など、いずれでもよい。パラメータが3以上の場合はひとつずつ変化させて決めていく。
【0125】
(2)本前提技術では、総合評価式の値が最小になるよう写像を決めた後、総合評価式を構成するひとつの評価式であるC(m,s) が極小になる点を検出してパラメータを決定した。しかし、こうした二段回処理の代わりに、状況によっては単に総合評価式の最小値が最小になるようにパラメータを決めても効果的である。その場合、例えばαE+βEを総合評価式とし、α+β=1なる拘束条件を設けて各評価式を平等に扱うなどの措置を講じてもよい。パラメータの自動決定の本質は、エネルギーが最小になるようにパラメータを決めていく点にあるからである。
【0126】
(3)前提技術では各解像度レベルで4種類の特異点に関する4種類の副画像を生成した。しかし、当然4種類のうち1、2、3種類を選択的に用いてもよい。例えば、画像中に明るい点がひとつだけ存在する状態であれば、極大点に関するf(m,3)だけで階層画像を生成しても相応の効果が得られるはずである。その場合、同一レベルで異なる副写像は不要になるため、sに関する計算量が減る効果がある。
【0127】
(4)本前提技術では特異点フィルタによってレベルがひとつ進むと画素が1/4になった。例えば3×3で1ブロックとし、その中で特異点を探す構成も可能であり、その場合、レベルがひとつ進むと画素は1/9になる。
【0128】
(5)始点画像と終点画像がカラーの場合、それらをまず白黒画像に変換し、写像を計算する。その結果求められた写像を用いて始点のカラー画像を変換する。それ以外の方法として、RGBの各成分について副写像を計算してもよい。
【0129】
[3]前提技術の改良点
以上の前提技術を基本とし、マッチング精度を向上させるためのいくつかの改良がなされている。ここではその改良点を述べる。
【0130】
[3.1]色情報を考慮に入れた特異点フィルタおよび副画像
画像の色情報を有効に用いるために、特異点フィルタを以下のように変更した。まず色空間としては、人間の直感に最も合致するといわれているHISを用い、色を輝度に変換する式には、人間の目の感度に最も近いといわれているものを選んだ。
【0131】
【数53】
Figure 0003828048
ここで画素aにおけるY(輝度)をY(a)、S(彩度)をS(a)として、次のような記号を定義する。
【0132】
【数54】
Figure 0003828048
上の定義を用いて以下のような5つのフィルタを用意する。
【0133】
【数55】
Figure 0003828048
このうち上から4つのフィルタは改良前の前提技術におけるフィルタとほぼ同じで、輝度の特異点を色情報も残しながら保存する。最後のフィルタは色の彩度の特異点をこちらも色情報を残しながら保存する。
【0134】
これらのフィルタによって、各レベルにつき5種類の副画像(サブイメージ)が生成される。なお、最も高いレベルの副画像は元画像に一致する。
【0135】
【数56】
Figure 0003828048
[3.2]エッジ画像およびその副画像
輝度微分(エッジ)の情報をマッチングに利用するため、一次微分エッジ検出フィルタを用いる。このフィルタはあるオペレータHとの畳み込み積分で実現できる。
【0136】
【数57】
Figure 0003828048
ここでHは演算スピードなども考慮し、以下のようなオペレータを用いた。
【0137】
【数58】
Figure 0003828048
次にこの画像を多重解像度化する。フィルタにより0を中心とした輝度をもつ画像が生成されるため、次のような平均値画像が副画像としては最も適切である。
【0138】
【数59】
Figure 0003828048
式59の画像は後述するForward Stage、すなわち初回副写像導出ステージの計算の際、エネルギー関数に用いられる。
【0139】
エッジの大きさ、すなわち絶対値も計算に必要である。
【0140】
【数60】
Figure 0003828048
この値は常に正であるため、多重解像度化には最大値フィルタを用いる。
【0141】
【数61】
Figure 0003828048
式61の画像は後述するForward Stageの計算の際、計算する順序を決定するのに用いられる。
【0142】
[3.3]計算処理手順
計算は最も粗い解像度の副画像から順に行う。副画像は5つあるため、各レベルの解像度において計算は複数回行われる。これをターンと呼び、最大計算回数をtで表すことにする。各ターンは前記Forward Stageと、副写像再計算ステージであるRefinement Stageという二つのエネルギー最小化計算から構成される。図18は第mレベルにおける副写像を決める計算のうち改良点に係るフローチャートである。
【0143】
同図のごとく、sをゼロクリアする(S40)。つぎにForward Stage(S41)において始点画像pから終点画像qへの写像f( m,s )をエネルギー最小化によって求める。ここで最小化するエネルギーは、対応する画素値によるエネルギーCと、写像の滑らかさによるエネルギーDの線形和である。
【0144】
エネルギーCは、輝度の差によるエネルギーC(前記改良前の前提技術におけるエネルギーCと等価)と、色相、彩度によるエネルギーC、輝度微分(エッジ)の差によるエネルギーCで構成され、それぞれ次のように表される。
【0145】
【数62】
Figure 0003828048
エネルギーDは前記改良前の前提技術と同じものを用いる。ただし前記改良前の前提技術において、写像の滑らかさを保証するエネルギーEを導出する際、隣接する画素のみを考慮していたが、周囲の何画素を考慮するかをパラメータdで指定できるように改良した。
【0146】
【数63】
Figure 0003828048
次のRefinement Stageに備えて、このステージでは終点画像qから始点画像pへの写像g(m,s)も同様に計算する。
【0147】
Refinement Stage(S42)ではForward Stageにおいて求めた双方向の写像f(m,s)およびg(m,s)を基に、より妥当な写像f’(m,s)を求める。ここでは新たに定義されるエネルギーMについてエネルギー最小化計算を行う。エネルギーMは終点画像から始点画像への写像gとの整合度Mと、もとの写像との差Mより構成される。
【0148】
【数64】
Figure 0003828048
対称性を損なわないように、終点画像qから始点画像pへの写像g’(m,s)も同様の方法で求めておく。
【0149】
その後、sをインクリメントし(S43)、sがtを超えていないことを確認し(S44)、次のターンのForward Stage(S41)に進む。その際前記Eを次のように置き換えてエネルギー最小化計算を行う。
【0150】
【数65】
Figure 0003828048
[3.4]写像の計算順序
写像の滑らかさを表すエネルギーEを計算する際、周囲の点の写像を用いるため、それらの点がすでに計算されているかどうかがエネルギーに影響を与える。すなわち、どの点から順番に計算するかによって、全体の写像の精度が大きく変化する。そこでエッジの絶対値画像を用いる。エッジの部分は情報量を多く含むため、エッジの絶対値が大きいところから先に写像計算を行う。このことによって、特に二値画像のような画像に対して非常に精度の高い写像を求めることができるようになった。
【0151】
[画像符号化と復号に関する実施の形態]
前提技術ではキーフレーム間のマッチングをとって対応情報を生成し、この対応情報をもとに中間フレームを生成した。したがって、この技術は動画の圧縮に利用でき、現実に実験ではMPEGを超える画質と圧縮率の両立が確認されはじめている。以下、前提技術を利用した画像符号化および復号技術を説明する。
【0152】
図19は実施の形態の係る画像符号化装置10の構成を示す。画像符号化装置10は、キーフレームKFのデータを入力する画像入力部12と、キーフレームをレイヤーに分割するレイヤー生成部14と、レイヤー分割されたキーフレームKF(l)およびレイヤーどうしの相対位置情報を含むレイヤー構造情報LSを記憶するレイヤー情報記憶部16と、隣接キーフレーム間で前提技術その他によるマッチング計算をレイヤーごとに行い対応情報ファイルCij(l)を生成するレイヤー別対応情報生成部18と、キーフレームデータとレイヤーごとの対応情報ファイルCij(l)とレイヤー構造情報LSとを組み込んで符号化データストリームCBS(Coded Bit Stream:以下単にデータストリームという)を生成するデータストリーム生成部20を含む。
【0153】
キーフレームは例えば動画のフレームを0.5秒おきに抽出することで定められ、画像入力部12よりレイヤー生成部14へ送られる。レイヤー生成部14では、キーフレームのエッジ検出を行いオクルージョンの有無を判定することにより、オブジェクトの切り分けおよびそれらの相対位置情報を取得する。その情報をもとにオブジェクトと対応するようにフレームをレイヤーに分割する。図20はi番目のキーフレームKFをL枚のレイヤーKF(1)からKF(L)に分割する概念図を示している。この図はオブジェクトの奥行き方向の相対位置をもとにレイヤー分割した場合を想定しているが、さらに同一平面上のオブジェクトの上下左右の相対位置を考慮したレイヤー構造をとってもよい。以降、KFのl番目のレイヤーをKF(l)と表す。
【0154】
画像入力部12に入力されたキーフレームデータに、アニメーションのセル画の如きレイヤー情報、またはコンピュータグラフィックスにおける3次元情報の如きオブジェクト情報が組み込まれている場合に対応して、レイヤー生成部14には、それらの情報を検出するレイヤー情報検出部を設け、それと対応するようにレイヤー分割してもよい。さらに、レイヤー情報、オブジェクト情報、分割後のレイヤー構造などを、人手または所定の機器を介して直接入力し、それをもとにレイヤー分割を行うレイヤー情報入力機能を設けてもよい。
【0155】
さらにレイヤー生成部14は、複数のキーフレームを順次レイヤーに分割し、その階層構造が全てのレイヤーで同一になるよう調整する、レイヤー構造調整機能を含む。例えばあるキーフレーム以降オブジェクトの数が増加し、それに対応してレイヤーを増やす必要が生じた場合、それ以前のキーフレームのレイヤー階層にも当該位置にレイヤーを挿入する。この場合、オブジェクトが増える前のキーフレームには画素のないダミーのレイヤーが含まれることになる。これは、同じオブジェクトに対応したレイヤーが全てのキーフレームで同じ位置にあるようにするための処理であるため、装置のもつデータ構造が許容すれば、ダミーレイヤーに対して画素を格納するデータ領域を割り当てる必要はない。図21は調整を行った後のレイヤー構造の概念図を示している。同図ではキーフレームごとにL枚のレイヤーに分割しており、I枚のキーフレームに対してI×Lのレイヤーマトリクスが形成されている。
【0156】
前記の例では、オブジェクトの数に応じて最も多いレイヤーをもつキーフレームに全てのキーフレームのレイヤー数を合わせたが、オブジェクトの大きさやオクルージョン領域の面積などを考慮し、分割しなくてもよいレイヤーを統合するなどして、レイヤー数を減らす調整を行ってもよい。
【0157】
レイヤー生成部14でレイヤー分割されたキーフレームデータは、前記レイヤーマトリクス構造を含むレイヤー構造情報LSとともにいったんレイヤー情報記憶部16に格納される。
【0158】
一方、それらのデータはレイヤー別対応情報生成部18にも送られ、レイヤーごとにマッチング計算を施される。このマッチング計算は、前提技術または別の任意の技術に基づき、特異点をもとに画素単位でふたつのキーフレーム間のマッチングをレイヤーごとに計算する。図22はキーフレーム数I、レイヤー数Lのマッチングを行う手順を示すフローチャートである。この処理手順の大略は、隣接する第1、第2のキーフレームのうち第1のキーフレームの最も後方にあるレイヤーから前方のレイヤーへとマッチングを行い、第1のキーフレームのレイヤーと、そのレイヤーより後方にある第2のキーフレームのレイヤーとのマッチング計算を禁止することである。まず、隣接するキーフレームKFとKFi+1のマッチングをi=1(S50)から順次レイヤーごとに行う。ここでlおよびmはそれぞれKFとKFi+1のレイヤー順を示す変数であり、図20の如く最下層すなわち視点に対して最も奥にあるレイヤーを1とし、最大値はLとなる。まずlおよびmに1を代入し(S51)、レイヤーKF(1)とレイヤーKFi+1(m)のマッチング計算(S52)を、1≦m≦Lの範囲で行う(S54)。次にlをインクリメントし(S55)、KF(2)とKFi+1(m)とのマッチング計算を行うが(S52)、このときは2≦m≦Lの範囲(S56,S54)で行う。同様にKF(l)とKFi+1(m)(l≦m≦L)とのマッチング計算を繰り返す。lがLを超えた時点(S57)でiをインクリメントし(S58)次なる隣接キーフレームで同様の計算を繰り返す。終点画像が最終キーフレームを超えた時点(S59)で終了する。始点画像のレイヤーlによって終点画像のレイヤーmの範囲を制限する理由は後に述べる。
【0159】
図23はI=3、L=3の場合におけるレイヤー別マッチング手法を具体的に示している。このキーフレーム内には球形の“オブジェクトA”、円錐の“オブジェクトB”が存在するため、レイヤー生成部14にて、“背景”をl=1のレイヤー、“オブジェクトB”をl=2のレイヤー、“オブジェクトA”をl=3のレイヤーにそれぞれ対応させることにより、レイヤー分割がなされている。最前のレイヤーであるl=3を除き、各レイヤーには前方のオブジェクトによるオクルージョン領域が存在し、この領域には画素値がない状態となる。
【0160】
まずKFのレイヤーからKFのレイヤーへの対応点を求める。このときKF(1)のレイヤーはKF(1)、KF(2)、KF(3)の各レイヤーとマッチング計算を行い、例えば始点(x1,1,y1,1)の対応点をKF(1)上の(x1,1’,y1,1’)に見出す。次にKF(2)のレイヤーはKF(1)とのマッチング計算を行わずに、KF(2)、KF(3)の各レイヤーとマッチング計算を行う。これは図22においてマッチングを行う際、終点画像のレイヤーをl≦m≦Lの範囲に制限したことに対応する。KF(2)とKF(1)とのマッチング計算を禁止するのは、KF(2)の“オブジェクトB”の対応点がKF(1)の“背景”に存在することは、オクルージョンを考慮してもあり得ないからである。これを禁止することにより、画素値や位置が近いがまったく別のオブジェクト上に誤った対応点を見出す可能性が低くなり、例えば“オブジェクトB”が“背景”に溶け込んでしまうような中間画像の生成を防止できる。
【0161】
KF(2)とKF(3)とのマッチング計算を行うのは、KF(2)の画素のない部分に終点を決定するための処理である。例えば図23においてKF(2)上の(x2,2,y2,2)の対応点はKF(2)上ではオブジェクトAによるオクルージョンにより画素が存在しない。KF(3)とのマッチング計算では例えば色情報を無視して周囲の対応点との位置関係のみを考慮する、具体的には前提技術においてエネルギー最小化計算を行う際、写像の滑らかさを保証するエネルギーDのみを計算対象とする、といった方法により対応点を見出す。図23では、(x3,2’,y3,2’)が対応点となっている。この点は本来、“オブジェクトB”の一部がオクルージョンにより見えなくなっているために、“オブジェクトA”に対応したレイヤー上に設けた仮の対応点であり、以降「仮想対応点」と呼ぶ。仮想対応点が決定したら、“オブジェクトB”に対応したレイヤーKF(2)上の、仮想対応点と同一の座標(x2,2’,y2,2’)を(x2,2,y2,2)の最終的な対応点として決定する。このようにして、終点がオクルージョン領域内にあっても、始点画像の全ての画素について同じ階層のレイヤー上に対応点を決定することができる。これにより対応情報を正確に取得することができ、オクルージョンの影響を受けて中間画像に歪みが生じる可能性を低くすることができる。
【0162】
上記の例では仮想対応点として、1つ上層のレイヤーKF(3)上の画素を介して最終的な対応点を決定したが、位置情報のみを考慮するマッチング手法によっては、同一階層のレイヤーKF(2)上の画素のない領域に直接対応点の座標を求めてもよい。この場合は、全ての隣接キーフレームに対して、同じ位置のレイヤーどうしのマッチング計算のみをそれぞれ行えばよい。
【0163】
次にKF(3)とKF(3)とのマッチング計算を行い、対応点を見出す。前述したとおり、KF(3)上にはKF(2)の仮想対応点が存在するが、この点はKF(3)の画素の対応点にもなるはずである。このとき同点は、KF(3)の画素の対応点として採用する。
【0164】
このようにしてKFとKFのマッチング計算をレイヤーごとに行い、最上レイヤーまで終了しても、一対一対応にならない場合がある。それはKFのレイヤーにはオクルージョンにより画素がなく、KFのレイヤーには画素が存在する場合である。例えば、図23のKF(1)上の点(x1,2’,y1,2’)はKF(1)に存在する画素のどれとも対応しない、つまり始点が存在しない。このときは、始点の存在しないKFのレイヤー上の座標を逐次記憶しながら、KFとKFとのマッチング計算を進行させ、終了後、KFとKFとのマッチング計算を開始する。このマッチング計算によって、以前に記憶した始点の存在しない点、例えばKF(1)上の点(x1,2’,y1,2’)の、KF(1)上の対応点(x1,2’’,y1,2’’)が見出されたとすると、これら2点の対応情報をもとにして、KF(1)からKF(1)への対応情報を推測し、(x1,2’,y1,2’)の始点が(x1,2,y1,2)にあることを決定できる。ここでは、始点のないキーフレームKFの次にある隣接するキーフレーム、KFおよびKFの対応情報を用いたが、始点のないキーフレームを挟んだ2つのキーフレームや、隣接しない2つのキーフレームの対応情報を取得し、それをもとに始点を決定してもよい。
【0165】
始点に画素がないレイヤーの始点座標の求め方は、上記の方法の他、終点のキーフレームから始点のキーフレームへの逆写像を考えて、前述した仮想対応点を用いて計算してもよい。図23の例ではKF(1)とKF(3)とのマッチング計算を行い、KF(3)上に見出された仮想対応点をもとにKF(1)上に始点を決定する。
【0166】
同様のステップを繰り返し、隣接するキーフレームの対応情報をレイヤーごとに取得して、一連の対応情報ファイルCij(l)を作成する。レイヤー情報記憶部16に格納した、レイヤー分割されたキーフレームKF(l)と、レイヤー構造情報LSは、レイヤー別対応情報生成部18で生成された対応情報ファイルCij(l)とともにデータストリーム生成部20へ送られ、データストリームとして出力される。ここでデータストリームに組み込まれるキーフレームは、レイヤー分割されたものに限定されず、画像入力部12に入力された分割前のキーフレームでもよい。
【0167】
図24は実施の形態に係る画像復号装置40の構成図である。画像復号装置40は、符号化されたデータストリームCBSを入力するストリーム入力部42と、データストリームCBSに組み込まれているレイヤー分割されたキーフレームデータKF(l)とレイヤー構造情報LSとレイヤー別の対応情報ファイルCij(l)とを格納するレイヤー情報記憶部44と、前提技術その他による補間計算によってレイヤーごとに中間フレームを生成するレイヤー別中間画像生成部46と、レイヤーごとの中間フレームおよびレイヤー分割されたキーフレームをそれぞれ合成して中間フレームおよびキーフレームを生成する画像合成部48と、キーフレームおよび中間フレームを表示させるための表示制御部50を含む。
【0168】
同図において、レイヤー別中間画像生成部46では、レイヤー情報記憶部44に格納されたデータから、レイヤー構造情報LSを参照しながら、隣接する2つのキーフレームの同じ階層にあるレイヤーKF(l)およびKF(l)とそれらの対応情報Cij(l)とを抽出し、それらのレイヤーの中間画像KFij(l)を生成して画像合成部48へと送出する。本実施形態のレイヤー別対応情報は、本来オクルージョンにより見えない領域、つまりレイヤー中、画素のない領域の位置情報のみを指定して対応点としている場合がある。そのようなレイヤーとの中間画像の生成にあたっては、同一階層にある別のキーフレームのレイヤー上で、その点と対応関係が繋がっており、かつ画素値をもつ点を複数検出し、画素値を補間、または外挿することにより、中間画像の画素値を決定する。または、同様の点を1つ検出して、その周囲の点との相対位置と画素値の関係をもとに、それらの点の対応情報を利用することにより中間画像の画素値を決定してもよい。
【0169】
KFとKFの全てのレイヤーに対して中間画像が生成されたら、画像合成部48で最も奥にあるレイヤーから重ね合わせて合成画像を生成する。ここでは3次元グラフィックスにおけるZバッファ法と同様の手法を用いる。このとき、レイヤー別中間画像生成部46にてオクルージョンを含む領域に画素値を設定したため、同じ座標に異なる画素値をもつレイヤーが複数存在するが、レイヤー構造情報LSを参照し、より前面にあるレイヤーの画素値を優先的に選択する。このように中間画像で画素値を補填し、レイヤー構造に基づき順次重ね合わせていくことにより、とくにオクルージョン領域近傍の画像をより鮮明に出力することができる。
【0170】
一方、レイヤー分割されたキーフレームデータはレイヤー情報記憶部44から画像合成部48に送られ、前記中間画像の合成と同様の処理により合成画像、すなわち画像符号化装置で入力された元のキーフレームデータと同じデータに変換される。レイヤーを合成して生成された中間画像とキーフレームは表示制御部50に送られ、出力順などに適宜並べ替えられる。
【0171】
前記実施例では、レイヤー別中間画像生成部46で生成された中間画像を順次画像合成部48へ送出したが、それらのデータを一時保存し、中間画像とキーフレームとからなるレイヤーマトリクスを完成したあとで画像合成部48に送る機能ブロックを設けてもよい。
【0172】
また画像復号装置40には、入力されたデータストリームに組み込まれたキーフレームデータがレイヤー分割されていない場合を考慮し、レイヤー構造情報LSに基づいてキーフレームを同一の階層構造をもつレイヤーに分割するレイヤー生成部をストリーム入力部42の出力側に設けてもよい。この場合は、キーフレームに対する合成処理を行う必要がないため、レイヤー分割されていないキーフレームデータがストリーム入力部42からそのまま表示制御部50へ送られる。
【0173】
上記実施の形態は、オブジェクトの相対位置が途中で入れ替わった場合にも応用することができる。たとえばオブジェクトの前後関係があるキーフレームで逆転したとき、図19における画像符号化装置10のレイヤー生成部14で生成されるレイヤーは、同じオブジェクトが隣接する2つのキーフレームの異なる階層のレイヤーに存在する状態となる。レイヤー生成部14には、エッジ検出結果をもとにオブジェクトとレイヤーとの対応を監視する機能を設け、レイヤー順に対してオブジェクトが入れ替わっている状態が発生した始点画像および終点画像のレイヤーにフラグをたてるようにする。それらのレイヤーについてはマッチング手順を変更する。たとえば、KF(l)、KF(M)(l≠M,j=i+1)のレイヤーに同じオブジェクトが存在するとする。考慮している状況は、複数のオブジェクトの相対位置の入れ替わりであるから、このときは少なくとももう1組の階層の異なるレイヤー、例えばKF(M)とKF(l)にもう一方のオブジェクトが存在するはずであるが、計算手順は同様であるからここでは片方のみを説明する。レイヤー別対応情報生成部18において前記KF(l)の対応点をマッチング計算によって求めるときは、始点画像のレイヤーlに対する終点画像のレイヤーmに、前述したl≦m≦Lの制限は用いず、M≦m≦Lの範囲、すなわち終点画像において当該オブジェクトが存在するレイヤーMおよびその前方にある全てのレイヤー上に対応点を求める。前方にあるレイヤーに対応点が見出された場合、その点は仮想対応点であるため、前記発明の形態と同様、当該オブジェクトが存在するレイヤー上の、仮想対応点と同一の座標を対応点として決定する。このとき対応情報ファイルは、前記発明の形態で表されたCij(l)ではなく、Cij(l,M)のデータ構造をとる必要がある。
【0174】
次に画像復号装置では以下の手続きを行う。図24において、レイヤー別中間画像生成部46では、データストリームに組み込まれた対応情報ファイルCij(l,M)をもとに同じオブジェクトを含むレイヤーKF(l)、KF(M)をレイヤー情報記憶部44から読み出し、同オブジェクトの中間画像KFij(l,M)を前記実施の形態と同様に求める。こうして生成された中間画像にはオクルージョンの情報がないため、中間画像どうしの前後関係がわからない。そこで、オブジェクトの前後関係が入れ替わったレイヤーすなわちKF(l)とKF(M)、またはさらにその前後の複数のキーフレームのレイヤーをもとに当該オブジェクトの変化の割合、すなわち動画においてはその移動速度を計算し、前後関係が入れ替わった瞬間がKF(l)とKF(M)間のどの時点かを推測することにより、その時点の前後で中間画像のレイヤー順序を入れ替え、画像合成部48で中間画像の合成を行う。
【0175】
上述の方法は、オブジェクトが入れ替わったレイヤーにのみ適用してもよいし、入れ替わっていないレイヤーに対してM=lを代入することにより、全てのレイヤーに適用してもよい。入れ替わっていないレイヤーに対しては当然、画像復号時にオブジェクトの入れ替わりに係る計算を省略してよい。
【0176】
以上、実施の形態をもとに本発明を説明した。なお本発明はこの実施の形態に限定されることなく、そのさまざまな変形例もまた、本発明の態様として有効である。
【図面の簡単な説明】
【図1】 図1(a)とは図1(b)は、ふたりの人物の顔に平均化フィルタを施して得られる画像、図1(c)と図1(d)は、ふたりの人物の顔に関して前提技術で求められるp(5,0)の画像、図1(e)と図1(f)は、ふたりの人物の顔に関して前提技術で求められるp(5,1)の画像、図1(g)と図1(h)は、ふたりの人物の顔に関して前提技術で求められるp(5,2)の画像、図1(i)と図1(j)は、ふたりの人物の顔に関して前提技術で求められるp(5,3)の画像をそれぞれディスプレイ上に表示した中間調画像の写真である。
【図2】 図2(R)はもとの四辺形を示す図、図2(A)、図2(B)、図2(C)、図2(D)、図2(E)はそれぞれ相続四辺形を示す図である。
【図3】 始点画像と終点画像の関係、および第mレベルと第m−1レベルの関係を相続四辺形を用いて示す図である。
【図4】 パラメータηとエネルギーCの関係を示す図である。
【図5】 図5(a)、図5(b)は、ある点に関する写像が全単射条件を満たすか否かを外積計算から求める様子を示す図である。
【図6】 前提技術の全体手順を示すフローチャートである。
【図7】 図6のS1の詳細を示すフローチャートである。
【図8】 図7のS10の詳細を示すフローチャートである。
【図9】 第mレベルの画像の一部と、第m−1レベルの画像の一部の対応関係を示す図である。
【図10】 前提技術で生成された始点階層画像を示す図である。
【図11】 図6のS2に進む前に、マッチング評価の準備の手順を示す図である。
【図12】 図6のS2の詳細を示すフローチャートである。
【図13】 第0レベルにおいて副写像を決定する様子を示す図である。
【図14】 第1レベルにおいて副写像を決定する様子を示す図である。
【図15】 図12のS21の詳細を示すフローチャートである。
【図16】 あるf(m,s)についてλを変えながら求められたf(m,s)(λ=iΔλ)に対応するエネルギーC(m,s) の挙動を示す図である。
【図17】 ηを変えながら求められたf(n)(η=iΔη)(i=0,1,…)に対応するエネルギーC(n) の挙動を示す図である。
【図18】 改良後の前提技術において第mレベルにおける副写像を求めるフローチャートである。
【図19】 実施の形態に係る画像符号化装置の構成図である。
【図20】 あるキーフレームKFをL枚のレイヤーに分割する概念図である。
【図21】 複数のキーフレームのレイヤーが同一階層構造となるように調整した後のレイヤーマトリクスを示す概念図である。
【図22】 レイヤーごとに対応情報を取得する際のマッチング計算順序を示すフローチャートである。
【図23】 レイヤーごとに対応情報を取得する際の対応点の求め方を示す原理説明図である。
【図24】 実施の形態に係る画像復号装置の構成図である。
【符号の説明】
10 画像符号化装置、 12 画像入力部、 14 レイヤー生成部、 16 レイヤー情報記憶部、 18 レイヤー別対応情報生成部、 20 データストリーム生成部、 40 画像復号装置、 42 ストリーム入力部、 46レイヤー別中間画像生成部、 48 画像合成部。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image encoding and decoding technique, and more particularly to a technique that uses key frames and corresponding point information between them.
[0002]
[Prior art]
MPEG (Motion Picture Expert Group), the de facto global standard for video compression, has expanded its target area from storage media such as CDs to transmission media such as networks and broadcasts. Broadcast digitalization cannot be considered without compression encoding technology centered on MPEG. Broadcasting and communication barriers have collapsed, and the diversification of service businesses has become essential, and it is difficult to predict how the digital culture will progress in the broadband era.
[0003]
[Problems to be solved by the invention]
Even in such chaos, there are certain things about the direction of video compression technology. That is, both higher compression ratio and image quality are compatible. As is well known in the art, block compression may prevent high compression.
[0004]
The present invention has been made in view of such circumstances, and an object of the present invention is to provide an encoding technique and decoding that realize high-quality image quality while simultaneously compressing image data with high efficiency and eliminating image distortion and color ambiguity. It is in the provision of technology.
[0005]
[Means for Solving the Problems]
Hereinafter, the image encoding technique and the image decoding technique of the present invention will be described mainly for moving images, but the application is not limited to moving images, such as video effects such as morphing and walkthrough.
[0006]
One embodiment of the present invention relates to an image encoding method. The method includes dividing a plurality of key frame images into layers, performing matching processing on adjacent key frame data for each layer, and generating correspondence information between key frames for each layer, and including.
[0007]
Here, “key frame” is a frame to be subjected to matching and other processing, and “frame” is a unit of an image. However, unless otherwise required, this is not distinguished from “image”.
[0008]
The method may further include a step of generating a data stream including key frame data, correspondence information for each layer, and relative position information between layers.
[0009]
Further, the step of generating the correspondence information includes a step of multi-resolutioning them by extracting singular points from the two layers, and a step of calculating matching between the layers between the same resolution levels, for example, in units of pixels. And finally obtaining a pixel unit correspondence at the finest resolution level while inheriting the result of the matching calculation at different resolution levels.
[0010]
Another aspect of the present invention relates to an image decoding method. The method includes a step of obtaining a data stream including key frame data, a correspondence information file for each layer of the key frame, and relative position information between the layers, and adjacent keys from each layer of the key frame and the correspondence information file. The method includes a step of generating an intermediate image between frames for each layer, and a step of synthesizing the intermediate image generated for each layer.
[0011]
Yet another embodiment of the present invention relates to an image encoding device. This device performs a matching process for each layer on the data of adjacent key frames and a layer generation unit that divides a plurality of key frame images into layers, and generates correspondence information between key frames for each layer. And a layer-specific correspondence information generation unit.
[0012]
The apparatus may further include a data stream generation unit that generates a data stream including key frame data, correspondence information for each layer, and relative position information between layers.
[0013]
In order to divide an image into layers, for example, the following method can be cited.
[0014]
1. Based on the result of edge detection of a plurality of key frames and the result of determining the presence or absence of occlusion, information on the relative position between objects is acquired, and an image is divided in association with the object based on this information.
2. Layer information attached to the image is detected, and the image is divided based on the detected layer information.
[0015]
The layer generation unit may also include a function of adjusting so that all key frames are layers having the same hierarchical structure. Here, the hierarchical structure is a structure based on the number of layers and the relative position information of the layers. The relative position information includes not only the relative position with respect to the depth of the image but also the positional relationship of the upper, lower, left and right on the same plane. It is.
[0016]
The layer-specific correspondence information generation unit performs matching processing on the adjacent first and second key frames according to the following rules, for example.
[0017]
1. The matching calculation is sequentially performed from the most rearward layer to the front layer of the first key frame.
2. Matching calculation between the layer of the first key frame and the layer of the second key frame behind the layer is prohibited.
3. A matching calculation is performed between the first key frame layer and the second key frame layer that is at the same position as the first key frame or in front of the first key frame layer. When the corresponding point of the layer image of one key frame is found, the corresponding point is stored as the corresponding point to the layer at the same position as the layer of the first key frame.
4). Even if the matching calculation of the first layer in the first key frame is completed, the pixels in the second key frame for which the corresponding point from the first key frame was not found are key frames other than the first key frame. Corresponding points are determined on the corresponding layer of the first key frame based on the correspondence information obtained by performing the matching calculation.
[0018]
Yet another embodiment of the present invention relates to an image decoding device. This apparatus includes an input unit for inputting a data stream including key frame data, a correspondence information file for each layer of key frames, and relative position information between layers, and adjacent to each layer of key frames and the correspondence information file. A layer-by-layer intermediate image generating unit that generates an intermediate image between key frames for each layer; and an intermediate image combining unit that combines the intermediate images generated for each layer.
[0019]
This apparatus may include a layer generation unit that adjusts key frame data incorporated in an input data stream so as to have the same hierarchical structure as a layer of a corresponding information file incorporated in the data stream.
[0020]
In addition, the intermediate image composition unit predetermines a predetermined rule such as preferentially selecting a pixel in a layer ahead in accordance with the relative position information of a layer when pixels of a plurality of layers overlap the same pixel. An intermediate image between adjacent key frames is generated by combining the layers based on the layers.
[0021]
Among the above modes, the part for generating corresponding point information between key frames and the part for generating an intermediate image using the same are the techniques previously proposed by the present applicant in Japanese Patent No. 2927350 (hereinafter, “ Technology ").
[0022]
It is also effective as the present invention to arbitrarily replace the above configurations and processes, to replace or add part or all of the expression between the method and the apparatus, or to change the expression to a computer program, a recording medium, or the like. It is.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
First, the multi-resolution singularity filter technique used in the embodiment and the image matching process using the technique will be described in detail as a “premise technique”. These techniques are the techniques for which the present applicant has already obtained Patent No. 2927350, and are most suitable for combination with the present invention. However, the image matching technique that can be employed in the embodiment is not limited to this. From FIG. 19 onward, the image data encoding and decoding technology using the prerequisite technology will be described in detail.
[0024]
[Embodiment of prerequisite technology]
First, the elemental technology of the prerequisite technology is described in detail in [1], and the processing procedure is specifically described in [2]. In [3], the point of improvement based on the prerequisite technology is described.
[0025]
[1] Details of elemental technology
[1.1] Introduction
A new multi-resolution filter called a singularity filter is introduced to accurately calculate matching between images. No prior knowledge of objects is required. The matching between images is calculated at each resolution as it proceeds through the resolution hierarchy. At that time, the resolution hierarchy is traced in order from the coarse level to the fine level. The parameters required for the calculation are set completely automatically by dynamic calculations similar to the human visual system. There is no need to manually identify corresponding points between images.
[0026]
The base technology can be applied to, for example, fully automatic morphing, object recognition, stereoscopic photogrammetry, volume rendering, and generation of a smooth moving image from a small number of frames. When used for morphing, a given image can be automatically transformed. When used for volume rendering, an intermediate image between cross sections can be accurately reconstructed. The same applies to the case where the distance between the cross sections is long and the shape of the cross section changes greatly.
[0027]
[1.2] Hierarchy of singularity filters
The multi-resolution singularity filter according to the base technology can store the brightness and position of each singularity included in the image while reducing the resolution of the image. Here, the width of the image is N, and the height is M. For simplicity, N = M = 2n(N is a natural number). The section [0, N] NR is described as I. The pixel of the image at (i, j) is p(I, j)(I, jεI).
[0028]
Here, a multi-resolution hierarchy is introduced. The hierarchized image group is generated by a multi-resolution filter. The multi-resolution filter performs a two-dimensional search on the original image to detect singular points, and generates another image having a lower resolution than the original image even if the detected singular points are extracted. . Here, the size of each image at the m-th level is 2m× 2m(0 ≦ m ≦ n). The singularity filter recursively constructs the following four types of new hierarchical images in a direction descending from n.
[0029]
[Expression 1]
Figure 0003828048
Where
[Expression 2]
Figure 0003828048
And Hereinafter, these four images are called sub-images. minx ≦ t ≦ x + 1, Maxx ≦ t ≦ x + 1Is described as α and β, respectively, the sub-images can be described as follows.
[0030]
P(M, 0)= Α (x) α (y) p(M + 1,0)
P(M, 1)= Α (x) β (y) p(M + 1,1)
P(M, 2)= Β (x) α (y) p(M + 1, 2)
P(M, 3)= Β (x) β (y) p(M + 1,3)
That is, these are considered to be like tensor products of α and β. Each sub-image corresponds to a singular point. As is clear from these equations, the singularity filter detects a singularity for each block composed of 2 × 2 pixels in the original image. At this time, a point having the maximum pixel value or the minimum pixel value is searched for in two directions of each block, that is, vertical and horizontal. As the pixel value, luminance is adopted in the base technology, but various numerical values relating to the image can be adopted. The pixel with the maximum pixel value in both directions is the maximum point, the pixel with the minimum pixel value in both directions is the minimum point, the maximum pixel value in one of the two directions, and the minimum pixel value in the other direction Are detected as saddle points.
[0031]
The singularity filter reduces the resolution of the image by representing the image (4 pixels here) of the block with the image (1 pixel here) of the singularity detected inside each block. From a theoretical point of view of singular points, α (x) α (y) preserves the minimum point, β (x) β (y) preserves the maximum point, α (x) β (y) and β (x) α (y) preserves saddle points.
[0032]
First, a singular point filtering process is separately performed on a start point (source) image and an end point (destination) image to be matched, and a series of images, that is, a start point layer image and an end point layer image are generated. Four types of start point hierarchical images and end point hierarchical images are generated corresponding to the types of singular points.
[0033]
Thereafter, the starting point hierarchical image and the end point hierarchical image are matched in a series of resolution levels. First p(M, 0)Is used to match the local minimum points. Next, based on the result, p(M, 1)The saddle point is matched using(M, 2)Is used to match other saddle points. And finally p(M, 3)Is used to match local maxima.
[0034]
1 (c) and 1 (d) are sub-images p of FIGS. 1 (a) and 1 (b), respectively.(5,0)Is shown. Similarly, FIG. 1 (e) and FIG.(5, 1)FIG. 1 (g) and FIG.(5, 2)1 (i) and 1 (j) show p(5, 3)Respectively. As can be seen from these figures, the sub-image facilitates the matching of the feature portions of the image. First p(5,0)The eyes become clear. This is because the eyes are the minimum brightness points in the face. p(5, 1)According to the mouth becomes clear. This is because the mouth is low in luminance in the horizontal direction. p(5, 2)According to this, the vertical lines on both sides of the neck become clear. Finally, p(5, 3)Makes the brightest point of the ears and cheeks clear. This is because these are the maximum points of luminance.
[0035]
The feature of the image can be extracted by using the singularity filter. For example, by comparing the feature of the image captured by the camera with the features of several objects recorded in advance, the subject reflected in the camera can be identified. can do.
[0036]
[1.3] Calculation of mapping between images
The pixel at the position (i, j) of the starting point image is p(N) (I, j)Similarly, the pixel at the position (k, l) of the end point image is q(N) (K, l)Describe in. Let i, j, k, lεI. Defines the energy of mapping between images (described later). This energy is determined by the difference between the luminance of the pixel of the start point image and the luminance of the corresponding pixel of the end point image, and the smoothness of the mapping. P with minimum energy first(M, 0)And q(M, 0)Map f between(M, 0): P(M, 0)→ q(M, 0)Is calculated. f(M, 0)P with minimum energy based on(M, 1), Q(M, 1)Map f between(M, 1)Is calculated. This procedure is p(M, 3)And q(M, 3)Map f between(M, 3)Continue until the calculation of is completed. Each map f(M, i)(I = 0, 1, 2,...) Is called a submapping. f(M, i)For convenience of calculation, the order of i can be rearranged as follows: The reason why the rearrangement is necessary will be described later.
[0037]
[Equation 3]
Figure 0003828048
Here, σ (i) ε {0, 1, 2, 3}.
[0038]
[1.3.1] bijection
When the matching between the start point image and the end point image is expressed by mapping, the mapping should satisfy the bijection condition between the two images. This is because there is no conceptual superiority or inferiority between the two images, and the pixels of each other should be connected bijectively and injectively. However, unlike the normal case, the map to be constructed here is a bijective digital version. In the base technology, a pixel is specified by a grid point.
[0039]
The mapping from the start point sub-image (sub-image provided for the start-point image) to the end-point sub-image (sub-image provided for the end-point image) is f(M, s): I / 2nm× I / 2nm→ I / 2nm× I / 2nm(S = 0, 1,...) Where f(M, s)(I, j) = (k, l) is p of the starting image(M, s) (I, j)Is the end point q(M, s) (K, l)It means that it is mapped to. For simplicity, the pixel q when f (i, j) = (k, l) holds(K, l)Qf (i, j)Is described.
[0040]
The definition of bijection is important when data is discrete, such as pixels (grid points) handled in the base technology. Here, it is defined as follows (i, i ', j, j', k, l are all integers). First, each square region denoted by R in the plane of the starting point image,
[Expression 4]
Figure 0003828048
(I = 0, ..., 2m−1, j = 0,..., 2m-1). Here, the direction of each side (edge) of R is determined as follows.
[0041]
[Equation 5]
Figure 0003828048
This square must be mapped to a quadrilateral in the endpoint image plane by mapping f. f(M, s)The quadrilateral indicated by (R),
[Formula 6]
Figure 0003828048
Must meet the following bijective conditions:
[0042]
1. Quadrilateral f(M, s)The edges of (R) do not cross each other.
2. f(M, s)The direction of the edges of (R) is equal to those of R (clockwise in the case of FIG. 2).
3. As a relaxation condition, retraction is allowed.
[0043]
This is because unless there is any relaxation condition, the only map that completely satisfies the bijection condition is the unit map. Here f(M, s)The length of one edge of (R) is 0, that is, f(M, s)(R) may be a triangle. However, it should not be a figure with an area of 0, that is, one point or one line segment. When FIG. 2 (R) is the original quadrangle, FIG. 2 (A) and FIG. 2 (D) satisfy the bijection condition, but FIG. 2 (B), FIG. 2 (C), FIG. ) Is not satisfied.
[0044]
In an actual implementation, the following conditions may be further imposed to easily ensure that the mapping is surjective. That is, each pixel on the boundary of the start point image is mapped to a pixel occupying the same position in the end point image. That is, f (i, j) = (i, j) (where i = 0, i = 2)m−1, j = 0, j = 2m-1 on four lines). Hereinafter, this condition is also referred to as “additional condition”.
[0045]
[1.3.2] Mapping energy
[1.3.2.1] Cost related to pixel brightness
Define the energy of the map f. The purpose is to find a map that minimizes energy. The energy is mainly determined by the difference between the luminance of the pixel in the start point image and the luminance of the corresponding pixel in the end point image. That is, the map f(M, s)Energy C at point (i, j)(M, s) (I, j)Is determined by the following equation.
[0046]
[Expression 7]
Figure 0003828048
Where V (p(M, s) (I, j)) And V (q(M, s) f (i, j)) Is pixel p(M, s) (I, j)And q(M, s) f (i, j)Brightness. Total energy C of f(M, s)Is an evaluation formula for evaluating matching.(M, s) (I, j)Can be defined as the sum of
[0047]
[Equation 8]
Figure 0003828048
[1.3.2.2] Cost related to pixel location for smooth mapping
In order to obtain a smooth mapping, another energy Df for the mapping is introduced. This energy is independent of pixel brightness, and p(M, s) (I, j)And q(M, s) f (i, j)(I = 0,..., 2m−1, j = 0,..., 2m-1). Map f at point (i, j)(M, s)Energy D(M, s) (I, j)Is defined as:
[0048]
[Equation 9]
Figure 0003828048
However, the coefficient parameter η is a real number of 0 or more, and
[Expression 10]
Figure 0003828048
## EQU11 ##
Figure 0003828048
And here,
[Expression 12]
Figure 0003828048
And f (i ', j') is determined to be 0 for i '<0 and j' <0. E0Is determined by the distance between (i, j) and f (i, j). E0Prevents the pixel from being mapped to a pixel too far away. E0Is later replaced with another energy function. E1Guarantees the smoothness of the mapping. E1Is p(I, j)Represents the distance between the displacement of and the displacement of its neighboring points. Based on the above consideration, energy D, which is another evaluation formula for evaluating matchingfIs determined by the following equation.
[0049]
[Formula 13]
Figure 0003828048
[1.3.2.3] Total energy of the map
The total energy of the map, that is, the overall evaluation formula for integration of multiple evaluation formulas is λC(M, s) f+ D(M, s) fDefined by Here, the coefficient parameter λ is a real number of 0 or more. The purpose is to detect a state in which the comprehensive evaluation formula takes an extreme value, that is, to find a map that gives the minimum energy shown by the following formula.
[0050]
[Expression 14]
Figure 0003828048
Note that for λ = 0 and η = 0, the map is a unit map (ie, all i = 0,..., 2m−1 and j = 0,..., 2m-1 for f(M, s)(I, j) = (i, j)). As will be described later, since the base technology first evaluates the case of λ = 0 and η = 0, the mapping can be gradually changed from the unit mapping. Temporarily change the position of λ in the overall evaluation formula and change C(M, s) f+ ΛD(M, s) fIf λ = 0 and η = 0, the comprehensive evaluation formula is C(M, s) fIn other words, pixels that are not related to each other are associated with each other simply because the luminance is close, and the mapping becomes meaningless. Even if the map is transformed based on such a meaningless map, it does not make any sense. For this reason, consideration is given to how the coefficient parameter is given so that the unit map is selected as the best map at the start of evaluation.
[0051]
The optical flow also considers the difference in pixel brightness and the smoothness as in this base technology. However, the optical flow cannot be used for image conversion. This is because only local movement of the object is considered. A global correspondence can be detected by using a singularity filter according to the base technology.
[0052]
[1.3.3] Determination of mapping by introducing multi-resolution
A map f that gives minimum energy and satisfies the bijection condition fminIs determined using a multi-resolution hierarchy. The mapping between the start sub-image and the end sub-image is calculated at each resolution level. Starting from the top of the resolution hierarchy (the coarsest level), the mapping of each resolution level is determined taking into account the mappings of the other levels. The number of mapping candidates at each level is limited by using higher or coarser level mappings. More specifically, when determining a mapping at a certain level, a mapping obtained at one coarser level is imposed as a kind of constraint condition.
[0053]
First,
[Expression 15]
Figure 0003828048
P holds when(M-1, s) (I ', j'), Q(M-1, s) (I ', j')P(M, s) (I, j), Q(M, s) (I, j)I will call it the parent. [X] is a maximum integer not exceeding x. P(M, s) (I, j), Q(M, s) (I, j)P(M-1, s) (I ', j'), Q(M-1, s) (I ', j')Called child. The function parent (i, j) is defined by the following equation.
[0054]
[Expression 16]
Figure 0003828048
p(M, s) (I, j)And q(M, s) (K, l)Map f between(M, s)Is determined by performing an energy calculation to find the minimum. f(M, s)The value of (i, j) = (k, l) is f(M-1, s)By using (m = 1, 2,..., N), it is determined as follows. First, q(M, s) (K, l)Imposes the condition that it must be inside the next quadrilateral, and narrows down the most realistic maps that satisfy the bijective condition.
[0055]
[Expression 17]
Figure 0003828048
Where
[Formula 18]
Figure 0003828048
It is. The quadrilateral thus determined is called p below.(M, s) (I, j)Let's call it an inherited quadrilateral. Find the pixel that minimizes the energy inside the inherited quadrilateral.
[0056]
FIG. 3 shows the above procedure. In the figure, the A, B, C, and D pixels of the start point image are mapped to the end point images A ', B', C ', and D', respectively, at the (m-1) th level. Pixel p(M, s) (I, j)Is a pixel q existing inside the inherited quadrilateral A'B'C'D '(M, s) f (m) (i, j)Must be projected to With the above consideration, the mapping from the (m-1) th level mapping to the mth level mapping is performed.
[0057]
Energy E defined above0Is the submapping f at the m-th level(M, 0) To calculate
[0058]
[Equation 19]
Figure 0003828048
Also, the submapping f(M, s)The following equation is used to calculate.
[0059]
[Expression 20]
Figure 0003828048
This gives a map that keeps the energy of all submaps low. According to Equation 20, the sub-maps corresponding to different singular points are related within the same level so that the similarity between the sub-maps becomes high. Equation 19 expresses f(M, s)The distance between (i, j) and the position of the point to be projected indicates (i, j) when considered as a part of the m−1th level pixel.
[0060]
If there is no pixel satisfying the bijection condition inside the inherited quadrilateral A'B'C'D ', the following measures are taken. First, a pixel whose distance from the boundary line of A′B′C′D ′ is L (initially L = 1) is examined. If the one with the lowest energy satisfies the bijection condition, this is expressed as f(M, s)Select as the value of (i, j). Such a point is found or L is its upper limit L(M)L is increased until max is reached. L(M)max is fixed for each level m. If such a point is not found at all, a mapping in which the third condition of bijection is temporarily ignored and the area of the destination quadrilateral becomes zero is also accepted, and f(M, s)(I, j) is determined. If a point that satisfies the condition is still not found, the bijection first and second conditions are then removed.
[0061]
An approximation method using multiple resolutions is essential to determine the global correspondence between images while avoiding the mapping being affected by image details. Unless an approximation method based on multi-resolution is used, it is impossible to find a correspondence between distant pixels. In that case, the size of the image must be limited to a very small size, and only an image with small change can be handled. Furthermore, since the normal mapping requires smoothness, it is difficult to find the correspondence between such pixels. This is because the energy of mapping from pixel to pixel at a distance is high. According to the approximation method using multi-resolution, an appropriate correspondence between such pixels can be found. This is because these distances are small at the upper level (coarse level) of the resolution hierarchy.
[0062]
[1.4] Automatic determination of optimum parameter values
One of the main disadvantages of existing matching techniques is the difficulty of parameter adjustment. In most cases, the parameter adjustment is performed manually, and it is extremely difficult to select an optimum value. According to the method according to the base technology, the optimum parameter value can be determined completely automatically.
[0063]
The system according to the base technology includes two parameters, λ and η. In short, λ is the weight of the difference in luminance of the pixels, and η is the stiffness of the mapping. The initial values of these parameters are 0. First, η is fixed at η = 0 and λ is gradually increased from 0. When the value of λ is increased and the value of the comprehensive evaluation formula (Equation 14) is minimized, C for each submapping(M, s) fThe value of generally decreases. This basically means that the two images must be better matched. However, when λ exceeds the optimum value, the following phenomenon occurs.
[0064]
1. Pixels that should not be associated with each other are erroneously associated with each other simply because the luminance is close.
2. As a result, the correspondence between the pixels becomes strange and the mapping starts to be broken.
3. As a result, in equation 14, D(M, s) fTries to increase rapidly. 4). As a result, the value of Equation 14 tends to increase rapidly, so D(M, s) fTo suppress the rapid increase of f(M, s)Changes, resulting in C(M, s) fWill increase.
Therefore, while maintaining the state that Equation 14 takes the minimum value while increasing λ,(M, s) fDetects a threshold value from which decrease increases to increase, and sets λ as an optimum value at η = 0. Then gradually increase η(M, s) fAnd η is automatically determined by the method described later. Λ is also determined corresponding to η.
[0065]
This method is similar to the operation of the focus mechanism of the human visual system. In the human visual system, the left and right eyes are matched while moving one eye. When an object can be clearly recognized, its eyes are fixed.
[0066]
[1.4.1] Dynamic determination of λ
λ is increased from 0 by a predetermined step size, and the submapping is evaluated each time the value of λ changes. As shown in Equation 14, the total energy is λC(M, s) f+ D(M, s) fDefined by D in Equation 9(M, s) fRepresents smoothness, which is theoretically minimized in the case of unit mapping, and E is such that the mapping is distorted.0Also E1Will also increase. E1Is an integer, so D(M, s) fThe minimum step size is 1. Therefore, the current λC(M, s) (I, j)If the change (decrease amount) is not greater than 1, the total energy cannot be reduced by changing the mapping. Because D(M, s) fIncreases by 1 or more, so λC(M, s) (I, j)This is because the total energy does not decrease unless the value of 1 decreases by 1 or more.
[0067]
Under this condition, as λ increases, C(M, s) (I, j)Indicates a decrease. C(M, s) (I, j)Is described as h (l). h (l) is energy C(M, s) (I, j)Is l2Is the number of pixels. λl2Since ≧ 1 holds, for example, l2Consider the case of = 1 / λ. λ is λ1To λ2When a minute amount changes to
[Expression 21]
Figure 0003828048
A pixels indicated by
[Expression 22]
Figure 0003828048
Changes to a more stable state with the energy of. Here, it is approximated that the energy of these pixels is all zero. This formula is C(M, s) fValue of
[Expression 23]
Figure 0003828048
Show that only changes, and as a result,
[Expression 24]
Figure 0003828048
Is established. Since h (l)> 0, usually C(M, s) fDecrease. However, when λ tries to exceed the optimum value, the phenomenon described above, namely C(M, s) fAn increase occurs. By detecting this phenomenon, the optimum value of λ is determined.
[0068]
When H (h> 0) and k are constants,
[Expression 25]
Figure 0003828048
Assuming
[Equation 26]
Figure 0003828048
Holds. At this time, if k ≠ -3,
[Expression 27]
Figure 0003828048
It becomes. This is C(M, s) f(C is a constant).
[0069]
When detecting the optimum value of λ, the number of pixels that violate the bijection condition may be inspected for further safety. Here, when determining the mapping of each pixel, p is the probability of breaking the bijection condition.0Assume that in this case,
[Expression 28]
Figure 0003828048
Therefore, the number of pixels that violate the bijection condition increases at the rate of the following equation.
[0070]
[Expression 29]
Figure 0003828048
Therefore,
[30]
Figure 0003828048
Is a constant. Suppose h (l) = HlkAssuming
[31]
Figure 0003828048
Becomes a constant. However, when λ exceeds the optimum value, the above value increases rapidly. This phenomenon is detected and B0λ3/2 + k / 2/ 2mValue is abnormal value B0thresIt is possible to determine the optimum value of λ. Similarly, B1λ3/2 + k / 2/ 2mValue is abnormal value B1thresThe pixel increase rate B that violates the third condition of bijection by checking whether or not1Confirm. Factor 2mThe reason for introducing will be described later. This system is not sensitive to these two thresholds. These thresholds are energy C(M, s) fThis observation can be used to detect excessive distortion of a map that is missed.
[0071]
In the experiment, the submapping f(M, s)When calculating λ, if λ exceeds 0.1, f(M, s)Stop calculating f(M, s + 1)Moved to the calculation. This is because a difference of only “3” in the luminance level of 255 pixels affects the submapping calculation when λ> 0.1, and it is difficult to obtain a correct result when λ> 0.1. .
[0072]
[1.4.2] Histogram h (l)
C(M, s) fThe test of is independent of the histogram h (l). It can be affected by h (l) during inspection of bijection and its third condition. Actually (λ, C(M, s) f), K is usually near 1. In the experiment, k = 1 and B0λ2And B1λ2Inspected. If the true value of k is less than 1, B0λ2And B1λ2Is not a constant and factor λ(1-k) / 2Gradually increase as you go. If h (l) is a constant, for example, the factor is λ1/2It is. However, this difference is the threshold B0thresCan be absorbed by setting correctly.
[0073]
Here, the center of the starting point image is (x0, Y0) And a circular object having a radius r.
[Expression 32]
Figure 0003828048
On the other hand, the end point image has a center (x1, Y1), An object having a radius r.
[Expression 33]
Figure 0003828048
Where c (x) is c (x) = xkSuppose that Center (x0, Y0) And (x1, Y1) Is sufficiently far away, the histogram h (l) has the form:
[Expression 34]
Figure 0003828048
When k = 1, the image shows an object with a sharp border embedded in the background. This object has a dark center and becomes brighter as you go around. When k = -1, the image represents an object with an ambiguous boundary. This object is brightest at the center and darkens as you move around. Even if you think that a general object is in between these two types of objects, you won't lose generality. Therefore, k can cover most cases with −1 ≦ k ≦ 1, and it is guaranteed that Equation 27 is generally a decreasing function.
[0074]
Note that, as can be seen from Equation 34, r is affected by the resolution of the image, i.e., r is proportional to 2 m. For this purpose, a factor of 2 m was introduced in [1.4.1].
[0075]
[1.4.3] Dynamic determination of η
The parameter η can be automatically determined by the same method. First, η = 0, and the final mapping f at the finest resolution(N)And energy C(N) fCalculate Subsequently, η is increased by a certain value Δη, and again the final mapping f at the finest resolution is obtained.(N)And energy C(N) fRecalculate This process is continued until the optimum value is obtained. η indicates the rigidity of the mapping. This is because the weight of the following equation.
[0076]
[Expression 35]
Figure 0003828048
When η is 0, D(N) fIs determined independently of the immediately preceding submap, and the current submap is elastically deformed and excessively distorted. On the other hand, when η is a very large value, D(N) fIs almost completely determined by the immediately preceding submapping. At this time, the sub-mapping is very rigid and the pixels are projected to the same location. As a result, the map becomes a unit map. When the value of η increases gradually from 0, C(N) fGradually decreases. However, when the value of η exceeds the optimum value, the energy starts to increase as shown in FIG. In the figure, the X axis is η and the Y axis is C.fIt is.
[0077]
In this way C(N) fIt is possible to obtain an optimum value of η that minimizes. However, as a result of various factors affecting the calculation compared to the case of λ, C(N) fChanges with small fluctuations. In the case of λ, the submapping is only recalculated once every time the input changes by a small amount, but in the case of η, all the submappings are recalculated. For this reason, the obtained C(N) fIt is not possible to immediately determine whether the value of is minimal. If a candidate for the minimum value is found, it is necessary to search for the true minimum value by setting a finer section.
[0078]
[1.5] Super sampling
In order to increase the degree of freedom in determining the correspondence between pixels, f(M, s)Can be expanded to R × R (R is a set of real numbers). In this case, the luminance of the pixel of the end point image is interpolated, and a non-integer point,
[Expression 36]
Figure 0003828048
F with luminance at(M, s)Is provided. That is, super sampling is performed. In the experiment, f(M, s)Is allowed to take integer and half-integer values,
[Expression 37]
Figure 0003828048
Is
[Formula 38]
Figure 0003828048
Given by.
[0079]
[1.6] Normalization of pixel brightness of each image
When the start point image and the end point image include very different objects, it is difficult to use the luminance of the original pixel as it is for the calculation of mapping. Energy C related to luminance due to large luminance difference(M, s) fThis is because it becomes too large and it is difficult to evaluate correctly.
[0080]
For example, consider the case of matching a human face and a cat face. The cat's face is covered with hair and contains very bright and very dark pixels. In this case, the sub-image is first normalized in order to calculate the sub-mapping between the two faces. That is, the brightness of the darkest pixel is set to 0, the brightest is set to 255, and the brightness of the other pixels is obtained by linear interpolation.
[0081]
[1.7] Implementation
An inductive method is used in which the calculation proceeds linearly according to the scan of the starting point image. First, for the top leftmost pixel (i, j) = (0,0) f(M, s)Determine the value of. Next, increase i by 1(M, s)Determine the value of (i, j). When the value of i reaches the width of the image, the value of j is increased by 1 and i is returned to 0. Thereafter, f is scanned along with the scan of the starting point image.(M, s)(I, j) is determined. If the correspondence of pixels is determined for all points, one map f(M, s)Is decided.
[0082]
P(I, j)Corresponding point q forf (i, j)If p is decided, then p(I, j + 1)Corresponding point qf (i, j + 1)Is decided. At this time, qf (i, j + 1)The position of q satisfies the bijection condition, so qf (i, j)Limited by position. Therefore, the priority is higher in this system as the corresponding points are determined first. If (0,0) always has the highest priority, additional deflections are added to the final mapping required. In the base technology, in order to avoid this state, f(M, s)Is determined by the following method.
[0083]
First, when (s mod 4) is 0, the starting point is (0, 0) and i and j are gradually increased. When (s mod 4) is 1, the right end point of the uppermost row is used as a starting point, and i is decreased and j is increased. When (s mod 4) is 2, the starting point is the rightmost point in the bottom row, and i and j are determined while decreasing. When (smod 4) is 3, the left end point of the bottom row is used as a starting point, and i is increased and j is decreased. Since the sub-mapping concept, that is, the parameter s does not exist at the nth level with the finest resolution, two directions are calculated continuously assuming that s = 0 and s = 2.
[0084]
In an actual implementation, by giving a penalty to a candidate that violates the bijection condition, f satisfying the bijection condition as much as possible from the candidates (k, l).(M, s)The value of (i, j) (m = 0,..., N) was selected. Candidate energy D (k, l) that violates the third condition is multiplied by φ, while candidates that violate the first or second condition are multiplied by ψ. This time, φ = 2 and ψ = 100000 were used.
[0085]
In order to check the above bijective condition, the actual procedure is (k, l) = f(M, s)The following tests were performed in determining (i, j). That is, f(M, s)For each lattice point (k, l) included in the inherited quadrilateral of (i, j), it is ascertained whether the z component of the outer product of the following equation is 0 or more.
[0086]
[39]
Figure 0003828048
Where
[Formula 40]
Figure 0003828048
[Expression 41]
Figure 0003828048
Where the vector is a three-dimensional vector and the z-axis is defined in an orthogonal right-handed coordinate system. If W is negative then D(M, s) (K, l)Is multiplied by ψ to give a penalty and avoid selecting as much as possible.
[0087]
FIG. 5A and FIG. 5B show the reason for inspecting this condition. FIG. 5A shows a candidate without a penalty, and FIG. 5B shows a candidate with a penalty. Mapping f for adjacent pixel (i, j + 1)(M, s)When determining (i, j + 1), if the z component of W is negative, there is no pixel that satisfies the bijection condition on the starting image plane. Because q(M, s) (K, l)Is because it crosses the boundary of the adjacent quadrilateral.
[0088]
[1.7.1] Submapping order
In the implementation, when the resolution level is an even number, σ (0) = 0, σ (1) = 1, σ (2) = 2, σ (3) = 3, σ (4) = 0 are used. In this case, σ (0) = 3, σ (1) = 2, σ (2) = 1, σ (3) = 0, and σ (4) = 3 were used. This effectively shuffled the submap. Note that there are essentially four types of submappings, and s is one of 0 to 3. However, in practice, processing corresponding to s = 4 was performed. The reason will be described later.
[0089]
[1.8] Interpolation calculation
After the mapping between the start point image and the end point image is determined, the luminance of the corresponding pixels is interpolated. In the experiment, trilinear interpolation was used. Square p in the starting image plane(I, j)p(I + 1, j)p(I, j + 1)p(I + 1, j + 1)Is the quadrangle q on the destination image planef (i, j)qf (i + 1, j)qf (i, j + 1)qf (i + 1, j + 1)Assuming that For simplicity, the distance between images is 1. The pixel r (x, y, t) (0 ≦ x ≦ N−1, 0 ≦ y ≦ M−1) of the intermediate image whose distance from the starting image plane is t (0 ≦ t ≦ 1) is as follows. Is required. First, the position of the pixel r (x, y, t) (where x, y, tεR) is obtained by the following equation.
[0090]
[Expression 42]
Figure 0003828048
Subsequently, the luminance of the pixel at r (x, y, t) is determined using the following equation.
[0091]
[Equation 43]
Figure 0003828048
Here, dx and dy are parameters and change from 0 to 1.
[0092]
[1.9] Mapping when imposing constraints
The determination of the mapping when there are no constraint conditions is described. However, when a correspondence is defined in advance between specific pixels of the start point image and the end point image, the mapping can be determined using this as a constraint.
[0093]
The basic idea is that the starting point image is roughly deformed by a rough mapping in which specific pixels of the starting point image are moved to specific pixels of the end point image, and then the mapping f is accurately calculated.
[0094]
First, a specific pixel of the start point image is projected onto a specific pixel of the end point image, and a rough mapping for projecting other pixels of the start point image to an appropriate position is determined. That is, a pixel that is close to a specific pixel is a mapping that is projected near the place where the specific pixel is projected. Here is a rough mapping of the mth level F(M)Is described.
[0095]
The rough map F is determined as follows. First, a mapping is specified for several pixels. N for the start imagesPixels,
(44)
Figure 0003828048
When specifying, the following values are determined.
[Equation 45]
Figure 0003828048
The displacement amount of the other pixels of the start image is p(Ih, jh)(H = 0, ..., ns-1) is an average obtained by weighting the displacement. That is, pixel p(I, j)Are projected onto the following pixels of the end point image.
[0096]
[Equation 46]
Figure 0003828048
Where
[Equation 47]
Figure 0003828048
[Formula 48]
Figure 0003828048
And
[0097]
Next, F(M)So that the candidate map f nearer has less energy(M, s) (I, j)To change. To be precise, D(M, s) (I, j)Is
[Formula 49]
Figure 0003828048
It is. However,
[Equation 50]
Figure 0003828048
And κ, ρ ≧ 0. Finally, f is completely determined by the automatic map calculation process described above.
[0098]
Where f(M, s)(I, j) is F(M)When they are close enough to (i, j), that is, their distance is
[Formula 51]
Figure 0003828048
Is within E2 (M, s) (I, j)Note that is zero. The reason for this definition is that each f(M, s)(I, j) is F(M)This is because, as long as it is sufficiently close to (i, j), it is desired to automatically determine the value so as to settle at an appropriate position in the end point image. For this reason, it is not necessary to specify an exact correspondence relationship in detail, and the start point image is automatically mapped so as to match the end point image.
[0099]
[2] Specific processing procedure
The flow of processing by each element technology of [1] will be described.
FIG. 6 is a flowchart showing the overall procedure of the base technology. As shown in the figure, first, processing using a multi-resolution singularity filter is performed (S1), and then the start point image and the end point image are matched (S2). However, S2 is not essential, and processing such as image recognition may be performed based on the characteristics of the image obtained in S1.
[0100]
FIG. 7 is a flowchart showing details of S1 of FIG. Here, it is assumed that the start point image and the end point image are matched in S2. Therefore, first, the starting point image is hierarchized by a singular point filter (S10), and a series of starting point hierarchical images are obtained. Subsequently, the end point images are hierarchized by the same method (S11), and a series of end point layer images are obtained. However, the order of S10 and S11 is arbitrary, and the start point hierarchical image and the end point hierarchical image can be generated in parallel.
[0101]
FIG. 8 is a flowchart showing details of S10 in FIG. The original start image size is 2n× 2nAnd Since the start point hierarchical image is created in order from the finer resolution, the parameter m indicating the resolution level to be processed is set to n (S100). Next, the mth level image p(M, 0), P(M, 1), P(M, 2), P(M, 3)To detect singular points using a singular point filter (S101), and each of the m-1 level images p.(M-1, 0), P(M-1, 1), P(M-1, 2), P(M-1, 3)Is generated (S102). Here, since m = n, p(M, 0)= P(M, 1)= P(M, 2)= P(M, 3)= P(N)And four types of sub-images are generated from one starting point image.
[0102]
FIG. 9 shows a correspondence relationship between a part of the mth level image and a part of the m−1th level image. The numerical values in the figure indicate the luminance of each pixel. P in the figure(M, s)Is p(M, 0)~ P(M, 3)It symbolizes the four images of(M-1, 0)To generate p(M, s)Is p(M, 0)I believe that. According to the rules shown in [1.2], p(M-1, 0)For example, for the block in which the luminance is entered in FIG.(M-1, 1)Is "8", p(M-1, 2)Is "6", p(M-1, 3)Each “10” is acquired, and this block is replaced with one acquired pixel. Therefore, the size of the sub-image at the (m-1) th level is 2m-1× 2m-1become.
[0103]
Next, m is decremented (S103 in FIG. 8), it is confirmed that m is not negative (S104), and the process returns to S101 and a sub-image with a coarse resolution is generated. As a result of this iterative process, S10 ends when m = 0, that is, when the 0th level sub-image is generated. The size of the 0th level sub-image is 1 × 1.
[0104]
FIG. 10 illustrates the start point hierarchical image generated in S10 for n = 3. Only the first starting point image is common to the four sequences, and thereafter, sub-images are generated independently according to the types of singular points. Note that the processing in FIG. 8 is common to S11 in FIG. 7, and an end point hierarchical image is also generated through the same procedure. Thus, the process by S1 in FIG. 6 is completed.
[0105]
In the base technology, preparation for matching evaluation is made in order to proceed to S2 in FIG. FIG. 11 shows the procedure. As shown in the figure, first, a plurality of evaluation formulas are set (S30). Energy C for pixels introduced in [1.3.2.1](M, s) fAnd the energy D relating to the smoothness of the mapping introduced in [1.3.2.2](M, s) fThat is it. Next, a comprehensive evaluation formula is established by integrating these evaluation formulas (S31). Total energy λC introduced in [1.3.2.3](M, s) f+ D(M, s) fThat is, and using η introduced in [1.3.2.2],
[Formula 52]
Figure 0003828048
It becomes. However, the sum is 0, 1, ..., 2 for i and j, respectively.mCalculate with -1. The matching evaluation is now complete.
[0106]
FIG. 12 is a flowchart showing details of S2 of FIG. As described in [1], matching between the start point hierarchical image and the end point hierarchical image is performed between images having the same resolution level. In order to obtain good global matching between images, matching is calculated in order from the level with the coarser resolution. Since the start and end layer images are generated using the singularity filter, the position and brightness of the singularity are clearly preserved even at a coarse level of resolution, and the results of global matching are compared to the conventional case. It will be very good.
[0107]
As shown in FIG. 12, first, the coefficient parameter η is set to 0 and the level parameter m is set to 0 (S20). Subsequently, a match is calculated between each of the four sub-images at the m-th level in the start point hierarchical image and the four sub-images at the m-th level in the end point hierarchical image, satisfying the bijection condition, and energy. Sub-maps f that minimize(M, s)(S = 0, 1, 2, 3) is obtained (S21). The bijection condition is checked using the inherited quadrilateral described in [1.3.3]. At this time, as shown in Expressions 17 and 18, since the submapping at the m-th level is constrained to those at the (m-1) -th level, matching at a level with a coarser resolution is sequentially used. This is a vertical reference between different levels. Although m = 0 and there is no coarser level, this exceptional processing will be described later with reference to FIG.
[0108]
On the other hand, horizontal reference within the same level is also performed. As shown in Equation 20 of [1.3.3], f(M, 3)Is f(M, 2)And f(M, 2)Is f(M, 1)And f(M, 1)Is f(M, 0)To be similar to each other. The reason is that even if the types of singular points are different, it is unnatural that the submappings are completely different as long as they are originally included in the same start point image and end point image. As can be seen from Equation 20, the closer the sub-maps, the smaller the energy and the better the matching.
[0109]
In addition, f which should be decided first(M, 0)Since there is no submapping that can be referred to at the same level, one coarse level is referred to as shown in Equation 19. However, in the experiment f(M, 3)Until it is determined as f(M, 0)The procedure of renewing was taken once. This substitutes s = 4 into Equation 20 and f(M, 4)To the new f(M, 0)Is equivalent to f(M, 0)And f(M, 3)This measure is to avoid the tendency of the relevance of being too low, and this measure has improved the experimental results. In addition to this measure, the submap shuffle shown in [1.7.1] was also performed in the experiment. This is also intended to keep the degree of association between the sub-maps originally determined for each kind of singularity closely. In addition, as described in [1.7], the position of the start point is changed according to the value of s in order to avoid deflection depending on the start point of processing.
[0110]
FIG. 13 is a diagram showing how the submapping is determined at the 0th level. At the 0th level, each sub-image consists of only one pixel, so there are four sub-mapsf (0, s)Are automatically determined to be unit maps. FIG. 14 is a diagram showing how the submapping is determined at the first level. At the first level, each sub-image is composed of 4 pixels. In the figure, these four pixels are indicated by solid lines. Now, p(1, s)The corresponding point of point x is q(1, s)Take the following steps when searching in:
[0111]
1. The upper left point a, the upper right point b, the lower left point c, and the lower right point d of the point x are obtained at the first level resolution.
2. The pixel to which the points a to d belong at one coarse level, that is, the 0th level is searched. In the case of FIG. 14, the points a to d belong to the pixels A to D, respectively. However, the pixels A to C are virtual pixels that do not originally exist.
3. Corresponding points A 'to D' of the pixels A to D already obtained at the 0th level are represented by q(1, s)Plot in. The pixels A ′ to C ′ are virtual pixels and are assumed to be at the same positions as the pixels A to C, respectively.
4). The corresponding point a 'of the point a in the pixel A is considered to be in the pixel A', and the point a 'is plotted. At this time, it is assumed that the position occupied by the point a in the pixel A (in this case, the lower right) is the same as the position occupied by the point a ′ in the pixel A ′.
Corresponding points b 'to d' are plotted in the same manner as in 5.4, and an inherited quadrilateral is created with the points a 'to d'.
6). The corresponding point x 'of the point x is searched so that the energy is minimized in the inherited quadrilateral. The candidate for the corresponding point x ′ may be limited to, for example, a pixel whose center is included in the inherited quadrilateral. In the case of FIG. 14, all four pixels are candidates.
[0112]
This is the procedure for determining the corresponding point of point x. Similar processing is performed for all other points to determine the submapping. At the level higher than the second level, it is considered that the shape of the inherited quadrilateral gradually collapses. Therefore, as shown in FIG. 3, a situation occurs in which the intervals between the pixels A ′ to D ′ are increased.
[0113]
When four sub-mappings at a certain m-th level are thus determined, m is incremented (S22 in FIG. 12), it is confirmed that m does not exceed n (S23), and the process returns to S21. Thereafter, every time the process returns to S21, a sub-mapping with a finer resolution level is obtained gradually. When the process finally returns to S21, the n-th level mapping f(N)Decide. Since this mapping is fixed with respect to η = 0, f(N)Write (η = 0).
[0114]
Next, η is shifted by Δη and m is cleared to zero in order to obtain a mapping for different η (S24). The new η is the predetermined search truncation value ηmax(S25), the process returns to S21, and the mapping f with respect to the current η(N)(Η = Δη) is obtained. This process is repeated, and f in S21(N)(Η = iΔη) (i = 0, 1,...) Is obtained. η is ηmaxWhen the value exceeds η, the process proceeds to S26, and the optimum η = η is determined by the method described later.optAnd f(N)(Η = ηopt) Finally map f(N)And
[0115]
FIG. 15 is a flowchart showing details of S21 of FIG. According to this flowchart, the submapping at the m-th level is determined for a certain η. When determining the submapping, the base technology determines the optimum λ for each submapping independently.
[0116]
As shown in the figure, s and λ are first cleared to zero (S210). Then the submap f that minimizes the energy for λ at that time (and implicitly for η)(M, s)(S211)(M, s)Write (λ = 0). Shifting λ by Δλ to obtain a mapping for different λ, the new λ is the predetermined search truncation value λmax(S213), the process returns to S211 and f is repeated in subsequent iterations.(M, s)(Λ = iΔλ) (i = 0, 1,...) Is obtained. λ is λmaxWhen the value exceeds λ, the process proceeds to S214 and the optimum λ = λoptAnd f(M, s)(Λ = λopt) Finally map f(M, s)(S214).
[0117]
Next, to obtain another submapping at the same level, λ is cleared to zero and s is incremented (S215). It is confirmed that s does not exceed 4 (S216), and the process returns to S211. When s = 4, as described above, f(M, 3)F(M, 0)To finish the determination of the submapping at that level.
[0118]
FIG. 16 shows f obtained by changing λ for certain m and s.(M, s)Energy C corresponding to (λ = iΔλ) (i = 0, 1,...)(M, s) fFIG. As described in [1.4], when λ increases,(M, s) fDecrease. However, if λ exceeds the optimum value, C(M, s) fTurns to increase. Therefore, in this base technology, C(M, s) fΛ when λ takes a local minimumoptDecide. As shown in the figure, λ> λoptAgain in the range(M, s) fEven if becomes smaller, the mapping is already broken at that point and it does not make sense, so you should pay attention to the first local minimum. λoptIs determined independently for each submap, and finally f(N)One is also determined.
[0119]
On the other hand, FIG. 17 shows f obtained while changing η.(N)Energy C corresponding to (η = iΔη) (i = 0, 1,...)(N) fFIG. Again, as η increases,(N) fDecreases, but if η exceeds the optimum value, C(N) fTurns to increase. So C(N) fIs the minimum value of ηoptDecide. FIG. 17 may be considered as an enlarged view of the vicinity of zero on the horizontal axis of FIG. ηoptF is decided(N)Can be finalized.
[0120]
As described above, according to the base technology, various advantages can be obtained. First, since it is not necessary to detect an edge, it is possible to solve the problem of the conventional technology of the edge detection type. In addition, a priori knowledge about the object included in the image is unnecessary, and automatic detection of corresponding points is realized. The singularity filter can maintain the luminance and position of the singularity even at a coarse resolution level, and is extremely advantageous for object recognition, feature extraction, and image matching. As a result, it is possible to construct an image processing system that greatly reduces manual work.
[0121]
It should be noted that the following modification technique is also conceivable for this prerequisite technique.
(1) In the base technology, the parameters are automatically determined when matching between the start layer image and the end layer image. However, this method performs matching between two normal images, not between layer images. If available in general.
[0122]
For example, the energy E relating to the difference in pixel brightness between two images.0E1And the linear sum E of these twotot= ΑE0+ E1Is a comprehensive evaluation formula. Focusing on the vicinity of the extreme value of this comprehensive evaluation formula, α is automatically determined. In other words, E for various αtotFind a mapping that minimizes. Of those maps, E with respect to α1Α is determined as an optimal parameter when takes a minimum value. The mapping corresponding to that parameter is finally regarded as the optimal matching between both images.
[0123]
There are various other methods for setting the evaluation formula, such as 1 / E.1And 1 / E2As described above, a value that takes a larger value as the evaluation result is better may be adopted. The comprehensive evaluation formula is not necessarily a linear sum, and an n-th power sum (n = 2, 1/2, −1, −2 etc.), a polynomial, an arbitrary function, or the like may be appropriately selected.
[0124]
The parameter may be either α, two cases of η and λ as in the base technology, or more than that. If the parameter is 3 or more, change it one by one.
[0125]
(2) In this base technology, after determining the mapping so that the value of the comprehensive evaluation formula is minimized, C is one evaluation formula constituting the comprehensive evaluation formula.(M, s) fThe parameter was determined by detecting the point where became the minimum. However, instead of such a two-stage process, it is effective to determine parameters so that the minimum value of the comprehensive evaluation formula is minimized in some situations. In that case, for example, αE0+ ΒE1May be taken as a comprehensive evaluation formula, and a constraint condition such as α + β = 1 may be provided to treat each evaluation formula equally. This is because the essence of automatic parameter determination is that the parameter is determined so that the energy is minimized.
[0126]
(3) In the base technology, four types of sub-images relating to four types of singular points are generated at each resolution level. However, of course, one, two, and three of the four types may be selectively used. For example, if there is only one bright spot in the image, f related to the maximum point(M, 3)Even if a hierarchical image is generated only by this, an appropriate effect should be obtained. In this case, since different submappings at the same level are not required, there is an effect of reducing the amount of calculation regarding s.
[0127]
(4) In the base technology, when the level is advanced by one by the singularity filter, the pixel becomes 1/4. For example, a configuration in which 3 × 3 is one block and a singular point is searched for is possible. In this case, the pixel becomes 1/9 when the level advances by one.
[0128]
(5) If the start point image and the end point image are in color, they are first converted to a black and white image and a mapping is calculated. The starting point color image is converted using the mapping obtained as a result. As another method, a submapping may be calculated for each component of RGB.
[0129]
[3] Improvements in prerequisite technology
Based on the above prerequisite technology, several improvements have been made to improve the matching accuracy. Here are the improvements.
[0130]
[3.1] Singularity filter and sub-image taking color information into account
In order to use the color information of the image effectively, the singularity filter was changed as follows. First, as the color space, HIS, which is said to best match human intuition, was used, and the formula that converts colors into luminance was selected to be closest to the human eye sensitivity.
[0131]
[53]
Figure 0003828048
Here, the following symbols are defined where Y (luminance) in pixel a is Y (a) and S (saturation) is S (a).
[0132]
[Formula 54]
Figure 0003828048
The following five filters are prepared using the above definition.
[0133]
[Expression 55]
Figure 0003828048
Of these, the four filters from the top are almost the same as the filters in the base technology before the improvement, and the singular points of luminance are preserved while retaining the color information. The last filter saves the singularity of the color saturation while leaving the color information.
[0134]
With these filters, five types of sub-images (sub-images) are generated for each level. Note that the highest level sub-image matches the original image.
[0135]
[56]
Figure 0003828048
[3.2] Edge image and its sub-image
In order to use information on luminance differentiation (edge) for matching, a primary differential edge detection filter is used. This filter can be realized by convolution integration with an operator H.
[0136]
[Equation 57]
Figure 0003828048
Here, in consideration of calculation speed and the like, H used the following operator.
[0137]
[Formula 58]
Figure 0003828048
Next, this image is converted to multi-resolution. Since an image having luminance centered at 0 is generated by the filter, the following average image is most suitable as a sub-image.
[0138]
[Formula 59]
Figure 0003828048
The image of Expression 59 is used as an energy function when calculating a forward stage, that is, a first submapping derivation stage described later.
[0139]
The size of the edge, that is, the absolute value is also necessary for the calculation.
[0140]
[Expression 60]
Figure 0003828048
Since this value is always positive, a maximum value filter is used for multiresolution.
[0141]
[Equation 61]
Figure 0003828048
The image of Formula 61 is used to determine the order of calculation when calculating the Forward Stage described later.
[0142]
[3.3] Calculation processing procedure
The calculation is performed in order from the coarsest resolution sub-image. Since there are five sub-images, the calculation is performed multiple times at each level of resolution. This is called a turn, and the maximum number of calculations is represented by t. Each turn consists of two energy minimization calculations, the Forward Stage and the Refinement Stage, which is a submapping recalculation stage. FIG. 18 is a flowchart according to the improvement in the calculation for determining the submapping at the m-th level.
[0143]
As shown in the figure, s is cleared to zero (S40). Next, in the forward stage (S41), the mapping f from the start image p to the end image q( m, s )Is obtained by energy minimization. Here, the energy to be minimized is a linear sum of energy C by the corresponding pixel value and energy D by the smoothness of the mapping.
[0144]
Energy C is energy C due to luminance differenceI(Equivalent to energy C in the base technology before improvement) and energy C by hue and saturationC, Energy C due to difference in luminance differentiation (edge)EEach of which is represented as follows:
[0145]
[62]
Figure 0003828048
The energy D is the same as the base technology before the improvement. However, in the base technology before improvement, energy E that guarantees smoothness of mapping1However, only the neighboring pixels were considered, but the number of surrounding pixels is improved so that it can be specified by the parameter d.
[0146]
[Equation 63]
Figure 0003828048
In preparation for the next Refinement Stage, at this stage, the mapping g from the end point image q to the start point image p(M, s)Calculate in the same way.
[0147]
In the Refinement Stage (S42), the bidirectional map f obtained in the Forward Stage f(M, s)And g(M, s)A more reasonable mapping f ′(M, s)Ask for. Here, energy minimization calculation is performed for the newly defined energy M. The energy M is the degree of matching M with the mapping g from the end point image to the start point image.0And the difference M from the original map1Consists of.
[0148]
[Expression 64]
Figure 0003828048
Mapping g 'from the end point image q to the start point image p so as not to impair symmetry(M, s)Is obtained in the same way.
[0149]
Thereafter, s is incremented (S43), it is confirmed that s does not exceed t (S44), and the process proceeds to the Forward Stage (S41) of the next turn. At that time E0The energy minimization calculation is performed by replacing as follows.
[0150]
[Equation 65]
Figure 0003828048
[3.4] Map calculation order
Energy E representing the smoothness of the map1Since the map of surrounding points is used when calculating, whether or not those points have already been calculated affects the energy. That is, the accuracy of the overall mapping varies greatly depending on which point is calculated in order. Therefore, an edge absolute value image is used. Since the edge portion contains a large amount of information, the mapping calculation is performed first from the point where the absolute value of the edge is large. This makes it possible to obtain a very accurate mapping especially for images such as binary images.
[0151]
[Embodiments relating to image encoding and decoding]
In the base technology, correspondence information is generated by matching key frames, and an intermediate frame is generated based on the correspondence information. Therefore, this technology can be used for compression of moving images, and in reality, both image quality and compression ratio exceeding MPEG are being confirmed in experiments. Hereinafter, an image encoding and decoding technique using the prerequisite technique will be described.
[0152]
FIG. 19 shows a configuration of the image encoding device 10 according to the embodiment. The image encoding device 10 uses the key frame KFiThe image input unit 12 for inputting the data of the image, the layer generation unit 14 for dividing the key frame into layers, and the key frame KF divided into layersi(L) and the layer information storage unit 16 for storing the layer structure information LS including the relative position information of the layers, and the matching information file C by performing matching calculation for each layer between adjacent key frames by using the prerequisite technology and the like.ij(L) a layer-by-layer correspondence information generation unit 18, and keyframe data and a layer-by-layer correspondence information file CijA data stream generation unit 20 that generates an encoded data stream CBS (hereinafter simply referred to as a data stream) by incorporating (l) and the layer structure information LS;
[0153]
The key frame is determined, for example, by extracting a moving image frame every 0.5 seconds, and is sent from the image input unit 12 to the layer generation unit 14. The layer generation unit 14 detects the edge of the key frame and determines whether or not there is occlusion, thereby acquiring the object separation and the relative position information thereof. Based on the information, the frame is divided into layers so as to correspond to the object. FIG. 20 shows the i-th key frame KFiL layers KFi(1) to KFiThe conceptual diagram divided | segmented into (L) is shown. Although this figure assumes a case where layers are divided based on the relative position in the depth direction of the object, a layer structure may be taken in consideration of the relative positions of the object on the same plane in the vertical and horizontal directions. Since then, KFiThe first layer of KFi(L).
[0154]
Corresponding to the case where layer information such as animation cell images or object information such as three-dimensional information in computer graphics is incorporated in the key frame data input to the image input unit 12, the layer generation unit 14 May be provided with a layer information detection unit for detecting such information, and the layers may be divided so as to correspond thereto. Furthermore, a layer information input function may be provided in which layer information, object information, a layer structure after division, and the like are directly input manually or via a predetermined device, and layer division is performed based on the input.
[0155]
Further, the layer generation unit 14 includes a layer structure adjustment function that sequentially divides a plurality of key frames into layers and adjusts the hierarchical structure to be the same for all layers. For example, when the number of objects increases after a certain key frame and it becomes necessary to increase the number of layers accordingly, the layer is also inserted at the corresponding position in the layer hierarchy of the previous key frame. In this case, a dummy layer without pixels is included in the key frame before the number of objects increases. This is a process to ensure that the layers corresponding to the same object are in the same position in all key frames, so if the data structure of the device allows, the data area for storing the pixels in the dummy layer There is no need to assign FIG. 21 shows a conceptual diagram of the layer structure after adjustment. In the figure, each key frame is divided into L layers, and an I × L layer matrix is formed for I key frames.
[0156]
In the above example, the number of layers of all key frames is combined with the key frame having the largest number of layers according to the number of objects, but it may not be divided in consideration of the size of the object, the area of the occlusion area, etc. You may make adjustments to reduce the number of layers by combining layers.
[0157]
The key frame data divided by the layer generation unit 14 is temporarily stored in the layer information storage unit 16 together with the layer structure information LS including the layer matrix structure.
[0158]
On the other hand, these data are also sent to the layer-specific correspondence information generation unit 18 and subjected to matching calculation for each layer. In this matching calculation, matching between two key frames is calculated for each layer on a pixel basis based on a singular point based on a premise technique or another arbitrary technique. FIG. 22 is a flowchart showing a procedure for matching the key frame number I and the layer number L. The general procedure is to perform matching from the most rearward layer of the first key frame to the front layer of the adjacent first and second key frames. The matching calculation with the layer of the second key frame behind the layer is prohibited. First, the adjacent key frame KFiAnd KFi + 1Are sequentially performed for each layer from i = 1 (S50). Where l and m are KFiAnd KFi + 1As shown in FIG. 20, the lowermost layer, that is, the layer farthest from the viewpoint is set to 1, and the maximum value is L. First, 1 is substituted into l and m (S51), and the layer KFi(1) and layer KFi + 1The matching calculation (S52) of (m) is performed in the range of 1 ≦ m ≦ L (S54). Next, l is incremented (S55) and KFi(2) and KFi + 1The matching calculation with (m) is performed (S52). At this time, the calculation is performed in the range of 2 ≦ m ≦ L (S56, S54). Similarly KFi(L) and KFi + 1(M) Repeat the matching calculation with (l ≦ m ≦ L). When l exceeds L (S57), i is incremented (S58), and the same calculation is repeated in the next adjacent key frame. The process ends when the end point image exceeds the last key frame (S59). The reason why the range of the layer m of the end point image is limited by the layer 1 of the start point image will be described later.
[0159]
FIG. 23 specifically shows a layer-by-layer matching method when I = 3 and L = 3. Since a spherical “object A” and a conical “object B” exist in this key frame, the layer generation unit 14 sets “background” as a layer of l = 1 and “object B” as l = 2. Layer division is performed by making each layer, “object A”, correspond to each layer of l = 3. Except for l = 3 which is the foremost layer, each layer has an occlusion area by a forward object, and this area has no pixel value.
[0160]
First KF1From the layer of KF2Find the corresponding point for the layer. At this time KF1Layer (1) is KF2(1), KF2(2), KF2Perform matching calculation with each layer of (3), for example, start point (x1,1, Y1,1) Corresponding point of KF2(1) Above (x1,1', Y1,1'). Next, KF1Layer (2) is KF2KF without performing matching calculation with (1)2(2), KF2Matching calculation is performed with each layer of (3). This corresponds to limiting the layer of the end point image to a range of l ≦ m ≦ L when performing matching in FIG. KF1(2) and KF2It is KF that prohibits matching calculation with (1)1Corresponding point of “Object B” in (2) is KF2This is because the existence in the “background” of (1) cannot be considered even if occlusion is considered. By prohibiting this, the possibility of finding an erroneous corresponding point on another object that is close to the pixel value or position is reduced. For example, an intermediate image in which “object B” is merged with “background” Generation can be prevented.
[0161]
KF1(2) and KF2It is KF that performs matching calculation with (3)2This is the process (2) for determining an end point in a portion without a pixel. For example, in FIG.1(2) Above (x2, 2, Y2, 2) Corresponds to KF2(2) In the above, there is no pixel due to occlusion by the object A. KF2In the matching calculation with (3), for example, the color information is ignored and only the positional relationship with the surrounding corresponding points is considered. Specifically, when performing the energy minimization calculation in the base technology, the smoothness of the mapping is guaranteed. A corresponding point is found by a method in which only energy D is calculated. In FIG. 23, (x3, 2', Y3, 2′) Is a corresponding point. This point is a temporary corresponding point provided on a layer corresponding to “object A” because a part of “object B” is originally invisible due to occlusion, and is hereinafter referred to as a “virtual corresponding point”. Once the virtual corresponding point is determined, the layer KF corresponding to “Object B”2(2) The same coordinates (x2, 2', Y2, 2′) To (x2, 2, Y2, 2) As the final corresponding point. In this way, even if the end point is within the occlusion area, the corresponding point can be determined on the same layer for all the pixels of the start point image. As a result, the correspondence information can be accurately acquired, and the possibility that the intermediate image is distorted due to the influence of occlusion can be reduced.
[0162]
In the above example, the upper layer KF is used as the virtual corresponding point.2(3) Although the final corresponding point is determined via the upper pixel, depending on the matching method considering only the position information, the layer KF of the same hierarchy2(2) You may obtain | require the coordinate of a corresponding point directly in the area | region without an upper pixel. In this case, it is only necessary to perform matching calculation between layers at the same position for all adjacent key frames.
[0163]
Next, KF1(3) and KF2Matching calculation with (3) is performed to find corresponding points. As mentioned above, KF2(3) Above is KF1There is a virtual corresponding point of (2), but this point is KF1It should be the corresponding point of the pixel in (3). At this time, the tie is KF1It is adopted as the corresponding point of the pixel in (3).
[0164]
In this way KF1And KF2Even if the matching calculation is performed for each layer and the top layer is finished, there is a case where the one-to-one correspondence is not achieved. That is KF1There is no pixel in the layer of occlusion, KF2This is a case where pixels exist in the layer. For example, KF in FIG.2(1) Top point (x1, 2', Y1, 2’) KF1It does not correspond to any of the pixels existing in (1), that is, there is no starting point. In this case, KF with no starting point2KF while sequentially storing the coordinates on the layer1And KF2The matching calculation proceeds with KF.2And KF3The matching calculation with is started. By this matching calculation, a point where no previously stored start point exists, for example, KF2(1) Top point (x1, 2', Y1, 2’) KF3(1) Corresponding point on (x1, 2‘’, Y1, 2‘)) Is found, KF based on the correspondence information of these two points1(1) to KF2Guess the corresponding information to (1) and (x1, 2', Y1, 2′) Starts at (x1, 2, Y1, 2) Can be determined. Here, key frame KF without start point1Next to the next keyframe, KF2And KF3However, it is also possible to obtain the correspondence information of two key frames sandwiching a key frame without a starting point or two key frames not adjacent to each other, and determine the starting point based on the information.
[0165]
In addition to the above method, the method of obtaining the start point coordinates of the layer having no pixel at the start point may be calculated using the virtual corresponding points described above in consideration of reverse mapping from the end point key frame to the start point key frame. . In the example of FIG. 23, KF2(1) and KF1Perform matching calculation with (3), KF1(3) KF based on the virtual corresponding points found above1(1) The starting point is determined above.
[0166]
Similar steps are repeated to obtain correspondence information of adjacent key frames for each layer, and a series of correspondence information files CijCreate (l). Layered key frame KF stored in the layer information storage unit 16i(L) and the layer structure information LS are the correspondence information file C generated by the layer-specific correspondence information generation unit 18.ijTogether with (l), it is sent to the data stream generator 20 and output as a data stream. Here, the key frames incorporated in the data stream are not limited to those divided into layers, and may be key frames before division input to the image input unit 12.
[0167]
FIG. 24 is a configuration diagram of the image decoding device 40 according to the embodiment. The image decoding device 40 includes a stream input unit 42 for inputting the encoded data stream CBS, and layer-divided key frame data KF incorporated in the data stream CBS.i(L), layer structure information LS and layer-specific correspondence information file Cij(L), a layer information storage unit 44 for storing the layer, an intermediate image generation unit 46 for generating an intermediate frame for each layer by interpolation calculation based on a prerequisite technique, and the like, an intermediate frame for each layer, and key frames divided into layers Are combined to generate an intermediate frame and a key frame, and a display control unit 50 for displaying the key frame and the intermediate frame.
[0168]
In the figure, the layer-specific intermediate image generation unit 46 refers to the layer KF in the same hierarchy of two adjacent key frames while referring to the layer structure information LS from the data stored in the layer information storage unit 44.i(L) and KFj(L) and their corresponding information Cij(L) is extracted and the intermediate image KF of those layers is extractedij(L) is generated and sent to the image composition unit 48. The layer-specific correspondence information of the present embodiment may be designated as correspondence points by designating only position information of an area that is originally invisible due to occlusion, that is, an area without pixels in the layer. In the generation of an intermediate image with such a layer, a plurality of points having a pixel value corresponding to the corresponding point are detected on another key frame layer in the same hierarchy, and the pixel value is determined. The pixel value of the intermediate image is determined by interpolation or extrapolation. Or, by detecting one similar point and determining the pixel value of the intermediate image by using the correspondence information of those points based on the relationship between the relative position with the surrounding points and the pixel value. Also good.
[0169]
KFiAnd KFjWhen the intermediate image is generated for all the layers, the image composition unit 48 generates a composite image by superimposing the innermost layer. Here, a method similar to the Z buffer method in three-dimensional graphics is used. At this time, since the pixel value is set in the region including the occlusion in the intermediate image generation unit 46 for each layer, there are a plurality of layers having different pixel values at the same coordinates. Select the pixel value of the layer preferentially. In this way, by interpolating pixel values with the intermediate image and sequentially superimposing them based on the layer structure, an image in the vicinity of the occlusion region can be output more clearly.
[0170]
On the other hand, the layer-divided key frame data is sent from the layer information storage unit 44 to the image synthesis unit 48, and is synthesized by the same process as the synthesis of the intermediate image, that is, the original key frame input by the image encoding device. It is converted to the same data as the data. The intermediate image and key frame generated by combining the layers are sent to the display control unit 50 and are appropriately rearranged in the output order or the like.
[0171]
In the above-described embodiment, the intermediate images generated by the layer-specific intermediate image generation unit 46 are sequentially sent to the image synthesis unit 48. However, the data is temporarily stored, and a layer matrix including the intermediate image and key frames is completed. A functional block to be sent to the image composition unit 48 later may be provided.
[0172]
Further, the image decoding apparatus 40 considers the case where the key frame data incorporated in the input data stream is not divided into layers, and divides the key frame into layers having the same hierarchical structure based on the layer structure information LS. A layer generation unit may be provided on the output side of the stream input unit 42. In this case, since it is not necessary to perform a synthesis process for key frames, key frame data that has not been divided into layers is sent from the stream input unit 42 to the display control unit 50 as it is.
[0173]
The above embodiment can also be applied when the relative position of the object is changed halfway. For example, when the object is reversed at a key frame having a context, the layer generated by the layer generation unit 14 of the image encoding device 10 in FIG. 19 exists in a layer in a different hierarchy of two adjacent key frames of the same object. It becomes a state to do. The layer generation unit 14 is provided with a function for monitoring the correspondence between the object and the layer based on the edge detection result, and flags the start point image and end point image layers in which the state where the objects are switched in the layer order has occurred. Try to build. The matching procedure is changed for those layers. For example, KFi(L), KFj(M) Assume that the same object exists in the layer of (l ≠ M, j = i + 1). Since the situation under consideration is the interchange of the relative positions of a plurality of objects, at this time, at least another set of different layers, for example, KFi(M) and KFjThe other object should exist in (l), but since the calculation procedure is the same, only one of them will be described here. In the layer-specific correspondence information generation unit 18, the KFiWhen the corresponding point of (l) is obtained by matching calculation, the above-mentioned restriction of l ≦ m ≦ L is not used for the layer m of the end point image with respect to the layer l of the start point image, and the end point is in the range of M ≦ m ≦ L. Corresponding points are obtained on the layer M where the object exists and all the layers ahead of it in the image. When a corresponding point is found in the layer in front, the point is a virtual corresponding point. Therefore, as in the case of the above-described invention, the same coordinate as the virtual corresponding point on the layer in which the object exists is the corresponding point Determine as. At this time, the correspondence information file is C represented in the form of the invention.ijNot (l) but CijIt is necessary to take a data structure of (l, M).
[0174]
Next, the image decoding apparatus performs the following procedure. In FIG. 24, the layer-specific intermediate image generation unit 46 corresponds to the correspondence information file C embedded in the data stream.ijLayer KF containing the same object based on (l, M)i(L), KFj(M) is read from the layer information storage unit 44, and the intermediate image KF of the object is read.ij(L, M) is obtained in the same manner as in the above embodiment. Since the intermediate image generated in this way has no occlusion information, the context of the intermediate images is unknown. Therefore, the layer where the object's context changed, that is, KFi(L) and KFj(M), or further, the rate of change of the object based on the layers of the key frames before and after that, that is, the moving speed in the moving image, is calculated, and the moment when the context changes is KFi(L) and KFjBy inferring which point in time during (M), the layer order of the intermediate image is changed before and after that point, and the image combining unit 48 combines the intermediate image.
[0175]
The above-described method may be applied only to layers in which objects are replaced, or may be applied to all layers by substituting M = 1 for layers that have not been replaced. Of course, for layers that are not replaced, the calculation related to the replacement of objects may be omitted at the time of image decoding.
[0176]
The present invention has been described above based on the embodiment. The present invention is not limited to this embodiment, and various modifications thereof are also effective as aspects of the present invention.
[Brief description of the drawings]
FIG. 1 (a) is an image obtained by applying an averaging filter to the faces of two persons, and FIGS. 1 (c) and 1 (d) are two persons. P required in the base technology for the face of(5,0)Fig. 1 (e) and Fig. 1 (f) are images required by the base technology regarding the faces of two people.(5, 1)Fig. 1 (g) and Fig. 1 (h) are images required by the base technology regarding the faces of two people.(5, 2)Fig. 1 (i) and Fig. 1 (j) show the p required by the base technology regarding the faces of two people.(5, 3)Is a halftone image photograph in which each of the images is displayed on a display.
FIG. 2 (R) is a diagram showing the original quadrilateral, and FIG. 2 (A), FIG. 2 (B), FIG. 2 (C), FIG. 2 (D), and FIG. It is a figure which shows an inheritance quadrilateral.
FIG. 3 is a diagram illustrating a relationship between a start point image and an end point image and a relationship between an mth level and an m−1th level using an inherited quadrilateral.
FIG. 4 Parameter η and energy CfIt is a figure which shows the relationship.
FIGS. 5 (a) and 5 (b) are diagrams illustrating a state in which whether or not a mapping relating to a certain point satisfies a bijection condition is obtained from outer product calculation.
FIG. 6 is a flowchart showing an overall procedure of the base technology.
FIG. 7 is a flowchart showing details of S1 in FIG. 6;
FIG. 8 is a flowchart showing details of S10 in FIG.
FIG. 9 is a diagram illustrating a correspondence relationship between a part of an mth level image and a part of an m−1th level image.
FIG. 10 is a diagram showing a starting point hierarchical image generated by the base technology.
FIG. 11 is a diagram showing a procedure for preparing for matching evaluation before proceeding to S2 of FIG. 6;
FIG. 12 is a flowchart showing details of S2 in FIG. 6;
FIG. 13 is a diagram showing how a submapping is determined at the 0th level.
FIG. 14 is a diagram showing how a submapping is determined at the first level.
FIG. 15 is a flowchart showing details of S21 in FIG.
FIG. 16 A certain f(M, s)F calculated while changing λ(M, s)Energy C corresponding to (λ = iΔλ)(M, s) fFIG.
FIG. 17 shows f obtained while changing η.(N)Energy C corresponding to (η = iΔη) (i = 0, 1,...)(N) fFIG.
FIG. 18 is a flowchart for obtaining a submapping at the m-th level in the improved prerequisite technique.
FIG. 19 is a configuration diagram of an image encoding device according to an embodiment.
FIG. 20 shows a key frame KF.iFIG. 3 is a conceptual diagram of dividing the image into L layers.
FIG. 21 is a conceptual diagram showing a layer matrix after adjustment so that layers of a plurality of key frames have the same hierarchical structure.
FIG. 22 is a flowchart showing a matching calculation order when acquiring correspondence information for each layer;
FIG. 23 is a principle explanatory diagram showing how to find corresponding points when acquiring correspondence information for each layer;
FIG. 24 is a block diagram of an image decoding apparatus according to an embodiment.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 Image coding apparatus, 12 Image input part, 14 Layer production | generation part, 16 Layer information storage part, 18 Corresponding information production | generation part according to layer, 20 Data stream production | generation part, 40 Image decoding apparatus, 42 Stream input part, 46 layer each intermediate | middle An image generation unit, 48 an image synthesis unit.

Claims (4)

マッチング処理の対象となるキーフレームの画像に付随するレイヤー情報を検出するレイヤー情報検出部と、
前記レイヤー情報検出部が検出したレイヤー情報にしたがって複数のキーフレームの画像をそれぞれレイヤーに分割するレイヤー生成部と、
隣接するキーフレームのデータに対してレイヤーごとにマッチング処理を行い、キーフレーム間で対応し合う点の座標を示す対応情報をレイヤーごとに生成するレイヤー別対応情報生成部と、
を含み、
前記レイヤー別対応情報生成部は、隣接する第1、第2のキーフレームのうち、第1のキーフレームの空間的に最も後方にあるレイヤーから前方のレイヤーへと順次マッチング計算を行うことを特徴とする画像符号化装置。
A layer information detection unit for detecting layer information associated with an image of a key frame to be matched;
A layer generation unit that divides a plurality of key frame images into layers according to the layer information detected by the layer information detection unit ;
A layer-by-layer correspondence information generation unit that performs matching processing on adjacent keyframe data for each layer, and generates correspondence information indicating the coordinates of points that correspond between keyframes for each layer;
Only including,
The layer-specific correspondence information generation unit sequentially performs a matching calculation from a spatially rearmost layer of the first key frame to a front layer of adjacent first and second key frames. An image encoding device.
マッチング処理の対象となるキーフレームの画像に付随するレイヤー情報を検出するレイヤー情報検出部と、
前記レイヤー情報検出部が検出したレイヤー情報にしたがって複数のキーフレームの画像をそれぞれレイヤーに分割するレイヤー生成部と、
隣接するキーフレームのデータに対してレイヤーごとにマッチング処理を行い、キーフレーム間で対応し合う点の座標を示す対応情報をレイヤーごとに生成するレイヤー別対応情報生成部と、
を含み、
前記レイヤー別対応情報生成部は、隣接する第1、第2のキーフレームのうち、第1のキーフレームのレイヤーと、そのレイヤーより空間的に後方にある第2のキーフレームのレイヤーとのマッチング計算を禁止することを特徴とする画像符号化装置。
A layer information detection unit for detecting layer information associated with an image of a key frame to be matched;
A layer generation unit that divides a plurality of key frame images into layers according to the layer information detected by the layer information detection unit ;
A layer-by-layer correspondence information generation unit that performs matching processing on adjacent keyframe data for each layer, and generates correspondence information indicating the coordinates of points that correspond between keyframes for each layer;
Only including,
The layer-specific correspondence information generation unit matches a first key frame layer of adjacent first and second key frames with a second key frame layer spatially behind the layer. An image encoding apparatus characterized by prohibiting calculation .
マッチング処理の対象となるキーフレームの画像に付随するレイヤー情報を検出するレイヤー情報検出部と、
前記レイヤー情報検出部が検出したレイヤー情報にしたがって複数のキーフレームの画像をそれぞれレイヤーに分割するレイヤー生成部と、
隣接するキーフレームのデータに対してレイヤーごとにマッチング処理を行い、キーフレーム間で対応し合う点の座標を示す対応情報をレイヤーごとに生成するレイヤー別対応情報生成部と、
を含み、
前記レイヤー別対応情報生成部は、隣接する第1、第2のキーフレームのうち、第1のキーフレームのレイヤーと、そのレイヤーと同じ位置にあるか、空間的により前方にある第2のキーフレームのレイヤーとのマッチング計算を行い、前記第2のキーフレームのレイヤーの画像領域内に第1のキーフレームのレイヤー画像の対応点を見出したときは、その対応点を前記第1のキーフレームのレイヤーと同じ位置のレイヤーへの対応点として記憶することを特徴とする画像符号化装置。
A layer information detection unit for detecting layer information associated with an image of a key frame to be matched;
A layer generation unit that divides a plurality of key frame images into layers according to the layer information detected by the layer information detection unit ;
A layer-by-layer correspondence information generation unit that performs matching processing on adjacent keyframe data for each layer, and generates correspondence information indicating the coordinates of points that correspond between keyframes for each layer;
Only including,
The layer-by-layer correspondence information generation unit includes the first key frame layer and the second key that is in the same position as the layer of the first key frame or the second key that is spatially forward. When matching calculation with the layer of the frame is performed and a corresponding point of the layer image of the first key frame is found in the image area of the layer of the second key frame, the corresponding point is determined as the first key frame. An image encoding apparatus, characterized in that it is stored as a corresponding point to a layer at the same position as the layer .
マッチング処理の対象となるキーフレームの画像に付随するレイヤー情報を検出するレイヤー情報検出部と、
前記レイヤー情報検出部が検出したレイヤー情報にしたがって複数のキーフレームの画像をそれぞれレイヤーに分割するレイヤー生成部と、
隣接するキーフレームのデータに対してレイヤーごとにマッチング処理を行い、キーフレーム間で対応し合う点の座標を示す対応情報をレイヤーごとに生成するレイヤー別対応情報生成部と、
を含み、
前記レイヤー別対応情報生成部は、隣接する第1、第2のキーフレームのうち、第1のキーフレームにおける空間的に最前のレイヤーのマッチング計算が終了しても、第1のキーフレームからの対応点が見出せなかった第2のキーフレーム内の画素は、第1のキーフレーム以外のキーフレームとのマッチング計算を行うことによって得られた対応情報をもとに、第1のキーフレームの当該レイヤー上に対応点を決定することを特徴とする画像符号化装置。
A layer information detection unit for detecting layer information associated with an image of a key frame to be matched;
A layer generation unit that divides a plurality of key frame images into layers according to the layer information detected by the layer information detection unit ;
A layer-by-layer correspondence information generation unit that performs matching processing on adjacent keyframe data for each layer, and generates correspondence information indicating the coordinates of points that correspond between keyframes for each layer;
Only including,
The layer-by-layer correspondence information generation unit generates the first key frame from the first key frame, even if the spatially foremost layer matching calculation in the first key frame is completed. Pixels in the second key frame for which no corresponding point was found are found in the first key frame based on correspondence information obtained by performing matching calculation with key frames other than the first key frame. An image encoding apparatus characterized by determining corresponding points on a layer .
JP2002172963A 2002-06-13 2002-06-13 Image encoding method and apparatus, and image decoding method and apparatus Expired - Fee Related JP3828048B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002172963A JP3828048B2 (en) 2002-06-13 2002-06-13 Image encoding method and apparatus, and image decoding method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002172963A JP3828048B2 (en) 2002-06-13 2002-06-13 Image encoding method and apparatus, and image decoding method and apparatus

Publications (2)

Publication Number Publication Date
JP2004023271A JP2004023271A (en) 2004-01-22
JP3828048B2 true JP3828048B2 (en) 2006-09-27

Family

ID=31172386

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002172963A Expired - Fee Related JP3828048B2 (en) 2002-06-13 2002-06-13 Image encoding method and apparatus, and image decoding method and apparatus

Country Status (1)

Country Link
JP (1) JP3828048B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4179251B2 (en) * 2004-09-07 2008-11-12 株式会社日立製作所 Intermediate image creation device

Also Published As

Publication number Publication date
JP2004023271A (en) 2004-01-22

Similar Documents

Publication Publication Date Title
JP3889233B2 (en) Image encoding method and apparatus, and image decoding method and apparatus
JP2008282377A (en) Image processing method and apparatus
JP2008282376A (en) Image processing method and apparatus
JP3877651B2 (en) Image processing method and apparatus
JPH10269355A (en) Multiple resolution filter processing method and image matching method capable of utilizing the method
JP2008252860A (en) Image processing method and image processing apparatus
JPWO2005122593A1 (en) Video encoding method and video decoding method
JP4157686B2 (en) Method and apparatus for image encoding and decoding
JP4050472B2 (en) Image generation method, apparatus and system
JP4039858B2 (en) Image matching method and apparatus, and image encoding method and apparatus
JP3801870B2 (en) Multivariate spatial processing device
JP2007122751A (en) Method, device and program for image processing
JP3828048B2 (en) Image encoding method and apparatus, and image decoding method and apparatus
JP3839353B2 (en) Image encoding method and apparatus, and image decoding method and apparatus
JP4023727B2 (en) Monitoring device and monitoring method
JP4524412B2 (en) Image encoding method, decoding method, image encoding device, and decoding device
JP3827981B2 (en) Image encoding method and apparatus, and image decoding method and apparatus
JP2002190020A (en) Method and device for image effect
JP2002230575A (en) Method and device for image effect
JP4220735B2 (en) Image processing method and image processing apparatus
JP2002359842A (en) Method and device for encoding image, and method and device for decoding image
JP3773417B2 (en) Method and apparatus for image data encoding and decoding
JP2007288614A (en) Image compression method and device, and moving image encoding method
JPWO2007069350A1 (en) Image encoding and decoding method and apparatus
JP2004048595A (en) Method and device of image encoding

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050527

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20050621

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20050714

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051101

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051226

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060704

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060705

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090714

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090714

Year of fee payment: 3

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090714

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100714

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100714

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110714

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120714

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees