Skip to main content

Simple tools to help with opencv experimenting.

Project description

Simple OpenCV tools

Simple tools I use to make my life easier when working with OpenCV.

Not very pythonic:

cap = cv.VideoCapture(0)
if not cap.isOpened():
    exit()
while True:
    ret, frame = cap.read()
    if not ret:
        break
    cv.imshow('frame', gray)
    if cv.waitKey(1) == ord('q'):
        break
cap.release()
cv.destroyAllWindows()

I like this better:

with VideoPreview() as vid:
    for frame in Capture(0):
        vid.show(frame)

Maybe not everything is explicit, however it's a lot easier to read.

Likely I'm gonna add more stuff in the future.

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-tools-0.1.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

opencv_tools-0.1-py3-none-any.whl (8.8 kB view hashes)

Uploaded Python 3

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