Sharp Operator Based Edge Detection

Ahmad et al. in their paper [1] for the first time proposed to apply sharp function for classification of images. In continuation of their work, in this paper we investigate the use of sharp function as an edge detector through well known diffusion models. Further, we discuss the formulation of weak solution of nonlinear diffusion equation and prove uniqueness of weak solution of nonlinear problem. The anisotropic generalization of sharp operator based diffusion has also been implemented and tested on various types of images.


Introduction
Nonlinear diffusion filtering is a well-established tool for image denoising and simplification.Starting with the pioneering work by Perona and Malik [2] in 1990, it has attracted the attention of many researchers working in the domain of mathematics and image processing (see [3]- [9], for example).This filter class makes it possible to smooth images while the edges as main source of information are preserved.This leads to an adaptive simplification that can be useful for image understanding and interpretation.Among the most effective extensions of the basic method are the anisotropic filters [8] that offer the possibility to remove noise and enhance flowlike structures.
The sharp function, on the other hand, is a well-known functional analytic concept to measure the oscillatory behaviour of functions.It goes back to the maximal function which was introduced by Hardy and Littlewood [10] in 1930 to solve a problem in the theory of functions of complex variables.Based on this idea, John and Nirenberg [11] introduced the concept of bounded mean oscillation (BMO) functions.In 1972, Fefferman and Stein [12] introduced the sharp function (denoted by # f ) and found that a function f BMO ∈ was equivalent with # f L ∞ ∈ .The theory of Hardy Spaces received impetus from the work of Fefferman and Stein.The idea of applying the sharp operator to measure the oscillation and classification of images was first proposed by Ahmad and Siddiqi [1] where it was used to find a suitable compression technique.
In this paper, we propose an alternative way to steer nonlinear diffusion filters via the sharp operator without using derivatives to measure edges.We show that the results of these diffusion filters are comparable to classical versions while the underlying sharp operator has a rich theoretical background.Motivated by the available diffusion processes in image processing, we propose an extension of the sharp operator for measuring anisotropic structures.To use this to steer anisotropic diffusion processes, we show how a fast variant of it can be implemented and used in practice.
The paper is organized as follows.Section 2 gives a review of classical nonlinear diffusion filters for image processing.In Section 3, we shortly describe the aspects of the theory for the maximal function, bounded mean oscillation functions, and the sharp function, which are necessary for this paper.The main idea of this paper, namely, the use of the sharp operator in nonlinear diffusion filters and its generalization to the anisotropic setting, is presented in Section 4. To evaluate the methods in practice, Section 6 describes some computational experiments.A summary and an outlook conclude the paper in Section 7.

Classical Nonlinear Diffusion Filters
Diffusion is interesting as image processing tool since it is a physical process that equilibrates concentration without creating or destroying mass.The idea behind the use of the diffusion equation in image processing arose from the use of Gaussian filter in multiscale image analysis.It can be founded by a system of several axioms like linearity, translational and rotational invariance, and average grey value preservation, that marks the beginning of the scale-space concept [13]- [16].Convolving an image with a Gaussian filter with standard deviation σ , is equivalent to the solution of the linear homogeneous diffusion equation where the given image f is used as initial condition ( ) ,0 u f ⋅ = .We assume homogeneous Neumann boundary conditions 0 n u ∂ = , where n denotes the outer normal of the boundary of image domain Ω .The stopping time t has to be chosen as 2 2 t σ = for equivalence.Isotropic nonlinear diffusion.The major drawback of linear diffusion is the delocalisation and blurring of image edges.To circumvent this problem, Perona and Malik [2] introduced the nonlinear diffusion equation The diffusivity g is chosen as a decreasing function of the edge detector u ∇ .Examples for diffusivity functions can be found in [2] [17]- [19].Catté et al. [3] introduced a regularisation of the gradient of u to make the process well-posed.They use the equation with ( ) A review of this filter class can be found in [20].

Anisotropic nonlinear diffusion.
Nonlinear isotropic diffusion often shows problems to remove noise close to image edges.It can be helpful to use an anisotropic diffusion filter ( ) ( ) in such cases as proposed by Weickert [8].The scalar diffusivity function g has been replaced by a matrix ( ) D u here.Depending on the choice of D this allows for smoothing along edges while smoothing across edges is avoided: the so-called edge-enhancing diffusion (EED).Another classical choice of D, depending on the structure tensor [21] [22], makes enhancement of coherent flow-like structures possible.This process is known as coherence-enhancing diffusion (CED).Details on these filters and their numerical implementation can be found in [8] [23].

The Sharp Operator
In this section, we give a short introduction to the sharp operator and its background.There is a rich theory behind it, and we point out the main results connected to it.The Hardy-Littlewood maximal function was developed to solve a problem in the theory of functions of complex variable.The analogue for integrals, which is required for the function theoretic applications, is derived in Hardy and Littlewood [10]. Definition where the supremum ranges over all finite cubes Q in n  and ( ) Now we state a Hardy-Littlewood maximal theorem.Theorem 1.For each function ( ) Proof.See ( [24], p. 142).The space BMO, i.e. bounded mean oscillation of functions is introduced by John and Nirenberg [11].
where the supremum ranges over all finite cubes Q in n  and ( ) ( ) is the mean value of the function f on the cube Q.
Fefferman and Stein [12] introduced the "sharp function" # f that mediates between p BMO and p L spaces.It is defined as follows.
Definition 3. Let f be a locally integrable function on n  .The sharp function After calculation it comes out to be 1 ln 2.

BMO x ≤
So, the un-bounded function ln x is in ( ) It is important to note that it does not matter in which p L norm we measure the oscillation.This is clear from the following corollary.
In view of the above corollary the spaces ( ) are equivalent for all p, 1 p ≤ < ∞ .

Nonlinear Diffusion with the Sharp Operator
It is clear from the definition of the sharp function that for a pixel z, where f has almost uniform grey level region in an image,

( )
# f z will be of very small value.However, for the contrast region we get large values for ( ) # f z .The idea is to accrue more diffusion in the regions of lower oscillation whereas to preserve the regions of higher oscillation.
Many isotropic nonlinear diffusivity models in physics and mechanics are governed by the nonlinear parabolic equation depends on the gradient of the function ( ) , u x t .In the diffusivity model given in [2], the choice of the diffusivity coefficient ( ) g η is restricted to a subclass of the smooth monotonically decreasing functions with ( ) Further analysis of the nonlinear diffusivity model for the 1D diffusion equation ( ) ( ) has been developed in [5].In particular, rewriting this equation in the form where ( ) ( ) ( ) 8) is defined to be forward parabolic, when ( ) 0 c η > , and backward parabolic one, when ( ) 0 c η < .The assumption ( ) 0 c η > in the Perona-Malik diffusivity 1D model, leads to the following condition with respect to the diffusion coefficient ( ) First of all let us prove that if only the conditions (i)-(ii) hold, then the nonlinear diffusion operator ( ) ( ) is a monotone potential.For this, we define the nonlinear operator , and hence the above defined functional : is the potential of the nonlinear diffusion operator A. Further calculating the second Gateaux derivative ; , 2 d d , , , , and then substituting here h v = , we conclude that the second Gateaux derivative of the potential is positive, i.e., ( ) ( ) ( ) . This means that the potential ( ) P u of the nonlinear diffusion operator is a convex functional which implies the strong monotonicity of the nonlinear operator [25] ( ) ( ) Thus for the strong monotonicity of the nonlinear diffusion Equation ( 8), and hence solvability of an initial boundary value problem related to the nonlinear diffusion equation ( ) ( ) , only the conditions (i)-(ii) are sufficient.However, these conditions are not sufficient for solvability of the corresponding problem related to the 2D diffusivity model.Specifically, one needs to impose the monotonicity condition: ( ) 0 g η ≤ , as the theorem shows below.This condition and the above two conditions compose the set of admissible coefficients  satisfying the following conditions: An analysis of the steady state diffusivity model governed by the nonlinear elliptic equation  has been given in Hasanov et al. [26].Based on the results given here let us analyze now the 2D diffusivity (Perona-Malik) model Γ of the boundary ∂Ω , passes from a region of high concentration to one of low concentration.
We will use weak solution theory for nonlinear PDE.For this, let us introduce the following well-known notations [25].Let ( ) ( ) H Ω are the Sobolev spaces with the norms ( ) ( ) Evidently, the norms 0 u ∇ and 1 u are equivalent due to the homogeneous Dirichlet condition in (10).
Identifying the Hilbert space H with its dual we have the triple * V H V with dense continuous compact embedding.To define the weak solution of the nonlinear problem (10), we also need the following spaces ( ) , where the time derivative needs to be understood in sense of distributions.Evidently, W is the separable reflexive Banach space with the norm defined to be as ) ( ) ( ) : ; It is known that the operator ( ) , is a maximal monotone operator (see, [25], Proposition 32.10, p. 855).
For a given coefficient ( ) g η ∈  we define the nonlinear operator * : A   by the nonlinear functional and the linear functional Theorem 2. Let  be the set of admissible coefficients satisfying conditions (9) and ( ) Then the nonlinear problem (8) has a unique solution u ∈  defined by (13).
Proof.Let us introduce the functional ( ) ( ) and calculate the first Gateaux derivative.We have ; d d , , .(12) shows.Thus the above defined functional : is the potential of the nonlinear diffusion operator A. Calculating the second Gateaux derivative ( ) ; , P u v h ′′ and then substituting here h v = we obtain: . Since : , , .
Substituting this in ( 14) and using the condition (ii) of ( 9), we conclude Thus the potential ( ) P u of the nonlinear diffusion operator A is a convex functional which implies the strong monotonicity of this operator.Hence L A + is also the strong monotone the operator: This implies the uniqueness of the weak solution of the nonlinear problem (13).Existence of the solution follows from the results given in [27] [28].
Remark 1.The assertion of the above theorem holds also for the case when 1 Γ =∅ .Since structures in images often have the highly anisotropic features, for example, lines or corners, we propose some generalization of the presented method to the anisotropic setting.We start with an anisotropic generalization of the sharp operator.

