A Novel Petri Net Model For Image Segmentation - IEEE Xplore

2 downloads 111 Views 286KB Size Report
Linda Mahmoudi. Mathematics & Computer. Science Dept. Faculty of Science. Beirut Arab University. Beirut, Lebanon [email protected]. Alaa Al Azawi.
2012 2nd International Conference on Advances in Computational Tools for Engineering Applications (ACTEA)

A Novel Petri Net Model For Image Segmentation Entropic Thresholding based Methods Linda Mahmoudi

Alaa Al Azawi

Ali El Zaart

Ali Haidar

Mathematics & Computer Science Dept. Faculty of Science Beirut Arab University Beirut, Lebanon [email protected]

Mathematics & Computer Science Dept. Faculty of Science Beirut Arab University Beirut, Lebanon [email protected]

Mathematics & Computer Science Dept. Faculty of Science Beirut Arab University Beirut, Lebanon [email protected]

Computer Engineering & Informatics Dept. Faculty of Engineering Beirut Arab University Beirut, Lebanon [email protected]

Abstract—This paper presents a Petri net-based hierarchical architecture for image segmentation concept; the work shows our analytical methodologies for modeling and analysis of image segmentation entropic thresholding based methods. The goal of this paper is to model the image segmentation concept using Petri net. Keywords—Petri net, modeling, image segmentation, entropic thresholding

I.

INTRODUCTION

Classically, image segmentation is defined as the partitioning of an image into non-overlapped consistent regions which are homogeneous with respect to some characteristics such as gray value or texture. In other words, Image segmentation is the process to discriminate object from its background in pixel level and has become the most significant component of image analysis. Thresholding is well-known and most effective technique for image segmentation according to their simplicity and its speed during processing [2]. It is a technique for converting a gray scale or color image to a binary image based upon a threshold value. Segmentation based on gray level histogram thresholding is a method to divide an image containing two regions if interest; object and background. In fact, applying this threshold to the whole image, pixels whose gray level is under this value are assigned to a region and the remainder to the other. Petri nets are a graphical and mathematical modeling tool used to describe and analyze different kinds of real systems. Petri nets were first introduced by Carl Adam Petri in 1962 in Germany, and evolved as a suitable tool for the study of systems that are concurrent, asynchronous, distributed, parallel, non-deterministic, and/or stochastic. As a graphical tool, Petri nets can be used as a visualcommunication aid similar to flow charts, block diagrams, and networks. In addition, tokens are used in these nets to simulate the dynamic and concurrent activities of systems. As a mathematical tool, it is possible to set up state

978-1-4673-2489-2/12/$31.00 ©2012 IEEE

70

equations, algebraic equations, and other mathematical models governing the behavior of systems. Petri nets can be used by both practitioners and theoreticians. Thus, they provide a powerful medium of communication between them: practitioners can learn from theoreticians how to make their models more methodical, and theoreticians can learn from practitioners how to make their models more realistic. [6] The selection of the graph structure as Petri net model for representing the image segmentation process is important for two reasons: 1) it is a generic and very flexible segmentation representation scheme and 2) it is very robust and computationally inexpensive. This paper is organized as follows: Section 2 provides a brief introduction to Petri net concepts, Section 3 presents an introduction to image segmentation thresholding methods, Section 4 shows simple models for image segmentation using Petri net, and Section 5 concludes the paper. II.

KNOWLEDGE FORMALISATION OF PETRI NET

Petri net definition: The formal definition of a Petri net is a Petri net is a five-tuple (P, T, A, W, M0). [3][5][7] Where: P represents a finite set of places, P = p1, p2, p3,….,pn T represents a finite set of transitions, T = t1, t2, t3,….,tn A ⊆ (P × T) ∪ (T × P) is a set of arcs,

→ {1, 2, 3…} is a weight function, M0: P → Z+ is the initial marking.

W: A

Places are represented with circles and transitions are represented with bars. The arcs are directed from places to transitions or from transitions to places. The places contain tokens that travel through the net depending on the firing of a transition; the Tokens are represented as small dots or integer numbers. A place p is said to be an input place to a transition t if an arc is directed from p to t. Similarly an

output place of t is any place in the net with an incoming arc from transition t. Transition firing: A transition can fire only if it is enabled. For a transition t to be enabled, all the input places of t must contain at least one token. When a transition is fired, a token is removed from each input place, and one token is added to each output place. In this way the tokens travel through the net depending on the transitions fired. Marking: The marking M i of a place P i ∈ P is a nonnegative quantity, it is representing the number of tokens in the place at a given state of the Petri net. The marking of the Petri net is defined as the function M: P → Z+ that maps the set of places to the set of non-negative integers. It is also defined as a vector

