フィルターのクリア

How to code HSV to RGB spaces images matlab?

1 回表示 (過去 30 日間)
Alvin Alvin
Alvin Alvin 2019 年 11 月 28 日
回答済み: Image Analyst 2019 年 11 月 28 日
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);

回答 (1 件)

Image Analyst
Image Analyst 2019 年 11 月 28 日
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);

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by