Ali,
In my implementation I used 5-6 levels (at least for the sphere and corridor images).
-----------------------------
Ramsin,
When the threshold test fails, you should just keep your previous estimate of the optical flow at that pixel. One of the advantages of multi-scale optical flow is that it can work in regions with little texture (without a huge window) because the optical flow is propagated from the low-res estimation.
Also I think you're confused about the thresholds..there should only be two thresholds. You should check that lambda2 > th1 and that lambda1/lambda2 < th2. I found that values of th1 = .01 and th2 = 100 worked fairly well.
----------------------------
Nikhil,
Below are two results from my implementation. For the corridor image I am using lambda2 > .1 & lambda1/lambda2 < 100 with a window size of 9x9 and 7 levels. For the sphere image, I am using lambda2 > .01 & lambda1/lambda2 < 100, windowsize = 15x15, 6 levels.
<img src="
http://www.neilalldrin.com/shared/files/of_sphere.jpg" />
<img src="
http://www.neilalldrin.com/shared/files/of_corridor.jpg" />