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.
Demo
Installation
Currently tested with python 3.7.4 and opencv-headless-4.4.0.46
From PyPi:
pip install opencv-pg
From Github Repo:
pip install git+https://github.com/opencv-pg/opencv-pg
Usage
Playground
To launch the OpenCV Playground with:
- The built-in image:
opencvpg
- 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([
Window([
supt.LoadImage(my_image),
supt.CvtColor(),
tf.InRange(),
supt.BitwiseAnd(),
]),
Window([
tf.Canny(),
]),
])
launch_pipeline(pipeline)
Then run the file.
Development
Installation
To install in development mode:
git clone https://github.com/opencv-pg/opencv-pg
pip install -e opencv-pg/[dev]
Running Tests
cd tests
pytest
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.
Changes
1.0.0
- Initial Release
Project details
Release history Release notifications | RSS feed
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
Hashes for opencv_pg-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 300794d7733709863b0f712fc5e57255868ab90161092535cb95dbe276da329e |
|
MD5 | 7cedf19bddbece435033f2f79c6f84b6 |
|
BLAKE2b-256 | f7d0374198ccd2dd1211804c4c946d172e9bf904a55d079ac10613b26ca955fa |