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

26 vues (au cours des 30 derniers jours)
user06
user06 le 17 Juin 2016
Commenté : Image Analyst le 7 Juin 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.

Réponses (3)

KSSV
KSSV le 17 Juin 2016
  2 commentaires
user06
user06 le 17 Juin 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 le 17 Juin 2016
Well who said to do that?

Connectez-vous pour commenter.


Image Analyst
Image Analyst le 17 Juin 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 le 7 Juin 2017
a=imread(img);
b=rgb2hsv(a);
c=a(:,:,3);
  1 commentaire
Image Analyst
Image Analyst le 7 Juin 2017
That totally ignores the hsv image, and just sets c equal to the blue channel of the original RGB image.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by