首页 > 编程语言 >Dynamsoft Barcode Reader SDK C++ 10.4.10 Crack-24.7.22

Dynamsoft Barcode Reader SDK C++ 10.4.10 Crack-24.7.22

时间:2024-07-27 11:27:41浏览次数:13  
标签:10 INSTALLATION lib Windows Dynamsoft 24.7 Crack FOLDER DBRCPPSample

Dynamsoft Barcode Reader Documentation for C++ Edition

Dynamsoft Barcode Reader (DBR) SDK C++ Edition is a barcode reading tool designed specifically for C++ developers.

Leveraging the efficiency and flexibility of the C++ language, DBR C++ Edition provides rich APIs for developers to easily integrate barcode reading functionality into your c++ applications. Please take a look at API Reference to see details.

In addition, DBR C++ Edition provides cross-platform support, running on multiple operating systems such as Windows, Linux, and Mac, to meet the needs of different development environments

As one of the functional products of the Dynamsoft Capture Vision (DCV) framework, DBR is also designed to seamlessly integrate with other DCV components and provide developers with a comprehensive set of image processing tools, which cover image capturing, content understanding, result parsing, and interactive workflow. If you are building such a capturing and processing solution, take a look at Introduction to Dynamsoft Capture Vision.

Furthermore, DBR provides a powerful parameter system in order to cope with various scenarios. Read Parameter Reference for details.

Getting Started with DBR C++ Edition

The best way to start with the Dynamsoft Barcode Reader C++ Edition, is following the User Guide to build your first barcode reading application. Please note that the system requirements is as below:

System Requirements

  • Windows:
    • Supported Versions: Windows 7 and higher, or Windows Server 2003 and higher
    • Architecture: x64 and x86
    • Development Environment: Visual Studio 2012 or higher.
  • Linux:
    • Supported Distributions: Ubuntu 14.04.4+ LTS, Debian 8+, CentOS 6+
    • Architectures: x64 (arm 32-bit and arm 64-bit coming soon)
    • Minimum GLIBC Version: GLIBC_2.18 or higher
    • Compiler: G++ 5.4 or higher

Dynamsoft Barcode API Highlights

High-speed barcode recognition algorithms for 1D and 2D barcodes with cross-platform support for Windows, macOS, and Linux. Allows developers to almost instantly embed barcode reading functionality into their web and desktop applications with a large offering of APIs.

Getting Started with Dynamsoft Barcode Reader SDK C++ Edition

In this guide, you will learn step by step on how to build a barcode reading application with Dynamsoft Barcode Reader SDK using C++ language.

Read more on Dynamsoft Barcode Reader Features

Installation

If you haven’t downloaded the SDK yet, download the C/C++ Package now and unpack it into a directory of your choice.

For this tutorial, we will unpack it to a pseudo directory named [INSTALLATION FOLDER]. Please change it to your preferred unpacking path for the following content.

To find out whether your environment is supported, please read the System Requirements.

Build Your First Application

Let’s start by creating a console application which demonstrates how to use the minimum code to read barcodes from an picture of it.

You can download the entire source code from here.

Create a New Project

  • For Windows
  1. Open Visual Studio. Go to “File > New > Project…” or click “Create a new project” on the starting page, choose “Console App”, create a new Empty Project and set the Project name as DBRCPPSample.

  2. Add a new source file named DBRCPPSample.cpp into the project.

  • For Linux

    Create a new source file named DBRCPPSample.cpp and place it into the folder [INSTALLATION FOLDER]/Dynamsoft/Samples.

Include the Library

Add headers and libs in DBRCPPSample.cpp.

#include <iostream>
#include <string>
#include "[INSTALLATION FOLDER]/Dynamsoft/Include/DynamsoftCaptureVisionRouter.h"

using namespace std;
using namespace dynamsoft::license;
using namespace dynamsoft::cvr;
using namespace dynamsoft::dbr;

#if defined(_WIN64) || defined(_WIN32)
    #ifdef _WIN64
        #pragma comment(lib, "[INSTALLATION FOLDER]/Dynamsoft/Distributables/Lib/Windows/x64/DynamsoftLicensex64.lib")
        #pragma comment(lib, "[INSTALLATION FOLDER]/Dynamsoft/Distributables/Lib/Windows/x64/DynamsoftCaptureVisionRouterx64.lib")
    #else
        #pragma comment(lib, "[INSTALLATION FOLDER]/Dynamsoft/Distributables/Lib/Windows/x86/DynamsoftLicensex86.lib")
        #pragma comment(lib, "[INSTALLATION FOLDER]/Dynamsoft/Distributables/Lib/Windows/x86/DynamsoftCaptureVisionRouterx86.lib")
    #endif
#endif

Initialize a Capture Vision Router Instance

Initialize the license key.

char errorMsg[512];
CLicenseManager::InitLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9", errorMsg, 512);

The string “DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9” here is a free public trial license. Note that network connection is required for this license to work. When it expires, you can request a 30-day free trial license from the Customer Portal.

Create an instance of Capture Vision Router.

CCaptureVisionRouter* cvr = new CCaptureVisionRouter;

Decode and Output Results

Decode barcodes from an image file.

string imageFile = "[INSTALLATION FOLDER]/Dynamsoft/Resources/BarcodeReader/Images/GeneralBarcodes.png";
CCapturedResult* result = cvr->Capture(imageFile.c_str(), CPresetTemplate::PT_READ_BARCODES);
if (result->GetErrorCode() != 0) {
    cout << "Error: " << result->GetErrorCode() << "," << result->GetErrorString() << endl;
}
CDecodedBarcodesResult *barcodeResult = result->GetDecodedBarcodesResult();
if (barcodeResult == nullptr || barcodeResult->GetItemsCount() == 0)
{
    cout << "No barcode found." << endl;
}
else
{
    int barcodeResultItemCount = barcodeResult->GetItemsCount();
    cout << "Decoded " << barcodeResultItemCount << " barcodes" << endl;
    for (int j = 0; j < barcodeResultItemCount; j++)
    {
        const CBarcodeResultItem *barcodeResultItem = barcodeResult->GetItem(j);
        cout << "Result " << j + 1 << endl;
        cout << "Barcode Format: " << barcodeResultItem->GetFormatString() << endl;
        cout << "Barcode Text: " << barcodeResultItem->GetText() << endl;
    }
}

Note:

Please change all [INSTALLATION FOLDER] in above code snippet to your unpacking path.

Release the Allocated Memory

result->Release();
delete cvr, cvr = NULL;

Build and Run the Project

  • For Windows
  1. In Visual Studio, set the solution to build as Release|x64.

  2. Build the project to generate program DBRCPPSample.exe.

  3. Copy ALL *.dll files under [INSTALLATION FOLDER]/Dynamsoft/Distributables/Lib/Windows/x64 to the same folder as the DBRCPPSample.exe (“[PROJECT FOLDER]\DBRCPPSample\x64\Release”).

  4. Copy [INSTALLATION FOLDER]/Dynamsoft/Distributables/DBR-PresetTemplates.json to the same folder as the DBRCPPSample.exe.

  5. Run the program DBRCPPSample.exe.

The SDK supports both x86 and x64, please set the platform based on your needs.

  • For Linux

    Open a terminal and change to the target directory where DBRCPPSample.cpp is located. Build the sample:

      g++ -o DBRCPPSample DBRCPPSample.cpp -lDynamsoftCaptureVisionRouter -lDynamsoftLicense -L ../Distributables/Lib/Linux/x64 -Wl,-rpath=../Distributables/Lib/Linux/x64 -std=c++11
      cp ../Distributables/DBR-PresetTemplates.json ../Distributables/Lib/Linux/x64
    

    Run the program DBRCPPSample.

      ./DBRCPPSample
    

Process Multiple Images

If, instead of processing one single image, you need to process many images at once, you can follow these steps:

These steps follow the step Initialize a Capture Vision Router Instance mentioned above.

You can download the entire source code from here.

Add an Image Source as the Input

The class CDirectoryFetcher is capable of converting a local directory to an image source. We will use it to connect multiple images to the image-processing engine.

Include additional DynamsoftUtility and DynamsoftCore module.

