create_color_trans_lutT_create_color_trans_lutCreateColorTransLutCreateColorTransLutcreate_color_trans_lut (Operator)

Name

create_color_trans_lutT_create_color_trans_lutCreateColorTransLutCreateColorTransLutcreate_color_trans_lut — Creates the look-up-table for transformation of an image from the RGB color space to an arbitrary color space.

Signature

create_color_trans_lut( : : ColorSpace, TransDirection, NumBits : ColorTransLUTHandle)

Herror T_create_color_trans_lut(const Htuple ColorSpace, const Htuple TransDirection, const Htuple NumBits, Htuple* ColorTransLUTHandle)

void CreateColorTransLut(const HTuple& ColorSpace, const HTuple& TransDirection, const HTuple& NumBits, HTuple* ColorTransLUTHandle)

static HColorTransLUT HImage::CreateColorTransLut(const HString& ColorSpace, const HString& TransDirection, Hlong NumBits)

static HColorTransLUT HImage::CreateColorTransLut(const char* ColorSpace, const char* TransDirection, Hlong NumBits)

static HColorTransLUT HImage::CreateColorTransLut(const wchar_t* ColorSpace, const wchar_t* TransDirection, Hlong NumBits)   (Windows only)

void HColorTransLUT::HColorTransLUT(const HString& ColorSpace, const HString& TransDirection, Hlong NumBits)

void HColorTransLUT::HColorTransLUT(const char* ColorSpace, const char* TransDirection, Hlong NumBits)

void HColorTransLUT::HColorTransLUT(const wchar_t* ColorSpace, const wchar_t* TransDirection, Hlong NumBits)   (Windows only)

void HColorTransLUT::CreateColorTransLut(const HString& ColorSpace, const HString& TransDirection, Hlong NumBits)

void HColorTransLUT::CreateColorTransLut(const char* ColorSpace, const char* TransDirection, Hlong NumBits)

void HColorTransLUT::CreateColorTransLut(const wchar_t* ColorSpace, const wchar_t* TransDirection, Hlong NumBits)   (Windows only)

static void HOperatorSet.CreateColorTransLut(HTuple colorSpace, HTuple transDirection, HTuple numBits, out HTuple colorTransLUTHandle)

static HColorTransLUT HImage.CreateColorTransLut(string colorSpace, string transDirection, int numBits)

public HColorTransLUT(string colorSpace, string transDirection, int numBits)

void HColorTransLUT.CreateColorTransLut(string colorSpace, string transDirection, int numBits)

def create_color_trans_lut(color_space: str, trans_direction: str, num_bits: int) -> HHandle

Description

The operator create_color_trans_lutcreate_color_trans_lutCreateColorTransLutCreateColorTransLutCreateColorTransLutcreate_color_trans_lut returns a look-up table (LUT) for color space transformation of a 8 bit RGB image to a different color space and vice versa. That means, this operator is only valid for three channel images, where each channel has pixels of type 'byte'. If the input images have different domains, only the intersection of the three input images is used for the transformation.

The parameter ColorSpaceColorSpaceColorSpaceColorSpacecolorSpacecolor_space identifies the initial or the target color space transformation and the direction of the transformation is set by TransDirectionTransDirectionTransDirectionTransDirectiontransDirectiontrans_direction. ColorTransLUTHandleColorTransLUTHandleColorTransLUTHandleColorTransLUTHandlecolorTransLUTHandlecolor_trans_luthandle contains the handle of the created look-up-table.

Using a LUT significantly speeds up the process of transformation a RGB image to another color space and vice versa with exception of the 'yiq', 'yuv', 'argyb', 'ciexyz', and 'i1i2i3' color spaces. Be aware that the LUT already needs 48MB of memory space.

For further information about the possible color space transformations see the description of the operators trans_from_rgbtrans_from_rgbTransFromRgbTransFromRgbTransFromRgbtrans_from_rgb and trans_to_rgbtrans_to_rgbTransToRgbTransToRgbTransToRgbtrans_to_rgb.

Execution Information

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

ColorSpaceColorSpaceColorSpaceColorSpacecolorSpacecolor_space (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Color space of the output image.

Default value: 'hsv' "hsv" "hsv" "hsv" "hsv" "hsv"

List of values: 'argyb'"argyb""argyb""argyb""argyb""argyb", 'cielab'"cielab""cielab""cielab""cielab""cielab", 'cielchab'"cielchab""cielchab""cielchab""cielchab""cielchab", 'cielchuv'"cielchuv""cielchuv""cielchuv""cielchuv""cielchuv", 'cieluv'"cieluv""cieluv""cieluv""cieluv""cieluv", 'ciexyz'"ciexyz""ciexyz""ciexyz""ciexyz""ciexyz", 'ciexyz3'"ciexyz3""ciexyz3""ciexyz3""ciexyz3""ciexyz3", 'ciexyz4'"ciexyz4""ciexyz4""ciexyz4""ciexyz4""ciexyz4", 'ciexyz4'"ciexyz4""ciexyz4""ciexyz4""ciexyz4""ciexyz4", 'hls'"hls""hls""hls""hls""hls", 'hls'"hls""hls""hls""hls""hls", 'hsi'"hsi""hsi""hsi""hsi""hsi", 'hsv'"hsv""hsv""hsv""hsv""hsv", 'i1i2i3'"i1i2i3""i1i2i3""i1i2i3""i1i2i3""i1i2i3", 'ihs'"ihs""ihs""ihs""ihs""ihs", 'lms'"lms""lms""lms""lms""lms", 'yiq'"yiq""yiq""yiq""yiq""yiq", 'yuv'"yuv""yuv""yuv""yuv""yuv"

TransDirectionTransDirectionTransDirectionTransDirectiontransDirectiontrans_direction (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Direction of color space transformation.

Default value: 'from_rgb' "from_rgb" "from_rgb" "from_rgb" "from_rgb" "from_rgb"

List of values: 'from_rgb'"from_rgb""from_rgb""from_rgb""from_rgb""from_rgb", 'to_rgb'"to_rgb""to_rgb""to_rgb""to_rgb""to_rgb"

NumBitsNumBitsNumBitsNumBitsnumBitsnum_bits (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of bits of the input image.

Default value: 8

List of values: 8

ColorTransLUTHandleColorTransLUTHandleColorTransLUTHandleColorTransLUTHandlecolorTransLUTHandlecolor_trans_luthandle (output_control)  color_trans_lut HColorTransLUT, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the look-up-table for color space transformation.

Result

The operator create_color_trans_lutcreate_color_trans_lutCreateColorTransLutCreateColorTransLutCreateColorTransLutcreate_color_trans_lut returns the value 2 (H_MSG_TRUE) if the given parameters are correct and the look-up-table is generated. Otherwise, an exception will be raised.

Possible Successors

apply_color_trans_lutapply_color_trans_lutApplyColorTransLutApplyColorTransLutApplyColorTransLutapply_color_trans_lut

See also

apply_color_trans_lutapply_color_trans_lutApplyColorTransLutApplyColorTransLutApplyColorTransLutapply_color_trans_lut, clear_color_trans_lutclear_color_trans_lutClearColorTransLutClearColorTransLutClearColorTransLutclear_color_trans_lut

Module

Foundation