The article information
- Li Liu, Ao-Lei Yang, Xiao-Wei Tu, Wen-Ju Zhou, Min-Rui Fei, Jun Yue
- Double regularization control based on level set evolution for tablet packaging image segmentation
- Advances in Manufacturing, 2015, 3(1): 73-83
- http://dx.doi.org/10.1007/s40436-015-0105-6
-
Article history
- Received: 2014-03-01
- Accepted: 2015-02-02
- Published online: 2015-03-13
2. School of Information Science and Electrical Engineering, Ludong University, Yantai 264025, People's Republic of China;
3. School of Computer Science and Electronic Engineering, University of Essex, Colchester CO4 3SQ, UK
In order to solve the image segmentation problem,the level set method was proposed by Osher and Sethian [1]. It is a kind of method for solving curve evolution,and adopts the method of implicit plane and partial differential equations (PDE) for expressing closed curves. During curve evolution,the level set method employs zero level set function (LSF) to generate a higher dimensional function,which avoids the track and parameterization. Level set method has been applied widely in various fields,such as image processing,fields of physics,fluid dynamics,materials science,etc.
Curve evolution models based on the level set method are in general divided into two types: the parameter model and the geometric characteristic model. The parametric active contours [2, 3] are explicitly constituted by Lagrangian equation. Because the Snake model [2] can easily fall into local extremum and is too sensitive to deal with topology structural changes in initial position,it is difficult to use the model for complex image segmentation. The geometric active contour [4, 5, 6] is implicitly constituted by Eulerian equation,which is effective in closed moving interface of geometrical and topological change. Li,et al. [7] presented an edge-based method, which used the local edge information to draw the active contour in the object boundaries. The energy function introduced a penalty term to maintain a signed distance function (SDF) during the evolution,however,it should preset the form of curve expansion or shrink. The edgebased image segmentation method is not robust enough for noise,and the edge leakage easily occurs on the weak edges. Chan and Vese [8] proposed the C-V model using a variational LSF. This C-V model is with larger convergence range and more flexible initialization. Vemuri and Chen [9] proposed the region-based piecewise smooth (PS) model which combined shape-prior information,and could be employed to achieve image fusion and segmentation. The region-based active contour models depend on intensity homogeneity in each segmentation region. However,the intensities are inhomogeneous from different modalities in real images. The results of edgebased and region-based methods considered the image data information are unsatisfactory,such as some covered target and similar grayscale images. To segment these kinds of intensity inhomogeneous images,Wang,et al. [10] presented the preprocessing step. Michailovich,et al. [11] proposed an active contour model used Bhattacharyya gradient flow to distinguish the intensity distributions between inside and outside. Zhou,et al. [12, 13] used the accurate image capturing control and achieved the fast bottle cap defect detection. Further, Zhou,et al. [14] presented the level set image segmentation with Bayesian analysis to solve the image tackle problem,and Zhou,et al. [15, 16] alslo employed gradient vector flow with mean shift for skin lesion image segmentation. However,the applications are constrained.
This paper proposes a new double regularization control (DRC) method,which is region-based active contour. This method makes use of a variational level set evolution function containing internal energy,external energy,length smooth regularization and potential penalty function regularization terms. DRC method needs to define energy function in terms of region contour. The regional control applies the level set evolution function,and the minimizing fitting energy function uses Gauss kernel function which recognizes the intensity information from initial small region to entire region. The length smooth regularization term is used for smooth curves and to avoid smaller region appearance. It is important that the potential penalty function regularization term maintains an approximate SDF during the evolution. In order to verify the DRC method,a number of tablet packaging images are employed in experiment studies. The results show that the DRC method is a simple and efficient numerical scheme. It can be used to implement the intensity inhomogeneous image segmentation,improve the computational efficiency and numerical accuracy,and reduce the number of iterations. 2 Region-based level set methods 2.1 Traditional C-V method
Based on the simplified Mumford-Shah model [17]and
variational method,Vese and Chan [8] established a
variational level set method,which was the two-phase
piecewise constant image segmentation. Let
be
the boundary,and I(x,y) Ω: → R be a given gray image,
where (x,y) represents an arbitrary point. The minimized fitting energy function of C-V is


