Back to Adaptive Vision Library website

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


Header: AVL.h
Namespace: avl
Module: FoundationBasic

Applies previously created Look Up transformation to provided image.


void avl::ApplyPixelLut
	const avl::Image& inImage,
	atl::Optional<const avl::Region&> inRoi,
	const avl::PixelLut& inLut,
	avl::Image& outImage


Name Type Default Description
inImage const Image& Image to which LUT transformation will be applied
inRoi Optional<const Region&> NIL Range of pixels to be processed
inLut const PixelLut& LUT object, which defines transformation
outImage Image& Transformed image


This filter will apply previously created (by i.e. CreatePowerLut) LookUp Table transformation to inImage. Type and depth of resulting outImage are determined by properties of inLut, which were fixed during creation of LUT.

Generally speaking, LookUp transform should only be applied to monochromatic images. However, ApplyPixelLut allows for transformation of color images, under special conditions:

  • inLut has to be created for single channel output
  • inImage has to be multichannel (its depth has to be greater than 1)

If those conditions are met, processing steps are as follows: input image is being split into separate channels, every channel is processed by inLut, resulting processed channels are being merged into outImage.

It also possible to apply multichannel LUT to multichannel image, however number of channels (depth) must match, i.e. one can apply LUT of depth 3 to color, 3-channel image.

ApplyPixelLut can work with images of type: INT8, UINT8, INT16, UINT16, INT32, REAL. Operation time can be longer with INT32 and REAL, because LUT is not cached in this case - all calculations are performed during each execution, as opposed to cached execution, when only copying of appropriate values is conducted.


Please note, that one cannot apply custom LUT created for INT32 and REAL types. This would result in storing enormous array of data in-memory and would not be feasible.

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


List of possible exceptions:

Error type Description
DomainError Region exceeds an input image in ApplyPixelLut.

See Also

  • ApplyPixelLut – Applies previously created Look Up transformation to provided image.
  • CreatePowerLut – Creates Look Up Table for power operation on image pixels.