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

Slides:



Advertisements
Similar presentations
Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
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.
Topic 4 - Image Mapping - I DIGITAL IMAGING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Intensity Transformations (Chapter 3)
EE663 Image Processing Histogram Equalization Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Digital Image Processing
Image Enhancement in the Spatial Domain
Intensity Transformations
1Ellen L. Walker ImageJ Java image processing tool from NIH Reads / writes a large variety of images Many image processing operations.
Digital Image Processing In The Name Of God Digital Image Processing Lecture3: Image enhancement M. Ghelich Oghli By: M. Ghelich Oghli
EEE 498/591- Real-Time DSP1 What is image processing? x(t 1,t 2 ) : ANALOG SIGNAL x : real value (t 1,t 2 ) : pair of real continuous space (time) variables.
6/9/2015Digital Image Processing1. 2 Example Histogram.
CS 376b Introduction to Computer Vision 04 / 11 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 26 / 2008 Instructor: Michael Eckmann.
Digital Image Processing
CS 376b Introduction to Computer Vision 04 / 04 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 02 / 27 / 2008 Instructor: Michael Eckmann.
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.
Image Enhancement.
CS 376b Introduction to Computer Vision 04 / 14 / 2008 Instructor: Michael Eckmann.
1 Image filtering Images by Pawan SinhaPawan Sinha.
Computer Vision Basics Image Terminology Binary Operations Filtering Edge Operators.
Lecture 2. Intensity Transformation and Spatial Filtering
CSCE 441: Computer Graphics Image Filtering Jinxiang Chai.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 02 / 2008 Instructor: Michael Eckmann.
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
CS 376b Introduction to Computer Vision 04 / 29 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 02 / 22 / 2008 Instructor: Michael Eckmann.
HCI/ComS 575X: Computational Perception Instructor: Alexander Stoytchev
Multimedia Data Introduction to Image Processing Dr Sandra I. Woolley Electronic, Electrical.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing Prof. Charlene Tsai.
AdeptSight Image Processing Tools Lee Haney January 21, 2010.
CS654: Digital Image Analysis Lecture 18: Image Enhancement in Spatial Domain (Histogram)
CS 376b Introduction to Computer Vision 03 / 21 / 2008 Instructor: Michael Eckmann.
Digital Image Processing Lecture 3: Image Display & Enhancement March 2, 2005 Prof. Charlene Tsai.
Intensity Transformations (Histogram Processing)
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.
COMP322/S2000/L171 Robot Vision System Major Phases in Robot Vision Systems: A. Data (image) acquisition –Illumination, i.e. lighting consideration –Lenses,
CS 376b Introduction to Computer Vision 02 / 11 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 03 / 18 / 2008 Instructor: Michael Eckmann.
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 4: Image Enhancement: Point Processing January 13, 2004 Prof. Charlene Tsai.
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.
HCI/ComS 575X: Computational Perception Instructor: Alexander Stoytchev
Image Subtraction Mask mode radiography h(x,y) is the mask.
IMAGE PROCESSING AKSHAY P S3 EC ROLL NO. 9.
Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.
CIS 350 – 3 Image ENHANCEMENT SPATIAL DOMAIN
Image filtering Images by Pawan Sinha.
Lecture 3 (2.5.07) Image Enhancement in Spatial Domain
Binary Image Analysis used in a variety of applications:
HCI / CprE / ComS 575: Computational Perception
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Histogram Probability distribution of the different grays in an image.
Image filtering Images by Pawan Sinha.
Digital Image Processing
Digital Image Processing Week IV
Intensity Transformation
Intensity Transformations and Spatial Filtering
Intensity Transform Contrast Stretching Y ← u0+γ*(Y-u)/s
Image Enhancement in the Spatial Domain
Binary Image Analysis used in a variety of applications:
Presentation transcript:

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

Michael Eckmann - Skidmore College - CS 376b - Spring 2008 Today’s Topics Comments/Questions In class exam on March 5th, details to follow by tomorrow review my program to perform dilation and erosion using openCV thresholding –automatic thresholding using Otsu method Enhancing images (Chap. 5)‏ –greylevel mapping functions –histogram equalization –removal of salt and pepper noise in binary and grey scale images –averaging (smoothing) filters

Michael Eckmann - Skidmore College - CS Spring 2008 thresholding thresholding is a way to make a binary image out of a greyscale image –assume t and t h are thresholds (for an 8bit greyscale image, a value between 0 and 255)‏ –threshold above makes all pixels with greyvalue >= t be 1, others 0 –threshold below makes all pixels with greyvalue < t be 1, others 0 –threshold inside makes all pixels with t <= greyvalue < t h be 1, others 0 –threshold outside makes all pixels with t > greyvalue OR greyvalue >= t h be 1, others 0 can use a histogram to compute these thresholds –if the histogram is bimodal (2 modes) that are distinct (contain a valley with values near 0 between the modes) then can choose a threshold as a greyvalue in the valley (example on the board)‏

