Prerequisite – RGB image representation
A colored image can be represented as a 3 order matrix. The first order is for the rows, the second order is for the columns and the third order is for specifying the color of the corresponding pixel. Here we use the RGB color format, so the third order will take 3 values of Red, Green ans Blue respectively. The values of the rows and columns depends on the size of the image.
- Load the image into a variable J by using imread().
- Store the number of rows and columns of the image in variables, r and c.
- Create 3 zero matrices R, G and B (one for each of the 3 colors) of size rXc.
- Store the corresponding color plane of the image in the corresponding zero matrix.
1: Red 2: Green 3: Blue
- Display the images by using imshow(), but typecast them into uint8 first.
- Image Processing in Java | Set 5 (Colored to Red Green Blue Image Conversion)
- Extract bit planes from an Image in Matlab
- Node Jimp | Color blue
- Node Jimp | Color | green
- MATLAB | Display histogram of a grayscale Image
- MATLAB | Change the color of background pixels by OTSU Thresholding
- Python | Visualizing image in different color spaces
- MATLAB | Converting a Grayscale Image to Binary Image using Thresholding
- MATLAB | RGB image to grayscale image conversion
- MATLAB | RGB image representation
- Image Complement in Matlab
- Image Resizing in Matlab
- Matlab | Dilation of an Image
- Matlab | Erosion of an Image
- LSB based Image steganography using MATLAB
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.