CLUT compression


(G'MIC staff) #1

I wanted to let you know we’ve just finished writing an article about CLUT compression.
In G’MIC, we have more than 550 CLUTs (Color Look-Up Tables) available to apply on you images, and this is possible thanks to this nice compression algorithm we’ve designed specifically for CLUTs.

The paper title and authors:

David Tschumperlé, Christine Porquet, Amal Mahboubi. An Efficient 3D Color LUT Compression Algorithm Based on a Multi-Scale Anisotropic Diffusion Scheme. 2019. 〈hal-02066484〉

Usually, a single CLUT file takes between 500Kb and 1Mb, and with our technique, we achieve a storage of 552 CLUTs in a single 2.5Mb file (which still surprises me to be honest :slight_smile: ).

I thought that, maybe, developers of other image processing tools could be interested by such a technique. It definitely helps sharing CLUT transformations !

You can find a link to the paper (in .pdf) here : https://hal.archives-ouvertes.fr/hal-02066484

Here is a montage of some figures of the paper, just to give you an idea :slight_smile:

Let us know what you think about this !


#2

Are there any cases where it is not very effective?

I guess the nature of CLUTs is that they are suited to this type of compression.


(G'MIC staff) #3

Exactly.
Generate a CLUT containing only pure noise, and it won’t be very effective.
Fortunately, this is not the kind of CLUTs that has any interest :slight_smile:


#4

That makes me wonder how noisy CLUTs can be and if denoising might be worthwhile.


(G'MIC staff) #5

I’ve compressed a set of 552 CLUTs for G’MIC, but never seen ‘noisy’ ones.
Discontinuous CLUTs would mean you get discontinuous images from smooth ones, which is not expected in the general case (except for the case the CLUT does some level quantization, but even with that, there would be only a few discontinuities in the CLUT, not all voxel being discontinuous).


(G'MIC staff) #6

Here is the C++ source code for CLUT decompression:


(Hebus Tetram) #7

Very interesting paper.

This is no small feat, you should be proud of that achievement. PS offers a much smaller set of 27 CLUT and those in .cube format are each bigger than your own set.

Moreover in adding an CLUT adjustment layer makes for extremely large psd files. The Haldcluts that G’mic support are easy to store and share but your efficient 3D CLUT compression seems a very powerful solution that would deliver even higher levels of compression while retaining a great fidelity.

Do you plan to provide within G’mic Gimp interface the possibility to compress a CLUT ( e.g. .cube or Haldclut) into your format and enhance your G’mic filter CLUT User-defined to support them too?

Your G’mic Film Emulation Collages is a great tool to use when looking for inspiration as it allows to test what could work well with a new image. Would it be feasible to have in G’MIC Gimp interface a user-defined Collage generator that could apply a series of CLUTs stored in a folder to the image layer?

Sorry for all the questions and congrats for your paper and fantastic work with G’mic.


#8

Using version 2.4.2. I get this error:

image

PS @partha Could you update your GIMP builds? G’MIC is now 2.5.x.


(G'MIC staff) #9

CLUT compression is currently possible only from the command line tool gmic. It’s a quite heavy process to be honest. I’d be really happy anyway if people want to share their cool CLUT, to compress them and include them in the current G’MIC set.

I’ve removed the collage filters in the latest versions, but this is something I need to add again in the new filters, I’ll probably give a try on monday.