+ All Categories
Home > Documents > On Implicit Image Derivatives and Their Applications · age derivatives and filters for image...

On Implicit Image Derivatives and Their Applications · age derivatives and filters for image...

Date post: 21-Jul-2020
Category:
Upload: others
View: 7 times
Download: 0 times
Share this document with a friend
1
On Implicit Image Derivatives and Their Applications Alexander Belyaev http://www.hw.ac.uk/~belyaev Vision, Image & Signal Processing (VISP) Heriot-Watt University, Edinburgh, UK Fast and reliable estimation of image derivatives is among the most fun- damental tasks of low level image processing. Implicit finite differences offer much higher spectral resolving efficiency compared to explicit fi- nite differences while the computational effort increases only slightly. Although implicit finite differences had become known to a general au- dience of numerical mathematicians and computational physicists after Collatz’ book [2], their heyday began after Lele’s seminal paper [4] where a remarkable performance of implicit finite differences for computational problems with a range of spatial scales was analyzed and demonstrated. Estimating the derivative for univariate signals. Consider a uniformly sampled signal f (x). Let us recall that the Nyquist, or folding, frequency is the highest frequency that can be represented in the signal. It equals one-half of the sampling rate. Consider the simplest central difference operator f 0 (x) 1 2h [ f (x + h) - f (x - h)] (1) defined on a grid with spacing h. For the sake of simplicity let us assume that h = 1. The corresponding frequency response function j sin ω , j = -1, -π < ω < π , delivers a satisfactory approximation of the frequency response function jω of the ideal derivative only for sufficiently small frequencies (wavenumbers) ω (see, for example, [3, Section 6.4]). One way to improve (1) consists in using implicit finite differences. In particular, we deal with a simple one-parametric family of implicit finite difference schemes given by 1 w + 2 ( f 0 i-1 + wf 0 i + f 0 i+1 ) = 1 2h ( f i+1 - f i-1 ) (2) and leading to a tridiagonal system of linear equations. It is interesting that (2) with w = 4 can be obtained if the grid data { f i } is first B-spline interpolated and then processed by (1). Estimating image gradient magnitude and orientation. Typically, for a 2D image defined on a regular grid with spacing h, image processing textbooks recommend to use a 3 × 3 kernel D x defined by 1 2h(w + 2) -1 0 1 -w 0 w -1 0 1 1 2h -1 0 1 · 1 w + 2 1 w 1 (3) and its π /2-rotated counterpart D y for estimating the x-derivative and y- derivative, respectively. Here w is a parameter: setting w = 1 in (3) yields the Prewitt mask, w = 2 corresponds to the Sobel mask, and w = 10/3 turns (3) into Scharr mask [1, Chapter 6]. It is clear in which way (3) improves the standard central difference (1): smoothing due to the use of the central difference operator instead of the true x-derivative is compensated by adding a certain amount of smoothing in the y-direction. Thus (3) and its y-direction counterpart do a better job in estimating the gradient direction than in estimating the gradient magnitude. If the goal is to achieve an accurate estimation of both the gradient direction and magnitude, we can combine (3) and the corresponding 3 × 3 discrete Laplacian L w = 1 h 2 (w + 2) 1 w 1 w -4(w + 1) w 1 w 1 as follows. Let δ =[0 0 0; 0 1 0; 0 0 0] be the 3 × 3 identity kernel. Note that δ + h 2 w + 2 L w 1 w + 2 1 w 1 · 1 w + 2 1 w 1 , which can be considered as simultaneous smoothing (averaging) with re- spect to both the coordinate directions. Thus, in order to remove smooth- ing introduced by (3), it is natural to use δ + h 2 w + 2 L w -1 D x (4) which combines (3) with an implicit Laplacian-based sharpening. The frequency response function corresponding to (4) applied to the eigen- function exp( j(ω 1 x + ω 2 y) is given by H(ω 1 , ω 2 )= j sin ω 1 · w + 2 w + 2 cos ω 1 which, in its turn, corresponds to (2) applied in the x-direction. We found out that (2) with w = 10/3 and its y-direction counterpart (we call this gradient estimation scheme by the implicit Scharr scheme) deliver an accurate estimation of the image gradient for a wide range of the frequencies ω 1 and ω 2 . Fig. 1 demonstrates advantages of the im- plicit Scharr scheme over the Sobel and Scharr masks. Similar results are obtained for the Harris corner detector. Figure 1: Canny edge detection with explicit and implicit finite differences. Left: Sobel mask. Middle: Scharr mask. Right: implicit Scharr scheme. Explicit schemes (left and middle) add unnecessary blur and, therefore, are less sensitive to fine image edges. For example, the edge of the nose is not sufficiently sharp and only appears with the implicit scheme (right). High-resolution schemes. A finite difference approximation can be eval- uated according to its resolving efficiency, the range of frequencies ω over which a satisfactory approximation of the exact differentiation is achieved. We introduce a general approach for constructing finite dif- ference schemes with high resolving efficiency. The approach is based on using Fourier-Padé-Galerkin approximations for frequency response functions. Image enhancement. We also demonstrate advantages of implicit im- age derivatives and filters for image deblurring and enhancement pur- poses. Fig. 2 demonstrates how oversharperning of high-frequency image details can be suppressed using an implicit low-pass filter. Figure 2: Left: the original Barbara image. Middle: the original image is en- hanced by the Laplacian subtraction filter (unsharp masking), high-frequency tex- ture details are severely oversharpened. Right: the sharpened image is smoothed using an implicit low-pass filter, oversharpening is suppressed. Conclusion. We demonstrate advantages of implicit differencing and filtering schemes for basic picture processing tasks. We establish a sim- ple link between implicit and explicit finite differences used for gradient direction estimation. We adapt Fourier-Padé-Galerkin approximations for designing implicit differencing schemes with very good spectral resolu- tion properties. [1] G. Bradski and A. Kaehler. Learning OpenCV: Computer Vision with the OpenCV Library. O’Reilly, 2008. [2] L. Collatz. The Numerical Treatment of Differential Equations. Springer, 3rd edition, 1960. [3] R. W. Hamming. Digital Filters. Dover, 3rd edition, 1998. [4] S. K. Lele. Compact finite difference schemes with spectral-like resolution. Journal of Computational Physics, 103:16–42, 1992.
Transcript
Page 1: On Implicit Image Derivatives and Their Applications · age derivatives and filters for image deblurring and enhancement pur-1 0 1 1 w+2 2 4 1 w 1 3 5(3) and its p=2-rotated counterpart

