Sharpening Spatial Filters ( high pass)  Previously we have looked at smoothing filters which remove fine detail  Sharpening spatial filters seek to.

Slides:



Advertisements
Similar presentations
Environmental Remote Sensing GEOG 2021
Advertisements

Basis beeldverwerking (8D040) dr. Andrea Fuster dr. Anna Vilanova Prof.dr.ir. Marcel Breeuwer Filtering.
Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
Spatial Filtering (Chapter 3)
Topic 6 - Image Filtering - I DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Digital Image Processing
Image Processing Lecture 4
Spatial Filtering.
Image Filtering. Outline Outline Concept of image filter  Focus on spatial image filter Various types of image filter  Smoothing, noise reductions 
Chapter 3 Image Enhancement in the Spatial Domain.
Edges and Contours– Chapter 7
Lecture 6 Sharpening Filters
Image Enhancement in the Spatial Domain II Jen-Chang Liu, 2006.
6/9/2015Digital Image Processing1. 2 Example Histogram.
1 Image filtering Hybrid Images, Oliva et al.,
Digital Image Processing
1 Image filtering
The Segmentation Problem
Image Analysis Preprocessing Arithmetic and Logic Operations Spatial Filters Image Quantization.
Gholamreza Anbarjafari, PhD Video Lecturers on Digital Image Processing Digital Image Processing Spatial Domain Filtering: Part II.
ECE 472/572 - Digital Image Processing Lecture 4 - Image Enhancement - Spatial Filter 09/06/11.
Chapter 3 (cont).  In this section several basic concepts are introduced underlying the use of spatial filters for image processing.  Mainly spatial.
Spatial-based Enhancements Lecture 3 prepared by R. Lathrop 10/99 updated 10/03 ERDAS Field Guide 6th Ed. Ch 5: ;
Spatial Filtering: Basics
Digital Image Processing Image Enhancement Part IV.
Digital Image Processing
Digital Image Processing (DIP)
Basis beeldverwerking (8D040) dr. Andrea Fuster Prof.dr. Bart ter Haar Romeny dr. Anna Vilanova Prof.dr.ir. Marcel Breeuwer Convolution.
Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
Introduction to Image Processing Grass Sky Tree ? ? Sharpening Spatial Filters.
Digital Image Processing Lecture 5: Neighborhood Processing: Spatial Filtering Prof. Charlene Tsai.
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Introduction to Image Processing
Image Processing is replacing Original Pixels by new Pixels using a Transform rst uvw xyz Origin x y Image f (x, y) e processed = v *e + r *a + s *b +
Course Website: Digital Image Processing Image Enhancement (Spatial Filtering 1)
Spatial Filtering.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Chapter 3 Intensity Transformations.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Sharpening Filters To highlight fine detail or to enhance blurred detail. –smoothing ~ integration –sharpening ~ differentiation Categories of sharpening.
University of Ioannina - Department of Computer Science Filtering in the Frequency Domain (Application) Digital Image Processing Christophoros Nikou
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities May 2, 2005 Prof. Charlene Tsai.
Digital Image Processing Part 3 Spatial Domain Processing.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Digital Filters. What are they?  Local operation (neighborhood operation in GIS terminology) by mask, window, or kernel (different words for the same.
Image Filtering with GLSL DI1.03 蔡依儒. Outline Convolution Convolution Convolution implementation using GLSL Convolution implementation using GLSL Commonly.
Digital Image Processing
Digital Image Processing Week V Thurdsak LEAUHATONG.
Digital Image Processing CSC331
M ATLAB L ECTURE 3 Histogram Processing. H ISTOGRAM E QUALIZATION The imhist function create a histogram that show the distribution of intensities in.
Lecture Seven Figures from Gonzales and Woods, Digital Image Processing, Copyright 2002.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Environmental Remote Sensing GEOG 2021
Miguel Tavares Coimbra
Basis beeldverwerking (8D040) dr. Andrea Fuster dr. Anna Vilanova Prof
Digital Image Processing CSC331
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
ECE 692 – Advanced Topics in Computer Vision
IMAGE PROCESSING INTENSITY TRANSFORMATION AND SPATIAL FILTERING
Spatial Filtering - Enhancement
Digital Image Processing
Lecture 10 Image sharpening.
CIS 350 – 3 Image ENHANCEMENT SPATIAL DOMAIN
Digital Image Processing
Lecture 3 (2.5.07) Image Enhancement in Spatial Domain
Digital Image Processing
Digital Image Processing
Interesting article in the March, 2006 issue of Wired magazine
Enhancement.
Digital Image Processing
Digital Filters.
Presentation transcript:

Sharpening Spatial Filters ( high pass)  Previously we have looked at smoothing filters which remove fine detail  Sharpening spatial filters seek to highlight fine detail Remove blurring from images Highlight edges Useful for emphasizing transitions in image intensity  Sharpening filters are based on spatial differentiation

Spatial Differentiation  Differentiation measures the rate of change of a function  Let’s consider a simple 1 dimensional example

Spatial Differentiation A B

Spatial filters : Sharpening ( high pass) 1.LAPLACE 2.SOBEL

Spatial filters : Sharpening 1) LAPLACE Laplace kernels

