Information about Sharpening in spatial domain

Published on October 25, 2016

Author: SathyaGanesh7

Source: slideshare.net

2. Definition The principal objective of Sharpening is to highlight transitions in intensity To fine detail in an image or to enhance detail that has been blurred, either in error or as an natural effect of a particular method of image acquisition Image Sharpening is vary and include applications ranging from electronic printing and medical imaging to industrial inspection and autonomous guidance in military systems 10/25/2016 5:31 AM 2

3. The image blurring is accomplished in the spatial domain by pixel averaging in a neighborhood. Since averaging is analogous to integration. Sharpening could be accomplished by spatial differentiation. 10/25/2016 5:31 AM 3

4. Foundation We are interested in the behavior of these derivatives in areas of constant gray level(flat segments), at the onset and end of discontinuities(step and ramp discontinuities), and along gray-level ramps. These types of discontinuities can be noise points, lines, and edges. 10/25/2016 5:31 AM 4

5. Definition for a first derivative Must be zero in flat segments Must be nonzero at the onset of a gray-level step or ramp Must be nonzero along ramps A basic definition of the first-order derivative of a one- dimensional function f(x) is 10/25/2016 5:31 AM 5 )()1( f xfxf x

6. Definition for a second derivative Must be zero in flat areas Must be nonzero at the onset and end of a gray-level step or ramp Must be zero along ramps of constant slope We define a second-order derivative as the difference 10/25/2016 5:31 AM 6 )(2)1()1(2 2 xfxfxf x f

7. First and second-order derivatives in digital form => difference 10/25/2016 5:31 AM 7 )()1( xfxf x f )(2)1()1( )]1()([)]()1([2 2 xfxfxf xfxfxfxf x f

8. Gray-level profile 10/25/2016 5:31 AM 8 660 1 2 30 0 2 2 2 2 23 3 3 3 30 0 0 0 0 0 0 0 7 7 5 5 7 6 5 4 3 2 1 0

9. Derivative of image profile 10/25/2016 5:31 AM 9 0 0 0 1 2 3 2 0 0 2 2 6 3 3 2 2 3 3 0 0 0 0 0 0 7 7 6 5 5 3 0 0 1 1 1-1-2 0 2 0 4-3 0-1 0 1 0-3 0 0 0 0 0-7 0-1-1 0-2 0-1 0 0-2-1 2 2-2 4-7 3-1 1 1-1-3 3 0 0 0 0-7 7-1 0 1-2 first second

10. Analyze The 1st-order derivative is nonzero along the entire ramp, while the 2nd-order derivative is nonzero only at the onset and end of the ramp The response at and around the point is much stronger for the 2nd- than for the 1st-order derivative 10/25/2016 5:31 AM 10

11. 2nd derivatives for image Sharpening 2-D 2nd derivatives => Laplacian 10/25/2016 5:31 AM 11 2 2 2 2 2 y f x f f ),(4)]1,()1,(),1(),1([ )],(2)1,()1,([ )],(2),1(),1([2 yxfyxfyxfyxfyxf yxfyxfyxf yxfyxfyxff =>discrete formulation

12. Definition of 2nd derivatives in filter mask 900 rotation invariant 450 rotation invariant (include Diagonals) 4 - - - - - - - - - --- 8 10/25/2016 5:31 AM 12

13. Implementation ),(),( ),(),( ),( 2 2 yxfyxf yxfyxf yxg ),(2 yxf 10/25/2016 5:31 AM 13 If the center coefficient is negative If the center coefficient is positive Where f(x,y) is the original image is Laplacian filtered image g(x,y) is the sharpen image

14. Laplacian filtering: example 10/25/2016 5:31 AM 14 Original image Laplacian filtered image

15. Implementation 10/25/2016 5:31 AM 15

16. Implementation 10/25/2016 5:31 AM 16 Filtered = Conv(image,mask)

17. Implementation 10/25/2016 5:31 AM 17 filtered = filtered - Min(filtered) filtered = filtered * (255.0/Max(filtered))

18. Implementation 10/25/2016 5:31 AM 18 sharpened = image + filtered sharpened = sharpened - Min(sharpened ) sharpened = sharpened * (255.0/Max(sharpened ))

19. Algorithm Using Laplacian filter to original image And then add the image result from step 1 and the original image We will apply two step to be one mask 10/25/2016 5:31 AM 19 ),(4)1,()1,(),1(),1(),(),( yxfyxfyxfyxfyxfyxfyxg )1,()1,(),1(),1(),(5),( yxfyxfyxfyxfyxfyxg

20. 10/25/2016 5:31 AM 20 -1 -1 5 -1 -1 0 0 0 0 -1 -1 9 -1 -1 -1 -1 -1 -1

21. Unsharp masking A process to sharpen images consists of subtracting a blurred version of an image from the image itself. This process, called unsharp masking, is expressed as ),(),(),( yxfyxfyxfs ),( yxfs 10/25/2016 5:31 AM 21 ),( yxf),( yxf Where denotes the sharpened image obtained by unsharp masking, an is a blurred version of

22. High-boost filtering A high-boost filtered image, fhb is defined at any point (x,y) as 1),(),(),( AwhereyxfyxAfyxfhb ),(),(),()1(),( yxfyxfyxfAyxfhb 10/25/2016 5:31 AM 22 ),(),()1(),( yxfyxfAyxf shb This equation is applicable general and does not state explicity how the sharp image is obtained

23. High-boost filtering and Laplacian If we choose to use the Laplacian, then we know fs(x,y) ),(),( ),(),( 2 2 yxfyxAf yxfyxAf fhb 10/25/2016 5:31 AM 23 If the center coefficient is negative If the center coefficient is positive -1 -1 A+4 -1 -1 0 0 0 0 -1 -1 A+8 -1 -1 -1 -1 -1 -1

24. The Gradient (1st order derivative) First Derivatives in image processing are implemented using the magnitude of the gradient. The gradient of function f(x,y) is y f x f G G f y x 10/25/2016 5:31 AM 24

25. Gradient The magnitude of this vector is given by yxyx GGGGfmag 22 )( -1 1 1 -1 Gx Gy This mask is simple, and no isotropic. Its result only horizontal and vertical. 10/25/2016 5:31 AM 25

26. Robert’s Method The simplest approximations to a first-order derivative that satisfy the conditions stated in that section are 2 68 2 59 )()( zzzzf 6859 zzzzf z1 z2 z3 z4 z5 z6 z7 z8 z9 Gx = (z9-z5) and Gy = (z8-z6) 10/25/2016 5:31 AM 26

27. Robert’s Method These mask are referred to as the Roberts cross- gradient operators. -1 0 0 1 -10 01 10/25/2016 5:31 AM 27

28. Sobel’s Method Using this equation )2()2()2()2( 741963321987 zzzzzzzzzzzzf -1 -2 -1 0 0 0 1 2 1 1 -2 10 0 0-1 2 -1 10/25/2016 5:31 AM 28

29. Gradient: example defectsoriginal(contact lens) Sobel gradient Enhance defects and eliminate slowly changing background 10/25/2016 5:31 AM 29

30. 10/25/2016 5:31 AM 30

## Add a comment