make_bw: Changes a grayscale image to black and white

Description Usage Arguments Details Value Examples

View source: R/make_bw.R

Description

Takes in a grayscale image and finds the best threshold for binarization of the image.

Usage

1

Arguments

image

The image generated after the ExG transformation in the EBImage format.

Details

This function uses the https://github.com/aoles/EBImage/blob/master/R/otsu.R otsu function from EBImage to make the grayscale image into a binary black and white image. How the otsu transformation works and chooses the threshold can be understood more clearly at http://www.labbookpages.co.uk/software/imgProc/otsuThreshold.html.

Value

A binary image

Examples

1
BW_Image <- make_bw(image)

niconaut/crop.row.finder documentation built on June 29, 2020, 6:10 a.m.