"A web wrapper for opencv that supports displaying via web browsers."
Project description
Webcv
Webcv is a simple wrapper that can implements displaying images, text, and tables via web browsers.
This project is based on quart that requires python 3.7+. For older version of Python, please use webcv-gevent instead.
Installation
pip install webcv
Sample Usage
import sys
import numpy as np
from webcv import webcv
webcv.head_show("h1", "Test image show")
image = np.random.randint(0, 256, (256, 256, 3), dtype=np.uint8)
webcv.imshow("image", image)
webcv.imshow("resize using webcv", webcv.resize(image, (512, 512)))
# response in 30 seconds
webcv.waitKey(30000)
webcv.head_show("h1", "Test table show")
webcv.table_show("versions", [
["python", "opencv", "webcv"],
[f"version {'.'.join(str(v) for v in sys.version_info)}", cv.__version__, webcv.__version__],
])
webcv.waitKey()
By running the code above, your terminal will display something like:
#####################################################################
# #
# The server is running at: http://my-server-ip:4732 #
# #
#####################################################################
* Serving Quart app 'webcv'
* Environment: production
* Please use an ASGI server (e.g. Hypercorn) directly in production
* Debug mode: False
* Running on http://0.0.0.0:4732 (CTRL + C to quit)
Copy paste the address into your browser to view (you may need ssh forward if you are using a remote server):
Acknowledgement
The project was inspired by a Megvii tool.
License
MIT License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file webcv-1.0.0.tar.gz.
File metadata
- Download URL: webcv-1.0.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
038b85a169db6c67724a67f98b93193e179b200971a3330b59d4f332a55b8f7f
|
|
| MD5 |
097601e2ddc92172e3550fb445cbf678
|
|
| BLAKE2b-256 |
4106b9c8873938e20af18b5a15ec1cf2ba26fd6fa864f4795abbbdd1afd64d16
|
File details
Details for the file webcv-1.0.0-py3-none-any.whl.
File metadata
- Download URL: webcv-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f2cd816eccb1d33df729e2ea146778debfc47c72dbb40a07d1af3186056941e
|
|
| MD5 |
c9f1f11f4818557e7be2e83869bba6fe
|
|
| BLAKE2b-256 |
691ac371ebf6a837d68fbdf7ac3380de8a69b258bbe3d6ae80230fb6982369d3
|