Improving the Quality of Laser Engravings

"Heavily Photoshopped!" exclaimed a laser cutting enthusiast when he saw some of my recent engravings. But to his surprise, each image had come flawlessly out of the machine without any post-processing. The key to this achievement was my engraving software, which converts input images into versions optimized for laser engraving.

Laser engravings often suffer from limitations imposed by hardware, materials, and laser control software, resulting in problems such as over-burned or over-bright engravings, as well as a limited dynamic range of engravings. The traditional manual process to solve this problem involves testing settings both in photo editing software and then on the laser cutter, which is tedious and material consuming. On the other hand, common workarounds such as dithering introduce their own artifacts.

Motivated by awesome looking wooden engravings, I developed an approach that consists of a single manual step and an automated software pipeline that prepares any photograph for laser engraving. The first and only manual step in the process is to identify the laser cutter settings that produce the clearest black. Using these settings, the user engraves a software-generated calibration gauge on the desired material. The user then scans the gauge using a flatbed scanner. The software compares the values obtained from the scan with the original values processed and learns how the input lightness corresponds to its engraved counterpart.

To transform an image for engraving, the software first decolorizes the given photo using a Contrast Enhancing Color to Grayscale Conversion Algorithm. Rather than a simple grayscale conversion, this approach preserves the perceived contrast of the colors in the original image. The software then uses Contrast Limited Adaptive Histogram Equalization (CLAHE) to maximize contrast within the limited range of the laser cutter. Finally, the software applies the previously learned curve to adjust brightness, similar to a gamma correction, and outputs an image file ready for engraving.

It is likely that commercial engraving services use a similar pipeline. However, the development process presented me with a number of challenges: During development, I had to test each change, which proved to be time-consuming and costly, requiring access to laser cutters, appropriate materials, and waiting for each test to be completed. To mitigate this, I created an "engraving emulator" that predicts how a given image would appear under calibrated parameters, using the engraved gauge as a reference.

The success of this project opens up possibilities for future advances. Currently, the CLAHE parameters are a best guess, but incorporating image content to determine these values would allow for custom optimization for different types of images, for instance drawings, portraits or paintings. Supporting different modes, such as mapping lightness values into relative or absolute ranges, would furthermore improve results for different content. In addition, exploring alternative materials such as acrylic, which present other challenges compared to wood burning, may require the development of different pipelines. Finally, implementing "integration tests" using the emulator would provide a means of thorough validation and refinement to reliably support more complex pipelines.