


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Exam; Professor: Jacobs; Class: Image Processing; Subject: Computer Science; University: University of Maryland; Term: Fall 2005;
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



250 and 123 are equally distant from the most similar training examples of 255 and 128. However, there are 99 times as many examples with the value of 128. This means that 123 will always be regarded as more likely to be background than 250. This is true regardless of the choice of sigma. Consequently, we can set the threshold to make 250 and 123 both appear to be background, both appear to be foreground, or we can make 123 appear to be background while 250 appears to be foreground. But the reverse is not possible.
b. Explain how you might improve performance by using a new background subtraction algorithm that uses a Markov model of pixel intensity. Be as explicit as possible, for full credit.
If we use a 3x3 window for classification, we will see that background is generally either all 128, or 8 values of 128 with one flake of snow (255). Any other event is very rare in the background. This will make it much easier to tell the difference between a flake of snow and a region that is all 253 (or even all 255) because it comes from a person.
Convolution is associative, so we can form this filter by convolving together two first derivative filters. This would be:
-.5 0 .5 * -.5 0 .5 = -.25 0 .5 0 -.
It is important to remember that when convolving filters together, we must have zeros at the boundary. This is because convolution with 0 -.5 0 .5 0 has the same effect as convolving with -.5 0 .5, whereas convolving with -.5 -.5 0 .5 .5 has a very different effect.
The gradient is (1, 2). So the magnitude is sqrt(5), and the direction is (1,2)/sqrt(5).
-1 3 - with the 1D image: 0 1 2 3 3 3 3 6 6 6 3 3 2 1
Don’t worry about the boundary pixels. You may ignore them, or treat them any way you want.
Let’s pad the image with zeros, just to make some choice. Note that convolution and correlation do the same thing, since the filter is symmetric. So we get:
-1 1 2 4 3 3 0 9 6 9 0 4 2 1
The gradient at 5a is (5/2, 0). So the magnitude is 5/2, and the direction is (1,0). This means the magnitude of the gradient is bigger than 1. We also need that the magnitude of the gradient should be bigger than the two neighbors in the (1,0) direction and the (-1,0) direction. The gradient at those two pixels don’t depend on ?, and they are (2,0) and (1,0), so they have smaller magnitudes. So the answer is “yes”.
b. Will the pixel marked 9(b) be an edge? Answer “yes”, “no” or “It depends on the value of the pixel marked ‘?’. Explain.
So we’ll copy the center pixel where the SSD was 1, which is 0.
b. Which value would you fill in for the ?.
When we smooth an image with a triangle, near a corner the smoothing filter averages more background then foreground. So near the corner, the smoothed triangle will be lighter. There will be a more gradual transition from the background to foreground, meaning the gradient will be smaller, and so we might miss the edge. The sharper the corner is, the bigger this effect will be, and the more likely we’ll be to miss the corner.