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.
Prerequisite : RGB image representation
- Make a 3 order zero matrix of dimensions 300X600X3. 300 denotes the number of pixels for rows, 600 denotes number of pixels for columns and 3 denotes the color coding in RGB format.
- Paint the complete image in blue. RGB code for blue is (0, 0, 255)
- Make the horizontal yellow bar. RGB code for yellow is (255, 255, 0)
- Make the vertical yellow bar.
Below is the implementation:
- Draw Switzerland Flag Using Matlab
- How to draw Japan flag using MATLAB
- Draw Kuwait Flag using MATLAB
- Draw Sudan Flag using MATLAB
- Draw Indian Flag using matlab
- Draw Seychelles Flag using MATLAB
- Draw Austria flag using Matlab
- Draw Bangladesh Flag Using Matlab
- Draw Thailand Flag Using MATLAB
- How to make Indian Flag using Turtle - Python
- Matplotlib.pyplot.flag() in Python
- Python - Flag None Element Rows in Matrix
- PyQtGraph – Setting Window Flag to Plot Window
- MATLAB | Converting a Grayscale Image to Binary Image using Thresholding
- LSB based Image steganography using MATLAB
- Plot a circle using centre point and radius in MATLAB
- Matlab | Edge Detection of an image without using in-built function
- Create Mirror Image using MATLAB
- How to vertically flip an Image using MATLAB
- Matlab program to rotate an image 180 degrees clockwise without using function
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.