Ask Your Question

bagheraa's profile - activity

2016-05-23 07:38:24 -0600 received badge  Popular Question (source)
2014-06-28 23:54:10 -0600 received badge  Student (source)
2012-12-21 04:24:42 -0600 asked a question how to use calcOpticalFlowSF

Hello, I'm new to OpenCV, y I dont have meny skills on OpenCV 2. I'm trying to use the function calcOpticalFlowSF(), but the documentation on this item in docs.opencv.org seem to be wrong. In the header of the c++ it says:

void calcOpticalFlowSF(Mat& from, Mat& to, Mat& flow, int layers, int averaging_block_size, int max_flow, double sigma_dist, double sigma_color, int postprocess_window, double sigma_dist_fix, double sigma_color_fix, double occ_thr, int upscale_averaging_radius, double upscale_sigma_dist, double upscale_sigma_color, double speed_up_thr)

that sums a total of 16 parameters, but in the explanation of the parameters the Matrix 'flow' doesn't appear. In its place it appears two Matrices: 'flowX' and 'flowY'.

I have checked the library header, and the function call is like the one on the docs. So I have suppossed that 'flow' is a void matrix that will be filled by the function.

The problem is that when I call the function, it hangs and waits forever.

How must I call the function? Must I prepare flow as a two float channel image?