ThresholdTriclass: Iterative Triclass Thresholding

Description Usage Arguments Value Author(s) References Examples

View source: R/iterative_triclass_thresholding.R

Description

compute threshold value by Iterative Triclass Threshold Technique

Usage

1
2
ThresholdTriclass(im, stopval = 0.01, repeatnum, intervalnumber = 1000,
  returnvalue = FALSE)

Arguments

im

a grayscale image of class cimg

stopval

value to determine whether stop iteration of triclass thresholding or not. Note that if repeat is set, stop is ignored.

repeatnum

number of repetition of triclass thresholding

intervalnumber

interval number of histogram

returnvalue

if returnvalue is TRUE, ThresholdTriclass returns threshold value. if FALSE, ThresholdTriclass returns pixset.

Value

a pixel set or a numeric

Author(s)

Shota Ochi

References

Cai HM, Yang Z, Cao XH, Xia WM, Xu XY (2014). A New Iterative Triclass Thresholding Technique in Image Segmentation. IEEE TRANSACTIONS ON IMAGE PROCESSING.

Examples

1
2
3
4
5
6
g <- grayscale(boats)
layout(matrix(1:4, 2, 2))
plot(boats, main = "Original")
plot(g, main = "Grayscale")
threshold(g) %>% plot(main = "A Variant of Otsu")
ThresholdTriclass(g) %>% plot(main = "Triclass")

imagerExtra documentation built on May 2, 2019, 1:44 p.m.