ClassesClasses | | Operators

count_channelscount_channelsCountChannelsCountChannels (Operator)

Name

count_channelscount_channelsCountChannelsCountChannels — Count channels of image.

Signature

count_channels(MultiChannelImage : : : Channels)

Herror count_channels(const Hobject MultiChannelImage, Hlong* Channels)

Herror T_count_channels(const Hobject MultiChannelImage, Htuple* Channels)

void CountChannels(const HObject& MultiChannelImage, HTuple* Channels)

HTuple HImage::CountChannels() const

static void HOperatorSet.CountChannels(HObject multiChannelImage, out HTuple channels)

HTuple HImage.CountChannels()

Description

The operator count_channelscount_channelsCountChannelsCountChannelsCountChannels counts the number of channels of all input images.

Execution Information

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


ClassesClasses | | Operators