Skip to content
Snippets Groups Projects
Commit 34156609 authored by Guillaume Borrut's avatar Guillaume Borrut
Browse files

BUG:Error in the MSAVI computation

parent 6b2ec616
No related branches found
No related tags found
No related merge requests found
......@@ -241,12 +241,12 @@ public:
{
double dnir = static_cast<double>(nir);
double dr = static_cast<double>(r);
double sqrt_value = (2*dr+1)*(2*dr+1) - 8*(dr-dnir);
double sqrt_value = (2*dnir+1)*(2*dnir+1) - 8*(dnir-dr);
if ( sqrt_value < 0. )
{
return static_cast<TOutput>(0.);
}
return ( static_cast<TOutput>( (2*dr + 1 - vcl_sqrt(sqrt_value))/2. ) );
return ( static_cast<TOutput>( (2*dnir + 1 - vcl_sqrt(sqrt_value))/2. ) );
}
};
......
......@@ -489,8 +489,8 @@ ADD_TEST(raTvAtmosphericCorrectionSequencementTest ${RADIOMETRY_TESTS4}
# ------- otb::RAndBAndNIRVegetationIndexImageFilter ------------------------------
ADD_TEST(raTvEVIRAndBAndNIRVegetationIndexImageFilter ${RADIOMETRY_TESTS4}
#--compare-image ${EPSILON} ${BASELINE}/raRAndBAndNIRVegetationIndex_EVI_poupees_subc1c2c3.tif
# ${TEMP}/raRAndBAndNIRVegetationIndex_EVI_poupees_subc1c2c3.tif
--compare-image ${EPSILON} ${BASELINE}/raRAndBAndNIRVegetationIndex_EVI_poupees_subc1c2c3.tif
${TEMP}/raRAndBAndNIRVegetationIndex_EVI_poupees_subc1c2c3.tif
otbEVIRAndBAndNIRVegetationIndexImageFilter
EVI
${INPUTDATA}/poupees_sub_c1.png
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment