



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Pradeep Sen Advanced Graphics Lab
Class 11 March 2, 2009
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Announcements
ย HW 2 is due this Sunday
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Last time
ย Texture
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Today
ย Segmentation
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
What is segmentation?
ย We want to design algorithms that can take an input image and reason about the objects depicted within
ย Fundamentally, our algorithms must be able to decompose the pixels of the image into groups that represent (e.g. this is a car, that is a person), so that they can be analyzed separately (e.g. โwhat kind of car is it?โ or โwho is that person?โ
ย This is known as segmentation or grouping
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Segmentation in the human visual system
ย Context affects how things are perceived ย E.g. โpixelsโ in our visual system are grouped into semantic objects through complex interactions with the surroundings ย This led some psychologists to reject experiments using individual stimuli but instead focus on how we visually respond to groups of objects ย This is known as gestalt psychology
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Gestalt
ย What do you see?
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Gestalt
ย What do you see?
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Gestalt laws
ย Law of proximity โ tokens that are nearby are grouped together ย Law of similarity โ tokens that are similar are grouped together ย Law of common fate โ tokens that have similar motion are grouped ย Law of common region โ tokens that lie inside the same closed region tend to be grouped together ย Law of parallelism โ parallel curves or tokens are grouped ย Law of closure โ tokens that lead to closed curves are grouped ย Law of symmetry โ curves that lead to symmetric groups are grouped ย Law of continuity โ tokens that lead to continuous curves are grouped ย Law of familiar configuration โ tokens that, when grouped, form a familiar object tend to be grouped together ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Examples
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Examples
ย Law of closure
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Examples
ย Law of proximity
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
A simple algorithm
ย Observation that background is unchanging or changes slowly ย Average frames together to create a โbackground frameโ ย Subtract this from images to extract foreground object ย If background changes slowly, our average filter could be a moving window that only weights frames near the one we are processing ย Gestalt equivalent: common fate
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Example
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Shot boundary detection
ย A film is made up of different shots, which are sequences of continuous camera takes
ย Interested in grouping the film into shots for browsing, etc.
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
A simple algorithm
ย Basic idea is that shots change whenever the distance between frames is at a maximum ย So find differences between frames and look for these large differences
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
A simple algorithm
for each frame in the image sequence compute a distance between this frame and the previous frame if the distance is larger than some threshold, classify the frame as a shot boundary end
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Measuring distance between frames
ย Frame differencing โ take pixel-by-pixel differences and sum the square of the differences. ย Histogram difference โ compute the color histogram for the frames and measure the distance between the histogram ย Block comparison โ split the image into blocks and compare those across frames ย Edge differencing โ compute edge maps for each frame and count the number of corresponding edges
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Clustering
ย Process of building clusters , collections of data points that belong together
ย Two simple clustering methods:
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Example
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
K-means clustering
ย A simple algorithm can be developed if we assume that there are k clusters in the data for a fixed k ย We want to minimize the distance of each point to the center of its cluster center ย Start by randomly picking cluster centers ย Bin elements into the right cluster based on the center of the cluster ย Once all elements has been clustered, compute the new cluster centers, and redo ย Process eventually converges to a local minimum
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
K-means clustering Choose k points to act as cluster centers Until the cluster centers are unchanged Allocate each data point to the cluster with the nearest center Ensure each cluster has at least one data point Replace the cluster centers with the mean of the elements in their clusters end
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Example
original
ย k-means segmentation assuming 5 clusters
using only intensity values using color values
ECE516 / CS532 Computer Vision Pradeep Sen Class 11 โ March 2, 2009
Segmentation by graph clustering
ย Clustering can be thought of as cutting a graph into disjoint graphs were the vertices within a subgraph are part of the same object