C-V method cannot segment unevenly grayscale image, since it is sensitive to the restriction of an initial contour. Thus,Vese and Chan [18] proposed a piecewise smooth (PS) method,whose energy function is expressed as

+ and
- are used for calculating the
minimized level set energy function φ.Thus,u+ andu
have
to be updated in each iteration,from sub region to entire image. It is necessary to degrade level set evolution during the
iteration. Unfortunately,the modified PS method increases the
computation complexity and hinders its practical application.
2.2 Other level set methodsThe region-scalable fitting (RSF) energy [19] and distance regularized level set evolution (DRLSE) [20] methods are introduced in this section.
The energy minimization function of the RSF smethod is




In traditional region-based active contour models,global image information is used to promote the approximation evolution of the real contour curve. However,it cannot get the desired results when segmenting the uneven grayscale images. Based on level set,a novel DRC method is proposed here using local image information. It contains region control energy and regularization term. 3.1 Region control energy
Uneven grayscale images are joined into smooth function field in the original images [21],the data model is established by

,where K
represents kernel function and R denotes region. Let C(s): [0, 1] → Ω ⊂ R2
,the contour cdivides the original
image into two regions R1=RIn,C(s) and R2=Rout,C(s),in which R1=RIn,C(s) and R1=Rout,C(s) denote the inside and outside on
contour C,respectively. The image I(x,y) is divided into
inside and outside regions,which has two approximated
image intensity parameters,g1(x1,y1) and g2(x2,y2). According to the C-V method,the control minimized energy
function of local region is expressed as

Let H(φ) denote Heaviside function and the zero level set function (φ(x,y)) represent boundary curve C. The local region control energy function can be rewritten as

The ||θ(I)-θ(g)||2 fails to non-robustness,which is similar to the Euclidean distance vector of the data space. Therefore,the distance vector involves Gaussian kernel function as a flexible boundary,which is given as

Hence,the two-dimension data space is transformed into one-dimension,and the expression is

It is obvious that the evolution contour Cwill be
naturally divided into the target region and background
region. When K(I,gi)=1,the kernel function approaches
to 0. Let
,and the local region control
energy function can be rewritten as

The Gaussian kernel function decreases drastically to 0. When |I-gi > 3σ,the evolution curve is unbounded,and the contour is then far away from the regions. Therefore, the condition {I: |I-gi| ≤ 3σ} fgis the localized energy around I(x,y) in the neighboring region.
By developing the local energy term,it enhances the gray contrast of the target and background. The method refers to the difference between the local region control kernel function and the original image convolution. 3.2 Regularization control term
The regularization term contains length smooth and potential penalty function terms which will be introduced in this subsection. 3.2.1 Length smooth regularization term
In order to make the evolution contour smooth enough and avoid the small region appearance as far as possible,the length smooth regularization term is proposed,which is given by


During the level set evolution,the penalty energy term is designed to maintain an approximate SDF,

Thus the regularization energy function term can be represented as

dxdy,where gis the potential penalty
function and
. In the DRC method,a novel
potential function is designed as

The calculated results show that when s=0 and s=1, η(s) has the minimum value. η'(s) is the first-order derivative of η(s) and the sign of potential penalty function satisfies l(s)=η'(s)/s,which are expressed as

The energy fitting function of the DRC method is expressed as follows

The energy functional equation is determined by region parameters {gi},i=1,2. According to Eq. (20),the regularization terms do not depend on region parameters when the level set function φ is fixed. Therefore,solving the inverse of local region parameters will be transformed into the local region parameter kernel function. This method is called fixed point iteration (FPI),the following equation is obtained as

Depending on RBF kernel function property,the necessary condition of energy function minimum satisfies gi-ƒRi(gi)=0 where

Assuming the boundary contourCtakes the representation of zero level set function (φ(x;y)),the regional parameter gi fg;i¼1;2 can be expressed as follows

The gradient flow is involved to update the regularization term. Specifically,the gradient flow of the length smooth regularization term is represented as


