SlideShare a Scribd company logo
1 of 14
Download to read offline
Image Interpolation
画像補間法
2015, by sai@nac
崔 国偉(工学博士)
補間方法リスト
 「Nearest Neighbor法」 --- 省略
 「Bilinear法」
 「Bicubic法」
 「Lanczos法」
 「Spline法」
 「Trilinear法」
Bilinear法
𝐼(𝑥0, 𝑦0) 𝐼(𝑥0 + 1, 𝑦0)
𝐼(𝑥0, 𝑦0 + 1) 𝐼(𝑥0 + 1, 𝑦0 + 1)
𝐼(𝑥, 𝑦) = 1.0 − 𝑝 1.0 − 𝑠 𝐼(𝑥0, 𝑦0)+
p 1.0 − 𝑠 𝐼(𝑥0 + 1, 𝑦0)+
1.0 − 𝑝 𝑠𝐼(𝑥0, 𝑦0 + 1)+
ps𝐼(𝑥0 + 1, 𝑦0 + 1)
𝑝 + 𝑞 = 1.0
𝑠 + 𝑡 = 1.0
係数 = 1.0
 元画像の2x2画素データを使用
Bicubic法
 元画像の4x4画素データを使用
 係数計算
𝐼 𝑥, 𝑦 = 𝑖=0
3
𝑗=0
3
𝑤 𝑑𝑥𝑖)𝑤(𝑑𝑦𝑗 𝐼(𝑥0 + 𝑖, 𝑦0 + 𝑗)
𝑖=0
3
𝑗=0
3
𝑤 𝑑𝑥𝑖 𝑤(𝑑𝑦𝑗)
𝑤(𝑑) =
1 − 2𝑑2 + 𝑑3
4 − 8𝑑 + 5𝑑2
− 𝑑3
0
|𝑑| ≤ 1.0
1.0 ≤ |𝑑| ≤ 2.0
2.0 ≤ |𝑑|
係数 = 1.0
Bicubic法 --- 続き
 補間関数 φ(t) として、次のような三次の多項式
を考えます。ここで、各ピクセルの間隔 h の値
を h = 1 とします。
 φ(0) = 1、φ(±1) = φ(±2) = 0 より、4式
 φ(t)が連続であるためには、φ(t)の左側微分係
数 φ-‘(t) と右側微分係数 φ+’(t) が等しい必要が
あることで、3式
 七つの連立方程式に対して未知数は八つなので、
全ての未知数を得ることはできません。そこで、
b3 = α として、各未知数をαを使って表す
𝑤(𝑡) =
𝑎 + 2 𝑡 3
− 𝑎 + 3 𝑡 2
+ 1
𝑎|𝑡|3
− 5𝑎 𝑡 2
+ 8𝑎 𝑡 − 4𝑎
0
0 ≤ |𝑡| < 1
1 ≤ |𝑡| < 2
2 ≤ |𝑡|
 よって、下記の補間関数を得る。(キュー
ビックコンボリューション)
 aは補間関数の性質を制御するための変数
(-0.5~-2程度が用いられる)
 一般的に、設定a=-1。前ページの式を導
き出す。
𝜑(𝑡) =
𝑎3 𝑡 3
+ 𝑎2 𝑡 2
+ 𝑎1 𝑡 + 𝑎0
𝑏3|𝑡|3
+ 𝑏2 𝑡 2
+ 𝑏1 𝑡 + 𝑏0
0
0 ≤ |𝑡| < 1
1 ≤ |𝑡| < 2
2 ≤ |𝑡|
φ(0) = a0 = 1
φ(±1) = a3 + a2 + a1 + a0 = 0
φ(±1) = b3 + b2 + b1 + b0 = 0
φ(±2) = 8b3 + 4b2 + 2b1 + b0 = 0
φ-'(0) = -a1 = φ+'(0) = a1
φ-'(±1) = 3a3 + 2a2 + a1 = φ+'(±1) = 3b3 + 2b2 + b1
φ-'(±2) = 12b3 + 4b2 + b1 = φ+'(±2) = 0
Lanczos2法
 元画像の4x4画素データを使用
 係数計算
𝐼 𝑥, 𝑦 = 𝑖=0
3
𝑗=0
3
𝑤 𝑑𝑥𝑖)𝑤(𝑑𝑦𝑗 𝐼(𝑥0 + 𝑖, 𝑦0 + 𝑗)
𝑖=0
3
𝑗=0
3
𝑤 𝑑𝑥𝑖 𝑤(𝑑𝑦𝑗)
𝑤(𝑑) =
𝑠𝑖𝑛𝑐(𝑑)
𝑠𝑖𝑛𝑐( 𝑑 2)
0
|𝑑| ≤ 2
𝑜𝑡ℎ𝑒𝑟
𝑠𝑖𝑛𝑐(𝑥) =
sin(𝜋𝑥)
(𝜋𝑥)
sinc関数によってエッジ部などでは鮮鋭化の効果が期待できる。
Lanczos3法
 元画像の6x6画素データを使用
 係数計算
𝐼 𝑥, 𝑦 = 𝑖=0
5
𝑗=0
5
𝑤 𝑑𝑥𝑖)𝑤(𝑑𝑦𝑗 𝐼(𝑥0 + 𝑖, 𝑦0 + 𝑗)
𝑖=0
5
𝑗=0
5
𝑤 𝑑𝑥𝑖 𝑤(𝑑𝑦𝑗)
𝑤(𝑑) =
𝑠𝑖𝑛𝑐(𝑑)
𝑠𝑖𝑛𝑐( 𝑑 3)
0
|𝑑| ≤ 3
𝑜𝑡ℎ𝑒𝑟
𝑠𝑖𝑛𝑐(𝑥) =
sin(𝜋𝑥)
(𝜋𝑥)
d
w
3次畳み込み補間
 行列式計算、元画像の4x4画素データを使用
 係数はbicubic, lanczos2の係数計算式で求められる。
 距離
 計算結果は、16点の元画像データの最小値より小さな値となる場合
や、最大値より大きな値となる場合があるので、ご注意が必要です。
(正規化しないため)
 (正規化の場合:上式に 𝑤 𝑝 𝑤 𝑞を割る)
𝐼(𝑥, 𝑦) = 𝑤(1 + 𝑞) 𝑤(𝑞) 𝑤(1 − 𝑞) 𝑤(2 − 𝑞)
𝐼(−1, −1)
𝐼(−1,0)
𝐼(−1,1)
𝐼(−1,2)
𝐼(0, −1)
𝐼(0,0)
𝐼(0,1)
𝐼(0,2)
𝐼(1, −1)
𝐼(1,0)
𝐼(1,1)
𝐼(1,2)
𝐼(2, −1)
𝐼(2,0)
𝐼(2,1)
𝐼(2,2)
𝑤(1 + 𝑝)
𝑤(𝑝)
𝑤(1 − 𝑝)
𝑤(2 − 𝑝)
I(-1,-1)
I(2,2)
q
p
I(-1,2)
I(1,-1)
I(x,y)
0 ≤ 𝑝 < 1.0
0 ≤ 𝑞 < 1.0
City block距離 vs.直線距離
 ここまで、Bilinear法、Bicubic法、Lanczos法、すべて「X方向の距離とY方向の
距離を求め、それぞれのウェイト(係数)計算をし、X方向のウェイトとY方向の
ウェイトを掛ける。」という手法をとってきました。
 直線距離で計算するのは?
 画質という意味では Lanczos2 の直線距離計算が最もバランスがとれているよう
に思います。が、 1ピクセルあたり、平方根(√)の計算が 16 回発生する事になり、
計算量がとんでもない事になります。
𝐼 𝑥, 𝑦 = 𝑖=0
3
𝑗=0
3
𝑤 𝑑𝑖𝑗 𝐼(𝑥0 + 𝑖, 𝑦0 + 𝑗)
𝑖=0
3
𝑗=0
3
𝑤 𝑑𝑖𝑗
𝑑𝑖𝑗 = 𝑑𝑥𝑖
2
+ 𝑑𝑦𝑗
2
Spline法 (三次スプライン補間法)
 元画像の4x4画素データを使用する。四点(0,0), (1,0), (0,1), (1,1)からなる格子内の点
に対する値が次の多項式の値と等しくなると仮定します
 𝐼 𝑥, 𝑦 = 𝑎00 + 𝑎10 𝑝 + 𝑎20 𝑝2
+ 𝑎30 𝑝3
+𝑎01 𝑞 + 𝑎11 𝑝𝑞 + 𝑎21 𝑝2 𝑞 + 𝑎31 𝑝3 𝑞
+𝑎02 𝑞2
+ 𝑎12 𝑝𝑞2
+ 𝑎22 𝑝2
𝑞2
+ 𝑎32 𝑝3
𝑞2
+𝑎03 𝑞3 + 𝑎13 𝑝𝑞3 + 𝑎23 𝑝2 𝑞3 + 𝑎33 𝑝3 𝑞3
 未知の係数 aijの求め方:
 ①四点I(i,j)の値を代入すると、4個の式が得られた
 ②I(x,y) を x で偏微分します。四点で4個の式が得られた
 ③I(x,y) を y で偏微分します。四点で4個の式が得られた
 ④最後に混合微分 Ixy(x,y) 。これで、計 16個の式が得られた
 だから、未知数 aij も 16 個あることから連立方程式によって係数を求めることがで
きます
p
q
(1)
𝐴𝛼 = 𝑓
Spline法 (三次スプライン補間法) ---続き
 連立方程式
 未知の係数aij
α = ( a00, a10, a20, a30, a01, a11, a21, a31, a02, a12, a22, a32, a03, a13, a23, a33 )T
 右辺の値からなるベクトルf
 未知係数の解は α = A-1f になります。
𝐴𝛼 = 𝑓
α = A-1f (2)
Spline法 (三次スプライン補間法) ---続き
 この逆行列 A-1は次のようなものになります。
{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{-3, 3, 0, 0, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 2, -2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, -3, 3, 0, 0, -2, -1, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 1, 1, 0, 0 },
{-3, 0, 3, 0, 0, 0, 0, 0, -2, 0, -1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, -3, 0, 3, 0, 0, 0, 0, 0, -2, 0, -1, 0 },
{ 9, -9, -9, 9, 6, 3, -6, -3, 6, -6, 3, -3, 4, 2, 2, 1 },
{-6, 6, 6, -6, -3, -3, 3, 3, -4, 4, -2, 2, -2, -2, -1, -1 },
{ 2, 0, -2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, 0, 1, 0, 1, 0 },
{-6, 6, 6, -6, -4, -2, 4, 2, -3, 3, -3, 3, -2, -1, -2, -1 },
{ 4, -4, -4, 4, 2, 2, -2, -2, 2, -2, 2, -2, 1, 1, 1, 1 }
Spline法 (三次スプライン補間法) ---続き
 偏微分 Ix(x,y),
 偏微分 Iy(x,y),
 微分混合微分 Ixy(x,y)
 画素毎に、補間値の求め手順:
 (3)(4)(5)式により、ベクトルfを求める
 (2)式により、係数ベクトルαを求める
 (1)式により、補間位置の値I(x,y)を計算する
𝐼 𝑥(𝑥, 𝑦) =
𝐼 𝑥 + 1, 𝑦 − 𝐼(𝑥 − 1, 𝑦)
2
𝐼 𝑦(𝑥, 𝑦) =
𝐼 𝑥, 𝑦 + 1 − 𝐼(𝑥, 𝑦 − 1)
2
𝐼 𝑥𝑦(𝑥, 𝑦) =
𝐼 𝑥 + 1, 𝑦 + 1 − 𝐼(𝑥 − 1, 𝑦 − 1)
8
(3)
(4)
(5)
計算量が非常に多い!
Trilinear法 (トリリニア)
係数 = 1.0
 3次元線形補間、元画像の2x2x2画素データ(8点)
を使用する。P1~P8は隣接点で、Piの値を求める。
 P1点に基準として、Piの相対位置は(p,q,w)になれば、
Piの値は
x
y
z
𝐼 𝑝𝑖 = 1 − 𝑝 1 − 𝑞 1 − 𝑤 𝐼 𝑝1
+𝑝 1 − 𝑞 1 − 𝑤 𝐼 𝑝2
+ 1 − 𝑝 1 − 𝑞 𝑤𝐼 𝑝3
+𝑝 1 − 𝑞 𝑤𝐼 𝑝4
+ 1 − 𝑝 𝑞 1 − 𝑤 𝐼 𝑝5
+𝑝𝑞 1 − 𝑤 𝐼 𝑝6
+ 1 − 𝑝 𝑞𝑤𝐼 𝑝7
+𝑝𝑞𝑤𝐼 𝑝8

More Related Content

What's hot

異常検知と変化検知の1~3章をまとめてみた
異常検知と変化検知の1~3章をまとめてみた異常検知と変化検知の1~3章をまとめてみた
異常検知と変化検知の1~3章をまとめてみたTakahiro Yoshizawa
 
画像局所特徴量と特定物体認識 - SIFTと最近のアプローチ -
画像局所特徴量と特定物体認識 - SIFTと最近のアプローチ -画像局所特徴量と特定物体認識 - SIFTと最近のアプローチ -
画像局所特徴量と特定物体認識 - SIFTと最近のアプローチ -MPRG_Chubu_University
 
Cv勉強会cvpr2018読み会: Im2Flow: Motion Hallucination from Static Images for Action...
Cv勉強会cvpr2018読み会: Im2Flow: Motion Hallucination from Static Images for Action...Cv勉強会cvpr2018読み会: Im2Flow: Motion Hallucination from Static Images for Action...
Cv勉強会cvpr2018読み会: Im2Flow: Motion Hallucination from Static Images for Action...Toshiki Sakai
 
CV分野におけるサーベイ方法
CV分野におけるサーベイ方法CV分野におけるサーベイ方法
CV分野におけるサーベイ方法Hirokatsu Kataoka
 
[DL輪読会]Pay Attention to MLPs (gMLP)
[DL輪読会]Pay Attention to MLPs	(gMLP)[DL輪読会]Pay Attention to MLPs	(gMLP)
[DL輪読会]Pay Attention to MLPs (gMLP)Deep Learning JP
 
20190414 Point Cloud Reconstruction Survey
20190414 Point Cloud Reconstruction Survey20190414 Point Cloud Reconstruction Survey
20190414 Point Cloud Reconstruction SurveyFujimoto Keisuke
 
AHC-Lab M1勉強会 論文の読み方・書き方
AHC-Lab M1勉強会 論文の読み方・書き方AHC-Lab M1勉強会 論文の読み方・書き方
AHC-Lab M1勉強会 論文の読み方・書き方Shinagawa Seitaro
 
Triplet Loss 徹底解説
Triplet Loss 徹底解説Triplet Loss 徹底解説
Triplet Loss 徹底解説tancoro
 
[解説スライド] NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
[解説スライド] NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis[解説スライド] NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
[解説スライド] NeRF: Representing Scenes as Neural Radiance Fields for View SynthesisKento Doi
 
SSD: Single Shot MultiBox Detector (ECCV2016)
SSD: Single Shot MultiBox Detector (ECCV2016)SSD: Single Shot MultiBox Detector (ECCV2016)
SSD: Single Shot MultiBox Detector (ECCV2016)Takanori Ogata
 
ディープラーニングのフレームワークと特許戦争
ディープラーニングのフレームワークと特許戦争ディープラーニングのフレームワークと特許戦争
ディープラーニングのフレームワークと特許戦争Yosuke Shinya
 
三次元表現まとめ(深層学習を中心に)
三次元表現まとめ(深層学習を中心に)三次元表現まとめ(深層学習を中心に)
三次元表現まとめ(深層学習を中心に)Tomohiro Motoda
 
合成変量とアンサンブル:回帰森と加法モデルの要点
合成変量とアンサンブル:回帰森と加法モデルの要点合成変量とアンサンブル:回帰森と加法モデルの要点
合成変量とアンサンブル:回帰森と加法モデルの要点Ichigaku Takigawa
 
複数のGNSSを用いたポーズグラフ最適化
複数のGNSSを用いたポーズグラフ最適化複数のGNSSを用いたポーズグラフ最適化
複数のGNSSを用いたポーズグラフ最適化TaroSuzuki15
 
[DL輪読会]When Does Label Smoothing Help?
[DL輪読会]When Does Label Smoothing Help?[DL輪読会]When Does Label Smoothing Help?
[DL輪読会]When Does Label Smoothing Help?Deep Learning JP
 
[研究室論文紹介用スライド] Adversarial Contrastive Estimation
[研究室論文紹介用スライド] Adversarial Contrastive Estimation[研究室論文紹介用スライド] Adversarial Contrastive Estimation
[研究室論文紹介用スライド] Adversarial Contrastive EstimationMakoto Takenaka
 
【DL輪読会】Perceiver io a general architecture for structured inputs &amp; outputs
【DL輪読会】Perceiver io  a general architecture for structured inputs &amp; outputs 【DL輪読会】Perceiver io  a general architecture for structured inputs &amp; outputs
【DL輪読会】Perceiver io a general architecture for structured inputs &amp; outputs Deep Learning JP
 
楽しい研究のために今からできること 〜新しく研究を始める皆さんへ〜
楽しい研究のために今からできること 〜新しく研究を始める皆さんへ〜楽しい研究のために今からできること 〜新しく研究を始める皆さんへ〜
楽しい研究のために今からできること 〜新しく研究を始める皆さんへ〜諒介 荒木
 

What's hot (20)

Point net
Point netPoint net
Point net
 
異常検知と変化検知の1~3章をまとめてみた
異常検知と変化検知の1~3章をまとめてみた異常検知と変化検知の1~3章をまとめてみた
異常検知と変化検知の1~3章をまとめてみた
 
画像局所特徴量と特定物体認識 - SIFTと最近のアプローチ -
画像局所特徴量と特定物体認識 - SIFTと最近のアプローチ -画像局所特徴量と特定物体認識 - SIFTと最近のアプローチ -
画像局所特徴量と特定物体認識 - SIFTと最近のアプローチ -
 
Cv勉強会cvpr2018読み会: Im2Flow: Motion Hallucination from Static Images for Action...
Cv勉強会cvpr2018読み会: Im2Flow: Motion Hallucination from Static Images for Action...Cv勉強会cvpr2018読み会: Im2Flow: Motion Hallucination from Static Images for Action...
Cv勉強会cvpr2018読み会: Im2Flow: Motion Hallucination from Static Images for Action...
 
CV分野におけるサーベイ方法
CV分野におけるサーベイ方法CV分野におけるサーベイ方法
CV分野におけるサーベイ方法
 
[DL輪読会]Pay Attention to MLPs (gMLP)
[DL輪読会]Pay Attention to MLPs	(gMLP)[DL輪読会]Pay Attention to MLPs	(gMLP)
[DL輪読会]Pay Attention to MLPs (gMLP)
 
20190414 Point Cloud Reconstruction Survey
20190414 Point Cloud Reconstruction Survey20190414 Point Cloud Reconstruction Survey
20190414 Point Cloud Reconstruction Survey
 
AHC-Lab M1勉強会 論文の読み方・書き方
AHC-Lab M1勉強会 論文の読み方・書き方AHC-Lab M1勉強会 論文の読み方・書き方
AHC-Lab M1勉強会 論文の読み方・書き方
 
Triplet Loss 徹底解説
Triplet Loss 徹底解説Triplet Loss 徹底解説
Triplet Loss 徹底解説
 
[解説スライド] NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
[解説スライド] NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis[解説スライド] NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
[解説スライド] NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
 
SSD: Single Shot MultiBox Detector (ECCV2016)
SSD: Single Shot MultiBox Detector (ECCV2016)SSD: Single Shot MultiBox Detector (ECCV2016)
SSD: Single Shot MultiBox Detector (ECCV2016)
 
ディープラーニングのフレームワークと特許戦争
ディープラーニングのフレームワークと特許戦争ディープラーニングのフレームワークと特許戦争
ディープラーニングのフレームワークと特許戦争
 
三次元表現まとめ(深層学習を中心に)
三次元表現まとめ(深層学習を中心に)三次元表現まとめ(深層学習を中心に)
三次元表現まとめ(深層学習を中心に)
 
合成変量とアンサンブル:回帰森と加法モデルの要点
合成変量とアンサンブル:回帰森と加法モデルの要点合成変量とアンサンブル:回帰森と加法モデルの要点
合成変量とアンサンブル:回帰森と加法モデルの要点
 
複数のGNSSを用いたポーズグラフ最適化
複数のGNSSを用いたポーズグラフ最適化複数のGNSSを用いたポーズグラフ最適化
複数のGNSSを用いたポーズグラフ最適化
 
[DL輪読会]When Does Label Smoothing Help?
[DL輪読会]When Does Label Smoothing Help?[DL輪読会]When Does Label Smoothing Help?
[DL輪読会]When Does Label Smoothing Help?
 
[研究室論文紹介用スライド] Adversarial Contrastive Estimation
[研究室論文紹介用スライド] Adversarial Contrastive Estimation[研究室論文紹介用スライド] Adversarial Contrastive Estimation
[研究室論文紹介用スライド] Adversarial Contrastive Estimation
 
【DL輪読会】Perceiver io a general architecture for structured inputs &amp; outputs
【DL輪読会】Perceiver io  a general architecture for structured inputs &amp; outputs 【DL輪読会】Perceiver io  a general architecture for structured inputs &amp; outputs
【DL輪読会】Perceiver io a general architecture for structured inputs &amp; outputs
 
AlphaGoのしくみ
AlphaGoのしくみAlphaGoのしくみ
AlphaGoのしくみ
 
楽しい研究のために今からできること 〜新しく研究を始める皆さんへ〜
楽しい研究のために今からできること 〜新しく研究を始める皆さんへ〜楽しい研究のために今からできること 〜新しく研究を始める皆さんへ〜
楽しい研究のために今からできること 〜新しく研究を始める皆さんへ〜
 

Viewers also liked

Image Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom ConceptsImage Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom Conceptsmmjalbiaty
 
Data hiding using image interpolation
Data hiding using image interpolationData hiding using image interpolation
Data hiding using image interpolationVikrant Arya
 
Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...
Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...
Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...mmjalbiaty
 
Interpolation and extrapolation
Interpolation and extrapolationInterpolation and extrapolation
Interpolation and extrapolationAswin Pv
 
Interpolation
InterpolationInterpolation
Interpolationmbhuiya6
 
interpolation
interpolationinterpolation
interpolation8laddu8
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphicsSHIVANI SONI
 
Effective Pixel Interpolation for Image Super Resolution
Effective Pixel Interpolation for Image Super ResolutionEffective Pixel Interpolation for Image Super Resolution
Effective Pixel Interpolation for Image Super ResolutionIOSR Journals
 
Satellite image contrast enhancement using discrete wavelet transform
Satellite image contrast enhancement using discrete wavelet transformSatellite image contrast enhancement using discrete wavelet transform
Satellite image contrast enhancement using discrete wavelet transformHarishwar Reddy
 
image denoising technique using disctere wavelet transform
image denoising technique using disctere wavelet transformimage denoising technique using disctere wavelet transform
image denoising technique using disctere wavelet transformalishapb
 
Report medical image processing image slice interpolation and noise removal i...
Report medical image processing image slice interpolation and noise removal i...Report medical image processing image slice interpolation and noise removal i...
Report medical image processing image slice interpolation and noise removal i...Shashank
 
Image filtering : A comparitive study
Image filtering : A comparitive studyImage filtering : A comparitive study
Image filtering : A comparitive studypruthabhalde3
 
Signal and image processing on satellite communication using MATLAB
Signal and image processing on satellite communication using MATLABSignal and image processing on satellite communication using MATLAB
Signal and image processing on satellite communication using MATLABEmbedded Plus Trichy
 

Viewers also liked (20)

Image Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom ConceptsImage Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom Concepts
 
Image Interpolation
Image InterpolationImage Interpolation
Image Interpolation
 
Data hiding using image interpolation
Data hiding using image interpolationData hiding using image interpolation
Data hiding using image interpolation
 
Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...
Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...
Image Interpolation Techniques with Optical and Digital Zoom Concepts -semina...
 
Interpolation and extrapolation
Interpolation and extrapolationInterpolation and extrapolation
Interpolation and extrapolation
 
Interpolation Methods
Interpolation MethodsInterpolation Methods
Interpolation Methods
 
Interpolation
InterpolationInterpolation
Interpolation
 
interpolation
interpolationinterpolation
interpolation
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
 
Retinex comparisons
Retinex comparisonsRetinex comparisons
Retinex comparisons
 
Effective Pixel Interpolation for Image Super Resolution
Effective Pixel Interpolation for Image Super ResolutionEffective Pixel Interpolation for Image Super Resolution
Effective Pixel Interpolation for Image Super Resolution
 
Cv 14th
Cv 14thCv 14th
Cv 14th
 
Satellite image contrast enhancement using discrete wavelet transform
Satellite image contrast enhancement using discrete wavelet transformSatellite image contrast enhancement using discrete wavelet transform
Satellite image contrast enhancement using discrete wavelet transform
 
Satellite Image
Satellite Image Satellite Image
Satellite Image
 
image denoising technique using disctere wavelet transform
image denoising technique using disctere wavelet transformimage denoising technique using disctere wavelet transform
image denoising technique using disctere wavelet transform
 
Report medical image processing image slice interpolation and noise removal i...
Report medical image processing image slice interpolation and noise removal i...Report medical image processing image slice interpolation and noise removal i...
Report medical image processing image slice interpolation and noise removal i...
 
Wavelet Transform and DSP Applications
Wavelet Transform and DSP ApplicationsWavelet Transform and DSP Applications
Wavelet Transform and DSP Applications
 
Image filtering : A comparitive study
Image filtering : A comparitive studyImage filtering : A comparitive study
Image filtering : A comparitive study
 
Signal and image processing on satellite communication using MATLAB
Signal and image processing on satellite communication using MATLABSignal and image processing on satellite communication using MATLAB
Signal and image processing on satellite communication using MATLAB
 
final_project
final_projectfinal_project
final_project
 

Similar to Image interpolation

スパースモデリングによる多次元信号・画像復元
スパースモデリングによる多次元信号・画像復元スパースモデリングによる多次元信号・画像復元
スパースモデリングによる多次元信号・画像復元Shogo Muramatsu
 
行列計算アルゴリズム
行列計算アルゴリズム行列計算アルゴリズム
行列計算アルゴリズムTakuo Tachibana
 
NN, CNN, and Image Analysis
NN, CNN, and Image AnalysisNN, CNN, and Image Analysis
NN, CNN, and Image AnalysisYuki Shimada
 
波動方程式
波動方程式波動方程式
波動方程式yu sa
 
Stochastic complexities of reduced rank regression証明概略
 Stochastic complexities of reduced rank regression証明概略 Stochastic complexities of reduced rank regression証明概略
Stochastic complexities of reduced rank regression証明概略Xiangze
 
公開鍵暗号(3): 離散対数問題
公開鍵暗号(3): 離散対数問題公開鍵暗号(3): 離散対数問題
公開鍵暗号(3): 離散対数問題Joe Suzuki
 
パターン認識 第12章 正則化とパス追跡アルゴリズム
パターン認識 第12章 正則化とパス追跡アルゴリズムパターン認識 第12章 正則化とパス追跡アルゴリズム
パターン認識 第12章 正則化とパス追跡アルゴリズムMiyoshi Yuya
 
【Unity道場】ゲーム制作に使う数学を学習しよう
【Unity道場】ゲーム制作に使う数学を学習しよう【Unity道場】ゲーム制作に使う数学を学習しよう
【Unity道場】ゲーム制作に使う数学を学習しようUnity Technologies Japan K.K.
 
公開鍵暗号5: 離散対数問題
公開鍵暗号5: 離散対数問題公開鍵暗号5: 離散対数問題
公開鍵暗号5: 離散対数問題Joe Suzuki
 
強化学習その3
強化学習その3強化学習その3
強化学習その3nishio
 
2016年度秋学期 画像情報処理 第6回 「行列」に慣れていない人のために (2016. 11. 10)
2016年度秋学期 画像情報処理 第6回 「行列」に慣れていない人のために (2016. 11. 10)2016年度秋学期 画像情報処理 第6回 「行列」に慣れていない人のために (2016. 11. 10)
2016年度秋学期 画像情報処理 第6回 「行列」に慣れていない人のために (2016. 11. 10)Akira Asano
 
Prml 最尤推定からベイズ曲線フィッティング
Prml 最尤推定からベイズ曲線フィッティングPrml 最尤推定からベイズ曲線フィッティング
Prml 最尤推定からベイズ曲線フィッティングtakutori
 
20170327_レムニスケートにまつわる色々な計算
20170327_レムニスケートにまつわる色々な計算20170327_レムニスケートにまつわる色々な計算
20170327_レムニスケートにまつわる色々な計算matsumoring
 
PRML復々習レーン#9 6.3-6.3.1
PRML復々習レーン#9 6.3-6.3.1PRML復々習レーン#9 6.3-6.3.1
PRML復々習レーン#9 6.3-6.3.1sleepy_yoshi
 
Quantum Support Vector Machine
Quantum Support Vector MachineQuantum Support Vector Machine
Quantum Support Vector MachineYuma Nakamura
 
公開鍵暗号3: ナップザック暗号
公開鍵暗号3: ナップザック暗号公開鍵暗号3: ナップザック暗号
公開鍵暗号3: ナップザック暗号Joe Suzuki
 
アルゴリズムイントロダクション15章 動的計画法
アルゴリズムイントロダクション15章 動的計画法アルゴリズムイントロダクション15章 動的計画法
アルゴリズムイントロダクション15章 動的計画法nitoyon
 

Similar to Image interpolation (20)

スパースモデリングによる多次元信号・画像復元
スパースモデリングによる多次元信号・画像復元スパースモデリングによる多次元信号・画像復元
スパースモデリングによる多次元信号・画像復元
 
行列計算アルゴリズム
行列計算アルゴリズム行列計算アルゴリズム
行列計算アルゴリズム
 
NN, CNN, and Image Analysis
NN, CNN, and Image AnalysisNN, CNN, and Image Analysis
NN, CNN, and Image Analysis
 
波動方程式
波動方程式波動方程式
波動方程式
 
Stochastic complexities of reduced rank regression証明概略
 Stochastic complexities of reduced rank regression証明概略 Stochastic complexities of reduced rank regression証明概略
Stochastic complexities of reduced rank regression証明概略
 
公開鍵暗号(3): 離散対数問題
公開鍵暗号(3): 離散対数問題公開鍵暗号(3): 離散対数問題
公開鍵暗号(3): 離散対数問題
 
パターン認識 第12章 正則化とパス追跡アルゴリズム
パターン認識 第12章 正則化とパス追跡アルゴリズムパターン認識 第12章 正則化とパス追跡アルゴリズム
パターン認識 第12章 正則化とパス追跡アルゴリズム
 
【Unity道場】ゲーム制作に使う数学を学習しよう
【Unity道場】ゲーム制作に使う数学を学習しよう【Unity道場】ゲーム制作に使う数学を学習しよう
【Unity道場】ゲーム制作に使う数学を学習しよう
 
回帰
回帰回帰
回帰
 
C02
C02C02
C02
 
公開鍵暗号5: 離散対数問題
公開鍵暗号5: 離散対数問題公開鍵暗号5: 離散対数問題
公開鍵暗号5: 離散対数問題
 
強化学習その3
強化学習その3強化学習その3
強化学習その3
 
2016年度秋学期 画像情報処理 第6回 「行列」に慣れていない人のために (2016. 11. 10)
2016年度秋学期 画像情報処理 第6回 「行列」に慣れていない人のために (2016. 11. 10)2016年度秋学期 画像情報処理 第6回 「行列」に慣れていない人のために (2016. 11. 10)
2016年度秋学期 画像情報処理 第6回 「行列」に慣れていない人のために (2016. 11. 10)
 
Prml 最尤推定からベイズ曲線フィッティング
Prml 最尤推定からベイズ曲線フィッティングPrml 最尤推定からベイズ曲線フィッティング
Prml 最尤推定からベイズ曲線フィッティング
 
20170327_レムニスケートにまつわる色々な計算
20170327_レムニスケートにまつわる色々な計算20170327_レムニスケートにまつわる色々な計算
20170327_レムニスケートにまつわる色々な計算
 
PRML復々習レーン#9 6.3-6.3.1
PRML復々習レーン#9 6.3-6.3.1PRML復々習レーン#9 6.3-6.3.1
PRML復々習レーン#9 6.3-6.3.1
 
Quantum Support Vector Machine
Quantum Support Vector MachineQuantum Support Vector Machine
Quantum Support Vector Machine
 
公開鍵暗号3: ナップザック暗号
公開鍵暗号3: ナップザック暗号公開鍵暗号3: ナップザック暗号
公開鍵暗号3: ナップザック暗号
 
π計算
π計算π計算
π計算
 
アルゴリズムイントロダクション15章 動的計画法
アルゴリズムイントロダクション15章 動的計画法アルゴリズムイントロダクション15章 動的計画法
アルゴリズムイントロダクション15章 動的計画法
 

Recently uploaded

TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案sugiuralab
 
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineerYuki Kikuchi
 
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版) 2024年4月作成
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版) 2024年4月作成業務で生成AIを活用したい人のための生成AI入門講座(社外公開版) 2024年4月作成
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版) 2024年4月作成Hiroshi Tomioka
 
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdfクラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdfFumieNakayama
 
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdfAWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdfFumieNakayama
 
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)UEHARA, Tetsutaro
 
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?akihisamiyanaga1
 
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察  ~Text-to-MusicとText-To-ImageかつImage-to-Music...モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察  ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...博三 太田
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 

