From d4f7bbc0d5e9eb995be5fe580d5b8c395f8dbb6f Mon Sep 17 00:00:00 2001
From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org>
Date: Wed, 30 Sep 2009 10:55:04 +0800
Subject: [PATCH] TEST: Sift test using new options

---
 Testing/Code/FeatureExtraction/CMakeLists.txt                | 5 ++++-
 ...ImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii.cxx | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Testing/Code/FeatureExtraction/CMakeLists.txt b/Testing/Code/FeatureExtraction/CMakeLists.txt
index 88fc798086..2bb9a1edd5 100644
--- a/Testing/Code/FeatureExtraction/CMakeLists.txt
+++ b/Testing/Code/FeatureExtraction/CMakeLists.txt
@@ -10,6 +10,8 @@ SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)
 SET(NOTOL 0.0)
 
 #Tolerance sur la difference des valeurs numeriques dans le --compare-ascii
+SET(EPSILON_1 0.1)
+SET(EPSILON_2 0.01)
 SET(EPSILON_3 0.001)
 
 #Tolerance sur diff pixel image
@@ -980,8 +982,9 @@ ADD_TEST(feTvImageToSURFKeyPointSetFilterSceneOutputDescriptorAscii ${FEATUREEXT
 ADD_TEST(feTuImageToFastSIFTKeyPointSetFilterNew ${FEATUREEXTRACTION_TESTS10}
          otbImageToFastSIFTKeyPointSetFilterNew)
 
+#Note the epsilon is according to relative difference
 ADD_TEST(feTvImageToFastSIFTKeyPointSetFilterSceneOutputDescriptorAscii ${FEATUREEXTRACTION_TESTS10}
---compare-list ${EPSILON_3}
+--ignore-order --epsilon-boundary 0.0001 --compare-ascii ${EPSILON_2}
 		${BASELINE_FILES}/feTvImageToFastSIFTKeyPointSetFilterSceneKeysOutputDescriptor.txt
 		${TEMP}/feTvImageToFastSIFTKeyPointSetFilterSceneKeysOutputDescriptor.txt
          otbImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii
diff --git a/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii.cxx b/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii.cxx
index b5c58e59e1..14cb5a439f 100644
--- a/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii.cxx
+++ b/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii.cxx
@@ -116,7 +116,7 @@ int otbImageToFastSIFTKeyPointSetFilterOutputDescriptorAscii(int argc, char * ar
     while (itDescriptor < stopVal )
     //while (itDescriptor < static_cast<int>((*itData).size()-2) )
      {
-	  outfile << std::fixed << std::setprecision(3) << (*itData)[itDescriptor+2] << " ";
+	  outfile << std::fixed << std::setprecision(5) << (*itData)[itDescriptor+2] << " ";
       itDescriptor++;
     }
     outfile << "]" << std::endl;
-- 
GitLab