cs 376b introduction to computer vision 03 / 21 / 2008 instructor: michael eckmann
TRANSCRIPT
CS 376bIntroduction to Computer Vision
03 / 21 / 2008
Instructor: Michael Eckmann
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Today’s Topics• Comments/Questions• Chapter 6
– color histograms
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Color Histograms• To determine some match value between two image's histograms
(say a largish input image and a smallish model image to try to determine if the model image is in the input image) we can do the following:
• compute the intersection of the histograms by
– sum up over all bins the min histogram value in each bin
• then divide this sum by the number of pixels in the model image to get a match value
– this value is not diminished due to background pixel colors in the input image that are not in the model
• the idea is that the higher the match value the more likely the model is contained within the image
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Color Histograms• Other measures include distance measures where smaller values
(little distance) implies similarity
– sum of absolute value of differences (L1 distance)
– ssd = sum of squared differences
– Euclidean distance = sqrt(ssd) (L2 distance)– ...
• Let me give intuition into these measures by considering the 2d case on the board
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Color• There is a section in our text 6.5, worth reading on color
segmentation in relation to face detection. Read it, but it doesn't give enough details to understand the algorithm fully, however it does give a good overall discussion.
• The next section on shading is an important topic that I may cover if we end up covering a topic using shading, such as “shape from shading” in chapter 13.
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Segmentation• Let's consider what ways you think we can segment images into
separate regions.
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Segmentation• Let's consider what ways you think we can segment images into
separate regions.– similar intensities– similar colors– vs.– similar textures– vs.– similar motions
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Texture• Texture
– can be used to segment images into regions– can be used to classify a region– can be used to compare regions
• What is texture? How do we quantify it?
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Texture• Our text describes a few approaches
– a) structural approach• texels – book doesn't describe any detail on how they are
determined but says that they are gotten from a simple thresholding procedure and then they are divided up into a pattern by a Voronoi tesselation (fig. 7.4 in “Computer Vision” by Shapiro and Stockman.)
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Texture• Our text describes a few approaches
– b) statistical approach• compute values of textures from an image based on the
intensities/colors• it is an efficient approach that can be used to segment and
classify (and then allow comparisons of textures)• several statistical approaches have been used/proposed
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Texture• Edge detection and direction
– number of edges in some (usually small) area– the directions of those edges
• Edgeness per unit area– # of edges / # pixels in region– can be grouped by magnitude of the edge into a histogram
• e.g. low medium and high magnitude edges can be computed separately into a 3 bin histogram
• The direction of edges could similarly be grouped into different histogram bins (e.g. 3 bins for horizontal, vertical and diagonal)
Texture• We now have a quantitative description of the texture of a
region by storing the two histograms (magnitude and direction of edges.)
• in “Computer Vision” by Shapiro and Stockman
• Left = (0.24, 0.76) and (0.48, 0.52, 0)• Right = (0.0, 0.24) and (0.0, 0.0, 0.24)
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Texture• These histograms can be compared using distance measures
like we saw with the color histograms.
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Texture• Local binary partitioning• compute an eight bit binary number for each pixel
– each bit represents the relationship between a pixel's intensities and one of it's 8-neighbors intensities
– if the neighbor's intensity is <= the pixel's intensity then that bit is 0
– if the neighbor's intensity is > the pixel's intensity then that bit is 1
• Use histograms of these binary numbers to describe the texture of an image region. Compare the histograms by a distance measure.
Michael Eckmann - Skidmore College - CS 376b - Spring 2008
Texture• If you want to get a jump on the next programming assignment• I am still working on the details but it will pull in quite a bit of
the concepts we've covered– it will deal with finding edges in an image by convolving a
few different masks– implementing a texture description scheme as just described
and compare the textures with a few different distance measures
– also create a color histogram matching scheme and compare the two
– writeup of results and a discussion of the results