Bernsen local image thresholding
Version 1.1.0.0 (258 KB) by
Jan Motl
Implementation of Bernsen's thresholding method.
The method uses a user-provided contrast threshold. If the local contrast (max-min) is above or equal to the contrast threshold, the threshold is set at the local midgrey value (the mean of the minimum and maximum grey values in the local window). If the local contrast is below the contrast threshold the neighbourhood is considered to consist only of one class and the pixel is set to object or background depending on the value of the midgrey.
Cite As
Jan Motl (2026). Bernsen local image thresholding (https://www.mathworks.com/matlabcentral/fileexchange/40856-bernsen-local-image-thresholding), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R13
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Image Processing Toolbox > Import, Export, and Conversion > Image Type Conversion >
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis > Image Segmentation > Image Thresholding >
Find more on Image Type Conversion in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
