Proc. Int. Conf. on Recent Trends in Information Processing & Computing, IPC A New Approach for Shape Dissimilarity Retrieval Based on Curve Evolution and Ant Colony Optimization Younes Saadi 1, Rathiah Binti Hashim 1 and Rosmila Abdul-Kahar 2 1 Faculty of Computer Science and Information Technology, University Tun Hussein Onn Malaysia, Batu Pahat, Johor, 86400, Malaysia. 2 Faculty of Science Technology and Human Development, University Tun Hussein Onn Malaysia, Batu Pahat, Johor, 86400, Malaysia. younessaadi@gmail.com, radhiah@uthm.edu.my, rosmila@uthm.edu.my Abstract. In this paper we present a novel shape dissimilarity retrieval approach that can be used to match and recognize 2D shapes. A polygonal evolution method proposed previously is selected to simplify the extracted contour. In order to find best correspondence between shapes, the match process is formulated as a Quadratic Assignment Problem (QAP) and resolved by using Ant Colony Optimization (ACO). An approximated dissimilarity is computed by using shape context descriptor and Euclidean metric. The experimental results justify that the proposed approach gives an intuitive shape dissimilarity invariant to noise and distortions. Keywords: Shape dissimilarity, shape retrieval, contour evolution, shape matching. 1 Introduction Shape matching/retrieval is a hot topic in computer vision. Image retrieval consists of selecting from a collection of images those images fulfilling a specific criterion [1]. In this paper, we concentrate on contour-based shape retrieval, in which we only explore the information located on the shape contour. There are many kinds of shape matching methods. Most of the research in this field has till now concentrated on matching methods and how to achieve a meaningful correspondence [2]. On the other hand some researches focus on improving polygonal approximation methods of a contour in such a way that the resulted contour can be used to extract meaningful information [3]. This paper introduces a new shape retrieval approach based on polygonal approximation and matching based on Ant Colony Optimization. 2 Algorithm Structure The structure of the proposed algorithm is based on a previous contour matching algorithm [4]. It operates into four stages as shown in (Fig. 1). In the first stage the con- Elsevier, 2012 104
tour is traced by using a basic Matlab function. In the second stage the extracted contours are approximated by using Discrete Curve Evolution (DCE) which is proposed previously by Latecki and Lakamper [5]. After analyzed the shortcomings of the existing methods, an Ant Colony Optimization proposed previously [2], has been selected to compute the correspondence in the third stage. Finally in the fourth stage, the Euclidean distance has been selected to compute the dissimilarity between shapes according to the resulted matrix of correspondence. Fig. 1. Shape retrieval workflow. Several common Polygonal modelling of contour methods were studied, after the comparison, Discrete Curve Evolution (DCE) was adopted [4]. Then contour matching methods were carried out, after analyzed the shortcomings of the existing methods an ant colony optimization method proposed previously was selected to compute the shape matching. The Euclidean distance has been selected as a metric to compute the dissimilarity between shapes according to the resulted matrix of correspondence. 3 Polygonal Evolution After analyzed the shortcoming of polygonal evolution methods, Curve evolution [4] has been selected to be used in our approach (Fig. 2, Fig. 3, Fig. 4). The main reason is that this method allows the user to control the degree of evolution according to the human judgment. In every iteration, a pair of consecutive line segments s1, s2 is replaced with a single line related to the endpoints of s U s ). The substitution is calculated according to the relevance value K given by the following equation: K(s, s ) = (, ) ( ) ( ) ( ) ( ). (1) β(s, s ) is the turn angle at the common vertex between s1 and s2. l is the length function normalized with respect to the total length of a polygonal curve C. 105
Fig. 2. A series of polygonal evolution. Fig.3. Two simplified contours Fig.4. ACO matching 4 ACO Shape Matching A new matching algorithm based on Ant colony optimization is described previously [2]. It consists of taking in consideration the proximity measured between feature points on the same shape. The matching is formulated as a two sets of points I and J where the ants cross this two sets doing a complete tour. All the movements produce a collection of possible paths between the two sets. During building of these paths Ants release the pheromone with different amounts for each possible path. A bigger amount of pheromone on a path means that it is more eligible in term of cost of correspondence. The traversing from a vertex i I to a vertex j J is given by the equation below [2]. Edge Probability p = ( ) [ ( ) ]. (2) The pheromone accumulated on the edge (i, j) is quantified by τ, η indicates the desirability (or probability) of traversing (i, j) based on heuristic information, N = {l J (i, l) E} is the immediate neighborhood of vertex i. The parameter 0 1 regulates the influence of pheromones over heuristic information. After a complete tour of the ants, An ACO iteration, the cost of solutions is computed as defined in sec. Pheromones are updated at the end of ACO iteration. First, pheromones are evaporated at n constant pheromone rate [2] ρ, 0 ρ 1 106
Pheromone Evaporation: τ (1-ρ)τ. (3) Where ρ is the pheromone evaporation rate and the new pheromone deposition on the edges that were traversed by the ants is regulated by pheromone deposition: τ τ + Δτ. (4) Where Δτ is the amount of pheromone that an ant has deposited on the edge (i, j). Cost Function: The formulation of the problem is done by a QAP. When augmenting the shape descriptor R with proximity information. The general objective function is in the form: QAP(π, R, I, J) = 1-ν S(π, R, I, J) + νχ(π, I, J). (5) Where 0 ν 1 is used to control parameter between S and the proximity χ and the arguments I, J represents the two points sets, π a mapping such that to a pint of I correspondends a point in J and R the set of shape descriptors. The form S and χ is detailed in [2]. 5 Shape Dissimilarity Algorithm The proposed approach consists of on an ACO matching approach based on curve evolution by using shape context descriptor and Euclidean distance as a metric. A list of query shapes is compared to a given list of stored shapes. Then the dissimilarity values are sorted from min to max as shown in the following algorithm. Input data: Query shape and stored shapes: An ordered set of shape contours. Output data: Matrix of dissimilarity between the query shapes and all the stored shapes. 1. for i = 1 to M do {M number of query shapes} 2. Read a query shape S 3. Contour tracing of shape S 4. Apply Curve evolution technique 5. end for 6. for j = 1 to N do {N number of stored shapes} 7. Read a stored shape S 8. Contour tracing of shape S 9. Apply Curve evolution technique 10. End for 107
11. for i = 1 to M do 12. for j = 1 to N do 13. Compute the best correspondence bc between S and S contours 14. Compute the degree of dissimilarity 14. end for 15. for each class sort the dissimilarity degree of each pairwise (querystored)ascending where the first retrieved is the one with a min value. 6 Experimental Results The proposed approach is tested on the benchmark MPEG-7 B dataset [5]. The database is used to test the shape retrieval and contour matching issues. It is consists of 1400 images, 70 classes, each class contains 20 items plus 20 query shapes selected from each class (Fig. 5). The proposed approach computes shape dissimilarity after the preprocessing of the contour shape. It consists of a Discrete Curve Evolution (DCE) [1] which makes the proposed approach more robust to nonuniform distortions. After the evolution ACO is convoked to establish best possible correspondence between the approximated contours. For this reason we are using one set of parameters consist of 1 ants and 1000 as the number of iterations. The experiments are executed on a Matlab environment (Windows 32 OS) running on intel Pentium 2.2 GHz. We have compared the proposed approach with other shape retrieval approaches. Table 1. shows retrieval rates for each method. Although the descriptor used in our approach is not invariant to rotation, the global average shows that our method is at least comparable to other approaches. The advantage of incorporating curve evolution and proximity using ACO has been demonstrated. Table 1. Retrieval rates of different MPEG-7 CE-Shape-1 Part B data set [6] Algorithm Score (%) Our method Shape tree HPM-Fn Curvature scale space Multi scale presentation Generative model Chance probability function Polygonal Multiresolution Inner distance Shape contexts 87.88 87.70 86.35 81.12 84.93 80.03 82.69 84.33 85.40 76.51 108
7 Conclusion This paper gives an efficient approach for shape retrieval. An ACO approach has been adopted to compute the matching. It is pre-processed by a polygonal approximation DCE which makes the similarity more intuitive and invariant to noise and distortions. The obtained results demonstrate clearly the performance of our method compared with other methods although the used shape descriptor is not invariant to rotation. Our future work includes using a shape descriptor invariant to rotation. Moreover we are seeking to reduce the computational time of the ACO matching by using a fast local search heuristic for QAP [7]. Fig. 5. MPEG-7 dataset [5] References 1. Nasreddine, K., Benzinou, A., Fablet, R.: Variational Shape Matching for Shape Classification and Retrieval. Pattern recognition Letters, 31 (2, 1) (2010) 2. Kaick, O.V., Hammarneh, G., Zhang, H., Wighton, P.: Contour CorrespondenceVia Ant Colony Optimization. Proc, 15 Pacific Graphic 2007, United States, pp. 271 280 (2007) 3. Parvez, M.T., Sabri, A.M., Sabri, A.: Polygonal approximation of digital planar curves through adaptive optimizations. Pattern Recognition Letters, 31 (2010) 4. Saadi, Y., Binti Hashim, R., Abdul-Kahar, R.: Ant Colony matching: A curve Evolution Approach. 2nd International Conference on Communications and Information Sciences, South Korea (2012) 5. Latecki, L.J., Lakämper, R.: Shape Similarity Measure Based on correspondence of visual parts. IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 22, NO.10 October (2000) 6. Xu, C., Liu, J., Tang, X.: 2D Shape Matching by Contour Flexibility. IEEE Transaction on Pattern Analysis and Machine Inteligence, Vol. 31, NO. 1, January (2009) 7. Tsutsui, S., Fujimoto, N.: Fast QAP Solving by ACO with 2-opt Local Search an a GPU Proceedings of the 2011 IEEE Congress on Evolutionary Computation (CEC). New Orleans (2011) 109