MATLAB: How to convert a gray level to another gray level in matlab

image analysisimage processingimage segmentation

i have an gray scale image.i want to change some gray level to another gray level.for example i want to convert all pixel with value 128 to 0 ,how can i do this?

Best Answer

my_image =imread('YourImage.tif');
my_image(my_image == 128) = 0;
Related Question