17
1 ISAM2回研究会 2005/1/21@大分 画像レジストレーションとその応用 新潟大学 玉木徹 レジストレーションと対応点問題 モザイク画の生成(平面レジストレーション) レンズ歪み補正 剛体物体のレジストレーション 角速度計測(スポーツへの応用) 物体形状の推定 非剛体物体のレジストレーション

画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

Embed Size (px)

Citation preview

Page 1: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

1

ISAM第2回研究会 2005/1/21@大分

画像レジストレーションとその応用

新潟大学 玉木徹

● レジストレーションと対応点問題● モザイク画の生成(平面レジストレーション)● レンズ歪み補正● 剛体物体のレジストレーション● 角速度計測(スポーツへの応用)● 物体形状の推定● 非剛体物体のレジストレーション

Page 2: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

2

対応点問題:レジストレーション

● image registration: computing the point-to-point mapping between im-ages in their overlapping region.

(David Capel, Image Mosaicing and Super-Resolution, Springer-Verlag, p.1, 2004.)

● The task of image registration is to find an optimal geometric transfor-mation between corresponding image data.

(Jan Modersitzki, Numerical Methods for Image Registration, Oxford University Press, p.1, 2004.)

● (correspondence problem) for each point in the left frame, find the corre-spondence point in the right image.

(Ramesh Jain, Rangachar Kasturi, Brian G. Schunk, Machin Vision, McGraw-Hill, p.293, 1995.)

2枚の

原画像

特徴点

検出

対応点の

探索

Capel, D. P., Image Mosaicing and Super-resolution PhD thesis, University of Oxford (2001). http://www.robots.ox.ac.uk/~vgg/publications/papers/capel01a.pdf

pi2pi

1

Page 3: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

3

モザイク(パノラマ)・超解像度画像生成

池谷 彰彦, 中島 昇, 佐藤 智和, 池田 聖, 神原 誠之, 横矢 直和, 山田 敬嗣: "紙面を対象としたカメラパス推定によるビデオモザイキングおよび超解像", 電子情報通信学会 技術研究報告, PRMU2003-223, Feb 2004.カメラパラメータの推定による超解像ビデオモザイキング, http://yokoya.aist-nara.ac.jp/~tomoka-s/videomosaic/index.html, 2004

Capel, D. P., Image Mosaicing and Super-resolution PhD thesis, University of Oxford (2001). http://www.robots.ox.ac.uk/~vgg/publications/papers/capel01a.pdf

入力映像

超解像度モザイク

Richard Szeliski, “Image Mosaicing for Tele-Reality Applications”, WACV94, pp.44-53, 1994, Digital Equipment Corporation, Cambridge Research Lab, Technical Report CRL 94/2, May, 1994. http://citeseer.ist.psu.edu/szeliski94image.html

入力映像

パノラマ画像

モザイク画像

Page 4: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

4

レジストレーションの定式化

min∑i=1

N

f pi1 ,− pi

22

f : 変換関数θ : パラメータ

N個の点の二つの集合{p1i}と{p2

i}を関

係づける変換を求める● 対応する点はある幾何変換 f (剛体変換やアフィン変換等)で対応づけられる

● 距離を最小にする変換パラメータ θ を求める● 相関やSSD等であらかじめ点の対応を取る

min ∑p i1∈I 1

I 1 f pi1 ,− I 2 pi

22画像I1と画像I

2を関係づける変換を

求める● 対応する点はある幾何変換 f (剛体変換やアフィン変換等)で対応づけられる

● 輝度差を最小にする変換パラメータθ を求める

f : 変換関数θ : パラメータ

SSD I 1 p i1 , I 2 p i

1 f for i=0, , Nmin ∫

p i1∈ I 1

{ I 1 p i1− I 2 p i

1 f 2∇ f 2}d pステレオの場合

● 対応する点は任意の変換 f で対応づけられ、この f を求める

Page 5: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

5

非線形最適化問題の定式化

min ∑p i1∈I 1

I 1 f pi1 ,− I 2 pi

22画像I1の各点{p1

i}を画像I

2の各点

{p2i}に割り当てる

● 対応する点はある幾何変換 f (剛体変換やアフィン変換等)で対応づけられる

● 輝度差を最小にする変換パラメータ θ を求める

