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
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
opencv_stream-0.1.1.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for opencv_stream-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6f795806b98919be7bfe47506c55050b417a2fb6565f88551ba1f22933a230a |
|
MD5 | dff2d12b45d6ac2f1b60e27ae5ffc114 |
|
BLAKE2b-256 | ac0df571de46944c2d45865d52ab465d558f68262d260a585886177b54d1905b |