How to convert a HSV image into gray image????

57 views (last 30 days)
user06 on 17 Jun 2016
Commented: Image Analyst on 7 Jun 2017
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.

Answers (3)

KSSV on 17 Jun 2016

Sign in to comment.

Image Analyst
Image Analyst on 17 Jun 2016
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);

kautsar rusydi
kautsar rusydi on 7 Jun 2017
  1 Comment
Image Analyst
Image Analyst on 7 Jun 2017
That totally ignores the hsv image, and just sets c equal to the blue channel of the original RGB image.

Sign in to comment.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!