Back to Aurora Vision Library Lite website

You are here: Start » Image » Image Conversions » SelectChannel

SelectChannel


Header: AVL.h
Namespace: avl

Creates an image from a single channel of the input image.

Syntax

void avl::SelectChannel
(
	const avl::Image& inImage,
	atl::Optional<const avl::Region&> inRoi,
	int inChannelIndex,
	avl::Image& outImage
)

Parameters

Name Type Range Default Description
Input value inImage const Image& Input image
Input value inRoi Optional<const Region&> NIL Range of pixels to be processed
Input value inChannelIndex int 0 - 3
Output value outImage Image& Output image

Description

The operation extracts the selected color channel of inImage.

Examples

An example image used as inImage.

The resulting outImage when inChannelIndex = 0.

The resulting outImage when inChannelIndex = 1.

The resulting outImage when inChannelIndex = 2.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

Errors

List of possible exceptions:

Error type Description
DomainError Channel index out of range in SelectChannel.
DomainError Region exceeds an input image in SelectChannel.

See Also

  • SplitChannels – Creates several monochromatic images from individual channels of the input image.