MATLAB: Contrast adjustment/pixel adjustment

histogram refinementImage Processing Toolbox

Please I am still learning, I have a gray scale image with the intensity values ranges from 0 to 255. If I plot the histogram of the images, I was having some noises at both ends of the histogram. I like to refine the image pixels by ignoring the pixels that are below certain thresholds in order to have new minimum and maximum intensity values and of course to get rid of those noises at both ends. I also like to define my threshold as a function of the image size if possible. Can somebody please help me with the code? Thanks in advance.

Best Answer

See my salt and pepper noise removal demos, attached. Of course they can easily be adapted to get rid of noise above and below thresholds instead of just exactly at 0 and 255.
Related Question