size function in MATLAB

2 次查看(过去 30 天)
As we write size(img),it returns 3 values. I need to know what does the last value tells us? My result is 240 320 5. What does 5 tell?

采纳的回答

Image Analyst
Image Analyst 2012-9-6
It has 5 color channels. You have a multi-spectral image.
[rows columns numberOfColorChannels] = size(yourImageArray);
numberOfColorChannels = 1 for a gray scale image, =3 for an RGB image or volumetric gray scale image, and >3 for multi-spectral images or higher dimensional arrays.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by