HSI Thresholding Mat lab code
显示 更早的评论
Can any one help me the code for Thresholding an image in HSI color space please
回答(1 个)
DGM
2023-5-1
Considering how everyone likes to call things what they aren't, I'm going to literally read every instance of "HSI" as "HSI" instead of "HSV or something idk".
Since we're talking about HSI and not HSV or anything else, the first thing that must be said is that MATLAB/IPT have no tools for converting to or from HSI. If you want HSI, you'll have to use third-party tools or write your own. For this example, I'm using MIMT tools which are also available separately here.
inpict = imread('peppers.png');
% convert and split
[H S I] = imsplit(rgb2hsi(inpict));
% construct some logical combination of masks
mask = H >= 350 | H <= 10;
imshow(mask)

In that much, it's no different than using any other color model. Convert the image and utilize a logical combination of masks created from logical comparison on the image channels.
类别
在 帮助中心 和 File Exchange 中查找有关 Image Thresholding 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!