Commit 528fdca4 authored by Thomas Feuvrier's avatar Thomas Feuvrier

CmakeLists de base : Version 2.0.0

Modification fichier de test pour SVMImageModelEstimatorAcsessor - 10e-4.
parent 7ab85104
......@@ -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
......
......@@ -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;
......
......@@ -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)
......
......@@ -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];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment