You are here: Start » Function Reference » Image Point Transforms » ColorizeImage
Shows a monochromatic image in false colors.
Syntax
void avl::ColorizeImage ( ColorizeImageState& ioState, const avl::Image& inImage, atl::Optional<const avl::Region&> inRoi, avl::ColorPalette::Type inPalette, bool inNegate, atl::Optional<int>& inMinValue, atl::Optional<int>& inMaxValue, avl::Image& outImage )
Parameters
| Name | Type | Default | Description | |
|---|---|---|---|---|
| ioState | ColorizeImageState& | Object used to maintain state of the function. | ||
![]() |
inImage | const Image& | Input image | |
![]() |
inRoi | Optional<const Region&> | NIL | Range of pixels to be processed |
![]() |
inPalette | ColorPalette::Type | Iron | Palette of colors which is used to replace pixels |
![]() |
inNegate | bool | Reversing palette colors | |
![]() |
inMinValue | Optional<int>& | 0 | Minimal value of pixel that will be replaced by color from palette otherwise black pixel will be set |
![]() |
inMaxValue | Optional<int>& | 255 | Maximal value that will be replaced using color from value otherwise last color from palette will be set. |
![]() |
outImage | Image& | Output image |
Description
This filter is especially useful for visualization purposes. Hue and RedBlue pallets are useful for scientific visualization and the Iron palette is prepared for showing infrared images in thermo-graphic appliances.
Parameters inMinValue and inMaxValue defines the scale that should be applied to image pixels. Pixels outside this range are reduced to minimal or maximal value in range.
If parameters inMinValue or inMaxValue is set to Auto the filter will find the maximal or minimal pixel value.
This filter works only with single channel images.
Hints
- Consider resizing image to smaller format if image does not require to contain details.
- This filter can be used to show differences between object and background noises.
Examples
The ColorizeImage performed on the result of TestImage with inPalette set to Iron.
Remarks
Filter pre-computes after changing its parameter which can affect the filter's execution speed. Try to avoid changing filter's parameter during program execution.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
Errors
| Error type | Description |
|---|---|
| DomainError | Input image must have 1xUInt8 or 1xUInt16 format in ColorizeImage. |
| DomainError | inMinValue is bigger than inMaxValue in ColorizeImage. |


