Comments on compression

From Endrov

Compression can either be lossy or lossless. To sum up the advantages of each method:

Lossy:

  • Quality-vs-file size trade-off possible
  • Smaller files are faster to load
  • Higher-order noise which might interfere with image analysis is reduced

Lossless:

  • Quality trade-off need not be considered; one complication less
  • Higher-order features are guaranteed not to be lost

From experience, even the lowest lossy jpeg compression level will give a 5-20x improvement in size as compared to uncompressed. Non-lossy compression gives about 2x. If you have many recordings then this alone might force you to choose lossy compression as this directly translates into storage cost. If you don't have storage problems and don't want to bother then non-lossy is a good no-brainer and you are not at risk of having to redo recordings in case you have compressed them too hard.

Here are some benchmarks of a DIC and a GFP image, uncompressed (TIFF), lossless (PNG) and several levels of lossy (JPEG). Compare yourself, sizes are in kB.

Format DIC Size GFP Size
TIFF 326.3 83.6
PNG 216.0 45.3
JPEG.100 155.2 36.9
JPEG.99 143.6 33.9
JPEG.98 120.0 27.4
JPEG.95 72.6 14.6
JPEG.90 37.6 7.7
JPEG.80 18.3 3.4