fixed createOpticalFlowNeedleMap

pull/13383/head
Vladislav Vinogradov 13 years ago
parent fcf9a224fb
commit 237b3ed3a0
  1. 2
      modules/gpu/src/cuda/optical_flow.cu
  2. 2
      samples/gpu/optical_flow.cpp

@ -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;

Loading…
Cancel
Save