Skip to content

JakubOchnik/Cube-LUT-Loader

Repository files navigation

Cube LUT Loader

drawing

Workflow
A simple command-line C++ tool that allows you to apply a Cube format LUT to an image. It offers high-performance multi-threaded and GPU-accelerated modes, various interpolation methods, and support for 1D and 3D LUTs.
See performance tests for a performance comparison between the offered modes.

Features

  • Simple CLI
  • 1D LUT support
  • 3D LUT support
    • Nearest value mode (faster, low quality of tonal transitions)
    • Trilinear interpolation (slower, better quality)
    • Tetrahedral interpolation (slowest, best quality)
  • Multi-threaded implementation (the number of physical CPU threads is used by default)
  • CUDA GPU implementation (highly effective with larger images)

Interpolation modes

CPU CUDA
1D Nearest-value ✔️
3D Nearest-value ✔️ ✔️
3D Trilinear ✔️ ✔️
3D Tetrahedral ✔️

Program options

  -h, --help                        Display this help menu
  -i [input_path],
  --input=[input_path]              Input image path
  -l [lut_path], --lut=[lut_path]   LUT path
  -o [output_path],
  --output=[output_path]            Output image path
  --intensity=[intensity]           Intensity of the applied LUT (0-100
                                    [%]). Defaults to 100%.
  --interpolation=[method]          Interpolation method (allowed values:
                                    'trilinear', 'tetrahedral',
                                    'nearest-value')
  -f, --force                       Force overwrite the output file
  -j [threads], --threads=[threads] Size of a thread pool used to process
                                    the image. Defaults to the number of
                                    logical CPU cores available on the
                                    system.
  -p [processor],
  --processor=[processor]           Processing mode (allowed values: 'cpu',
                                    'gpu', 'metal')
  --width=[width]                   Output image width
  --height=[height]                 Output image height

Hardware requirements

A suitable NVIDIA GPU is required for the GPU mode to work (preferably with compute capability 6.1 or up). However, if you don't have one, you can still build and use the program in CPU mode!

In progress

  • GPU acceleration for the remaining modes
  • Further performance optimizations
  • Support of color depths other than 8-bit
  • Batch processing
  • Metal acceleration (macOS)

About

A simple command-line 1D/3D .cube LUT loader.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published