Author Topic: What's the best compression algorithm for raw thermal video?  (Read 613 times)

0 Members and 1 Guest are viewing this topic.

Offline quinceTopic starter

  • Regular Contributor
  • *
  • Posts: 70
  • Country: us
What's the best compression algorithm for raw thermal video?
« on: September 28, 2024, 12:59:19 am »
Lossless or lossy.

There are the obvious choices like h264 and AV1, but then there are newer lossless encoders like ffv1 which can be quite efficient. Frustratingly, there aren't often efficient implementations at the logic gate level - you need to get your frames into userspace on an OS to use all those libraries, or write your own FPGA or DSP implementation of the encoder, or use some built-in peripheral to do it.

At the ultra low level, there are obviously simple algorithms like run-length encoding of pixels from a stream, but I'm not sure they'd help much in thermal images where adjacent pixels are often just slightly different.

Has anyone found benefit in squeezing unused bits from an image? ex: If every 16-bit pixel in a frame is anded together, and the result is 0b0001111111111000, drop all the bits from each pixel that are higher than 12 and lower than 3, concatenate each frame into a HxWx(16-6) binary array, and put a header before each frame showing that limit.
 

Offline Vipitis

  • Frequent Contributor
  • **
  • Posts: 875
  • Country: de
  • aspiring thermal photography enthusiast
Re: What's the best compression algorithm for raw thermal video?
« Reply #1 on: September 28, 2024, 12:03:31 pm »
There are some special monochrome modes for h264. Which does much more than just the dct and the temporal stuff. It does gamut compression too which might be useful.

But I doubt they are supported by some ots encoders. if you say lossless there aren't many options beyond Huffman(which h264 also does), which will be much easier to do for spatial data in the frequency domain. but then again, I doubt it's implemented anywhere.

Just do stills to jpeg pretty much, without a horrible equalization table and it will do a lot. if you don't do interframe compression you will be out of luck. perhaps a difference frame might be lower entropy and therefore easier to compress.
 
The following users thanked this post: quince


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf