在 Matlab 中分别显示 L*a*b 颜色 space 的每个 L、a、b 分量

Show each L,a,b component of L*a*b color space individually in Matlab

在将我的 RGB 图像转换为 Lab 颜色 Space 后,我想通过模糊 c 方法从 CT 扫描 RGB 图像中分割左心室,但没有得到所需的结果. 我想在 Matlab 中分别看到这种颜色 space 的 L、a 和 b 分量。谁能在这方面帮助我。

在每个组件上使用 imshow 有什么问题?我假设你先做了这样的事情:

rgb = imread('...'); %// Read in your image
cform = makecform('srgb2lab');
lab = applycform(im2double(rgb),cform);

makecform creates a colour transformation structure, and we're choosing RGB to Lab*. Next, we apply this colour transformation to convert our image with applycform。完成后,执行如下操作:

figure;
for idx = 1 : 3
    subplot(3,1,idx);
    imshow(lab(:,:,idx), []);
end

这应该在同一图中的单独图像中显示每个组件。第一张图片是 L 组件,然后是 a 然后是 b 组件。