imlut(img, lut, kind, order, colorScheme)

版本 1.2.0.0 (4.8 KB) 作者: Christopher
This function applies a 1D or 3D LUT to an image for color gradient calibration.
929.0 次下载
更新时间 2015/7/2

查看许可证

This function applies 1D or 3D LUTs to image data for color gradient calibration.
A good description of LUTs can be found here:
http://www.lightillusion.com/luts.html

Syntax: [img_lut] = imlut(img,lut,kind,order)

Inputs:
img - the image on which the lut shall be applied, format double,
uint8 or uint16
lut - the color lookup table (either 1D or 3D)
kind - a string '1D' or '3D' specifying whether a 1D LUT or 3D LUT is used
order - order of LUT entries. We differentiate between 'standard' (default) and 'inverse' order. Examples:
Standard Order Inverse Order
R G B R G B
0 0 0 0 0 0
1 0 0 0 0 1
2 0 0 0 0 2
0 1 0 0 1 0
1 1 0 0 1 1
2 1 0 0 1 2
0 2 0 0 2 0
... ...
2 2 2 2 2 2

Outputs:
img_lut - image after colors are changed according to LUT,
format double, uint8 or uint16 depending on LUT values

Example:
img = imread('path_to_image');
lut = dlmread('path_to_lut.cube', ' ', 4, 0);
[img_lut] = imlut(img, lut, '3D', 'standard')
imshow(img_lut)

引用格式

Christopher (2025). imlut(img, lut, kind, order, colorScheme) (https://www.mathworks.com/matlabcentral/fileexchange/43004-imlut-img-lut-kind-order-colorscheme), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2015a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.2.0.0

Error reported by Timofey Goloborodko fixed. Thanks for the hint!

1.1.0.0

added a screenshot

1.0.0.0