CSC589 Introduction to Computer Vision Lecture 3 Gaussian Filter, Histogram Equalization Bei Xiao.

Slides:



Advertisements
Similar presentations
Lecture 2: Convolution and edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Advertisements

Spatial Filtering (Chapter 3)
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.
Motion illusion, rotating snakes. Slide credit Fei Fei Li.
Computational Photography CSE 590 Tamara Berg Filtering & Pyramids.
EE 4780 Image Enhancement. Bahadir K. Gunturk2 Image Enhancement The objective of image enhancement is to process an image so that the result is more.
Digital Image Processing
Digital Image Processing Contrast Enhancement: Part II
Antti Tuomas Jalava Jaime Garrido Ceca
Digital Image Processing In The Name Of God Digital Image Processing Lecture3: Image enhancement M. Ghelich Oghli By: M. Ghelich Oghli
Lecture 2: Filtering CS4670/5670: Computer Vision Kavita Bala.
Digtial Image Processing, Spring ECES 682 Digital Image Processing Oleh Tretiak ECE Department Drexel University.
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
Multimedia Data Introduction to Image Processing Dr Mike Spann Electronic, Electrical and Computer.
1 Vladimir Botchko Lecture 4. Image Enhancement Lappeenranta University of Technology (Finland)
Lecture 1: Images and image filtering
1 Linear image transforms Let’s start with a 1-D image (a “signal”): A very general and useful class of transforms are the linear transforms of f, defined.
Announcements Kevin Matzen office hours – Tuesday 4-5pm, Thursday 2-3pm, Upson 317 TA: Yin Lou Course lab: Upson 317 – Card access will be setup soon Course.
Image Enhancement.
Lecture 2: Image filtering
Linear filtering.
1 Image filtering Hybrid Images, Oliva et al.,
CS4670: Computer Vision Kavita Bala Lecture 7: Harris Corner Detection.
Lecture 2. Intensity Transformation and Spatial Filtering
Basic Image Processing January 26, 30 and February 1.
 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.
Digital Image Processing
CSC589 Introduction to Computer Vision Lecture 8
CSC 589 Introduction to Computer Vision Lecture 2 linear filtering Instructor: Bei Xiao Thursday, January 15th Salvador Dali “Gala Contemplating the Mediterranean.
Multimedia Data Introduction to Image Processing Dr Sandra I. Woolley Electronic, Electrical.
Image Processing Xuejin Chen Ref:
Digital Image Processing Lecture 4: Image Enhancement: Point Processing Prof. Charlene Tsai.
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.
Digital Image Processing CSC331 Image Enhancement 1.
Image Filtering Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/02/10.
Why is computer vision difficult?
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.
Image Subtraction Mask mode radiography h(x,y) is the mask.
CSC508 Convolution Operators. CSC508 Convolution Arguably the most fundamental operation of computer vision It’s a neighborhood operator –Similar to the.
Digital Image Processing Lecture 5: Neighborhood Processing: Spatial Filtering March 9, 2004 Prof. Charlene Tsai.
Sejong Univ. CH3. Area Processes Convolutions Blurring Sharpening Averaging vs. Median Filtering.
CS 691B Computational Photography
Digital Image Processing Part 3 Spatial Domain Processing.
EE 7730 Image Enhancement. Bahadir K. Gunturk2 Image Enhancement The objective of image enhancement is to process an image so that the result is more.
Reconnaissance d’objets et vision artificielle
Linear filtering. Motivation: Image denoising How can we reduce noise in a photograph?
CSE 185 Introduction to Computer Vision Image Filtering: Spatial Domain.
Images and Filters CSEP 576 Ali Farhadi Many slides from Steve Seitz and Larry Zitnick.
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Noah Snavely Hybrid Images, Oliva et al.,
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Image Subtraction Mask mode radiography h(x,y) is the mask.
ECE 692 – Advanced Topics in Computer Vision
The Chinese University of Hong Kong
Digital Image Processing
Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.
ENG4BF3 Medical Image Processing
Lecture 1: Images and image filtering
Lecture 3 (2.5.07) Image Enhancement in Spatial Domain
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Motion illusion, rotating snakes
Image filtering
Image filtering
Histogram Equalization
Lecture 1: Images and image filtering
Image Enhancement in the Spatial Domain
Presentation transcript:

