Skip to main content

cv2studio

cv2studio is an OpenCV framework that give you an ability to decompose processing flow into components.

Features

  • Component-based development
  • Channel independence
  • Classes wrappers for HighGUI elements of OpenCV
  • Channel independence for components

Getting Started

The main principle behind this framework is decomposition. Splitting up a code into one-format components make it highly reusable. It becomes easy to develop different parts of video/image processing separately and share it with others.

Installing

To install the current release:

pip install cv2studio

Examples

Importing

Before using features of the framework goes importing.

from cv2studio import App, Component

Component creation

To create a component describe a class derived from Component. To use this class it's required to declare the method process(self, img), where img is an image to be process. This function must return an image as well.

class Blur(Component):
    def process(self, img):
        img = cv2.GaussianBlur(img, (5, 5), 5)
        return img

This component apply blur to an input image.

App creation

To create an app that will hold processing components describe a class derived from 'App' and add components using add_component(component) method.

class VideoApp(App):
    def __init__(self, path):
        App.__init__(self, path, VIDEO)
        # self.add_component(MyComponent())
        self.add_component(Blur())

Running

To run the described app use main_loop method. It will start main processing loop with applying chain of added component.

app = VideoApp('path/to/video')
app.main_loop()

main_loop starts a video processing loop. For creating more complex app see the following examples.

Testing

To run tests run the following command:

pytest

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Contributing

Please read CONTRIBUTE.md for details on our code of conduct, and the process for submitting pull requests to us.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Release files for cv2studio 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cv2studio 1.0.1
File Size Uploaded
cv2studio-1.0.1.tar.gz 6.9 kB Details

Release files / cv2studio-1.0.1.tar.gz

Download URL cv2studio-1.0.1.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7f6e5e6958a20910598a866f9f106675303198a492b893385cc766aea9323459
BLAKE2b-256 checksum
How to use checksums
92ce0b02f8809d1d4d068622d6d1529a1f2f41485cb2f551438147ecc4932277
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.3

Release history Release notifications | RSS feed

1.0.2

1 release file

This release

1.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page