Global black-and-white thresholding

Perform global black-and-white thresholding of the dataset.

Back to Index --> User Guide --> Menu --> Tools

A demonstration of the global black-and-white thresholding is available in the following video:

https://youtu.be/mzfgxLvkGTI

Contents

CONCAVITY algorithm

Reference A. Rosenfeld and P. De La Torre, Histogram concavity analysis as an aid in threshold selection, IEEE Trans. Systems Man Cybernet., vol. 13, pp. 231-235, 1983

Acknowledgements Based on the HistThresh Toolbox by Antti Niemistö, Tampere University of Technology, Finland

ENTROPY algorithm

$E_{j} =\sum_{i=0}^{j}y_{i}\cdot \textup{log}y_{i}, \textup{for} j=0, ..., n$

$\frac{E_{j}}{A_{j}} - \textup{log}A_{j} + \frac{E_{n} - E_{j}}{A_{n} - A_{j}} - \textup{log}A_{n} - A_{j}$

Reference

Acknowledgements Based on the HistThresh Toolbox by Antti Niemistö, Tampere University of Technology, Finland

INTERMEANS ITER algorithm

References

Acknowledgements Based on the HistThresh Toolbox by Antti Niemistö, Tampere University of Technology, Finland

INTERMODES algorithm

Reference

Acknowledgements Based on the HistThresh Toolbox by Antti Niemistö, Tampere University of Technology, Finland

MEAN algorithm

Acknowledgements Based on the HistThresh Toolbox by Antti Niemistö, Tampere University of Technology, Finland

MEDIAN and PERCENTILE algorithms

Reference

Acknowledgements Based on the HistThresh Toolbox by Antti Niemistö, Tampere University of Technology, Finland

MINERROR algorithm

$p_{t} = \frac{A_{t}}{A_{n}}, q_{t} = \frac{A_{n} - A_{f}}{A_{n}}$

$\sigma{_{t}}^{2} = \frac{C_{t}}{A_{t}} - \mu{_{t}}^2, \tau{_{t}^{2}} = \frac{C_{n} - C_{t}}{A_{n} - A_{t}} - \nu{_{t}^2}$

Reference

Acknowledgements Based on the HistThresh Toolbox by Antti Niemistö, Tampere University of Technology, Finland

MINERROR ITER algorithm

$x^{2}(\frac{1}{\sigma^{2}} - \frac{1}{\tau^{2}}) - 2x(\frac{\mu}{\sigma^{2}} + \frac{\nu}{\tau^{2}}) + (\frac{\mu^{2}}{\sigma^{2}} - \frac{\nu^{2}}{\tau^{2}} + \textup{log}(\frac{\sigma^{2}q^{2}}{\tau^{2}p^{2}})) = 0$

Reference

Acknowledgements Based on the HistThresh Toolbox by Antti Niemistö, Tampere University of Technology, Finland

MINIMUM algorithm

Reference

Acknowledgements Based on the HistThresh Toolbox by Antti Niemistö, Tampere University of Technology, Finland

MOMENTS algorithm

$x_{0} = \frac{1}{2} - \frac{B_{n}/A_{n} + x_{2}/2}{\sqrt{x_{2}^{2} - 4x_{1}}}, x_1 = \frac{B_{n}D_{n} - C_{n}^{2}}{A_{n}C_{n} - B_{n}2'}$

$x_{2} = \frac{B_{n}C_{n} - A_{n}D_{n}}{A_{n}C_{n} - B_{n}^{2}}, D_{n} = \sum_{i=0}^{n}i^{2}y_{i}$

Reference

Acknowledgements Based on the HistThresh Toolbox by Antti Niemistö, Tampere University of Technology, Finland

OTSU algorithm

Reference

Programming tips

This function is compatible with the batch scripting.

For example,

BatchOpt.colChannel = 2;    % define color channel for thresholding
BatchOpt.Mode = '3D, Stack';     % mode to use
BatchOpt.Method = 'Otsu';       % thresholding algorithm
BatchOpt.Destination = 'selection';       % [optional] destination layer, 'mask' or 'selection'
BatchOpt.t = [1 1];     % [optional] time points, [t1, t2]
BatchOpt.z = [10 20];    % [optional] slices, [z1, z2]
BatchOpt.x = [10 120];    % [optional] part of the image, [z1, z2]
BatchOpt.Orientation = 4;      % [optional], dataset orientation
obj.startController('mibHistThresController', [], BatchOpt);  % start the thresholding

Back to Index --> User Guide --> Menu --> Tools