Tracking April Tags on Cam M4

Hi Guys,

is it possible to track, or atleast to detect AR Markers (April Tags)? I mean if it’s possible with QR-Codes, there shouldn’t be a problem.

Yes, but you’ll have to modify the firmware. We’re out of space on the M4 so you need to remove some other features to make room for April Tags. Finally, you won’t be able to handle a resolution much above 80x60 because the M4 has half the RAM. At 80x60 you should be able to see a tag about 5 ft away.

Hi kwagyeman,
thanks for your reply. Can you explain how to modify the firmware?

It’s easier if I just make a binary for you. I might be able to do that tonight. That said, are you okay with the 80x60 limit? FPS will probably be similar to the M7.

Yes thank you! I’m ok with everything as long it works.

I got AprilTags working on M4 before, you’ll need to disable something to enable AprilTags on M4…
If you don’t need color tracking you can set lab_table to 0 length in src/omv/img/lab_tab.c

const int8_t lab_table[] = {};

Note this will break other features as well.

Then you just need to add this to src/omv/boards/OPENMV2/omv_boardconfig.h

// Enable AprilTags (64 KB).
#define OMV_ENABLE_APRILTAGS

And build:

make clean && make -j5 TARGET=OPENMV2

Here’s the firmware compiled with those changes… don’t use anything but GRAYSCALE. Using RGB565 anywhere will cause a system crash.
firmware.zip (592 KB)

Wow thank you both. I really appreciate your help!