Skip to content

Commit 0965aa2

Browse files
committed
Merge pull request #626 from cbalint13:slic
2 parents 5eb8bf9 + cf5224f commit 0965aa2

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

modules/ximgproc/include/opencv2/ximgproc/slic.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ superpixel algorithm, which are: region_size and ruler. It preallocate some buff
148148
computing iterations over the given image. An example of SLIC versus SLICO is ilustrated in the
149149
following picture.
150150
151-
![image](pics/slic_slico_kermit.png)
151+
![image](pics/superpixels_slic.png)
152152
153153
*/
154154

modules/ximgproc/src/slic.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,12 @@ void SuperpixelSLICImpl::initialize()
226226
else
227227
CV_Error( Error::StsInternal, "No such algorithm" );
228228

229+
// update amount of labels now
230+
m_numlabels = (int)m_kseeds[0].size();
231+
229232
// perturb seeds given edges
230233
if ( perturbseeds ) PerturbSeeds( edgemag );
231234

232-
// update amount of labels now
233-
m_numlabels = (int)m_kseeds[0].size();
234235
}
235236

236237
void SuperpixelSLICImpl::iterate( int num_iterations )

0 commit comments

Comments
 (0)