Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "CS 376b Introduction to Computer Vision 02 / 15 / 2008 Instructor: Michael Eckmann."— Presentation transcript:

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

2 Michael Eckmann - Skidmore College - CS 376b - Spring 2008 Today’s Topics Comments/Questions homework questions? structuring element –fit / hit binary morphological operators –erosion –dilation –opening –closing –conditional dilation AND, OR, NOT, MINUS

3 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 structuring element a structuring element is a typically small binary image representing some shape, and a structuring element has an origin –e.g. a 3x3 square of all 1-pixels, with center as origin –a 5x5 binary image with a diamond shape of 1-pixels, others 0's –let's look at others in figure 3.12 on p. 64 a structuring element is applied to a binary image by hovering the origin pixel over each pixel in the image one at a time –only the 1-pixels in the structuring element matter (the 0-pixels are not compared)‏ –if the structuring element fits, this means that all the 1-pixels in the structuring element correspond to 1-pixels in the image –if the structuring element hits, this means that at least one 1-pixels in the structuring element corresponds to a 1-pixel in the image

4 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 binary morphology binary image morphological operations –image is f, structuring element is s, resulting image is g –dilation – increase the size of regions f dilated by s results in g where g contains a 1 if s hits f, 0 otherwise –erosion – decrease the size of regions f eroded by s results in g where g contains a 1 if s fits f, 0 otherwise

5 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 binary morphology binary image morphological operations –image is f, structuring element is s, resulting image is g –closing – closes up holes within regions –f closed by s results in g, which is the result of f dilated by s and then eroded by s –opening – get rid of jutting out portions of regions –f opened by s results in g, which is the result of f eroded by s and then dilated by s Both opening and closing are idempotent –this means after one closing of f by s, further closings by s do not change the result –same for opening

6 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 binary morphology binary image morphological operations –let's look at examples in figure 3.13 –as well as a program that performs these operations w/ structuring elements 5x5 diamond, 7x7 disk, vertical line 5, horizontal line 5, lshaped11x11 whiteSquareHollow.png whiteSquareHollow2.png whiteSquare2.png (use diamonds and disks)‏ whiteSquareNoisy2.png char_aNoisy.png

7 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 binary morphology Other simple operations that can be done to binary images –f and g are binary images of the same dimensions –AND: f AND g results in h where h contains a 1 iff f and g both contain a 1 –OR: f OR g results in h where h contains a 1 if either f and/or g contain a 1 –NOT: NOT f results in h where all 0's in f result in 1's in h and all 1's in f result in 0's in h –MINUS: f MINUS g results in h where 1 minus 0 = 1 all others 0

8 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 binary morphology in your own time, look at the gear-tooth inspection example and follow each step closely to understand how this uses the operators we just learned and why consider the following problem: –exercise 3.8 a thresholded satellite image of a region is generated such that the water pixels are 1's, and bridges that cross the water are 0's (they are fairly thin)‏ –how to make the bridge pixels 1's so that it looks all like water –how to detect the bridges as separate objects

9 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 binary morphology binary image morphological operations –conditional dilation let's look at the example on page 72 an image B is first eroded to find only regions containing vertical lines of >= 3 1-pixels (note: this is not part of the conditional dilation) --- this results in an image C D is a 3x3 square structuring element then, C is conditionally dilated by D with respect to B which –repeatedly dilates C by D while only retaining 1's that are in B –this is done until there are no further changes –this is a nice operator to “select” only certain regions with a particular structural property (which was determined by the original erosion)‏

10 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 binary morphology On Monday, you will do a lab on binary morphology –to prepare, you should read the parts of chapter 3 dealing with this topic and understand fully the gear-tooth example

11 Michael Eckmann - Skidmore College - CS 376 - Spring 2008 region properties area centroid perimeter


Download ppt "CS 376b Introduction to Computer Vision 02 / 15 / 2008 Instructor: Michael Eckmann."

Similar presentations


Ads by Google