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

Freezes when using 5 samples or less #12

Closed thanosdr closed 1 year ago

thanosdr commented 1 year ago

First of all I LOVE this code. Please keep at it! and many thanks.

Bug the first: Camera input freezes when using 5 samples or less. Bug the second: Device settings button doesnt do anything when clicked.

OS: win 10, same camera module used in the youtube video.

bhowiebkr commented 1 year ago

That’s interesting. I'll have to see why it freezes with 5 samples or less. Possibly how it’s averaging. Maybe there’s an error from the command line? For the device button see this issue: https://github.com/bhowiebkr/laser-level-webcam/issues/14

bhowiebkr commented 1 year ago

I checked things out and there isn't a bug with that low number of sub samples. It'll work with only 1 sample. It however will freeze if you have set it to 0 samples. I have pushed a fix that'll fix that. https://github.com/bhowiebkr/laser-level-webcam/commit/b07e1e05cd36d9268c9a81dcf34e5ddc364973c1

I'll push it to pip after a bunch more changes.