MATLAB: I want to separate the colour RGB and HSV Image, how I do to separate and combine that

image processingimage segmentation

example : RGB = the result are Red, Green, Blue image HSV = the result are Hue, Saturation, Value. every result in RGB already get then combine with result the HSV

Best Answer

RGB Component from RGB Image
r=rgbimage(:,:,1) %Red Component
g=rgbimage(:,:,2) %Green Component
b=rgbimage(:,:,3) %Blue Component
Combine All;
rgbImage_combine=cat(3,r,g,b);
HSV Component from RGB Image
HSVimage=rgb2hsv(rgbimage);
H_component=HSVimage(:,:,1) %H Component
S_component=HSVimage(:,:,2) %S Component
I_component=HSVimage(:,:,3) %IComponent
Related Question