image thumbnail

ThresholdLocally

バージョン 1.4.0.1 (2.86 KB) 作成者: Brett Shoelson
Performs LOCAL Otsu thresholding on an image, with a user-specified blocksize.

ダウンロード 5K 件

更新 2016/9/1

ライセンスの表示

Performs LOCAL Otsu thresholding on an image; user can specify blocksize. Facilitates the threshold-segmentation of images with uneven illumination, without the need for background normalization.

SYNTAX: B = thresholdLocally(A,blksz,varargin)

THRESHOLDLOCALLY processes an image, calling graythresh on LOCAL blocks in an image. This facilitates easy thresholding of images with uneven background illumination, for which global thresholding is inadequate. Uses the Image Processing Toolbox function BLOCKPROC (R2009b).

INPUTS:
A: Any image (or path/name of an image) suitable for processing with im2bw()
BLKSZ: (Optional) Block size of A, for determination of Otsu thresholding using graythresh(). In the form or [M,N]. Default is as determined by BESTBLK.
OPTIONAL:
1) Any P-V pair accepted by BLOCKPROC.
2) FudgeFactor: a scalar value by which to multiply the local value returned by graythresh.

OUTPUT:
B: Output image

EXAMPLE:
img = imread('rice.png');
thresholded = thresholdLocally(img);

引用

Brett Shoelson (2022). ThresholdLocally (https://www.mathworks.com/matlabcentral/fileexchange/29764-thresholdlocally), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2010b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
タグ タグの追加
謝辞

ヒントを与えたファイル: SegmentTool: An Interactive GUI for Segmenting Images

Community Treasure Hunt

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

Start Hunting!