Jt1995
Jt1995

Reputation: 159

SuperpixelSlic image grainy

im doing an android project with opencv library and im using superpixelslic algorithm.After i applied the algorithm on some devices the image looks like grainy like this:

enter image description here This is my superpixel code:

    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);
    final ImageView g=(ImageView)view.findViewById(R.id.imageView5);
    g.setImageBitmap(image);

Could it be that,after i take/choose a picture i cut e rotate it,loosing quality?

Upvotes: 1

Views: 198

Answers (0)

Related Questions