简体   繁体   English

MATLAB中RGB图像的3维是多少?

[英]What are the 3 dimensions of an RGB image in MATLAB?

[r,c,d] = size(rgbImage);  %# Get the image dimensions

r,c,d在这里代表什么?

In that line of code: 在那行代码中:

  • r is the number of rows in the image (ie the size of the first dimension). r是图像中的行数(即第一维的大小)。
  • c is the number of columns in the image (ie the size of the second dimension). c是图像中的列数(即第二维的大小)。
  • d can be referred to as the "depth" or "planes" of the image (ie the size of the third dimension). d可以称为图像的“深度”或“平面”(即三维尺寸)。

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. 对于RGB(或Truecolor)图像d始终为3。第一个平面包含图像每个像素中的红色度,第二个平面包含图像每个像素中的绿色度,第三个平面包含图像每个像素中的蓝色度。

Rows, Columns, Dimensions. 行,列,尺寸。 Dimensions being the number of colors. 尺寸是颜色的数量。 Normally 3 for rgb, but sometimes 4 for an alpha channel. rgb通常为3,alpha通道有时为4。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM