eye-boof.core.segmentation

Set of image segmentation techniques.
Ref.: http://boofcv.org/index.php?title=Tutorial_Image_Segmentation

entropy-threshold

(entropy-threshold img min-val max-val)
GrayU8 -> int -> int -> int
Computes a threshold which maximizes the entropy between the foreground and
background regions.

local-sauvola-threshold

(local-sauvola-threshold img radius down1? & [k])
GrayU8 -> int -> boolean -> GrayU8
Applies Sauvola thresholding algorithm to the input image. k is a tuning
parameter whose default value is 0.3.
Refs.: https://goo.gl/hhyGyc, https://goo.gl/1iRba2

local-square-threshold

(local-square-threshold img radius down1? & [scale])
GrayU8 -> int -> boolean -> GrayU8
Locally adaptive threshold computed using a square region centered on each
pixel. The threshold value is equal the average intensity of the square region
times the optional scale (default to 1.0).
Ref.: https://goo.gl/nQn90i

otsu-threshold

(otsu-threshold img min-val max-val)
GrayU8 -> int -> int -> int
Computes the variance based threshold using the Otsu's method.

threshold

(threshold img n down1?)
Global threshold. If down1? is true, pixel values <= n are set to 1.

threshold-f

(threshold-f img f down1?)
GrayU8 -> (GrayU8 -> int) -> boolean -> GrayU8
Global threshold with the value calculated from f(img). If down1? is true,
pixel values <= f(img) are set to 1.