1 Introduction

Segmenting a textured object from its complex background is one of the most important and challenging task in the field of computer vision and image processing as most of the natural textures do not follow any specific pattern [1]. Nevertheless, many algorithms have been proposed for segmenting texture images. Among them deformable models like Active Contours (AC) are one of the most popular choices because of their flexibility, capability of achieving sub-pixel accuracy and providing smooth and close contour as segmentation result [2].

In Active Contour Model (ACM), an initial close contour is made to move in the image domain minimizing an energy functional containing two types of energy terms, internal energy and external energy [3]. In most of the traditional ACMs [4, 5], the external energy which is used to drive the active contour towards the object boundary, is based on the intensity gradient of the image and usually the contour converges when this intensity gradient maximizes. However, in case of texture images, intensity gradient will give many such local maxima and the contour may converge inaccurately. To overcome this problem, many different external energies have been proposed for AC which incorporate texture features of the image [6, 7]. The main idea of this paper is to use texture gradient instead of intensity gradient which highlights step changes instead intensity changes in the image and we find out the texture gradient of the image using non-decimated complex wavelet transform that is subsequently used to determine the external energy of the proposed ACM. We compare the results of our proposed approach with two other ACMs designed for texture object segmentation which are based on the Gabor transform [8] and statistical moments [9] of the image. The main advantages of our method over other state of the art parametric ACM for texture segmentation are as follows.

  • The proposed method only requires initial contour selection, but no object point selection like other state of the art approaches.

  • It is faster than others as it does not require any transform calculation for the active contour convergence.

The remaining of this article is organized as follows. Next section introduces the preliminaries involved in our method, Sect. 3 gives details of our proposed approach, experimental results are provided in Sect. 4 and concluding remarks are drawn in Sect. 5.

2 Preliminaries

2.1 Mathematical Model of Active Contour Model

A parametric active contour is a parametrized curve represented by a set of control points \(X(s)=[x(s),y(s)]^{T}\). It moves in the image domain to minimize the energy functional given by

$$\begin{aligned} E=\int _0^1 \underbrace{\frac{1}{2} [\alpha |x'(s)|^{2}+\beta |x"(s)|^{2}]}_{Internal~energy}+ \underbrace{E_{ext}(x(s))}_{External~energy} ds \end{aligned}$$
(1)

The internal energy of the ACM controls the stretching and bending of the contour and external energy which is generally derived from the image properties is given by the following expressions in traditional ACM.

$$\begin{aligned} E_{ext}(x,y)=-|\bigtriangledown I(x,y)|^{2} \end{aligned}$$
(2)

Or

$$\begin{aligned} E_{ext}(x,y)=-|\bigtriangledown (G_{\sigma }(x,y)*I(x,y))|^{2} \end{aligned}$$
(3)

Here \(G_{\sigma }\) is a two-dimensional Gaussian kernel with \(\sigma \) being the standard deviation and \(\bigtriangledown \) is the gradient operator. The energy functional in Eq. (1) will be minimized when the following force balance equation will get satisfied.

$$\begin{aligned} \alpha x"(s)-\beta x""(s)-\bigtriangledown E_{ext}=0 \end{aligned}$$
(4)

2.2 Non-decimated Complex Wavelet Transform (NDCWT)

Complex Wavelet Transforms (CWT) are the complex valued extensions of the standard DWT, which provide both amplitude and phase information and were first given by Magarey et al. [10]. These original CWT were based on two complex valued FIR filters that approximate two Gabor filters. These are

$$\begin{aligned} h_0(n)\approx a_0 e^{(n+0.5)^2}/2\sigma _0 ^2 e^{jw_0(n+0.5)} \end{aligned}$$
(5)
$$\begin{aligned} h_1(n)\approx a_1 e^{(n+0.5)^2}/2\sigma _1 ^2 e^{jw_1(n+0.5)} \end{aligned}$$
(6)

for \(n=-D......D\)

These low pass (\(h_0\)) and high pass (\(h_1\)) filters are used in standard DWT structure to give the CWT. With \(D=2, w_0=\pi /6, w_1=0.76\pi , \sigma _0=0.97, \sigma _1=1.07, a_0=0.47, a_1=0.43j\), Eqs. (5) and (6) will produce two even length complex filters (length=4). The non-decimated form of the CWT can be found out by using the same DWT structure excluding the sub-sampling part. This will produce sub-bands which have the same size as that of the original image. The non-decimated form achieves the advantages of complete shift invariance and one-one mapping with the original image pixel. However, the even length complex filters obtained using Eqs. (5) and (6), will place the subband coefficients half way between the original signal samples [11]. As a consequence, there will be no direct one-one mapping between the sub-band and original image pixel. This problem can be overcome by using odd length filters which can be obtained by dropping 0.5 from Eqs. (5) and (6). So the filters obtained by using the parameter values \(D=2, w_0=\pi /6, w_1=0.82\pi , \sigma _0=0.97, \sigma _1=1.07, a_0=0.47, a_1=0.43j\) are

$$\begin{aligned} h_0=\frac{1-4j,19-11j,36,19+11j,1+4j}{76} \end{aligned}$$
(7)
$$\begin{aligned} h_1=\frac{-4+1j,9-14j,26j,-9-14j,4+1j}{60} \end{aligned}$$
(8)

The NDCWT using these complex valued filters are used in our proposed approach to find the texture gradient.

3 Proposed Method

3.1 Texture Gradient Using NDCWT

The subbands of the NDCWT of an image highlight the texture contents at different scales and orientations. Let I be such a texture image and being decomposed using NDCWT into n subbands and let these subbands be represented as \(S_i~~where~i=1~to~n\).

Fig. 1.
figure 1

(a) A synthetic texture image (b) its corresponding texture gradient

The texture gradient of the image can be obtained by finding the gradient of each of the subbands and then adding them. However, the gradient of each subband will give double edge at the intensity boundaries in non-textured regions. So in order to detect steps rather than edges, octave scale separable median filtering is performed on the subband images followed by gradient extraction. Let the median filtered subbands be \(MS_i\) and obtained like as follows.

$$\begin{aligned} MS_i(x,y)=MedianFilter(S_i(x,y))~~~~~~~for~1\le i \le n \end{aligned}$$
(9)

Following this, the gaussian derivative gradient of each median filtered subband image is performed and let us denote them as \(\nabla MS_i\). Now, the texture gradient of the image can be obtained as follows and an example is also given in Fig. 1

$$\begin{aligned} TG(x,y)=\sum \limits _{i=1}^n \nabla MS_i(x,y) \end{aligned}$$
(10)

3.2 Texture Gradient Based ACM

We can find from Fig. 1 that, the texture gradient obtained in the previous section highlights the boundary of two different texture regions. However, along with the major texture boundaries (with high magnitude), it will also give some spurious boundaries (with low magnitude) for smaller texture variations as can be seen inside the square box in the figure. Additionally, we can see the edges of the gradient image are spread as an effect of multilevel wavelet decomposition. Thus, before utilizing this texture gradient in our proposed ACM, we have eroded it using a suitable structuring element which will thin the edges along with removing some of the spurious edges. Let the texture gradient after erosion using a structuring element B be \(TG_e\) and is obtained like as follows.

Fig. 2.
figure 2

Segmentation result using (a)texture gradient based external energy (b) intensity gradient based external energy

$$\begin{aligned} TG_e=TG\ominus B \end{aligned}$$
(11)

The shape and size of the structuring element is decided based upon the structure of the texture patterns present in the image. Now, in order to segment the texture object from the background perfectly, we have used the magnitude of eroded texture gradient above as the external energy of our proposed ACM i.e.

$$\begin{aligned} E_{ext}=k.|TG_e(x,y)| \end{aligned}$$
(12)

Here, k is the weighting factor and \(TG_e\) is the eroded texture gradient as obtained in Eq. (11). By putting this defined external energy in the force balance equation of ACM in Eq. (4), the force balance equation for texture gradient based ACM is obtained as follows.

$$\begin{aligned} \alpha x"(s)-\beta x""(s)-k |TG_e(x(s))|=0 \end{aligned}$$
(13)

So, when \(TG_e(x(s))\) maximizes i.e. at the boundary of the texture object, then Eq. (13) minimizes and gets stabilized providing the desired solution as the converged contour. A comparison of segmentation results of a texture object using intensity gradient based ACM (GVF) and texture gradient based ACM is shown in Fig. 2 and we can find that in case GVF the contour converges locally based on the magnitude of the intensity gradient resulting in inaccurate segmentation of the object of interest which is not the case in our proposed approach.

4 Experimental Results and Performance Evaluation

To analyse the validity of our method, experiments are conducted on a number of synthetic and natural texture images. In this section, the results obtained in our proposed texture gradient based ACM is presented along with the results of parametric ACM for texture segmentation using moment based method [9] and Gabor balloon energy based method [8] for the purpose of comparison. All the experiments are conducted on Intel Core 2 platform with 3 GHz processor, 4 GB RAM and CentOS operating system. Figure 3 shows four texture images with the first row showing the contour initialization, corresponding texture gradient images are shown in second row and the object segmentation results using the proposed ACM is shown in third row of the figure. The value of parameters set for all our experiments are \(\alpha =0.2, \beta =0~and~ k=0.02\) which are decided by trial and error. In the same context, Fig. 4 shows the results of using ACM based on statistical moment and Gabor balloon energy in the first and second row respectively with the same initial contour. However, these methods require some initial object point selection along with contour, which is not a requirement in our case making our method more automatic. Now, we can find from the above mentioned figures, for the synthetic texture image, all the three methods achieve same good results. However, for all the three natural texture images, our proposed method segments the object of interest more accurately as compared to the other two methods.

Fig. 3.
figure 3

Segmentation results using proposed ACM. The first row:initialization. Second row: Eroded texture gradients. Third row: segmentation results.

Fig. 4.
figure 4

Segmentation results using other approaches. The first row: Results of moment based approach [9]. Second row: results of Gabor Balloon energy based method [8].

Table 1. Comparison of MDAD (in pixels) among our method and its variants for various test images
Table 2. Comparison of Time (in sec.) among our method and its variants for various test images

To evaluate the performance of a method it is very important to quantify how good or bad it is, through some quantitative parameters. We have used two such quantitative parameters namely Maximum Distance of Active contour from Desired contour (MDAD) [12] and execution time in second. Table 1 shows MDAD value for the above images in all the three approaches. It is clear from the table that consistently low value of MDAD is obtained in our proposed approach which means active contour is close to the actual object contour implying better segmentation. Next is the time for execution which is significantly less as compared to the other two approaches as can be seen in Table 2.

5 Conclusion

This paper presents a novel and fast active contour model driven by a new external energy based on the texture gradient of the image. This texture gradient is derived from the non-decimated complex wavelet transform of the image and has a high magnitude at the boundary of two different texture regions. Experimental results evident that the proposed method succeed to segment a texture object against its complex background in a comparatively lesser amount of time with better segmentation accuracy as compared to its other variants.