Commit 237b3ed3 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fixed createOpticalFlowNeedleMap

parent fcf9a224
......@@ -138,7 +138,7 @@ namespace cv { namespace gpu { namespace device
const float u_avg_val = u_avg(y, x);
const float v_avg_val = v_avg(y, x);
const float theta = ::atan2f(v_avg_val, u_avg_val) + CV_PI;
const float theta = ::atan2f(v_avg_val, u_avg_val);// + CV_PI;
float r = ::sqrtf(v_avg_val * v_avg_val + u_avg_val * u_avg_val);
r = fmin(14.0f * (r / max_flow), 14.0f);
......
......@@ -129,7 +129,7 @@ int main(int argc, const char* argv[])
GpuMat d_vertex, d_colors;
createOpticalFlowNeedleMap(d_bu, d_bv, d_vertex, d_colors);
createOpticalFlowNeedleMap(d_fu, d_fv, d_vertex, d_colors);
#endif
cout << "Interpolating..." << endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment