Matlab中将RGB图片转换成Lab空间的了,为什么用ims-ow函数显示不出来图片?代码如下:% Transfer RGB to CIELab space% We only consider part c-annels (e.g., a and b) for one i-ge in L*a*b*% space.Lab = -kecform("srgb2lab");imgLab = applycform(img,Lab);figure("Name", "L*a*b* Space", "NumberTitle", "off"), ims-ow(imgLab);% Extract t-e i-ge in c-annel a* and b* respectively.imgLabC-AB = uint8(imgLab(:,:,2:3));%figure("Name", "Temp C-annel a* and b*", "NumberTitle", "off"), ims-ow(imgLabC-AB);rowC-AB = size(imgLabC-AB,1);colC-AB = size(imgLabC-AB,2);imgLabC-AB = res-ape(imgLabC-AB,rowC-AB,colC-AB, 2);figure("Name", "C-annel a* and b*", "NumberTitle", "off"), ims-ow(imgLabC-AB);1 个答案
答案 1:
首先简单说下ims-ow。如果ims-ow(A)这样一个用法,那么A可以是1维矩阵或者3维矩阵。>
当1维矩阵时,显示的是灰度或二值图像;
当3维矩阵时,显示的是彩-像,并默认三个维分别依次对应R、G、B三个通道。