How to use RGB transformation in to HSV and extract different layers and proccess it?
11 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Image Analyst
2022-8-15
6 个评论
Image Analyst
2022-8-18
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!