CS 376b Introduction to Computer Vision 02 / 27 / 2008 Instructor: Michael Eckmann.

Slides:



Advertisements
Similar presentations
November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Advertisements

Spatial Filtering (Chapter 3)
CS 376b Introduction to Computer Vision 04 / 21 / 2008 Instructor: Michael Eckmann.
Sliding Window Filters and Edge Detection Longin Jan Latecki Computer Graphics and Image Processing CIS 601 – Fall 2004.
1Ellen L. Walker Edges Humans easily understand “line drawings” as pictures.
Lecture 4 Linear Filters and Convolution
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
1 Image filtering Hybrid Images, Oliva et al.,
CS 376b Introduction to Computer Vision 04 / 11 / 2008 Instructor: Michael Eckmann.
Image processing. Image operations Operations on an image –Linear filtering –Non-linear filtering –Transformations –Noise removal –Segmentation.
Computer Vision - A Modern Approach
CS 376b Introduction to Computer Vision 03 / 26 / 2008 Instructor: Michael Eckmann.
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.
Edge Detection Phil Mlsna, Ph.D. Dept. of Electrical Engineering
CS 376b Introduction to Computer Vision 02 / 18 / 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.
CS443: Digital Imaging and Multimedia Filters Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University Spring 2008 Ahmed Elgammal Dept.
CS 376b Introduction to Computer Vision 02 / 25 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 14 / 2008 Instructor: Michael Eckmann.
1 Image filtering Images by Pawan SinhaPawan Sinha.
1 Image filtering
Lecture 2: Image filtering
CS 376b Introduction to Computer Vision 03 / 04 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 04 / 2008 Instructor: Michael Eckmann.
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.
Most slides from Steve Seitz
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Chapter 10: Image Segmentation
CS 325 Introduction to Computer Graphics 03 / 03 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 12 / 2007 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 02 / 17 / 2010 Instructor: Michael Eckmann.
Basis beeldverwerking (8D040) dr. Andrea Fuster Prof.dr. Bart ter Haar Romeny dr. Anna Vilanova Prof.dr.ir. Marcel Breeuwer Convolution.
CS 376b Introduction to Computer Vision 02 / 22 / 2008 Instructor: Michael Eckmann.
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Image Processing Edge detection Filtering: Noise suppresion.
SHINTA P. Juli What are edges in an image? Edge Detection Edge Detection Methods Edge Operators Matlab Program.
CS 376b Introduction to Computer Vision 03 / 21 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 28 / 2008 Instructor: Michael Eckmann.
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 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Edges.
CS 376b Introduction to Computer Vision 02 / 11 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 18 / 2008 Instructor: Michael Eckmann.
CS654: Digital Image Analysis
CS 691B Computational Photography
CSE 6367 Computer Vision Image Operations and Filtering “You cannot teach a man anything, you can only help him find it within himself.” ― Galileo GalileiGalileo.
CS 376b Introduction to Computer Vision 02 / 15 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 02 / 12 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 17 / 2008 Instructor: Michael Eckmann.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities May 2, 2005 Prof. Charlene Tsai.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Instructor: Mircea Nicolescu Lecture 7
September 26, 2013Computer Vision Lecture 8: Edge Detection II 1Gradient In the one-dimensional case, a step edge corresponds to a local peak in the first.
Sliding Window Filters Longin Jan Latecki October 9, 2002.
1 Edge Operators a kind of filtering that leads to useful features.
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Image Enhancement in the Spatial Domain.
Concept 1: Computing Weighted Sum. Is an operation between two tables of numbers, usually between an image and weights. Typically, if one table is smaller,
Basis beeldverwerking (8D040) dr. Andrea Fuster dr. Anna Vilanova Prof
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Linear Filters and Edges Chapters 7 and 8
Computer Vision Lecture 9: Edge Detection II
Computer Vision Lecture 16: Texture II
Image filtering Images by Pawan Sinha.
a kind of filtering that leads to useful features
a kind of filtering that leads to useful features
Image filtering Images by Pawan Sinha.
Linear Operations Using Masks
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Presentation transcript:

CS 376b Introduction to Computer Vision 02 / 27 / 2008 Instructor: Michael Eckmann

Michael Eckmann - Skidmore College - CS 376b - Spring 2008 Today’s Topics Comments/Questions Enhancing images (Chap. 5)‏ –averaging (smoothing) filters –cross-correlation –convolution –smoothing examples –Prewitt and Sobel gradient masks and the idea behind them

