CSSE463: Image Recognition Day 5 Lab 2 due Wednesday, 1:30. Lab 2 due Wednesday, 1:30. Tip: by Tues 1:30  + 1 late day to use on: Tip: by Tues 1:30 

Slides:



Advertisements
Similar presentations
Spatial Filtering (Chapter 3)
Advertisements

Image Processing Lecture 4
CS & CS Multimedia Processing Lecture 2. Intensity Transformation and Spatial Filtering Spring 2009.
Chapter 3 Image Enhancement in the Spatial Domain.
CS 4487/9587 Algorithms for Image Analysis
Digital Image Processing
Image Enhancement in the Spatial Domain II Jen-Chang Liu, 2006.
Intensity Transformations
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)
CSSE463: Image Recognition Day 6 Yesterday: Yesterday: Local, global, and point operators all operate on entire image, changing one pixel at a time!! Local,
6/9/2015Digital Image Processing1. 2 Example Histogram.
Introduction to Computer and Human Vision Shimon Ullman, Ronen Basri, Michal Irani Assistants: Lena Gorelick Denis Simakov.
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 / 25 / 2008 Instructor: Michael Eckmann.
Linear filtering.
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.
Linear Filtering About modifying pixels based on neighborhood. Local methods simplest. Linear means linear combination of neighbors. Linear methods simplest.
 Image Enhancement in Spatial Domain.  Spatial domain process on images can be described as g(x, y) = T[f(x, y)] ◦ where f(x,y) is the input image,
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Spatial Filtering: Basics
Filtering and Enhancing Images. Major operations 1. Matching an image neighborhood with a pattern or mask 2. Convolution (FIR filtering)
Digital Image Processing Lecture 10: Image Restoration March 28, 2005 Prof. Charlene Tsai.
Chapter 5: Neighborhood Processing
Linear filtering. Motivation: Noise reduction Given a camera and a still scene, how can you reduce noise? Take lots of images and average them! What’s.
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Digital Image Processing Lecture 10: Image Restoration
Image Subtraction Mask mode radiography h(x,y) is the mask.
Course 2 Image Filtering. Image filtering is often required prior any other vision processes to remove image noise, overcome image corruption and change.
Intelligent Vision Systems ENT 496 Image Filtering and Enhancement Hema C.R. Lecture 4.
Visual Computing Computer Vision 2 INFO410 & INFO350 S2 2015
CSSE463: Image Recognition Day 6 Yesterday: Local, global, and point operators use different context, but all Yesterday: Local, global, and point operators.
İmage enhancement Prepare image for further processing steps for specific applications.
Reconnaissance d’objets et vision artificielle
Linear filtering. Motivation: Image denoising How can we reduce noise in a photograph?
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
Non-linear filtering Example: Median filter Replaces pixel value by median value over neighborhood Generates no new gray levels.
Image Processing Lab Section 28/3/2016 Prepared by Mahmoud Abdelsatar Demonstrator at IT Dep. Faculty of computers and information Assuit University.
Digital Image Processing Lecture 10: Image Restoration
Linear Filters and Edges Chapters 7 and 8
CSSE463: Image Recognition Day 5
- photometric aspects of image formation gray level images
Image filtering Hybrid Images, Oliva et al.,
CIS 350 – 3 Image ENHANCEMENT SPATIAL DOMAIN
Image Enhancement in the Spatial Domain
Image filtering Images by Pawan Sinha.
Image filtering Images by Pawan Sinha.
Histogram Probability distribution of the different grays in an image.
Image filtering Images by Pawan Sinha.
Most slides from Steve Seitz
Image filtering Images by Pawan Sinha.
CSSE463: Image Recognition Day 5
Image filtering
Image filtering
CSSE463: Image Recognition Day 6
Linear Operations Using Masks
CSSE463: Image Recognition Day 5
Spatial filtering 3x3 kernel Definition Transformation or set of
CSSE463: Image Recognition Day 6
CSSE463: Image Recognition Day 5
CSSE463: Image Recognition Day 6
Lecture 2: Image filtering
Intensity Transformation
CSSE463: Image Recognition Day 6
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Most slides from Steve Seitz
Image Enhancement in the Spatial Domain
Presentation transcript:

CSSE463: Image Recognition Day 5 Lab 2 due Wednesday, 1:30. Lab 2 due Wednesday, 1:30. Tip: by Tues 1:30  + 1 late day to use on: Tip: by Tues 1:30  + 1 late day to use on: Fruit Finder due Friday, 11:59 pm. Fruit Finder due Friday, 11:59 pm. Ask questions as they arise, about technique or about MATLAB Ask questions as they arise, about technique or about MATLAB Today: Global vs local operations, filtering Today: Global vs local operations, filtering Questions? Questions?

