Name | zbl JSON |
Version |
0.6.2
JSON |
| download |
home_page | None |
Summary | real-time window capture library based on D3D11 and Windows.Graphics.Capture |
upload_time | 2024-12-08 22:05:18 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | None |
keywords |
windows
d3d11
window-capture
graphics-capture
cv
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# zbl
[![PyPI version](https://badge.fury.io/py/zbl.svg)](https://badge.fury.io/py/zbl)
`zbl` is a Rust and Python library for screen/window capturing on Windows. It provides an interface
to `Windows.Graphics.Capture` API with a focus on simplifying integrating computer vision applications for Windows Desktop apps.
**This library is in early development stage**. This means that it's only verified to work for a 'happy path'
scenarios - beware of bugs!
## Python
### Installation
`pip install zbl`
Alternatively, you can install suitable wheel from [releases page](https://github.com/modelflat/zbl/releases).
### Usage
```python
from zbl import Capture
with Capture(window_name='visual studio code') as cap:
frame = next(cap.frames())
print(frame.shape)
```
The snippet above will capture a window which title contains the string `visual studio code`, take one frame (which is represented as a `numpy` array) and print its shape.
See `Capture` constructor for more options. It is possible to capture the entire screen using `display_id` argument,
for example.
To run an example using OpenCV's `highgui`:
1. Install `opencv-python`
2. Run `python -m zbl --display-id 0`
## Rust
See [examples](https://github.com/modelflat/zbl/tree/master/zbl/examples).
Note: if you are getting OpenCV build errors when building the example, check out [how to build OpenCV rust bindings](https://github.com/twistedfall/opencv-rust#rust-opencv-bindings).
## Comparison to `mss` / `pyautogui`
Both are very slow at the time of writing. `mss` tops at 30-50 fps in a tight loop, `pyautogui` is
even slower than that. `zbl` is able to capture an order of magnitude faster (at 500-700 fps). This allows a lot more time for the actual processing.
## Plans
- (in progress) Integration with `GpuMat`s & full on-GPU processing
## Credits
`zbl` is heavily inspired by [screenshot-rs](https://github.com/robmikh/screenshot-rs).
Raw data
{
"_id": null,
"home_page": null,
"name": "zbl",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "windows, d3d11, window-capture, graphics-capture, cv",
"author": null,
"author_email": null,
"download_url": null,
"platform": null,
"description": "# zbl\r\n\r\n[![PyPI version](https://badge.fury.io/py/zbl.svg)](https://badge.fury.io/py/zbl)\r\n\r\n`zbl` is a Rust and Python library for screen/window capturing on Windows. It provides an interface\r\nto `Windows.Graphics.Capture` API with a focus on simplifying integrating computer vision applications for Windows Desktop apps.\r\n\r\n**This library is in early development stage**. This means that it's only verified to work for a 'happy path'\r\nscenarios - beware of bugs!\r\n\r\n## Python\r\n\r\n### Installation\r\n\r\n`pip install zbl`\r\n\r\nAlternatively, you can install suitable wheel from [releases page](https://github.com/modelflat/zbl/releases).\r\n\r\n### Usage\r\n\r\n```python\r\nfrom zbl import Capture\r\n\r\nwith Capture(window_name='visual studio code') as cap:\r\n frame = next(cap.frames())\r\n print(frame.shape)\r\n```\r\n\r\nThe snippet above will capture a window which title contains the string `visual studio code`, take one frame (which is represented as a `numpy` array) and print its shape.\r\n\r\nSee `Capture` constructor for more options. It is possible to capture the entire screen using `display_id` argument,\r\nfor example.\r\n\r\nTo run an example using OpenCV's `highgui`:\r\n\r\n1. Install `opencv-python`\r\n2. Run `python -m zbl --display-id 0`\r\n\r\n## Rust\r\n\r\nSee [examples](https://github.com/modelflat/zbl/tree/master/zbl/examples).\r\nNote: if you are getting OpenCV build errors when building the example, check out [how to build OpenCV rust bindings](https://github.com/twistedfall/opencv-rust#rust-opencv-bindings).\r\n\r\n## Comparison to `mss` / `pyautogui`\r\n\r\nBoth are very slow at the time of writing. `mss` tops at 30-50 fps in a tight loop, `pyautogui` is\r\neven slower than that. `zbl` is able to capture an order of magnitude faster (at 500-700 fps). This allows a lot more time for the actual processing.\r\n\r\n## Plans\r\n\r\n- (in progress) Integration with `GpuMat`s & full on-GPU processing\r\n\r\n## Credits\r\n\r\n`zbl` is heavily inspired by [screenshot-rs](https://github.com/robmikh/screenshot-rs).\r\n\n",
"bugtrack_url": null,
"license": null,
"summary": "real-time window capture library based on D3D11 and Windows.Graphics.Capture",
"version": "0.6.2",
"project_urls": {
"Homepage": "https://github.com/modelflat/zbl",
"Repository": "https://github.com/modelflat/zbl"
},
"split_keywords": [
"windows",
" d3d11",
" window-capture",
" graphics-capture",
" cv"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8622cb94533cf88b28c7a8afffd8d4b6a03c748e3f09cd0098662f0ad51e210f",
"md5": "0189885eb86af8da5501a5b2eda312af",
"sha256": "a9724ad538f110dddb00772abec73b85b5c7895ade4d3da20ee5c49c0af518dc"
},
"downloads": -1,
"filename": "zbl-0.6.2-cp310-cp310-win_amd64.whl",
"has_sig": false,
"md5_digest": "0189885eb86af8da5501a5b2eda312af",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.9",
"size": 183372,
"upload_time": "2024-12-08T22:05:18",
"upload_time_iso_8601": "2024-12-08T22:05:18.441612Z",
"url": "https://files.pythonhosted.org/packages/86/22/cb94533cf88b28c7a8afffd8d4b6a03c748e3f09cd0098662f0ad51e210f/zbl-0.6.2-cp310-cp310-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7e6bea167a2ab972983e1512ca12641e81ac12b52a7786e79391381d7409a001",
"md5": "77442dd39d685c541b276e89649e0411",
"sha256": "4d3bc5cb8b7d25209c71d80676c36e1009f240f9551172ee78dd46ebe4ab115d"
},
"downloads": -1,
"filename": "zbl-0.6.2-cp311-cp311-win_amd64.whl",
"has_sig": false,
"md5_digest": "77442dd39d685c541b276e89649e0411",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.9",
"size": 183511,
"upload_time": "2024-12-08T22:05:20",
"upload_time_iso_8601": "2024-12-08T22:05:20.288515Z",
"url": "https://files.pythonhosted.org/packages/7e/6b/ea167a2ab972983e1512ca12641e81ac12b52a7786e79391381d7409a001/zbl-0.6.2-cp311-cp311-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1edefd4d54d08e20b66a6a465d7f48af0a844ec5663b0df2128c41a6b19fead9",
"md5": "912d4e23253f55773b041b8af691fb95",
"sha256": "4465762d7d9fa672ae067e9e904ef6c58670e1167ea41b17563b7f25377a3950"
},
"downloads": -1,
"filename": "zbl-0.6.2-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "912d4e23253f55773b041b8af691fb95",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.9",
"size": 181782,
"upload_time": "2024-12-08T22:05:21",
"upload_time_iso_8601": "2024-12-08T22:05:21.979224Z",
"url": "https://files.pythonhosted.org/packages/1e/de/fd4d54d08e20b66a6a465d7f48af0a844ec5663b0df2128c41a6b19fead9/zbl-0.6.2-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "df99f8578edfee0c36208eaa69c13cabf5e2393a467e8c9d20e68a00f13d97d4",
"md5": "fa5434da0d075507f68ed4880109c46a",
"sha256": "8d30fa3ad82ef779e883be0560c4f4ebe4a743ba8a99ed232b59c144848bf186"
},
"downloads": -1,
"filename": "zbl-0.6.2-cp39-cp39-win_amd64.whl",
"has_sig": false,
"md5_digest": "fa5434da0d075507f68ed4880109c46a",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": ">=3.9",
"size": 184339,
"upload_time": "2024-12-08T22:05:23",
"upload_time_iso_8601": "2024-12-08T22:05:23.598512Z",
"url": "https://files.pythonhosted.org/packages/df/99/f8578edfee0c36208eaa69c13cabf5e2393a467e8c9d20e68a00f13d97d4/zbl-0.6.2-cp39-cp39-win_amd64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-08 22:05:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "modelflat",
"github_project": "zbl",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "zbl"
}