From ca803e12fdc120968a8e14f5ce2131013a72f6ee Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Tue, 15 Mar 2011 07:06:44 +0000 Subject: [PATCH] fixed mask calculation in SURF_GPU --- modules/gpu/src/cuda/surf.cu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/gpu/src/cuda/surf.cu b/modules/gpu/src/cuda/surf.cu index dbd29ef..b9f6da9 100644 --- a/modules/gpu/src/cuda/surf.cu +++ b/modules/gpu/src/cuda/surf.cu @@ -218,10 +218,10 @@ namespace cv { namespace gpu { namespace surf int dy2 = __float2int_rn(ratio * c_DM[3]); real_t t = 0; - t += tex2D(sumTex, sum_j + dx1, sum_i + dy1); - t -= tex2D(sumTex, sum_j + dx1, sum_i + dy2); - t -= tex2D(sumTex, sum_j + dx2, sum_i + dy1); - t += tex2D(sumTex, sum_j + dx2, sum_i + dy2); + t += tex2D(maskSumTex, sum_j + dx1, sum_i + dy1); + t -= tex2D(maskSumTex, sum_j + dx1, sum_i + dy2); + t -= tex2D(maskSumTex, sum_j + dx2, sum_i + dy1); + t += tex2D(maskSumTex, sum_j + dx2, sum_i + dy2); d += t * c_DM[4] / ((dx2 - dx1) * (dy2 - dy1)); -- 2.7.4