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

Optimal text segmentation #206

Open
RCasatta opened this issue May 10, 2023 · 1 comment
Open

Optimal text segmentation #206

RCasatta opened this issue May 10, 2023 · 1 comment

Comments

@RCasatta
Copy link

According to https://www.nayuki.io/page/optimal-text-segmentation-for-qr-codes the optimal text segmentation of the string
bitcoin:BC1PF4CHVJTQGVWNQ2VURZUJX623JVWUDEYC2MNQUFLXZD0K4FQ870QS40G5XT?amount=0.00000111&label=Prova%20QR&message=Hello results in 821 encoded bits, while it seems a QR encoded from qrencode achieve 832 bits with the following segments:

[Segment { mode: Byte, begin: 0, end: 7 }, Segment { mode: Alphanumeric, begin: 7, end: 70 }, Segment { mode: Byte, begin: 70, end: 119 }]

The optimal segmentation includes a Numeric segment that is not included by qrencode

image

@nayuki
Copy link

nayuki commented May 11, 2023

Note that the optimal text segmentation depends on the version number used. My segmentation is optimal for versions 1 to 26 (though the text requires at least version 5 at low ECC). Fukuchi's segmentation is optimal for version 27 to 40. You can see this when you play with my web page and override the minimum version to at least 27.

Though, after glancing at split.c and qrinput.c, I don't see any obvious explanation for the code's behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants