MATLAB: How can i measure a vector’s size, angle and direction that i found using Farneback’s method

Computer Vision Toolboxfarnebacksimage analysisoptical flowvector measurement

For this simple example of Farneback's method, how can i measure the vector's characteristics?

Best Answer

The flow variable output from estimateFlow function is of type opticalFlow and has all the information. You can access them using the dot (.) operator.
For e.g.
vx = flow.Vx;
vy = flow.Vy;
or = flow.Orientation;
mag = flow.Magnitude;