The ZXing-C++ library supports reading Aztec codes.
You can integrate it into your programs using a C++-native API, as well as via wrappers for various other programming languages.
You can also use it in the terminal using the ZXingReader
demo program. On Debian, this is provided by the zxing-cpp-tools
package.
$ sudo apt install zxing-cpp-tools
$ ZXingWriter Aztec 'Hello World!' example.png
$ ZXingReader example.png
Text: "Hello World!"
Bytes: 48 65 6C 6C 6F 20 57 6F 72 6C 64 21
Format: Aztec
Identifier: ]z0
Content: Text
HasECI: false
Position: 12x12 88x12 88x88 12x88
Rotation: 0 deg
IsMirrored: false
IsInverted: false
Version: 2
You can restrict it to only scanning Aztec codes by passing an option.
ZXingReader -help
will show you an explanation of the options the program takes.
As for using a camera, you can use a tool like FFmpeg to get a frame from your camera in JPEG format.
ZXingReader -format Aztec <(ffmpeg -i /dev/video0 -frames 1 -f image2pipe -)
If you just want to find out what an Aztec code says, there’s also a WASM version you can use in the browser:
https://zxing-cpp.github.io/zxing-cpp/demo_cam_reader.html
As for your example case, since the picture in your question has a transparent background, ZXingReader can’t see the code.
So, you might also have to remove the background of transparent images before passing them to ZXingReader.
Here, we’ll use ImageMagick to do that in-place.
$ mogrify -background white -flatten grOnT.png
$ ZXingReader grOnT.png
Text: "This is an example Aztec symbol for Wikipedia."