I have tried with this 1 code but I am not sure if am right
this is the code which I have tried :
Mat originalImage = Highgui.imread(path);
int[] imageInByte = new int[(int) (originalImage.total() * originalImage.channels())];
also I want to know how to get mat from integer array?