HSV 和灰度强度之间有什么区别?

What's the difference between HSV and grayscale intensities?

我正在使用 MATLAB 对图像处理进行一些研究,我使用 rgb2grayrgb2hsv 以两种不同的方式创建了灰度强度图像,如下所示:

read_image = imread(handles.myImage);
bc_gambar2 = imresize(read_image,[280 540]); 
g = rgb2gray(bc_gambar2);  % First intensity image
g2 = rgb2hsv(bc_gambar2); 
g = g2(:,:,3);             % Second intensity image

使用 rgb2hsv 和索引的结果似乎比使用 rgb2gray 更好。谁能告诉我区别是什么以及为什么会这样?

这是我正在使用的示例图片(如果需要):

rgb2hsv to compute the value (i.e. lightness) channel is different than that used by rgb2gray to compute the grayscale intensity. They are described by the second and fourth bullet points here分别使用的计算。简要地说:

  • 值通道 (rgb2hsv) 的计算是:

    g = max(bc_gambar2, [], 3);
    
  • 灰度强度(rgb2gray)的计算是:

    g = 0.299.*bc_gambar2(:, :, 1) + ...
        0.587.*bc_gambar2(:, :, 2) + ...
        0.114.*bc_gambar2(:, :, 3);
    

可以找到有关不同颜色空间的更多信息here