InverseTampere / TreeQSM

Quantitative Structure Models of Single Trees from Laser Scanner Data
Other
140 stars 45 forks source link

point cloud read only partially by lasfilereader #13

Open AnthoineResea opened 1 year ago

AnthoineResea commented 1 year ago

Running your code, i obtain this Figure 1 as output.

As you can see, points are only read in a discrete way and only for specific y-coordinates

1 2 . I thought this was related to the global reference system used, but I'm already transforming it into a local coordinates system, as you suggested in your manual. Moreover, if I don't do it (P = P-means(P)) the code returns the following error:

`Error using convhull Error computing the convex hull. The points may be collinear.

Error in tree_data>crown_measures (line 519) [K,A] = convhull(X(:,1),X(:,2));

Error in tree_data (line 156) [treedata,spreads] = crown_measures(treedata,cylinder,branch);

Error in treeqsm (line 394) [treedata,triangulation] = tree_data(cylinder,branch,trunk,inputs);

Error in Untitled2 (line 26) QSM = treeqsm(P, inputs);`

zoeschindler commented 1 year ago

I had a similar issue some while ago when I used an old version of Matlab (https://de.mathworks.com/matlabcentral/answers/1628340-force-lasfilereader-to-read-more-decimal-points?s_tid=srchtitle). This is an issue of the LAS file reader from Matlab, I think it was fixed in version 2022a. You should be able to circumvent the issue by reading in the data as .txt file, not as .las file.