8
Image segmentation using quantum genetic algorithms Karima Benatchba Mouloud Koudil Yacine Boukir Nadjib Benkhelat Institut National de formation en Informatique Institut National de formation en Informatique Institut National de formation en Informatique Institut National de formation en Informatique BP 68M BP 68M BP 68M BP 68M 16270, Oued Smar 16270, Oued Smar 16270, Oued Smar 16270, Oued Smar Algeria Algeria Algeria Algeria K_benatchba@ini.dz [email protected] Abstract –On one hand, image segmentation is a low-level processing task which consists in partitioning an image into homogeneous regions. It can be seen as being a combinatorial optimization problem. In fact, considering the huge amount of information that an image carries, it is impossible to find the best segmentation. On the other hand, quantum genetic algorithms are characterized by their high diversity, and by a good balance between global and local search. In this paper, we present a quantum genetic algorithm for image segmentation. keywordsImage segmentation, Optimization problem, quantum genetic algorithms. I. INTRODUCTION Image segmentation is a low-level processing task which consists in partitioning an image into homogeneous regions. Each region has characteristics different from its neighbourhood regions. This task is the basis of all image interpretation. As a result, it is one of the main research topics in computer vision. The goal of segmentation is to partition an image into homogeneous regions according to a specific criterion. The criterion can be the light intensity, texture, colour, movement, or distance. The interest to have such a partition lies in the fact that segmentation can be used for object recognition or for classification. Segmentation can be seen as being a combinatorial optimization problem. In fact, considering the huge amount of information that an image carries, it is impossible to find the best segmentation [1]. As a result, researchers started using optimisation methods to solve the segmentation problem. In this paper, we are interested in the quantum genetic algorithms. In addition to their inherent parallel quality and their high diversity, they are characterized by [2]: a balance between global and local search; use of the past history of an individual due the probabilistic representation; Few non performing individuals, this is due to the linear superposition of states; and by a fast execution time. This paper is organized as follows: section II gives a brief definition of the image segmentation. Section III introduces the proposed algorithm for image segmentation. Tests and results are given in section IV. Finally, a conclusion is given in section V. II. IMAGE SEGMENTATION Segmentation is a low level processing task working on pixels. It consists in partitioning an image in homogeneous regions according to a certain criterion (level of gray, textures, color...). The union of these regions must give the initial image. Segmentation isolates objects, from an image, and extracts their characteristics to be analyzed and interpreted. The interpretation quality depends on the segmentation. This problem can be formalized as follows [3]: Given a predicate P that can be applied to the regions attributes, segmentation is the partitioning of an image R into regions R i such as: R i i R i R j = R= i i R R i is connexe i P (R i )=true i. ( ) false R R P j i = If i j and R i and R j are adjacent. During the past years, researches have been interested in image segmentation. This interest gave raise to different methods and concepts. These methods have been classified according to the application domain (tele-detection, medical imagery) [4], or on the mathematical model used. Several approaches are available in the literature. They can be divided into four classes based on: threshold, clustering of regions, detection of contours among areas and detection of regions [3, 5]. III. SEGMENTATION USING QUANTUM GENETIC ALGORITHM We will now present the quantum genetic algorithm that we adapted for the image segmentation. Before outlining the algorithm, we will give the coding and the structures used. A.Coding and structures: A Quantum chromosome (Qu-chromosome) is used to represent a pixel. As a result, an image I of size M*N pixels is represented by a quantum population which size is M*N qu-chromosomes. A qu-chromosome is represented by a quantum register of 8 qubits. This enables us to represent the 256 levels of gray of an image ([0,255]). Theoretically, one 3556 1-4244-0136-4/06/$20.00 '2006 IEEE

[IEEE IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics - Paris, France (2006.11.6-2006.11.10)] IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics

  • Upload
    nadjib

  • View
    214

  • Download
    1

Embed Size (px)

Citation preview

Page 1: [IEEE IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics - Paris, France (2006.11.6-2006.11.10)] IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics

Image segmentation using quantum genetic algorithms

