Reputation: 31
I am supposed to construct an image in Java from a binary file that the Java Program reads. The file comes from a Bayer Filter sensor. The file consists of the binary values of each pixel .Every pixel is represented by 10 bits. A demosaicing algorithm is required to be written to build the image from the binary data.There are 1024*1280 pixels.Hence,1280*1024*10 = 13107200 bits = 1638400 bytes is the image size. Does anyone have such an algorithm implemented in Java ? I would be glad if someone could help. Thank you so much.
Upvotes: 1
Views: 1421
Reputation: 31
The solution is using an external library. There is a library called OpenCV which can be used for Java. The function Imgproc.demosaicing() converts a raw Bayer image to desired format.Thank you all for the help.
Upvotes: 1