Global vs. local operators Given a pixel, p, it can be transformed to p’ using: Given a pixel, p, it can be transformed to p’ using: Global operators Global operators Use information from the entire image Use information from the entire image p’ = f(p, p  img) p’ = f(p, p  img) Local operators Local operators Transform each pixel based on its value or its neighborhoods’ values only (p N includes p) Transform each pixel based on its value or its neighborhoods’ values only (p N includes p) p’ = f(p, p  p N ) p’ = f(p, p  p N ) Q1

Enhancement: gray-level mapping Maps each pixel value to another value Could use a lookup table, e.g., [(0,0), (1, 3), (2, 5), …] Could use a function Identity mapping, y=x is straight line Function values above y=x are boosted, those below are suppressed. Gamma function, y = x^(1/g) (assuming x in range [0,1]) is a common a control in monitors/TVs. g=2 shown to left Effect? Q2

Gamma mappings, y = x^(1/g) Original Dark (g = 0.5) Light (g = 2)Very light (g = 4)

Histogram Equalization Creates a mapping that flattens the histogram. Creates a mapping that flattens the histogram. Uses full range [0, 255] Uses full range [0, 255] Good: “automatically” enhances contrast where needed. Good: “automatically” enhances contrast where needed. Approx same level of pixels of each gray level Approx same level of pixels of each gray level Unpredictable results. Unpredictable results. Maintains the histogram’s shape, but changes the density of the histogram Maintains the histogram’s shape, but changes the density of the histogram Good example of a global operation Good example of a global operation Next: pros and cons Next: pros and cons

HistEq on Sunset

HistEq on Matt Whoops!

But where’s the color? Can we use gray-level mapping on color images? Can we use gray-level mapping on color images? Discuss how Discuss how Q3

Local operators The most common local operators are filters. The most common local operators are filters. Today: for smoothing Today: for smoothing Tomorrow: for edge detection Tomorrow: for edge detection

Image smoothing Gaussian distributions are often used to model noise in the image Gaussian distributions are often used to model noise in the image g = g r + N(0,  ) g = g r + N(0,  ) g = sensed gray value g = sensed gray value g r = real grayvalue g r = real grayvalue N(0,  ) is a Gaussian (aka, Normal, or bell curve) with mean = 0, std. dev = . N(0,  ) is a Gaussian (aka, Normal, or bell curve) with mean = 0, std. dev = . Lots of Gaussian distributions in this course… Lots of Gaussian distributions in this course… Answer: average it out! 3 methods Answer: average it out! 3 methods Box filter Box filter Gaussian filter Gaussian filter Median filter Median filter

Box filters Simplest. Simplest. Improves homogeneous regions. Improves homogeneous regions. Unweighted average of the pixels in a small neighborhood. Unweighted average of the pixels in a small neighborhood. For 5x5 neighborhood, For 5x5 neighborhood, See why this is a “local operation?” I = orig image, J=filtered image

Gaussian filters Then use weight in box filter formula Then use weight in box filter formula In practice, we use a discrete approximation to W(i,j) In practice, we use a discrete approximation to W(i,j) Nicest theoretical properties. Nicest theoretical properties. Average weighted by distance from center pixel. Weight of pixel (i,j): Average weighted by distance from center pixel. Weight of pixel (i,j):

Median filters Step edge demo Step edge demo smoothGaussDemo smoothGaussDemo Salt demo Salt demo smoothSaltDemo smoothSaltDemo Averaging filters have two problems. Averaging filters have two problems. They blur edges. They don’t do well with “salt-and-pepper” noise: Faulty CCD elements Dust on lens Median filter: Replace each pixel with the median of the pixels in its neighborhood Median filter: Replace each pixel with the median of the pixels in its neighborhood More expensive Harder to do with hardware But can be made somewhat efficient But can be made somewhat efficient (Sonka, p 129) Hybrid: sigma filtering Hybrid: sigma filtering Q4,5

Discrete filters Discrete 3x3 box filter: Discrete 3x3 box filter: To get the output at a single point, take cross- correlation (basically a dot-product) of filter and image at that point To get the output at a single point, take cross- correlation (basically a dot-product) of filter and image at that point To filter the whole image, shift the filter over each pixel in the original image To filter the whole image, shift the filter over each pixel in the original image