29
STUDENT NAME: YEN-TING LIN STUDENT ID: 603415124 Computational Photography Final Project Image effect machine

STUDENT NAME: YEN-TING LIN STUDENT ID: 603415124 Computational Photography Final Project Image effect machine

Embed Size (px)

Citation preview

STUDENT NAME: YEN-TING LINSTUDENT ID: 603415124

Computational Photography Final Project

Image effect machine

Outline

Introduction

Method

Implementing

Further Work

Reference

Outline

Introduction

Method

Implementing

Further Work

Reference

Introduction

動機 課堂中學習到使用 opengl 與 FLTK ,因此想藉由此平台完成

一些影像處理的實作

設備平台 作業環境: Win7 64bit 編輯器: Visual Studio 2010

Outline

Introduction

Method

Implementing

Further Work

Reference

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/

Negative

負片,也可稱 Invert即將 RGB 最大值減去原始值

Average filter

使用 3x3 的平均濾波器

a b c

d e f

g h i

𝑝 ′=19(𝑎+𝑏+𝑐+𝑑+𝑒+ 𝑓 +𝑔+𝑖)

𝑝 ′ (𝑖 , 𝑗 )= ∑𝑠=− 1

𝑠=1

∑𝑡=− 1

𝑡=1

𝑚 (𝑠 , 𝑡 )𝑝 (𝑖+𝑠 , 𝑗+𝑡)

Gamma correction

Power-law(Gamma) transformations:

• There I set c=1

• And we can control the value

Histogram equalization

取一張影像的亮度資訊 其影像亮度值為的像素出現機率為 對應的累積機率函數 : 新亮度值 : 表示亮度值出現的次數

: 影像所有像素數: 影像所有亮度值

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

Outline

Introduction

Method

Implementing

Further Work

Reference

Implementing

User Interface

The input imagesImage effect buttons

Clean output

Implementing

RGB to gray-level

Click image to display the demo

Implementing

Negative

Click image to display the demo

Implementing

Average filter

Click image to display the demo

Implementing

Gamma correction

Click image to display the demo

Implementing

Histogram equalization

Click image to display the demo

Implementing

Sobel edge detection

Click image to display the demo

Implementing

Full Demo

Click image to display the demo

Outline

Introduction

Method

Implementing

Further Work

Reference

Further Work

Input 的影像可以再修改成使用者可自行選擇想要的影像作處理。

希望之後可以再增加其他功能,如 影像銳利化 將效果疊加 等…

Outline

Introduction

Method

Implementing

Further Work

Reference

Reference

劉振昌 . 數位影像處理 . 高立圖書Professor 柳金章 slidesProfessor 劉興民 slides

THANKS FOR YOUR

ATTENTION