Commit efb4ce25 authored by Cresson Remi's avatar Cresson Remi

ADD: balancing strategy in patches selection

parent b3011c15
......@@ -363,6 +363,8 @@ public:
// 2. Seed = spatially random samples
otbAppLogINFO("Spatial sampling proportion " << GetParameterFloat("strategy.balanced.sp"));
const float samplingStep = 1.0 / std::sqrt(GetParameterFloat("strategy.balanced.sp"));
float step = 0;
std::vector<SampleBundle> seed;
......@@ -373,7 +375,7 @@ public:
if (step >= samplingStep)
{
seed.push_back(d);
step = fmod(step, samplingStep);
step = fmod(step, 1.0);
}
else
{
......
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