26
DEMOCRITUS UNIVERSITY OF THRACE - GREECE 1 Color Reduction using the combination of the Kohonen Self-Organized Feature Map and the Gustafson-Kessel fuzzy algorithm Konstantinos Zagoris, Nikos Papamarkos and Ioannis Koustoudis Image Processing and Multimedia Laboratory Department of Electrical & Computer Engineering Democritus University of Thrace 67100 Xanthi, Greece Email: [email protected] http://ipml.ee.duth.gr/~papamark/

Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

Embed Size (px)

DESCRIPTION

The color of the digital images is one of the most important components of the image processing research area. In many applications such as image segmentation, analysis, compression and transition, it is preferable to reduce the colors as much as possible. In this paper, a color clustering technique which is the combination of a neural network and a fuzzy algorithm is proposed. Initially, the Kohonen Self Organized Featured Map (KSOFM) is applied to the original image. Then, the KSOFM results are fed to the Gustafson-Kessel (GK) fuzzy clustering algorithm as starting values. Finally, the output classes of GK algorithm define the numbers of colors of which the image will be reduced.

Citation preview

Page 1: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

1

Color Reduction using the combination of the Kohonen Self-Organized Feature Map and the Gustafson-Kessel fuzzy

algorithm

Konstantinos Zagoris, Nikos Papamarkos and Ioannis Koustoudis

Image Processing and Multimedia LaboratoryDepartment of Electrical & Computer Engineering

Democritus University of Thrace67100 Xanthi, Greece

Email: [email protected] http://ipml.ee.duth.gr/~papamark/

Page 2: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

2

Problem definition

• The main objective of this work is to propose a novel Color Clustering technique which is the combination of a neural network and a fuzzy algorithm.

• Quantization of image colors is a very useful tool for segmentation, compression, presentation and transmission of images.

• Reduction of the image’s colors to a small number (to its dominant colors) is important mainly for image segmentation (for example, segmentation of color documents).

Page 3: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

3

Fig. 1 Original image Fig. 2 RGB color distribution

Fig. 3 Image with only 20 dominant colors

Fig. 4 Distribution of 20 colors

Page 4: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

4

Color Reduction techniques

• Several techniques have been proposed for color quantization which can be classified in the following main categories:– First, there is the class of splitting-merging algorithms that

divide the color space into disjoint regions, by consecutive splitting up the color space.

– Another class of quantization techniques consider the problem as a clustering approach.

– Finally, there are general color segmentation techniques, which can be considered as color reduction algorithms.

Page 5: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

5

Splitting-merging algorithms

• P. Heckbert, "Color image quantization for frame buffer display", Computer & Graphics, vol. 16, pp. 297-307, 1982.

• S. Wan, S. Wong, and P. Prusinkiewicz, “An Algorithm for Multidimentional Data Clustering”, ACM Trans. Math. Softw., vol. 14 no. 2, pp. 153-162, June 1988.

• I. Ashdown, "Octree color quantization", from the book: Radiosity-A Programmer's Perspective, Wiley, New York, 1994.

Algorithms based on clustering

• A.H. Dekker, "Kohonen neural networks for optimal color quantization", Network: Computation in Neural Systems, vol. 5, pp. 351-367, 1994.

• N. Papamarkos, "Color reduction using local features and a SOFM neural network", Int. Journal of Imaging Systems and Technology, vol. 10, no 5, pp. 404-409, 1999.

• N. Papamarkos, A. Atsalakis and C. Strouthopoulos, "Adaptive Color Reduction", IEEE Trans. On Systems, Man, and Cybernetics, IEEE Trans. on Systems, Man, and Cybernetics-Part B, vol. 32, no. 1, Feb. 2002.

• A. Atsalakis, N. Papamarkos , N. Kroupis , D. Soudris and A. Thanailakis, "A Color Quantization Technique Based on Image Decomposition And Its Hardware Implementation", IEE Proceedings Vision, Image and Signal Processing, Vol. 151, Issue 6, pp. 511-524, 2004.

Page 6: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

6

General Color Segmentation Algorithms

• Comaniciu, D., Meer, P.: Mean shift: a robust approach toward feature space analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence 24 (5). (2002) 603–619..

• Nikolaou, N., Papamarkos, N.: Color segmentation of complex document images. International Conference on Computer Vision Theory and Applications. Setúbal, Portugal, (2006) 220-227

Page 7: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

7

Overview of the Proposed Method

Original Image

Sub Sampling

Define the Number of Final Colors

Train KSOFM

Classification through KSOFM

Initialize GK with the KSOFM classification results

Run GK Algorithm

Final Classification through GK algorithm

Final Image

Page 8: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

8

Fractal Sub-Sampling Procedure

Hilbert ‘s curveBenefits:

•Smaller number of sampling pixels