. Because the drastic increase of
|∇ φ| will cause oscillation on level set function,the evolution curve will generate some ‘‘peaks’’ and ‘‘valleys’’.
The improvement of the DRC method is to use η(|∇ φ|)
replacing
,and the gradient flow of the potential
penalty function is denoted as

Therefore,vP(φ) can be rewritten as vp(φ) and satisfies the requirement vl(φ) < v,which is the diffusion rate for the potential function η(|∇ φ|). From Eqs. (19) and (26), the diffusion rate is estimated according to the fundmental

In order to obtain the zero level set,|∇ φ| is satified the following three cases:

The key of the potential penalty function is the boundary corresponding to the diffusion rate which is restricted in the case |∇ φ| < 1/2. The contour evolutions are bilaterally extended,which are involved into the penalty term. Due to introducing potential penalty function η(|∇ φ|),the zero level set contour distortion can be avoided by both full domains. 3.3.2 Gradient flow for energy minimization
In order to ensure the level set evolution function φ,the DRC method should be able to maintain regional parameters {gi},i=1,2 unchanged. Therefore,solving the inverse of the energy functional EK;DRC region parameters needs to compute region parameters,which are generated from the local region term inside and outside,the length smooth and the potential penalty function regularization term. The level set curve evolution function is given as

![]() |
| Fig. 1 Eight-neighborhood model |
Consequently,the forward differential discrete level set function can be updated using the following form

is the numerical approximation of level set
evolution function corresponding to the right side of evolution Eq. (29). If k represents the curvature of
evolution curve,the numerical calculation is implemented
using the second-order central difference form [8]. The
curvature expression can be then represented as


The level set evolution Eq. (29) can be updated by

As shown in Fig. 2,the algorithm procedure of the DRC method based on level set for image segmentation is summarized by the following four steps.
![]() |
| Fig. 2 Algorithm of the DRC method |
Step 1 Set initialization parameters. Equation (33)needsto define weight coefficients λ1 and λ2,which denote local region control term of inside and outside regions. Let Δt be the time step,hthe grid spacing,e the regularization parameter of Heavide function,K the Gaussian kernel function parameters,μ the length smooth term coefficient,and v the potential penalty function term coefficient.
Step 2 Set the initialized curve of level set evolution function φ. Assuming the parameter c0 is the normal amount,R1 and R2 denote the inside and outside regions of the zero level set function φ(x,y,t),respectively. Signed distance function is defined as

