DCC-Lab / PyHardwareLibrary

A simple application-oriented and device-oriented library with a variety of communication ports for controlling devices (POSIX serial, USB, etc...)
9 stars 3 forks source link

Camera support with OpenCV #55

Closed dccote closed 3 years ago

dccote commented 3 years ago

A simple but functional system that uses OpenCV to support cameras.

    print(OpenCVCamera.availableCameras())
    cam = OpenCVCamera(serialNumber="0") # OpenCV allows only 0,1,2 etc... no way of knowing more apparently
    cam.initializeDevice()
    cam.livePreview()
    # or 
    # frames = cam.captureFrames(n=10)
    cam.shutdownDevice()