Java : Convert a binary file (received from Bayer sensor) to a Bayer image and then to an RGB image.
I am receiving a binary file from a Bayer sensor. Every 10 bits in the file represent a pixel. How can I convert the binary file into the raw Bayer image using OpenCV in Java. Later I would also need to convert the Bayer image into the desired grayscale/RGB image. Or can I directly convert the binary file into the grayscale/RGB image ? Any help is appreciated. Thank you so much.