i've this code where im applying the algorithm slic superpixel on a image. Then after showing my image with a imageview,the user should select with touch the superpixels he wants to select.My problem is how can i access to a single superpixel so i can color it to point out? Now,what i've done is this:
Here i applied the superpixelslic algorithm to my image and i show it
newMat=new Mat();
Utils.bitmapToMat(image,newMat,true);
SuperpixelSLIC x= Ximgproc.createSuperpixelSLIC(newMat, Ximgproc.SLIC,rows/9,(float)25);
x.iterate(num_iterations);
if (min_element_size>0)
x.enforceLabelConnectivity(min_element_size);
Mat mask=new Mat();
x.getLabelContourMask(mask,true);
newMat.setTo( new Scalar(0,0,255),mask);
Utils.matToBitmap(newMat,image);
Mat labels=new Mat();
x.getLabels(labels);