Filtering and Enhancing Images. Major operations 1. Matching an image neighborhood with a pattern or mask 2. Convolution (FIR filtering)

Slides:



Advertisements
Similar presentations
3-D Computer Vision CSc83020 / Ioannis Stamos  Revisit filtering (Gaussian and Median)  Introduction to edge detection 3-D Computater Vision CSc
Advertisements

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.
CS & CS Multimedia Processing Lecture 2. Intensity Transformation and Spatial Filtering Spring 2009.
Image Filtering. Outline Outline Concept of image filter  Focus on spatial image filter Various types of image filter  Smoothing, noise reductions 
Digital Image Processing
1Ellen L. Walker ImageJ Java image processing tool from NIH Reads / writes a large variety of images Many image processing operations.
E.G.M. PetrakisFiltering1 Linear Systems Many image processing (filtering) operations are modeled as a linear system Linear System δ(x,y) h(x,y)
Digital Image Processing In The Name Of God Digital Image Processing Lecture3: Image enhancement M. Ghelich Oghli By: M. Ghelich Oghli
Face Recognition and Biometric Systems 2005/2006 Filters.
Lecture 4 Linear Filters and Convolution
6/9/2015Digital Image Processing1. 2 Example Histogram.
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
1 Image filtering Hybrid Images, Oliva et al.,
Digital Image Processing
MSU CSE 803 Stockman Linear Operations Using Masks Masks are patterns used to define the weights used in averaging the neighbors of a pixel to compute.
CS 376b Introduction to Computer Vision 02 / 27 / 2008 Instructor: Michael Eckmann.
1 Image Filtering Readings: Ch 5: 5.4, 5.5, 5.6,5.7.3, 5.8 (This lecture does not follow the book.) Images by Pawan SinhaPawan Sinha formal terminology.
Image Enhancement.
1 Image filtering Images by Pawan SinhaPawan Sinha.
1 Image filtering
Image Analysis Preprocessing Arithmetic and Logic Operations Spatial Filters Image Quantization.
Lecture 2. Intensity Transformation and Spatial Filtering
MSU CSE 803 Linear Operations Using Masks Masks are patterns used to define the weights used in averaging the neighbors of a pixel to compute some result.
Chapter 3 Image Enhancement in the Spatial Domain.
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.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Presentation Image Filters
Chapter 3 Binary Image Analysis. Types of images ► Digital image = I[r][c] is discrete for I, r, and c.  B[r][c] = binary image - range of I is in {0,1}
Spatial Filtering: Basics
Digital Filters. What have we seen so far?  So far we have seen… Box filterBox filter  Moving average filter  Example of a lowpass passes low frequenciespasses.
Chapter 3 Image Enhancement in the Spatial Domain.
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.
AdeptSight Image Processing Tools Lee Haney January 21, 2010.
Convolution and Filtering
Chapter 5: Neighborhood Processing
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Image Subtraction Mask mode radiography h(x,y) is the mask.
Intelligent Vision Systems ENT 496 Image Filtering and Enhancement Hema C.R. Lecture 4.
Visual Computing Computer Vision 2 INFO410 & INFO350 S2 2015
Lecture # 19 Image Processing II. 2 Classes of Digital Filters Global filters transform each pixel uniformly according to the function regardless of.
Sejong Univ. CH3. Area Processes Convolutions Blurring Sharpening Averaging vs. Median Filtering.
CS 691B Computational Photography
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Filtering the Images.  Filtering images using low-pass filters  Filtering images using a median filter  Applying directional filters to detect edges.
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
CSE 185 Introduction to Computer Vision Image Filtering: Spatial Domain.
Grauman Today: Image Filters Smooth/Sharpen Images... Find edges... Find waldo…
Non-linear filtering Example: Median filter Replaces pixel value by median value over neighborhood Generates no new gray levels.
Filters– Chapter 6. Filter Difference between a Filter and a Point Operation is that a Filter utilizes a neighborhood of pixels from the input image to.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Image Enhancement in the Spatial Domain.
ECE 692 – Advanced Topics in Computer Vision
CS-565 Computer Vision Nazar Khan Lecture 4.
Digital Image Processing
Image Processing - in short
Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.
Image filtering Images by Pawan Sinha.
Lecture 3 (2.5.07) Image Enhancement in Spatial Domain
Image filtering Images by Pawan Sinha.
Digital Image Processing Week IV
Linear Operations Using Masks
Lecture 2: Image filtering
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Lecture 7 Spatial filtering.
Image Enhancement in the Spatial Domain
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
Presentation transcript:

