Baptiste Magnier
email: baptiste.magnier@mines-ales.fr

An Objective Evaluation of Edge Detection Methods based on Oriented Half Kernels

Keywords: Edge detection, half kernels, gradient direction, evaluation

Easy to use, oriented half kernels are reliable in image analysis. These thin filters, rotated in all the desired directions are useful to detect edges, or extract precisely their orientations, even concerning highly noisy images. Usually, the filtering process corresponds to convolutions with Gaussians and their derivatives. Other filters exist and can be implemented in order to build half kernels. However, functions used for the smoothing and derivative parts have not been studied in depth. The goal of this paper is to evaluate different types of half filters as a function of the noise level. The studied kernels have the same spatial support, enabling easier comparisons. To address the robustness of the studied filters against noise, the image quality is gradually worsened. Then, their performances are compared through objective evaluations of both segmentation and gradient direction.

Introduction

Edge detection is a fundamental process and remains widely used in image analysis and computer vision applications. Moreover, gradient and edge orientations are essential information for the interpretation and exploitation of digital images [START_REF] Ziou | Edge detection techniques: an overview[END_REF][START_REF] Papari | Edge and line oriented contour detection: State of the art[END_REF]. Classical methods use first-order fixed operators [START_REF] Prewitt | Object enhancement and extraction[END_REF][START_REF] Canny | A computational approach to edge detection[END_REF][START_REF] Shen | An optimal linear operator for edge detection[END_REF][START_REF] Bourennane | Generalization of Canny-Deriche filter for detection of noisy exponential edge[END_REF] or the structure tensor [START_REF] Köthe | Reliable low-level image analysis[END_REF] to detect gradient and its orientation. Gradient-based edge and orientation estimators are frequently utilized. Among these operators, DoB (Difference of Boxes) filters [START_REF] Prewitt | Object enhancement and extraction[END_REF] often remain implemented in many applications as in robotics. DoB simply computes the difference between two mean filters of same sizes on both sides of the considered pixel (usually represented by a list of 1 or -1). However, DoB filters are sensitive to noise and orientations not reliable. The robustness of the detection is generally improved by smoothing the (a)Blurred corner (b) DoB [START_REF] Prewitt | Object enhancement and extraction[END_REF] (c) Gaussian [START_REF] Canny | A computational approach to edge detection[END_REF] (d) AGK [START_REF] Geusebroek | Fast anisotropic gauss filtering[END_REF] (e) Half kernel Fig. 1. Edge extraction around a blurred corner using different filters. image by a low pass filter followed by a gradient detection using vertical and horizontal masks of type [-1 0 1]. Edge detection methods differ in the types of smoothing filters that are applied [START_REF] Canny | A computational approach to edge detection[END_REF][START_REF] Shen | An optimal linear operator for edge detection[END_REF][START_REF] Deriche | Using Canny's criteria to derive a recursively implemented optimal edge detector[END_REF][START_REF] Bourennane | Generalization of Canny-Deriche filter for detection of noisy exponential edge[END_REF], as equations presented in Tab.3. The computations of the gradient magnitude |∇I| and its orientation η are presented in Tab.1(left). Among all the edge detectors, box [START_REF] Prewitt | Object enhancement and extraction[END_REF] and exponential [START_REF] Shen | An optimal linear operator for edge detection[END_REF][START_REF] Bourennane | Generalization of Canny-Deriche filter for detection of noisy exponential edge[END_REF] filters do not delocalize contour points [START_REF] Laligant | Regularization preserving localization of close edges[END_REF], whereas they are sensitive to noise and blur while contours near a corner are rounded by Gaussian and Deriche filters (cf. Fig. 2(a)). In the orientation and edge detection domains, steerable feature detectors represent popular and efficient tools [START_REF] Freeman | The design and use of steerable filters[END_REF][START_REF] Jacob | Design of steerable filters for feature detection using Canny-like criteria[END_REF][START_REF] Geusebroek | Fast anisotropic gauss filtering[END_REF]. This concept provides valuable orientations and edges for many image processing applications, especially when the filter is elongated (cf. Fig. 2(b)). The concept was generalized in [START_REF] Perona | Steerable-scalable kernels for edge detection and junction analysis[END_REF] by decomposing a given filter kernel optimally in a set of basic filters approximating an Anisotropic Gaussian Kernel (AGK). Mathematically, Tab.1(middle column) presents the orientation and the gradient magnitude computation using this type of filter, corresponding to the maximum energy in the maximal response direction. The AGK possesses a common shortcoming, as a matter of fact, only one π-periodic orientation is extracted efficiently [START_REF] Perona | Steerable-scalable kernels for edge detection and junction analysis[END_REF], so the impossibility of these filters to estimate in a relevant way several coexisting orientations at the same pixel, as illustrated in Fig. 1(d). Otherwise, multi steerable filters are designed and adjusted to a pattern of interest or a region to determine more precisely the directions of edges with 2π-periodic templates [START_REF] Simoncelli | Steerable wedge filters for local orientation analysis[END_REF][START_REF] Mühlich | Design and implementation of multisteerable matched filters[END_REF][START_REF] Magnier | Texture removal by pixel classification using a rotating filter[END_REF]. On the other hand, the asymmetric filter developed in [START_REF] Michelet | Estimating local multiple orientations[END_REF] estimates the homogeneity in multiple local directions. This filter consists in a network of several parallel lines in which a homogeneity is computed and enables an estimation of edge directions modulo 2π. Lastly, wedge [START_REF] Simoncelli | Steerable wedge filters for local orientation analysis[END_REF][START_REF] Mühlich | Design and implementation of multisteerable matched filters[END_REF] or asymmetric oriented filters [START_REF] Magnier | Fast anisotropic edge detection using gamma correction in color images[END_REF][START_REF] Michelet | Estimating local multiple orientations[END_REF] sound better suited to multiple edge directions detection or modeling a template. The next section details the edge detection process using 2π-periodic filters. 2 Edge detection using Half Oriented Kernels

Advantages of half oriented kernels

