Matlab Tutorial Continued Files, functions and images.

Slides:



Advertisements
Similar presentations
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 4 – Digital Image Representation Klara Nahrstedt Spring 2009.
Advertisements

Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
Motion illusion, rotating snakes. Slide credit Fei Fei Li.
E.G.M. PetrakisFiltering1 Linear Systems Many image processing (filtering) operations are modeled as a linear system Linear System δ(x,y) h(x,y)
Lecture 4 Linear Filters and Convolution
Lecture 2: Filtering CS4670/5670: Computer Vision Kavita Bala.
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
Announcements Problem Set 2, handed out today, due next Tuesday. Late Homework should be turned into my office with date and time written on it. Mail problem.
Image processing. Image operations Operations on an image –Linear filtering –Non-linear filtering –Transformations –Noise removal –Segmentation.
Computer Vision Introduction to Image formats, reading and writing images, and image environments Image filtering.
Lecture 1: Images and image filtering
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.
Linear filtering. Overview: Linear filtering Linear filters Definition and properties Examples Gaussian smoothing Separability Applications Denoising.
Announcements For future problems sets: matlab code by 11am, due date (same as deadline to hand in hardcopy). Today’s reading: Chapter 9, except.
CS443: Digital Imaging and Multimedia Filters Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University Spring 2008 Ahmed Elgammal Dept.
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.
Announcements Class mailing list: send to Hyoungjune Yi: Homework at the end of class. Text is on reserve in the.
Lecture 2: Image filtering
Linear filtering.
Linear Filtering About modifying pixels based on neighborhood. Local methods simplest. Linear means linear combination of neighbors. Linear methods simplest.
Basic Image Processing January 26, 30 and February 1.
Most slides from Steve Seitz
Filtering Course web page: vision.cis.udel.edu/cv March 5, 2003  Lecture 9.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Matlab tutorial and Linear Algebra Review Today’s goals: Learn enough matlab to get started. Review some basics of Linear Algebra Essential for geometry.
CS559: Computer Graphics Lecture 3: Digital Image Representation Li Zhang Spring 2008.
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Linear Filters Monday, Jan 24 Prof. Kristen Grauman UT-Austin …
Linear Filters August 27 th 2015 Devi Parikh Virginia Tech 1 Slide credit: Devi Parikh Disclaimer: Many slides have been borrowed from Kristen Grauman,
Image Filtering Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/02/10.
Why is computer vision difficult?
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
Intelligent Vision Systems ENT 496 Image Filtering and Enhancement Hema C.R. Lecture 4.
Visual Computing Computer Vision 2 INFO410 & INFO350 S2 2015
CS 691B Computational Photography
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 4 – Audio and Digital Image Representation Klara Nahrstedt Spring 2010.
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.
Filtering (II) Dr. Chang Shu COMP 4900C Winter 2008.
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
CSE 185 Introduction to Computer Vision Image Filtering: Spatial Domain.
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Noah Snavely Hybrid Images, Oliva et al.,
Image Processing Goal –Start simple: look at small windows –Identify useful image structures (‘Clues’ useful for recognizing objects) –Eliminate irrelevant.
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.
Correlation and Convolution They replace the value of an image pixel with a combination of its neighbors Basic operations in images Shift Invariant Linear.
Digital Image Processing Lecture 10: Image Restoration
Linear Filters and Edges Chapters 7 and 8
Filtering – Part I Gokberk Cinbis Department of Computer Engineering
Lecture 1: Images and image filtering
Recap from Wednesday Spectra and Color Light capture in cameras and humans.
Filters (Smoothing, Edge Detection)
9th Lecture - Image Filters
Image filtering Images by Pawan Sinha.
Motion illusion, rotating snakes
Linear filtering.
Lecture 5: Resampling, Compositing, and Filtering Li Zhang Spring 2008
Basic Image Processing
Digital Image Processing Week IV
Most slides from Steve Seitz
Image filtering
Lecture 2: Image filtering
Lecture 1: Images and image filtering
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Most slides from Steve Seitz
Presentation transcript:

Matlab Tutorial Continued Files, functions and images.

Announcements Week of Feb. 17 th Jacobs office hours change. –Tuesday, 18 th 3-4. –Friday, 21 st 3:30-4:30 TA office hours still Monday 17 th 4-6.

Files Matlab

Functions Format: function o = test(x,y) Name function and file the same. Only first function in file is visible outside the file. Look at sample function

Images Black and white image is a 2D matrix. Intensities represented as pixels. Color images are 3D matrix, RBG. Matlab

Debugging Add print statements to function by leaving off ; keyboard debug and breakpoint

Conclusions Quick tour of matlab, you should teach yourself the rest. We’ll give hints in problem sets. Linear algebra allows geometric manipulation of points. Learn to love SVD.

Linear Filtering About modifying pixels based on neighborhood. Local methods simplest. Linear means linear combination of neighbors. Linear methods simplest. Useful to: –Integrate information over constant regions. –Scale. –Detect changes. Fourier analysis. Many nice slides taken from Bill Freeman.

(Freeman)

Convolution Convolution kernel g, represented as matrix. –it’s associative Result is:

Filtering to reduce noise Noise is what we’re not interested in. –We’ll discuss simple, low-level noise today: Light fluctuations; Sensor noise; Quantization effects; Finite precision –Not complex: shadows; extraneous objects. A pixel’s neighborhood contains information about its intensity. Averaging noise reduces its effect.

Additive noise I = S + N. Noise doesn’t depend on signal. We’ll consider:

Average Filter Mask with positive entries, that sum 1. Replaces each pixel with an average of its neighborhood. If all weights are equal, it is called a BOX filter F1/9 (Camps)

Does it reduce noise? Intuitively, takes out small variations. (Camps) 2 2 2

Matlab Demo of Averaging

Example: Smoothing by Averaging

Smoothing as Inference About the Signal += Nearby points tell more about the signal than distant ones. Neighborhood for averaging.

Gaussian Averaging Rotationally symmetric. Weights nearby pixels more than distant ones. –This makes sense as probabalistic inference. A Gaussian gives a good model of a fuzzy blob

An Isotropic Gaussian The picture shows a smoothing kernel proportional to (which is a reasonable model of a circularly symmetric fuzzy blob)

Smoothing with a Gaussian

The effects of smoothing Each row shows smoothing with gaussians of different width; each column shows different realizations of an image of gaussian noise.

Efficient Implementation Both, the BOX filter and the Gaussian filter are separable: –First convolve each row with a 1D filter –Then convolve each column with a 1D filter.

Smoothing as Inference About the Signal: Non-linear Filters. += What’s the best neighborhood for inference?

Filtering to reduce noise: Lessons Noise reduction is probabilistic inference. Depends on knowledge of signal and noise. In practice, simplicity and efficiency important.

Filtering and Signal Smoothing also smooths signal. Matlab Removes detail Matlab This is good and bad: - Bad: can’t remove noise w/out blurring shape. - Good: captures large scale structure; allows subsampling.

Subsampling Matlab