Show subarray of color image
Given a color image I need to show just a subpart of the image, in matlab this would be something like showing a subarray from array image.
With a grayscale image the above code shows correctly the subpart of the image wanted, however with a color image it shows a grayscale image. I know there is a 3° dimension which in a color has a value of 3 (RGB), but I just don't know how to consider that dimension in order to show the subpart in color.
Can you help me please?
You can add to the code : to address all elements in third dimension: