From 528fdca440dda2eea111299fff9397a37f392c84 Mon Sep 17 00:00:00 2001 From: Thomas Feuvrier <thomas.feuvrier@c-s.fr> Date: Wed, 12 Dec 2007 09:39:58 +0000 Subject: [PATCH] CmakeLists de base : Version 2.0.0 Modification fichier de test pour SVMImageModelEstimatorAcsessor - 10e-4. --- CMakeLists.txt | 4 ++-- .../otbReflectanceToSurfaceReflectanceImageFilter.h | 4 ++-- Testing/Code/Learning/CMakeLists.txt | 10 +++++----- .../otbSVMImageModelEstimatorModelAccessor.cxx | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f287bd879..ac723eaf06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,8 +55,8 @@ ADD_DEFINITIONS( #----------------------------------------------------------------------------- # OTB version number. An even minor number corresponds to releases. -SET(OTB_VERSION_MAJOR "1") -SET(OTB_VERSION_MINOR "6") +SET(OTB_VERSION_MAJOR "2") +SET(OTB_VERSION_MINOR "0") SET(OTB_VERSION_PATCH "0") # Version string should not include patch level. The major.minor is diff --git a/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h b/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h index 55acd70896..7756789632 100644 --- a/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h +++ b/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h @@ -71,7 +71,7 @@ namespace otb TOutput outPixel; double temp, temp2; temp = static_cast<double>(inPixel)*m_Coefficient + m_Residu; - temp2 = temp / (1 + m_SphericalAlbedo * temp); + temp2 = temp / (1. + m_SphericalAlbedo * temp); outPixel = static_cast<TOutput>(temp2); @@ -165,7 +165,7 @@ namespace otb coef = static_cast<double>(m_AtmosphericRadiativeTerms->GetTotalGaseousTransmission(i) * m_AtmosphericRadiativeTerms->GetDownwardTransmittance(i) * m_AtmosphericRadiativeTerms->GetUpwardTransmittance(i) ); - coef = 1 / coef; + coef = 1. / coef; res = -m_AtmosphericRadiativeTerms->GetIntrinsicAtmosphericReflectance(i) * coef; FunctorType functor; diff --git a/Testing/Code/Learning/CMakeLists.txt b/Testing/Code/Learning/CMakeLists.txt index 68c1e7bc94..c9c2fa5c49 100644 --- a/Testing/Code/Learning/CMakeLists.txt +++ b/Testing/Code/Learning/CMakeLists.txt @@ -16,8 +16,8 @@ SET(LEARNING_TESTS ${CXX_TEST_PATH}/otbLearningTests) #EPSILON est different de 0.0 pour les tests multiplateformes avec différentes options de compilation. SET(EPSILON 0.0000000001) -SET(BIGEPSILON 0.001) - +SET(EPSILON_10e3 0.001) +SET(EPSILON_10e4 0.0001) # ------- otb::SVMModel ------------------------------ @@ -75,7 +75,7 @@ ADD_TEST(leTuSVMImageModelEstimatorNew ${LEARNING_TESTS} otbSVMImageModelEstimatorNew) ADD_TEST(leTvSVMImageModelEstimatorTrain ${LEARNING_TESTS} ---compare-ascii ${BIGEPSILON} ${BASELINE_FILES}/leTvsvm_model_image +--compare-ascii ${EPSILON_10e3} ${BASELINE_FILES}/leTvsvm_model_image ${TEMP}/leTvsvm_model_image otbSVMImageModelEstimatorTrain ${INPUTDATA}/ROI_QB_MUL_4.tif @@ -83,7 +83,7 @@ ADD_TEST(leTvSVMImageModelEstimatorTrain ${LEARNING_TESTS} ${TEMP}/leTvsvm_model_image) ADD_TEST(leTvSVMImageModelEstimatorModelAccessor ${LEARNING_TESTS} ---compare-ascii ${TOL} ${BASELINE_FILES}/leSVMModelEstimatorModelAccessor.txt +--compare-ascii ${EPSILON_10e4} ${BASELINE_FILES}/leSVMModelEstimatorModelAccessor.txt ${TEMP}/leSVMModelEstimatorModelAccessor.txt otbSVMImageModelEstimatorModelAccessor ${INPUTDATA}/ROI_QB_MUL_4.tif @@ -96,7 +96,7 @@ ADD_TEST(leTuSVMPointSetModelEstimatorNew ${LEARNING_TESTS} otbSVMPointSetModelEstimatorNew) ADD_TEST(leTuSVMPointSetModelEstimatorTrain ${LEARNING_TESTS} ---compare-ascii ${BIGEPSILON} ${BASELINE_FILES}/leTvsvm_model_pointset +--compare-ascii ${EPSILON_10e3} ${BASELINE_FILES}/leTvsvm_model_pointset ${TEMP}/leTvsvm_model_pointset otbSVMPointSetModelEstimatorTrain ${TEMP}/leTvsvm_model_pointset) diff --git a/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx b/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx index ef8ae75cf4..42e54e8a63 100644 --- a/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx +++ b/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx @@ -126,7 +126,7 @@ int otbSVMImageModelEstimatorModelAccessor( int argc, char* argv[] ) { itkGenericExceptionMacro(<<"rhos NULL"); } - f << " "; + f << std::setprecision(10) <<" "; for(unsigned int i=0;i<taille;i++) { f << " " << rhos[i]; -- GitLab