fun with QR codes anyone?

No explicit questions like "how do I hack xxx.com" please!
Post Reply
User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
18
Location: In your eye floaters.
Contact:

fun with QR codes anyone?

Post by bad_brain »

because of 'rona there are QR code stickers pretty much everywhere now here, for "contactless" stuff of any silly kindy, and on every gastronomy table too. also the proof of vaccination as e-version is a QR code on the phone, have never have seen one IRL yet, would really like to analyze it.

aaanyway.....I stumbled over this one here, looks like it could be fun, and I'll definitey play with it on the weekend:
https://github.com/h0nus/QRGen
Image

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Re: fun with QR codes anyone?

Post by Gogeta70 »

Oh, that's a neat little tool you found. That could be really useful for me, since at work I develop a security-related product that makes use of QR codes as a way to apply some configuration options to the product as well as some other things. I'm being pretty vague here since this is a public board, but if anyone's curious I can post more about it in the backroom :)

And, since we're talking QR codes, here's a little aside:

So like I mentioned above, my employer's product reads QR codes. Now, this product runs on a Raspberry Pi computer and reads QR codes from the camera. The images from the camera are around 2500x2000 pixels. Now, the RPi in this product is a busy little computer - it runs about 10 Celsius below its thermal shutoff point... ( :lol: :cry: ) Suffice it to say that whatever code detects the QR code in the image has to be pretty damn fast. So about a week or two before the decision was made that we're going to use QR codes in our product at work (it had been discussed for a while though), I spent one very caffeinated weekend writing my own QR code detector from scratch - without using AI or any of that fancy-shmancy stuff. Just good 'ol fashioned image processing and heuristics ^_^. The only job of this QR detector was to determine if there was a QR code in an image, and if so, give the coordinates of a rectangle around the QR code. It wound up working really damn well, at least on my home computer and webcam.

So when the need came up at work, I just grabbed the code I already wrote at home and slapped it into place on the RPi. The idea was to basically use what I had already made temporarily, and our data scientist would train an AI that would be able to detect it even more quickly and accurately. To give you an idea of the kind of "quick" I'm talking about here, this needed to be able to detect a QR code about 8-10 times per second in images around 2500x2000 pixels in size. And really, it had to detect a QR code within about 50 milliseconds to give the system time to parse the data, handle the data, and then grab the next image from the camera. Funnily enough, we're still using my QR code detector that I wrote over a weekend to this day. The data scientist couldn't train an AI that worked better and faster than my code and after 3 months, the boss told him to work on other stuff. :P
I still occasionally ask him if he's got that QR code AI working yet :lol:

Not a very interesting story, but dammit, I'm proud of that little QR detector I wrote! It was a fun little project that wound up being really useful ^_^
Anyway, that's all I can really say about QR codes. Probably more than anyone really wants to read... lol, oh well.

'Til the next "story time" y'all 8)
¯\_(ツ)_/¯ It works on my machine...

User avatar
computathug
Administrator
Administrator
Posts: 2693
Joined: 29 Mar 2007, 16:00
17
Location: UK
Contact:

Re: fun with QR codes anyone?

Post by computathug »

Gogeta70 wrote:
20 Jul 2021, 23:53
Funnily enough, we're still using my QR code detector that I wrote over a weekend to this day. The data scientist couldn't train an AI that worked better and faster than my code and after 3 months, the boss told him to work on other stuff. :P
I still occasionally ask him if he's got that QR code AI working yet :lol:
This made me laugh.

It wont be long before everything has to include a QR code similar to everything needing a bar-code. Bar-codes aren't as easy to scan and read.
The devil can cite Scripture for his purpose.
-- William Shakespeare, "The Merchant of Venice"
https://tshirt-memes.com

Post Reply