How I can change the more than one pixel values in gray scale image ?
Afficher commentaires plus anciens
% 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 commentaire
Image Analyst
le 26 Oct 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?
Réponse acceptée
Plus de réponses (1)
Wayne King
le 26 Oct 2012
Modifié(e) : Wayne King
le 26 Oct 2012
The function round(), rounds to the nearest integer.
X = rand(480,640);
Xnew = round(X);
Catégories
En savoir plus sur Image Arithmetic dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!