Anisotropic Sharp Operator
So far we have only used isotropic nonlinear diffusion filters.In the definition (7) of the sharp operator, all integration domains Q are cubes.Therefore, the sharp function only provides information about local variations of the function, but not about the direction of these local variations.In order to allow for a quantitative description of local variations in a certain direction, we propose to use non-symmetric sets instead of cubes.With this concept, an anisotropic extension of the sharp function can be defined as follows: The most important in this definition is the set ( ) We propose to use ellipses to measure the variation in several directions.So, one could alternatively define 1 : sup sup d .
In this definition, we take the supremum over all angles ϕ .Therefore, with this measure one is not only be able to find out the direction of the variation, but can also find the largest variation in any existing direction.For our later experiments, we start with the model (15) since we want to find the angle of the largest variation in an image.

Modifications of This Basic Model
For practical calculations, depending on the number of directions ϕ used, this measure is computationally very expensive.Thus we propose two simplifications in order to keep the motivation of the sharp operator while obtaining a fast measure of local variations.
Analogously to definition (7), the value ( ) Q f ϕ is defined as the local mean value of f inside the integration domain ( ) Instead of taking this mean value as function of ( ) Q ϕ , we use a pre-smoothed version of the function f: This changes the definition (15) to ( ) We notice that in this definition, the difference in the integral is a difference between two functions.This offers the possibility to calculate the second function ( ) Q f ϕ in one step for the whole domain instead of calculating mean values for each set ( ) Q ϕ independently.We notice that with this change, we do not use the same set ( ) Q ϕ for both integrations.
The second step is now to write this as a convolution.Instead of an elliptical set ( ) Q ϕ , we prefer to use an anisotropic Gaussian kernel here and write: And lastly we replace also the outer integral with a convolution with an anisotropic Gaussian, ( ) ( ) 1 #,fast aniso , : .
This measure can be evaluated in a very efficient way using the methods of Geusebroek et al. [29] for fast anisotropic Gaussian convolution.This makes it possible to incorporate it in an image processing tool as described in the following section.