Recently uploaded (9)

TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
 
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
 
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版) 2024年4月作成
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版) 2024年4月作成業務で生成AIを活用したい人のための生成AI入門講座(社外公開版) 2024年4月作成
業務で生成AIを活用したい人のための生成AI入門講座(社外公開版) 2024年4月作成
 
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdfクラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
 
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdfAWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
 
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
 
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
 
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察  ~Text-to-MusicとText-To-ImageかつImage-to-Music...モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察  ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 

Image interpolation

  • 1. Image Interpolation 画像補間法 2015, by sai@nac 崔 国偉(工学博士)
  • 2. 補間方法リスト  「Nearest Neighbor法」 --- 省略  「Bilinear法」  「Bicubic法」  「Lanczos法」  「Spline法」  「Trilinear法」
  • 3. Bilinear法 𝐼(𝑥0, 𝑦0) 𝐼(𝑥0 + 1, 𝑦0) 𝐼(𝑥0, 𝑦0 + 1) 𝐼(𝑥0 + 1, 𝑦0 + 1) 𝐼(𝑥, 𝑦) = 1.0 − 𝑝 1.0 − 𝑠 𝐼(𝑥0, 𝑦0)+ p 1.0 − 𝑠 𝐼(𝑥0 + 1, 𝑦0)+ 1.0 − 𝑝 𝑠𝐼(𝑥0, 𝑦0 + 1)+ ps𝐼(𝑥0 + 1, 𝑦0 + 1) 𝑝 + 𝑞 = 1.0 𝑠 + 𝑡 = 1.0 係数 = 1.0  元画像の2x2画素データを使用
  • 4. Bicubic法  元画像の4x4画素データを使用  係数計算 𝐼 𝑥, 𝑦 = 𝑖=0 3 𝑗=0 3 𝑤 𝑑𝑥𝑖)𝑤(𝑑𝑦𝑗 𝐼(𝑥0 + 𝑖, 𝑦0 + 𝑗) 𝑖=0 3 𝑗=0 3 𝑤 𝑑𝑥𝑖 𝑤(𝑑𝑦𝑗) 𝑤(𝑑) = 1 − 2𝑑2 + 𝑑3 4 − 8𝑑 + 5𝑑2 − 𝑑3 0 |𝑑| ≤ 1.0 1.0 ≤ |𝑑| ≤ 2.0 2.0 ≤ |𝑑| 係数 = 1.0
  • 5. Bicubic法 --- 続き  補間関数 φ(t) として、次のような三次の多項式 を考えます。ここで、各ピクセルの間隔 h の値 を h = 1 とします。  φ(0) = 1、φ(±1) = φ(±2) = 0 より、4式  φ(t)が連続であるためには、φ(t)の左側微分係 数 φ-‘(t) と右側微分係数 φ+’(t) が等しい必要が あることで、3式  七つの連立方程式に対して未知数は八つなので、 全ての未知数を得ることはできません。そこで、 b3 = α として、各未知数をαを使って表す 𝑤(𝑡) = 𝑎 + 2 𝑡 3 − 𝑎 + 3 𝑡 2 + 1 𝑎|𝑡|3 − 5𝑎 𝑡 2 + 8𝑎 𝑡 − 4𝑎 0 0 ≤ |𝑡| < 1 1 ≤ |𝑡| < 2 2 ≤ |𝑡|  よって、下記の補間関数を得る。(キュー ビックコンボリューション)  aは補間関数の性質を制御するための変数 (-0.5~-2程度が用いられる)  一般的に、設定a=-1。前ページの式を導 き出す。 𝜑(𝑡) = 𝑎3 𝑡 3 + 𝑎2 𝑡 2 + 𝑎1 𝑡 + 𝑎0 𝑏3|𝑡|3 + 𝑏2 𝑡 2 + 𝑏1 𝑡 + 𝑏0 0 0 ≤ |𝑡| < 1 1 ≤ |𝑡| < 2 2 ≤ |𝑡| φ(0) = a0 = 1 φ(±1) = a3 + a2 + a1 + a0 = 0 φ(±1) = b3 + b2 + b1 + b0 = 0 φ(±2) = 8b3 + 4b2 + 2b1 + b0 = 0 φ-'(0) = -a1 = φ+'(0) = a1 φ-'(±1) = 3a3 + 2a2 + a1 = φ+'(±1) = 3b3 + 2b2 + b1 φ-'(±2) = 12b3 + 4b2 + b1 = φ+'(±2) = 0
  • 6. Lanczos2法  元画像の4x4画素データを使用  係数計算 𝐼 𝑥, 𝑦 = 𝑖=0 3 𝑗=0 3 𝑤 𝑑𝑥𝑖)𝑤(𝑑𝑦𝑗 𝐼(𝑥0 + 𝑖, 𝑦0 + 𝑗) 𝑖=0 3 𝑗=0 3 𝑤 𝑑𝑥𝑖 𝑤(𝑑𝑦𝑗) 𝑤(𝑑) = 𝑠𝑖𝑛𝑐(𝑑) 𝑠𝑖𝑛𝑐( 𝑑 2) 0 |𝑑| ≤ 2 𝑜𝑡ℎ𝑒𝑟 𝑠𝑖𝑛𝑐(𝑥) = sin(𝜋𝑥) (𝜋𝑥) sinc関数によってエッジ部などでは鮮鋭化の効果が期待できる。
  • 7. Lanczos3法  元画像の6x6画素データを使用  係数計算 𝐼 𝑥, 𝑦 = 𝑖=0 5 𝑗=0 5 𝑤 𝑑𝑥𝑖)𝑤(𝑑𝑦𝑗 𝐼(𝑥0 + 𝑖, 𝑦0 + 𝑗) 𝑖=0 5 𝑗=0 5 𝑤 𝑑𝑥𝑖 𝑤(𝑑𝑦𝑗) 𝑤(𝑑) = 𝑠𝑖𝑛𝑐(𝑑) 𝑠𝑖𝑛𝑐( 𝑑 3) 0 |𝑑| ≤ 3 𝑜𝑡ℎ𝑒𝑟 𝑠𝑖𝑛𝑐(𝑥) = sin(𝜋𝑥) (𝜋𝑥) d w
  • 8. 3次畳み込み補間  行列式計算、元画像の4x4画素データを使用  係数はbicubic, lanczos2の係数計算式で求められる。  距離  計算結果は、16点の元画像データの最小値より小さな値となる場合 や、最大値より大きな値となる場合があるので、ご注意が必要です。 (正規化しないため)  (正規化の場合:上式に 𝑤 𝑝 𝑤 𝑞を割る) 𝐼(𝑥, 𝑦) = 𝑤(1 + 𝑞) 𝑤(𝑞) 𝑤(1 − 𝑞) 𝑤(2 − 𝑞) 𝐼(−1, −1) 𝐼(−1,0) 𝐼(−1,1) 𝐼(−1,2) 𝐼(0, −1) 𝐼(0,0) 𝐼(0,1) 𝐼(0,2) 𝐼(1, −1) 𝐼(1,0) 𝐼(1,1) 𝐼(1,2) 𝐼(2, −1) 𝐼(2,0) 𝐼(2,1) 𝐼(2,2) 𝑤(1 + 𝑝) 𝑤(𝑝) 𝑤(1 − 𝑝) 𝑤(2 − 𝑝) I(-1,-1) I(2,2) q p I(-1,2) I(1,-1) I(x,y) 0 ≤ 𝑝 < 1.0 0 ≤ 𝑞 < 1.0
  • 9. City block距離 vs.直線距離  ここまで、Bilinear法、Bicubic法、Lanczos法、すべて「X方向の距離とY方向の 距離を求め、それぞれのウェイト(係数)計算をし、X方向のウェイトとY方向の ウェイトを掛ける。」という手法をとってきました。  直線距離で計算するのは?  画質という意味では Lanczos2 の直線距離計算が最もバランスがとれているよう に思います。が、 1ピクセルあたり、平方根(√)の計算が 16 回発生する事になり、 計算量がとんでもない事になります。 𝐼 𝑥, 𝑦 = 𝑖=0 3 𝑗=0 3 𝑤 𝑑𝑖𝑗 𝐼(𝑥0 + 𝑖, 𝑦0 + 𝑗) 𝑖=0 3 𝑗=0 3 𝑤 𝑑𝑖𝑗 𝑑𝑖𝑗 = 𝑑𝑥𝑖 2 + 𝑑𝑦𝑗 2
  • 10. Spline法 (三次スプライン補間法)  元画像の4x4画素データを使用する。四点(0,0), (1,0), (0,1), (1,1)からなる格子内の点 に対する値が次の多項式の値と等しくなると仮定します  𝐼 𝑥, 𝑦 = 𝑎00 + 𝑎10 𝑝 + 𝑎20 𝑝2 + 𝑎30 𝑝3 +𝑎01 𝑞 + 𝑎11 𝑝𝑞 + 𝑎21 𝑝2 𝑞 + 𝑎31 𝑝3 𝑞 +𝑎02 𝑞2 + 𝑎12 𝑝𝑞2 + 𝑎22 𝑝2 𝑞2 + 𝑎32 𝑝3 𝑞2 +𝑎03 𝑞3 + 𝑎13 𝑝𝑞3 + 𝑎23 𝑝2 𝑞3 + 𝑎33 𝑝3 𝑞3  未知の係数 aijの求め方:  ①四点I(i,j)の値を代入すると、4個の式が得られた  ②I(x,y) を x で偏微分します。四点で4個の式が得られた  ③I(x,y) を y で偏微分します。四点で4個の式が得られた  ④最後に混合微分 Ixy(x,y) 。これで、計 16個の式が得られた  だから、未知数 aij も 16 個あることから連立方程式によって係数を求めることがで きます p q (1) 𝐴𝛼 = 𝑓
  • 11. Spline法 (三次スプライン補間法) ---続き  連立方程式  未知の係数aij α = ( a00, a10, a20, a30, a01, a11, a21, a31, a02, a12, a22, a32, a03, a13, a23, a33 )T  右辺の値からなるベクトルf  未知係数の解は α = A-1f になります。 𝐴𝛼 = 𝑓 α = A-1f (2)
  • 12. Spline法 (三次スプライン補間法) ---続き  この逆行列 A-1は次のようなものになります。 { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, {-3, 3, 0, 0, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 2, -2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, -3, 3, 0, 0, -2, -1, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 1, 1, 0, 0 }, {-3, 0, 3, 0, 0, 0, 0, 0, -2, 0, -1, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, -3, 0, 3, 0, 0, 0, 0, 0, -2, 0, -1, 0 }, { 9, -9, -9, 9, 6, 3, -6, -3, 6, -6, 3, -3, 4, 2, 2, 1 }, {-6, 6, 6, -6, -3, -3, 3, 3, -4, 4, -2, 2, -2, -2, -1, -1 }, { 2, 0, -2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, 0, 1, 0, 1, 0 }, {-6, 6, 6, -6, -4, -2, 4, 2, -3, 3, -3, 3, -2, -1, -2, -1 }, { 4, -4, -4, 4, 2, 2, -2, -2, 2, -2, 2, -2, 1, 1, 1, 1 }
  • 13. Spline法 (三次スプライン補間法) ---続き  偏微分 Ix(x,y),  偏微分 Iy(x,y),  微分混合微分 Ixy(x,y)  画素毎に、補間値の求め手順:  (3)(4)(5)式により、ベクトルfを求める  (2)式により、係数ベクトルαを求める  (1)式により、補間位置の値I(x,y)を計算する 𝐼 𝑥(𝑥, 𝑦) = 𝐼 𝑥 + 1, 𝑦 − 𝐼(𝑥 − 1, 𝑦) 2 𝐼 𝑦(𝑥, 𝑦) = 𝐼 𝑥, 𝑦 + 1 − 𝐼(𝑥, 𝑦 − 1) 2 𝐼 𝑥𝑦(𝑥, 𝑦) = 𝐼 𝑥 + 1, 𝑦 + 1 − 𝐼(𝑥 − 1, 𝑦 − 1) 8 (3) (4) (5) 計算量が非常に多い!
  • 14. Trilinear法 (トリリニア) 係数 = 1.0  3次元線形補間、元画像の2x2x2画素データ(8点) を使用する。P1~P8は隣接点で、Piの値を求める。  P1点に基準として、Piの相対位置は(p,q,w)になれば、 Piの値は x y z 𝐼 𝑝𝑖 = 1 − 𝑝 1 − 𝑞 1 − 𝑤 𝐼 𝑝1 +𝑝 1 − 𝑞 1 − 𝑤 𝐼 𝑝2 + 1 − 𝑝 1 − 𝑞 𝑤𝐼 𝑝3 +𝑝 1 − 𝑞 𝑤𝐼 𝑝4 + 1 − 𝑝 𝑞 1 − 𝑤 𝐼 𝑝5 +𝑝𝑞 1 − 𝑤 𝐼 𝑝6 + 1 − 𝑝 𝑞𝑤𝐼 𝑝7 +𝑝𝑞𝑤𝐼 𝑝8