I'm looking for an optimal method for compressing Bayer images (it can be done either before or after demosaic), in a 'lossless' form.
I've tried several methods:
-Lossless JPEG
-Lossless JP2
-MJ2 (By saving each of the 4 Bayer channels as a signle JP2 frame of a 4-frame video file)
They give fine results but non of them was designed specially for 4 channel Bayer images...
I am unaware of an existing technology optimized for Bayer images.
Some camera manufacturers are compressing their RAW images using lossless JPEG.
> They give fine results but non of them was designed specially for 4 channel Bayer images...
You are right. However, I believe that the main problem with lossless JPEG is low compression rates.
For optimal results, you may have to design your own.