简体   繁体   English

Matlab读取返回4通道矩阵

[英]Matlab imread return 4 channel matrix

I do imread image in Matlab, and it returns a 4-channel image: 我确实在Matlab中读取了图像,并返回了4通道图像:

im: 1012x972x4 uint8. 即时通讯:1012x972x4 uint8。

Which format is this image? 该图像是哪种格式? How to check its color format(RGB, CMYK, etc)? 如何检查其颜色格式(RGB,CMYK等)? I opened it in Gimp and the color profile is simply sRGB built-in 我在Gimp中打开了它,颜色配置文件只是内置的sRGB

From imread() documentation : imread() 文档中

The return value A is an array containing the image data. 返回值A是包含图像数据的数组。 If the file contains a grayscale image, A is an M-by-N array. 如果文件包含灰度图像,则A为M×N数组。 If the file contains a truecolor image, A is an M-by-N-by-3 array. 如果文件包含真彩色图像,则A为M×N×3的数组。 For TIFF files containing color images that use the CMYK color space, A is an M-by-N-by-4 array. 对于包含使用CMYK颜色空间的彩色图像的TIFF文件,A是M×N×4的数组。 See TIFF in the Format-Specific Information section for more information. 有关更多信息,请参见特定格式信息部分中的TIFF。

So the answer is apparently that this image's color space is CMYK. 因此,答案显然是该图像的色彩空间是CMYK。

If you want to check for a general input, then, from the same page: 如果要检查常规输入,则从同一页面:

To determine which color space is used, use imfinfo to get information about the graphics file and look at the value of the PhotometricInterpretation field. 要确定使用哪个颜色空间,请使用imfinfo获取有关图形文件的信息,并查看PhotometricInterpretation字段的值。

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

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