I am trying segementation of trees using lidr. I need to count how many points are segemented in each tree. i have a las variable which has an attribute treeID. Using filterpoi i can get individual tree id and see how many points are there. i want to extract the points and create a list for all tree id. My idea is to loop through the treeID and get points for each id. But i cannot seem to extract the points individually . When i print the variable las i get some information i only need the "points". How can i extract this
las <-segment_trees(las, algo) # segment point cloud
las <- filter_poi(las, treeID == 1)
> las
class : LAS (v1.4 format 6)
memory : 86.8 Kb
extent : 368194, 368203.5, 5807536, 5807544 (xmin, xmax, ymin, ymax)
coord. ref. : WGS 84 / UTM zone 33N
area : 67.9 m²
points : 1.1 thousand points
density : 16.11 points/m²
density : 9.96 pulses/m²