Hi Kowshik,
Here is a function from MATLAB File Exchange that computes optical flow with options to specify a region of interest: https://www.mathworks.com/matlabcentral/fileexchange/27093-affine-optic-flow
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!