Karima Benatchba Mouloud Koudil Yacine Boukir Nadjib Benkhelat Institut National de

formation en Informatique Institut National de

formation en Informatique Institut National de

formation en Informatique Institut National de

formation en Informatique BP 68M BP 68M BP 68M BP 68M

16270, Oued Smar 16270, Oued Smar 16270, Oued Smar 16270, Oued Smar Algeria Algeria Algeria Algeria

[email protected] [email protected]

Abstract –On one hand, image segmentation is a low-level processing task which consists in partitioning an image into homogeneous regions. It can be seen as being a combinatorial optimization problem. In fact, considering the huge amount of information that an image carries, it is impossible to find the best segmentation. On the other hand, quantum genetic algorithms are characterized by their high diversity, and by a good balance between global and local search. In this paper, we present a quantum genetic algorithm for image segmentation. keywords– Image segmentation, Optimization problem, quantum genetic algorithms.

I. INTRODUCTION Image segmentation is a low-level processing task which consists in partitioning an image into homogeneous regions. Each region has characteristics different from its neighbourhood regions. This task is the basis of all image interpretation. As a result, it is one of the main research topics in computer vision. The goal of segmentation is to partition an image into homogeneous regions according to a specific criterion. The criterion can be the light intensity, texture, colour, movement, or distance. The interest to have such a partition lies in the fact that segmentation can be used for object recognition or for classification. Segmentation can be seen as being a combinatorial optimization problem. In fact, considering the huge amount of information that an image carries, it is impossible to find the best segmentation [1]. As a result, researchers started using optimisation methods to solve the segmentation problem. In this paper, we are interested in the quantum genetic algorithms. In addition to their inherent parallel quality and their high diversity, they are characterized by [2]: a balance between global and local search; use of the past history of an individual due the probabilistic representation; Few non performing individuals, this is due to the linear superposition of states; and by a fast execution time. This paper is organized as follows: section II gives a brief definition of the image segmentation. Section III introduces the proposed algorithm for image segmentation. Tests and results are given in section IV. Finally, a conclusion is given in section V.

II. IMAGE SEGMENTATION Segmentation is a low level processing task working on pixels. It consists in partitioning an image in homogeneous regions according to a certain criterion (level of gray, textures, color...). The union of these regions must give the initial image. Segmentation isolates objects, from an image, and extracts their characteristics to be analyzed and interpreted. The interpretation quality depends on the segmentation. This problem can be formalized as follows [3]: Given a predicate P that can be applied to the regions attributes, segmentation is the partitioning of an image R into regions Ri such as: Ri ≠ ∅ ∀i Ri ∩ Rj = ∅

R=∪i

iR

Ri is connexe ∀i P (Ri)=true ∀i.

( ) falseRRP ji =∪ If i ≠ j and Ri and Rj are adjacent. During the past years, researches have been interested in image segmentation. This interest gave raise to different methods and concepts. These methods have been classified according to the application domain (tele-detection, medical imagery) [4], or on the mathematical model used. Several approaches are available in the literature. They can be divided into four classes based on: threshold, clustering of regions, detection of contours among areas and detection of regions [3, 5].

III. SEGMENTATION USING QUANTUM GENETIC ALGORITHM

We will now present the quantum genetic algorithm that we adapted for the image segmentation. Before outlining the algorithm, we will give the coding and the structures used. A.Coding and structures: A Quantum chromosome (Qu-chromosome) is used to represent a pixel. As a result, an image I of size M*N pixels is represented by a quantum population which size is M*N qu-chromosomes. A qu-chromosome is represented by a quantum register of 8 qubits. This enables us to represent the 256 levels of gray of an image ([0,255]). Theoretically, one

35561-4244-0136-4/06/$20.00 '2006 IEEE

Page 2: [IEEE IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics - Paris, France (2006.11.6-2006.11.10)] IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics

can have an image segmented in 256 different classes. The Qubit has two fields for the probability amplitudes and ,

with , ∈ [0,1] and | |2

+ | |2 =1. Where | | ² is the

probability that the