(

M j = m1 , m 2 ,....m j p i

)

(1)

Where

( )

M i = M pi

The Entropic thresholding "considers the image foreground and background as two different signal sources, so that when the sum of the two class entropies reaches its maximum, the image is said to be optimally thresholded" [1]. IV.

RESULT IN MODELING IMAGE SEGMENTATION USING PETRI NET In this section we are going to study and model a simple image segmentation system using Petri nets (thresholding method and entropic thresholding method) and trying to proof the ability of Petri nets to model and analyze such kind of systems. A. Petri net Model for General Concept of Image Segmentation Here we propose a simple model which maps image segmentation in general concept, this model is given in Fig.1.

(2)

Which, jth represents the state of the net. Mj contains the marking of all the places and the initial marking is denoted by M0. III.

KNOWLEDGE BASE FOR DOMAIN IMAGE SEGMENTATION

Figure 1. Petri net model for simple image segmentation.

Image segmentation is the initial step in the image analysis process and a very critical task. One can define image segmentation as a partitioning or clustering technique used for image analysis. In another word, it is a process of subdividing an image into its constituent regions or objects as part of the analysis process [4]. Thresholding is one of the most used methods for image segmentation, its basic objective is to classify the pixels of a given image into two classes: those partitioning to an object and those partitioning to the background. The goal of thresholding is to select a set of thresholds which can discriminate object and background pixels. Many methods have been reported in the literature. Of particular interest is an information theoretic approach that is based on the concept of entropy introduced by Shannon in information theory. H(X) =

∑ P(x)logP(x ) x∈X

(3)

The Entropy is "a measure of separation that separates the information into two regions, above and below an intensity threshold", it is used to measure the efficiency of the information transferred through a noisy communication channel. A number of entropy based thresholding methods are exist in the literature. These methods can be categorized into three groups: entropic thresholding, cross-entropic thresholding and fuzzy entropic thresholding.

71

Fig.1: A simple Petri net modeling the execution of segmentation of an image with one input and two outputs, place 1 represent the initial image and place 2 and 3 represents two other images one for object region and other for background region in the initial image after the process of segmentation represented by Transition T1.

B. General Petri net Model for Image Segmentation by Thresholding methods An image is an array, or a matrix, of square pixels (picture elements) arranged in columns and rows. Each component in the image or in this matrix called pixel associates with a pixel value or intensity. In a (8-bit) grayscale image, each picture element has an assigned intensity that ranges from 0 to 255. A grey scale image is what people normally call a black and white image. For this reason we considered here in our model the image as a group of pixels value, so this group of pixels represents the matrix intensity of the initial image.

The model in Fig. 2, describes the general thresholding concept of image segmentation. The thresholding concept consists to separate the pixels of an image into two groups, object region and background region by using an optimal threshold T. Concerning our model, each token exist in place P2 represents a pixels value of the image, the model will compare the token of pixel value in P2 with the token in place P1 that represents the optimal threshold T, if token of P2> token of P1, t1 fires and gives tokens to P4 and P5 (that means this token of P3 belongs to object region using this value of threshold T), else, if token of P2 < token of P1, t2 fires and gives tokens to P6 and P7 (that means the token of P2 belongs to a background region using this value of

threshold T). This process will be repeated as long as place P2 has tokens.

(k-bounded) so it cannot be consider as a safe net, and since there is a deadlocked condition therefore it cannot be consider as a live net. Let us now examine the generation of the reachability set of this Petri net model N1, the initial marking M0 = (1; k; 0; 0; 0; 0; 0). In M0 the only enabled transition is t1, firing of t1 removes the tokens both from p1 and p2 and adds 2 tokens into p3 producing the new marking M1 = (0; k-1; 1; 0; 0; 0; 0). In M1 transitions t2 and t3 are both enabled, but the firing of either disables the other; the two transitions are in conflict. Firing of t2 in M1 produces marking M2=(0; k-1; 0; 0; 0; 1; 1), while firing t3 in M1 produces M3= (0; k-1; 0; 1; 1; 0; 0). In M2 transitions t5 is enabled, firing of t5 removes the token from P7 only and puts a token in P1 producing M4 = (1; k-1; 0; 0; 0; 1; 0), the same in M3 transitions t4 is enabled, firing of t4 removes the token from P5 only and puts a token in P1 producing M5 = (1; k-1; 0; 1; 0; 0; 0). Note that the same firing process can be activated and produce another sequence of reachability marking when the place p2 had a token (so for k firing of transition t1).

