smoothing: Smooth the average of binary picture column values

Description Usage Arguments Details Value Examples

View source: R/smoothing.R

Description

Reads in an image and takes the average column value then smooths the array for more defined local maximas and minimas.

Usage

1
smoothing(picture, intensity)

Arguments

picture

The binary image.

intensity

The intensity of smoothening of the vector.

Details

The function reads in an image as a data frame then takes the mean of each column within the picture. Since the image is binary the mean will have a value between [0,1], with one being all white. It then uses https://www.rdocumentation.org/packages/stats/versions/3.6.1/topics/smooth.spline smooth.spline to get rid of jagged portions for more defined local maximas and minimas.

Value

A smoothed vector.

Examples

1
smoothed_vector <- smoothing(picture, intensity)

niconaut/CropDetectR documentation built on June 29, 2020, 6:10 a.m.