🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

opencv-stream

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencv-stream

Wrapper over opencv for video processing and API development

0.1.1
PyPI
Maintainers
1

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


Keywords

python

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts