 Research
 Open Access
Image contour based on context aware in complex wavelet domain
 Nguyen Thanh Binh^{1}Email author
https://doi.org/10.1186/s1367301500332
© Binh; licensee Springer. 2015
 Received: 19 August 2014
 Accepted: 7 May 2015
 Published: 23 May 2015
Abstract
Active contours are used in the image processing application including edge detection, shape modeling, medical imageanalysis, detectable object boundaries, etc. Shape is one of the important features for describing an object of interest. Even though it is easy to understand the concept of 2D shape, it is very difficult to represent, define and describe it. In this paper, we propose a new method to implement an active contour model using Daubechies complex wavelet transform combined with BSpline based on context aware. To show the superiority of the proposed method, we have compared the results with other recent methods such as the method based on simple discrete wavelet transform, Daubechies complex wavelet transform and Daubechies complex wavelet transform combined with BSpline.
Keywords
 Daubechies complex wavelet transform
 Contextawareness
 Active contour
Introduction
Contours are used extensively in image processing applications. Active contours can be classified according to several different criteria. One of the classifications is based on the flexibility of the active contour and is proposed in a slightly modified form by Jain [1]. The active contour models can be accordingly partitioned in two classes: free form of active contour models and limited form of active contour models.
The free form of active contour models constrained by local continuity and smoothness constraints [2–7]. Its limit uses a priori information about the geometrical shape directly. This information is available in the form of a sketch or a parameter vector that encodes the shape of interest. The geometric shape of the contour is adjusted by varying the parameters [8–13]. They cannot take any arbitrary shapes.
The snake has found wide acceptance and has proven extremely useful in the applications for medical analysis, feature tracking in the video sequences, threedimensional object recognition [14], and stereo matching [15]. To take active contour, there are many methods to take it.
In the past, many algorithms have been built to find object contour. The dualtree Complex Wavelet Transform (DTCWT) was proposed by Kingsbury [16]. In DTCWT, he used two trees of real filters for the real and imaginary parts of the wavelet coefficients. Recently, Bharath [17] has presented a framework for the construction of steerable complex wavelet.
This transform also avoids the shortcomings of discrete wavelet transform, but it uses a nonseparable and highly redundant implementation. The redundancy of this transform is even higher than that of DTCWT.
In the entire complex transforms above, use of real filters make them not a true complex wavelet transform and due to the presence of redundancy, they are computationally costly. Lawton [18] and Lina [19] used an approximate shiftinvariant Daubechies complex wavelet transform for avoiding redundancy and providing phase information. Shensa [20] and Ansari [21] use Lagrange filters, Akansu [22] uses binomial filters. Shen [22] used the Daubechies filter roots. Goodman [23] considered them as the roots of a Laurent polynomial. Temme [24] described the asymptotic of the roots in terms of a representation of the incomplete beta function. Almost of that method related Daubechies filters.
The wavelet transform for contour has serious disadvantages, such as shiftsensitivity [25] and poor directionality [26]. Several researchers have provided solutions for minimizing these disadvantages. Some of them have suggested the other method such as: local binary fitting [27, 28], local region descriptors [29], local region [30], local region based [31], local intensity clustering method. There exist some drawbacks with local regions. In [32], the problem is how to define the degree of overlap.
The local region based method has two drawbacks: (i) the Dirac functional is restricted to a neighborhood around the zero level set. (ii) Region descriptors only based on regions mean information without considering region variance [33].
Use of complexvalued wavelet can minimize these disadvantages. The DCWT uses complex filters and can be made symmetric, thus leading to symmetric DCWT, and it is more useful for image contour.
In this paper, we propose a new method to implement an active contour model using Daubechies complex wavelet transform combined with BSpline based on contextaware (DCWTBCA). To show the superiority of the proposed method, we have compared the results with the other recent methods such as the method based on simple discrete wavelet transform (DWT), Daubechies complex wavelet transform (DCWT) and Daubechies complex wavelet transform combined with BSpline (DCWTB). The rest of the paper is organized as follows: in section 2, we described the basic concepts of Daubechies complex wavelet transform. Details of the proposed algorithm have been given in section 3. In section 4, the results of the proposed method for contour have been shown and compared with other methods. Finally in section 5, we presented our conclusions.
Background
In this section, we present the theory related to the work such as: Complex Daubechies Wavelet and advantages of BSpline for Snakes.
Construction of complex Daubechies wavelet
 (i)
Compactness of the support of φ: It requires that φ (and consequently ψ) has a compact support inside the interval [−J, J + 1] for the integer J, that is, a _{ k } ≠ 0 for k = −J, −J + 1,…., J, J + 1
 (ii)Orthogonality of the φ(xk): This condition defines in a large sense the Daubechies wavelets. Defining the polynomialwhere z is on the unit circle, the orthonormality of the set {φ _{0,k }(x), k ∈ Z} can be stated through the following identity$$ F(z)={\displaystyle \sum_{n=J}^{J+1}{a}_n\;}{z}^n\begin{array}{cc}\hfill, \hfill & \hfill with\hfill \end{array}F(1)=1,\leftz\right=1 $$(2.2)where the polynomial P(z) is defined as$$ P(z)P\left(z\right)=z $$(2.3)$$ P(z)=zF(z)\overline{F(z)} $$(2.4)
 (iii)Accuracy of the approximation: To maximize the regularity of the functions generated by the scaling function φ, we require the vanishing of the first J moments of the wavelet in terms of the polynomial Eq. (2.2)$$ F\hbox{'}\left(1\right)=F"\left(1\right)=......={F}^{(J)}\left(1\right)=0 $$(2.5)
 (iv)
Symmetry: This condition amounts to have a _{ k } = a _{ 1k } and can be written as
Straightforward algebra shows that P _{ J } (z) does satisfy Eq. (2.3).
For any even value of J, this defines a subset of 2 ^{ J/2 } complex solution in the original set of “Daubechies wavelets”. A complex conjugate of a solution is also a solution.
Properties of Daubechies complex wavelet
 (i)
Symmetry and linear phase property:
The nonlinear phase distortion was precluded by the linear phase response of the filter. It keeps the shape of the signal. This is very important in image processing.
 (ii)
Relationships between real and imaginary components of the scaling and the wavelet functions.
 (iii)
Multiscale edge Information
With Daubechies complex wavelet transforms, we can act as local edge detectors. In here, the imaginary components represent strong edges, and the real components represent only some of the stronger edges.
Advantages of BSpline for snakes
In computer graphics, there are two splines which usually used: BSplines and Bezier Splines. However, BSplines have two advantages over Bezier Splines [41]: the number of control points can be set independently to the degree of a BSpline polynomial and BSplines allow local control over the shape of a Spline curve. From the advantages above of BSplines, we choose BSplines for our proposed method.
 (i)
Bsplines are piecewise polynomial that makes them very flexible.
 (ii)
Bsplines can be make smooth curve.
 (iii)
Bsplines preserve the shape that a spline has the same shape as its control polygon or more precisely.
Advantages of DCWT for active contour
 (i)
Symmetric and linear phase property of DCWT can keeps the shape of the signal and carries strong edge information. The linear phase response of the filter precludes the nonlinear phase distortion and keeps the shape of the signal and it reduces the misleading and deformed shape of objects.
 (ii)
DCWT can act as the local edge detectors. The imaginary and real components represent strong edges. This helps in preserving the edges and implementation of edgesensitive contour methods.
 (iii)
DCWT has reduced shift sensitivity. DCWT reconstructs all local shifts and orientations in the same manner. So, it is clear that it can quickly find the boundary of objects.
The proposed method for image contour
This section describes the proposed method for contour objects. The term ‘contextaware’ [42] refers to context as locations, identities of nearby people and objects, and changes to those objects.
“Context is any information that can be used to characterize the situation of an image such as: pixel, noise, strong edge, and weak edge in a medical image that is considered relevant to the interaction between pixels and pixels, including noise, weak and strong edge themselves.”
In image processing, if a piece of information can be used to characterize the situation of a participant in an interaction, then that information is context. Contextual information can be stored in feature maps on themselves. Contextual information is collected over a large part of the image. These maps can encode highlevel semantic features or lowlevel image features. The lowlevel features are image gradients, texture descriptors and shape descriptors information [42, 44].
Firstly, preprocessing of images. The collected images are scale normalized to 256 × 256 pixel, 512 × 512 pixel dimensions in order to reduce complexity.
Secondly, Daubechies complex wavelet filter bank. For Daubechies complex filter bank computation in the proposed method, Daubechies decomposition proceeds through two main periods: reconstruction of the signal from the coefficients and energy formulation to define strong point.
Finally, context aware closed contour with boundary information. Here, we use BSpline contour lines, which covers the object.
Reconstruction of the signal from the coefficients
 1.Start from the usual approximation:$$ {h}_{x,y}^{j_{\max }}=I\left(x,y\right) $$(3.2)
 2.
Evaluate \( {h}_{x,y}^{j_{\max }+1} \) using a onelevel synthesis operation with the real part of the inverse symmetric Daubechies wavelet kernel only.
 3.
Make a onelevel complex wavelet transform. The result is a quite accurate estimation of the real and imaginary parts of the projection coefficient \( {c}_{x,y}^{j_{\max }} \). In the first approximation,
\( {B}_1^3(z)=\left(z+4+{z}^{1}\right)/6 \) and D ^{(2)}(z) = z − 2 + z ^{− 1} (3.8)
We have now replaced the integral in the second term by a sum, which is much more computationally tractable. The task is then to minimize Eq. (3.7), which is typically achieved by differentiation with respect to c(k).
The Spline snake Eq. (3.5) has as many degrees of freedom (BSpline coefficients) as there are discrete contour points, i.e., one per integer grid point. In Eq. (3.7), if λ is sufficiently small, then the Spline will interpolate exactly. Conversely, the use of larger values of λ will have the effect of stiffening the Spline and smoothing out the discontinuities of the unconstrained contour curve f(x). It is also necessary to mention that λ can eventually be dropped by using a variable size knot spacing, which still assures smoothness.
Assuming a curve representation by M = tmax discrete points, we obtain h = M/N. The freedom of the Spline curve has been reduced by the same amount, resulting in a smoothing and stiffening of the curve. Increasing the number N of node points will reduce the knot spacing, and consequently it will reduce the smoothing effect of the curve.
Energy formulation
For the cost function to be a good approximation of the curvilinear integral, we typically select M sufficiently large so that the curve points are connected (i.e., within a distance of one pixel of each other). However, we note that the exact value of M is not critical; a less dense sampling may be used to increase optimization speed. The negative sign in Eq. (3.11) is used because we employ a minimization technique for the optimization.
Below, we present two different ways for fast curve rendering by digital filtering.
The main computational drawback of this procedure is that the function Eq. (3.6) needs to be evaluated for each term in the sum.

Upsampling of the BSpline coefficients;

Averaging by (n + 1) moving average filters of size h;

Filtering by a unit BSpline kernel of degree n.
This algorithm can be implemented with as few as two multiplications and two additions per node point plus (2n) additions per computed contour coordinate. Generally, it is faster and also at least a factor of two better than the Oslo knot insertion algorithm commonly used in the computer graphics.
Border conditions
Appropriate boundary conditions are necessary for the computation of Eq. (3.9) and Eq. (3.10) [45]. In the following, we distinguish the cases of a close snake and an open snake.
(ii) Open Snake Curve: Different choices can be implemented for the open snake such as mirror or antimirror boundary conditions. In this application, the antimirror conditions with a pivot at the boundary value are the most suitable choice because they allow us to lock the end points of the curve.
Experiments and results
To demonstrate the validity of the proposed method, we have tested on many images. We have compared the results with the other recent methods such as the method based on simple discrete wavelet transform (DWT), and the Daubechies complex wavelet transform (DCWT), the Daubechies complex wavelet transform combined with BSpline (DCWTB) and the proposed method using the Daubechies complex wavelet transform combined with Bspline based on context aware. These methods were implemented on our matlab program and comparison has been made on the same images and on the similar scale. In our approach, we have taken dataset images for testing. This data set has 600 images. The proposed method was tested on different cases.
To test our algorithm, many images of different sizes have been used. We compare the proposed method on two cases: strong objects and weak objects. The strong object is defined as an object whose boundaries are clear and the weak object is defined as an object whose boundaries are blurred. We have experimented on several images and here we report on some selected images.
We tested the proposed method on a set of several images and compared with the other methods. From Figs. 3, 4 and many other tests, we observed that, in the case of strong objects, the proposed method is better than the other methods.
We now apply the proposed method with the weak objects cases. The weak objects are the objects with less clear boundaries. The important edge site is blurred in the object; therefore, the boundaries become obscure, thereby misleading the curve deforming. Weak objects have less clear boundaries, the extraction of weak object is not easy work. As a result, weak object could not be extracted precisely.
To sum up, from all the above experiments and many other experiments, we observe that the performance of the proposed method is better than the DWT based method in the both cases: weak objects and strong objects. However, in the case of weak objects, they have less clear boundaries, the extraction of weak object is not easy work.
The symmetry and linear phase property is one of the reasons why the Daubechies complex wavelet performs better than other methods. The proposed method keeps the shape of the signal and carries strong edge information. It prevents the deformation of object boundaries. Therefore, it is helpful to find edges of an object in image. On the other hand, DCWT has reduced shift sensitivity. As the contour moves through space, the reconstruction using real valued discrete wavelet transform coefficients changes erratically, while complex wavelet transform reconstructs all local shifts and orientations in the same manner. Therefore, it is clear that it can quickly find boundaries of an object.
Conclusions
In this paper, the image contour model with Daubechies complex wavelet transform combined with BSpline based on contextaware is proposed. The proposed technique allows estimating the contour location of a target object along an image. The contribution in the use of Daubechies complex wavelet transform for image was discussed. Mathematical basis of the Daubechies complex wavelet transform and BSpline proved that image features based on the wavelet transform coefficients can be used very efficiently for image contour classification.
From the results shown in the above section, we see that the proposed method performs better in case of both strong and weak objects. The proposed method can be applied on any modality of images. However, in the case of weak objects, the proposed method finds approximate boundaries. Therefore, if the quality of the image is very bad due to heavy noise or heavy blur, etc., then the estimation ability is reduced because of the effect to edge the object. To avoid this problem, we can reduce noise and blur before applying the proposed method. In the future work, the method is going to be compared with some other methods to evaluate its results in different cases and the complexity of them.
Declarations
Acknowledgment
The author is grateful to the valuable guidance provided by Dr. Ashish Khare, Department of Electronics and Communication, University of Allahabad, India.
Authors’ Affiliations
References
 Jain AK, Zhong Y, Lakshmanan S (1996) Object Matching Using Deformable Templates. IEEE Transactions on Pattern Analysis and Machine Intelligence 18(3):267–278View ArticleGoogle Scholar
 Kass M, Witkin A, Terzopoulos D (1988) Snakes: Active contour models, International Journal of Computer Vision, 1(4):321331, ISSN 09205691. http://link.springer.com/article/10.1007/BF00133570
 Szekely G, Kelemen A, Brechbuhler C, Gerig G (1996) Segmentation of 2D and 3D objects from MRI volume data using constrained elastic deformations of flexible Fourier contour and surface models. Med Image Anal 1(1):19–34View ArticleGoogle Scholar
 Lewis FL, Gurel A, Bogdan S, Doganalp A, Pastravanu OC, Wong YY, Yuen PC, Tong CS (1998) Segmented snake for contour detection. Pattern Recogn 31(11):1669–1679View ArticleGoogle Scholar
 Gunn SR, Nixon MS (1998) Global and local active contours for head boundary extraction. Int J Comput Vis 30(1):43–54View ArticleGoogle Scholar
 Garrido A, Blanca DL (1998) Physicallybased active shape models: initialization and optimization. Pattern Recogn 31(8):1003–1017View ArticleGoogle Scholar
 Blake A, Isard M (1998) “Active contours”, SpringerGoogle Scholar
 Chuang JH (1996) A potentialbased approach for shape matching and recognition. Pattern Recogn 29(3):463–470View ArticleGoogle Scholar
 Chakraborty A, Staib LH, Duncan JS (1994) Deformable boundary finding influenced by region homogeneity, Proceedings of IEEE Computer Society conference on Computer Vision and Pattern Recognition (CVPR), pp. 624627Google Scholar
 Cootes TF, Taylor CJ, Cooper DH, Graham J (1995) Active shape modelstheir training and application. Comput Vis Image Underst 61(1):38–59View ArticleGoogle Scholar
 Yuille AL, Cohen DS, Hallinan PW (1989) Feature extraction from faces using deformable templates, Proceedings of IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 104109Google Scholar
 Amit Y, Grenander U, Piccioni M (1991) Structural image restoration through deformable templates. J Am Stat Assoc 86(414):376–387View ArticleGoogle Scholar
 Lakshmanan S, Grimmer D (1996) A deformable template approach to detecting straight edges in radar images. IEEE Transactions on Pattern Analysis and Machine Intelligence 18(4):438–442View ArticleGoogle Scholar
 Wang JY, Cohen FS (1994) Part II: 3D object recognition and shape estimation from image contours using Bsplines, shape invariant matching, and neural networks, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 16, no. 1, pp. 1323Google Scholar
 Menet S, Marc PS, Medioni G (1990) Bsnakes: Implementation and application to stereo, Image Understanding Workshop, pp. 720726Google Scholar
 Kingsbury NG (1999) Image processing with complex wavelets, Philosophical Transactions of Royal Society London. Ser A 357:2543–2560MATHGoogle Scholar
 Bharath AA, Ng J (2005) A Steerable Complex Wavelet Construction and Its Application to Image Denoising, IEEE Transactions on Image Processing, vol. 14, no. 7, pp. 948959Google Scholar
 Lawton W (1993) Applications of complex valued wavelet transform in sub band decomposition. IEEE Trans Signal Process 41(12):3566–3568View ArticleMATHGoogle Scholar
 Lina JM, Mayrand M (1995) Complex Daubechies Wavelets. Journal of Applied and Computational Harmonic Analysis 2:219–229View ArticleMATHMathSciNetGoogle Scholar
 Shensa MJ (1992) The discrete wavelet transform: wedding the á trous and Mallat algorithms. IEEE Trans Signal Process 40(10):2464–2482View ArticleMATHGoogle Scholar
 Ansari R, Guillemot C, Kaiser JF (1991) Wavelet construction using Lagrange halfband filters. IEEE Transactions on Circuits and Systems 38(9):1116–1118View ArticleGoogle Scholar
 Akansu AN, Haddad RA, Caglar H (1993) The binomial QMFwavelet transform for multiresolution signal decomposition. IEEE Trans Signal Process 41(1):13–19View ArticleMATHGoogle Scholar
 Shen J, Strang G (1996) The zeros of the Daubechies polynomials. Proc Am Math Soc 124:3819–3833View ArticleMATHMathSciNetGoogle Scholar
 Goodman TNT, Micchelli CA, Rodriguez G, Seatzu S (1997) Spectral factorization of Laurent polynomials. Adv Comput Math 7(4):429–454View ArticleMATHMathSciNetGoogle Scholar
 Candes EJ (1998) Ridgelets: Theory and Applications, PhD thesis, Stanford University. http://statweb.stanford.edu/~candes/papers/Thesis.ps.gz
 Khare A, Tiwary US (2006) Symmetric Daubechies Complex Wavelet Transform and its application to Denoising and Deblurring. WSEAS Transactions on signal processing 2(5):738–745Google Scholar
 Li C, Kao C, Gore JC, Ding Z (2008) Minimization of RegionScalable Fitting Energy for Image Segmentation. IEEE Trans Image Process 17:1940–1949View ArticleMathSciNetGoogle Scholar
 Li C, Kao C, Gore J, Ding Z (2007), Implicit Active Contours Driven by Local Binary Fitting Energy, IEEE Conference on Computer Vision and Pattern Recognition, pp 1–7, ISSN:10636919 http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=4270039&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D4270039
 Darolti C, Mertins A, Bodensteiner C, Hofmann U (2008) Local Region Descriptors for Active Contours Evolution. IEEE Trans Image Process 17:2275–2288View ArticleMathSciNetGoogle Scholar
 Brox T, Cremers D (2009) On Local Region Models and a Statistical Interpretation of the Piecewise SmoothMumfordShah Functional. Int J Comput Vis 84:184–193View ArticleGoogle Scholar
 Lankton S, Tannenbaum A (2008) Localizing RegionBased Active Contours. IEEE Trans Image Process 17:2029–2039View ArticleMathSciNetGoogle Scholar
 Lawton WM (1991) Necessary and sufficient conditions for constructing orthonormal wavelet bases. J Math Phys 32(1):57–61View ArticleMATHMathSciNetGoogle Scholar
 Li C, Huang R, Ding Z, Gatenby C, Metaxas D, Gore JC (2011) A Level Set Method for Image Segmentation in the Presence of Intensity Inhomogeneity with Application to MRI. IEEE Trans Image Process 20:2007–2016View ArticleMathSciNetGoogle Scholar
 Strang G (1992) The optimal coefficients in Daubechies wavelets. Physical D: Nonlinear phenomena 60:239–244View ArticleMATHMathSciNetGoogle Scholar
 Lina JM, Mayrand M (1993) Parameterizations for Daubechies wavelets. Phys Rev E 48:4160–4163View ArticleMathSciNetGoogle Scholar
 Smith H (1998) A parametrix construction for wave equations with C1, coefficients. Ann Inst Fourier 48(3):797–835View ArticleMATHMathSciNetGoogle Scholar
 Daubechies I (1992) Ten Lectures on Wavelets. Society for Industrial and Applied Mathematics, Philadelphia, PAView ArticleMATHGoogle Scholar
 Temme NM (1997) Asymptotics and numerics of zeros of polynomials that are related to Daubechies wavelets. Appl Comput Harmon Anal 4(4):414–428Google Scholar
 Lina JM (1997) Image processing with complex Daubechies wavelets. Journal of Mathematical Imaging and Vision 7(3):211–223View ArticleMathSciNetGoogle Scholar
 Clonda D, Lina JM, Goulard B (2004) Complex Daubechies wavelets: Properties and statistical image modeling. Signal Process 84(1):1–23View ArticleMATHGoogle Scholar
 Hearn D (1997) Computer Graphics C Version, Pearson publishing, Second edition, ISBN10: 817758765XGoogle Scholar
 Huaizu Jiang, Jingdong Wang, Zejian Yuan, Tie Liu, Nanning Zheng, Shipeng Li. Automatic Salient Object Segmentation Based on Context and Shape Prior. British Machine Vision Conference, pp 112 (2011)Google Scholar
 Abowd G, Dey A, Brown P, Davies N, Smith M, Steggles P (1999) Towards a Better Understanding of Context and ContextAwareness. Lect Notes Comput Sci 1707:304–307Google Scholar
 Schilit B, Theimer M (1994) Disseminating Active Map Information to Mobile Hosts. IEEE Netw 8:22–32View ArticleGoogle Scholar
 Brigger P, Hoeg J, Unser M (2000) Bspline snakes: a flexible tool for parametric contour detection. IEEE Trans Image Process 9(9):1484–1496View ArticleMATHMathSciNetGoogle Scholar
 Xu C, Prince JL, (1998), Snakes shapes and gradient vector flow, IEEE Transactions on Image Processing, vol. 7, Issue 3, pp. 359–369, ISSN:10577149. http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=661186&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D661186
Copyright
This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly credited.