Ther's a piece of code I should translate from Matlab to OpenCV4Android. Part of this code takes and RGB image and splits it. When I run the Matlab app, I can see that each of the splitted channels is of type uint8 and the dimensions are 376x640. In that case, the image was loaded by imread , and split by simple matrix operations (R = im(:,:,1) for the red channel, etc.):
When I run the Android app, after splitting the image (to RGBa first, it doesn't matter), I get that each channel is of type CV_8UC1 (which should be equivalent to uint8, If I'm getting it right), but the dimensions are 1128x1920 (which is multiplying the original dimensions by a factor of 3). The original image was with the same dimensions, but the type was CV_8UC4. The image was preloaded to an ImageView
and was converted to map (using Core.BitmapToMat()
). The channel split was done by Core.split()
:
I would like to now what makes this difference? And is there to work in my Android app with similar dimensions to the Matlab app.