#include <opencv2/opencv.hpp>
#include <opencv2/ximgproc.hpp>
using namespace cv;
using namespace cv::ximgproc;
int main(int argc, char **argv)
{
Mat image = imread("im/lena.png"); //512x512
Ptr<SuperpixelSLIC> slic = createSuperpixelSLIC(image, SLICO, 10, 10.0f) ;
return 0;
}
breaks here , m_numlabels=2621, m_kseedsx.size()=2601
actually, it works, when choosing a larger region, like 12
for context, see here
@berak ,
@berak ,
Let me know the results.
@berak ,
@berak ,
--- opencv_contrib/modules/ximgproc/src/slic.cpp 2015-12-23 11:30:53.359563158 +0200
+++ opencv_contrib/modules/ximgproc/src/slic.cpp 2016-04-05 17:31:29.774349783 +0300
@@ -226,11 +226,12 @@
else
CV_Error( Error::StsInternal, "No such algorithm" );
+ // update amount of labels now
+ m_numlabels = (int)m_kseeds[0].size();
+
// perturb seeds given edges
if ( perturbseeds ) PerturbSeeds( edgemag );
- // update amount of labels now
- m_numlabels = (int)m_kseeds[0].size();
}
void SuperpixelSLICImpl::iterate( int num_iterations )
@cbalint13 ,
K枚sz枚n枚m sz茅pen !
(Vielen dank !)
yes, demo code + patch are working nicely now.
incredibly fast ! thanks again.
Most helpful comment
@berak ,