Keywords

1 Introduction

Image segmentation consists of extracting symbolic entities that are the regions and the contours. Several segmentation algorithms are proposed in the literature, based on discontinuity or similarity [1]. Since the publication by Kass et al. [2], the deformable models have become among the most used techniques to extract the discontinuity of boundaries from the interest structures [3, 4]. They were largely used in the medical image processing because of their flexibility, which allowed their adaptation to the variability of biological structures and the incorporation of the medical expertise into their conception [57]. Moreover, for several years, these applications used a monolithic, sequential system to perform complex tasks. Some of these operations can be performed in parallel, or in a distributed fashion. Therefore, new approaches for tackling image segmentation from other angles are needed. One of these approaches, which is getting more and more popular, is represented by multi-agent system (MAS) [813].

In this paper, we propose MAS for segmentation of medical image sequence. Our MAS, based on NetLogo platform, evolves and moves all the points of contour active in parallel. Therefore, this article is organized as follows: Section 2 describes briefly about NetLogo, the multi-agent platform used in this work. In Sect. 3, we present active contour or the snake. Then, the proposed MAS approach of image sequence segmentation is detailed in Sect. 4. Some experimental results are presented in Sect. 5. Conclusion is given in the last section.

2 NetLogo Environment

NetLogo is a programmable modeling environment for simulating natural and social phenomena. It was authored by Uri Wilensky in 1999 [14] and has been in continuous development at the Center for Connected Learning and Computer-Based Modeling [15]. In NetLogo, there are four types of agents: turtles, patches, links, and observer. Turtles are reactive agents that move around the world. The world is two dimensional and is divided into a grid of patches. Each patch is a square piece of “ground” over which turtles can move. Links are agents that connect two turtles. The observer does not have a location. All four types of agents can run NetLogo commands. All three (observer, turtles, and patches) can also run “procedures.” A procedure combines a series of NetLogo commands into a single new command that one defines, and more details are given in [14].

3 Active Contour

An active contour, as introduced by Kass et al. [2], is a curve described as an ordered collection of points, which evolves from its initial position to some boundary within the image (see Fig. 1). The contour active evolution is formulated as an energy minimization; the snake energy is typically a linear combination of three terms: external energy, internal energy, and constraint energy:

  1. 1.

    External energy, which guides the snake toward the boundary of interest. It can be written as gradients of scalar potential functions in image I. This external energy is important in contour detection step.

  2. 2.

    Internal energy, which ensures that the segmented region has smooth boundaries. It defines the stiffness of the curve as well as the cohesion of the points. Then, it is intrinsic with the snake. Hence, this energy can be calculated using two forces: continuity force and curvature force.

  3. 3.

    Constraint energy, which provides a means for the user to interact with the snake. In this work, we have used two energies of context: balloon energy introduced by [16] and an improvement of directional energy proposed by [17].

Fig. 1
figure 1_52

Evolution of contour active

4 The Proposed MAS Approach

In this proposed work, we introduce a cooperative approach for detecting and tracking of object in image sequence. The MAS proposed is used to implement the active contour.

4.1 Active Contour Used

The parametric model described in Sect. 2 is used in this approach. Our energy functional is given by the following formula:

$${ \mathrm{E}}_{\mathrm{snake}} = {\Sigma }_{\mathrm{i}=1,\mathrm{N}}({\mathrm{a\,E}}_{\mathrm{continuity}}\mathrm{(Pi)}+{\mathrm{b\,E}}_{\mathrm{curvature}}\mathrm{(Pi)}+{\mathrm{c\,E}}_{\mathrm{gradient}}\mathrm{(Pi)}+{\mathrm{d\,E}}_{\mathrm{constraint}}\mathrm{(Pi)})$$
(1)

\({P}_{i} {= }^{<Emphasis Type="Bold">\text{ t}</Emphasis>}(\mathrm{{x}_{i},\ {y}_{i}})\,i = \mathit{1}..N\) are the points of snake and a, b, c, and d are coefficients attached to each energy.

In the first frame, we used the balloon energy as constraint energy. Then, we replaced this energy by directional energy in the other frames. For more detail about the utility of this change of the energy functional, see our paper [18].

4.2 Multi-Agent System