Step 3 Update evolution parameters. According to Eq. (33),the evolution curve referring to Eq. (29) describes the discrete form during the evolution.
Step 4 Determine the termination conditions of level set evolution curve. If the termination condition is satisfied,the image segmentation result can be achieved. Otherwise,the next iteration of the initial level set function adopts the level set function φn+1=φn,and goes to Step 3. 4 Experimental studies and discussions
The three groups of experimental images are derived from aluminum-plastic foamed mask package. There are a series of complex processes,such as stirring,dosing,sealing,and cutting,in preparation of tablets and capsules. These may incur some defects,i.e.,lacking of tablets,breakage,crack, and mixing contaminant. In order to overcome the disadvantage of traditional manual operation,machine vision technique is used to replace the human visual judgement in making the tablet packaging image segmentation. Here,the segmentation contains the following three steps. Firstly,a fixed camera is used for getting the tablet packaging image, and it is transmitted to computer. Secondly,the image processing controller is used to implement the image segmentation for the DRC. Finally,the segmentation result is matched with the previously stored template. The detection procedure will automatically remove the defective packages. Tablet packaging image requires segmentation for noise,and light intensity and movement time interval are more sensitive.
The experimental environment is given as: Matlab 2010 simulation software,Windows XP operating system,Intel 2.2 GHz CPU,and 3 GB capacity memory. In order to verify the effectiveness of DRC method,a number of different types of uneven grayscale images are selected.
The experiments compare DRC with C-V,RSF and DRLSE. The final level set function is the level set curve evolution function given by Eqs. (2),(5),(7) and (33). Initializing parameters are set to validate the three groups of experiments. The time step parameter is Δt = 0.2; the grid spacing parameter of original image layer is h = 1; regularization parameter of Heavide function is ε = 1:0, the standard deviation parameter of Gaussian kernel function is σ = 0.3. In addition,the initialized level set function is φ0(x,y) with c0 = 2 in the region Ω,and the length smooth coefficient is μ = 0.03 × 255 × 255. 4.1 The first experiment
Figure 3 shows the simulation of experiment one with a tablet for tablet packaging image,which size is 200 × 141 pixels.
![]() |
| Fig. 3 One tablet for image segmentation results a-d initial contour,e-h final contour,i-l final level set functions of the C-V,RSF,DRLSE,and DRC methods,respectively |
The experimental results are illustrated as following. (i) The initial level set contour of the C-V method is a circle,and the searching result basically segments the tablet contour. According to the final level set function,the tablet contour is clearer than the other region contour.
(ii) RSF method initializes level set contour to be a rectangle,and the method is able to search the tablet packaging contour. RSF method can divide contour,e.g,the tablet,production date and other decorative parts. However,image segmentation results are not in priority. The final level set function shows that the segmentation effect is not obvious.
(iii) DRLSE method initializes the level set contour to be a rectangle as well. The level set segmentation contour shows that the tablet contour is not segmented,and the results do not meet the requirement of the image segmentation.
(iv) The initial contour is a rectangle with the proposed DRC method,and it is high efficiency and well effect. Figures3(h) and 3(l) show that the tablet contour,production date and other decorative parts can be well segmented. The final level set function demonstrates that the image contour is prominent.
The comparisons of the measure parameters using level set evolution function are listed in Table 1.
The effect of two tablets for tablet packaging image segmentation is shown in Fig. 4,and the image size is 1939128 pixels. The C-V method does not well segment two tablets contour,and the texture region participates image segmentation together. Based on the final level set function Fig. 4(i),it cannot distinguish the image segmentation effect. The RSF method shows that the tablets can be segmented approximately,which contain the contour of two tablets and production date. The texture contour is very serious interference. By the same way,the final level set function Fig. 4(j) shows clearly the effect of texture segmentation. The DRLSE method reduces image contour gradually,without partitioning the tablets packaging image. Although the light intensity of the image leads to grayscale uneven using the DRC method,the contour of two tablets and the production date can be clearly segmented. The final level set function Fig. 4(l) demonstrates the image segmentation contour clearly. Table 2 displays the measurement parameters involving level set function.
![]() |
| Fig. 4 Two tablets for image segmentation results a-d initial contour,e-h final contour,i-l final level set function of the C-V,RSF,DRLSE, and DRC methods,respectively |
Ten tablets is employed to make tablet packaging image segmentation,and the image size is 184 × 81 pixels. The experimental result is shown in Fig. 5. The measurement parameters better verify the advantage of the DRC method (see Table 3).
![]() |
| Fig. 5 Ten tablets for image segmentation results a-d initial contour,e-h final contour,i-l final level set function of the C-V,RSF,DRLSE,and DRC methods,respectively |
According to the image segmentation results,it concludes that the RSF method is effective to tablets,but it does not deal with texture noise. The proposed DRC method has better computational efficiency and numerical accuracy than the CV and DRLSE methods. Particularly, the segmentation algorithm has better robustness to noise, and image segmentation contour is much clearer as well. 5 Conclusions
This paper proposes a novel image segmentation method DRC. Based on the level set evolution method,this method consists of three terms: the local region control term,the length smooth regularization term and potentia l penalty function regularization term. Introducing the local regional control term of image information is able to quickly segment uneven grayscale images. The length smooth regularization term is used for smoothing curves and avoiding smaller region appearance. The energy penalty term maintains an approximate SDF during the evolution. The potential penalty function is embedded into the penalty term,which is used for image segmentation in both full domains. The tablet packaging images are employed to make the verification. Comparing with other level set methods,the advantages of the DRC method are less time consuming,higher computational efficiency and more accurate in segmentation. In particular,the profile curve is not sensitive to the initial conditions,the texture segmentation and the de-noising effect is much better. The future work is to make mean shift based gradient vector flow algorithm for the tablet packaging image segmentation.
Acknowledgments The authors would like to thank the Science and Technology Commission of Shanghai Municipality (Grant No.14YF1408600),the Shanghai Municipal Commission of Economy and Informatization under Shanghai Industry University Research Collaboration (Grant No.CXY-2013-71),the Natural Science Foundation of Shandong Province (Grant No.ZR2012FM008),the Science and Technology Development Program of Shandong Province (Grant No.2013GNC11012),and the National Natural Science Foundation of China (Grant No.61100115).| 1. | Osher S, Sethian JA (1988) Fronts propagating with curvaturedependent speed: algorithms based on Hamilton-Jacobi formulations. J Comput Phy 79(1):12-49 |
| 2. | Kass M, Witkin A, Terzopoulos D (1988) Snakes: active contour models. Int J Comput Vis 1(4):321-331 |
| 3. | Xu C, Prince JL (1998) Snakes, shapes, and gradient vector flow. IEEE Trans Image Process 7(3):359-369 |
| 4. | Caselles V, Catté F, Coll T et al (1993) A geometric model for active contours in image processing. Numeri Math 66(1):1-31 |
| 5. | Malladi R, Sethian JA, Vemuri BC (1995) Shape modeling with front propagation: a level set approach. IEEE Trans Pattern Anal Mach Intell 17(2):158-175 |
| 6. | Caselles V, Kimmel R, Sapiro G (1997) Geodesic active contours. Int J Comput Vis 22(1):61-79 |
| 7. | Li C, Xu C, Gui C et al (2005) Level set evolution without reinitialization: a new variational formulation. IEEE Comput Soc Conf Comput Vis Pattern Recognit 1:430-436 |
| 8. | Chan TF, Vese LA (2001) Active contours without edges. IEEE Trans Image Process 10(2):266-277 |
| 9. | Vemuri B, Chen Y (2003) Joint image registration and segmentation. In: Geometric level set methods in imaging, vision, and graphics. Springer, Berlin, 251-269 |
| 10. | Wang X, Min H, Zou L et al (2015) A novel level set method for image segmentation by incorporating local statistical analysis and global similarity measurement. Pattern Recognit 48(1):189-204 |
| 11. | Michailovich O, Rathi Y, Tannenbaum A (2007) Image segmentation using active contours driven by the Bhattacharyya gradient flow. IEEE Trans Image Process 16(11):2787-2801 |
| 12. | Zhou W, Fei M, Li K et al (2014) Accurate image capturing control of bottle caps based on iterative learning control and Kalman filtering. Trans Inst Meas Control 36(4):465-477 |
| 13. | Zhou W, Fei M, Zhou H et al (2014) A sparse representation based fast detection method for surface defect detection of bottle caps. Neurocomputing 123(10):406-414 |
| 14. | Zhou H, Yuan Y, Lin F et al (2008) Level set image segmentation with Bayesian analysis. Neurocomputing 71(10):1994-2000 |
| 15. | Zhou H, Schaefer G, Celebi ME et al (2011) Gradient vector flow with mean shift for skin lesion segmentation. Comput Med Imaging Graph 35(2):121-127 |
| 16. | Zhou H, Li X, Schaefer G et al (2013) Mean shift based gradient vector flow for image segmentation. Comput Vis Image Underst 117(9):1004-1016 |
| 17. | Mumford D, Shah J (1989) Optimal approximations by piecewise smooth functions and associated variational problems. Commun Pure Appl Math 42(5):577-685 |
| 18. | Vese LA, Chan TF (2002) A multiphase level set framework for image segmentation using the Mumford and Shah model. Int J Comput Vis 50(3):271-293 |
| 19. | Li C, Kao CY, Gore JC et al (2008) Minimization of regionscalable fitting energy for image segmentation. IEEE Trans Image Process 17(10):1940-1949 |
| 20. | Li C, Xu C, Gui C et al (2010) Distance regularized level set evolution and its application to image segmentation. IEEE Trans Image Process 19(12):3243-3254 |
| 21. | Vovk U, Pernus F, Likar B (2007) A review of methods for correction of intensity inhomogeneity in MRI. IEEE Trans Med Imaging 26(3):405-421 |
2015, Vol. 3