// Add the following lines
using namespace dynamsoft::utility;
#ifdef _WIN64
#pragma comment(lib, "[INSTALLATION FOLDER]/Dynamsoft/Distributables/Lib/Windows/x64/DynamsoftCorex64.lib")
#pragma comment(lib, "[INSTALLATION FOLDER]/Dynamsoft/Distributables/Lib/Windows/x64/DynamsoftUtilityx64.lib")
#else
#pragma comment(lib, "[INSTALLATION FOLDER]/Dynamsoft/Distributables/Lib/Windows/x86/DynamsoftCorex86.lib")
#pragma comment(lib, "[INSTALLATION FOLDER]/Dynamsoft/Distributables/Lib/Windows/x86/DynamsoftUtilityx86.lib")
#endif

Set up a CDirectoryFetcher object to retrieve image data sources from a directory.

CDirectoryFetcher *fetcher = new CDirectoryFetcher;
fetcher->SetDirectory("[THE DIRECTORY THAT HOLDS THE IMAGES]");
cvr->SetInput(fetcher);

Add a Result Receiver as the Output

Create a class MyCapturedResultReceiver to implement the CCapturedResultReceiver interface, and get the barocde results in OnDecodedBarcodesReceived callback function

class MyCapturedResultReceiver : public CCapturedResultReceiver {
    void OnDecodedBarcodesReceived(CDecodedBarcodesResult* pResult) {
        const CFileImageTag *tag = dynamic_cast<const CFileImageTag*>(pResult->GetOriginalImageTag());
        cout << "File: " << tag->GetFilePath() << endl;
        if (pResult->GetErrorCode() != EC_OK)
        {
            cout << "Error: " << pResult->GetErrorString() << endl;
        }
        else
        {
            int count = pResult->GetItemsCount();
            cout << "Decoded " << count << " barcodes" << endl;
            for (int i = 0; i < count; i++) {
                const CBarcodeResultItem* barcodeResultItem = pResult->GetItem(i);                   
                if (barcodeResultItem != NULL)
                {
                    cout << "Result " << i + 1 << endl;
                    cout << "Barcode Format: " << barcodeResultItem->GetFormatString() << endl;
                    cout << "Barcode Text: " << barcodeResultItem->GetText() << endl;
                }
            }        
        }
        cout << endl;
    }
};

Create and register a MyCapturedResultReceiver object as the result receiver.

CCapturedResultReceiver *capturedReceiver = new MyCapturedResultReceiver;
cvr->AddResultReceiver(capturedReceiver);

Add an Object to Listen to the Status of the Image Source

Create a class MyImageSourceStateListener to implement the CImageSourceStateListenter interface, and call StopCapturing in OnImageSourceStateReceived callback function when the state is ISS_EXHAUSTED.

class MyImageSourceStateListener : public CImageSourceStateListener {
private:
    CCaptureVisionRouter* m_router;
public:
    MyImageSourceStateListener(CCaptureVisionRouter* router) {
        m_router = router;
    }
    virtual void OnImageSourceStateReceived(ImageSourceState state)
    {
        if (state == ISS_EXHAUSTED)
            m_router->StopCapturing();
    }
};

Create and register a MyImageSourceStateListener object as the listener.

CImageSourceStateListener *listener = new MyImageSourceStateListener(cvr);
cvr->AddImageSourceStateListener(listener);

Start the Process

Call the method StartCapturing() to start processing all the images in the specified folder.

int errorCode = cvr->StartCapturing(CPresetTemplate::PT_READ_BARCODES, true, errorMsg, 512);        

During the process, the callback function OnDecodedBarcodesReceived() is triggered each time an image finishes processing. After all images are processed, the listener function OnImageSourceStateReceived() will return the image source state as ISS_EXHAUSTED and the process is stopped with the method StopCapturing().

Release the Allocated Memory

delete cvr, cvr = NULL;
delete fetcher, fetcher = NULL;
delete listener, listener = NULL;
delete capturedReceiver, capturedReceiver = NULL;

Build and Run the Project Again

Please refer to Build and Run the Project.

 

标签:10,INSTALLATION,lib,Windows,Dynamsoft,24.7,Crack,FOLDER,DBRCPPSample
From: https://blog.csdn.net/john_dwh/article/details/140724866