f : 変換関数θ : パラメータ

F=∑p i1∈ I 1

I 1 f pi1 ,− I 2 pi

22

∂ F∂

勾配法による反復解法

F min∂ F∂

=0

非線形最適化問題

最適解● Newton法、Gauss-Newton法、共役勾配法

● coase-to-fine strategy● 低解像度→高解像度● 低域通過→全域通化フィルタ

● 適切な初期値の設定

Page 6: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

6

レジストレーションの様子

初期位置での重ね合わせ

反復法による推定の各段階での重ね合わせ

2枚の原画像

レジストレーション結果

黒い程差が大きい

●平面変換のパラメータを推定

●初期値に依存しない●最初の数回の反復で大きく変化する

Page 7: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

7

レンズ歪みの補正デジタル画像 歪みのある画像

補正画像反復法による推定の各段階での重ね合わせ

印刷撮影

補正画像

原画像

●推定するパラメータ(合計19個)

●平面変換(8)●樽型歪み(6)●輝度変化(5)

●推定するパラメータを順次増やす

●初期値は十分良いとする●求めた歪みパラメータで画像を補正

●一度パラメータを推定すれば補正が可能

Image plane

Printed sheet

Projection centerO

p

pu

P

Page 8: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

8

レンズ歪みの補正

歪みのある画像 補正画像

反復法による推定の各段階での重ね合わせ

歪みのある画像 補正画像 歪みのある画像 補正画像

歪みのある画像

広角レンズの場合 画質の悪い場合

Toru Tamaki, Tsuyoshi Yamamura, Noboru Ohnishi : "Correcting Distortion of Image by Image Registration with the Implicit Function Theorem," International Journal on Image and Graphics, World Scientific Publishing Co., Vol.2, No.2, pp.309-330 (2002 4).Toru Tamaki, Tsuyoshi Yamamura, Noboru Ohnishi : "A Method for Compensation of Image Distortion with Image Registration Tech-nique," IEICE Transactions on Information & Systems, Vol.E84-D, No.8, pp.990-998 (2001 8).

Page 9: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

9

既知形状物体とCGのレジストレーション

立方体:30x30x30cm

GUIにより位置・姿勢を与え作成したCG画像 撮影画像

回転,並進カメラ座標系

物体座標系

初期位置での重ね合わせ

反復法による推定の各段階での重ね合わせ

●変換:逆射影→剛体変換→射影●推定するパラメータ

●回転(3) 並進(3)●形状は既知(剛体)●CGから奥行きとテクスチャを得る

●物体の座標系に対するカメラ座標系の位置姿勢が求まる(キャリブレーション)

Toru Tamaki, Masanobu Yamamoto : "Calibration Method by Image Registration with Synthetic Image of 3D Model," IEICE Transactions on Information & Systems, Vol.E86-D, No.5, pp.981-985 (2003 05).

逆射影 射影

回転並進

Page 10: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

10

既知形状物体同士のレジストレーション

逆射影 射影

回転並進

GUIによりC

Gの球を当ては

めて切り出した

画像

撮影画像2

撮影画像1

3D CG sphere

GUIによるCGの球の当てはめて

奥行き:CGテクスチャ:実画像

●変換:逆射影→剛体変換→射影

●推定するパラメータ●回転(3) 並進(3)

●形状は既知(剛体)●CGから奥行きを得る●実画像からテクスチャを得る

●画像1に当てはめたCG物体の座標系に対する画像2の物体の座標系の位置姿勢が求まる(フレーム間の角度変化)

切出し画像 推定結果 切出し画像 推定結果

問題点● 当てはめがずれているとレジストレーションに影響を与える

Page 11: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

11

既知形状物体同士のレジストレーション

射影

回転並進

射影

回転並進

反復法による推定の各段階での重ね合わせ

撮影画像2

撮影画像1

GUIによるCGの球の当てはめての失敗

●変換:逆射影→剛体変換→剛体変換→射影

●推定するパラメータ●画像1への回転(3) 並進(3)●画像2への並進(3)

●形状は既知(剛体)●CGから奥行きを得る●実画像からテクスチャを得る●画像1に当てはめたCG物体の座標系に対する画像2の物体の座標系の位置姿勢が求まる(フレーム間の角度変化)

