Micro QR Code Scanning and Generating Tools

After reading this article you will know the basics for generating and scanning / decoding / reading Micro QR Codes using Desktop command-line and GUI tools. Generated markers can be saved in various image formats or PDF. You can scan individual images or entire disks. For those more technically inclined, links will be provided at the end for example code that can be used to write your own applications on Android and desktop.

Micro QR Codes are the less common sibling of the ubiquitous QR Codes found everywhere. The idea behind Micro QR is to have a marker which takes up much less area than a QR Code and can be used when space is limited, like on small electronic parts. While Datamatrix is more common and can encode more information per area, it is harder to detect than a Micro QR as it doesn’t have a locator pattern that’s nearly as distinctive. Making Micro QR potentially better in cluttered images.

This article is going to go over the just released tools included with BoofCV. There are not many free Micro QR scanners or encoders, so these new tools are needed. BoofCV is a mature free open source computer vision library. While Micro QR is a new addition, the detector heavily uses past work from BoofCV’s QR Code detector and even out performs some commercial libraries! Nothing here will require programming (that’s save for a future article) but you should be familiar with how to use a command line tool.

Obtaining the Tools

1) Install Java 11 or newer, most computers have it already.
2) Download from Source Forge (79 MB) . Extra instructions here.
3) unzip BoofApplications.zip

GUI Applications

While not as powerful as command line tools, the GUI tools are much easier to use. Using the downloaded applications you now want to launch them using your command line

1) Double click or launch from the command-line:
windows: applications.bat
linux and OS X: ./applications.sh
2) Admire the window which just opened up

Click “Micro QR” button below “Create / Print”. This will open an application for creating new markers. You can print these directly or save them to disk as images or PDF documents. For the most part all you need to do is enter the text of what you want to encode and it will do the rest. You will probably want to adjust the marker’s size and the paper it will be saved to. The grid flags are useful when you want to maximize space on a single sheet of paper and print multiple markers at once.

The GUI application is very minimalist. You tell it which directory you want to scan, or manually enter a regex/glob pattern. It will then scan everything and save the results where you tell it to.

Command Line Tools

By far the command line tools let you do the most customization but are also more complicated and only intended to be used by fairly advanced users.

Let’s start by going over marker creation first:

java -jar applications.jar CreateMicroQrDocument

That will print out help for using the tool. Let’s say we want to print out two different markers multiple times on a single sheet of paper. Then you could do the following:

java -jar applications.jar CreateMicroQrDocument java -jar applications.jar CreateMicroQrDocument

Batch scanning markers is easy and powerful. You can specify it to search a single file, single directory, or recursively search all files that match a regex pattern.

java -jar applications.jar BatchScanMicroQrCodes -i “glob:path/to/*.jpg” -o myresults.txt

This will scan all files ending with jpg in the directory you specify. Results are saved to a file named “myresults.txt”. Let’s say you now want to recursively search directories:

java -jar applications.jar BatchScanMicroQrCodes -i “glob:path/**/*” -o myresults.txt

You can read more about glob pattern matching here, but basically the ** means search all directories at the end of “path/”.

Coding Your Own Applications

This article doesn’t focus on programming, but you can find examples (here) and links to tutorials at https://boofcv.org

Questions?

Please ask them below!

Shameless Plug

Do you have a need for scanning markers in industrial environments fast and reliably? Need a custom solution for scanning QR Codes, Micro QR Codes, Datamatrix, Aztec, or 1D Bar codes? Please check NINOX 360 out! You will also be helping BoofCV’s developers keep on releasing free software!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store