qubit•

qubit•

q

ubit•

u

bit•

b

it•

i

t•

t

will take state 0 and | | ² is the probability that it will take state 1. The collapse (measurement) of a qu-chromosome will give, as a result, a classical chromosome. The latter is represented as a string of 8 bits. A classical chromosome represents the value of the level of gray of the class to which the pixel belongs. B.Outline of the algorithm The outline of the algorithm used is given in figure 1, where Q(t) is he quantum population at generation t and P (t) is the classical population at the same generation. In what follows, we will present the different steps of the QGA of figure 1. a. Initialization: The first process is the initialization. Three methods were implemented. First, there is the equiprobable initialisation

where the constant 2/1 is the value which is assigned to all the probability amplitudes. This means that each qu-chromosome is superposed. In other words, during this superposition, the qu-chromosome represents all the possible levels of gray (256 levels), with the same probability 1/256. During the collapse phase, the resulting classical chromosome will be assigned a random value between 0 and 255. Then, there is the random initialization where the values of the probability amplitudes are drawn randomly from the interval [0,1]. Finally, there is the guided initialization where the detection of peaks or the dichotomy division is applied [6]. From this, a set of N levels of gray will result. The latter will be classified so that for each level is affected a number indicating its row R = {0, …, N}. Instead of levels of gray, the qu-chromosomes will be affected the values of all the rows. As a result, the classical chromosome will have as value a rank and not a level of gray. To represent the values of the rows, we used a new code. Indeed, the row is represented by a binary string of size n,

where 2n

= N. As a result, the size of the qu-chromosome is not equal to 8, as for the other codes, but the size of the qu-chromosome is N qu-bits. Second, to each qu-chromosome is affected the row of the level of gray the nearest to the corresponding pixel. For this, to each position K of the binary string (row) of size n a test is carried out. Indeed, if this position contains 0, then, to the probability amplitude will be affected a value AM such

as (AM ) 2 Є [0.5, 0.7]. Otherwise, if the position contains

1, to the probability amplitude will be affected a value AM

such as (AM )2

Є [0.5, 0.7]. Premature convergence can be avoided using the value 0.7. The process of this method as well as the new code used, reduce, considerably, the execution time. Indeed, on one hand, instead of handling 8 qu-bits qu-chromosomes, we handle only n < 8 (generally n < 5). On the other hand, guided initialization gives us an image close to the original

Segmentation by QGA Begin Read the image I Initialize the quantum population Q (0) For t=1..nb_generation do Observe the population Q (t-1) to extract the P(t) population Evaluate la population P (t) Apply the quantum genetic operators on Q (t-1) Update the population Q (t-1) by applying the quantum rotation End for End

Fig. 1. Outline of the QGA for image segmentation. b. Observation (measure) It consists in going through all the quantum population Q = {q1 .., qn*m } and to build the classical population P = {p1 .., pn*m}. This is done by the observation of each qu-bit of each qu-chromosome. This observation is followed by the collapse of the qu-chromosome in a classical one. Indeed,

during the observation, if 2

is higher than 0.5 the corresponding gene of the classical chromosome will take state 0. In the other case, it will take state 1. Value 0.5 is selected to guarantee the equiprobable aspect of this collapse. c. Evaluation After the phase of observation, a classical population will be generated. The latter will be evaluated by applying as fitness function the Manhattan distance (1) [7]. It is used on the chromosomes of the classical population.

( ) i

p

iis yxkf −−= ∑

=1 (1)

Where K is a classical chromosome representing the pixel S; P is the size of the neighbourhood matrix of a pixel (P=k*k);

X=(x1,…, xp) is the characteristics vector obtained from values (xi) of the classical chromosomes of the classical

chromosome k neighbourhood; Y= (y1,…, yp) are the real levels of gray of the pixel S and of its neighbourhood taken from the initial image. d. Quantum operators The strategies used for the quantum genetic operators are similar to the classical ones. They are, however, used on the qu-chromosomes. The changes due to the application of these operators on a quantum population can be summarized in what follows. • Quantum selection : For each classical chromosome S, one selects, in its neighbourhood, the chromosome P with the best fitness. The chromosome (respectively qu-chromosome) P will replace the chromosome (respectively qu-chromosome) S. • Uniform quantum crossover This operator is applied only to the qu-chromosomes whose level of gray, indicating the zone to which the corresponding