Michael Eckmann - Skidmore College - CS Spring 2008 Cross-correlation The process described on the last slide is similar to cross-correlation of an image and a mask. Cross-correlation involves aligning the origin of the mask with a pixel in question and multiplying the corresponding mask pixel values with the pixels in the original image and summing them all up. This summed up value is the value of the new pixel. No divide takes place. Typical masks though will either sum up to 0 or 1. A smoothing mask will sum up to 1. A derivative mask will sum up to 0. examples on the board of square masks with these properties let's review figures 5.11 (and consider using [-1,+1], 5.12, and 5.13

Michael Eckmann - Skidmore College - CS Spring 2008 Derivative and Smoothing masks Derivative masks –values have opposite signs in order to obtain a high response in signal regions of high contrast –sum of values is 0, so a 0 results from constant regions –first derivative masks produce high abs values at points of high contrast –second derivative masks produce zero-crossings at points of high contrast Smoothing masks –values are positive and sum to 1, so resulting value is same as input in constant regions

Michael Eckmann - Skidmore College - CS Spring 2008 Convolution –is similar to cross-correlation except the upper-left value in the mask is multiplied by the lower-right value in the image neighborhood and so on until the lower-right value in the mask is multiplied by the upper-left value in the image. –think of the mask being flipped along the horizontal axis and then again along the vertical axis AND THEN doing cross-correlation with the flipped mask picture on the board (and take a look at handout)‏ If the mask is symmetrical both vertically and horizontally, then cross- correlation and convolution yield the same result. The two terms are often confused and sometimes used interchangeably (incorrectly.)‏

Michael Eckmann - Skidmore College - CS Spring 2008 Considerations resulting value of output image pixels can be much larger than the input image pixels due to the summation, it is also possible for the output image pixels to yield negative values if the mask contains negatives --- so the type of the new image needs to be considered as possibly being different than the input image type what to do at borders of the image when cross-correlating or convolving and image and a mask and the mask overlaps (doesn't have corresponding pixels for one or more mask values.)‏ –no processing -> make all the border pixels 0 in output image; copy the border pixels from input to output; make the output image smaller; reduce the size of the mask at the border locations; reflected indexing; circular indexing note: this list comes from “Digital Image Processing” by Nick Efford.

Michael Eckmann - Skidmore College - CS Spring 2008 Computational considerations consider the computation involved in convolution or cross-correlation –if mask is size n x n, then for each pixel in the input image, we do n 2 multiplies and n 2 -1 additions. if a mask is separable into two vectors that, when we take the cross product of them, we get the original mask (example on the board) then we can reduce the computational complexity by first convolving or correlating the image with the column vector and then the resulting image can be convolved or correlated with the row vector to get the output image (which would be the same as convolving or correlating the nxn mask with the original image). –how many multiplies and additions now?

Michael Eckmann - Skidmore College - CS Spring 2008 Computational considerations if a mask is separable into two vectors that, when we take the cross product of them, we get the original mask (example on the board) then we can reduce the computational complexity by first convolving or correlating the image with the column vector and then the resulting image can be convolved or correlated with the row vector to get the output image (which would be the same as convolving or correlating the nxn mask with the original image). –how many multiplies and additions now? –(2n multiplies and 2(n-1) additions) per pixel

Michael Eckmann - Skidmore College - CS Spring 2008 Smoothing examples Gaussian function on the board Let's look at a little program to generate Gaussian masks Let's look at some images and the effect of smoothing them using gimp, but gimp doesn't allow you to set the standard deviation.

Michael Eckmann - Skidmore College - CS Spring 2008 Estimating the gradient Often we want to find boundaries in images and know how sharp the boundaries are and in which direction the boundaries are. Given f(x,y) as our image function, we would like to compute the gradient at pixels [x,y]. The magnitude of the gradient will give us an indication of how sharp a boundary is, and the angle of the gradient will give us the direction. If we want to estimate the magnitude and direction of the gradient (where the maximum change occurs) do the following: The partial derivative of f w.r.t. x and the partial derivative of f w.r.t y make up the gradient.

Michael Eckmann - Skidmore College - CS Spring 2008 Estimating the gradient The partial derivative of f w.r.t. x and the partial derivative of f w.r.t y make up the gradient. We can estimate these values in a discrete image at pixel with coords x,y: –for x: take the difference between the pixel at x-1, y and x+1, y –for y: take the difference between the pixel at x, y-1 and x, y+1 We can get a better estimate if we average these calculations above and below and to the right and left of the pixel in question. Example on the board (figure 5.14)‏ These lead to the Prewitt masks The Sobel masks come from the same idea but with twice the weight given to the row/col the pixel is in.