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

View source: R/ImageAnalysis.R

Calculate the denseness (proportion of black pixel in relation to the total number of pixels) for a given number of sections (n_sections). n_sections should be set as a number, in this situation denseness_row will break the original matrix in slices, and apply denseness_total function for each section. For instance, in a matrix of 1000x1000 if n_sections = 10, it will break to 10 sections of 100x1000 and analyze it. In other words, the sections will be the following sections of the original matrix [1:100, 1:1000] , [101:200, 1:1000] , [201:300, 1:1000] , [301:400, 1:1000] , [401:500, 1:1000] , [501:600, 1:1000] , [601:700, 1:1000] , [701:800, 1:1000] , [801:900, 1:1000] , [901:1000, 1:1000] .The default for parameter n_sections is "all", it will calculate denseness for each row of pixel. In other words, it will break the image in a number of section equal to the image pixel height.

1 | ```
denseness_row(imagematrix, n_sections = "all")
``` |

`imagematrix` |
The matrix to be analysed. |

`n_sections` |
Break the image in this number of rows. |

`Denseness` |
Denseness of each row section. |

`Mean` |
Mean of row sections denseness. |

`SD` |
standard deviations of row sections denseness. |

Carlos Biagolini-Jr.

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.

denseness_total threshold_color

1 2 3 4 5 6 | ```
# First, get a matrix from your image. Here an example of a bush image is used.
bush<-system.file("extdata/bush.JPG",package ="bwimage")
bush_imagematrix<-threshold_color(bush, "jpeg", "proportional",compress_rate = 0.1)
# Calculate vegetation denseness in 20 row sections
denseness_row(bush_imagematrix, n_sections = 20)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.