darkpix: Calculates percentage of dark pixels in an image.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/hemiphoto.R

Description

This function takes a colour image file, typically a JPEG, and counts the percentage of pixels below a certain darkness threshold. By default, only a central circle representing the hemispherical horizon is counted. The threshold at which darkness is detected can be altered.

Usage

1
darkpix(file, cutoff = 100, clip.circle = T)

Arguments

file

Character string for the filename of the image file to be processed.

cutoff

The cutoff value, from 0-255. Pixels with brighness values below this threshold are considered dark.

clip.circle

True/fale - if true, central circle of image is used. If false, whole image is used.

Value

A value representing the percentage of dark pixels in the image.

Author(s)

Grant Williamson <grant.williamson@utas.edu.au>

See Also

darkpix.dir

Examples

1
2
rlogo=system.file("pictures/Rlogo.jpg", package="rgdal")[1]
darkpix(rlogo,cutoff=100,clip.circle=T)

ozjimbob/ecbtools documentation built on Jan. 18, 2021, 7:39 p.m.