MATLAB Answers

0

imquantize code is required

Asked by Mayank Nautiyal on 7 Oct 2019
Latest activity Answered by Matt J
on 7 Oct 2019
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);

  0 Comments

Sign in to comment.

1 Answer

Matt J
Answer by Matt J
on 7 Oct 2019

elseif(T1<I(x,y) | I(x,y)<=T2)

  0 Comments

Sign in to comment.