Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation with Li 2012 may change as a function of point ordering #355

Open
Jean-Romain opened this issue Jun 25, 2020 · 0 comments
Open
Assignees
Labels
Bug A bug in the package

Comments

@Jean-Romain
Copy link
Collaborator

Some point ordering lead to different results when performing the segmentation. This is related to #349.

library(lidR)
LASfile <- system.file("extdata", "MixedConifer.laz", package = "lidR")
las0 = readLAS(LASfile)
las0@data$ID <- 1:npoints(las0)
las1 = filter_poi(las0, X < 481300)
las2 = filter_poi(las0, X >= 481300)
las3 = rbind(las1,las2)
las4 = rbind(las2,las1)

las0 = lastrees(las0, li2012(speed_up = 5), uniqueness = 'bitmerge')
las3 = lastrees(las3, li2012(speed_up = 5), uniqueness = 'bitmerge')
las4 = lastrees(las4, li2012(speed_up = 5), uniqueness = 'bitmerge')

length(na.omit(unique(las0@data$treeID)))
#> [1] 274
length(na.omit(unique(las3@data$treeID)))
#> [1] 273
length(na.omit(unique(las4@data$treeID)))
#> [1] 274

plot(las0$ID, cex = 0.5)
points(las3$ID, col = "red", cex = 0.5)
points(las4$ID, col = "blue", cex = 0.5)

@Jean-Romain Jean-Romain added the Bug A bug in the package label Jun 25, 2020
@Jean-Romain Jean-Romain self-assigned this Jun 25, 2020
@Jean-Romain Jean-Romain changed the title Segmentation with Li 2012 may change at the function of point ordering Segmentation with Li 2012 may change as a function of point ordering Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in the package
Projects
None yet
Development

No branches or pull requests

1 participant