MATLAB Answers

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

조회 수: 95(최근 30일)
user06
user06 17 Jun 2016
댓글: Image Analyst 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.

  댓글 수: 0

로그인 to comment.

답변(3개)

KSSV
KSSV 17 Jun 2016

  댓글 수: 2

user06
user06 17 Jun 2016
RGB=reshape(ones(64,1)*reshape(jet(64),1,192),[64,64,3]); by this we only get the bands of R G B i want to recover the image as it is.
Image Analyst
Image Analyst 17 Jun 2016
Well who said to do that?

로그인 to comment.


Image Analyst
Image Analyst 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);

  댓글 수: 0

로그인 to comment.


kautsar rusydi
kautsar rusydi 7 Jun 2017
a=imread(img);
b=rgb2hsv(a);
c=a(:,:,3);

  댓글 수: 1

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

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.

태그


Translated by