Keywords: front-page

# RGB Image Manipulation

[Laboratory]

The pixels of a color image using the RGB model has three components, Red, Green and Blue. We can see an RGB image as made of three planes, one for each components.

### Creating an RGB Image

In this experiment, we generate three images of a circle, each one with its center in a different position.

a)Red; b)Green; c)Blue
a) | b) | c)

We can stack the three planes together, like a sandwich. In the RGB color model, the first plane corresponds to the Red plane, the second to the Green plane and the third to the Blue plane. After stacking the planes together we have to indicate that the image will be using the RGB Color Model.

Below is the resultant image. You can notice that it shows eight colors, which is the possible number of combinations with the three elements.

RGB image

### Extracting the Primitive Colors of an RGB Image

In this experiment, we extract each plane (element) of an RGB Image.

Below is the original RGB Image and its three elements: R, G and B. Note that they are shown as grey-level images as they are composed of a single element. We can interpret each grey element as the weight of each color gun in an RGB monitor, when displaying the RGB image.

a)original; b)R element
a) | b)

a)G element; b)B element
a) | b)

- Lab: RGB Image Manipulation