Commit e582938b authored by Pierre Lassalle's avatar Pierre Lassalle
Browse files

Bug rapporté par le laboratoire Tetis.

Confusion entre this->m_Param.m_ShapeWeight et this->m_Param.m_SpectralWeight dans le calcul du
coût de fusion pour le critère de Baatz & Schäpe.
Showing with 2 additions and 2 deletions
+2 -2
...@@ -57,7 +57,7 @@ namespace lsrm ...@@ -57,7 +57,7 @@ namespace lsrm
std = std::sqrt((square_mean - 2*mean*sum + a_sum * mean* mean) / a_sum); std = std::sqrt((square_mean - 2*mean*sum + a_sum * mean* mean) / a_sum);
spect_cost += (a_sum * std - a1 * n1->m_Std[b] - a2 * n2->m_Std[b]); spect_cost += (a_sum * std - a1 * n1->m_Std[b] - a2 * n2->m_Std[b]);
} }
spect_cost *= this->m_Param.m_ShapeWeight; spect_cost *= this->m_Param.m_SpectralWeight;
if(spect_cost < this->m_Threshold) if(spect_cost < this->m_Threshold)
{ {
...@@ -79,7 +79,7 @@ namespace lsrm ...@@ -79,7 +79,7 @@ namespace lsrm
shape_cost = this->m_Param.m_ShapeWeight * compact_f + (1-this->m_Param.m_ShapeWeight) * smooth_f; shape_cost = this->m_Param.m_ShapeWeight * compact_f + (1-this->m_Param.m_ShapeWeight) * smooth_f;
return (spect_cost + (1-this->m_Param.m_ShapeWeight)*shape_cost); return (spect_cost + (1-this->m_Param.m_SpectralWeight)*shape_cost);
} }
else else
return spect_cost; return spect_cost;
......
Supports Markdown
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