HSI Thresholding Mat lab code

Can any one help me the code for Thresholding an image in HSI color space please

Réponses (1)

DGM
DGM le 1 Mai 2023

0 votes

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.

Catégories

En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by