Filtering and Enhancing Images

Major operations 1. Matching an image neighborhood with a pattern or mask 2. Convolution (FIR filtering)

Why? Improvement Improvement Low level feature detection Low level feature detection

Definitions Image enhancement = improve the detectability of important features Image enhancement = improve the detectability of important features –Noise reduction –Smoothing –Contrast enhancement –Edge detection

Noise reduction example

Contrast enhancement example

Definitions Image restoration = restore degraded image Image restoration = restore degraded image –Usually needs a model of degradation

Image restoration examples (deconvolution)

POINT OPERATIONS

Definitions Point operation = output pixel is determined only by the input pixel Point operation = output pixel is determined only by the input pixel –Out[x,y] = f(In[x,y]) Contrast stretching = point operator that uses a piecewise smooth function of the input gray value to enhance important details of the image. Contrast stretching = point operator that uses a piecewise smooth function of the input gray value to enhance important details of the image. What are some examples that we have already seen? What are some examples that we have already seen?

Examples of point operations: Threshold (demo) Threshold (demo) Invert (demo) Invert (demo) Out[x,y] = max – In[x,y] RGB  gray conversion RGB  gray conversion Gamma correction Gamma correction

Gamma correction example

NEIGHBORHOOD OPERATIONS

Image smoothing Neighborhood operations = require more than a single image point Neighborhood operations = require more than a single image point Box filter = smoothing via equally weighted rectangular neighborhood (mask) Box filter = smoothing via equally weighted rectangular neighborhood (mask)

Image smoothing Gaussian filter Gaussian filter

Lowpass (smoothing) filter example

Highpass filter example

Image smoothing Median filter (or more generally, order statistic or filter) Median filter (or more generally, order statistic or filter)

Median filter example

RECALL FROM A PREVIOUS DISCUSSION (HOLE AND OBJECT COUNTING)...

Masks

Mask = set of pixel positions and corresponding values called weights Mask = set of pixel positions and corresponding values called weights Mask origin = usually center Mask origin = usually center How? How? 1.Calculate sum of products Boundary Boundary 1.Replicate nearest pixel value 2.Use 0 2.Normalize or clamp (or an amplitude shift will occur) Applying masks to images

Derived from convolution: Derived from convolution: Discrete form is cross correlation: Discrete form is cross correlation: where f is the input image, h is the mask/filter kernel, and g is the output image result where f is the input image, h is the mask/filter kernel, and g is the output image result

Convolution See for some nice animations. See for some nice animations.

1*40+2*40+1*80+ 2*40+4*40+2*80+ 1*40+2*40+1*80 =800

1*40+2*80+1*80+ 2*40+4*80+2*80+ 1*40+2*80+1*80 =1120

But what about borders? When we are missing data at the edges, we typically do one of the following: When we are missing data at the edges, we typically do one of the following: 1.Copy to the missing value, the nearest neighboring value. 2.Use 0 for the missing value(s). (Regardless, it really doesn’t matter, but we need to consistently do something.)

1*40+2*40+1*40+ 2*40+4*40+2*40+ 1*40+2*40+1*40 =640 Method 1: copy nearest

The importance of normalizing or clamping the result. Otherwise, the values might get larger and larger (brighter and brighter) or go out of the original range, depending on the filter. Otherwise, the values might get larger and larger (brighter and brighter) or go out of the original range, depending on the filter.

=16 640/16