3557

Page 3: [IEEE IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics - Paris, France (2006.11.6-2006.11.10)] IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics

pixel belongs, reveals homogeneity with their neighbourhood. Indeed, if the difference between the value of its level of gray and those of its neighbourhood is lower than a preset threshold, the operator is applied, according to a crossover rate QCR- CHR on the current qu-chromosome according to the following process: For each qu-chromosome S, one selects, randomly, in its neighbourhood, a qu-chromosome P. The probability amplitudes of each qu-bit S will be replaced by the corresponding ones of P according to a crossover rate CR-QBIT. • Quantum mutation The probability amplitudes of each qu-bit of each qu-chromosome are flipped according to a low mutation rate Pm. As QGA has a high diverse population due to the superposition, crossover and mutation can be omitted. • Quantum rotation It is one of the most significant operators. Indeed, it ensures the evolution of the algorithm through the different generations. Quantum rotation generates the new quantum generation while ensuring that each pixel is affected the most adequate class. Where for each qu-chromosome S, one reiterates the process made up of these three stages: first, one selects the chromosome ref having the best fitness of the neighbourhood of S. Then, the quantum rotation table is looked upon (Figure 2) [8] to obtain the rotation angle . To use the table, we need the amplitudes probability and of the current gene and of the corresponding bit of the chromosome Ref. We multiply each qu-bit by the following matrix.

θθθ−θ

