1. Implement a hierarchical version of the Lucas and Kanade motion estimation. A very algorithmic description is given in the “Frame Rate Compression” paper by Bergen et al. Apply your method to the following two images:
|
|
|
|
To help you show your results there is a file called displayFlow.m that is a Matlab file for showing vector images using arrow diagrams.
The motion algorithms that you have seen in class and in the papers you read are based on two fundamental assumptions:
a) For any patch in frame 1 there exists a patch in frame 2 with the same brightness values (constant intensity assumption)
b) The location of the patch in the two frames are close, so linear approximations can be used (linearization assumption).
In the next part of this assignment you will first generate some
simple cases for which this is true, and
then some cases in which it is false. The file texSquare.m
can generate textured or bland
squares over textured or balnd backgrounds.
2.
Generate two frames of a textured square over nontextured
background
(set textureFlag=2, isize=64, vx=2, vy=2, noiseLevel=0).
Note that in this case any image
patch in frame 1 has a corresponding patch in frame 2.
Run your algorithm on these frames. You should get approximately right displacements for the square.
Now run your algorithm without the coarse to fine. Do you still get
approximately the right answer? What assumption is violated ?
3.
Generate two frames of a textured square over textured
background
(set textureFlag=1, isize=64, vx=2, vy=2, noiseLevel=0).
Note that not all patches have a corresponding patch in the other frame. Which
patches are these?
Run your algorithm on this
sequence. Where does it give approximately the right answer, and where doesn't
it?
What happens when you increase the window size?
4.
Generate two frames of a nontextured square over nontextured
background
(set textureFlag=3, isize=64, vx=2, vy=2, noiseLevel=0).
Note that some patches have a unique corresponding patch in the other
frame, while others have several corresponding patches. Which are these?
Run your algorithm. Where does it get the right answer and where doesn't it? What happens when you increase the window size?
This problem set requires a little bit more thinking and algorithm construction than the previous problem sets. Therefore it is essential that you turn in the following in your README/index.html file (You will not get full credit otherwise):
You will submit your work electronically (no paper). Instead, you will submit an HTML file. Create your own web page in the spirit of the template provided for PS2. The format of the page is up to you. Feel free to add as many result images, intermediate results images, and result images for different values of the control parameters as you think is necessary to demonstrate your work. However, the page should contain at least the following:
Your matlab code should be reasonably commented if you want us to understand it and give you credit/comments. Also include test scripts for each of the four subproblems: test_1.m, test_2.m, test_3.m, and test_4.m. These files should demonstrate your work for parts 1,2,3, and 4 respectively. The scripts should:
To submit your work do the following: