Borrar filtros
Borrar filtros

How to code HSV to RGB spaces images matlab?

3 visualizaciones (últimos 30 días)
Alvin Alvin
Alvin Alvin el 28 de Nov. de 2019
Respondida: Image Analyst el 28 de Nov. de 2019
Hello please help me,
First of all my code on matlab is converting RGB images to HSV color space, and i use Adaptive Image Enhancement for Increasing Value, and then i confused when i must to converting again from HSV color space to RGB spaces, can you help me with the code? here i give you code when i converting the RGB to HSV. Thanks
img = imread('tes2.jpg');
HSV = rgb2hsv(img);
hueValue = HSV(:,:,1);
saturationValue = HSV(:,:,2);
Value = HSV(:,:,3);

Respuestas (1)

Image Analyst
Image Analyst el 28 de Nov. de 2019
Something like (untested):
rgbImage = imread('tes2.jpg');
HSV = rgb2hsv(rgbImage);
hueValue = HSV(:,:,1);
saturationValue = HSV(:,:,2);
Value = HSV(:,:,3);
Value = adapthisteq(Value); % Or your own custom function.
% Put back together
HSV = cat(3, hueValue, saturationValue, Value);
rgbOutput = hsv2rgb(HSV);

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by