Introduction: Digital-Daguerreotype (TSP Art)

I’ve been an engineer all my life but have admired how creative and expressive artists can be. While there are many differences between engineers and artists, one thing they have in common is a need for creativity – they just express it differently.

While I cannot draw, I can build something that can draw for me! This project will enable other engineers to express their creativity through drawing and can enable an artist to explore the creativity that comes with software and electrical engineering.

The “Digital Daguerreotype” is a project that uses a digital camera to capture an image, then uses a Raspberry Pi to convert that picture to a drawing made using a single continuous line (TSP art) and outputs that drawing as gcode to a CNC machine which can draw it onto paper or laser etch it onto paper, wood, leather, etc.

Supplies

Step 1: Software Install and Build

Install and/or build the following packages as per their individual instructions:

  1. Download and install the Raspberry Pi OS with desktop
  2. Install the touchscreen driver per manufacture instructions
  3. Enable the OpenGL driver (sudo raspi-config; under Advanced Options/GL Driver)
  4. Install glfw 3.3 package (sudo apt-get libglfw3)
  5. Install IntelRealSense on the Raspberry Pi (realsense2 package)
  6. Clone, build and install OpenCV
  7. Clone the Dear ImGui repo
  8. Download and build linkern from Concorde
  9. Clone the Digital Daguerreotype repo
  10. Make a ‘build’ directory and change into it
  11. Run ‘cmake ../’ to generate the make file
  12. Run ‘make -j4’ to build the Digital Daguerreotype application

A nice touch is to configure the application to automatically start on boot via systemd or rc.local.

As a long time Windows developer, I found it easiest to do the original development on Windows as it has better development and debugging tools. Digital Daguerreotype will build and run on Windows (other than outputting the gcode to the CNC). The included Visual Studio project will facilitate properly building the application for Windows.

Step 2: Hardware Build

The ‘3Dmodels’ folder of the source repo contains the files that you can use to create a faceplate and camera mounting bracket to hold everything in place in the shadow box. If you are using an 8” x 8” shadow box, you can use the ‘faceplate.stl’ and ‘camera bracket.stl’ STL files ‘as is.’

If you are using a different sized frame, modify the ‘face_plate_width’ and ‘face_plate_height’ variables in the scad file to match your frame and generate new STL files for the face plate and camera bracket.

3D print the camera mount and face plate from the STL files or order them from an online service. Another nice option is to order the faceplate laser cut from smoked Acrylic from a service like ponoko.com.

Use a drill and coping saw to cut openings in the shadow box frame to fit the 2 USB panel mounts then painted the exposed wood black to match the frame. I used M2 x 16mm screws to screw the USB panel mounts to the shadow box. I also had to trim out part of the insert that sits between the face plate and back board to clear the USB ports.

I used the brass standoff and screws that came with my touch screen to mount the raspberry pi to the back panel that came with the shadow box.

The camera is mounted with 2 M2 screws through the bracket into the back of the camera and 4 more through the faceplate into the bracket. Connect the camera to one of the high speed USB port. Connect the 2 panel mount USB cables from the frame to the power port and a USB port on the Raspberry Pi then fit the back panel onto the shadow box.

You can now hang the framed Digital Daguerreotype on the wall and put the CNC machine on a small table below it. Plug everything in and have fun watching the CNC print out amazing TSP art!

Step 3: Using the Project

Plug your CNC machine into a USB port. Plug the power adapter into the Raspberry Pi and let it boot. Run the ‘digital-daguerreotype’ application (it will start full screen).

A live image from the camera will be displayed when the application starts. The slider on the left allows you to change the depth of how much of the image will be preserved. Anything beyond the specified depth will be removed.

When you have the picture you want printed, click the ‘start’ button. After about 5 seconds, the line art will be displayed for the picture you captured. If it looks good, press the ‘draw’ button to send the picture to the CNC machine or press ‘cancel’ to try again.