Commit 71ae8e0d authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #1088 from cbalint13:lsc_fix

parents 38758066 90105169
......@@ -768,6 +768,8 @@ inline void SuperpixelLSCImpl::PostEnforceLabelConnectivity( int threshold )
double W = W1 + W2;
if ( (Label1 > 0) && (Label2 > 0) )
{
for ( int b = 0; b < m_nr_channels; b++ )
{
centerC1[b][Label2] = float((W2*centerC1[b][Label2] + W1*centerC1[b][Label1]) / W);
......@@ -785,6 +787,7 @@ inline void SuperpixelLSCImpl::PostEnforceLabelConnectivity( int threshold )
int y = (*S).yLoc[i];
m_klabels.at<int>(y,x) = Label2;
}
}
vector<Superpixel>::iterator Stmp;
Stmp = find( Sarray.begin(), Sarray.end(), Label2 );
......
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