units of optical flow velocities

26 views (last 30 days)
priya
priya on 29 Aug 2011
Answered: NikoMue on 4 Jan 2016
When Horn-Schunck or Lucas Kanade methos is applied for obtaining the optical flow velocities.. What are the units of optical flow velocities.
Thanks, Priya
  2 Comments
the cyclist
the cyclist on 29 Aug 2011
Sorry. How is this a MATLAB question? Are these methods used in one of the specialized toolboxes? If so, the documentation will probably say what is assumed about the units for the inputs and outputs.
Walter Roberson
Walter Roberson on 29 Aug 2011
It is the "Furman per jiffy".

Sign in to comment.

Answers (6)

Bjorn Gustavsson
Bjorn Gustavsson on 29 Aug 2011
I'd bet it is pixels per time-period between exposures of the two images.
  3 Comments
David Young
David Young on 29 Aug 2011
... though, if you have a calibrated camera, you might choose to express the flow in, for example, radians per second. However, the natural output units for a function which only knows about the image is pixels per frame.
Walter Roberson
Walter Roberson on 29 Aug 2011
radians per second is just a linear multiple of my suggested "Furman per jiffy", with the latter being more natural for faster cameras.

Sign in to comment.


Bastian
Bastian on 7 Sep 2011
I also have a Problem like this. My camera is calibrated and mounted on a poti. I calculated with the angles of field of view, that 1° turn is about 16 pixels on screen. Unfortunately I'm not able to use the output parameter of optical flow form matlab toolboxes in simulink because I don't knwo the unit. There is nothing about in the help or online documentation. It can't be pixels/sample-time or frame. What about Furman per jiffy? Is this possible? Does anyone have an idea how to get the veloctiy out of this block? Or if not a possibility to get velocity out of a picture of non-destincitve points? Thanks
  2 Comments
Walter Roberson
Walter Roberson on 7 Sep 2011
Apologies, "Furman per jiffy" is mostly a bit of humor, sort of like measuring velocity in attoparsec per microfortnight (a value that is fairly close to 1 inch per second.)
David Young
David Young on 7 Sep 2011
Why can't it be pixels/frame?
What do you mean by getting velocity from a picture of non-distinctive points? If you mean a uniform or smooth area of the image, then no, it is not possible to accurately estimate the flow for such a region, though there are many methods that attempt to interpolate the flow from the nearest distinctive features or contours.

Sign in to comment.


Bastian
Bastian on 8 Sep 2011
I'm recording a white plane with a black line. By turning the camera in a direction with f.e. 16 pixels/sample-time. The optical flow velocity lines are brilliant and shows the right direction but their outcomes are very little, about 0.03 or less. That's why I think it's not possible that the unit might be pixels/frame, what I originally thought also. The frame-rate of camera-input is established by the sample-time, so frame-rate and sample-time should be the same.
Yes, smooth areas doesn't have any flow. I just want to determine ares, which have the same velocity as the turning camera. F.e. if motion of above mentioned black line is equal to camera motion, I could erase this area.
Maybe I'm misguided, than please correct me.
  5 Comments
David Young
David Young on 9 Sep 2011
@priya: Not all optic flow algorithms use gradients. Some use feature matching. Some optic flow programs that do use gradients may not use gradient(). However, you are right to say that if gradient() is used, and the spacing parameters to gradient() are specified, the result may not be in the natural units of grey-levels/pixel, but you would also need to look at how the temporal gradients are calculated. (The natural approach is to express spatial image gradients in grey-levels/pixel, temporal gradients in grey-levels/frame, and then when you divide to get the flow speed you end up with pixels/frame.)
David Young
David Young on 9 Sep 2011
If the spatial gradient is in grey(= US gray)-levels/Furman, and the temporal gradient is in grey-levels/jiffy, the resulting flow is in units of Robersons. (N.B. This may safely be ignored.)

Sign in to comment.


Clara
Clara on 15 May 2014
Hi, I'm following this document http://www.mathworks.it/it/help/vision/ref/vision.opticalflow-class.html#br6h6aa-7. And I'm using lukas kanade method and setting my output value to 'Horizontal and vertical components in complex form' code:
I1C1=im2double(imread('img-001_0.tif'));
I2C1=im2double(imread('img-002_0.tif'));
opticalFlow = vision.OpticalFlow('ReferenceFrameSource', 'Input port', ...
'Method', 'Lucas-Kanade');
opticalFlow.OutputValue = 'Horizontal and vertical components in complex form';
opt=step(opticalFlow,I2C1,I1C1);
H=imag(opt);
V=real(opt);
do you know wich are the units of H and V? they are very low to be pixels/frame...

Max
Max on 7 Nov 2014
I got the same problem concerning velocity unit. The values are too low to represent motion from a pixel to another pixel. Are there any other solutions to solve the problem? Or do we get some normalized output values?
  1 Comment
Benito
Benito on 22 Nov 2014
So the question is; How does one convert the complex (u,v) values to pixels per frame? I took video while driving at 20 mph and the u,v magnitude seams to be off by an order of magnitude. Not only that but when compared to the block match technique the angle of the u,v vectors does not seem to reflect the true motion vector field. Has anybody compared the results against standard optical flow data sets?

Sign in to comment.


NikoMue
NikoMue on 4 Jan 2016
I just found this thread and wanted to know if there are some solutions concerning the too small units of the u and v velocities? I use the opticalFlow on a 3D picture matrix but when I assume the units to be pixels per frame I get maximum velocities like 0.0806 m/s which is too small.
opticFlow = opticalFlowHS('Smoothness',1,'MaxIteration',10,'VelocityDifference',0);
%%3D matrix with 10 pics
for i=1:10
Bild= imread(names{i}, 'png');
Bilderstack(:,:,i)=Bild;
flow = estimateFlow(opticFlow,Bilderstack(:,:,i))
end
Is it even possible to use opticalFlow on a 3D picture matrix?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!