ClassesClasses | | Operators

create_color_trans_lutcreate_color_trans_lutCreateColorTransLutCreateColorTransLut (Operator)

Name

create_color_trans_lutcreate_color_trans_lutCreateColorTransLutCreateColorTransLut — 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 create_color_trans_lut(const char* ColorSpace, const char* TransDirection, const Hlong NumBits, Hlong* 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)

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

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

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

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

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)

Description

The operator create_color_trans_lutcreate_color_trans_lutCreateColorTransLutCreateColorTransLutCreateColorTransLut 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 ColorSpaceColorSpaceColorSpaceColorSpacecolorSpace identifies the initial or the target color space transformation and the direction of the transformation is set by TransDirectionTransDirectionTransDirectionTransDirectiontransDirection. ColorTransLUTHandleColorTransLUTHandleColorTransLUTHandleColorTransLUTHandlecolorTransLUTHandle 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_rgbTransFromRgbTransFromRgbTransFromRgb and trans_to_rgbtrans_to_rgbTransToRgbTransToRgbTransToRgb.

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

ColorSpaceColorSpaceColorSpaceColorSpacecolorSpace (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Color space of the output image.

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

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

TransDirectionTransDirectionTransDirectionTransDirectiontransDirection (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Direction of color space transformation.

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

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

NumBitsNumBitsNumBitsNumBitsnumBits (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of bits of the input image.

Default value: 8

List of values: 8

ColorTransLUTHandleColorTransLUTHandleColorTransLUTHandleColorTransLUTHandlecolorTransLUTHandle (output_control)  color_trans_lut HColorTransLUT, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

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

Result

The operator create_color_trans_lutcreate_color_trans_lutCreateColorTransLutCreateColorTransLutCreateColorTransLut 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_lutApplyColorTransLutApplyColorTransLutApplyColorTransLut

See also

apply_color_trans_lutapply_color_trans_lutApplyColorTransLutApplyColorTransLutApplyColorTransLut, clear_color_trans_lutclear_color_trans_lutClearColorTransLutClearColorTransLutClearColorTransLut

Module

Foundation


ClassesClasses | | Operators