Commit ba90833f authored by Cresson Remi's avatar Cresson Remi

ADD: dummy number of classes for chessbord mode

parent 32e3699f
...@@ -297,7 +297,7 @@ public: ...@@ -297,7 +297,7 @@ public:
* Allocate a std::vector of sample bundle * Allocate a std::vector of sample bundle
*/ */
std::vector<SampleBundle> std::vector<SampleBundle>
AllocateSamples() AllocateSamples(unsigned int nbOfClasses = 2)
{ {
// Nb of samples (maximum) // Nb of samples (maximum)
const UInt8ImageType::RegionType entireRegion = m_MorphoFilter->GetOutput()->GetLargestPossibleRegion(); const UInt8ImageType::RegionType entireRegion = m_MorphoFilter->GetOutput()->GetLargestPossibleRegion();
...@@ -308,7 +308,6 @@ public: ...@@ -308,7 +308,6 @@ public:
maxNbOfSamples *= maxNbOfRows; maxNbOfSamples *= maxNbOfRows;
// Nb of classes // Nb of classes
const unsigned int nbOfClasses = GetParameterInt("strategy.balanced.nclasses");
SampleBundle initSB(nbOfClasses); SampleBundle initSB(nbOfClasses);
std::vector<SampleBundle> bundles(maxNbOfSamples, initSB); std::vector<SampleBundle> bundles(maxNbOfSamples, initSB);
...@@ -357,7 +356,7 @@ public: ...@@ -357,7 +356,7 @@ public:
otbAppLogINFO("Computing samples distribution..."); otbAppLogINFO("Computing samples distribution...");
std::vector<SampleBundle> bundles = AllocateSamples(); std::vector<SampleBundle> bundles = AllocateSamples(GetParameterInt("strategy.balanced.nclasses"));
// Patch size // Patch size
UInt8ImageType::SizeType patchSize; UInt8ImageType::SizeType patchSize;
......
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