BoofCV icon indicating copy to clipboard operation
BoofCV copied to clipboard

Add support for Aztec Codes

Open github-account-0x00 opened this issue 2 years ago • 12 comments

The QrCode works great but I need my application to be able to support both datamatrix and aztec codes as well

github-account-0x00 avatar Aug 05 '21 07:08 github-account-0x00

Not yet and there is no schedule. There's no project that's driving BoofCV at the moment that requires these markers. It could get added as a pet project, by my guess is that it's about 2 to 4 weeks of effort per marker when you include all the testing and data collection.

There's already a request for datamatrix so I'm turning this into a ticket just for Aztec Codes.

lessthanoptimal avatar Aug 07 '21 00:08 lessthanoptimal

One annoying issue is that the Aztec specification ISO/IEC 24778:2008 is not publicly available and costs around $180 USD. Which is a bit ridiculous. If anyone has a copy they can "loan" that would be helpful.

lessthanoptimal avatar Jan 04 '22 01:01 lessthanoptimal

Progress is underway

https://github.com/lessthanoptimal/BoofCV/tree/feature/aztec

lessthanoptimal avatar Feb 03 '22 20:02 lessthanoptimal

80% complete implementation has been merged into SNAPSHOT. If anyone sees this and wants to help create a test set of images post a message here.

lessthanoptimal avatar Feb 14 '22 05:02 lessthanoptimal

@lessthanoptimal any ETA on this feature? ZXing has some kind of bug on large aztec codes, so this lib might be a good alternative.

skjolber avatar May 11 '22 09:05 skjolber

@skjolber It's finished and stable, but there hasn't been a formal release yet. You can use the latest SNAPSHOT to use it. Would be helpful if you did try using it and see if there are any bugs that were missed.

lessthanoptimal avatar May 12 '22 17:05 lessthanoptimal

@lessthanoptimal I've made it work in the android app, looks good. Our code are quite big (600 bytes), I am having some difficulties detecting them, although a lot of the medium sized codes (found online) can be easily read (IMHO this is better than ZXing). Is there a recommended way of configuring the reader for capturing large codes?

skjolber avatar Jun 14 '22 15:06 skjolber

@lessthanoptimal for reference, I am having difficulties detecting the large code below. The smaller works well from multiple angles. The larger sometimes works, at some zoom levels / detector tweaks better than other.

image image

Would it be possible to use multiple detectors at once, i.e. account for multiple zoom levels? And if so, what would be a natural range of configurations?

skjolber avatar Jun 15 '22 09:06 skjolber

I suspect the problem here is that it's using the Pyramid alone to predict where the bits should be. For large markers, if there's any small error it gets amplified the farther from the pyramid you are. That will hopefully get improved in the future. They didn't design Aztec codes with an easy way to find landmarks outside of the pyramid.

On Wed, Jun 15, 2022 at 2:46 AM Thomas Skjølberg @.***> wrote:

@lessthanoptimal https://github.com/lessthanoptimal for reference, I am having difficulties detecting the large code below. The smaller works well from multiple angles. The larger sometimes works, at some zoom levels / detector tweaks better than other.

[image: image] https://user-images.githubusercontent.com/1031478/173795056-bbccc021-ab7f-4dc9-b892-7d67d3583c57.png [image: image] https://user-images.githubusercontent.com/1031478/173795178-784e364a-79b2-41ec-ab20-24d4c85fb3ea.png

Would it be possible to use multiple detectors at once, i.e. account for multiple zoom levels? And if so, what would be a natural range of configurations?

— Reply to this email directly, view it on GitHub https://github.com/lessthanoptimal/BoofCV/issues/287#issuecomment-1156249043, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFUOV2IJBER7ERPI3IZ2OTVPGQ77ANCNFSM5BTCB3CQ . You are receiving this because you were mentioned.Message ID: @.***>

-- "Now, now my good man, this is no time for making enemies." — Voltaire (1694-1778), on his deathbed in response to a priest asking that he renounce Satan.

lessthanoptimal avatar Jun 19 '22 18:06 lessthanoptimal

@lessthanoptimal So what about the so-called "reference grid" for full-sized codes?

image

skjolber avatar Jun 20 '22 09:06 skjolber

They are not distinctive from data bits. The reference algorithm traces it with two parallel lines starting from the center. If you get an unexpected result, then tweak the direction you are tracing along. I've not tried that but it comes across to me as very error prone, especially when you have dynamic lighting, slightly curved surface, or harsh perspective. I've been trying to think of a better approach that isn't too computationally expensive.

I like the approach used by QR Codes more which essentially have a small bullseye scatter throughout the larger markers which can be detected independently and don't require scanning along a line.

On Mon, Jun 20, 2022 at 2:07 AM Thomas Skjølberg @.***> wrote:

@lessthanoptimal https://github.com/lessthanoptimal So what about the so-called "reference grid" for full-sized codes?

[image: image] https://user-images.githubusercontent.com/1031478/174566771-12af6807-065a-4b30-b1a6-b42fefde3236.png

— Reply to this email directly, view it on GitHub https://github.com/lessthanoptimal/BoofCV/issues/287#issuecomment-1160178866, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFUOV5UA5ZT6GIQGR3DFZ3VQAYDTANCNFSM5BTCB3CQ . You are receiving this because you were mentioned.Message ID: @.***>

-- "Now, now my good man, this is no time for making enemies." — Voltaire (1694-1778), on his deathbed in response to a priest asking that he renounce Satan.

lessthanoptimal avatar Jun 21 '22 02:06 lessthanoptimal

So do you want to detect the pyramid first, then the reference grid, or both at the same time?

How about attempting to locate the outer square once the pyramid is found? Or perhaps one of the four squares for less computationally intensive search?

skjolber avatar Jun 21 '22 09:06 skjolber

The new stable release is out, but @skjolber we can continue the discussion on how to make work better on acute angles in another issue.

lessthanoptimal avatar Sep 03 '22 02:09 lessthanoptimal