denseness_total: Denseness for whole image

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

View source: R/ImageAnalysis.R

Description

Proportion of black pixels in relation to all pixels. It do not take into account transparent pixels (when present).

Usage

1
denseness_total(imagematrix)

Arguments

imagematrix

The matrix to be analysed.

Value

Proportion of black pixels in relation to all pixels. It do not take into account transparent pixels (when present).

Author(s)

Carlos Biagolini-Jr.

References

Zehm et al 2003 Multiparameter analysis of vertical vegetation structure based on digital image processing. Flora-Morphology, Distribution, Functional Ecology of Plants, 198: 142-160.

See Also

threshold_color

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Get a matrix from your image. Here  examples provided by bwimage package.

# I) Calculate vegetation denseness
bush<-system.file("extdata/bush.JPG",package ="bwimage")
bush_imagematrix<-threshold_color(bush,  "jpeg", "proportional",compress_rate = 0.1)
denseness_total(bush_imagematrix)

# II) Calculate canopy openness
# Convert image into binary matrix
canopy<-system.file("extdata/canopy.JPG",package ="bwimage")
canopy_matrix<-threshold_color(canopy,"jpeg", compress_method="proportional",compress_rate=0.1)
1-denseness_total(canopy_matrix) # canopy openness

bwimage documentation built on April 23, 2020, 1:06 a.m.