what is the difference b/w image size 256*256 and image size 256*256*3?

I m doing project with medical images... i have read a .tiff image and calculated size ..it is showing 256*256*3..what is it??

 Accepted Answer

The image that has *3 is an RGB image. The image that does not have *3 is a grayscale image (or a pseudocolor image)

4 Comments

but medical images doesnot have rgb color know.. thn how cme it is possible to say as rgb
It is an RGB file, just one where the red, green, and blue channels are all set to the same value. By definition, this will create a grayscale image. To confirm, both of the following statements should be true:
isequal( RGB(:,:,1), RGB(:,:,2))
isequal( RGB(:,:,2), RGB(:,:,3))
Medical images can have RGB, depending on how the image is created.
Sometimes if you save images without specifying the correct options you could get an image stored as color even though it's grayscale. I often see jpg or bmp images that people uploaded as having 3 color channels even though it's a grayscale image in appearance. It saved it as color with all 3 channels being the same gray level image.

Sign in to comment.

More Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!