Use: for highlighting fine detail or enhancing detail that has been blurred Example: apply the following laplace on the highlighted pixel 154*4 – = -14 So the value after filter = -14 We call the resultant image: sharpened image. Filtered image=original +sharpened image The value in the filter image= =130 Spatial filters : Sharpening LAPLACE – 1 st derivative

Spatial Fltering LAPLACIAN

In the sharpened image, we may get negative value, We deal with this case in 3 ways: 1.Covert negative value to zero (matlab does this) 2.Apply 2 nd derivative of laplace 1.Apply laplace again to the resultant sharpened image Spatial filters : Sharpening LAPLACE – 1 st derivative

Example: apply the following laplace 2 nd derivative on the highlighted pixel Solution: apply laplace to all pixels So the value after 2 nd derivative filter =-74 the value of pixel in the filter image= = 80 Spatial filters : Sharpening LAPLACE – 2 nd derivative 154*4 – = -14 Then apply it again to our pixel:-14*4 – – (-6) -4 =-74

Spatial filters : Sharpening 1 st VS 2 nd derivative sharpening 1 st derivative sharpening produces thicker edges in an image 1st derivative sharpening has stronger response to gray level change 2 nd derivative sharpening has stronger response to fine details, such as thin lines and isolated points. 2 nd derivative sharpening has double response to gray level change

Laplacian Image Enhancement  In the final sharpened image edges and fine detail are much more obvious Images taken from Gonzalez & Woods, Digital Image Processing (2002) - = Original Image Laplacian Filtered Image Sharpened Image

Laplacian Image Enhancement Images taken from Gonzalez & Woods, Digital Image Processing (2002)

La place Sharpened image La place filtered image

Imfilter : for applying filter. Fspecial : for choosing the filter: Example: In MATLAB : >> v=imread('picture2.jpg'); >> h=fspecial('laplacian‘,0); >> Xp=imfilter(v,h); >> imshow(Xp) >> imshow(Xp+v) Note: Xp=imfilter(x,p, ‘replicate‘) This command will apply border padding instead of zero padding Laplacian Image Enhancement

Spatial filters : Sharpening 2) Sobel Detects horizontal edgesDetects vertical edges

Spatial filters : Sharpening 2) Sobel we can apply the sobel horizontal kernel or the sobel vertical kernel or both and adding them together.

Spatial filters : Sharpening 2) Sobel

MATLAB Imfilter : for applying filter. Fspecial : for choosing the filter: Example: In MATLAB : >>v=fspecial(‘sobel’)  horizontal sobel >>Y=v’  vertical sobel >>m= imread(‘cameraman.tif‘); >>Fp=imfilter(m,v)  this command will apply sobel filter on image >>Imshow(Fp)  this command will show the sobel sharpened image >>imshow(m+Fp)  this command will show the filtered image after applying sobel

>> imshow(v),figure,imshow(f+v); >> v=imread('picture2.jpg'); >> h=fspecial('sobel'); >> h1=h'; >> p1=imfilter(v,h); >> p2=imfilter(v,h1); >> p3=abs(p1)+abs(p2); >> imshow(v),figure,imshow(p3+v); Spatial filters : Sharpening 2) Sobel

Sharpening Filters: Laplacian Sobel

Combining Spatial Enhancement Methods  Successful image enhancement is typically not achieved using a single operation  Rather we combine a range of techniques in order to achieve a final result  This example will focus on enhancing the bone scan to the right

Combining Spatial Enhancement Methods (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Laplacian filter of bone scan (a) Sharpened version of bone scan achieved by subtracting (a) and (b) Sobel filter of bone scan (a) (a) (b) (c) (d)

Combining Spatial Enhancement Methods (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002) The product of (c) and (e) which will be used as a mask Sharpened image which is sum of (a) and (f) Result of applying apower-law trans. to (g) (e) (f) (g) (h) Image (d) smoothed with a 5*5 averaging filter

Combining Spatial Enhancement Methods (cont…)  Compare the original and final images

Edge Tracing b=rgb2gray(a); % convert to gray. WE can only do edge tracing for gray images. edge(b,'prewitt'); edge(b,'sobel'); edge(b,'sobel','vertical'); edge(b,'sobel','horizontal'); edge(b,'sobel','both');

Edge tracing We can only do edge tracing using gray scale images (i.e images without color). >> BW=rgb2gray(A); >> edge(BW,’prewitt’) That is what I saw! >>edge(BW,’sobel’,’vertical’) >>edge(BW,’sobel’,’horizontal’) >>edge(BW,’sobel’,’both’)