I am studying the foliage density of forest plots below 2 metres in height using mobile terrestrial laser scanning. I want to filter out the tree stems from the point clouds so that the point density estimates do not include them. I have been using the lidR and TreeLS packages to process my point clouds. So far I have normalized the clouds and classified the tree stems using example code given in the TreeLS package documentation:
tls1 = readTLS("tls1.las") %>% tlsNormalize %>% tlsSample map = treeMap(tls1, map.hough()) tls2 = treePoints(tls1, map, trp.crop(circle=FALSE)) tls3 = stemPoints(tls2, stm.hough(pixel_size = 0.03))
This successfully identifies the tree stems.
To filter the stems out, I have tried using the filter_poi() function:
tls4 <- filter_poi(tls3, Stem = "FALSE")
There is a column in the point cloud dataset entitled "Stem" with TRUE/FALSE values so I thought this would work, but I get this error:
Error in lasfilter_(las, lazyeval::dots_capture(...)) : `conditions` must be logical.