debug of cuda_tvl1 => pass tests succesfully
This commit is contained in:
@@ -209,7 +209,9 @@ namespace tvl1flow
|
||||
|
||||
__global__ void estimateUKernel(const PtrStepSzf I1wx, const PtrStepf I1wy,
|
||||
const PtrStepf grad, const PtrStepf rho_c,
|
||||
const PtrStepf p11, const PtrStepf p12, const PtrStepf p21, const PtrStepf p22, const PtrStepf p31, const PtrStepf p32,
|
||||
const PtrStepf p11, const PtrStepf p12,
|
||||
const PtrStepf p21, const PtrStepf p22,
|
||||
const PtrStepf p31, const PtrStepf p32,
|
||||
PtrStepf u1, PtrStepf u2, PtrStepf u3, PtrStepf error,
|
||||
const float l_t, const float theta, const float gamma, const bool calcError)
|
||||
{
|
||||
|
@@ -235,9 +235,8 @@ void cv::cuda::OpticalFlowDual_TVL1_CUDA::procOneScale(const GpuMat& I0, const G
|
||||
{
|
||||
// some tweaks to make sum operation less frequently
|
||||
bool calcError = (epsilon > 0) && (n & 0x1) && (prevError < scaledEpsilon);
|
||||
|
||||
estimateU(I1wx, I1wy, grad, rho_c, p11, p12, p21, p22, p31, p32, u1, u2, u3, diff, l_t, gamma, static_cast<float>(theta), calcError);
|
||||
|
||||
cv::Mat m1(u3);
|
||||
estimateU(I1wx, I1wy, grad, rho_c, p11, p12, p21, p22, p31, p32, u1, u2, u3, diff, l_t, static_cast<float>(theta), gamma, calcError);
|
||||
if (calcError)
|
||||
{
|
||||
error = cuda::sum(diff, norm_buf)[0];
|
||||
@@ -259,7 +258,8 @@ void cv::cuda::OpticalFlowDual_TVL1_CUDA::collectGarbage()
|
||||
I0s.clear();
|
||||
I1s.clear();
|
||||
u1s.clear();
|
||||
u2s.clear();
|
||||
u2s.clear();
|
||||
u3s.clear();
|
||||
|
||||
I1x_buf.release();
|
||||
I1y_buf.release();
|
||||
@@ -274,7 +274,9 @@ void cv::cuda::OpticalFlowDual_TVL1_CUDA::collectGarbage()
|
||||
p11_buf.release();
|
||||
p12_buf.release();
|
||||
p21_buf.release();
|
||||
p22_buf.release();
|
||||
p22_buf.release();
|
||||
p31_buf.release();
|
||||
p32_buf.release();
|
||||
|
||||
diff_buf.release();
|
||||
norm_buf.release();
|
||||
|
Reference in New Issue
Block a user