InverseTampere / TreeQSM

Quantitative Structure Models of Single Trees from Laser Scanner Data
Other
147 stars 46 forks source link

Why are the results (especially the volume) always different if I run the same code with the same file several times? #14

Open AnthoineResea opened 1 year ago

AnthoineResea commented 1 year ago

I'm trying to calculate the volume of a tree. I'm running the code with the following lines:

lasReader = lasFileReader(filename); ptCloud =readPointCloud(lasReader); P = ptCloud.Location; inputs = define_input(P,1,1,1); QSM = treeqsm(P, inputs);

Anyway, if I run the same code I always obtain results very different from each other (order of magnitude even greater than 10,000 L of difference). Why is that? Can someone help me to understand and possibly fix this? Thanks

zoeschindler commented 1 year ago

This is not an error. It says in the manual:

There are random elements in the reconstruction process (in the cover generation as explained in the section 2), which always results in little different models for every modelling run, even with the same inputs. This is not a bad feature but in fact allows the estimation of the uncertainty in the modelling results by making multiple models and computing the variance / standard deviation / coefficient of variation as the parameter estimating the uncertainty (or precision) of the results.

If your estimates are varying very much, maybe you should try different parameters? I guess unstable results mean that your parameters are not very robust? But I'm also just a user.

AnthoineResea commented 1 year ago

I'm working with standard parameters so far. I'll try to change some parameters, I'll let you know if results improve or not. Do you have any suggestion on values based on your experience?

zoeschindler commented 1 year ago

Not really, as it depends on the size of the tree and your scanning setup and how you processed your pointcloud. You could try using the new define_input() function which was recently introduced.