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

question: 2 cams possible? #3

Closed medicusdkfz closed 1 year ago

medicusdkfz commented 1 year ago

Is there a chance to use 2 cams for a cnc-gantry levelling in future?

bhowiebkr commented 1 year ago

The software is written purposefully from the workflow from start to end to run on a single webcam. You can run 2 instances of the software at the same time. I tried right now with just the single integrated webcam on my laptop. I could not get it to stream the same webcam onto both tools. This is likely related to the intervals of how Qt handels multimedia devices at the low level. Likely you can run multiple instances of the tool all pointing at different webcam sensors but I haven’t tried it.

Leveling for instance 2 Y axis together starts heavily relying on the sheer straightness of the laser level. I am not quite sure if in general these laser levels are up to the task. Though I did extract one of the laser modules, cracked open the reflector and looked at it under my microscope. See video: https://youtu.be/qUjAVUaILkI

I am currently working on a new custom laser emitter that hopefully generates a very straight line so that I can use it for these kinds of purposes. Right now in the video I use the laser level on a 1D laser emitted point on the line so I don’t have to rely on the straightness of the lasers cone emitter.

When I get all that done, I might add in some sampling where you can sample and graph 2 datasets at the same time (like 2 axis) or in the form of a grid where you are sampling and representing the data in 3d space (XY and Z offset) that could be used for checking the flatness of a surface.

medicusdkfz commented 1 year ago

Thank you for your extended answer. Great project!