Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose a different barcode type (and implement it) #124

Closed
floogulinc opened this issue Aug 9, 2020 · 1 comment · Fixed by #128
Closed

Choose a different barcode type (and implement it) #124

floogulinc opened this issue Aug 9, 2020 · 1 comment · Fixed by #128
Labels

Comments

@floogulinc
Copy link
Member

floogulinc commented Aug 9, 2020

Currently we are using 3x3 AR barcodes. These have some limitations so we should probably change to a different type.

Here is a chart of barcode types (from artoolkitx):

Matrix code type Maximum number of markers Number of bit errors that can be detected Number of bit errors that can be corrected
AR_MATRIX_CODE_5x5_BCH_22_7_7 127 6 3
AR_MATRIX_CODE_4x4_BCH_13_5_5 32 4 2
AR_MATRIX_CODE_5x5_22_12_5 4095 4 2
AR_MATRIX_CODE_3x3_HAMMING63 8 2 1
AR_MATRIX_CODE_4x4_BCH_13_9_3 512 2 1
AR_MATRIX_CODE_3x3_PARITY65 32 1 0
AR_MATRIX_CODE_3x3 64 0 0
AR_MATRIX_CODE_4x4 8192 0 0
AR_MATRIX_CODE_5x5 4194304 0 0

You can see from this chart that the type we are currently using, AR_MATRIX_CODE_3x3, only allows up to 64 markers. Since we are using 1-16 for flowers and reserving 0, that leaves only 47 markers left for nests, which for the majority of cases would be enough but could be an issue in particularly large environments. Aside from that the 3x3 barcodes without any parity we are using have no error correction and thus a hamming distance of 0. This means there is a higher chance of a marker being misrecognized as a different ID.

I propose we use the AR_MATRIX_CODE_5x5_BCH_22_7_7 type as it provides 127 markers, which would give us up to 111 nests and it has the greatest hamming distance between markers and ability to correct for errors in reading. This seems to be the most recommended one in general as well.

@floogulinc floogulinc changed the title Barcode generator and change barcode type Choose a different barcode type (and implement it) Aug 9, 2020
@floogulinc
Copy link
Member Author

Update: because threear doesn't support 5x5 barcode markers we have chosen to go with AR_MATRIX_CODE_4x4_BCH_13_9_3

@floogulinc floogulinc linked a pull request Aug 13, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants