Optical Flow

How to calculate motion velocities using Lucas Kanade algorithm.