This article is a mirror article of machine translation, please click here to jump to the original article.

View: 32227|Reply: 4

[WinForm] C# identifies the location of the QR code on the screen

[Copy link]
Posted on 12/23/2016 11:25:20 AM | | | |


Recently, I saw a tool, which is to scan the QR code on the screen, and the QR code is marked with a red frame around it.

We know that to recognize QR codes, C# can be done with ZXing, generated and recognized:

C# WPF uses ZXing to generate QR codes Introduction to ImageSource
http://www.itsvse.com/thread-2493-1-1.html
(Source: Architect)



Uh... How does the software identify the position of the QR code on the screen????

At first, I was curious, and finally, I looked at the author's source code, and later, I will attach the source code.

Find, it is to take all the monitors, and then, cycle to pick up each monitor, the acquisition process is as follows,

First, take the largest part of the monitor, and then take the middle part, that is, slowly from the outside to the inside.

I'm curious, this big screen, the QR code is so small, can Zxing also recognize it?

I tested it, ZXing is really powerful, such a big screen, such a small QR code, it can indeed recognize!!

As for the location, it is easy to do, ZXing has a ready-made method:



Finally, attach the code:







Previous:php Senior Programmer Architect Interview Questions
Next:C# Win10 Development Starter Exercises and Answers
Posted on 2/12/2018 11:48:25 AM |
Q: What is the member of the Screen<Screen.AllScreens> Screen?
Posted on 2/12/2018 2:41:53 PM |
orza2008 posted on 2018-2-12 11:48
What kind of member is this Screen?


Screen.AllScreens property:
Get an array of all the displays on your system.
Syntax: public static Screen[] AllScreens{get; }
Posted on 2/24/2023 9:28:09 AM |
It's hard to see
 Landlord| Posted on 1/11/2025 12:04:12 PM |
.NET Core uses zxing.net to identify 2D content, citing the following:


The code is as follows:



Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com