Anisotropic Diffusion with the Fast Sharp Operator
Now we want to use the anisotropic variant of the sharp operator to steer an anisotropic diffusion process ( ) ( ) as it has been proposed by Weickert [8].In order to use this concepts for anisotropic diffusion in this formulation, we have to define a diffusion tensor based on the anisotropic sharp operator to obtain a process of the form The eigenvalues are defined analogously as for edge-enhancing diffusion: ( ) Having these definitions for the diffusion tensor at hand, we can use classical discretisation for anisotropic diffusion filters as described in [8].

Computational Experiments
To compare the sharp operator based diffusion approach with classical derivative based methods, we show filtering examples in Figure 1.
It is clear that the parameters of the anisotropic diffusion process have to be specified in practical situations.The time t is an inherent parameter in each diffusion process that controls the amount of simplification applied to the data.The variance of evolving image decreases monotonically to zero in time.The contrast parameter λ allows to steer the edge preservation properties by distinguishing between important edges that should be preserved and smaller edges that are removed.For our discrete sharp operator, there are number of directions as an artificial parameter.


. Moreover, it is well-known that * V    , the embedding ( ) 0, ; W C T H i s continuous and the embedding   is compact.For the convenience we denote the duality in the Banach space  (with its dual *  ) and the norm as follows: ⋅  and ⋅  , accordingly.Now we define the operators, . Within these definitions the weak solution of the nonlinear problem (10) can be defined as follows: find a function u ∈  such that We define the diffusion tensor as follows: Let a point x ∈ Ω in the image domain be given, then we search for the direction ( ) value of the anisotropic sharp operator is maximal.The eigenvectors of the diffusion tensor are then the unit vectors pointing in this direction and the orthogonal one, i.e., sharp value in the point x.

Figure 1 .
Figure 1.Comparison between classical and sharp operator based anisotropic diffusion.First row: Noisy input images; Second row: Classical edge-enhancing diffusion (EED); Third row: Sharp operator based diffusion.