Michael Eckmann - Skidmore College - CS Spring 2008 thresholding Otsu method of automatic threshold determination (1979)‏ assumes a bimodal distribution (may not work well when this assumption does not hold)‏ range of grey values: 0 to I Histogram probabilities for each grey value –P(i) = # of pixels with greyvalue i / total # of pixels in image The procedure works like follows –choose a threshold t –compute the variance of the pixels with grey values less than or equal to t the pixels with grey values greater than t –the best t is when the weighted sum of the Within-Group variance is minimized

Michael Eckmann - Skidmore College - CS Spring 2008 thresholding assume group 1 is comprised of the pixels with grey values <= t and group 2 is comprised of the others the Within-Group variance is defined to be q 1 (t)*Var 1 (t) + q 2 (t)*Var 2 (t)‏ where q 1 (t) = Sum of the P(i)'s for all i's <= t q 2 (t) = Sum of the P(i)'s for all i's > t computing all this stuff for every possible threshold t would be very inefficient. However, there is a way to make it more efficient by extracting all the computations that are not dependent on t.

Michael Eckmann - Skidmore College - CS Spring 2008 thresholding Instead of minimizing the Within-Group variance, one can maximize the Between-Group variance which is a formula containing only q 1 (t) and the means of the two groups. q 1 (t+1) is easily computed from q 1 (t) how? mean 1 (t+1) can be computed from mean 1 (t) and q 1 (t)‏ similarly for mean 2 (t+1)‏

Michael Eckmann - Skidmore College - CS Spring 2008 thresholding Dynamic thresholding - If the intensities of the pixels are strongly dependent on the location in the image, then one can use local thresholds (and apply them only in the local area) as opposed to global thresholds Knowledge-based thresholding – uses prior knowledge of the shape/size of objects to determine the regions and the thresholds

Michael Eckmann - Skidmore College - CS Spring 2008 Enhancing Images When to enhance an image –if an image contains unwanted (for whatever reason) variation of some data we wish to extract e.g., reduce noise, enhance contrast, enhance contours/edges A pixel in our output image can depend on –a local neighborhood of pixels in the input image –global information about the input image

Michael Eckmann - Skidmore College - CS Spring 2008 Enhancing Images Grey-level mapping –specify a function whose domain is the input image intensities and whose range is the output image intensities –sometimes called contrast stretching –example of some mapping functions on the board and in the gimp point operator –Out[x,y] = f(In[x,y])‏ output pixel value depends only on the input pixel value (not a neighborhood) but f can depend on global parameters

Michael Eckmann - Skidmore College - CS Spring 2008 Enhancing Images Histogram equalization –the idea is, given an input image and its histogram, we want to create an output image with an approximately uniform histogram and use all the available grey levels in the output image –the transformation should be single-valued and monotonically increasing Compute probabilities of each of the input grey values cumulative distribution function (cdf) which is a function on each grey value and whose value is the sum of all probabilities <= that grey value multiply the cdf by L-1, where L is the # of grey values in output image round the value to an integer

Michael Eckmann - Skidmore College - CS Spring 2008 Enhancing Images Examples on the board of computing: probabilities of each of the input grey values cumulative distribution function (cdf) which is a function whose domain is each grey value and value of the function is the sum of all probabilities <= that grey value multiply the cdf by L-1, where L is the # of grey values in output image round the value to an integer Let's look on the web for examples of original and histogram equalized images.

Michael Eckmann - Skidmore College - CS Spring 2008 Enhancing Images Removal of salt-and-pepper noise from binary images –can match a 3x3 mask of all 1's except center is 0 –and if match (including the 0's – not like morphology), then set the 0 pixel to 1 –also match a 3x3 mask of all 0's except center is 1 –and if match (including the 0's – not like morphology), then set the 1 pixel to 0 removal of salt-and-pepper noise from greyscale images is typically done with a median filter –consider a neighborhood around each pixel, –sort the grey values and choose the median value (the one that appears in the middle of the sorted list)‏ –e.g. a 5x5 neighborhood will have 25 pixels, the median is the 13 th highest value

Michael Eckmann - Skidmore College - CS Spring 2008 Enhancing Images Contrast the median filter with an averaging filter (often called a smoothing filter)‏ A smoothing filter computes a new value of a pixel by the following –given a mask of values, multiply each value in the mask by the corresponding pixel value in the image and add them up –then divide by the total of the grey values in the mask example of a few 3x3 masks on the board