Commit cfad27cd authored by Charles Peyrega's avatar Charles Peyrega

ENH: Simplification of the computation of the belief functions of the...

ENH: Simplification of the computation of the belief functions of the complementary sets in otbDSFusionOfClassifiersImageFilter
parent 249ef6c7
......@@ -287,7 +287,8 @@ DSFusionOfClassifiersImageFilter<TInputImage, TOutputImage, TMaskImage>
}
// Bel({Ai_})
if (nbClkGroupsStepI == m_NumberOfClassesInUniverse)
belLabelSetClk_ = 1 - belLabelSetClk;
/*if (nbClkGroupsStepI == m_NumberOfClassesInUniverse)
{
belLabelSetClk_ = K * ((A - ((mLabelSetClk - mLabelSetClk_) / (1 - mLabelSetClk))) * B - C);
}
......@@ -301,7 +302,7 @@ DSFusionOfClassifiersImageFilter<TInputImage, TOutputImage, TMaskImage>
{
belLabelSetClk_ = K * (A - (mLabelSetClk / (1 - mLabelSetClk))) * B;
}
}
}*/
mapBelStepII[classLabelk] = belLabelSetClk;
mapBelStepII_[classLabelk] = belLabelSetClk_;
......@@ -323,11 +324,14 @@ DSFusionOfClassifiersImageFilter<TInputImage, TOutputImage, TMaskImage>
{
mapBelStepII_[classLabelk] = addBelLabelSetClk;
}
/*
else
{
// Adjustment
// Adjustment: Bel({Ai_}) = m_stepII({Ai_}) + 1 - SUM(m_stepII({Aj})) here;
// with {Aj} ALL the labels present in vectorPixelValue
mapBelStepII_[classLabelk] += (1 - addBelLabelSetClk);
}
*/
/*std::cout << "Bel(" << classLabelk << ") = " << mapBelStepII[classLabelk] << std::endl;
std::cout << "Bel(NOT_" << classLabelk << ") = " << mapBelStepII_[classLabelk] << std::endl;
......
......@@ -161,6 +161,60 @@ ADD_TEST(fzDSFusionOptRecTestConfMatTestKappa ${Fuzzy_TESTS3}
otbDempsterShaferFusionOptRecConfMatTest
KAPPA)
ADD_TEST(fzDSFusionTestConfMatFileRCMTestPrecision ${Fuzzy_TESTS3}
otbDempsterShaferFusionConfMatFileTest
${INPUTDATA}/Classification/QB_1_ortho_C1.csv
${INPUTDATA}/Classification/QB_1_ortho_C2.csv
${INPUTDATA}/Classification/QB_1_ortho_C3.csv
${INPUTDATA}/Classification/QB_1_ortho_C4.csv
${INPUTDATA}/Classification/QB_1_ortho_C5.csv
${INPUTDATA}/Classification/QB_1_ortho_C6.csv
${INPUTDATA}/Classification/QB_1_ortho_C7.csv
${INPUTDATA}/Classification/QB_1_ortho_C8.csv
${INPUTDATA}/Classification/QB_1_ortho_C9.csv
PRECISION
)
ADD_TEST(fzDSFusionTestConfMatFileVCMTestPrecision ${Fuzzy_TESTS3}
otbDempsterShaferFusionConfMatFileTest
${INPUTDATA}/Classification/QB_1_ortho_C1_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C2_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C3_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C4_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C5_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C6_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C7_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C8_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C9_V.csv
PRECISION
)
ADD_TEST(fzDSFusionOptRecTestConfMatFileRCMTestPrecision ${Fuzzy_TESTS3}
otbDempsterShaferFusionOptRecConfMatFileTest
${INPUTDATA}/Classification/QB_1_ortho_C1.csv
${INPUTDATA}/Classification/QB_1_ortho_C2.csv
${INPUTDATA}/Classification/QB_1_ortho_C3.csv
${INPUTDATA}/Classification/QB_1_ortho_C4.csv
${INPUTDATA}/Classification/QB_1_ortho_C5.csv
${INPUTDATA}/Classification/QB_1_ortho_C6.csv
${INPUTDATA}/Classification/QB_1_ortho_C7.csv
${INPUTDATA}/Classification/QB_1_ortho_C8.csv
${INPUTDATA}/Classification/QB_1_ortho_C9.csv
PRECISION)
ADD_TEST(fzDSFusionOptRecTestConfMatFileVCMTestPrecision ${Fuzzy_TESTS3}
otbDempsterShaferFusionOptRecConfMatFileTest
${INPUTDATA}/Classification/QB_1_ortho_C1_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C2_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C3_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C4_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C5_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C6_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C7_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C8_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C9_V.csv
PRECISION)
ADD_TEST(fzTuConfusionMatrixToMassOfBeliefNew ${Fuzzy_TESTS3}
otbConfusionMatrixToMassOfBeliefNew)
......@@ -206,6 +260,65 @@ otbDSFusionOfClassifiersImageFilterTest
${TEMP}/QB_1_ortho_DS_FUSED_PRECISION.tif
)
ADD_TEST(fzTvDSFusionOfClassifiersImageFilter9ClkRCMPrecision ${Fuzzy_TESTS3}
--compare-image ${NOTOL}
${BASELINE}/QB_1_ortho_DS_FUSED_9_Clk_RCM_PRECISION.tif
${TEMP}/QB_1_ortho_DS_FUSED_9_Clk_RCM_PRECISION.tif
otbDSFusionOfClassifiersImageFilterTest
${INPUTDATA}/Classification/QB_1_ortho_C1.tif
${INPUTDATA}/Classification/QB_1_ortho_C2.tif
${INPUTDATA}/Classification/QB_1_ortho_C3.tif
${INPUTDATA}/Classification/QB_1_ortho_C4.tif
${INPUTDATA}/Classification/QB_1_ortho_C5.tif
${INPUTDATA}/Classification/QB_1_ortho_C6.tif
${INPUTDATA}/Classification/QB_1_ortho_C7.tif
${INPUTDATA}/Classification/QB_1_ortho_C8.tif
${INPUTDATA}/Classification/QB_1_ortho_C9.tif
${INPUTDATA}/Classification/QB_1_ortho_C1.csv
${INPUTDATA}/Classification/QB_1_ortho_C2.csv
${INPUTDATA}/Classification/QB_1_ortho_C3.csv
${INPUTDATA}/Classification/QB_1_ortho_C4.csv
${INPUTDATA}/Classification/QB_1_ortho_C5.csv
${INPUTDATA}/Classification/QB_1_ortho_C6.csv
${INPUTDATA}/Classification/QB_1_ortho_C7.csv
${INPUTDATA}/Classification/QB_1_ortho_C8.csv
${INPUTDATA}/Classification/QB_1_ortho_C9.csv
PRECISION # Method to estimate the Masses of Belief of each label
10 #LabelForNoDataPixels
7 #LabelForUndecidedPixels
${TEMP}/QB_1_ortho_DS_FUSED_9_Clk_RCM_PRECISION.tif
)
ADD_TEST(fzTvDSFusionOfClassifiersImageFilter9ClkVCMPrecision ${Fuzzy_TESTS3}
--compare-image ${NOTOL}
${BASELINE}/QB_1_ortho_DS_FUSED_9_Clk_VCM_PRECISION.tif
${TEMP}/QB_1_ortho_DS_FUSED_9_Clk_VCM_PRECISION.tif
otbDSFusionOfClassifiersImageFilterTest
${INPUTDATA}/Classification/QB_1_ortho_C1.tif
${INPUTDATA}/Classification/QB_1_ortho_C2.tif
${INPUTDATA}/Classification/QB_1_ortho_C3.tif
${INPUTDATA}/Classification/QB_1_ortho_C4.tif
${INPUTDATA}/Classification/QB_1_ortho_C5.tif
${INPUTDATA}/Classification/QB_1_ortho_C6.tif
${INPUTDATA}/Classification/QB_1_ortho_C7.tif
${INPUTDATA}/Classification/QB_1_ortho_C8.tif
${INPUTDATA}/Classification/QB_1_ortho_C9.tif
${INPUTDATA}/Classification/QB_1_ortho_C1_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C2_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C3_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C4_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C5_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C6_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C7_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C8_V.csv
${INPUTDATA}/Classification/QB_1_ortho_C9_V.csv
PRECISION # Method to estimate the Masses of Belief of each label
10 #LabelForNoDataPixels
7 #LabelForUndecidedPixels
${TEMP}/QB_1_ortho_DS_FUSED_9_Clk_VCM_PRECISION.tif
)
ADD_TEST(fzTvDSFusionOfClassifiersImageFilterRecall ${Fuzzy_TESTS3}
--compare-image ${NOTOL}
${BASELINE}/QB_1_ortho_DS_FUSED_RECALL.tif
......
......@@ -26,9 +26,11 @@
void RegisterTests()
{
REGISTER_TEST(otbDempsterShaferFusionTest);
REGISTER_TEST(otbDempsterShaferFusionConfMatFileTest);
REGISTER_TEST(otbDempsterShaferFusionOptTest);
REGISTER_TEST(otbDempsterShaferFusionOptRecTest);
REGISTER_TEST(otbDempsterShaferFusionOptRecConfMatTest);
REGISTER_TEST(otbDempsterShaferFusionOptRecConfMatFileTest);
REGISTER_TEST(otbConfusionMatrixToMassOfBeliefNew);
REGISTER_TEST(otbConfusionMatrixToMassOfBeliefTest);
REGISTER_TEST(otbDSFusionOfClassifiersImageFilterNew);
......
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