Skip to main content

Read QR code from image using WeChat QR code reader in OpenCV

Project description

Read QR code

Description

This is a simple python script that reads a QR code from an image and prints the result. It uses the WeChat QR code reader API in openCV to read the QR code from a CV2 image.

Installation

  1. Install using pip:
pip install readQR

Usage

from readQR import ReadQR
import readQR.wechat_artefacts as artefacts
import cv2

art_dir = artefacts.__path__[0]
img = cv2.imread('test.png')
reader = ReadQR(artefact_path=art_dir)
show = None # Set to "single" or "continuous" to show the image with the QR code highlighted for single or continuous frames (video)
result = reader.decode(img, show=show)
[print(r) for r in result]

Sample input and output images

Input images

Output images

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

None

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

readQR-0.0.1.tar.gz (924.7 kB view hashes)

Uploaded Source

Built Distribution

readQR-0.0.1-py3-none-any.whl (923.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page