How to convert a HSV image into gray image????
26 次查看(过去 30 天)
显示 更早的评论
i have a rgb image that i have converted into HSv image and applied some filter on that, now i have to convert that filtered HSV image into gray image.
0 个评论
回答(3 个)
KSSV
2016-6-17
Convert hsv image to rgb: http://in.mathworks.com/help/images/convert-from-hsv-to-rgb-color-space.html
Image Analyst
2016-6-17
Use rgb2gray:
hsvImage = rgb2hsv(rgbImage);
% Now do some computations on the HSV image.
% Now convert back to RGB
rgbImage2 = hsv2rgb(hsvImage);
% Convert to gray scale
grayImage = rgb2gray(rgbImage2);
0 个评论
kautsar rusydi
2017-6-7
a=imread(img);
b=rgb2hsv(a);
c=a(:,:,3);
1 个评论
Image Analyst
2017-6-7
That totally ignores the hsv image, and just sets c equal to the blue channel of the original RGB image.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!