What are the 3 dimensions of an RGB image in MATLAB?
[r,c,d] = size(rgbImage); %# Get the image dimensions
What does r,c,d
it mean here?
+2
Gtker
source
to share
2 answers
In this line of code:
-
r
- the number of lines in the image (i.e. the size of the first dimension). -
c
- the number of columns in the image (i.e. the size of the second dimension). -
d
can be called the "depth" or "plane" of the image (ie, the size of the third dimension).
For an RGB (or Truecolor) image , d
always 3. The first plane contains the degree of red in each pixel in the image, the second plane contains the degree of green in each pixel in the image, and the third plane contains the degree of blue in each pixel in the image.
+7
gnovice
source
to share
Rows, columns, sizes. Sizes are the number of colors. Usually 3 for rgb, but sometimes 4 for alpha.
0
kwatford
source
to share