From 34f9dd856b64d0a07ebfee8b2a4688f73ff1f25b Mon Sep 17 00:00:00 2001 From: Mathieu Deltorre <mathieu.deltorre@c-s.fr> Date: Thu, 24 Apr 2008 08:03:26 +0000 Subject: [PATCH] *correction valeur absolue sur seuillage --- .../otbImageToSIFTKeyPointSetFilter.txx | 28 ++++--------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx b/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx index 88d31e1baa..9aecc59561 100644 --- a/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx +++ b/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx @@ -506,30 +506,14 @@ namespace otb PixelType lHessianTrace2 = (dxx+dyy)*(dxx+dyy); PixelType lHessianDet = dxx*dyy-dxy*dxy; - if (det>=0) - { - // DoG threshold - accepted = lDoGInterpolated >= det*m_DoGThreshold || - lDoGInterpolated <= -det*m_DoGThreshold; - } - else if (det<=0) - { - // DoG threshold - accepted = lDoGInterpolated <= det*m_DoGThreshold*maximumDoG || - lDoGInterpolated >= -det*m_DoGThreshold*maximumDoG; - } + // DoG threshold + + accepted = fabs(lDoGInterpolated) >= fabs(det*m_DoGThreshold); // Eliminating edge response - if (lHessianDet>=0) - { - accepted = accepted && - lHessianTrace2 < m_RatioEdgeThreshold*lHessianDet; - } - else if (lHessianDet <= 0) - { - accepted = accepted && - lHessianTrace2 < m_RatioEdgeThreshold*lHessianDet; - } + + accepted = accepted && + fabs(lHessianTrace2) < fabs(m_RatioEdgeThreshold*lHessianDet); if (!accepted) { -- GitLab