MATLAB: RGB images 3 dimensional?

digital image processingimage processingImage Processing ToolboxMATLAB

What is the dimension size of RGB image matrix? Are they three dimensional or two dimensional?

Best Answer

RGB image will be a 3D matrix.....it will be of size m*n*3. It has three color channels. You can seperate them using:
I = imread("MyColorImage") ;
[m,n,p] = size(I) ; % note p = 3
R = I(:,:,1) ; % Red
G = I(:,:,2) ; % Green
B = I(:,:,3) ; % Blue
Related Question