Closed MorganGrundy closed 2 years ago
I'm experimenting with using OpenCV's imencode and imdecode to encode the images as png (lossless) before writing to the MIL file. Just from my initial test I'm honestly suprised by the reduction in file size. Obviously it will vary based on the images but for lib.mil it is reduced by nearly 40%.
Both lib.mil (f188581) and big-lib.mil (fec5fab) reduced in file size by about 40%.
I just tried adding level 9 png compression, the file size reduction was minimal and had a significant performance cost. So not at all worth it.
I just realised that we are writing the full image data to MIL files. Instead we should encode the images first to reduce the file size.