フィルターのクリア

How can I split an hsv image into separate h,s,v components?

11 ビュー (過去 30 日間)
Vishnu R
Vishnu R 2015 年 10 月 12 日
コメント済み: DGM 2022 年 10 月 27 日
I have a white balanced image in rgb format. I want to convert the rgb image into hsv image and want to split into separate h,s,v components

採用された回答

Walter Roberson
Walter Roberson 2015 年 10 月 12 日
HSV = rgb2hsv(YourRGBImage);
H = HSV(:,:,1);
S = HSV(:,:,2);
V = HSV(:,:,3);
  2 件のコメント
XAVIER
XAVIER 2022 年 10 月 27 日
Hi! How can I split mutiple images?
DGM
DGM 2022 年 10 月 27 日
I'm going to assume that these images are still on disk and need to be read. If that's the case, then the question is largely "how do I read multiple images". The details might depend on whether you need to process the images sequentially or together, but there are a number of examples on the forum:
There are also quite a few examples (even some within those) that include writing multiple files, as that's often part of the same task.
A more detailed and specific answer would require a more detailed description of the overall task and the intended workflow. That said, elaborating might warrant starting a new thread.

サインインしてコメントする。

その他の回答 (1 件)

DGM
DGM 2021 年 11 月 15 日
編集済み: DGM 2021 年 11 月 15 日
Since R2018b, you can also use imsplit(). Imsplit will work on any multichannel image.
% you can split an RGB image into its channels
Argb = imread('peppers.png');
[R G B] = imsplit(Argb);
% or you can split an HSV image just the same
Ahsv = rgb2hsv(Argb);
[H S V] = imsplit(Ahsv);
% it would even work if the number of channels isn't 3
Argba = cat(3,Argb,im2uint8(V)); % maybe you have an alpha channel
[R G B A] = imsplit(Argba);

カテゴリ

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