count_channelscount_channelsCountChannelsCountChannels (Operator)
Name
count_channelscount_channelsCountChannelsCountChannels
— Count channels of image.
Signature
Description
The operator count_channelscount_channelsCountChannelsCountChannelsCountChannels
counts the number of
channels of all input images.
Execution Information
- Supports objects on compute devices.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
MultiChannelImageMultiChannelImageMultiChannelImageMultiChannelImagemultiChannelImage
(input_object) (multichannel-)image(-array) →
objectHImageHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)
One- or multi-channel image.
ChannelsChannelsChannelsChannelschannels
(output_control) integer(-array) →
HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of channels.
Example (C)
read_image(&Color,"patras");
count_channels(Color,&num_channels);
for (i=1; i<=num_channels; i++)
{
access_channel(Color,&Channel,i);
disp_image(Channel,WindowHandle);
clear_obj(Channel);
}
Possible Successors
access_channelaccess_channelAccessChannelAccessChannelAccessChannel
,
append_channelappend_channelAppendChannelAppendChannelAppendChannel
,
disp_imagedisp_imageDispImageDispImageDispImage
See also
append_channelappend_channelAppendChannelAppendChannelAppendChannel
,
access_channelaccess_channelAccessChannelAccessChannelAccessChannel
Module
Foundation