ImageChannels

ImageChannels[image]

gives the number of channels present in the data for the Image or Image3D object image.

ImageChannels[video]

gives the number of channels present in frames of a video.

Details

  • An image can be constructed from color channels or components such as red, green, blue in the RGB space. Each channel is an array of pixel values.
  • Number of channels present in typical images are:
  • g1-channel image in grayscale
    {g,α}2-channel grayscale with alpha
    {r,g,b}3-channel RGB image
    {r,g,b,α}4-channel RGB with alpha
    {c,m,y,k}4-channel CMYK image
    {c,m,y,k,α}5-channel CMYK with alpha

Examples

open allclose all

Basic Examples  (1)

This gives the number of channels present in an RGB image:

Scope  (6)

Channels in a grayscale image:

Channels in an RGBA image:

Channels in a CMYK image:

A 9-channel random image:

Channels of a video:

Channels in a 3D RGB image:

Wolfram Research (2008), ImageChannels, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageChannels.html (updated 2021).

Text

Wolfram Research (2008), ImageChannels, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageChannels.html (updated 2021).

CMS

Wolfram Language. 2008. "ImageChannels." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/ImageChannels.html.

APA

Wolfram Language. (2008). ImageChannels. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageChannels.html

BibTeX

@misc{reference.wolfram_2023_imagechannels, author="Wolfram Research", title="{ImageChannels}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/ImageChannels.html}", note=[Accessed: 18-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_imagechannels, organization={Wolfram Research}, title={ImageChannels}, year={2021}, url={https://reference.wolfram.com/language/ref/ImageChannels.html}, note=[Accessed: 18-March-2024 ]}