Figure 2. Petri net model N1 for image thresholding concept.

Figure 3. Description of Petri net model N1

Concerning the properties of Petri net, we can conclude that the Petri net model N1 shown Figure 2 is a bounded net

72

C. Petri net Model for Image Segmentation by Entropic Thresholding concept In this model we describe the segmentation of an image by general entropic thresholding concept. The entropic thresholding concept consist to find the optimal threshold T from the group of thresholds value possible for each image, to separate the pixels of the image into two groups, object region and background region, and where founded the entropies of object region and background region are maximum so the threshold T can be considered as optimal threshold . adds 2 tokens into p3 producing the new, each token exist in place P1 represents a possible threshold T, for each token exist in place P3 that represents the pixels value of the image, the model will compare the token of pixel value with the token of threshold T, if token of P3 > token of P2, t3 fires and gives tokens to p5 and p6 (that means this token of P3 belongs to the object region using this value of threshold T), else, if token of P3 < token of P2, t4 fires and gives tokens to p7 and p8 (that means this token of P3 belongs to the background region using this value of threshold T). After this comparison between all tokens of place P3 and the token of place P2, the model separates the pixels into two buffers (buffer for pixels value of object region and other buffer for pixels value of background region), then it calculates the entropy of each buffer to do summation of these two entropies and compare the global entropy of the image with the max entropy exists before with initial value equal zero. If the entropy of image > max entropy, so replace max entropy by this entropy, if we obtain that the entropy calculated from the sum of the two entropies, can be considered as max entropy so we can considered that the threshold T that separate these two groups of pixels into this form to obtain this max entropy of the image, as a candidate threshold to be an optimal threshold, if in any step we obtain another threshold T, so the model remove the old threshold T and conserve the new T in a buffer. The model repeat this strategy for all token exist in the place P1 to obtain finally the optimal threshold T and the segmented image.

Figure 4. Petri net model N2 for image entropic thresholding concept.

73

Fig. 4 shows a Petri net Model N2, where k is a positive integer denoting the number of threshold value possible, N denoting the number of pixels value of the image and W denoting the number of pixels value of the object region in the image. This Petri net model for image thresholding concept is consider to be bounded net (N-bounded, N >=K) therefore it’s not safe and there is a deadlocked condition so it’s not live net.

Figure 5. Entropic thresholding Algorithm Figure 7. Description of Petri net model N2- (Transitions)

V.

EXPERIMENTAL RESULTS

We only do in this paper the Petri net models that represent the thresholding and entropy thresholding concepts for image segmentation, without do simulation of these methods on image. VI. CONCLUSION The paper shows a proposed method to model an analyzed an image segmentation entropic thresholding method using Petri nets. By applying the properties of Petri net we proof the correctness of our proposal method. REFERENCES [1]

[2]

[3]

[4] [5]

[6] [7] Figure 6. Description of Petri net model N2- (Places)

74

A. Al-Ajlan and A. El Zaart, "Minimum Cross Entropy Thresholding Using Gamma Distribution", 3rd IEEE International Conference on Information & Communication Technologies: From Theory to Applications ICTTA. Syria, April 2010. A. Salem, B. Samma and R. Abdul Salam, Adaptation Of K- Means Algorithm For Image Segmentation. S.L.: International Journal Of Signal Processing, 2009. J. Celeya, A. Desrochers and R. Graves, “Modeling and Analysis of Multi-agent Systems using Petri Nets,” Journal of Computers, vol. 4, no. 10, pp. 981–996, October 2009. R. Gonzalez and R. Woods. Digital Image Processing. 2nd. S.L.: Prentice Hall, 2002. A. Haidar and M. Morisue, “Optimization of multiple-valued logic functions based on petri nets”, IEICE Trans, on Fundamentals vol. E77-A, no. 10, pp. 1607–1616, October 1994. T. Murata, “Petri nets: Properties, analysis and applications”, Proceedings of the IEEE, vol. 77, no. 4, pp. 541–580, April 1989. T. Agerwala, “Putting petri nets to work,” Computer, vol. 12, no. 2,pp. 85– 94, December 1979.