# 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:
```shell
pip install readQR
```
## Usage
```python
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
<img src="images/single_qr.jpeg" width="400"/> <img src="images/multiple_qr.jpg" width="400"/>
### Output images
<img src="images/single_qr_det.jpg" width="400"/> <img src="images/multiple_qr_det.jpg" width="400"/>
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## License
None
Raw data
{
"_id": null,
"home_page": "https://github.com/CollinsWakholi/QR_Code",
"name": "readQR",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Collins Wakholi",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/17/87/b73b831ea95a88bf93bee326235e24f88ddd22fe1a1e43afdb385fd91579/readQR-0.0.1.tar.gz",
"platform": null,
"description": "# Read QR code\n\n## Description\nThis is a simple python script that reads a QR code from an image and prints the result.\nIt uses the WeChat QR code reader API in openCV to read the QR code from a CV2 image.\n\n## Installation\n1. Install using pip:\n```shell\npip install readQR\n```\n\n## Usage\n```python\nfrom readQR import ReadQR\nimport readQR.wechat_artefacts as artefacts\nimport cv2\n\nart_dir = artefacts.__path__[0]\nimg = cv2.imread('test.png')\nreader = ReadQR(artefact_path=art_dir)\nshow = None # Set to \"single\" or \"continuous\" to show the image with the QR code highlighted for single or continuous frames (video)\nresult = reader.decode(img, show=show)\n[print(r) for r in result]\n```\n## Sample input and output images\n\n### Input images\n\n<img src=\"images/single_qr.jpeg\" width=\"400\"/> <img src=\"images/multiple_qr.jpg\" width=\"400\"/>\n\n### Output images\n<img src=\"images/single_qr_det.jpg\" width=\"400\"/> <img src=\"images/multiple_qr_det.jpg\" width=\"400\"/>\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\nNone\n",
"bugtrack_url": null,
"license": "",
"summary": "Read QR code from image using WeChat QR code reader in OpenCV",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/CollinsWakholi/QR_Code"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a1c1b56abbb00430c63f4cdae4044ae25c9abd46512ecfa41c456b0ef3dda629",
"md5": "443349ee0ad7e2beb5ae8470fed84793",
"sha256": "50f715f05ebf389f48e32381d1a1ffb7e93c1a345e52a20557f74802e5fb0eb3"
},
"downloads": -1,
"filename": "readQR-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "443349ee0ad7e2beb5ae8470fed84793",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 923141,
"upload_time": "2023-08-21T16:45:35",
"upload_time_iso_8601": "2023-08-21T16:45:35.510045Z",
"url": "https://files.pythonhosted.org/packages/a1/c1/b56abbb00430c63f4cdae4044ae25c9abd46512ecfa41c456b0ef3dda629/readQR-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1787b73b831ea95a88bf93bee326235e24f88ddd22fe1a1e43afdb385fd91579",
"md5": "c4f3e6f66858364ca74b2238dc33e825",
"sha256": "57360c265e04c213c02e8697e14b47101b21d5244533b1fc11a4dce4f3016242"
},
"downloads": -1,
"filename": "readQR-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "c4f3e6f66858364ca74b2238dc33e825",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 924657,
"upload_time": "2023-08-21T16:45:37",
"upload_time_iso_8601": "2023-08-21T16:45:37.995466Z",
"url": "https://files.pythonhosted.org/packages/17/87/b73b831ea95a88bf93bee326235e24f88ddd22fe1a1e43afdb385fd91579/readQR-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-21 16:45:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "CollinsWakholi",
"github_project": "QR_Code",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": []
},
{
"name": "opencv-python",
"specs": []
},
{
"name": "opencv-contrib-python",
"specs": []
},
{
"name": "matplotlib",
"specs": []
}
],
"lcname": "readqr"
}