Skip to main content

Qt5 GUI Application for realtime exploration of OpenCV functions

Project description

OpenCV Playground

The OpenCV Playground is a Qt5 application that brings together improved documentation alongside OpenCV functions with the ability to explore the effects of function parameters on an image in real time.

It also comes with a custom Pipeline Launcher that allows you to build and interact with your own sequence of image transformations.

Full documentation can be found on Read the Docs.



Currently tested with python 3.7.4 and opencv-headless-

From PyPi:

pip install opencv-pg

From Github Repo:

pip install git+

Note for Linux Users

On Ubuntu 16.04 (others currently untested), there may be missing links to xcb related shared objects.


sudo apt-get install --reinstall libxcb-xinerama0

Digging Deeper

If you see errors about xcb, you can perform the following to help troubleshoot. In your terminal, make the following export:


Run opencvpg again and validate the output. The final lines will likely mention details about files not found. Likely

Run the following:

cd your_venv/lib/pythonX.X/site-packages/PySide2/Qt/plugins/platforms/
ldd | grep "not found"

This will print any missing links. In our case, showed up a couple times. Reinstalling the package as follows resolved the issue:

sudo apt-get install --reinstall libxcb-xinerama0

Once it’s working, you may want to disable that QT_DEBUG_PLUGINS env variable so it doesn’t throw extra garbage in your output.



To launch the OpenCV Playground with:

  • The built-in image:
  • An image of your choice:
opencvpg --image <path-to-image.png>
  • Without the documentation window:
opencvpg --no-docs

Custom Pipeline

The following is an example of building a custom Pipeline.

from opencv_pg import Pipeline, Window, launch_pipeline
from opencv_pg import support_transforms as supt
from opencv_pg import transforms as tf

if __name__ == '__main__':
    my_image = '/path/to/image.png'

    # Creates two windows
    pipeline = Pipeline([


Then run the file.



To install in development mode:

git clone
pip install -e opencv-pg/[dev]

Running Tests

cd tests

Generating Docs

  • Go into the top level docs directory
  • run sphinx-apidoc -f -o source/ ../src/opencv_pg
  • run make html

Output will be in the docs/build/html/ directory.


1.0.1 - 2020/12/01

  • Add Linux install instructions to


  • Initial Release

Project details

Download files

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

Files for opencv-pg, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size opencv_pg-1.0.1-py3-none-any.whl (147.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size opencv-pg-1.0.1.tar.gz (106.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page