bhowiebkr / laser-level-webcam

A tool for measuring height in microns of arbitrary sized objects using a webcam and a laser level.
MIT License
141 stars 13 forks source link

When outlier removal percentage is small calculation fails #4

Closed asteppke closed 1 year ago

asteppke commented 1 year ago

When the outlier removal percentage is small and not many samples are taken then the calculation of the mean fails.

Looking a bit why this occurs in this case n_outliers is zero and the sample array gets truncated to an empty array.

bhowiebkr commented 1 year ago

fixed in [#5 #](https://github.com/bhowiebkr/laser-level-webcam/commit/528295297a56709864d36ea80017c2f9f24b1bca)