How I can change the more than one pixel values in gray scale image ?
Ältere Kommentare anzeigen
% I have gray image X (480x640 double), having values between 0 and 0 to 1, I want to change the values of all pixel to 1 that are closer to 1 and change values of all pixel to 0 that are near to 0.
1 Kommentar
Image Analyst
am 26 Okt. 2012
Why did you post a duplicate when you already had this: http://www.mathworks.com/matlabcentral/answers/51939-how-i-can-change-the-certain-pixel-values-in-gray-scale-image?
Akzeptierte Antwort
Weitere Antworten (1)
Wayne King
am 26 Okt. 2012
Bearbeitet: Wayne King
am 26 Okt. 2012
The function round(), rounds to the nearest integer.
X = rand(480,640);
Xnew = round(X);
Kategorien
Mehr zu Image Arithmetic 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!