my input is texture2d which is 4 channel one so i have to divide the 2 parts of it kind of slicing how can??
i have tried it creating other mat and tex and copied till half of the texture
Mat slice = imageMat.submat(0,0,image.height, 330);
byte[] sliceData = new byte[(int)(slice.total() * slice.channels())];
slice.get(0,0,sliceData)
Texture2D fh = new Texture2D(slice.cols(), slice.rows(),
TextureFormat.RGBA32, false);
Utils.matToTexture2D(slice, fh);
it is giving me an blank image with trasparent backgrond but not i want i just want to divide or slice an image programatically