Computer Vision Using MATLAB


CS559 – Computer Vision

Assignment  No. 3

 

  1. (a) [6 points] Let f(x,y) be an image. Let h(x,y) be the image obtained by applying a 3 by 3 spatial low pass mask (averaging filter) to f(x,y).  Similarly let g(x,y) be the image obtained by applying a 3 by 3 spatial high pass mask to f(x,y).  Prove that

g(x,y) =  f(x,y) – h(x,y)

 

Note: One or more examples do not constitute a proof.

(b) [5 points] Is the high pass mask separable? What is the implication of separability on computations?

 

 

  1. [9 points] Find the output images if Sobel edge operators are applied to the following 8 by 8 input image.  Note that you will have three gradient images, one in x-direction, one in y-direction and one gradient magnitude. Ignore the border effects, and produce only 6 by 6 output images.

 

2   2   2   2   2   2   2   2

                        2   2   2   2   2   2   2   7

                        2   2   2   2   2   2   7   7

                        2   2   2   2   2   7   7   7

                        2   2   2   2   7   7   7   7

                        2   2   2   7   7   7   7   7

                        2   2   7   7   7   7   7   7

                        2   7   7   7   7   7   7   7

 

  1. [40 points] The purpose of this assignment is to detect the motion of a car (and its speed). Stay still and take two (or more) pictures of a moving car in your neighborhood (better put the camera on a stand so it remains still). Your task is to write a program that takes the two images as input and finds the physical (world) distance between two consecutive frames (from which the speed of the car can be determined, if you measure the time between two frames. Finding speed is not part of this assignment, but you are encouraged to find it.). This assignment leaves many details for you to work out and explore, for example finding object to image size ratio, etc. I am not expecting from you a sophisticated method, rather the main point is to explore and appreciate challenges to such a problem and provide a reasonable solution.

 

Write a short report about any special feature of your program and your findings, make comments and conclusions supported by images.

Extra Credit (10%) for excellent work including finding the car speed, and interesting features of your work.

 

 

  1. [40 points] The purpose of this programming assignment is to explore and then propose a good edge detection method for color images. Then identify the boundary be detected of the object in the image that has a particular color. In Fig (a) detect the boundary of leaves and color it as blue. For example, in Fig. (b) find the boundary of the green pepper and mark it in blue; note that the stems of other peppers must not show. In Fig. (c), detect the boundary of the orange. Note Your program must work with other images. Now get another image of your choice and demonstrate your program. You can use Python/Matlab functions but you must understand how they work as this could be an exam/quiz question. Note: As much as possible, make your program general, i.e. not just for the given images.

 

(a)                                                                  (b)

(c)

 

Write a short report about any special feature of your program and  your findings, make comments and conclusions supported by images.

 

Extra Credit (10%): For removing false edges (for example the green stems of red and yellow peppers) and completing the boundary if the object is obstructed (for example in the orange where the leaves cover parts of the orange).