File Exchange

image thumbnail

Image Thresholding: Classic methods

version 1.0.0 (23.6 KB) by Navid Razmjooy
This file contains different classic thresholding methods including: - Otsu -Kapur -Niblack -Kittler - Triangle - Entropy - Wolf - Feng

2 Downloads

Updated 13 Mar 2020

View License

To apply all methods on the image, just run "original.m".
p.s.Change image name for your image

Cite As

Navid Razmjooy (2021). Image Thresholding: Classic methods (https://www.mathworks.com/matlabcentral/fileexchange/74510-image-thresholding-classic-methods), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

Jesse Goldbaum

Useful but a tad awkward to deal with. The source is messy legacy with little to no helpful comments and seems cobbled together. I'm treating it as a black box and only throwing B/W uint8 images into it. What's come out so far seems reasonable. (I commented out a tic/toc in one routine and wtf is disp('hoi') supposed to mean in venherk.m?) I turned your original.m into a function that accepts an image and method and returns the binarized image and threshold value (if available). If 'all' is specified as the method it displays a figure with 3x4 subplots that includes the original, + (10 - 1) of your method outputs + Matlab's built-in Otsu + the Ridler-Calvard output that's somewhere on this site. A little cleaner than your 3x3 + 1 I think, and the first time I used subplots! Thanks for posting this, Jesse

Navid Razmjooy

If you could not find the image, you can replace any image for testing

Stephen Forczyk

Can not find image "melanoma superficial spreading.jpg" used in example

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!