imquantize code is required

1 回表示 (過去 30 日間)
Mayank Nautiyal
Mayank Nautiyal 2019 年 10 月 7 日
回答済み: Matt J 2019 年 10 月 7 日
Hi, I need the original code of imquantize function of matlab. Please help.
My attempt:
I=imread('football.jpg');
I=rgb2gray(I);
[M N]=size(I);
T1=91;
T2=150;
for x=1:M
for y=1:N
if(I(x,y)<T1)
I(x,y)=0;
elseif(T1<I(x,y)<=T2)
I(x,y)=120;
else
I(x,y)=255;
end
end
end
figure;
imshow(I);

回答 (1 件)

Matt J
Matt J 2019 年 10 月 7 日
elseif(T1<I(x,y) | I(x,y)<=T2)

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by