create_color_trans_lutT_create_color_trans_lutCreateColorTransLutCreateColorTransLutcreate_color_trans_lut (算子名称)
名称
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.
参数签名
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)
描述
该算子 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'"yiq""yiq""yiq""yiq""yiq", 'yuv'"yuv""yuv""yuv""yuv""yuv", 'argyb'"argyb""argyb""argyb""argyb""argyb", 'ciexyz'"ciexyz""ciexyz""ciexyz""ciexyz""ciexyz",
and 'i1i2i3'"i1i2i3""i1i2i3""i1i2i3""i1i2i3""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 该算子s
trans_from_rgbtrans_from_rgbTransFromRgbTransFromRgbTransFromRgbtrans_from_rgb and trans_to_rgbtrans_to_rgbTransToRgbTransToRgbTransToRgbtrans_to_rgb.
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
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.
参数表
ColorSpaceColorSpaceColorSpaceColorSpacecolorSpacecolor_space (input_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Color space of the output image.
Default:
'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:
'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:
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.
结果
该算子 create_color_trans_lutcreate_color_trans_lutCreateColorTransLutCreateColorTransLutCreateColorTransLutcreate_color_trans_lut 返回值 2 (
H_MSG_TRUE)
if the given parameters are correct and the look-up-table is
generated. Otherwise, an exception will be raised.
可能的后置算子
apply_color_trans_lutapply_color_trans_lutApplyColorTransLutApplyColorTransLutApplyColorTransLutapply_color_trans_lut
参考其它
apply_color_trans_lutapply_color_trans_lutApplyColorTransLutApplyColorTransLutApplyColorTransLutapply_color_trans_lut,
clear_color_trans_lutclear_color_trans_lutClearColorTransLutClearColorTransLutClearColorTransLutclear_color_trans_lut
模块
Foundation