Commit 442fe226 authored by Monnet Jean-Matthieu's avatar Monnet Jean-Matthieu
Browse files

Merge branch 'master' of https://gitlab.irstea.fr/jean-matthieu.monnet/lidaRtRee into devel

Add master updates to devel branch
No related merge requests found
Showing with 0 additions and 3529 deletions
+0 -3529
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/common.R
\name{speciesColor}
\alias{speciesColor}
\title{Table of species names, abreviations and display colors}
\usage{
speciesColor()
}
\value{
A data frame with species name, color, coniferous (C) / broadleaf (B) type, and name abreviation GESP of GEnus and SPecies
}
\description{
table for species names, abreviations and type (coniferous/broadleaf), and display color
}
\examples{
# load table
tab.species <- speciesColor()
head(tab.species)
summary(tab.species)
}
\seealso{
\code{\link{plotTreeInventory}} for tree inventory display
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree.detection.R
\name{treeExtraction}
\alias{treeExtraction}
\title{Tree extraction}
\usage{
treeExtraction(r.dem.nl, r.maxi, r.dem.w, r.mask = NULL)
}
\arguments{
\item{r.dem.nl}{raster object. raster of canopy height model, preferably filtered to avoid effect of holes on volume and surface computation}
\item{r.maxi}{raster object. raster positive values at local maxima}
\item{r.dem.w}{raster object. segmented raster}
\item{r.mask}{raster object. only segments which maxima are inside the mask are extracted}
}
\value{
A data.frame with tree id, local maximum stats (height, coordinates, dominance radius), surface and volume.
}
\description{
creates a dataframe with segment id, height and coordinates of maxima, surface and volume, computed from three images: initial, local maxima and segmented, typically obtained with \code{\link{treeSegmentation}}
}
\examples{
data(chmchablais3)
# tree segmentation
segments <- treeSegmentation(chmchablais3)
# tree extraction
trees <- treeExtraction(segments$filled.dem, segments$local.maxima, segments$segments.id)
summary(trees)
\dontrun{
# plot initial image
plot(chmchablais3)
#' add segment contours
contours <- raster::rasterToPolygons(segments$segments.id, dissolve=T)
plot(contours, add=T, border="white")
# add treetop positions
points(trees$x, trees$y, cex=trees$h/20)}
}
\seealso{
\code{\link{treeSegmentation}}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree.match.R
\name{treeMatching}
\alias{treeMatching}
\title{3D matching of detected tree top positions with reference positions}
\usage{
treeMatching(lr, ld, deltaGround = 2.1, hPrec = 0.14, computeStat = TRUE)
}
\arguments{
\item{lr}{data.frame or matrix. 3D coordinates (X Y Height) of reference positions}
\item{ld}{data.frame or matrix. 3D coordinates (X Y Height) of detected positions}
\item{deltaGround}{numeric. buffer around trunk position}
\item{hPrec}{numeric. buffer around apex position (reference Height)}
\item{computeStat}{boolean. should matching stats be computed}
}
\value{
A dataframe with matched pairs (row of reference positions in first column, and row of detected positions in second column) and corresponding 3D distances
}
\description{
First computes a matching index for each potential pair associating a detected with a reference tree. This index is the 3D distance between detected and reference points, divided by a maximum matching distance set by user-defined parameters. Pairs with the lowest index are then iteratively associated.
}
\examples{
# create reference and detected trees
ref.trees <- cbind(c(1,4,3,4,2), c(1,1,2,3,4), c(15,18,20,10,11))
def.trees <- cbind(c(2,2,4,4), c(1,3,4,1), c(16,19,9,15))
#
# match trees
match1 <- treeMatching(ref.trees, def.trees)
match2 <- treeMatching(ref.trees, def.trees, deltaGround=2, hPrec=0)
match1
match2
\dontrun{
# 2D display of matching result
plot2Dmatched(ref.trees, def.trees, match1)
plot2Dmatched(ref.trees, def.trees, match2)}
}
\references{
Monnet, J.-M. 2011. Using airborne laser scanning for mountain forests mapping: Support vector regression for stand parameters estimation and unsupervised training for treetop detection. Ph.D. thesis. University of Grenoble, France. pp. 53-55 \url{https://tel.archives-ouvertes.fr/tel-00652698/document}
Monnet, J.-M., Mermin, E., Chanussot, J., Berger, F. 2010. Tree top detection using local maxima filtering: a parameter sensitivity analysis. Silvilaser 2010, the 10th International Conference on LiDAR Applications for Assessing Forest Ecosystems, September 14-17, Freiburg, Germany, 9 p. \url{https://hal.archives-ouvertes.fr/hal-00523245/document}
}
\seealso{
\code{\link{plot2Dmatched}}, \code{\link{histDetection}}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree.detection.R
\name{treeSegmentation}
\alias{treeSegmentation}
\title{Preprocessing and segmentation of raster image for tree identification}
\usage{
treeSegmentation(dem, nlFilter = "Closing", nlSize = 5, sigma = 0.3,
dmin = 0, dprop = 0.05, hmin = 5, propHouppier = 0.3,
minHouppier = 2)
}
\arguments{
\item{dem}{raster object or string indicating location of raster file (typically a canopy height model)}
\item{nlFilter}{string. specifies the non-linear filter for image pre-processing, should be an option of function \code{\link{demFiltering}}}
\item{nlSize}{numeric. width of kernel of non-linear filter in pixels}
\item{sigma}{numeric or matrix. if a single number is provided, sigmap is the standard deviation of Gaussian filter in meters, 0 corresponds to no smoothing. In case of matrix, the first column corresponds to the standard deviation of the filter, and the second to thresholds for image values (e.g. a filter of standard deviation specified in line \code{i} is applied to pixels in image which values are between thresholds indicated in lines \code{i} and \code{i+1}). Threshold values should be ordered in increasing order.}
\item{dmin}{numeric. treetop minimum distance to next higher pixel in meters}
\item{dprop}{numeric. number defining the treetop minimum distance as proportion of height to next higher pixel}
\item{hmin}{numeric. minimum treetop height}
\item{propHouppier}{numeric. minimum height of tree crown as proportion of treetop height}
\item{minHouppier}{numeric. minimum crown height}
}
\value{
A list of 4 rasters: selected local maxima (values = distance to higher pixel), segments, non-linear preprocessed dem, smoothed preprocessed dem
}
\description{
global function for preprocessing (filtering), maxima detection and selection, segmentation and segmentation adjustment of a raster image.
}
\examples{
data(chmchablais3)
# tree segmentation
segments <- treeSegmentation(chmchablais3)
segments2<- treeSegmentation(chmchablais3, nlFilter="Median", nlSize=3,
sigma=cbind(c(0.2,0.8), c(0,15)),dmin=0,dprop=0,hmin=10,propHouppier=0.5,minHouppier=5)
\dontrun{
# plot initial image segments
plot(chmchablais3, main="Initial image")
plot(segments$smoothed.dem, main="Filtered image")
plot(segments$local.maxima, main="Local maxima")
#
# replace segment with id 0 (not a tree) with NA
segments$segments[segments$segments==0] <- NA
plot(segments$segments \%\% 8 , main="Segments")
#
# plot segmentation with other parameters
segments2$segments[segments2$segments==0] <- NA
plot(segments2$segments \%\% 8, main="Segments2")}
}
\references{
Monnet, J.-M. 2011. Using airborne laser scanning for mountain forests mapping: Support vector regression for stand parameters estimation and unsupervised training for treetop detection. Ph.D. thesis. University of Grenoble, France. Section 6.2 \url{https://tel.archives-ouvertes.fr/tel-00652698/document}
Monnet, J.-M., Mermin, E., Chanussot, J., Berger, F. 2010. Tree top detection using local maxima filtering: a parameter sensitivity analysis. Silvilaser 2010, the 10th International Conference on LiDAR Applications for Assessing Forest Ecosystems, September 14-17, Freiburg, Germany, 9 p. \url{https://hal.archives-ouvertes.fr/hal-00523245/document}
}
\seealso{
\code{\link{demFiltering}}, \code{\link{maximaDetection}}, \code{\link{maximaDetection}}, \code{\link{maximaSelection}}, \code{\link{segmentation}}, \code{\link{segAdjust}}, \code{\link{treeExtraction}}
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/treeinventorychablais3-data.R
\docType{data}
\name{treeinventorychablais3}
\alias{treeinventorychablais3}
\title{Tree inventory data in France (Chablais 3 plot, July 2010)}
\format{A dataframe with columns:
\enumerate{
\item x easting coordinate in Lambert 93
\item y northing coordinate in Lambert 93
\item d dbh (cm)
\item h tree height (m)
\item n tree number
\item s species abreviated as GESP (GEnus SPecies)
\item e appearance (0: missing or lying, 1: normal, 2: broken treetop, 3: dead with branches, 4: snag)
\item t tilted (0: no, 1: yes)
}}
\usage{
data(treeinventorychablais3)
}
\description{
All trees with diameter at breast height >= 7.5 cm are inventoried on a 50m x 50m plot.
}
\examples{
data(treeinventorychablais3)
summary(treeinventorychablais3)
}
\references{
Monnet, J.-M. 2011. Using airborne laser scanning for mountain forests mapping: Support vector regression for stand parameters estimation and unsupervised training for treetop detection. Ph.D. thesis. University of Grenoble, France. pp. 21-22 & 34 \url{https://tel.archives-ouvertes.fr/tel-00652698/document}
}
\keyword{datasets}
* using log directory /media/data/R/packages/lidaRtRee/lidaRtRee.Rcheck
* using R version 3.4.4 (2018-03-15)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option --as-cran
* checking for file lidaRtRee/DESCRIPTION ... OK
* this is package lidaRtRee version 1.0
* checking CRAN incoming feasibility ... NOTE
Maintainer: Jean-Matthieu Monnet <jean-matthieu.monnet@irstea.fr>
New submission
Package has a FOSS license but eventually depends on the following
package which restricts use:
akima
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package lidaRtRee can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of data directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking examples ... OK
* checking PDF version of manual ... OK
* DONE
Status: 1 NOTE
* installing *source* package ‘lidaRtRee’ ...
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (lidaRtRee)
This diff is collapsed.
This diff is collapsed.
File deleted
name user system elapsed
chmchablais3 0.688 0.016 0.703
circle2Raster 0.060 0.004 0.066
coregistration 3.656 0.004 3.659
createDisk 0 0 0
demFiltering 0.036 0.000 0.036
heightRegression 0.008 0.000 0.009
histDetection 0.044 0.000 0.043
laschablais3 0.248 0.000 0.250
maximaDetection 0.184 0.000 0.187
maximaSelection 0.136 0.000 0.137
plot2Dmatched 0.084 0.000 0.085
plotTreeInventory 0 0 0
points2DSM 0.308 0.000 0.309
points2DTM 0.348 0.000 0.346
polar2Projected 0.004 0.000 0.003
rasterChullMask 0.068 0.000 0.071
rasterLocalmax 3.668 0.000 3.666
rasterXYMask 0.016 0.000 0.015
rasters2Cor 0.064 0.000 0.066
rastersMovingCor 3.668 0.000 3.670
segAdjust 0.104 0.000 0.104
segmentation 0.112 0.000 0.111
speciesColor 0.004 0.000 0.003
treeExtraction 0.156 0.000 0.156
treeMatching 0.004 0.000 0.003
treeSegmentation 0.236 0.000 0.237
treeinventorychablais3 0.004 0.000 0.004
This diff is collapsed.
File deleted
Package: lidaRtRee
Type: Package
Version: 1.0.1
Title: Forest Analysis with Airborne Laser Scanning (Lidar) Data
Date: 2018-06-05
Author: Jean-Matthieu Monnet [aut, cre]
Maintainer: Jean-Matthieu Monnet <jean-matthieu.monnet@irstea.fr>
Description: Provides functions for forest analysis using airborne laser scanning data. It includes complementary steps for foret mapping: extraction of both physical and statistical features from lidar data, model calibration with ground reference, and maps export.
URL: https://gitlab.irstea.fr/jean-matthieu.monnet/lidaRtRee
BugReports: https://gitlab.irstea.fr/jean-matthieu.monnet/lidaRtRee/issues
Imports: graphics, stats, grDevices, sp, raster, imager, akima, leaps,
gvlma, car, foreach, doParallel, reldist, lidR (>= 1.4-2)
License: GPL-3
LazyData: TRUE
RoxygenNote: 6.0.1
NeedsCompilation: no
Packaged: 2018-06-21 08:49:12 UTC; jean-matthieu
Depends: R (>= 2.10)
Built: R 3.4.4; ; 2018-06-21 08:49:42 UTC; unix
chmchablais3 Canopy height model (Chablais 3 plot)
circle2Raster Raster corresponding to circle extent
coregistration Tree inventory and canopy height model
coregistration
createDisk Disk-shaped matrix mask
demFiltering Image pre-processing (non-linear filtering and
Gaussian smoothing)
heightRegression Regression of detected heights VS reference
heights
histDetection Histogram of detection
histStack Stacked histogramm
laschablais3 las data in France (Chablais 3 plot)
maximaDetection Local maxima extraction on image
maximaSelection Image maxima selection based on values and
neighborhood of local maxima
plot2Dmatched Plot of matched pairs of detected and reference
trees
plotTreeInventory Displays a map of tree inventory data
points2DSM Digital Surface Model
points2DTM Digital Terrain Model
polar2Projected Polar to cartesian coordinates conversion
rasterChullMask Raster mask of convex hull
rasterLocalmax Statistics of raster local maximum
rasterXYMask Raster mask by union of buffers around xy
positions
rasters2Cor Correlation between two rasters
rastersMovingCor Correlation between rasters for different XY
translations
segAdjust Modification of segments based on values
segmentation Image segmentation by seed-based watershed
algorithm
speciesColor Table of species names, abreviations and
display colors
treeExtraction Tree extraction
treeMatching 3D matching of detected tree top positions with
reference positions
treeSegmentation Preprocessing and segmentation of raster image
for tree identification
treeinventorychablais3
Tree inventory data in France (Chablais 3 plot,
July 2010)
File deleted
File deleted
File deleted
File deleted
File deleted
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment