VC++ uses the notebook's built-in camera to scan the QR code function (with source code demo)

VC++ commonly used functions package code a series of articles and source code (advertisement, haha, look at the series and then decide whether to subscribe)

https://blog.csdn.net/kaizi318/article/details/108846326

The source code demo has been uploaded to the Baidu network disk: permanent effective, the code realizes the opening of the notebook camera, and then has been waiting for the scan code,

When the code is scanned, analyze it. What should you do after the analysis is done? Don't you just want to scan the code, so there is nothing wrong with it!

There is not much to say about this. Just upload the code and you will understand it at first glance, or you can open my demo directly and print a QR code to try

There is a suggestion that the content of the QR code should not contain too many characters, generally not more than 100, otherwise the QR code will be densely packed and there will be too much information.

Recognition is definitely influential!

Come, directly on the code: 

I have encapsulated the code, just call a function, and then scan the code and process it in the callback.

int QRCode()
{
    /* setup zbar library standalone processor,
     * threads will be used if available
     */
    proc = zbar_processor_create(1);
    if (!proc) 
    {
        fprintf(stderr, "ERROR: unable to allocate memory?\n");

Guess you like

Origin blog.csdn.net/kaizi318/article/details/108870929