How to use RGB transformation in to HSV and extract different layers and proccess it?
9 views (last 30 days)
Show older comments
My task will be to map the intensity from the RGB model to the HSV model, where I will perform filtering. Then map the resulting image back to the RGB model.
Any tips or recommendation where I have to start and where I have to be careful in doing it.
I have the jpeg image which is 612 × 408 ×3, first i need to normalize image in to interval from 0-1, then use transformation function whit following parameteres: vi = max(ri , gi , bi) ci = max(ri , gi , bi) − min(ri , gi , bi) li = vi − ci 2 hi = 60deg · ( gi−bi ci ), vi = ri 60deg · (2 + bi−ri ci ), vi = gi 60deg · (4 + ri−gi ci ), vi = bi 0, ci = 0. (redi, greeni, bluei).
In the 3. part in need fold model in to proper fit:
The obtained values of 'hi' , 'si' , 'vi' , which make up the HSV record (hue, saturation and value), fold in an array of the same size as the input RGB image so that each image element will have (xi , yi) values (hi , si , vi).
Thank you.
0 Comments
Accepted Answer
Image Analyst
on 15 Aug 2022
6 Comments
Image Analyst
on 18 Aug 2022
I'd use imsplit and cat and do the whole thing vectorized, using the whole arrays rather than a nessted for loop. And of course I'd put in tons more comments like all professional programmers should do.
I do give internal short courses occasionally as part of my job for my employer but that's not my main job.
More Answers (0)
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!