Commit 80cbe96f authored by Lozac'h Loic's avatar Lozac'h Loic
Browse files

ADD gestion pente

parent a7c52349
......@@ -173,6 +173,7 @@ private:
}else{
m_ImageList->PushBack(m_SarVHFunctorFilter->GetOutput());
}
m_ImageList->PushBack(GetParameterFloatVectorImage("inlabels"));
m_ImageSource.Set(m_ImageList);
// Compute stats
......@@ -202,7 +203,9 @@ private:
for (auto& entry: meanValues)
{
if (countValues.at(entry.first) < 20 or entry.second[0] == 0 or entry.second[1] == 0 or entry.second[2] == 0
float ratiolabel = countValues.at(entry.first)[2]/countValues.at(entry.first)[3];
otbAppLogINFO("Debug ratio = " << (ratiolabel));
if (ratiolabel < 0.5 or countValues.at(entry.first)[2] < 20 or entry.second[0] == 0 or entry.second[1] == 0 or entry.second[2] == 0
or isnan(entry.second[0]) or isnan(entry.second[1]) or isnan(entry.second[2])){
wronglabels.push_back(entry.first);
}else{
......@@ -220,7 +223,12 @@ private:
if (wronglabels.size() > 0)
RemoveNoDataLabelFromMap<StatsFilterType::PixelValueMapType>(meanValues,wronglabels);
//remove label stats in map
// for (auto& entry: meanValues)
// {
// entry.second.SetSize(3,false);
//
// }
// Invert the model
......
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