minor gpu TVL1 optical flow optimization:

don't calc diff term if it is not used for epsilon criterion
pull/1317/head
Vladislav Vinogradov 11 years ago
parent 1a7c2eefb8
commit de214950c4
  1. 1
      modules/gpu/src/tvl1flow.cpp

@ -222,6 +222,7 @@ void cv::gpu::OpticalFlowDual_TVL1_GPU::procOneScale(const GpuMat& I0, const Gpu
{
estimateU(I1wx, I1wy, grad, rho_c, p11, p12, p21, p22, u1, u2, diff, l_t, static_cast<float>(theta));
if (epsilon > 0)
error = gpu::sum(diff, norm_buf)[0];
estimateDualVariables(u1, u2, p11, p12, p21, p22, taut);

Loading…
Cancel
Save