be5252028bde718d7882de2f831dbc13.ppt
- Количество слайдов: 39
Horn-Schunk Optical Flow Presented by Phillip Woodhull for ECE 847
My Purpose To research, implement, interpret, and demonstrate the Horn-Schunk algorithm for detecting optical flow. n Specifically, I will be determining effects and good values for lambda and the number of iterations…more on that later. n
What is Optical Flow? n According to Wikipedia: – “A concept which approximates the motion of objects within a visual representation” n According to Dr. Birchfield: – “The ‘apparent’ motion of the brightness pattern in an image”
Examples of optical flow n Although the picture is not moving, there is apparent downward motion inside the gray rectangle.
Examples of optical flow n My test videos were “Flower garden sequence” and “Person walking in a circle, ” downloaded from Michael Black’s website: http: //www. cs. brown. edu/people/black/
Examples of optical flow Flower garden
Examples of optical flow n There is essentially one major flow object in this video (the tree), with other minor flow objects in the background (the flowers, house, and small trees).
Examples of optical flow n For this project, I will be smoothing out the flowers pretty heavily for the sake of clarity in my results. Before After
Examples of optical flow Walking
Examples of Image Flow n The only actual flow object is the walker. However, there is also some random motion in the background due to random noise.
Differences between LK and HS In Lucas-Kanade (LK), we assumed that blocks of pixels representing features moved exactly the same. n In Horn-Schunk (HS), the assumption is that groups of pixels move similarly, but not the same. n – This interdependence on other pixels is produced by the use of a Laplacian (the “Mexican Hat”).
Differences between LK and HS In LK, the displacement vectors u and v are values. n In HS, u and v are functionals, thus mandating the use of calculus of variations. n
The Horn-Schunk Algorithm The algorithm according to Dr. Birchfield:
The Variables Lambda n Number of iterations n
The Variables: Lambda n Value of lambda – Lambda affects the weight of the gradient in the calculation of the motion vector. – The bigger lambda is, the smaller the effect of the gradient in the u and v vectors, and the larger the effect of the Laplacian.
The Variables: Lambda n Effects of lambda – Greater lambda produces greater directional accuracy in the vectors – Greater lambda produces shorter direction vectors, distorting the displacement magnitudes slightly.
Lambda = 1
Lambda = 20
Lambda = 200
Lambda = 1
Lambda = 20
Lambda = 200
The Variables: Lambda n My values of lambda – Flower garden: 140 – Walking: 200
The Variables Lambda n Number of iterations n
The Variables: Iterations The number of iterations affects the sensitivity and accuracy of the detection. n The greater the number of iterations, the more motion will be detected. n The greater the number of iterations, the slower the algorithm will run (directly proportionally). n
1 Iteration
5 Iterations
10 Iterations
1 Iteration
5 Iterations
10 Iterations
The Variables: Iterations n My number of iterations: – Flower garden: 5 – Walking: 4
Additional Variables n Some additional constraints – Thresholding of vectors n For this project, the displayed vectors were limited to those on a grid of every 4 pixels. n Vectors of magnitudes less than 2 so as to not clutter the final results. n Vectors of magnitudes more than 10 were eliminated because there is no motion that great in these sequences.
Additional Variables The x and y gradient images were computed with a kernel size of 3 and a sigma of 1. 7. n Both sequences’ images were smoothed with a size 3 kernel with a sigma of 1. 7. n
Final Results
Conclusions n Lambda and the number of iterations is variable on the image itself and on the quality you are trying to achieve.
Conclusions n Since Horn-Schunck is a dense optical flow algorithm, pixels that are very close in brightness and proximity can be confused in the algorithm, producing occasional random results.
10 Iterations
Conclusions n Finally, although Horn-Schunck is considered to be one of the best optical flow algorithms, it is still no match for the God-created human eye.
be5252028bde718d7882de2f831dbc13.ppt