Commit a11b7153 authored by Antoine Regimbeau's avatar Antoine Regimbeau
Browse files

TEST: add test for contrast enhancment application

No related merge requests found
Showing with 52 additions and 2 deletions
+52 -2
...@@ -446,7 +446,7 @@ private: ...@@ -446,7 +446,7 @@ private:
oss << "- spatial parameters : " << m_SpatialMode ; oss << "- spatial parameters : " << m_SpatialMode ;
if ( m_SpatialMode == "local" ) if ( m_SpatialMode == "local" )
{ {
oss<< " with a thumbnail of " <<m_ThumbSize[0]<<"X"<<m_ThumbSize[1]; oss<< " with a thumbnail of " <<m_ThumbSize[0]<<" X "<<m_ThumbSize[1];
} }
oss << std::endl << "- equalisation of "; oss << std::endl << "- equalisation of ";
if ( m_EqMode == "each" ) if ( m_EqMode == "each" )
......
...@@ -51,6 +51,56 @@ otb_test_application(NAME apTvUtSmoothingTest_OutXML ...@@ -51,6 +51,56 @@ otb_test_application(NAME apTvUtSmoothingTest_OutXML
#----------- Contrast TESTS ---------------- #----------- Contrast TESTS ----------------
otb_test_application(NAME apTvUtContrastTest_base
APP ContrastEnhancement
OPTIONS -in ${INPUTDATA}/QB_Suburb.png
-out ${TEMP}/apTvUtContrastTest_base.tif int16
-bins 256
-spatial.local.h 51
-spatial.local.w 67
VALID --compare-image ${NOTOL}
${BASELINE}/apTvUtContrastTest_base.tif
${TEMP}/apTvUtContrastTest_base.tif)
otb_test_application(NAME apTvUtContrastTest_base_glob
APP ContrastEnhancement
OPTIONS -in ${INPUTDATA}/QB_Suburb.png
-out ${TEMP}/apTvUtContrastTest_base_glob.tif int16
-bins 256
-spatial global
-minmax manuel
-minmax.manuel.min 0
-minmax.manuel.max 255
VALID --compare-image ${NOTOL}
${BASELINE}/apTvUtContrastTest_base_glob.tif
${TEMP}/apTvUtContrastTest_base_glob.tif)
otb_test_application(NAME apTvUtContrastTest_lum_glob
APP ContrastEnhancement
OPTIONS -in ${INPUTDATA}/anaglyphInput1.tif
-out ${TEMP}/apTvUtContrastTest_lum_glob.tif int16
-bins 256
-spatial global
-hfact 2.7
-nodata 0
-mode lum
VALID --compare-image ${NOTOL}
${BASELINE}/apTvUtContrastTest_lum_glob.tif
${TEMP}/apTvUtContrastTest_lum_glob.tif)
otb_test_application(NAME apTvUtContrastTest_lum
APP ContrastEnhancement
OPTIONS -in ${INPUTDATA}/anaglyphInput1.tif
-out ${TEMP}/apTvUtContrastTest_lum.tif int16
-bins 256
-spatial.local.h 33
-spatial.local.w 47
-hfact 2.1
-nodata 0
-mode lum
VALID --compare-image ${NOTOL}
${BASELINE}/apTvUtContrastTest_lum.tif
${TEMP}/apTvUtContrastTest_lum.tif)
......
...@@ -41,7 +41,7 @@ int otbCLHistogramEqualizationFilter(int itkNotUsed(argc), char * argv []) ...@@ -41,7 +41,7 @@ int otbCLHistogramEqualizationFilter(int itkNotUsed(argc), char * argv [])
reader->UpdateOutputInformation(); reader->UpdateOutputInformation();
FilterType::Pointer histoEqualize ( FilterType::New() ); FilterType::Pointer histoEqualize ( FilterType::New() );
histoEqualize->SetInput( reader->GetOutput() ); histoEqualize->SetInput( reader->GetOutput() );
histoEqualize->SetMin(0); histoEqualize->SetMin(0);
histoEqualize->SetMax(255); histoEqualize->SetMax(255);
......
Supports Markdown
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