what is the meaning of 28x28x3 in .mat file

Hi, I save a colour image in .mat file format and realise that the variable is in array 28x28x3. 28x28 is image dimension, but I have no idea on what the "3" meant. I guess it is related to colour. Can anyone explain on this ?
here is the code that I type
  • pic1 = imread('image_0001.jpg');
  • save('BothPics.mat', 'pic1');

 Accepted Answer

That means that there are three slices/color channels/pages/planes/(whatever you want to call them) in your 3D array (stack of 2D images).
Try this:
[rows, columns, numberOfColorChannels] = size(pic1)

More Answers (0)

Categories

Find more on Display Image in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!