Back to FabImage Library Lite website
You are here: Start » Image Conversions » SplitChannels

SplitChannels
Header: | FIL.h |
---|---|
Namespace: | fil |
Creates several monochromatic images from individual channels of the input image.
Syntax
void fil::SplitChannels ( const fil::Image& inImage, fil::Image& outMonoImage1, fil::Image& outMonoImage2, ftl::Optional<fil::Image&> outMonoImage3, ftl::Optional<fil::Image&> outMonoImage4 )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inImage | const Image& | Input image | |
![]() |
outMonoImage1 | Image& | Image of the first channel | |
![]() |
outMonoImage2 | Image& | Image of the second channel | |
![]() |
outMonoImage3 | Optional<Image&> | Image of the third channel (if exists) | |
![]() |
outMonoImage4 | Optional<Image&> | Image of the fourth channel (if exists) |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outMonoImage1, outMonoImage2, outMonoImage3, outMonoImage4.
Read more about Optional Outputs.
Description
The operation extracts the color channels of inImage as separate monochromatic images. Outputs corresponding to non-existing channels of an image are set to Nil.
Examples
![]() An example image used as inImage. |
![]() The resulting outMonoImage1. |
![]() The resulting outMonoImage2. |
![]() The resulting outMonoImage3. |
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
See Also
- MergeChannels – Creates a multichannel image from several monochromatic ones.
- SelectChannel – Creates an image from a single channel of the input image.