Back to Adaptive Vision Library website

You are here: Start » Function Reference » Image Look Up Tables » CreatePixelLut

CreatePixelLut


Creates LookUp Table from function provided as array of pixels.

Syntax

C++
C#
 
void avl::CreatePixelLut
(
	const atl::Array<avl::Pixel>& inFunction,
	const avl::PlainType::Type& inOutputType,
	const int inOutputDepth,
	avl::PixelLut& outLut
)

Parameters

Name Type Range Default Description
inFunction const Array<Pixel>&
inOutputType const PlainType::Type&
inOutputDepth const int 1 - 4 1
outLut PixelLut& LUT object, which defines transformation

Description

This operation allows to create LookUp Table to be used with ApplyPixelLut filter. Internal LUT object is created based on provided inFunction, which should consist of pixels with desired values to be in output image after transformation. PixelLut can be created for images of types: INT8, UINT8, INT16, UINT16 and any valid depth (max. 4). inFunction should contain number of Pixel objects equal to number of distinct values in image of inOutputType type. First value in inFunction array is being mapped to lowest possible value of pixel, i.e. when inOutputType is set to UInt8, every pixel with value 0 in input image will be mapped to pixel with index 0 in inFunction, but when inOutputType is set to Int8, every pixel with value -127 in input image of ApplyPixelLut will be mapped to pixel with index 0 in inFunction.

Remarks

Standard operations like PowerImage, CorrectGamma and LogarithmImage for images of type Int32 and Real are available in Image Point Transforms category.

Errors

Error type Description
DomainError Unsupported output pixel type!
DomainError Empty array on inFunction input in CreatePixelLut

See Also