CSC589 Introduction to Computer Vision Lecture 3 Gaussian Filter, Histogram Equalization Bei Xiao

Last lecture Image can represented as a matrix Point process Linear filter: convolution

Take-home assignments Chapter 3.2 on linear filtering Image Histogram Equalization (pdf will be uploaded in blackboard) Chapter 1 of Solem (Computer vision with Python). Many useful examples Homework will be out this weekend and due a week.

Today’s lecture More on linear filter, Image Sharpening Gaussian Filter (introduction) Image Histogram Equalization Basic image processing tutorial

Last time we talked about convolution

Image Sharpening Take this image and blur it

Image Sharpening What do we get if we subtract this two? This is the left-over sharp stuff!

Let’s make the image sharper? We know: “sharp stuff + blurred = original”

Let’s boost the sharp stuff a little

Side by Side

Now look at the computation Operations – 1 convolution – 1 subtraction over the whole image As an equation:

Rewrite this

Now look at the computation Can pre-compute new filter Operations 1 convolution

Photoshop: Unsharp Masknig g g

Unsharp Masking (Scipy) alpha = 30 im_blur = filters.gaussian_filter(im, 3) im_blur2 = filters.gaussian_filter(im_blur,1) im_sharpened = im_blur + alpha * (im_blur - im_blur2)

Unsharp Masking (Scikit)

Unsharp Masking (MATLAB) a = imread(‘rice.png’) imshow(a) b = imsharpen(a,’Radius’,2, ‘Amount’,1); Imshow(b)

Your Convolution filter toolbox 90% of the filtering that you will do will be either Smoothing (or Blurring) High-Pass Filtering (will explain later) Most common filters: Smoothing: Gaussian High Pass Filtering: Derivative of Gaussian

Gaussian Filter Gaussian = normal distribution function

Gaussian Filter Gaussian = normal distribution function

Gaussian Filter Gaussian = normal distribution function

Gaussian Filter Gaussian = normal distribution function

Gaussian filter with different σ σ = 3 σ = 5 σ = 7 Original

Gaussian Filter Remove “high-frequency” components from image (low-pass filter) – Images become more smooth Convolution with self is another Gaussian – So can smooth with small-width kernel, repeat and get same result as larger-width kernel would have. – Convolving two times with kernel width σ is same as convolving once with kernel width σ/2 (Can you proof this?)

Separability of the Gaussian filter The 2D Gaussian can be expressed as the product of two functions, one a function of x and the other the function of y. In this case, the two functions are (identical) 1D Gaussian.

Why is separability useful? The process of performing a convolution requires K^2 operations per pixel Suppose v and h are horizontal and vertical kernels. K = vh^T 2K operations per pixel!

Image Histogram Equalization We have a low-contrast image:

Image Histogram Equalization We would like to increase the contrast

What is a histogram

Image Histogram Equalization We have a low-contrast image: Limited image range

Image Histogram Equalization What we want is a histogram that covers the whole range of [0,255], but the shape must be preserved! Ideal histogram

PDF, density of a continuous random variable, is a function that describes the relative likelihood for this random variable to take on a given value. Mini detour of Probability Theory

cumulative distribution function (CDF), describes the probability that a real- valued random variable X with a given probability distribution will be found to have a value less than or equal to x.

How does it work? Mapping one distribution to another distribution (a wider and more uniform of intensity values) so that the intensity values are spreading over the whole range The mapping should be the cumulative density function (CDF)

Stretching the CDF Transform Before After

Next class Bordering effect Image Derivatives