I am using
Mat img = new Mat(440, 442, CvType.CV_8UC1); img.put(0, 0, bytearray);
To construct back a grayscale image of 440*442 dimension after performing few conversion function on its pixel value.The obtained image has a change in its bit Depth which is 24 in the original image and 8 in the constructed image. The reconstructed image is below:::::::