@wolf480pl @nytpu granted most #BarcodeScanners these days do #2D codes because theybliterally are a 480p60 camera connected to an embedded SoC or even ASIC and just spit out the scanned code as keyboard outputs via PS/2, USB or Bluetooth…

  • Simply because that's cheaper, faster, more reliable, more flexible and way more eye-safe and -friendly than those laser line scanners.

Libraries and tools like #zbar / #zbarimg / #zbarcam are old enough to buy beer in Germany if not liquor I'm not mistaken.

Fun bug in #ZBar discovered while debugging a #SegNo (#Python #QRCode generator library) test failure on #Gentoo with #musl libc.

SegNo defaults to attempting to encode strings as ISO-8859-1 if possible. ZBar defaults to trying to decode them as Big5 first. Most of the time everything works fine.

Let's take a test string from ZBar: "Märchenbücher". When we encode it as ISO-8859-1, we're going to get two high-byte, low-byte sequences: E4 72 for "är" and FC 63 for "üc". The latter sequence maps to a "user defined" character in Big5, and therefore glibc refuses to convert it. However, musl converts it just fine. As a result, ZBar decodes the string as Big5, to "M酺chenb𡡷her".

You could argue that musl behaves wrong. However, note that the former sequence is valid in Big5. So if you shorten the string to just "Märchen", glibc would happily decode its ISO-8859-1 #encoding as Big5, giving you "M酺chen". And yes, if I put that test string into SegNo, I get a QRCode that reproduces the problem on a glibc system.

Does ZBar behave wrong here? Or perhaps SegNo should avoid ISO-8859-1 altogether, and use safer UTF-8 encoding?

https://bugs.gentoo.org/923233
https://github.com/heuer/segno/issues/134
https://github.com/mchehab/zbar/issues/281

923233 – media-gfx/zbar: utf8 decoding problem on musl? (was: dev-python/segno-1.6.0 fails tests)

Odkryłem ciekawy bug w #ZBar, debugując błąd testów paczki #SegNo (generator #QRCode w Pythonie), na #Gentoo, z #musl libc.

SegNo domyślnie próbuje kodować ciągi znaków jako ISO-8859-1, jeżeli jest to możliwe. ZBar domyślnie próbuje w pierwszej kolejności dekodować je jako Big5. Zazwyczaj wszystko działa.

Weźmy przykładowy ciąg znaków z testów ZBar: "Märchenbücher". Kiedy kodujemy go jako ISO-8859-1, otrzymamy dwie sekwencje kodowe (wysoki bajt, niski bajt): E4 72 dla "är", i FC 63 dla "üc". Ta druga wchodzi na "zdefiniowany przez użytkownika" znak w Big5, i glibc odmawia konwersji. Natomiast musl radośnie to konwertuje. Tak więc, ZBar dekoduje ciąg znaków jako Big5, "M酺chenb𡡷her".

Można tu argumentować, że musl działa niepoprawnie. Ale należy zwrócić uwagę, że pierwsza sekwencja jest poprawnym kodowaniem Big5. Tak więc jeśli skrócimy ciąg do "Märchen", glibc radośnie zdekoduje nasze ISO-8859-1 jako Big5, i da nam "M酺chen". I tak, po wstawieniu takiego ciągu znaków w SegNo, dostaję QRCode, przy pomocy którego mogę odtworzyć ten problem na glibc.

Czy ZBar działa niepoprawnie? Czy może SegNo powinno unikać kodowania ISO-8859-1, i zamiast tego pójść w bezpieczniejsze UTF-8?

https://bugs.gentoo.org/923233
https://github.com/heuer/segno/issues/134
https://github.com/mchehab/zbar/issues/281

#Python #kodowanie

923233 – media-gfx/zbar: utf8 decoding problem on musl? (was: dev-python/segno-1.6.0 fails tests)

🌘 在瀏覽器中使用 WebAssembly 和 ZBar 條碼掃描套件
➤ 在瀏覽器中使用 WebAssembly 和 ZBar 條碼掃描套件的經驗分享
https://barkeywolf.consulting/posts/barcode-scanner-webassembly/#meet-zbar
本文介紹瞭如何使用 WebAssembly 和 ZBar 條碼掃描套件在瀏覽器中進行條碼掃描,包括了目標、遇到的問題、使用 ZBar 和 WebAssembly 的過程。
+ 這篇文章對於使用 WebAssembly 和 ZBar 在瀏覽器中進行條碼掃描提供了很多實用的信息和心得,對於遇到類似問題的人來說會非常有幫助。
+ 這篇文章對於技術細節討論很深入,對於對 WebAssembly 和條碼掃描有興趣的人會有很大幫助。
#WebAssembly #ZBar #條碼掃描 #瀏覽器
Using the ZBar barcode scanning suite in the browser with WebAssembly

Barkey Wolf Consulting

J'imagine que l'effet arrondi du du crane empêche de scanner le code bar sur le crane de Hitman à partir d'un screenshot avec #zbarimg 🤔

La grande question est est que c'est vrai code barre qui utilise un vrai standard et qui finit réellement par 47… ?

#zbar

J'ai retrouvé une vielle webcam Logitech C200 planquée il y a plus de 100 ans « en cas où », les trucs à l'ancienne avec un factor-form à la Wheathley. Qui contrairement aux merdes « modernes » avec une MaP fixe¹, a une molette de MaP. Donc adapté pour scanner des codes barres et des QRCode avec #zbar en réglant la MaP suffisamment proche pour du QR Code.

Codes lus jusqu'à présents.
- Interleaved 2 of 5
- EAN-13
- Code-39
- Code-128
- QR codes contenant des URLs

Scan QR codes from the comfort of your desktop! A simple #python skript combining #zbar and #opencv is all it takes. Well, and unsharp masking, given the wide-angle fix-focus #cameras they put into notebooks – https://blog.tfiu.de/a-qr-code-scanner-for-the-desktop.html
#zuengeln
Engelszüngeln: A QR Code Scanner for the Desktop

#ZBar is a #barcode reader suite.

ZBar can read many forms of barcodes, including #ISBN, #EAN, #UPC, and #QR codes. ZBar features two programs which can detect and decode barcodes, one that operates on images, and another which operates on video4linux streams like webcams. The results of both are printed to stdout, allowing them to be piped into other programs easily.

Website 🔗️: https://github.com/mchehab/zbar (fork)

apt 📦️: zbar-tools

#free #opensource #foss #fossmendations

GitHub - mchehab/zbar: ZBar is an open source software suite for reading bar codes from various sources, including webcams. As its development stopped in 2012, I took the task of keeping it updated with the V4L2 API. This is the main repository for it. There's a clone at at LinuxTV.org, and another one at gitlab.

ZBar is an open source software suite for reading bar codes from various sources, including webcams. As its development stopped in 2012, I took the task of keeping it updated with the V4L2 API. Thi...

GitHub
J'ai fait un script pour séparer un fichier en plein de petits bouts, le qr-encoder et assembler tout ça dans une vidéo. Et un autre script qui fait l'inverse.
Le problème c'est que j'ai des corruptions qui se répètent et j'arrive pas à déterminer quel élèment dans la chaîne est responsable.
Une idée ?
(scripts: next toot)
#qrcode #ffmpeg #qrencode #zbar