=θcossinsincos

)(U

Reference bit Angle >0 >0 1 + >0 >0 0 - >0 <0 1 - >0 <0 0 + <0 >0 1 - <0 >0 0 + <0 <0 1 + <0 <0 0 -

Fig. 2. Quantum rotation table [8] This matrix represents the rotation quantum door (rotation gate). The result of this multiplication is a vector of two new probability amplitudes ', '. This two new probability amplitudes will replace the two old ones.

IV. TESTS AND RESULTS We are going, in what follows, to present a summary of the tests performed. Our goal by this set of tests is to measure the impact of the crossover rate of the qu-chromosome, the crossover rate of the qu-bit, and the initialization method on the behaviour of the algorithm. The tests we present in this section were executed on the image VTU06 and VTU55 of a benchmark used by Laboratoire Vision et Robotique, de l’université d’Orléans (figure 5) [9]. The image is uniform containing 5 uniform areas with a Gaussian noise of standard deviation 20. As a result, the levels of grey of the different areas are close. Moreover, the segmentation of these images is known in advance. This enables us to evaluate the quality of our segmentation. Segmentation is evaluated through four criteria of evaluation (H, S, C-, C+) [7] where H shows how homogeneous the areas are. If H>0.6 the homogeneity is said to be satisfactory. Specificity S indicates to which point the areas do not mix. If S>0.8 specificity is said to be good.

C -

indicates the level of over-segmentation present in the

segmented image. If C -

is close to zero the segmentation does not reveal an over-segmentation. 0.16 is an average

value for this criterion. C + indicates the level of under-

segmentation present in the segmented image. If C + is close

to zero the segmentation does not reveal under-segmentation. 0.18 are an average value for this criterion. As QGA are characterized by their diversification, mutation will have no effect. As a result, we will no be using it. In all the tests carried, the size of the neighbourhood is 4 and the

quantum rotation angle is set to 20πδθ = .

Once the parameters are set, we will test the QGA on real scenes images. This is to show the segmentation quality provided by our method. A. Crossover rate of the qu-chromosome: The crossover rate for the chromosomes (QCR-CHR) indicates the percentage of the qu-chromosomes on which crossover will be applied. To tune up this parameter, we fixed the crossover rate of the qubits to CR_QBit=0,22. Table 1 gives a summary of the obtained results.

3558

Page 4: [IEEE IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics - Paris, France (2006.11.6-2006.11.10)] IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics

TABLE I RESULTS OF THE SEGMENTATIONS ACCORDING TO THE

VARIATIONS OF QCR_CHR.

QCR-CHR

H

S

C-

C+

0.05 0.40 0.98 0.06 0.56 0.10 0.59 0.98 0.06 0.28 0.15 0.54 0.98 0.05 0.61 0.20 0.58 0.98 0.06 0.62 0.25 0.50 0.98 0.06 0.51 0.30 0.51 0.98 0.06 0.59 0.35 0.61 0.98 0.06 0.40 0.40 0.48 0.98 0.06 0.81 0.45 0.48 0.98 0.06 0.80 0.50 0.89 0.98 0.06 0.18 0.55 0.78 0.98 0.06 0.29 0.60 0.64 0.98 0.06 0.49 0.65 0.51 0.98 0.06 0.58 0.70 0.46 0.98 0.06 0.84

According to table I, the best value for the parameter rate of the crossover qu-chromosome is 0.5. B. Quantum crossover rate of the qubit : The crossover rate of a qubit indicates the number of qubits to be crossed for a given qu-chromosome.To tune up the value of this parameter, we fixed the QCR_Chr to 0.5. The obtained results are given in table II.

TABLE II RESULTS OF THE SEGMENTATION ACCORDING TO THE

VARIATIONS OF QCR_QBIT

QCR_QBIT H S C- C+

0.18 0.53 0.98 0.06 0.59

0.2 0.44 0.98 0.06 0.76

0.22 0.69 0.98 0.05 0.40

0.24 0.34 0.98 0.06 0.79

0.26 0.47 0.98 0.06 0.63

0.28 0.52 0.98 0.06 0.56

0.3 0.63 0.98 0.06 0.50

According to the results of table II, the best value for QCR_Qbit is 0.22.

Figure 4 is the result of the segmentation of the image VTU06 (Figure 3) while fixing the values TCQ_Chr = 0.5 and TCQ_Qbit = 0.22.

Fig. 3. Image VTU06

Fig.4. Result of the segmentation of VTU06 by AGQ (QCR_Chr =

0.5, QCR_Qbit=0.22.)

C. Convergence test of the QGA: For this test, we executed the QGA with the parameters QCR_CHR=0.5 and QCR_QBIT=0.22. The values of the evaluation criteria are summarized in table III.

3559

Page 5: [IEEE IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics - Paris, France (2006.11.6-2006.11.10)] IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics

TABLE III TEST OF CONVERGENCE OF THE AGQ.

Iteration

H

S

C-

C+

1 0.32 0.95 0.16 1

3 0.49 0.98 0.10 0.59

5 0.53 0.98 0.07 0.49

8 0.75 0.98 0.07 0.34

10 0.81 0.98 0.06 0.32

13 0.83 0.98 0.06 0.31 15 0.94 0.98 0.06 0.14

20 0.92 0.98 0.07 0.16

We notice, through the results of table III, that the quality of the segmentation improves during the execution. In fact, the evaluation criteria improve until they reach a certain stability: H=94, S=98, C-=0.06, C+=0.14, at the 15th iteration. At the end of the execution, the obtained results are H=92, S=98, C-=0.07, C+=0.16. They show the good segmentation quality given by our method (AGQ). D. Initialisation methods: The table IV summarises the results of the segmentation of the image VTU55 by AGQ with three different initialisation methods: random, dichotomy division, detection of peaks.

TABLE IV RÉSULTS OF THE SEGMENTATION ACCORDING TO THE

INITIALISATION METHOD.

MTH H S C- C+ Gen.*Execution

time

Random 0.87 0.99 0.08 0.22 25 91.53

DD 0.97 0.98 0.07 0.07 2 7.31

DP 0.97 0.98 0.08 0.07 2 7.47

* Generation The results of table IV, show clearly the effectiveness of the guided methods (DD and DP). In fact, for the random initialisation, 25 generations are needed to reach stability in its segmentation, while DD and DP need no more that 5 generations. Moreover, the choice of the initialisation method influences the quality of the segmentation (figures 5, 6, 7 and 8).

Fig.5. Image VTU55.

Fig.6. Segmentation using random initialisation.

Fig.7. Segmentation using DP initialisation.

3560

Page 6: [IEEE IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics - Paris, France (2006.11.6-2006.11.10)] IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics

Fig.8. Segmentation using DD initialisation.

The visual quality of the segmentation shows that our method can be applied to the real scenes images (figures 9 to 12 and figures 13 to 16). The initialisation methods improve not only the execution time but also the segmentation quality. According to the different tests executed, we can conclude that the guided initialisation using detection of picks gives the best results in terms of execution time and quality. Stability is reached around the 5th iteration.

Fig. 9. Image House

Fig. 10. Segmentation using random initialisation.

Fig. 11. Segmentation using DP initialisation.

Fig. 12.

3561

Page 7: [IEEE IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics - Paris, France (2006.11.6-2006.11.10)] IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics

Fig. 13. Image Apple.

Fig. 14. Segmentation using random initialisation.

Fig. 15. Segmentation using DP initialisation.

Fig. 16. Segmentation using DD initialisation.

VII. CONCLUSION To isolate the various entities in an image is one of the most important problems in image processing. This task, found in all artificial vision systems, is the segmentation. It is the basis of good quality interpretation. As a result, it is one of the main research topics in this domain. In this paper, we presented an algorithm for image segmentation based on quantum genetic algorithms. The tests presented enabled us to tune-up the values of certain parameters and evaluate their influence on the segmentation. The latter was evaluated through four criteria of evaluation: homogeneity (H), specificity (S), over-segmentation (C+) and under-segmentation (C-). Moreover, we showed that using a guided initialisation method (dichotomy division and detection of peaks) improves the execution time and the quality of the segmentation.

VIII. REFERENCES

[1] V. Ramos, F. Muge, “Map Segmentation by Colour Cube Genetic K-Mean Clustering”, the Proceeding of 4 European Conference on Research and Advanced Technology for Digital Libraries, pp. 318-323, 2000.

[2] Kuk-Hyun Han ET Jong-Hwan Kim "Analysis of Quantum-Inspired Evolutionary Algorithm" 2001.

[3] Lassouaoui Nadia, « Segmentation d’images par différentes approches et optimisation avec Algorithmes Génétiques. », Thèse Doctorat à l’Ecole Nationale Polytechniques. Alger, 2004.

[4] J. Schmidhuber. “Classifier systems and the bucket brigade”.URL: http://www.idsia.ch/~juergen/bucketbrigade/bucketbrigade.html.

[5] Bounsaythip C., Alander J.T., "Genetic Algorithms in Image Processing – A Review", Proc. Of the 3rd Nordic Workshop on Genetic Algorithms and their Applications, Metsatalo, Univ. of Helsinki,

3562

Page 8: [IEEE IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics - Paris, France (2006.11.6-2006.11.10)] IECON 2006 - 32nd Annual Conference on IEEE Industrial Electronics

Helsinki, Finland, pp. 173-192, 1997. [6] Hanchuan Peng , Fuhui Long , Zheru Chi , and

Wanchi Siu, "A Hierarchical Distributed Genetic Algorithm for Image Segmentation", Proceedings of the 2000 Congress on Evolutionary Computation CEC00, 2000.

[7] Andrey P., "Segmentation d'images par algorithmes génétiques", Thèse de doctorat, Sciences appliquées, Paris 7, 1997.

[8] Talbi, H., Batouche, M., Draa, A. "A Quantum-Inspired Genetic Algorithm for Multi-source Affine Image Registration", ICIAR (1) 2004, pp. 147-154

[9] Chabrier, H. S. Laurent, C. Rosenberger, B. Emile, P. Marché "Etude comparative de critères d'évaluation de la segmentation", Actes du 19ème Colloque GRETSI, Paris, (3), pp. 150-153, Paris, 2003.

3563