0
Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

# Kalman ip cv

564

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total Views
564
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
32
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. KALMAN FILTER APPLICATION IN COMPUTER VISION IMAGE PROCESSING School of Electrical & Computer Eng. Hamid Bazargani &
• 2. Outline: • A brief introduction to Kalman filter • Classical Kalman Filter • Kalman & Stereo vision localization • Different extensions of Kalman Filter • Image and Video De-noising (Kalman approach) • Kalman Tracking for Robust pose estimation
• 3. Introduction: • Kalman is a recurrent algorithm relying on series of uncertain measurements to optimally estimate an unknown variable. • The Kalman filter is 50 years old but is still a popular method for sensory information analysis . • The Kalman applications span area of navigation systems, aerospace, robotics, information processing , computer vision, etc • Main properties: • Requires small computational cost • State space representation and ease of implementation • Recursive algorithm which only uses last state and current observation
• 4. Formulation: Where F is transition matrix, G is a control input matrix . H is output matrix. Random variables w and v are process and measurement noise respectively.
• 5. Kalman stages Predict or time update Correct or measurement update
• 6. Multivariate Gaussians: posterior prior Measurement evidence Markov model: p( x | z ) ∝ p( z | x) p( x)
• 7. Multivariate Gaussians: posterior Measurement evidence prior  1  p ( z | x) ∝ exp − ( x − z )T Γ −1 ( x − z )  2   1  p ( x) ∝ exp − ( x − µ )T Σ −1 ( x − µ )  2  µ new = (Σ −1 + Γ −1 ) −1 (Σ −1µ + Γ −1 z ) ( Σ new = Σ −1 + Γ −1 ) −1
• 8. Multivariate Gaussians: CS373 - Programming a Robotic Car - Unit 2 Kalman Filter Prediciton - CS373 Unit 2 - Udacity By Sebastian Thrun
• 9. Kalman & Stereo Vision Localization: • Stereo localization requires both camera’s information at each time step.
• 10. Kalman & Stereo Vision Localization: • There is a small time delay between the two cameras’ image capturing. This time lag causes an error in estimation of object position in Cartesian coordinates.
• 11. Non-linearity & Kalman Filter: [Refer to Video1] • Python and Blender used for data acquisition which brings Physics engine to generate exact trajectory. • Blender communicate with matlab over UDP protocol.
• 12. Non-linearity & Kalman Filter: Extended Kalman Filter Figures from CS-223 (Stanford)
• 13. Non-linearity & Kalman Filter: Extended Kalman Filter Figures from CS-223 (Stanford)
• 14. Non-linearity & Kalman Filter: Extended Kalman Filter Figures from CS-223 (Stanford)
• 16. Kalman Filter Categories Kalman EKF Non-linearity AEKF AKF Adaption
• 17. SV Results Noise level σ n = 0.05 Noise level σ n = 0.5
• 18. Image and Video de-noising: • noise is assumed to be signal-independent at each pixel
• 19. Image and Video de-noising: • Wiener Filter • Bilateral Filter • Median Filter • Non-Local Means Filtering
• 20. Image and Video de-noising: • Wiener Filter • Assume Stationary signal • Signal and noise are independent with constant PSD
• 21. Image and Video de-noising: • Wiener Filter
• 22. Image and Video de-noising: • Wiener Filter σ n = 15
• 23. Image and Video de-noising: • Wiener Filter Filtered
• 24. Image and Video de-noising: • Non-Local Means Filter • Each pixel is replaced by weighted average of its neighborhoods. • Larger patch size leads to expensive computation. while Smaller patch size results in poor de-noising effect. • All weights should be normalized .
• 25. Image and Video de-noising: • Non-Local Means Filter σ n = 15
• 26. Image and Video de-noising: • Non-Local Means Filter
• 27. Image and Video de-noising: • Comparison original Wiener filter Noisy σ n = 15 NLM filter
• 28. Image and Video de-noising: • Comparison PSNR (db) 14 12 10 8 6 4 2 0 PSNR (db)
• 29. Video de-noising: • Each pixel is replaced by 3D spatio-temporal weighted average of its neighborhoods.
• 30. Motion estimation & Kalman Filter • Optical Flow Algorithms • Block Matching Algorithms • Full Search Algorithm (FSA) • Three Step Algorithm (TSA) • Four Step Algorithm (FSA) • Diamond Search Algorithm (DSA) • Adaptive Rood Pattern Search
• 31. Motion estimation & Kalman Filter • Why Kalman Filter? • Motion estimation inaccuracy when illumination is changed • Inaccuracy based on noise • The size of moving object may differ from searching region size • Fails in presence of occlusion
• 32. Motion estimation & Kalman Filter 2D Causal AR model: B(m,n-1) B(m-1,n) B(m,n) vi , x (m, n) = a01vi , x (m, n − 1) + a10vi , x (m − 1, n) + wi , x (m, n) vi , y (m, n) = b01vi , y (m, n − 1) + b10vi , y (m − 1, n) + wi , y (m, n)
• 33. Motion estimation & Kalman Filter State space representation :  vi , x (m, n)  a01 a11 0 0  vi , x (m − 1, n) q    v (m − 1, n)  1 0 0 0  vi , x (m, n − 1) 0  i,x =  * +   vi , x (m, n)   0 0 b01 b11  vi , x (m − 1, n) q          vi , x (m − 1, n)  0 0 1 0  vi , x (m, n − 1) 0    vi , x (m, n)   r    vi , x (m, n)  1 0 0 0 vi , x (m − 1, n) 0 +  = z= * vi , y (m, n) 0 0 1 0  vi , x (m, n)   r         vi , x (m − 1, n) 0  q 2  0 Q= 2 q  0  0 q2 0 0 0 q2 r 2  0 R= 2 r  0  0 r2 0 0 0 r2 0 0 0 0 0  0 0  0  0  0 0  0 
• 34. Motion estimation & Kalman Filter
• 35. Motion estimation & Kalman Filter
• 36. Motion estimation & Kalman Filter
• 37. Motion estimation & Kalman Filter
• 38. Motion estimation & Kalman Filter
• 39. Motion estimation & Kalman Filter • Green arrows show motion vectors • Red arrows show corrected motion vectors • Kalam uses corrected version of neighboring vectors if available
• 40. Motion estimation Results [Refer to Video2] • Results are generated using the following approaches: • 2D 3x3 spatial domain NLM • 3D 3x3x3 spatio-temporal domain NLM • 3D 5x3x3 spatio-temporal domain NLM
• 41. Motion estimation Results [Refer to Video2]
• 42. Kalman Tracking for Robust pose estimation • Object Recognition • Object recognition requires set of 2D correspondences between target image and video frame. • Robust RANSAC (RANdom SAmple Consensus) is used to robustly estimate the pose against wrong matches. • Robust pose estimation brings an exhaustive computational cost.
• 43. Kalman Tracking for Robust pose estimation • Tracking • Feature points tracking • Tracking the region of search for matches. • Keep tracking of estimated pose after pose estimation process. • Keep tracking of inliers (best matches) found from RANSAC loop. (My Contribution)
• 44. Kalman Tracking for Robust pose estimation • Pose estimation: Video Frame points Target Points Point Matching RANSAC Loop M-estimator (LSM) Kalman tracker
• 45. Kalman Tracking for Robust pose estimation • Pose estimation: [Refer to Video3]
• 46. Implementation • Programs are written with C++ using OpenCV library • C++ implementation of generic Kalman Filter algorithm • C++ implementation of Non-Local Means algorithm • C++ implementation of FSA Block Matching algorithm • C++ implementation of Wiener filter for image denoising • Matlab full implementation of Conventional, Extended , Adaptive Fading and Innovation-based Adaptive Kalman filter Will be available for download soon on https://github.com/hamidb
• 47. Conclusion: • We studied Kalman Filter as an adaptive filter which can be applied for Smoothing, prediction , filtering and tracking • Three main extensions of Kalman filter including conventional, extended and adaptive Kalman filter are reviewed. • Applying Kalman Filter in Video de-noising and compared the result with other filters like Wiener filter • Applying Kalman filter in computer vision applications such as multiple view geometry and pose estimation
• 48. References: 1. Dan Simon. Optimal State Estimation: Kalman, H Infinity, and Nonlinear Approaches. Wiley-Interscience, 1 edition, August 2006. 2. S. Sangsuk-Iam and T. E. Bullock. Analysis of discrete time kalman filtering under incorrect noise covariances. Automatic Control, IEEE Transactions 3. Qijun Xia, Ming Rao, Yiqun Ying, and Xuemin Shen. Adaptive fading kalman filter with an application. Automatica 4. Buades, A., Coll, B., Morel, J.M.: A non-local algorithm for image denoising. In: IEEE Conference on Computer Vision and Pattern Recognition (CVPR). (2005) 5. Buades, A., Coll, B., Morel, J.M.: Denoising image sequences does not require motion estimation. In: IEEE International Conference on Advanced Video and Signal Based Surveillance. (2005) 6. Han, Yu Bing and Chen, Rushan: Efficient video denoising based on dynamic nonlocal means . Journal of Image Vision Comput. (2012) 7. Chung-Ming Kuo; Chaur-Heh Hsieh; Yue-Dar Jou; Hsieh-Cheng Lin; Po-Chiang Lu, "Motion estimation for video compression using Kalman filtering," Broadcasting, IEEE Transactions on , Jun 1996 8. Bazargani, H.; Omidi, E.; Talebi, H.A., "Adaptive Extended Kalman Filter for asynchronous shuttering error of stereo vision localization," Robotics and Biomimetics (ROBIO), 2012 IEEE International Conference on , vol., no., pp.2254,2259, 11-14 Dec. 2012 9. Ruiz, V.; Fotopoulos, V.; Skodras, A.N.; Constantinides, A.G., "An 8×8-block based motion estimation using Kalman filter," Image Processing, 1997. 10. Antoni Buades and Bartomeu Coll and Jean Michel Morel, On image denoising methods,Technical Note, CMLA (Centre de Mathematiques et de Leurs Applications,(2004)
• 49. Thank you for your Attention. http://www.slideshare.net/hamidbazargani/venndiagrams-29181371