On Implicit Image Derivatives and Their Applications

Alexander Belyaevhttp://www.hw.ac.uk/~belyaev

Vision, Image & Signal Processing (VISP)Heriot-Watt University, Edinburgh, UK

Fast and reliable estimation of image derivatives is among the most fun-damental tasks of low level image processing. Implicit finite differencesoffer much higher spectral resolving efficiency compared to explicit fi-nite differences while the computational effort increases only slightly.Although implicit finite differences had become known to a general au-dience of numerical mathematicians and computational physicists afterCollatz’ book [2], their heyday began after Lele’s seminal paper [4] wherea remarkable performance of implicit finite differences for computationalproblems with a range of spatial scales was analyzed and demonstrated.

Estimating the derivative for univariate signals. Consider a uniformlysampled signal f (x). Let us recall that the Nyquist, or folding, frequencyis the highest frequency that can be represented in the signal. It equalsone-half of the sampling rate.

Consider the simplest central difference operator

f ′(x)≈ 12h

[ f (x+h)− f (x−h)] (1)

defined on a grid with spacing h. For the sake of simplicity let us assumethat h = 1. The corresponding frequency response function j sinω , j =√−1,−π < ω < π , delivers a satisfactory approximation of the frequency

response function jω of the ideal derivative only for sufficiently smallfrequencies (wavenumbers) ω (see, for example, [3, Section 6.4]).

One way to improve (1) consists in using implicit finite differences. Inparticular, we deal with a simple one-parametric family of implicit finitedifference schemes given by

1w+2

(f ′i−1 +w f ′i + f ′i+1

)=

12h

( fi+1− fi−1) (2)

and leading to a tridiagonal system of linear equations.It is interesting that (2) with w = 4 can be obtained if the grid data

{ fi} is first B-spline interpolated and then processed by (1).

