I have a gray image, i want to see only the black part ,rest of image i want to replace with value 250, so that gray part will be white.
f=imread('image1.jpg'); T = zeros(size(f)); for ii = 1:numel(f) if f(ii)<50 T(ii) = f(ii); else T(ii) = 250; end end imshow(T)
Best Answer