digital image processing #hw2

18
Digital Image Processing #HW2 -RGB to YCbCr Conversion -Background Subtraction & Denoising Using Morphological Operator Contact Information Tzu-Jui Wang ( 王王王 ) Visual Communications Lab Dep. of Communications Engineering, National Central University No.300, Jhongda Rd., Jhongli City, Taoyuan County 32001, Taiwan (R.O.C.) Phone: +886958801691 E-mail: [email protected]

Upload: trent

Post on 04-Jan-2016

44 views

Category:

Documents


1 download

DESCRIPTION

Digital Image Processing #HW2. RGB to YCbCr Conversion Background Subtraction & Denoising Using Morphological Operator. Contact Information Tzu- Jui Wang ( 王子睿 ) V isual C ommunications Lab Dep. of C ommunications E ngineering, N ational C entral U niversity - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Digital Image Processing #HW2

Digital Image Processing #HW2-RGB to YCbCr Conversion

-Background Subtraction & Denoising Using Morphological Operator

Contact Information

Tzu-Jui Wang (王子睿 ) Visual Communications Lab

Dep. of Communications Engineering,

National Central University No.300, Jhongda Rd., Jhongli City,

Taoyuan County 32001, Taiwan (R.O.C.) Phone: +886958801691

E-mail: [email protected]

Page 2: Digital Image Processing #HW2

Outline• Part #1 – RGB to YCbCr Conversion– Introduction to YCbCr

• Part #2 – Background Subtraction & Denoising using morphological operator

– Background Subtraction– Morphological operator

• Dilation & Erosion• Opening operator

• Grading Policy• Due Data & Demo Schedule

Page 3: Digital Image Processing #HW2

Introduction to YCbCr• Another color space.– Used in digital video and photography system.– Encode RGB information

• Y – luminance (強度 )• Cb – Chroma (彩度 ) of blue components• Cr – Chroma of red components

Page 4: Digital Image Processing #HW2

Introduction to YCbCr

RGB space

Y component

Cb component

Cr component

Page 5: Digital Image Processing #HW2

Introduction to YCbCr• Convert RGB to YCbCr

• Show the images representing Y, Cb, Cr, respectively.

128

128

0

1051506150

436028901470

114058702990

B

G

R

Cr

Cb

Y

...

...

...

Page 6: Digital Image Processing #HW2

Background Subtraction

• Visual “difference” always surprises machine ! (or human )

What I usually see…nothing’s new.

Oops..! Whose slipper ?

Page 7: Digital Image Processing #HW2

Background Subtraction• How to detect the unusual objects ?– Simplest method : background subtraction– Possible application : event detection / analysis.

- = ?

Y component of foreground Y component of background

Page 8: Digital Image Processing #HW2

Background Subtraction• Find the difference of two images in Y

component.• Produce binary images with proper threshold.

image new:

image background:

image foreground:

Z

Y

X

Noises are everywhere

!

0;

else

255;

) threshold ( if

Z(i,j)

Z(i,j)

(i,j)X(i,j) - Y

The output

Page 9: Digital Image Processing #HW2

What’s the Problem ?• Luminance components are always affected by

lights seriously !– But how about Cb and Cr components ?

Page 10: Digital Image Processing #HW2

Denoising Using Morphological Operator• Dilation (膨脹 )

(9.2-3)(9.2-4)

B : structure element

Page 11: Digital Image Processing #HW2

Denoising Using Morphological Operator• Erosion (侵蝕 )

(9.2-1)

(9.2-2)

B : structure element

Page 12: Digital Image Processing #HW2

Denoising Using Morphological Operator• Opening operator– Erode, and dilate.– Remove small object (noise), keep original shape.

After processing with opening

operator

Page 13: Digital Image Processing #HW2

Denoising Using Morphological Operator• Perfectly separate slipper and background.

Page 14: Digital Image Processing #HW2

Grading Policy• Part #1– Output images in Y, Cb, Cr component, respectively.

(2%)• Part #2– Output image after background subtraction and

thresholding (in binary form). (The noisy one) (2%)– Output two images, • After eroding. (1.5%)• After opening.(1.5%)

• Report (3%)

Page 15: Digital Image Processing #HW2

Download Test Samples• The test samples can be downloaded at– http://

140.115.156.251/vclab/html/course/DIP2010.html– .jpg files are provided, so you need to use MATLAB (or

others ?) to access the pixel information. (BUT DON’T implement this assignment in MATLAB)

Page 16: Digital Image Processing #HW2

Due Date & Demo Schedule• 11/17, Thursday, 19:00, R3-307 (@VCLab).• Send your report before 19:00, 11/17.– [email protected]– .pdf file is preferred.

Page 17: Digital Image Processing #HW2

Due Date & Demo Schedule• Your report could be much better.– There’re many details you can give in this assignments• Which component used for background subtraction

separates foreground and background better ? (or even fuse the subtraction results on multiple components ! You can try )• How do you setup your thresholds ?• How do you define your size of square structure element ?• What if change the shape of the structure element ?

– Fully discuss your wonderful design and the results.

Page 18: Digital Image Processing #HW2

Thanks, Good Luck !