How to Port C/C++ Barcode Extension to Python 3

When porting code from Python 2 to Python 3, it is not as easy as you imagined no matter whether the primary programming language is Python or C/C++. Re-compiling the Dynamsoft Barcode extension for Python 3 is a challenge because I only found a few of documentation and resources online. Luckily, I succeeded in using Python 3 compatible APIs after reading the source code of Numpy.

Read more

Building Python Barcode Extension with DBR 5.2 for Linux

According to the statistics of Stack Overflow traffic, Python is the fastest-growing major programming language in high-income countries. Python seems to be promising in the future. I have noticed that many of the developers who would like to use Dynamsoft Barcode Reader SDK for Linux are more interested in Python rather than C/C++ or Java. In this post, I will illustrate how to build the Python barcode extension with DBR 5.2.

Read more

How to Build Web Document Scanner Using OpenCV-Python

Many excellent document mobile apps support not only image capture, but also edge detection and perspective transformation. If you are interested in these computer vision technologies, you can use OpenCV to create a free document scanner app yourself. In this post, I want to share how to use OpenCV-Python to create a web document scanner step by step.

Read more

How to Build Web Camera Recorder Using OpenCV and Flask

Recently, I was inspired by a blog post “Python Live Video Streaming Example” and thinking whether it is possible to save the camera streaming to a video file. Based on the example code, I managed to figure out a solution. In this post, I want to share the process of building the web camera recorder using OpenCV and Flask.

Read more

Listing Multiple Cameras for OpenCV-Python on Windows

Using OpenCV APIs to capture video from a camera is convenient. However, OpenCV does not provide an API for listing all available devices. If you have multiple cameras connected to your PC, you have no idea how to choose the right one. To get device information on Windows, you need to invoke DirectShow APIs. In this post, I will share how to create a Python extension that lists camera devices for OpenCV-Python on Windows.

Read more

Raspberry Pi Barcode Scanner in Python

Previously, I wrote an article Raspberry Pi Barcode Scanner with Webcam and Python illustrating how to build a simple barcode scanner using Dynamsoft Barcode Reader SDK and OpenCV from scratch. The method decodeFile() was used for detecting barcodes from an image file. To use the API, you have to write image buffer that obtained by OpenCV API to a file beforehand. Because the I/O operation takes too much time, this API is not suitable for real-time barcode detection from webcam video stream. Considering this scenario, I have added a new Python API decodeBuffer(). In this article, I will illustrate how to create and use the new API.

Read more

How to Convert OpenCV Image Data from Python to C

OpenCV officially provides both C++ and Python APIs for developers. Most of the time, developers just need to use one kind of programming languages to read, write and process images with hundreds of computer vision algorithms. However, if you want to use OpenCV Python APIs with an extended C/C++ library, it will be tricky to pass the data. In this article, I will share how to read camera stream with OpenCV-Python and detect barcode with Dynamsoft C/C++ Barcode SDK.

Read more