MATLAB: Checking the type of Image in ” if ” statement

checking the image format in function inputimage format control

Hello
I have a simple question that bother me a lot in making a function. I want the function to take as input either a label image or rgb image. I do not know how to program the function to check what is the format of the input image and the process it accordingly.
Is there a simple way to determine between two input image formats ?
Thank you in advance

Best Answer

RGB images have 3 dimensions. Label images do not (well, not unless you label a 3 dimensional object.)
Related Question