Estimating image gradient magnitude and orientation. Typically, fora 2D image defined on a regular grid with spacing h, image processingtextbooks recommend to use a 3×3 kernel Dx defined by

12h(w+2)

−1 0 1−w 0 w−1 0 1

≡ 12h

[−1 0 1

]· 1

w+2

1w1

(3)

and its π/2-rotated counterpart Dy for estimating the x-derivative and y-derivative, respectively. Here w is a parameter: setting w = 1 in (3) yieldsthe Prewitt mask, w = 2 corresponds to the Sobel mask, and w = 10/3turns (3) into Scharr mask [1, Chapter 6].

It is clear in which way (3) improves the standard central difference(1): smoothing due to the use of the central difference operator insteadof the true x-derivative is compensated by adding a certain amount ofsmoothing in the y-direction. Thus (3) and its y-direction counterpart doa better job in estimating the gradient direction than in estimating thegradient magnitude.

If the goal is to achieve an accurate estimation of both the gradientdirection and magnitude, we can combine (3) and the corresponding 3×3discrete Laplacian

Lw =1

h2(w+2)

1 w 1w −4(w+1) w1 w 1

as follows. Let δ = [0 0 0; 0 1 0; 0 0 0] be the 3×3 identity kernel. Notethat

δ +h2

w+2Lw ≡

1w+2

[1 w 1

]· 1

w+2

1w1

,

which can be considered as simultaneous smoothing (averaging) with re-spect to both the coordinate directions. Thus, in order to remove smooth-ing introduced by (3), it is natural to use(

δ +h2

w+2Lw

)−1

Dx (4)

which combines (3) with an implicit Laplacian-based sharpening. Thefrequency response function corresponding to (4) applied to the eigen-function exp( j(ω1x+ω2y) is given by

H(ω1,ω2) = j sinω1 ·w+2

w+2cosω1

which, in its turn, corresponds to (2) applied in the x-direction.We found out that (2) with w = 10/3 and its y-direction counterpart

(we call this gradient estimation scheme by the implicit Scharr scheme)deliver an accurate estimation of the image gradient for a wide range ofthe frequencies ω1 and ω2. Fig. 1 demonstrates advantages of the im-plicit Scharr scheme over the Sobel and Scharr masks. Similar results areobtained for the Harris corner detector.

Figure 1: Canny edge detection with explicit and implicit finite differences. Left:Sobel mask. Middle: Scharr mask. Right: implicit Scharr scheme. Explicitschemes (left and middle) add unnecessary blur and, therefore, are less sensitive tofine image edges. For example, the edge of the nose is not sufficiently sharp andonly appears with the implicit scheme (right).

High-resolution schemes. A finite difference approximation can be eval-uated according to its resolving efficiency, the range of frequencies ω

over which a satisfactory approximation of the exact differentiation isachieved. We introduce a general approach for constructing finite dif-ference schemes with high resolving efficiency. The approach is basedon using Fourier-Padé-Galerkin approximations for frequency responsefunctions.

Image enhancement. We also demonstrate advantages of implicit im-age derivatives and filters for image deblurring and enhancement pur-poses. Fig. 2 demonstrates how oversharperning of high-frequency imagedetails can be suppressed using an implicit low-pass filter.

Figure 2: Left: the original Barbara image. Middle: the original image is en-hanced by the Laplacian subtraction filter (unsharp masking), high-frequency tex-ture details are severely oversharpened. Right: the sharpened image is smoothedusing an implicit low-pass filter, oversharpening is suppressed.

Conclusion. We demonstrate advantages of implicit differencing andfiltering schemes for basic picture processing tasks. We establish a sim-ple link between implicit and explicit finite differences used for gradientdirection estimation. We adapt Fourier-Padé-Galerkin approximations fordesigning implicit differencing schemes with very good spectral resolu-tion properties.

[1] G. Bradski and A. Kaehler. Learning OpenCV: Computer Vision with theOpenCV Library. O’Reilly, 2008.

[2] L. Collatz. The Numerical Treatment of Differential Equations. Springer, 3rdedition, 1960.

[3] R. W. Hamming. Digital Filters. Dover, 3rd edition, 1998.[4] S. K. Lele. Compact finite difference schemes with spectral-like resolution.

Journal of Computational Physics, 103:16–42, 1992.

Recommended