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

BUG: wrong epsilon value in UrbanAreaDetectionTest

parent d59fc5b3
No related branches found
No related tags found
No related merge requests found
/*=========================================================================
Program: ORFEO Toolbox
......@@ -226,6 +227,10 @@ public:
itkSetMacro(ThresholdValue, double);
itkGetMacro(ThresholdDensity, double);
itkSetMacro(ThresholdDensity, double);
itkGetMacro(SobelLowerThreshold, double);
itkSetMacro(SobelLowerThreshold, double);
itkGetMacro(SobelUpperThreshold, double);
itkSetMacro(SobelUpperThreshold, double);
/** Methods */
virtual void GenerateData();
......@@ -253,6 +258,9 @@ private:
double m_ThresholdValue;
double m_ThresholdDensity;
double m_SobelLowerThreshold;
double m_SobelUpperThreshold;
}; // end class RadiometricNonWaterNonVegetationDetectionImageFilter
} // end namespace otb
......
......@@ -48,14 +48,14 @@ UrbanAreaDetectionImageFilter<TInputImage, TOutputImage, TFunction>
// Threshold
m_Thresholder->SetInput(m_EdgeDensityFilter->GetOutput());
// Mask Image
// m_MaskImageFilter->SetInput2(m_Thresholder->GetOutput());
m_MultiplyFilter->SetInput2(m_Thresholder->GetOutput());
// NonVegetationNonWaterIndex
//m_UrbanAreaExtractionFilter->SetInput(m_MaskImageFilter->GetOutput());
m_UrbanAreaExtractionFilter->SetInput(m_MultiplyFilter->GetOutput());
m_ThresholdValue = 0.5;
m_ThresholdDensity = 0.1;
m_SobelLowerThreshold = -100.0;
m_SobelUpperThreshold = 200.0;
}
/**
......@@ -71,8 +71,8 @@ UrbanAreaDetectionImageFilter<TInputImage, TOutputImage, TFunction>
m_IntensityFilter->SetInput(this->GetInput());
// Edge Density
m_SobelFilter->SetLowerThreshold(-100.0);
m_SobelFilter->SetUpperThreshold(200.0);
m_SobelFilter->SetLowerThreshold(m_SobelLowerThreshold);
m_SobelFilter->SetUpperThreshold(m_SobelUpperThreshold);
SizeType lSize;
lSize[0] = static_cast<unsigned int>(10);
lSize[1] = static_cast<unsigned int>(10);
......@@ -86,10 +86,6 @@ UrbanAreaDetectionImageFilter<TInputImage, TOutputImage, TFunction>
// Apply the mask on the input image
m_MultiplyFilter->SetInput1(this->GetInput());
//m_MaskImageFilter->SetInput1(this->GetInput());
//VectorImagePixelType lVectorZero;
//lVectorZero.Fill(0);
//m_MaskImageFilter->SetOutsideValue(lVectorZero);
// Give a threshold to urbanAreaFilter
m_UrbanAreaExtractionFilter->GetFunctor().SetLowerThreshold( m_ThresholdValue );
......
......@@ -1709,8 +1709,8 @@ ADD_TEST(raTuUrbanAreaDetectionImageFilterNew ${FEATUREEXTRACTION_TESTS14}
)
ADD_TEST(raTvUrbanAreaDetectionImageFilter ${FEATUREEXTRACTION_TESTS14}
--compare-image ${EPSILON} ${BASELINE}/raTvUrbanAreaDetection.png
${TEMP}/raTvUrbanAreaDetection.png
--compare-image ${EPSILON_8} ${BASELINE}/raTvUrbanAreaDetection.png
${TEMP}/raTvUrbanAreaDetection.png
otbUrbanAreaDetectionImageFilter
${INPUTDATA}/qb_RoadExtract2sub200x200.tif
${TEMP}/raTvUrbanAreaDetection.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