Skip to main content

A multithreaded live image processor in Python running OpenCV

Project description

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.

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

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.

A Simple Example

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()

Project details


Download files

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

Source Distribution

cvlive-0.1.3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cvlive-0.1.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file cvlive-0.1.3.tar.gz.

File metadata

  • Download URL: cvlive-0.1.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for cvlive-0.1.3.tar.gz
Algorithm Hash digest
SHA256 30f39d746cfb38b871166a462b02056958f8f4fcebe6c5f9c983d8fc3f3b23e7
MD5 6bb68502ca8da83f8be1c8aedf638e15
BLAKE2b-256 6a3c0c148089d34e935bc0e336d454f952ac30444bbe6357a817a6b38cb9a713

See more details on using hashes here.

File details

Details for the file cvlive-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: cvlive-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for cvlive-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c2728d32eea8e89de6a0b0ca426499861f2c484fc7d9659600cfc63c9ea6eb7c
MD5 abeb38a15c5bc4ff50430d72110b61c4
BLAKE2b-256 08c0548baa32d1f6d22fda999c6e1e698533c58c7d3cf06e4cd48d7348b7ff15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page