Skip to main content

No project description provided

Project description


zbl is a Rust and Python library which aims to make it easy to integrate CV libraries (such as OpenCV) with Windows Desktop apps for real-time processing. It does so by providing a simplified interface to Windows.Graphics.Capture.

This library is not well-tested against corner cases, and was only verified to work for a 'happy path' scenarios, so beware of bugs!



pip install zbl

Alternatively, you can install suitable wheel from releases page.


from zbl import Capture

with Capture('visual studio code') as cap:
    frame = next(cap.frames())

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.

To run an example using OpenCV's highgui:

  1. Install opencv-python
  2. Run python -m zbl '<full or partial window name, case insensitive>'


See examples. Note: if you are getting OpenCV build errors when building the example, check out how to build OpenCV rust bindings.


zbl is heavily inspired by screenshot-rs.

Project details

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

zbl-0.0.3-cp311-none-win_amd64.whl (187.5 kB view hashes)

Uploaded cp311

zbl-0.0.3-cp310-none-win_amd64.whl (187.5 kB view hashes)

Uploaded cp310

zbl-0.0.3-cp39-none-win_amd64.whl (187.8 kB view hashes)

Uploaded cp39

zbl-0.0.3-cp38-none-win_amd64.whl (187.9 kB view hashes)

Uploaded cp38

zbl-0.0.3-cp37-none-win_amd64.whl (187.9 kB view hashes)

Uploaded cp37

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