access to single pixel of SuperpixelSlic object Android

asked 2017-07-10 03:21:10 -0600

Jt1995 gravatar image

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);
edit retag flag offensive close merge delete

Comments

Dear Friend. i saw your publications and you had this bug could you show me how you fixed it ?!

java.lang.UnsatisfiedLinkError: No implementation found for long org.opencv.ximgproc.Ximgproc.createSuperpixelSLIC_0(long, int, int, float) (tried Java_org_opencv_ximgproc_Ximgproc_createSuperpixelSLIC_10 and Java_org_opencv_ximgproc_Ximgproc_createSuperpixelSLIC_10__JIIF)

manef gravatar imagemanef ( 2018-09-16 11:03:03 -0600 )edit