Ask Your Question
-1

SuperpixelSlic image grainy

asked 2017-07-10 13:46:28 -0600

Jt1995 gravatar image

Hi,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:

image description

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

Comments

there is no image manipulation in the superpixels code, so what do you mean with "grainy" ?

(also, an image of a phone showing an image is not entirely helpful)

berak gravatar imageberak ( 2017-07-11 00:58:24 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-07-11 01:48:03 -0600

Jt1995 gravatar image

Before i applied the algorithm i take a picture and i cut and i rotate it.Probably,after this process the result bitmap has a low quality (like blurry).

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-07-10 13:46:28 -0600

Seen: 456 times

Last updated: Jul 10 '17