Android : Android device processing 16 bit per sample image

on Monday, October 13, 2014


I am trying to load a 16 bit per channel (48 bit per pixel) RGB image into Bitmap in Android. So its, 16 bit per channel with three channels.


When I do this with 8 bit per sample(24 bit per pixel) RGB it works fine. I do it like this:



int bitPerSample = 8;
byte [] 8bitPerSampleRGBsource = myOwngetRGBByteArrayFromFileFunctions(File, bitPerSample);

Mat m = new Mat(imageWidth,imageHeight,CvType.CV_8UC3);
m.put(0,0, rgb);

Bitmap bm = Bitmap.createBitmap(m.cols(), m.rows(),Bitmap.Config.ARGB_8888);
Utils.matToBitmap(m, bm);


Now this works fine but when I do it for the 16 bps image it doesnt work. I use CvType.CV_16UC3 instead.


I think the problem is that ARGB8888 is 32 bit integer(8+8+8+8) but I need 48 bit integer.


Any workaround for this problem? Is this limited in Android due to lack of processor power?


Best regards


Mirhet


0 comments:

Post a Comment