1st frame I1

2nd frame I2

invisible area in I2

p1i

p2i

i N iP2i

N i

P2i

i

visibility test

Toru Tamaki, Takahiko Sugino, Masanobu Yamamoto: "Measuring Ball Spin by Image Registration," Proc. of FCV2004 ; the 10th Korea-Japan Joint Workshop on Frontiers of Computer Vision, pp.269-274 (2004 2).Yukihio Ushiyama, Toru Tamaki, Osamu Hashimoto, Hisato Igarashi: "A proposal to measure the spin of a ball by digital image analysis," The 8th International Table Tennis Federation Sports Science Congress and The 3rd World Congress of Science and Racket Sports (2003 05)

Page 12: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

12

Measuring spins of sports

2003/2/2

Spins for major sports● Football (free kick)

● 300-600rpm● Baseball (curve)

● 1800rpm● Golf

● 4000-10000rpm● Tabel tennis

● up to 8094rpm for Chinese national team (Qun, 92)

In 2000, the diameter of a ball of table tennis for official international games has been changed from 38mm to 40mm to reduce spin and ball speel for making a game more entertaining.

Many factors in sports : score, time, weight, etc.● measuring speed● analysing player's motion● understanding ball spin

usefull for training, improving skill

Page 13: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

13

Experiments for Real Rally of table tennishigh speed camera

halogen lamps x 3

playersimage sequence of table tennis rally

● high speed camera (MotionMeter 500) ● frame rate: 1/500 [s]● shutter speed: 1/10000 [s]● resolution : 292x110 [pixel]

Page 14: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

14

Spin Estimations of Rally imagesplayer A player B

6000

5000

4000

3000

2000

1000

0

-1000

-2000

-300031 32 33 34 35 36 37

Frame number

rpm

x

y

z

6000

5000

4000

3000

2000

1000

0

-1000

-2000

-3000 15 16 17 18 19 20 21Frame number

rpm

x

y

z

Page 15: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

15

物体の形状を推定するレジストレーション

関口亮, 杉野貴彦, 玉木徹, 山本正信 : 「楕円体の運動と形状の推定」, 平成16年度電子情報通信学会信越支部大会講演論文集, pp.287-288 (2004 10).

撮影画像2撮影画像1

逆射影 射影回転並進

撮影画像2撮影画像1

逆射影 射影回転並進形状

形状を固定した(剛体)レジストレーション

形状パラメータも推定するレジストレーション

反復法による推定の各段階での重ね合わせ

反復法による推定の各段階での重ね合わせ

推定の初期値

推定するパラメータ

回転(3) 並進(3)

楕円体の軸長(2)

形状のクラス(どんなパラ

メータで表現できるか)は

既知

Page 16: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

16

非剛体物体のレジストレーション

パラメトリックな曲面のレジストレーション

Bezier曲面の当てはめて(制御点6個)

推定の初期値

反復法による推定の各段階での重ね合わせ

撮影画像2撮影画像1

Bezier曲面のパラメータ空間 (u, v)

杉野貴彦, 玉木徹, 山本正信 : 「非剛体レジストレーションを用いた自由曲面の追跡」, 電子情報通信学会2005年総合大会, 情報・システムソサイエティ大会 (2005 3).

射影射影

●推定するパラメータ●3次元の6個の制御点(18)

Page 17: 画像レジストレーションとその応用home.hiroshima-u.ac.jp/tamaki/study/20050121ISAM.pdfTheorem," International Journal on Image and Graphics, World Scientific Publishing

17

今後の課題

■ 推定精度の定量的評価方法の確立 剛体物体の姿勢推定:移動ステージに乗せて正確に

物体を動かす 非剛体物体の場合:CGで実験画像を作成する以外

に方法はないか?

■ 計算の効率化、計算時間の短縮 最適化の中で輝度差の二乗和を何回も計算している

ため計算量が膨大 勾配法の収束が遅い(数分〜十数分)

■ 最適化部分のモジュール化、再利用 扱う物体形状のモデルが変わっても、最適化ルーチ

ンは同じ 現在は最適化ルーチンも含めて毎回書き直し 最適化手法を変更する際(Newton法から共役勾配

法へ等)他に影響がないライブラリ

■ 実利用の応用先は?