Skip to main content

Wrapper over opencv for video processing and API development

Project description

opencv_stream

Under construction

Developed by Olivier

Examples of How To Use

Creating A Stream

from opencv_stream import VideoStreamer, ModelOutput, Model
import time
import numpy as np
import cv2

class TempModelOutput(ModelOutput):

    def to_dict(self) -> dict:
        return {"success": True}
    
    def draw(self, image: np.ndarray) -> None:
        w, h, _ = image.shape
        cv2.putText(image, "Hello from opencv_stream", (w//2, h//2), fontFace=1, fontScale=1, color=(255, 0, 0))

class TempModel(Model):

    def predict(self, image: np.ndarray) -> ModelOutput:
        return TempModelOutput()

stream = VideoStreamer.from_webcam()


stream.start_with_model(TempModel(), )

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

opencv_stream-0.1.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

opencv_stream-0.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file opencv_stream-0.1.1.tar.gz.

File metadata

  • Download URL: opencv_stream-0.1.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for opencv_stream-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bc07e5d2ba4476146dbbea60b9ed336fdd24dbd215525c3d9803fc324b44f067
MD5 93205802cc06575b27e9ed2dc20cc9c5
BLAKE2b-256 b20c9b1be356d642b377701ee47ae686ed10e272807e74f0b99661ecfa404673

See more details on using hashes here.

File details

Details for the file opencv_stream-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for opencv_stream-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6f795806b98919be7bfe47506c55050b417a2fb6565f88551ba1f22933a230a
MD5 dff2d12b45d6ac2f1b60e27ae5ffc114
BLAKE2b-256 ac0df571de46944c2d45865d52ab465d558f68262d260a585886177b54d1905b

See more details on using hashes here.

Supported by

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