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 depending on the size of the image.
- Make a 3 order zero matrix of dimensions 300 X 400 X 3. 300 denotes the number of pixels for rows, 400 denotes number of pixels for columns and 3 denotes the color coding in RGB format.
- Paint the complete image in bottle green.
- Using the equation of circle paint the circle bright red.
The equation of circle:
((x-h)^2 - (y-k)^2)=r^2
where (h, k) are the centers, (x, y) are co-ordinates of x-axis and y-axis and is the radius of the circle.
Below is the implementation:
- Draw Kuwait Flag using MATLAB
- How to draw Japan flag using MATLAB
- Draw Austria flag using Matlab
- Draw Indian Flag using matlab
- Draw Sudan Flag using MATLAB
- Draw Sweden Flag using matlab
- Draw Seychelles Flag using MATLAB
- Draw Thailand Flag Using MATLAB
- Draw Switzerland Flag Using Matlab
- Matlab | Erosion of an Image
- MATLAB | RGB image representation
- Image Resizing in Matlab
- Image Complement in Matlab
- Matlab | Dilation of an Image
- Reverse Video in 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 email@example.com. 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.