eliminate unnecessary double arithmetics in CUDA

This commit is contained in:
Vladislav Vinogradov
2013-05-30 13:10:11 +04:00
parent 0b270e2b08
commit cd2b7448f4
9 changed files with 26 additions and 17 deletions

View File

@@ -140,7 +140,7 @@ namespace cv { namespace gpu { namespace cudev
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);
float r = ::sqrtf(v_avg_val * v_avg_val + u_avg_val * u_avg_val);
r = fmin(14.0f * (r / max_flow), 14.0f);