How to get the hue/saturation of a colourful images?
9 次查看(过去 30 天)
显示 更早的评论
I have a set of color images and I want to get the values of hue and saturation and brightness using matlab , But I want to get the values quickly for all the images because the number of images is too large.
thanks to all.
0 个评论
回答(2 个)
KALYAN ACHARJYA
2019-12-29
rgb2hsv and get the data
4 个评论
KALYAN ACHARJYA
2019-12-29
编辑:KALYAN ACHARJYA
2019-12-29
for i=1:...
variable_name{i}=data_to_be_save
end
See here
Image Analyst
2019-12-29
Then inside the loop over k, call rgb2hsv(). If you want the means, do
hsvImage = rgb2hsv(rgbImage);
hmean(k) = mean2(hsvImage(:, :, 1))
smean(k) = mean2(hsvImage(:, :, 2))
vmean(k) = mean2(hsvImage(:, :, 3))
5 个评论
Image Analyst
2020-1-7
mean2() is a function in the Image Processing Toolbox that takes the mean of a 2-D array. It's basically the same as mean(array(:)).
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!