•Capture of neighborhood regions

Fig. 1 Fig. 2

Fig. 3 Fig. 4

Page 9: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

9

Kohonen Self Organized Featured Map (KSOFM)

X1

Xk

X3

X2

Yj

Y3

Y2

Y1

Competitive LayerInput Layer

......

......

Wj1

Wj2

Wj3

Wjk

j k jky arg min x w

• The training algorithm of the KSOFM is based on competitive learning:

• The winner output neuron changes its connections weights as follows:

jk k jkw n x w

Page 10: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

10

Gustafson – Kessel Fuzzy Algorithm

The Gustafson – Kessel fuzzy algorithm is an extension of the fuzzy c-mean algorithm that produces ellipsoidal classes by using a covariance matrix:

Figure 1 Figure 2 Figure 3

Page 11: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

Gustafson – Kessel Fuzzy Algorithm

1. Define the number of the classes c, the weighting parameter m and the cluster volumes ρi.

2. Define the termination tolerance ε>0 and the number of iterations λ. Set a counter α equal to one ( α = 1).

3. Initialize randomly the partition matrix U=[uik]. In this work, the partition matrix is initialized not randomly but from the connections weights w jk of the KSOFM for each output class.

4. Compute the centers of the classes according to the following equation:

5. Compute the covariance matrix Fi for each class according to the following equation:

11

nm

ik kk 1

i nm

ikk 1

u xv , i 1,c and k 1,n

u

nm T

ik k i k ik 1

i nm

ikk 1

u (x v )(x v )F , i [1,c]

u

Page 12: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

12

6. Compute the matrix Ai for each class according to the following equation:

7. Compute the distance dik of every sample xk from the center of each class vi according to the following equation:

8. Update the partition matrix U=[uik] for each sample xk according to the following equation:

9. if or stop, else set and go to step 4.

1hi i i iA det F F , i [1,c]

T2ik k i i k id x v A x v

ik 2

m 1cik

j 1 ij

1u , i 1,c and k 1,n

d

d

( ) ( 1)max U U 1

Page 13: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

The parameters of the algorithms during the testing

13

KSOFM Fuzzy C-Mean KSOFM - GK

Initially Learning Rate: ninitially = 10-2 m = 1.2

Initially Learning Rate: ninitially = 10-2

Final Learning Rate: nfinal = 10-4 Epochs = 2000

Final Learning Rate: nfinal = 10-4

Step of the Learning Rate: nstep = 10-5

Termination Tolerance: ε = 5∙10-5

Step of the Learning Rate: nstep = 10-5

KSOFM Termination Tolerance: ε = 5∙10-5

m = 1.2

GK termination Tolerance: ε = 5∙10-4

Iterations: λ = 100

Page 14: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

14

Original Image22410 colors

KSOFM4 colors

FCM4 colors

Page 15: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

KSOFM – GK4 colors

Median Cut4 colors

15

Page 16: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

16

Original Image99760 colors

KSOFM7 colors

FCM7 colors

Page 17: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

KSOFM – GK7 colors

Median Cut7 colors

17

Page 18: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

18

Original Image33784 colors

KSOFM5 colors

FCM5 colors

Page 19: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

KSOFM – GK5 colors

19

Median Cut5 colors

Page 20: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

20

Original Image31655 colors

KSOFM4 colors

FCM4 colors

Page 21: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

21

KSOFM – GK4 colors

Median Cut4 colors

Page 22: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

22

Original Image69656 colors

KSOFM8 colors

FCM8 colors

Page 23: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

23

KSOFM – GK8 colors

Median Cut8 colors

Page 24: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

Advatages

• The experimental results have shown that the proposed technique has the ability to retain the dominant colors even if the final image consists of a very small number of unique colors.

• It can merge areas of the image having similar colors. In this point of view, it can be considered as a powerful color image segmentation procedure

24

Page 25: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

Disadvatage

High Computation Cost which comes from the determination of the Mahalanobis distance.

For an AMD Athlon 64 3000+ (2GHz) based PC with 1GByte RAM, the processing time for a 512x384 image with 119143 colors for all the algorithms are:

25

KSOFM Fuzzy C-Mean KSOFM - GK

2.43 seconds 8.32 seconds 43.27 seconds

The number of colors of which the image is reduced is six (6).

Page 26: Color reduction using the combination of the kohonen self organized feature map and the gustafson-kessel fuzzy algorithm

DEMOCRITUS UNIVERSITY OF THRACE - GREECE

26

Conclusions

• A new Color Clustering technique is proposed which is based on a combination of a KSOFM neural network and the Gustafson-Kessel fuzzy algorithm.

• The main advantages is that it can merge areas of the image with similar colors and has the ability to retain the image’s dominant colors.

• Future directions should include the ability to detect the optimal number of final colors and reduce the high computational cost.