function I1=Change(I)
%%%%%%%%%%%%%%%%%%%%%%
[m,n]=size(I);
I1=zeros(m,n);
for i=1:m
for j=1:n
if I(i,j)<100%%%此处是判断语句,像素值小于100,你可以设定,大于多少,或者==多少
I1(i,j)=255;
else
I1(i,j)=I(i,j);
end
end
end
%%%%%%%%%%%最终的I1即为改变后的图像,输入图像I是灰度图像。