The new camera works great and is now permanently attached to my prototyping printer. The camera comes with 6 white LED's, which are still used, but now covered by a thin layer of transparent PLA to spread the light.
Better software for calibration is on the way, too. The GUI is pretty horrible mainly because I suck at UI/UX (any UI/UX people around to help out) and I have no experience with Qt.
Nevertheless, once configured, it is easy to work with. No more accidental crashes, no more attempts of unloading a tool in the wrong position. no more collisions with the camera. Some of the planed features are:
- XY Calibration: Circle detection works great on new and used nozzle after careful parameter tuning, but so far, the results are very unsatisfying for used nozzles, with eg. blobs of filament in the center. Manual calibration requires less than a minute per hotend.
- 'Auto Focus' Z calibration: I found a good paper about blur blur detection which boils down to compute the variance of the laplacian of an image. The tool restricts the computation to the area enclosed between the two circles. As of now, the result is only shown (bottom left), but it should be possible to automate in a very similar way to 'Auto Focus' in cameras.
- Testing Repeatability: A reference image of each nozzle is kept and used to estimate the X and Y offset after unloading and loading, by calculating the phase correlation of the laplacian of both, the reference and the current image. I have plans to run some endurance tests, to eg. see if the design is stable enough for 1000 load/unload operations per tool.
- At least support for Smoothieware and Repetier firmware, but I try to stick generic G-Codes as much as possible.
- Support for USB and network (untethered) connections to the printers, but no plans for WiFi cameras so far.
Tool 2, unused stainless steel noozle
In case you wonder, Laplacian is the second order derivative of a gray scale image. This is commonly used for eg. edge detection etc