Edge detection techniques using elongated kernels are efficient to detect large linear structures correctly [START_REF] Jacob | Design of steerable filters for feature detection using Canny-like criteria[END_REF][START_REF] Perona | Steerable-scalable kernels for edge detection and junction analysis[END_REF][START_REF] Geusebroek | Fast anisotropic gauss filtering[END_REF][START_REF] Püspöki | Transforms and operators for directional bioimage analysis: a survey[END_REF]. The robustness against noise depends strongly on the smoothing parameters of the filter, i.e., the parameter of the filter elongation. If the filter length increases, the detection is less sensitive to noise, but small structures are considered as noise and their edges are not extracted.

Consequently, the accuracy of the detected edge points decreases strongly at corner points and for non-straight object contour parts, as illustrated in Fig. 1(d).

To bypass this undesirable effect, an anisotropic edge detection method is developed in [START_REF] Montesinos | A new perceptual edge detector in color images[END_REF] and [START_REF] Magnier | Fast anisotropic edge detection using gamma correction in color images[END_REF]. Indeed, the proposed technique is able to detect crossing edges and corners due to two elongated and oriented filters in two different directions. The simplest solution is to consider paths crossing each pixel in several directions. The idea proposed in [START_REF] Montesinos | A new perceptual edge detector in color images[END_REF] and [START_REF] Magnier | Fast anisotropic edge detection using gamma correction in color images[END_REF] is to "cut" the elongated kernel using a Heaviside function into two parts, i.e. two directions (see Fig. 2(c)). Then, the half kernel (HK) is rotated in several directions from 0 to 2π (bilinear rotation) and computes a derivative information at each desired angle (illustrated in Fig. 3, for each π/36 radian angle). Thus, in a contour direction, a half smoothing is performed, whereas in the perpendicular direction, a derivative information is computed, as illustrated in Fig. 3(a),(d)-(g). In order to better understand this technique to extract edge, the filter support of a HK on a straight contour is equivalent to 1/2 on both sides of the edge, as for elongated and circular or box filters, illustrated in Fig. 2. On the contrary, for a corner point with a π/2 radian angle, the support of the half filter remains 1/2 on both sides of the edge, whereas it is around 1/4 and 3/4 concerning other filter supports. Such a manner to extract edges enables to compute a gradient of blurred contours, even corners ] Shen filter as illustrated in Fig. 1(e), contrary to other filtering methods. Eventually, as detailed in Tab.1(right), the gradient corresponds to the maximum value minus the minimum value of the convolution of the oriented half filter with the image. These two directions represent to the two main orientations of a contour and the gradient direction η corresponds to the bisector between these two directions (cf. Fig. 2(c)). These orientations are useful and efficient for image restoration via PDE [START_REF] Magnier | Evolution of image regularization with PDEs toward a new anisotropic smoothing based on half kernels[END_REF], corner detection [3] or image descriptor [START_REF] Venkatrayappa | A Novel Image Descriptor Based on Anisotropic Filtering[END_REF].

S1(x) =    -e -α•|x| , if x < 0 0, if x = 0 e -α•|x| , if x > 0 Bourenanne filter B1(x) = -sgn(x) • k • sin(w • x) • e -α•|x| + cos(w • x) • e -α•|x| -e -s•|x| Deriche filter D1(x) = x • e -α•|x| Gaussian filter G1(x) = x • e x 2 2•σ 2

Types of implemented filters

Edge detection using oriented half kernels is reliable, robust against noise, and, outperforms classical edge detectors [START_REF] Magnier | Fast anisotropic edge detection using gamma correction in color images[END_REF][START_REF] Magnier | Evolution of image regularization with PDEs toward a new anisotropic smoothing based on half kernels[END_REF]. As pointed in [START_REF] Montesinos | A new perceptual edge detector in color images[END_REF] and illustrated in Figs.5(l)-(q), the HK can be implemented using different equations:

• a derivative part of the filter, represented by an equation in Tab.2,

• a half smoothing part, which corresponds to an equation in Tab.3.

In order to create an elongated filter, the support of the half smoothing part must be higher than the derivative support. The parameters of the different filter equations can be chosen in Tab.5 for the half smoothing part, where S represents the length of the support where 98% of the filtered information is computed, i.e., the width of the HK (cf. ]

