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
Imgproc.cvtColor(Rgba,grayMat,Imgproc.COLOR_RGB2GRAY);//grayscale
//binary
Imgproc.adaptiveThreshold(grayMat,imageBW,255,Imgproc.ADAPTIVE_THRESH_MEAN_C,Imgproc.THRESH_BINARY,5,4);
//mat to bitmap
Utils.matToBitmap(imageBW,grayBitmap);
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.