Herror ::count_channels (
    Hobject MultiChannelImage,
    long *Channels
)
Herror ::count_channels (
    Hobject MultiChannelImage,
    HTuple *Channels
)
long HImage::CountChannels (
    void
) const
HTuple HImageArray::CountChannels (
    void
) const

Count channels of image.

The operator ::count_channels counts the number of channels of all input images.


Parameters

MultiChannelImage (input_object)
(multichannel-)image(-array) -> Hobject: HImage(Array)
One- or multichannel image.

Channels (output_control)
integer(-array) -> (HTuple.) long *
Number of channels.


Example
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_channel, ::append_channel, ::disp_image


See also

::append_channel, ::access_channel


Module

Image / region / XLD management



Copyright © 1996-2002 MVTec Software GmbH