make_ExG: Converts a color image into a grayscale image using ExG...

Description Usage Arguments Details Value Examples

View source: R/make_ExG.R

Description

Uses the Excessive Green (ExG) methodology to create a grayscale image of crop rows. The image is first broken down into a dataframe and each pixel is tested then put onto a varying intensity according to the ExG.

Usage

1
make_ExG(color_image)

Arguments

color_image

The image to have ExG applied to it

Details

The function first reads the image as a data frame with x and y columns for the pixel postion. Reading the data frame as "wide = 'c'" also creates a column for red, green, and blue intensity. Each color column is then normalized and the normal values of the colors are put into the ExG equation, creating a new ExG column for each pixel. The values of the ExG are then treated as a 1D array and transformed into a format for the EBImage package commands.

Value

An image formatted for EBImage commands.

Examples

1
grayscale <- make_ExG(color_image)

CropDetectR documentation built on Sept. 20, 2019, 9:06 a.m.