How can i modify matrix which i retrieve from image?
Ältere Kommentare anzeigen
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)
5 Kommentare
Matt J
am 19 Jun. 2013
Yes, the code you've shown would accomplish that, so what is your question?
Iain
am 19 Jun. 2013
What, exactly, is your question?
Umme Tania
am 19 Jun. 2013
Evan
am 19 Jun. 2013
What's the minimum value of your image?
Umme Tania
am 19 Jun. 2013
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Image Processing and Computer Vision finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!