fuzzy art for relatively fast unsupervised image color quantization

31
http://www.nshort er.com 1 Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization Takis Kasparis [email protected] f.edu Nicholas S. Shorter [email protected] School of Electrical Engineering and Computer Science University of Central Florida Orlando, Florida, 32816 USA Research Website: http://www.nshorter.c om

Upload: vinaya

Post on 09-Jan-2016

32 views

Category:

Documents


1 download

DESCRIPTION

Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization. Nicholas S. Shorter [email protected]. Takis Kasparis [email protected]. Research Website: http://www.nshorter.com. School of Electrical Engineering and Computer Science University of Central Florida - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 1

Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

Takis Kasparis

[email protected]

Nicholas S. Shorter

[email protected]

School of Electrical Engineering and Computer ScienceUniversity of Central Florida

Orlando, Florida, 32816 USA

Research Website:http://www.nshorter.com

Page 2: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 2

Presentation Outline

• Research Objectives

• Fuzzy ART

• Cluster Assignment Methods

• Performance Metrics

• Experiments

• Results Discussion

• Conclusions

Page 3: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 3

Research Objectives

• Investigate use of Fuzzy ART (FA) efficient for Color Quantization (CQ) of large color (1600x2000 pixels and greater) images

• Use FA CQ as a preprocessing step for JSEG Color Image Segmentation

• Use JSEG Image Segmentation (w/ other methods) for Building Detection in Aerial Images

Page 4: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 4

Color Quantization

• Reducing Number of Colors in Image– Typically used as a preprocessing technique to

image processing applications

• Color Quantized Image should be as similar to the Original as possible

• FA chosen to cluster RGB color component values

Page 5: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 5

Fuzzy Adaptive Resonance Theory• Unsupervised Learning, Clustering Algorithm• Three User Defined Parameters:

– Vigilance Parameter ρ [0,1]• Closer to 0 results in less clusters created• Closer to 1 results in more clusters created

– Learning Rate β [0,1]• Slow Learning β < 1

– Input patterns update clusters (grow to eventually include input)• Fast Learning β = 1

– Upon presentation of input, cluster immediately updated to contain input

– Choice Parameter α (0,∞)• Affects bottom up input calculations

Page 6: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 6

Input Image Presentation to FA

• Define Input Image as matrix with RxC cells each containing 3 components – RGB– – Where and

• Input then reorganized as a single array:– where( ) ( )ary k i j inI I( ) ( )ary k i j inI I( ) ( )ary k i j inI I

, , ,( , ) ( , ), ( , ) ( , ){ }in r in g in bi j I i j I i j I i jinI

1,2,...,i R 1,2,...,j C

1,2,...,k R C

Page 7: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 7

Complement Coding for FA

• Input values normalized between 0 and 1:– (for red color)

• Complement of a:–

• Complement Encoded Input:–

,( ) ( ) 255r ary ra k I k

( ) 1 ( )ca k a k

, , , , ,( ) ( ) ( ) ( ) ( ) ( ) ( )c c cr g b r g bk a k a k a k a k a k a kX , , , , ,( ) ( ) ( ) ( ) ( ) ( ) ( )c c cr g b r g bk a k a k a k a k a k a kX

( ) 1 ( )ca k a k

, , , , ,( ) ( ) ( ) ( ) ( ) ( ) ( )c c cr g b r g bk a k a k a k a k a k a kX

,( ) ( ) 255r ary ra k I k

( ) 1 ( )ca k a k

, , , , ,( ) ( ) ( ) ( ) ( ) ( ) ( )c c cr g b r g bk a k a k a k a k a k a kX

Page 8: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 8

Fuzzy ART Classification

• Fuzzy ART groups pixels with similar RGB values into the same cluster (with CL total clusters)

• Pixels belonging to cluster p are labeled – – – Where

, , ,, , , , ,( ) ( ) ( ) ( ) ( ) ( ) ( )p p p p c p c p c

r g b r g bk a k a k a k a k a k a kpX

1,2,..., Lp C

Page 9: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 9

Cluster Assignment

• Average– The Red, Blue and Green color components,

for all pixels in cluster p, are averaged together:

• (for red color)

– Output for pixel at position (i,j):•

,

1,p p

r in rpp

A I i jN

, , ,p p pr g bi j A A AO

Page 10: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 10

Cluster Assignment

• Median– Calculate median of red, green and blue color

components in single cluster p– Output at position (i,j) is pixel cluster’s median

• Trimmed Average– Sort individual color components in cluster P in

ascending order – Calculate mid 1/3 average (of each color

component)– Represent Output as Trimmed Average

, , ,p p pr g bi j M M MO

, , ,p p pr g bi j TA TA TAO

Page 11: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 11

Performance Metrics

• Algorithm Execution Time (Machine Specific)• Processor - AMD 3700, 2.2 GHz (Single Core)

• Ram - 2GB of DDR400

– RMSE Between Original and CQ Image• MSE for red color comp. defined as follows:

• Taking average and square root of MSEr, MSEg, and MSEb

2

,1 1

1, ( , )

R C

r r in ri j

MSE O i j I i jR C

1

3 r g bRMSE MSE MSE MSE

Page 12: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 12

Experiments

• Three sets of experiments conducted at incremental values of vigilance parameter– First set – Forced Stop after Single Epoch

• and (one shot learning)

– Second Set – Forced Stop after Three Epochs• and

– Third Set – Algorithm ran until convergence• and • Convergence: no new classes created

