21-Color Planes
Color planes refer to the individual channels that make up an image’s color information. In computer vision, images are typically represented as a combination of three color channels: red, green, and blue (RGB). Each channel represents the intensity of that particular color in the image.
To visualize this, imagine an image as a grid of pixels, where each pixel has a value for its red, green, and blue components. The color planes are essentially the separate layers of the image that represent each color channel.
For example, if we have an RGB image, we can extract the red color plane by setting the green and blue channels to zero, leaving only the red channel. This will result in an image where only the red components of each pixel are visible. Similarly, we can extract the green and blue color planes by zeroing out the other channels.
Color planes are useful in computer vision for various tasks, such as image enhancement, image segmentation, and object detection. By manipulating the intensity values in each color plane, we can modify the appearance of an image or extract specific features.
How about we look at a color image? What do you think is the size of this image? Let's find out. 258, 320, and 3. Why are there three numbers? The first two are the height and width. The third one is a number of color planes or channels in the image, which is three.


So how would you select a single color plane? We'll use the same indexing notation we used to crop an image. Say we want to select the red channel, which is at index one. We want all the rows, all the columns, but only the first plane. Now what does this look like? All right. So that's what the red channel looks like. Brighter areas indicate higher red values and darker areas vice versa. The apples are not as bright as you'd expect. Why do you think that is? Let's also figure out the size of this color channel. As expected, the width and height of the color channel are the same as the original image, but it doesn't have a third dimension. Well, that makes sense, doesn't it? This color plane is one of three, which are stacked together to create the color image. Each one of them is a two-dimensional array. Note that the extracted color channel is an image by itself, so you can apply the same operations as you've seen before. Let's try plotting the values from a row of the image. And that's what the plot looks like. Play with this image in the code editor, try out different operations, try selecting other colored channels.Â
References