Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to get pixel values of a binarized image in android studio?

I want to get the pixel value of a binarized image and store it in an integer array. I used openCV to grayscale the image and used adaptivethreshold for the binary: grayBitmap = Bitmap.createBitmap(width,height,Bitmap.Config.ARGB_8888);

    Utils.bitmapToMat(imageBitmap,Rgba);//bitmap to Mat
    //mat to bitmap

and I want to get pixel value of imageBW to see the value of each pixels and possibly convert them into 1 and 0 depending o for black and 1 for white if necessary.