S ∈ N * Shen filter S(x) = e -α•|x| α ∈ R * + Bourenanne filter B(x) = e -α•|x| α 2 + w 2 • [-(k • α + w) • sin(w • |x|) + (α -k • w) • cos(w • x) • e -α•|x| - e -s•|x| s s ∈ R * + , w = 0.01, k=-0.564, α = 0.215 • s Deriche filter D(x) = (α • |x| + 1) • e -α•|x| α ∈ R * + Gaussian filter G(x) = e x 2 2•σ 2 σ ∈ R * + Table 3
. Different low pass filters compared in this study.

half DoB, see first rows in Tab.2 and Tab.3. Thus, S and D numbers, indicate directly the size of the half DoB, which is rotated from 0 to 2π. It is important to note that the parameters of the half smoothing parts in Tab.5 correspond to parameters representing a pass bas filter centered at 0, and only the causal part is preserved here, so S corresponds to a smoothing support size of a half filter. As a result, the derivative part computes the oriented gradient information, whereas the half smoothing part enables a smooth along edges, preserving them and their directions. Finally, on the one hand, the length of the HK must be sufficiently large to be robust against noise. On the other hand, the width of the HK must be thin to ensure precise edge detection and orientations. As an example in Fig. 3(left), when S and D are small, all the signals are noisy, whereas when S increases, the edge directions highlight incrementally, even though Shen and Bourennane HK remain always sensitive to noise. The Matlab code is available on the MathWorks website: https://fr.mathworks.com/ matlabcentral/fileexchange/66853-edge-detection-methods-based-on-oriented-half-kernels?s_tid=srchtitle.

Evaluation and Results

The aim of the experiments is to obtain the best edge map in a supervised way. In the experiments, 7 edge detection methods based on filtering gradient computation are compared: isotropic Gaussian filter [START_REF] Canny | A computational approach to edge detection[END_REF], AGK [START_REF] Geusebroek | Fast anisotropic gauss filtering[END_REF] and HK formed by the DoB, Shen [START_REF] Shen | An optimal linear operator for edge detection[END_REF], Bourennane [START_REF] Bourennane | Generalization of Canny-Deriche filter for detection of noisy exponential edge[END_REF], Deriche [START_REF] Deriche | Using Canny's criteria to derive a recursively implemented optimal edge detector[END_REF], and Gaussian filters [START_REF] Montesinos | A new perceptual edge detector in color images[END_REF][START_REF] Magnier | Fast anisotropic edge detection using gamma correction in color images[END_REF]. These filters possess the same spatial support (AGK has two times the spacial support of the HK, Fig. 5(m)). Filters must be thin and elongated in order to compute accurate contours and associated directions (cf. Fig. 3(d)-(g)). Thus, the derivative parameter concerning isotropic Gaussian filter [START_REF] Canny | A computational approach to edge detection[END_REF] remains the same than others (D=7), see Fig. 5(l)-(q). HK and AGK are rotated each π/72 radian angles. Finally, after a non-maximum suppression [START_REF] Ziou | Edge detection techniques: an overview[END_REF], an objective assessment is performed by varying hysteresis thresholds on normalized thin edges until the Relative Distance Error (RDE) [START_REF] Dubuisson | A modified Hausdorff distance for object matching[END_REF] evaluation obtains the minimum score (i.e., at least 2 pixels per chain), the gradient evaluation as follows:

E(CD c , η) = 1 |CD c | • p∈C Dc d k ∈W 1 - abs(π/2 -abs( -→ ηp --→ η d k )) π/2 /c k ,
where d k represents a contour pixel belonging to W, a 3×3 window centered on p, -→ η d k the gradient orientation of d k and c k the number of contour pixels in W, minus the central pixel. This evaluation linearly ranges from 0 for identical angles of -→ η p and -→ η d k to 1 for angles that differs (Fig. 4). Note that angles of -→ η d k and -→ η p belong to [0; π[ and when one direction approximates 0 and the other direction π, the evaluation of these two directions remains close to 0 (see Fig. 4(c)). The presented segmentations in Fig. 5 correspond to the original image for a PSNR=14dB. Clearly, all the HK obtains better segmentations than the isotropic Gaussian. The HK using Gaussian outperforms six other compared filters, in terms of both RDE evaluation and visualization. AGK obtains good scores, but the contour image presents undesirable straight contours disturbing its interpretation. HK using DoB produces many false positive points, especially close to the true edges; it performs in presence of salt&pepper noise, but not concerning white Gaussian noise. Otherwise, HK using Shen and Bourennane filters obtain close the same results, however, they remain too sensitive to noise, and, especially, many edges are missing. HK with Deriche filter is more robust to noise but edges are still missing. Concerning η evaluation,E(CD c ,η) indicates that HK using Gaussian remains more reliable than other HK. This information means that HK using Gaussian is less disturbed by noise than other kernels. The gradient evaluation of AGK is close to 0 because almost all the edges obtained are straight; consequently, the gradient angle remains close the same for all the contour chain.

Conclusion

Oriented half kernels (HK) represent thin filters enable to describe the image information all around a considered pixel. As they are robust against noise and their edge directions are accurate, HK are utilized in the context of many image processing problems [START_REF] Magnier | Evolution of image regularization with PDEs toward a new anisotropic smoothing based on half kernels[END_REF]3,[START_REF] Venkatrayappa | A Novel Image Descriptor Based on Anisotropic Filtering[END_REF]. This study presents different manners to build HK devoted to edge detection in digital images. Five HK have been objectively compared and HK using Gaussian remains the most reliable. Especifically, this HK and the anisotropic Gaussian kernel obtain similar evaluation results kernel but the obtained edges are more usable with HK. For this purpose, we plan in a future study to implement multiscale and subpixel half Gaussian kernels.

2 .

 2 Circular support (b) Elongated support (AGK) (c) Half kernel (HK) support Fig. Representation of filter supports concerning edges and corners.

FirstFig. 3 .

 3 Fig. 3. Decomposition of half kernel (HK) in one dimension. Normalized signals in (e)-(g) represent the filter response (counter-clockwise rotation) of the centered pixel in (d), with D and S the derivative and smoothing parameters (cf. Tab.4 and 5).

1 (

 1 D-1)/2 times, see row 1 of Tab.4

1 S

 1 Fig 3(c)). As for the derivative part, the parameters are available in Tab.4, where D represents the length of the support where 98% of the filtered information is computed (i.e., width of the HK, cf. Fig 3(b)).As an example, a half filter using Bourennane equation, of length S=46 pixels and D=11 pixels, the parameter corresponds to s=3.22 for the smoothing part and s=0.33 for the derivative part. The half filter can be generated using a times, see row 1 of Tab.5

  where D c represents the desired contour map, G t the ground truth edge image (Fig.5(b)), | • | the number of contour points of a set, and, d A (p) is the minimal Euclidian distance between a pixel p and a set A [7,1]. These scores are recorded and plotted as a function of the noise level in the original image, as presented in Fig.5(j). Hence, a plotted curve increases monotonously with the noise level (Gaussian noise). The second evaluation measure concerns the gradient angle, η (cf. Tab.1). Once D c is created, considering C Dc the set of contour chains in D c

5 Fig. 4 .

 54 Fig. 4. Illustration of ηp and η d k directions, in a 3×3 window, where each white square represents a contour pixel of Dc, whereas gray squares correspond to non-edge pixels. Example of angular single error computation e = 1 -abs(π/2 -abs(ηp -η d k ))/π/2.

5 .

 5 E(CD c , η) HK, D=7 and S=31 Fig. Edge detection corresponding of the minimum score of the RDE measure.

Table 1 .

 1 Gradient magnitude and orientation computation for a scalar image I where I

θ represents the image derivative at the θ orientation (in radians).

Table 2 .

 2 Different derivative filters. Parameters are available in Tab.3.

Table 4 .

 4 Parameters of the filters in function of their support size, i.e., the number of pixels under the range of the filter. These parameters correspond to the derivative part. The first row is tied to the range of the derivative of the DoB filter.

	[2]:

Table 5 .

 5 Parameters of the half filters in function of their support size. These parameters are used for the length of the 2D filters, i.e., smoothing part. The first row is tied to the range of the mean filter used in the DoB filter, i.e., number of pixels S.

	RDE (Gt, Dc) =	1 |Dc|	•	p∈Dc	d 2 G t (p) +	1 |Gt|	•	p∈G t	d 2 Dc (p),


Baptiste Magnier
email: baptiste.magnier@mines-ales.frvincent.noblet

Vincent Noblet

Adrien Voisin

Dylan Legouestre
email: dylan.legouestre@mines-ales.org

Derivative Half Gaussian Kernels and Shock Filter

Keywords: Half Gaussian Kernels, Shock Filter, PDE

published or not. The documents may come   L'archive ouverte pluridisciplinaire

From Heat Equation to Anisotropic Diffusion

Since 1960, digital images may simply be deblurred by combining the difference between an original image I 0 and ∆I: a blurred version of this same image. Usually, ∆I corresponds to a blur process equivalent to the heat equation or a convolution of I 0 with an isotropic Gaussian. This original theory proposed by Gabor is proportional to using the Laplacian operator [START_REF] Guichard | A review of PDE models in image processing and image analysis[END_REF]. Thus, a simplest manner to remove blur in an image remains the equation:

∂I ∂t = I 0 -α • ∆I, (1)
where t represents the time or the observation scale and α < 1 is a little scalar to control the deblurring. This process is equivalent to the inverse heat equation. However, this technique is not stable because the procedure blows up after several iterations and generates an unusable image [START_REF] Guichard | A review of PDE models in image processing and image analysis[END_REF]. To improve eq. 1, rather than applying a global operator on all the image, the main idea is to iterate local operator at level of each pixel. Nonlinear Partial Differential Equations (PDEs) may achieve this task [START_REF] Guichard | A review of PDE models in image processing and image analysis[END_REF][START_REF] Kornprobst | Mathematical problems in image processing: partial differential equations and the calculus of variations[END_REF], practicing anisotropic diffusions of pixel information in the image. Indeed, PDEs belong to one of the most important part of mathematical analysis and are closely related to the physical world. In this context, images are considered as evolving functions of time and a regularized image can be seen as a version of the original image at a special scale.

On Existing Shock Filters

The main PDEs for image deblurring are presented in this section. In order to regularize images by controlling the diffusion, the pioneer work of Perona and Malik on anisotropic diffusion has been one of the most influential paper in the area [START_REF] Perona | Scale-space and edge detection using anisotropic diffusion[END_REF]. The proposed model is described by the following equation:

∂I ∂t (x, y, t) = div (g (|∇I|) • |∇I|) , (2)
where |∇I| represents the modulus of the gradient with mask of type [-1 1] and g a decreasing function satisfying g(0) = 1 and g(+∞) = 0; this function may be:

g (|∇I|) = e -( |∇I| K ) 2 , (3)
with K ∈ R + * a constant that can be assimilated to a gradient threshold or a diffusion barrier, slowing down diffusion near edges, where |∇I| is large. Moreover, by developing eq. 2, it is well known that the diffusion moves backward when |∇I|>K, creating time-reverse equation (deblurring effect) called a shock filter.

Original Shock Filter: In the PDE framework, the seminal contribution [START_REF] Osher | Feature-oriented image enhancement using shock filters[END_REF] is equivalent to eq. 1, the 2D formulation of the original shock filter is:

∂I ∂t = -sign(∆I) • |∇I|. (4)
This PDE produces a dilation/erosion for each pixel, creating a high sensitivity to noise pixels, so a number of improvements have been proposed.

Shock Filter involving Gaussian:

In order to be more robust to noise, the Gaussian function G σ may be convolved with I ηη , the second directional derivative of the image in the gradient direction, where σ represents the standard deviation of the Gaussian. Coupling diffusion (I ξξ term [START_REF] Guichard | A review of PDE models in image processing and image analysis[END_REF][START_REF] Kornprobst | Mathematical problems in image processing: partial differential equations and the calculus of variations[END_REF][START_REF] Tschumperlé | Diffusion PDE's on vector-valued images: local approach and geometric viewpoint[END_REF][START_REF] Magnier | Evolution of image regularization with PDEs toward a new anisotropic smoothing based on half kernels[END_REF]) and shock filter, Alvarez and Mazorra (AM) in [START_REF] Alvarez | Signal and image restoration using shock filters and anisotropic diffusion[END_REF] proposed the following equation:

∂I ∂t = C ξ • I ξξ -sign(G σ * I ηη ) • |∇I|, (5)
where |∇I| is the modulus of the gradient with a 3×3 mask (as Sobel masks), C ξ denotes a control function of the diffusivity, as in eq. 3, I ξξ denotes the second derivative in the orthogonal direction of η, i.e., the edge direction. It corresponds to a pure diffusion in the contour directions, called the curvature equation. Some evolutions of this approach have been proposed, as in [START_REF] Kornprobst | Image coupling, restoration and enhancement via PDE's[END_REF], where an isotropic diffusion (∆I) is applied concerning small gradients. Fu et al. [START_REF] Fu | Region-based shock-diffusion equation for adaptive image enhancement[END_REF] proposed a PDE technique that weights the diffusion and shock terms in accordance with threshold values of the gradient magnitude:

   ∂I ∂t = c 1 • I ξξ -sign(G σ * I ηη ) • |∇I|, if |∇I| > T 1 ∂I ∂t = c 1 • I ξξ -c 2 • sign(G σ * I ηη ) • |∇I|, if T 1 > |∇I| > T 2 ∂I ∂t = ∆I = I ξξ + I ηη elsewhere, (6)
with c 1 =

1 1+ζ1•I 2 ξξ , (ζ 1 ∈ R + ), and c 2 = |th(ζ 2 • I ηη )|, (ζ 2 ∈ R + ).
The authors divided the image into three-type regions by its smoothed gradient magnitude. For high gradients (generally boundaries), a shock-type backward diffusion is performed in the gradient direction for the deblurring. For medium gradients (such as textures and details), a soft shock-type backward diffusion is performed, as eq. 5. As far as small gradients are concerned(such as inside different areas or flat regions), an isotropic diffusion is applied (heat equation).

On the other hand, Bettahar [START_REF] Bettahar | Anisotropic color image denoising and sharpening[END_REF] proposed a combination of nonlinear reactioncurvature diffusion and shock filter. The gradient modulus of f (s) = f 1 1+s 2 /k applied on the gradient magnitude |∇(f (|∇I σ |))| favors or inhibits the shock filter in accordance with the gradient magnitude.

The main problem of the based-Gaussian models is the creation of homogeneous blobs in flat noisy regions, as illustrated in Figs. 1(b), 5(b) and Fig. 6(b). Moreover, after a certain number of iterations a corner smoothing could be created, as show for the extremity of the star in Fig. 5(b).

Complex Shock Filter : A different solution proposed by Gilboa et al. [START_REF] Gilboa | Regularized Shock Filters and Complex Diffusion[END_REF] is to change the sign function (cf. eq. 4) in order to take into account both the 2nd order direction of the the second derivative and its magnitude. Denoting Im(I), the imaginary part of I, by using 2 π arctan(a • Im( I θ )), a ∈ R + represents the parameter controlling the steepness of the slope of the 2nd order derivative near 0. When θ ∈ R + * tend to 0, Im( I θ ) may be considered as the smoothed 2nd order derivative of I. The complex shock filter is described by the following equation:

∂I ∂t = - 2 π arctan(a • Im( I θ )) • |∇I| + Λ • I ηη + Λ • I ξξ , (7)
where Λ is a complex diffusion term regularizing the noise and indicating inflection points. Λ is a real scalar parameter which correspond to the amount of diffusion in level-set direction. Using eq. 7, the regions close to contours where the 2nd order derivative has a higher magnitude, i.e., inflection points will not have equal weights. This translates into a higher deblurring speed near edges and contours than in the flat regions of the image. The complex shock has been improved in [START_REF] Luduzan | Morphological Sharpening and Denoising Using a Novel Shock Filter Model[END_REF] to correct its main default: a weak edges enhancement. Denoting ∂I ∂t = I t and Re(I) the real part of I, the mathematical expression of this PDE can be decomposed in two expressions:

Re(I t ) = 2 π arctan(a.Im( I θ )).f 1 • |∇I| -sign(Re(I ηη )).f 2 • |∇I| +f 1 • (Re(Λ) • Re(I ηη ) -Im(Λ) • Im(I ηη ) + Λ • Re(I ξξ )) (8)
Im(I t ) = Im(λ) • Re(I ηη ) -Re(λ) • Im(I ηη ) + Λ • Im(I ξξ ). ( 9
)
As this filter is an improvement of the eq. 7, it possesses the same variables. However the 2 new functions f 1 and f 2 are the filter core, and control the transition between an entirely complex and an entirely real filter. For N iterations, they are define as: for i = 0, 1, ..., N -1 and T l1 , T s1 , T l2 , T s2 ∈ (0, N -1),

f 1 (T l1 , T s1 ) =      1, i < T l1 1 - i-T l 1 Ts 1 -T l 1 , elsewhere, 0, i > T s1 f 2 (T l2 , T s2 ) =    0, i < T l2 i-T l1 Ts 2 -T l 2 , elsewhere. 1, i > T s2
When f 1 =1 and f 2 =0 this technique behaves exclusively as a complex shock filter. In the case where f 1 =0 and f 2 =1 it correspond to an edge enhancement filter by using the classic shock filter. Elsewhere, it corresponds to a mix of both.

Despite the originality of complex shock filter and its evolutions, the main drawback of this techniques concerns noisy images. Namely, in the presence of noise, the deblurring process creates images looking grainy a level of edges (cf. Sec. 4). In other words, edges are not straight, but rather serrated boundaries.

Structure Tensor based Approaches Shock Filter

The coherence enhancing shock filter has been developed by Weickert [START_REF] Weickert | Coherence-enhancing shock filters[END_REF] with the shock filter theory via structure tensor based approach. Thus, the corresponding PDE:

∂I ∂t = -sign((G σ * I) ω+ω+ ) • |∇I| (10)
allows shock filtering along the direction of the eigenvector ω + corresponding to the largest eigenvalue of the structure tensor:

J ρ (∇I σ ) = G ρ * (∇I σ • ∇I T σ )
, where the parameters ρ and σ represent standards deviations of the Gaussian.

Tschumperlé and Deriche proposed a different form of the diffusion shock filter coupling especially for enhancement of color images [START_REF] Tschumperlé | Diffusion PDE's on vector-valued images: local approach and geometric viewpoint[END_REF]. This model can be generalized to gray level images using the structure tensor: [START_REF] Magnier | Matlab code of "Edge detection methods based on oriented half kernels[END_REF] where α ∈ R + * , and c ω +/-are two decreasing functions:

∂I ∂t = α•(I0 -I)+cω -•Iω -ω -+cω + •Iω + ω + -(1-g(N ))•sign((Gσ * I)ω + ω + )•|∇I|
c ω-(N ) = 1 √ 1+N 2 and c ω+ (N ) = 1 1+s 2 , with N = λ + + λ -.
The shock is controlled by g(N ) (cf. eq. 3), where λ + and λ -denote the two eigenvalues tied to the eigenvectors ω + and ω -respectively, related to the tensor J ρ .

These tensorial techniques behave like a contrast enhancing shock filter, they enhance well strip structures as in Fig. 6(c), however they create artificial lines or may engender an undesirable grainy effect around edges when dealing with highly noisy images, see Fig. 1(c). Notwithstanding a long-term and large scientific effort for PDE-based methods, a satisfactory solution has not been found yet. (c) Weickert [START_REF] Weickert | Coherence-enhancing shock filters[END_REF] (d) Eq. 17

A New Half Kernel based Shock Filter

As stated in the methods above, image derivatives (I ξξ , I ηη ), and the gradient are crucial information for the image enhancement via PDEs. The more these features are accurate and robust against noise, the more the diffusion process is efficient. This section presents an oriented half kernels-based technique which enables a gradient computation and an estimation of edge directions modulo 2π. Thereafter, these components are useful for the creation of image derivatives and represent fundamental information tuning the proposed PDE.

Derivative Half Gaussian Kernels

Gaussian kernels are used in a large part of Shock filter for their efficiency in edge detection. Nevertheless weaknesses can be noticed at level of corners and small objects present in the image (as stated above about shock filters involving Gaussians). Edge detection techniques using elongated kernels are efficient at detecting large linear structures correctly [START_REF] Püspöki | Transforms and operators for directional bioimage analysis: a survey[END_REF], but small structures are considered to be noise and their edges are not extracted. Consequently, the accuracy of the detected edge points decreases strongly at corner points and for non-straight object contour parts. To bypass this undesirable effect, an anisotropic edge detection method is developed in [START_REF] Montesinos | A new perceptual edge detector in color images[END_REF] and deeper evaluated in [START_REF] Magnier | An Objective Evaluation of Edge Detection Methods based on Oriented Half Kernels[END_REF]. Indeed, the proposed technique is able to detect crossing edges and corners due to two elongated and oriented filters in two different directions. The main idea is to "cut" the anisotropic Gaussian kernel using a Heaviside function (see Fig. 2(c)). The half kernel (HK) can be implemented using Gaussian and its first derivative: For signal and image processing, s belongs to integers. Fig. 2(d) shows an example of a HK, built with the two function G 1 at the horizontal and G at the vertical respectively. In order to create an elongated filter, the support of the half smoothing part must be higher than the derivative support i.e., µ > σ. Then, the HK is rotated in several directions θ from 0 to 2π (bilinear rotation) to obtain a rotated version of the filter HK θ . The convolution of the image I with HK θ (i.e., I * HK θ ) allows to compute a derivative information at each desired angle (illustrated in Fig. 2(e)-(f)). In order to better understand this technique to extract edge, the filter support of a HK on a straight contour is equivalent to 1/2 on both sides of the edge, illustrated in Fig. 2(b). On the contrary, for a corner point with a π/2 radian angle, the support of the half filter remains 1/2 on both sides of the edge, whereas it is around 1/4 and 3/4 concerning other filter supports [START_REF] Magnier | An Objective Evaluation of Edge Detection Methods based on Oriented Half Kernels[END_REF](cf. Fig. 2(a)). Eventually, HK corresponds to an oriented filter derivative, so its responses are either positive, or negative. For each pixel of coordinates (x, y), the gradient |∇I| corresponds to the maximum value minus the minimum value of I * HK θ among all the θ directions:

               |∇I|(x, y) = max θ∈[0,2π[ I * HK θ (x, y) -min θ∈[0,2π[ I * HK θ (x, y) θ1(x, y) = argmax θ∈[0,2π[ (I * HK θ (x, y)) θ2(x, y) = argmin θ∈[0,2π[ (I * HK θ (x, y)) η(x, y) = θ 1 +θ 2 2 β(x, y) = |θ1(x, y)-θ2(x, y)|, if |θ1(x, y)-θ2(x, y)| π 2π -|θ1(x, y) -θ2(x, y)| elsewhere. ( 12
)
Note that the matlab code of the HK is available on mathworks website [START_REF] Magnier | Matlab code of "Edge detection methods based on oriented half kernels[END_REF], involving different HK filters. Once |∇I|, θ 1 and θ 2 have been obtained, η corresponds to the gradient orientation i.e., to the bisector between these two directions, thus the oriented second derivative I ηη may be created (Fig. 3(d)). Also, as represented in Fig. 4(c), β denotes the angle formed by θ 1 and θ 2 , corresponding to an angular sector. These directions are useful and efficient for image restoration via PDE [START_REF] Magnier | Evolution of image regularization with PDEs toward a new anisotropic smoothing based on half kernels[END_REF], corner detection [START_REF] Abdulrahman | Oriented asymmetric kernels for corner detection[END_REF] or image descriptor [START_REF] Venkatrayappa | A Novel Image Descriptor Based on Anisotropic Filtering[END_REF]. All these entities computed via eq. 12 are required for the proposed shock filter PDE.

Diffusion using Directions of Half Gaussian Kernels

Diffusion along Directions of Edges: PDE-based methods are a mature technique. Therefore, PDE-based image regularization techniques using gradient intensities or tensorial diffusion smooth the image either both in the directions of edges ξ or ω -and gradient direction η or ω + . This process is doable by combining the current diffused image with oriented second derivative of the image (I ξξ and I ηη , see PDE in Section 2). However, all these approaches do not take the two directions of edges into account, for example at a level of a corner. Similar to the curvature equation I ξξ , the original idea developed in [START_REF] Magnier | Texture removal by pixel classification using a rotating filter[END_REF] is to smooth anisotropically at level of edges in two diffusion directions θ 1 and θ 2 :

∂I ∂t = ∂ 2 I ∂θ 1 ∂θ 2 = I θ1θ2 . (13)
In [START_REF] Magnier | Texture removal by pixel classification using a rotating filter[END_REF], the two directions necessary for the diffusion are not computed by derivative half Gaussian kernels, only the diffusion process imports here. Indeed, contrary to previous methods, I θ1θ2 is computed by interpolations in the θ 1 and θ 2 directions, from 0 to 2π, with one and only one direction for each angle. As illustrated in Fig. 4(e), for each pixel, the smoothing is doable in 3×3 mask with the two pixels interpolated by the unweighted average in the desired directions. Yet, applying this PDE in an image using θ 1 and θ 2 issued from eq. 12 is not stable and I θ1θ2 creates an effect of dilation/erosion close to edge points, because θ 1 and θ 2 are not well directed. Fig. 3(b) illustrates this undesirable effect.

A Mirror Rotation in order to Enhance the Diffusion: The PDE presented in eq. 13 may be controlled by the gradient magnitude, for example, but an undetermined quantity of blur will be created. Consequently, instead of diffusing alongside the directions θ 1 and θ 2 , it was proposed in [START_REF] Montesinos | Des filtres anisotropes causaux pour une diffusion non contrôlées[END_REF] to diffuse in the opposite directions, i.e., the directions θ π 1 =θ 1 -π and θ π 2 =θ 2 -π. Fig. 4 illustrates these modifications where β keeps the same value. The new diffusion PDE becomes:

∂I ∂t = ∂ 2 I ∂θ π 1 ∂θ π 2 = I θ π 1 θ π 2 . ( 14
)
Simply by a mirror effect, this diffusion offers a better preservation than the original as seen in Fig. 3(c), after many iterations without any control (!). Using the original diffusion the white pixels near the border are attracted by the color of the border which causes the appearance of grey blotches. By inverting the direction of the diffusion, those pixels are not attracted anymore and the disk is preserved, while few pixel of noise have disappeared in the middle of the image. The purpose of getting a stable PDE is to control the diffusion of eq. 14 before developping a new combination with a shock filter scheme. A Diffusion Tuned by the Gradient and the Directions of Edges: The presented schemes in eqs. 13 and 14 do not control the diffusion, they correspond to linear models. In other words, the pixel intensities are propagated involving interpolations along (θ 1 , θ 2 ) or (θ π 1 , θ π 2 ) directions with a constant speed (cf. Fig. 4(e)). In order to avoid an over-smoothing of important parts of the image, as edges and corners, the diffusion must be nonlinear. There are many existing nonlinear models to smooth and restore images via PDEs [START_REF] Perona | Scale-space and edge detection using anisotropic diffusion[END_REF][START_REF] Guichard | A review of PDE models in image processing and image analysis[END_REF][START_REF] Kornprobst | Mathematical problems in image processing: partial differential equations and the calculus of variations[END_REF][START_REF] Tschumperlé | Diffusion PDE's on vector-valued images: local approach and geometric viewpoint[END_REF][START_REF] Magnier | Evolution of image regularization with PDEs toward a new anisotropic smoothing based on half kernels[END_REF]. The main idea is to smooth extensively inside homogeneous regions, whereas edges must be enhanced. The g function in eq. 3 represents a good manner to tune the diffusion depending on gradient modulus. Inspired by the model developed in [START_REF] Magnier | Evolution of image regularization with PDEs toward a new anisotropic smoothing based on half kernels[END_REF], a control function is proposed here to decrease the diffusion both at edge and corner points (when the angle between θ π 1 and θ π 2 is not open: β < π):

Pixel close to an edge

C (k,h) (|∇I|, β) = 1 2 • e -( |∇I| k ) 2 + 1 2 • e -( (π-β) (π•h) ) 2 with (k, h) ∈ ]0; 1] 2 (15)
Thus, eq. 14 becomes:

∂I ∂t = C (k,h) • I θ π 1 θ π 2 . (16)
The smoothing process is driven by the gradient magnitude and β. The C (k,h) function ensures the diffusion preserving edges and corners and enables an extensive smoothing inside homogeneous regions. In case of a small gradient and a β angle close to π, the considered pixel will be largely diffused. If the gradient is important and the β angle is small, smoothing is weak and preserves boundaries.

A New Shock Filter Scheme: As stated in section 2, corner rounding is the main weakness of the shock filter. To correct this problem a control function is inserted for the shock filter term, inversely to the control of I θ π 1 θ π 2 . Thus, eq. 16 evolves into:

∂I ∂t = C (k,h) • I θ π 1 θ π 2 -(1 -C (k,h) ) • sign(I ηη ). ( 17
)
Consequently, the smoothing process and the shock are both tuned by C (k,h) . When |∇I|≈0, it corresponds to homogeneous regions, C (k,h) →1, and shock term does not work. If β is a close angle and the gradient is weak, the process must smooth this region; it is doable when k>h in eq.16. When |∇I|≈1, it refers to pixels of (or close to) contours, C (k,h) →0, thus edges are enhanced. Fig. 5(d) illustrates the enhancement of an image containing corners (with k=0.1, h=0.05).

(a) Noisy image (b) AM filter [START_REF] Alvarez | Signal and image restoration using shock filters and anisotropic diffusion[END_REF] (c) Tschumperlé [START_REF] Tschumperlé | Diffusion PDE's on vector-valued images: local approach and geometric viewpoint[END_REF] (d) Eq. 17 (d) Eq. 17

Experimental Results

Several application results of the proposed PDE are presented in this section. These results are compared to the different approaches described above. The parameters used for all the methods are also detailed. As far as the evaluation process is concerned, the Structural Similarity Index Measure (SSIM) [START_REF] Wang | Image quality assessment: from error visibility to structural similarity[END_REF] is reported and plotted as a function of the number of iterations for each method.

The parameters for the half kernels are σ=1 for the derivative and µ=3 for the smoothing during all the experiments. Such a set of parameters enables an enhancement of small objets and thin structures. With the enlargement of these two parameters, the scale effect will lead only to the enhancement of the large structures or dominant edges. The first result presented in Fig. 5 shows the behavior of the proposed PDE method with an image containing pointed corners. Even though the original image does not contain blur, edges remain sharp after 50 iterations whereas the noise disappears completely. For the second original image in Fig. 6, stripes are created by a brush on a painting. This result is somewhat reminiscent of tensorial approaches [START_REF] Weickert | Coherence-enhancing shock filters[END_REF][START_REF] Tschumperlé | Diffusion PDE's on vector-valued images: local approach and geometric viewpoint[END_REF] After 50 iterations, results depict the coherence of the proposed PDE scheme because the lineaments, trees and characters are preserved and enhanced. With the same number of iterations, boundaries in the image presented in Fig. 1 are well enhanced while corners are highly improved, as detailed in Figs. 7(b) and(d).

To shed light on the effectiveness of the proposed shock filter, two tested images are noised by adding random Gaussian noise and blurred using a convolution with a Gaussian of standard deviation of σ = 1, cf. Figs. 8(a (e) AM filter [START_REF] Alvarez | Signal and image restoration using shock filters and anisotropic diffusion[END_REF] (f) Gilboa [START_REF] Gilboa | Regularized Shock Filters and Complex Diffusion[END_REF] (g) Luduzan [START_REF] Luduzan | Morphological Sharpening and Denoising Using a Novel Shock Filter Model[END_REF] (h) Bettahar [START_REF] Bettahar | Anisotropic color image denoising and sharpening[END_REF] (i) Fu [START_REF] Fu | Region-based shock-diffusion equation for adaptive image enhancement[END_REF] (j) Tschumperlé [START_REF] Tschumperlé | Diffusion PDE's on vector-valued images: local approach and geometric viewpoint[END_REF] (k) Eq. 17 (AM), Gilboa, Luduzan, Fu, Tschumperlé and Bettahar methods. The parameters for methods involving Gaussians is σ=1 and ρ=3 for tensorial PDEs. For complex shock filters, θ=0.001, a=2 and λ=λ=0.1. In order to compare objective performance of these approaches, the SSIM is calculated for each iteration; presented images are tied to the best score of the measure. As shown in Figs. 8(c) and 9(c), the SSIM curve of the proposed scheme is above the others (called Half-filter), translating a better image enhancement than other PDE methods.

The degraded images contain a strong noise and small objects have to be restored. As an example, the gray structure in the middle of the tripod in Figs. 8(a) is well enhanced by the new filter. Indeed, this object is recognizable and realistic, contours are straight. Details are also enhanced like the camera and the cameraman's lock of hair. Finally, by using the new PDE, the corners and edges of Fig. 9(b) are well deblurred, without creating a grainy effect around edges.

Conclusion

A new shock-filter for digital image enhancement has been presented in this paper. The principal characteristic of this filter is the use of half Gaussian kernels to detect a gradient modulus. This kind of kernels allows the filter to detect corners (e) AM filter [START_REF] Alvarez | Signal and image restoration using shock filters and anisotropic diffusion[END_REF] (f) Gilboa [START_REF] Gilboa | Regularized Shock Filters and Complex Diffusion[END_REF] (g) Luduzan [START_REF] Luduzan | Morphological Sharpening and Denoising Using a Novel Shock Filter Model[END_REF] (h) Bettahar [START_REF] Bettahar | Anisotropic color image denoising and sharpening[END_REF] (i) Fu [START_REF] Fu | Region-based shock-diffusion equation for adaptive image enhancement[END_REF] (j) Tschumperlé [START_REF] Tschumperlé | Diffusion PDE's on vector-valued images: local approach and geometric viewpoint[END_REF] (k) Eq. 17 and their associated directions with accuracy. Furthermore, the shock-diffusion strategy depends on the value of the gradient modulus and the two directions of the estimated edges. By applying a mirror rotation of these directions, a new diffusion process via PDE is proposed and improves the shock-filter efficiency.

Experiments on blurred and noisy images show the efficiency in removing blur and noise while enhancing important features like edges and also corners or small objects. The presented experimental results and images resulting of this PDE tied to the best score of the SSIM illustrates the relevance of the proposed image enhancement method. Future works will include automatic diffusion that would lead to an unsupervised restoration. In other words, it constrains to stop the PDE after a number of iterations allowing the enhancement of an image. This is doable by learning or statistic approaches estimating the level of noise and blur before the first iteration. On the other hand, an unsupervised measure (for example a method estimating if flat regions are really flat) on the restoration level may be useful to stop the diffusion process. The adaptation of the proposed method to color image enhancement remains a challenge without creating color artifacts, several manners must be explored for the diffusion process and overall the deblurring process. Eventually, this paper is not a breakthrough, but it adds some contribution, since it devotes an attention to the diffusion directions.

  (a) Noisy image (b) Fu filter [5]

Fig. 1 .

 1 Restoration of a real highly noisy image.

•

  a half smoothing part: G(s) = H(s) • e s 2 2•µ 2 , with H the Heaviside function, • a derivative part of the filter: G 1 (s)=s • e s 2 2•σ 2 , with σ, µ∈R * + and s∈R.

Fig. 2 .

 2 Fig. 2. Representation of filter supports concerning edges and corners. (c)Derivative Gaussian kernel. (d) 2D half kernel. (d) Selection of points before applying the HK θ .

I θ π 1 θ π 2 (d) Iηη imageFig. 3 .

 23 Fig. 3. A diffusion along θ1 and θ2 directions creates a blur effect around edges.

) θ π 1 and θ π 2 (

 2 Selected pixel (b)Energy in(a) (c) θ1 and θ2 (d

Fig. 4 .

 4 Fig. 4. Mirror rotation of θ1 and θ2 directions to avoid a blurring effect in the diffusion process. (a): Pixel close to an edge. (b-c): Diffusion directions for the selected point.

Fig. 5 .

 5 Fig. 5. Image restoration. For (b), σ=1, (c) σ=1, ρ=3 and (d) σ=1, µ=3.

  AM filter[START_REF] Alvarez | Signal and image restoration using shock filters and anisotropic diffusion[END_REF] (c) Tschumperlé[START_REF] Tschumperlé | Diffusion PDE's on vector-valued images: local approach and geometric viewpoint[END_REF]

Fig. 6 .

 6 Comparition of several PDE schemes on a picture of Vincent van Gogh paint. For (b), σ=1, (c) σ=1, ρ=3 and (d) σ=1, µ=3.

  )-(b) and 9(a)-(b). Then they are independently treated by Perona-Malik (PM), Alvarez-Mazorra

Fig. 7 .

 7 Fig. 7. Enlargement of parts extracted from images (a) -left-and (d) -right-in Fig. 1.

  Original image (b) Degraded image (c) SSIM evolution (d) PM[START_REF] Perona | Scale-space and edge detection using anisotropic diffusion[END_REF]

Fig. 8 .

 8 Fig. 8. Restoration a blurred (σ = 1) and noisy image, 272×272, in (b), SNR=13.1dB.

  Original image (b) Degraded image (c) SSIM evolution (d) PM[START_REF] Perona | Scale-space and edge detection using anisotropic diffusion[END_REF]

Fig. 9 .

 9 Fig. 9. Restoration a blurred (σ = 1) and noisy image, 256×256, in (b), SNR=13.53dB.