calculateMaxEntropy: Max Entropy thresholding

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/calculateMaxEntropy.R

Description

The function converts a grayscale image to a binary image by computing a threshold using the Max Entropy method.

Usage

1

Arguments

Image

grayscale image

Details

Max Entropy thresholding can be used to detect the signals of probes in FISH cell culture images.

Value

The function returns the threshold value

Author(s)

Karesh Arunakirinathan

References

J.N KANPUR, P.K SHAOO, A.K.C WONG: A New Method for Gray-Level picture thresholding Using the Entropy of the Histogram. In COMPUTER VISION, GRAPHICS AND IMAGE PROCESSING,1985 p 273-285

See Also

calculateThreshold

Examples

1
2
3
4
5
6
7
8
f = system.file( "extdata", "SampleFISHgray.jpg", package="FISHalyseR")
img = readImage(f)

t = calculateMaxEntropy(img)

## Threshold grayscale image using the value computed by the Max Entropy method
img[img<t] <- 0
img[img>=t] <- 1

Example output

Loading required package: EBImage
Loading required package: abind

Attaching package: 'abind'

The following object is masked from 'package:EBImage':

    abind

Warning message:
replacing previous import 'EBImage::abind' by 'abind::abind' when loading 'FISHalyseR' 

FISHalyseR documentation built on Nov. 8, 2020, 5:30 p.m.