please explain size function in MATLAB

回答(1 个)

size(img,3) returns the number of color channels in an image. It will be 1 for a gray scale image and 3 for an RGB image. That should explain it (why they ask for a color image if the program was given a gray scale image).

类别

帮助中心File Exchange 中查找有关 Display Image 的更多信息

提问:

2017-10-18

Community Treasure Hunt

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

Start Hunting!

Translated by