denseness_total {bwimage} | R Documentation |
Denseness for whole image
Description
Proportion of black pixels in relation to all pixels. It do not take into account transparent pixels (when present).
Usage
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
# 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
[Package bwimage version 1.3 Index]