graythresh_8_or_16bit
Version 1.0.0 (2.3 KB) by
Raghuveer Parthasarathy
A simple modification of MATLAB's "graythresh" to use 65536 levels for 16 bit images, rather than 256.
A simple modification of MATLAB's "graythresh" to use 65536 levels for 16 bit images, rather than 256.
MATLAB's "graythresh" uses a histogram of 256 bins regardless of input image class. This can lead to poor choices for threshold values for, for example, 16-bit images that use a small fraction of the full range. Also, it's odd to avoid using the full bit depth. Therefore, this version uses 65536 bins for 16-bit images (uint16 or int16), and 256 for 8-bit, single, or double.
Cite As
Raghuveer Parthasarathy (2026). graythresh_8_or_16bit (https://www.mathworks.com/matlabcentral/fileexchange/115855-graythresh_8_or_16bit), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2018b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