相关文章

  • 2024.7.27第二周周六学习总结
    vj4补题(上午)线段树+multiset(buhui)原文链接:https://blog.csdn.net/m0_64158084/article/details/127790615补充)set和mutiset一个自动去重,一个不去重。字典树/map题目:给你一个NxN的矩阵,矩阵由小写字母和#组成,#为障碍。然后给出m个字符串和该字符串对应的值。然后从矩阵中......
  • mysqldump: Got error: 1066: Not unique table/alias: 'act_evt_log' when using LOC
    先说解决办法:执行下面语句mysqldump-ushooter-p123123--single-transactionfd>fd.sql  lower_case_table_names区分大小写设置注意:此参数不可以动态修改,必须重启数据库 12341、参数含义:lower_case_table_names=1  表名存储在磁盘是小写的,但是比......
  • 尝试使用 Spotify API 获取播放列表中超过 100 首歌曲的所有歌曲
    我正在尝试使用SpotifyAPI返回指定播放列表中的歌曲名称列表。我能够让它返回100多首歌曲,但每次都会短一些看似随机的数量。在一个包含222首歌曲的播放列表上,它只返回214首歌曲,在另一个包含152首歌曲的播放列表上,它只返回125首歌曲。这是我正在努力解决的代码:......
  • 2024.7.26总结
    今天学习一些基本DP线性DP区间DP状压DP树形DP数位DP不好定转移顺序就用记忆化搜索。线性DP一般定义形如\(dp_{i,s}\)的状态,表示考虑了前\(i\)个,限制为\(s\)的最优解。视情况可以把\(i\)压掉,或者把\(s\)在枚举中体现以此压掉。区间DP是从小区间合并到大区间,注意转移顺序,......
  • 鸿蒙UI系统组件10——菜单(Menu)
    果你也对鸿蒙开发感兴趣,加入“Harmony自习室”吧!扫描下面名片,关注公众号。Menu是菜单接口,一般用于鼠标右键弹窗、点击弹窗等。1、创建默认样式的菜单菜单需要调用bindMenu接口来实现。bindMenu响应绑定组件的点击事件,绑定组件后手势点击对应组件后即可弹出。Button('click......
  • Camtasia Studio2024破解Crack中文永久激活版安装教程+汉化补丁
    在当今数字化内容盛行的时代,视频已经成为信息传递、知识分享和创意表达的重要形式。无论是教育工作者制作教学视频、企业员工进行培训内容创作,还是自媒体创作者展示创意作品,一款功能强大且易于使用的视频编辑软件都是必不可少的。今天,我们要为您介绍的就是这样一款备受瞩目的视......
  • 学习Java的第十一天啦(2024.7.26)
    1.死锁的条件:死锁的产生还涉及到一些具体的条件,这些条件可以被看作是死锁产生的必要条件,包括:1.互斥条件:资源不能被多个进程或线程同时访问,即资源是互斥的。2.请求保持条件:进程或线程在请求资源时,已经持有其他资源,并且不愿意释放已经持有的资源。3.不可剥夺条件:已经分配给进......
  • DAY10 栈与队列part01
     理论基础文章讲解:https://programmercarl.com/%E6%A0%88%E4%B8%8E%E9%98%9F%E5%88%97%E7%90%86%E8%AE%BA%E5%9F%BA%E7%A1%80.html232.用栈实现队列 注意为什么要用两个栈题目链接/文章讲解/视频讲解:https://programmercarl.com/0232.%E7%94%A8%E6%A0%88%E5%AE%9E%E7%8E%......
  • 数学建模竞赛中应掌握的10类算法
    数学建模竞赛中应掌握的10类算法这篇文章是搬运自2004年发表在MATHEMATICALMODELING即《数模》上的一篇文章,作者是董乘宇,曾任SHUMO.COM论坛“编程交流”版版主,获2002年全国大学生数学建模竞赛一等奖。尽管这篇文章至今已经有了整整20年的时间,但考虑到在数学建模领域或者......
  • 【待做】【AI+安全】数据集:图像分类数据集-1000
    图像分类数据集-1000Sort_1000pics数据集包含了1000张图片,总共分为10大类,分别是人(第0类)、沙滩(第1类)、建筑(第2类)、大卡车(第3类)、恐龙(第4类)、大象(第5类)、花朵(第6类)、马(第7类)、山峰(第8类)和食品(第9类),每类100张。内容类型:图像样本使用范围:图像分类、恶意家族分类推荐理由:个人感......