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

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

Dec 30, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: STUDENT NAME: YEN-TING LIN STUDENT ID: 603415124 Computational Photography Final Project Image effect machine.

STUDENT NAME: YEN-TING LINSTUDENT ID: 603415124

Computational Photography Final Project

Image effect machine

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

Outline

Introduction

Method

Implementing

Further Work

Reference

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

Outline

Introduction

Method

Implementing

Further Work

Reference

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

Introduction

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

一些影像處理的實作

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

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

Outline

Introduction

Method

Implementing

Further Work

Reference

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

Method

RGB to gray-levelThe relationship between RGB & HSIThe relationship between RGB & CIE-L*a*b*NegativeAverage filterGamma correctionHistogram equalizationSobel edge detection

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

RGB to Gray-level

將 RGB 彩圖轉為灰階基本想法

從心理學得知,人眼對於灰階值產生的比例為

http://atlaboratary.blogspot.tw/2013/08/rgb-g-rey-l-gray-r0.html

此程式實現其方法

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

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

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

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)

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

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/

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

Negative

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

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

Average filter

使用 3x3 的平均濾波器

a b c

d e f

g h i

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

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

𝑠=1

∑𝑡=− 1

𝑡=1

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

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

Gamma correction

Power-law(Gamma) transformations:

• There I set c=1

• And we can control the value

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

Histogram equalization

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

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

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

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

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

Outline

Introduction

Method

Implementing

Further Work

Reference

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

Implementing

User Interface

The input imagesImage effect buttons

Clean output

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

Implementing

RGB to gray-level

Click image to display the demo

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

Implementing

Negative

Click image to display the demo

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

Implementing

Average filter

Click image to display the demo

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

Implementing

Gamma correction

Click image to display the demo

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

Implementing

Histogram equalization

Click image to display the demo

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

Implementing

Sobel edge detection

Click image to display the demo

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

Implementing

Full Demo

Click image to display the demo

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

Outline

Introduction

Method

Implementing

Further Work

Reference

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

Further Work

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

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

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

Outline

Introduction

Method

Implementing

Further Work

Reference

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

Reference

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

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

THANKS FOR YOUR

ATTENTION