MATLAB Answers

how can i covert rgb image to HSI and separate the intensity component alone

13 views (last 30 days)
Jinu Sebastian
Jinu Sebastian on 6 Oct 2020
Answered: DGM on 14 May 2021
I want to separate intensity components from an rgb image by converting it to HSI space

Answers (2)

DGM on 14 May 2021
If you just want the intensity (as in HSI) of an image:
ipict = mean(rgbpict,3);
If instead you want value (as in HSV)
vpict = max(rgbpict,[],3);
or if you want lightness (as in HSL)
lpict = min(rgbpict,[],3)/2 + max(rgbpict,[],3)/2;

Community Treasure Hunt

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

Start Hunting!