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

답변 (1개)

DGM
DGM 2023년 5월 1일

0 개 추천

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.

질문:

2018년 4월 24일

답변:

DGM
2023년 5월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by