1
Original Image
例1 RGBカラー信号の主成分分析
RGB空間での画素値の分布
・・・
・・・
1
1
1
1
B
G
R
x
2x3x1x
オリジナル画像
Program name:PCAdemoRGB.m
2
Two-comonent Image
One-comonent Image
例1 RGBカラー信号の主成分分析
RGB空間での画素値の分布
第1および第2主成分のみ
第1主成分のみ
3
400 450 500 550 600 650 700-0.25
-0.2
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
Wavelength (nm)
Refle
cta
nce
First four principal components
1st
2nd
3rd
4th
例2 ~分光反射率の近似~
自然界の分光反射率サンプル
低い次元数で元の信号を表現できる.
400 450 500 550 600 650 7000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Wavelength (nm)
Refle
cta
nce
170 reflectance spectra of natural color
主成分(第1~第4) 主成分分析
r m k uii
i( ) ( ) ( )
1
4
波長:400,404,...,700nm -> 61次元
r m k uii
i( ) ( ) ( )
1
61
4 分光反射率データの累積寄与率
1 2 3 4 5 6 7 8 9 100.8
0.82
0.84
0.86
0.88
0.9
0.92
0.94
0.96
0.98
1
Number of Principal Component
Cum
ula
tive
Conto
ribution R
atio
5 4次までの主成分で近似した例
400 500 600 7000
0.2
0.4
0.6
0.8
1
Wavelength (nm)
Refle
cta
nce
400 500 600 7000
0.2
0.4
0.6
0.8
1
Wavelength (nm)
Refle
cta
nce
400 500 600 7000
0.2
0.4
0.6
0.8
1
Wavelength (nm)
Refle
cta
nce
400 500 600 7000
0.2
0.4
0.6
0.8
1
Wavelength (nm)
Refle
cta
nce
オリジナル
近似
6 例3 画像圧縮
オリジナル画像群
PCA Hotelling Transform or Karhunen-Loeve transform
K-L変換(主成分分析)により,
分散の大きい順番に基底ベクトル
uij(x,y)(=基底画像)を算出.
k i j f x y u x yij
yx
( , ) ( , ) ( , )
係数算出:(内積演算)
分散の大きい係数のみ保存
戻すときは逆の手順で
f x y( , ) u11(x,y)
u12
x
y
x
y
u21 u22
j
i
j
i
7 画像の主成分分析例
画像を小ブロックに分割 各小ブロック内の画素をラスタスキャンの順に並べて列ベクトルにする
I番目のブロック(8x8=64画素)
画素値
x x( ) ( ),...,1 n
データセット
に対して主成分分析を行い,主成分ベクトルを求め,画像圧縮に用いる.
)(
64
)(
2
)(
1
)(
i
i
i
i
x
x
x
x
8 オリジナルおよび復元画像
# of synthesized components: 1 # of synthesized components: 3
# of synthesized components: 10 # of synthesized components: 20 # of synthesized components: 30
オリジナル 成分数:1 成分数:3
成分数:10 成分数:30 成分数:20
9 オリジナルおよび復元画像
# of synthesized components: 1
平均ベクトルが加算されているため,右図のパターンが顕著に見えるわけではない 第1主成分ベクトル
第1主成分ベクトルだけで近似した画像の拡大図
10 画像の主成分分析例
固有値の大きい順に並べた
最初の16枚の主成分画像
1
5
9 12
2 3 4
6
13
7 8
10 11
14 15 16 0 10 20 30 40 50 60 703
4
5
6
7
8
9 Eigen value spectrum
Index (i)
Eiv
en v
alue
(la
mbd
ai)
固有値スペクトル
11 オリジナルおよび復元画像
オリジナル 成分数:1 成分数:3
成分数:10
# of synthesized components: 1 # of synthesized components: 3
# of synthesized components: 10
12 画像の主成分分析例
固有値の大きい順に並べた
最初の16枚の主成分画像
固有値スペクトル
0 10 20 30 40 50 60 702
3
4
5
6
7
8
9 Eigen value spectrum
Index (i) E
iven
val
ue (
lam
bda
i)
1
5
9 12
2 3 4
6
13
7 8
10 11
14 15 16
13 固有画像の比較
固有値の大きい順に並べた
最初の16枚の主成分画像
1
5
9 12
2 3 4
6
13
7 8
10 11
14 15 16
1
5
9 12
2 3 4
6
13
7 8
10 11
14 15 16
固有値の大きい順に並べた
最初の16枚の主成分画像
14 固有値スペクトルの比較
0 10 20 30 40 50 60 702
3
4
5
6
7
8
9 Eigen value spectrum
Index (i)
Eiv
en v
alue
(la
mbd
ai)
0 10 20 30 40 50 60 703
4
5
6
7
8
9 Eigen value spectrum
Index (i)
Eiv
en v
alue
(la
mbd
ai)
15 腫瘍トラッキング
Respiratory phase
Tu
mor
Positio
n 1呼吸周期分の透視画像撮影
1fnf
Nf
nf :n枚目の画像をM行1列に並べた画像ベクトル
NN fff
A
11
入力
主成分分析(PCA)
主成分分析
出力
NN eee
E
11
ne :第n主成分ベクトル
マルチプルテンプレート 腫瘍検出
・・・
1T 2T 1NtempT NtempT
)(dimdim1dim1 NTT eeeK ntemp
Tntemp TKCompT
リアルタイム 入力画像
Input
)(dimdim1dim1 NTT eeeK
InputKCompIT
dim1dim1 tttntemp CompT
(例)CompT1を視覚化,dim = 50(※画像処理済み)
dim1dim1 iii CompI
類似度演算
腫瘍位置検出
16 トラッキング結果
Y D
irection
X
Direction
追跡結果 正解位置
トラッキング軌跡 x
y
:トラッキング結果
17 固有画像の応用例 -腫瘍の高速追尾-
Series of the projection image Preparation
ROI images
t
Vector representation
18
Prior to radiotherapy, each patient breathes on the treatment table. A series
of X-ray projection images are captured during breathing. Then multiple
templates are generated.
Generate more templates by shifting the averaged
image by small amounts for each bin:
・・・・
t
1 2 k M ・・ ・・
・・・・
Average the images in kth respiratory phase bin.
固有画像の応用例 -腫瘍の高速追尾-
19
Define the target position for each
template
Reducing template image dimension using principal component
analysis(PCA)
Multiple template
固有画像の応用例 -腫瘍の高速追尾-
20 パターン認識
2値画像 2値画像
画素値:1
画素値:0
画素値1のプロットの共分散行列
から主成分方向とばらつきを算出
画素値1のプロットの共分散行列
から主成分方向とばらつきを算出
-固有値(λ1,λ2)からパターンの一致度がわかる
-固有ベクトルの方向から物体の回転が検出できる