RGB conversion in matlab


Generating RGB image
RGB concept:
An RGB image, sometimes referred to as a truecolor image, is stored as an m-by-n-by-3 data array that defines red, green, and blue color components for each individual pixel. RGB images do not use a palette. The color of each pixel is determined by the combination of the red, green, and blue intensities stored in each color plane at the pixel's location. Graphics file formats store RGB images as 24-bit images, where the red, green, and blue components are 8 bits each. This yields a potential of 16 million colors. The precision with which a real-life image can be replicated has led to the nickname “truecolor image.”
Code description:
Zeros();
X = zeros(n) returns an n-by-n matrix of zeros
Create array of all zeros
Cat concept:
Concatenate arrays along specified dimension
Here is source code
output 



Comments

Popular posts from this blog

Image compression in matlab with explaination

Data Types in Matlab

Face detection in Matlab with source code