[r,c,d] = size(rgbImage); %# Get the image dimensions
What does r,c,d
stand for here?
In that line of code:
r
is the number of rows in the image (i.e. the size of the first dimension).c
is the number of columns in the image (i.e. the size of the second dimension).d
can be referred to as the "depth" or "planes" of the image (i.e. the size of the third dimension).For an RGB (or Truecolor) image, d
is always 3. The first plane contains the degree of red in each pixel of the image, the second plane contains the degree of green in each pixel of the image, and the third plane contains the degree of blue in each pixel of the image.
Rows, Columns, Dimensions. Dimensions being the number of colors. Normally 3 for rgb, but sometimes 4 for an alpha channel.