File Exchange

image thumbnail

Meanthresh local image thresholding

version 1.0.0.0 (4.31 KB) by Jan Motl
Meanthresh performs a simple local image thresholding.

6 Downloads

Updated 17 May 2013

View License

The algorithm calculates the mean value in a window and if the pixel's intensity is above the mean the pixel is set to white colour, otherwise the pixel is set to black colour. To increase the resistance to noise the threshold value can be shifted by a constant c. The pseudocode:

if (pixel >= mean-c)
pixel = 1;
else
pixel = 0;
end

Cite As

Jan Motl (2020). Meanthresh local image thresholding (https://www.mathworks.com/matlabcentral/fileexchange/41787-meanthresh-local-image-thresholding), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

irfana bibi

sara

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux