How to use my 3D printable AprilTag Scale Marker for RealityCapture

Automating the scale setting for my photogrammetry scans

Azad Balabanian
3 min readJul 31, 2022

This is an AprilTag scale marker made to set the correct scale for a 3D scan for photogrammetry software that support automatic detection of AprilTags (like RealityCapture).

At 1:1 scale, the model is 18cm across, 6.5cm width, and 2mm high.

Download the files

Download the files from Thingiverse which include:

  • STL of the model to print
  • GCODE to print it (USE IT AT YOUR OWN RISK)
  • A RealityCapture script (.rccmd) file to automate the detection and setting the distance for your scan.
  • A “detectMarkers.xml” settings file that’s necessary for the .rccmd script file to work.

How to 3D print

  • Use 2 contrasting PLA filaments like black and white (although I used marble grey here cause that’s what I had available).
  • At 0.4mm nozzle diameter and 0.2mm layer height, the print should be 11 layers high.
  • Set a filament change at Layer 11 in your Slicer software.
  • Layers 1–10 should be white (or lighter color). Layer 11 should be the contrasting, darker color (black).

How to use to scale the scan in RealityCapture.

  1. Measure — The distance between the April tags is designed to be 116mm apart. Of course, every 3d printer will be tuned differently and your print might be at a different size, so measure the distance between the two markers yourself!
  2. You have 2 options for the next steps. One is an automated way using a RCCMD script I made to automate a bunch of the steps which I outline here. The other is doing it manually which I outline in my LINK tutorial.

Automated Way

  1. Open the “ScaleMarkers.rccmd” in Notepad or similar.
  • In the 1st line, change the location “detectMarkers.xmd” to match wherever you have downloaded or stored the files from this thingiverse post.
change this directory location to wherever you downloaded/stored the files from thingiverse.

2. Open up RealityCapture and import your photos.

3. Drag and drop the “ScaleMarkers.rccmd” file into the project and the script will do the following automatically:

  • detect markers (creates control points at the center of the AprilTags).
  • creates a distance constraint and sets the names of the 2 points to “36h11:001” and “36h11:003” and sets their distance as “0.116” meters (change this to whatever your measurements were!).
  • align
  • update the scale of the scene

That’s it!

Manual Way

The manual way of setting up the scale marker to scale your RC scene involves quite a few steps. I’ve outlined them already in this tutorial, so refer to that if you’d prefer to do it that way.

Hope that helps! If you have any questions / issues / requests, reach out to me via Twitter 🐦.

--

--

Azad Balabanian

Photogrammetry @realities.io, Host of the ResearchVR Podcast @researchvrcast