Skip to content

Commit 29f9ddf

Browse files
committed
Merge pull request #1110 from jexner:mslic-fix-uninitialized-int
2 parents 7494ceb + 5d14e0e commit 29f9ddf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

modules/ximgproc/src/slic.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ void SuperpixelSLICImpl::initialize()
279279

280280
void SuperpixelSLICImpl::iterate( int num_iterations )
281281
{
282+
// store total iterations
283+
m_iterations = num_iterations;
284+
282285
if( m_algorithm == SLICO )
283286
PerformSLICO( num_iterations );
284287
else if( m_algorithm == SLIC )
@@ -1373,10 +1376,6 @@ inline void SuperpixelSLICImpl::PerformMSLIC( const int& itrnum )
13731376
for( int b = 0; b < m_nr_channels; b++ )
13741377
sigma[b].resize(m_numlabels, 0);
13751378

1376-
vector<float> sigmax(m_numlabels, 0);
1377-
vector<float> sigmay(m_numlabels, 0);
1378-
vector<int> clustersize(m_numlabels, 0);
1379-
13801379
Mat distvec( m_height, m_width, CV_32F );
13811380

13821381
const float xywt = (m_region_size/m_ruler)*(m_region_size/m_ruler);

0 commit comments

Comments
 (0)