Commit be9b53223d47ef8323cb79668ea9c36d3f82a27a

Authored by Pierre Lassalle
1 parent b6de0161
Exists in master

Correction of a bug when computing the merging cost with the Baatz & Schäpe criterion.

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
include/grmBaatzSegmenter.txx
... ... @@ -69,7 +69,7 @@ namespace grm
69 69 std = std::sqrt((square_mean - 2*mean*sum + a_sum * mean* mean) / a_sum);
70 70 spect_cost += (a_sum * std - a1 * n1->m_Std[b] - a2 * n2->m_Std[b]);
71 71 }
72   - spect_cost *= this->m_Param.m_ShapeWeight;
  72 + spect_cost *= this->m_Param.m_SpectralWeight;
73 73  
74 74 if(spect_cost < this->m_Threshold)
75 75 {
... ... @@ -91,7 +91,7 @@ namespace grm
91 91  
92 92 shape_cost = this->m_Param.m_ShapeWeight * compact_f + (1-this->m_Param.m_ShapeWeight) * smooth_f;
93 93  
94   - return (spect_cost + (1-this->m_Param.m_ShapeWeight)*shape_cost);
  94 + return (spect_cost + (1-this->m_Param.m_SpectralWeight)*shape_cost);
95 95 }
96 96 else
97 97 return spect_cost;
... ...