Create Indian Flag using matlab
A coloured image is represented in a 3-Dimensional matrix during digital image processing. Images can be represented using a variety of colour models, The most popular model is RGB model. The RGB model typically represents an image. Red, Green, and Blue make up the first, second, and third channels of the matrix, respectively. Steps to create the tri-color Indian Flag: Step 1: First we need to create a blank 3D matrix filled by white color with a length to breadth ratio of 3:2 as per the Indian flag code 2002 . Here we choose the dimension of the as 3*n:2*n, where we can choose the n as any integer value as per our requirement. For color image 3 channels are required, so 3 represents RGB (Red Green Blue) channel. n=300; flag=uint8(zeros(2*n, 3*n, 3)); Divide the matrix to three parts and assign the saffron, white and green color respectively. To make Ashok chakra, first we need to create the circle followed by the spokes. To create the circle we need to understan...