Sharpening spatial filters

29,946 views 29 slides Oct 26, 2016
Slide 1
Slide 1 of 29
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29

About This Presentation

its very useful for students.
Sharpening process in spatial domain
Direct Manipulation of image Pixels.
The objective of Sharpening is to highlight transitions in intensity
The image blurring is accomplished by pixel averaging in a neighborhood.
Since averaging is analogous to integration.
Prepared ...


Slide Content

Digital Image Processing Sharpening process in spatial domain Prepared by T. Sathiyabama M. Sahaya Pretha K. Shunmuga Priya R. Rajalakshmi Department of Computer Science and Engineering, MS University, Tirunelveli 10/26/2016 1:36 PM 1

Definition Direct Manipulation of image Pixels. The objective of Sharpening is to highlight transitions in intensity The image blurring is accomplished by pixel averaging in a neighborhood. Since averaging is analogous to integration. 10/26/2016 1:36 PM 2

Some Applications Photo Enhancement Medical image visualization Industrial defect detection Electronic printing Autonomous guidance in military systems 10/26/2016 1:36 PM 3

Foundation Sharpening Filters to find details about Remove blurring from images. Highlight edges 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/26/2016 1:36 PM 4

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 (Diff b/w subsequent values & measures the rate of change of the function) 10/26/2016 1:36 PM 5

Definition for a second derivative Must be zero in flat areas Must be non zero 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 (the values both before& after the current value) 10/26/2016 1:36 PM 6

First and second-order derivatives in digital form => difference 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/26/2016 1:36 PM 7

Gray-level profile 10/26/2016 1:36 PM 8 6 6 1 2 3 2 2 2 2 2 3 3 3 3 3 7 7 5 5 7 6 5 4 3 2 1

Derivative of image profile 10/26/2016 1:36 PM 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 2 4 -3 -1 1 -3 0 0 0 0 0 -7 -1-1 -2 -1 0 0 -2-1 2 2 -2 4 -7 3 -1 1 1 -1-3 3 0 0 0 0 -7 7 -1 1 -2 first second

2nd derivatives for image Sharpening 2-D 2 nd derivatives => Laplacian 10/26/2016 1:36 PM 10 =>discrete formulation

Implementation 10/26/2016 1:36 PM 11 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

Definition of 2nd derivatives in filter mask 90 rotation invariant 45 rotation invariant (include Diagonals) 4 - - - - - - - - - - - - 8 10/26/2016 1:36 PM 12

Implementation 10/26/2016 1:36 PM 13

Implementation 10/26/2016 1:36 PM 14 Filtered = Conv( image,mask )

Implementation 10/26/2016 1:36 PM 15 filtered = filtered - Min(filtered) filtered = filtered * (255.0/Max(filtered))

Implementation 10/26/2016 1:36 PM 16 sharpened = image + filtered sharpened = sharpened - Min(sharpened ) sharpened = sharpened * ( 255.0/Max(sharpened ))

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/26/2016 1:36 PM 17

Result of Algorithm 10/26/2016 1:36 PM 18 -1 -1 5 -1 -1 -1 -1 9 -1 -1 -1 -1 -1 -1

Laplacian filtering: example 10/26/2016 1:36 PM 19 Original image Laplacian filtered image

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 10/26/2016 1:36 PM 20 Where denotes the sharpened image obtained by unsharp masking, an is a blurred version of

High-boost filtering A high-boost filtered image, f hb is defined at any point ( x,y ) as 10/26/2016 1:36 PM 21 This equation is applicable general and does not state explicity how the sharp image is obtained

High-boost filtering and Laplacian If we choose to use the Laplacian, then we know f s ( x,y ) 10/26/2016 1:36 PM 22 If the center coefficient is negative If the center coefficient is positive -1 -1 A+4 -1 -1 -1 -1 A+8 -1 -1 -1 -1 -1 -1

The Gradient (1 st order derivative) First Derivatives in image processing are implemented using the magnitude of the gradient. The gradient of function f( x,y ) is 10/26/2016 1:36 PM 23

The magnitude of this vector is given by -1 1 1 -1 G x G y This mask is simple, and no isotropic. Its result only horizontal and vertical. 10/26/2016 1:36 PM 24

Robert’s Method The simplest approximations to a first-order derivative that satisfy the conditions stated in that section are z 1 z 2 z 3 z 4 z 5 z 6 z 7 z 8 z 9 G x = (z 9 -z 5 ) and G y = (z 8 -z 6 ) 10/26/2016 1:36 PM 25

These mask are referred to as the Roberts cross-gradient operators. -1 1 -1 1 10/26/2016 1:36 PM 26

Sobel’s Method Using this equation -1 -2 -1 1 2 1 1 -2 1 -1 2 -1 10/26/2016 1:36 PM 27

Gradient: example defects original(contact lens) Sobel gradient Enhance defects and eliminate slowly changing background 10/26/2016 1:36 PM 28

10/26/2016 1:36 PM 29 Thank You to all my viewers