Metadata-Version: 2.1
Name: cvlive
Version: 0.1.1
Summary: A multithreaded live image processor in Python running OpenCV
Home-page: https://github.com/Emilostuff/cvlive
Author: Emil Skydsgaard
Author-email: emilostuff@gmail.com
Keywords: OpenCV,image,processing,computer,vision,demo,multithreaded
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.8, <4
Description-Content-Type: text/markdown
License-File: LICENSE

# CVLive
A multithreaded live image processor in Python running OpenCV that processes images from a webcam or another video source and shows the results in 'real time'. A separate thread handles the processing while the main thread displays the previous result and captures the next input, resulting in significant performance gains on a multi-core CPU. 

CVLive makes it possible to create live demos of a wide variety of image processing concepts *in only a few lines of code*. 

# How to Install
```bash
pip install cvlive
```

# How to Use
- Import `cvlive`
- Create a subclass of `LiveImageProcessor`
- Override one or more of the class methods: `convert()`, `process()`, `display()` and `update()` to obtain the desired functionality

Please take a look at the examples and consult the documentation found in the `LiveImageProcessor` base class to see how this might be done.

# Example
```python
from cvlive import LiveImageProcessor
import cv2


class MySimpleProcessor(LiveImageProcessor):
    def convert(self):
        # convert input image to grayscale
        return cv2.cvtColor(self.raw_input, cv2.COLOR_BGR2GRAY)

    def process(self):
        # blur the input using a 51x51 Gaussian filter
        self.result = cv2.GaussianBlur(self.input, (51, 51), 0)


if __name__ == "__main__":
    MySimpleProcessor().run()

```