1 0.0001

0.8 0.1

0.8 0.01 0.8 0.01 0.8

0.1

0.01 0.8

0.8 0.1

0.01 0.8

1

0.8 0.1

0.01 0.8

0.0001 1

0.8 0.1

0.01 0.8

Page 13: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 13

RMSE vs. Vigilance Parameter

RMSE vs. Vig. for Epochs for Mandrill

0.00

5.00

10.00

15.00

20.00

25.00

30.00

0.5 0.6 0.7 0.8 0.9

Vigilance ParameterR

oo

t M

ean

Sq

uar

e E

rro

r

Single Epoch Three Epochs Convergence

RMSE vs. Vig. for Epochs for Lenna

0.00

5.00

10.00

15.00

20.00

25.00

30.00

0.5 0.6 0.7 0.8 0.9

Vigilance Parameter

Ro

ot

Mea

n S

qu

are

Err

or

Single Epoch Three Epochs Convergence

Page 14: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 14

Experiments cont.

• Six Additional Sets of Experiments– 3 Cluster Assignment Methods Tested on

Mandrill– 3 Cluster Assignment Methods Tested on

Lenna– Vigilance parameter fine tuned so resulted CQ

Image had 16, 32, 64, 128, 256 and 512 colors

Page 15: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 15

Lenna and Mandrill Images

• Lenna– Image Dimensions – 512x512– Number of Colors – 148,279

• Mandrill– Image Dimensions – 512x512– Number of Colors – 230,427

Page 16: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 16

RMSE for Diff Cluster Assignment Methods

RMSE for Diff. Output Methods for Lenna

0.00

2.00

4.00

6.00

8.00

10.00

12.00

14.00

16.00

18.00

16 32 64 128 256 512

Colors

Ro

ot

Mea

n S

qu

are

Err

or

AVG Med Col Trim AVG

RMSE for Diff. Output Methods for Mandrill

0.00

5.00

10.00

15.00

20.00

25.00

30.00

16 32 64 128 256 512

ColorsR

oo

t M

ean

Sq

uar

e E

rro

r

AVG Med Col Trim AVG

Page 17: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 17

Original Lenna and Lenna 64 Color

Page 18: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 18

Original Mandrill and Mandrill 64 Color

Page 19: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 19

Experiments with Natural Scenes

• Images depict commercial and residential buildings in Fairfield, Australia

• Images have 15cm pixel resolution• Scene 1

– Image Dimensions - 1510x1973 Pixels– Number of Colors – 698,843

• Scene 2– Image Dimensions – 1595x1878– Number of Colors – 519,513

Page 20: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 20

Scene 1 Original

Page 21: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 21

Scene 1 64 Color

Page 22: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 22

Scene 2 Original

Page 23: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 23

Scene 2 64 Color

Page 24: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 24

Scene 1 Original vs CQ

Page 25: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 25

Scene 2 Original vs CQ

Page 26: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 26

Execution Times For Images• 256 Colors

– Lenna Image 22 Seconds– Mandrill Image 23 Seconds– Natural Scene 1* 295 Seconds (~4.9 minutes)– Natural Scene 2* 259 Seconds (~4.3 minutes)

• 512 Colors– Lenna Image 40 Seconds– Mandrill Image 42 Seconds– Natural Scene 1* 583 Seconds (~9.7 minutes)– Natural Scene 2* 576 Seconds (~9.6 minutes)

*Recall Images are ~1500x~1900 Pixels (10 times more the number of pixels than Lenna and Mandril)

Page 27: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 27

Discussion of Results

• Lenna looks better because it originally has 80,000 colors less than Mandrill

• Letting FA execute for more than 1 epoch– does not yield significant decrease in RMSE for vig >

0.5 (more than 16 CQ colors)

– Recommend One Shot Stable Learning and only input list presentation

• Averaging output method yielded best RMSE and lowest execution time– When compared to Median and Trimmed Average

Page 28: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 28

Conclusions

• Algorithm Advantages– Proposed FA CQ (one shot stable learning) completes

execution after only single input presentation• The methods proposed in (Ashutosh et. al, 2007) require

multiple input presentations

• Method proposed in (El-Mihoub et. al, 2006) runs until stop criteria is met

• Algorithm Disadvantages– Quick execution comes at a cost of an increase in

RMSE

– Cannot directly specify number of quantized colors

Page 29: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 29

Comparing RMSE

• El-Mihoub et. al, 2006– RMSE for Lenna 16 Color Quantization

• Ashutosh et. al, 2007– RMSE for Lenna at 32, 64, 128 and 256

Colors 32 64 128 256FACQ RMSE 20.91 16.72 13.29 10.34MFOCPN RMSE 13.7 10.3 8.5 6

Popalg Medct FA CQ Octree Neuqu SAHGARMSE 19.7 16.5 15.6 10.8 10.4 9.7

Page 30: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 30

Future Work

• Using FA CQ as preprocessor to JSEG– Using JSEG to segment aerial images

containing buildings– Using segmented images as low level features

for automatic building detection

• Explore use of additional features to account for pixel’s location and context in image (in addition to RGB value)

Page 31: Fuzzy ART for Relatively Fast Unsupervised Image Color Quantization

http://www.nshorter.com 31

Acknowledgements

• Harris Cooperation for their Funding

• Fairfield Data Set from Dr. Simon Clode, Dr. Franz Rottensteiner, AAMHatch