Search code examples
androidopengl-esglslgpuimageandroid-gpuimageview

How to read Hald Clut image?


I want to read Hald clut image for colour correction in GLSL. I found this article http://www.quelsolaar.com/technology/clut.html but it is using 3D texture to read data from clut image but i want to read it using 2D texture. I know how to read 8*8 LUT file but not this(8*64) one.

Can anyone help me reading this clut file?

Ref on how to read LUT(8*8) file: https://github.com/CyberAgent/android-gpuimage/blob/develop/library/src/jp/co/cyberagent/android/gpuimage/GPUImageLookupFilter.java


Solution

  • I'm working on an Android library on github which is for applying CLUTs: https://github.com/dntks/easyLUT

    It handles and applies CLUT-s on Bitmaps and ImageViews, maybe it can help you in what you need.

    However it's not working with OpenGL, maybe you can get the idea of how to work with LUTS for color correction from the source code.

    For further explanation please check my answer here: How to use LUT with JavaScript?