I have an android code and I want to translate it into c++ using openCV 3.2.0 (include the extra models), in my android app I used the SLIC superpixel from Ximgproc lib of opencv this is my code
applying the SLIC Superpixel
SuperpixelSLIC x = Ximgproc.createSuperpixelSLIC(newImage, Ximgproc.SLIC, 50, (float) 0.001);
x.iterate(20);
if (true) {
x.enforceLabelConnectivity(50);
}
mask = new Mat();
x.getLabelContourMask(mask, true);
newImage.setTo(new Scalar(0, 0, 255), mask);
labels = new Mat();
x.getLabels(labels);
//count the number of the superpixel segmented regions
/* int a = x.getNumberOfSuperpixels();*/
but I couldn't find how to apply the SLIC super pixel in c++( i'm using visual studio 2015). could someone help me ?! Note : I imported all the extra modules of the opencv contib.