Qt Designer is a Qt tool for building cross-platform graphical user interfaces (GUIs) with Qt widgets. In this article, I will use the Qt designer to create an advanced desktop barcode reader app with Dynamsoft Python Barcode SDK for Windows, Linux, macOS, and Raspberry Pi OS. The app contains all the powerful functionalities of Dynamsoft Barcode Reader.

Constructing UI with Qt Designer

The required Qt widgets include:

  • Menu Bar

- Open file

- Open folder

- Save template

- Enter license key

- About

  • Status Bar

- Show status information

  • List Widget

- List loaded file names

  • Label

- Display image or webcam frame

  • Group…

If you want to build a cross-platform GUI app with Python and Qt, you can either use PyQt or PySide. Both of them are Qt bindings for Python. The main difference is the license: PyQt5 is released under GPL or commercial, whereas PySide2 is released under LGPL. Since PySide2 is recommended officially, I will use PySid2 and Dynamsoft Python Barcode SDK to create a GUI barcode reader app on Raspberry Pi.


  • OpenCV Python
python3 -m pip install opencv-python
  • Dynamsoft Python Barcode SDK
python3 -m pip install dbr
  • PySide2
sudo apt-get install python3-pyside2.qt3dcore python3-pyside2.qt3dinput python3-pyside2.qt3dlogic python3-pyside2.qt3drender python3-pyside2.qtcharts python3-pyside2.qtconcurrent python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qthelp python3-pyside2.qtlocation python3-pyside2.qtmultimedia python3-pyside2.qtmultimediawidgets python3-pyside2.qtnetwork python3-pyside2.qtopengl python3-pyside2.qtpositioning python3-pyside2.qtprintsupport python3-pyside2.qtqml python3-pyside2.qtquick python3-pyside2.qtquickwidgets python3-pyside2.qtscript python3-pyside2.qtscripttools python3-pyside2.qtsensors python3-pyside2.qtsql python3-pyside2.qtsvg python3-pyside2.qttest python3-pyside2.qttexttospeech python3-pyside2.qtuitools python3-pyside2.qtwebchannel python3-pyside2.qtwebsockets python3-pyside2.qtwidgets python3-pyside2.qtx11extras python3-pyside2.qtxml python3-pyside2.qtxmlpatterns …

Someone may be curious about whether Intel-based Python apps can work well on Apple M1 Mac. I recently did a test with Dynamsoft Python Barcode SDK, which is built with native x86_64 libraries and CPython. It turned out that there was no issue using pip to install the wheel package and running my Python barcode reader app.

Installing Pip and Python Barcode Wheel Package

When you open the terminal app and type in Python3 the first time, a prompt dialog will pop up for installing the command line developer tools.

Image for post
Image for post

Click Install and wait a while for installing the relevant tools. …

While scanning single or multiple barcodes with a barcode SDK, most of the developers only concern about the trade-off between decoding speed and recognition accuracy, for they cannot get other data. Since from version 8.0, Dynamsoft exposes more parameters and intermediate results (E.g., grayscale image, binary image, barcode localization results, etc.) to developers for app debugging and optimizing, which makes Dynamsoft Barcode SDK stand out from commercial barcode SDKs. In this article, I will go through some relevant parameters and APIs.


  • CMake
  • OpenCV 4.5.0. For Windows, you need to add “OpenCV_DIR = C:\opencv\build" to system environment variables.
Image for post
Image for post

In the warehouse management system, Drone can be used to automate barcode scanning for inventory counts. To learn drone piloting and try barcode scanning in the air, I bought Ryze Tello, which is a mini drone powered by DJI. In this article, I will share how to detect and decode barcodes from Tello drone’s video stream using Dynamsoft Barcode Reader in real-time.

Image for post
Image for post

Porting Tello Video Sample from Python 2.7 to Python 3.7

The sample code dji-sdk/Tello-Python is a good crash course for Tello drone control. However, the maintenance of the repository seems to be halted, and the code is only available for Python 2.7.

Since Python 2 is no longer supported and I am using Python 3.7, I have to change the Python code and rebuild the dependent h264 decoding library in order to be compatible with Python 3. …

Apple announced new Mac models with Apple M1 chip recently. Although Dynamsoft has not released an Apple Silicon version of Dynamsoft Barcode Reader SDK yet, I am curious how will x86_64 barcode SDK perform under Rosetta 2. In this article, I will build a simple command-line barcode reader app on M1-powered MacBook Air, and compare the barcode decoding performance by running the app respectively on Intel-based macOS and M1-based macOS.

Mac Barcode SDK Download

Dynamsoft Barcode Reader v7.6 for macOS

Note: the header file included in the package only supports Objective-C and Swift. …

In the past two weeks, I trained a custom YOLOv3 model for QR code detection and tested it with Darknet. In this article, I will use OpenCV’s DNN (Deep Neural Network) module to load the YOLO model for making detection from static images and real-time camera video stream. Besides, I will use Dynamsoft Barcode Reader to decode QR codes from the regions detected by YOLO.

Image for post
Image for post

YOLO QR Code Detection with OpenCV Python

Install OpenCV ( CPU only) via pip:

pip install opencv-python

You can get qrcode.names, qrcode-yolov3-tiny.cfg and qrcode-yolov3-tiny.weights files from the package YOLOv3-tiny-QR.

To quickly get familiar with the OpenCV DNN APIs, we can refer to object_detection.py, …

Last week, I trained a YOLOv3 model and a YOLOv3-tiny model to do barcode localization via deep learning. By comparing their performance, I dropped YOLOv3, because YOLOv3-tiny is much faster. I am satisfied with the QR code detection speed by running the YOLOv3-tiny model on my GeForce RTX2060 graphics card. In this article, I will power Darknet to decode QR code by integrating Dynamsoft C/C++ barcode SDK. My goal is to explore whether it is possible to utilize deep learning to boost barcode recognition performance.

Barcode SDK Download

Dynamsoft C/C++ Barcode SDK for Windows

Darknet Download

git clone https://github.com/AlexeyAB/darknet --depth 1

Barcode Recognition with Deep Learning and Computer Vision

Let’s find the function run_detector() which parses input arguments in detector.c. Duplicate the line of calling the function test_detector() and rename it for…

In my previous article, I shared how to integrate Dynamsoft Barcode Reader to LabelImg for annotating barcode objects. It is time to take a further step to make some custom models for barcodes. In this article, I will go through the process that I used Darknet to train YOLO v3 models for QR code detection.

About Darknet and YOLO

  • Darknet is an open-source neural network framework.
  • YOLO is a real-time object detection system.

Building Darknet on Windows

Let’s get the source code of Darknet:

git clone https://github.com/AlexeyAB/darknet --depth 1

To build Darknet on Windows, we have to install the following tools beforehand:

LabelImg is a free and open-source image annotation tool written in Python and Qt5. It supports Pascal VOC format and Yolo format that are commonly adopted by mainstream machine learning frameworks. If you are interested in barcode object detection, you can use the tool to annotate different barcode symbologies with bounding boxes. In this article, I will share how to quickly download a bunch of barcode images from Google and utilize Dynamsoft Barcode Reader SDK to automatically add label names.

Image Download

First, we need images. How can we get a bunch of images with the same classification?

There is a convenient Python library called google_images_download. …


Xiao Ling

Manager of Dynamsoft Open Source Projects | Tech Lover

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store