RGB images 3 dimensional??

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

 Accepted 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

More Answers (0)

Categories

Products

Release

R2015a

Asked:

on 3 May 2020

Commented:

on 3 May 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!