Upload
brandon-adrian-mcdowell
View
216
Download
0
Embed Size (px)
Citation preview
STUDENT NAME: YEN-TING LINSTUDENT ID: 603415124
Computational Photography Final Project
Image effect machine
Introduction
動機 課堂中學習到使用 opengl 與 FLTK ,因此想藉由此平台完成
一些影像處理的實作
設備平台 作業環境: Win7 64bit 編輯器: Visual Studio 2010
Method
RGB to gray-levelThe relationship between RGB & HSIThe relationship between RGB & CIE-L*a*b*NegativeAverage filterGamma correctionHistogram equalizationSobel edge detection
RGB to Gray-level
將 RGB 彩圖轉為灰階基本想法
從心理學得知,人眼對於灰階值產生的比例為
http://atlaboratary.blogspot.tw/2013/08/rgb-g-rey-l-gray-r0.html
此程式實現其方法
RGB to HSI HSI to RGB
RG sector () B = (1-S) R = G = 3
GB sector ()
R = (1-S) G = B = 3
BR sector ()
G = (1-S) B = R = 3
The relationship between RGB & HSI
H: hue( 色相 )S: saturation( 飽和度 ) I: illuminance( 亮度 )
R: red valueG: green value
B: blue value
RGB to CIE-XYZ CIE-XYZ to CIE-L*a*b*
where
Xn = 0.9515 Yn = 1.0000 Zn = 1.0886
The relationship between RGB & CIE-L*a*b* (1/2)
CIE-L*a*b to CIE-XYZ CIE-XYZ to RGB
then else
then else
then else
[𝑅𝐺𝐵]=[ 3 .240479 −1.537150 −0.498535−0.969256 1.875992 0.0415560.055648 −0.204043 1.057311 ][ 𝑋
𝑌𝑍 ]
The relationship between RGB & CIE-L*a*b* (2/2)
https://cg2010studio.wordpress.com/2012/10/02/rgb%E8%88%87cielab%E8%89%B2%E5%BD%A9%E7%A9%BA%E9%96%93%E8%BD%89%E6%8F%9B/
Average filter
使用 3x3 的平均濾波器
a b c
d e f
g h i
𝑝 ′=19(𝑎+𝑏+𝑐+𝑑+𝑒+ 𝑓 +𝑔+𝑖)
𝑝 ′ (𝑖 , 𝑗 )= ∑𝑠=− 1
𝑠=1
∑𝑡=− 1
𝑡=1
𝑚 (𝑠 , 𝑡 )𝑝 (𝑖+𝑠 , 𝑗+𝑡)
Sobel edge detection
First we need to know the Gradient operators. The gradient of an image f(x, y) at location (x, y) is defined as the vector:
We have the mask
If the equation are
we called that the Sobel operators