Our MAS is implemented using the NetLogo platform. We used three types of NetLogo agents: observer, turtles, and patches. The snake and its points (snaxels) are implemented using turtles; so, each turtle represents one point of snake. Similarly, each pixel of frame is represented by patch agent. These two types of agents (turtles and patches) are supervised by Observer The main stages of the proposed method are shown in Fig. 2.

Fig. 2
figure 2_52

Steps of proposed approach

4.2.1 Observer Roles

Observer performs several operations that are summarized as follows:

  1. 1.

    It loads the first frame of sequence in the NetLogo grid, and consequently it initializes patches by attaching the value of every image pixel to one patch. After object detection in the first frame, the Observer also loads other sequence frames in the order to track object.

  2. 2.

    Observer initializes the snake around the boundaries of object to be tracked. It creates turtles set by this initialization of snaxels.

  3. 3.

    Observer tests the turtle’s stability as shown in Fig. 2. It is represented by percentage of fixed agents during a certain period.

  4. 4.

    It supervises the fusion of neighboring turtles if they are very close and it creates a new turtle between two neighboring turtles, which have high continuity energy.

4.2.2 Turtles’ Roles

We have mentioned previously that these agents represent points of contour active. After its creation by Observer, each turtle has its own process to execute simultaneously with the other agents. This process is summarized in Algorithm 1.

Algorithm 1:

Repeat

  1. For all the neighbor pixels (patches) do calculate energies

  2. For all the neighbor pixels (patches) do Normalization

  3. Patch which had minimal energy functional represents the new position of turtle

Until stop Criterion

This algorithm is extracted from greedy algorithm [19]. The stop criterion in Algorithm 1 is the turtle’s stability mentioned in Fig. 2. During this processing, each turtle needs several communications with other agents, which can be given as follows:

  1. 1.

    It contacts its two neighbor turtles to get their positions in the NetLogo grid. This information is necessary to calculate the energy and to evaluate the criterion of fusion with its neighbor agent. This criterion is evaluated by a comparison between the turtle continuity energy and the average distance between turtles.

  2. 2.

    The second type of turtle communication is established with Observer when the turtle wants to execute a fusion with its neighbor. This operation is achieved if Euclidian distance between neighbor turtles is minimal; two neighbor turtles are merged to obtain one turtle. Observer accepts or refuses this operation, and transmits its decision to communicant turtles.

  3. 3.

    The last type of communication consists to get from patch, the gray level of pixel, which is represented by this patch agent. Turtle agent use this value of gray level in evaluation of image energy.

5 Experimental Results and Discussions

In this section, we present some results in order to validate our proposed approach. We have used many sequences in experiments but we have given here only two types of image sequences: sequence of biological cell and echocardiographic sequence. In all the tests, we used a vicinity of 3 ×3. The criterion of stability (Fig. 2) is the stability of 90% of turtles (snaxels). Some results obtained are illustrated in Figs. 3 and 4. The turtles are represented by white pixels.

Fig. 3
figure 3_52

Detection and tracking object in biological images sequence

Fig. 4
figure 4_52

Detection and tracking object in echocardiographic images sequence

In the biological sequence, we have obtained good results. The object is detected in the first image and tracked in other frames of sequence. All turtles are stabilized in image sequences. This result is due to the simplicity of sequences and the absence of noise. In the second sequence also, we have obtained good results: The boundary object is tracked in all frames of sequence. We used 80 turtles to obtain continuous snake. But, we remark that there are some turtles, which did not have good positions. This is because of the following two reasons: First, this type of images is very noisy, and contains false areas (artifacts) around the boundaries of the object. Second, the percentage of stable turtles used in the test. If we increase this criterion, we will have a very important processing time.

6 Conclusion

In this paper, a novel MAS has been proposed, which is markedly different from previous cooperative approaches of image sequence segmentation. Parallel contour active is used to detect and track automatically an object in medical image sequence. This parallelism is implemented by our MAS based on NetLogo platform. The system has been applied to several image sequences. The results show good cooperation between agents in detection and tracking of object in sequence. After a temporal comparison between this cooperative approach and our pervious iterative approach [18], we propose an implementation of our MAS in C language in order to track the object in real time.