Skip to content

Instantly share code, notes, and snippets.

Avatar

ds2018 dscha09

View GitHub Profile
@dscha09
dscha09 / split-video-by-frame.py
Created Aug 20, 2018 — forked from keithweaver/split-video-by-frame.py
Using OpenCV takes a mp4 video and produces a number of images.
View split-video-by-frame.py
'''
Using OpenCV takes a mp4 video and produces a number of images.
Requirements
----
You require OpenCV 3.2 to be installed.
Run
----
Open the main.py and edit the path to the video. Then run:
@allskyee
allskyee / opencv_webcam_multithread.py
Last active Aug 24, 2020
opencv python camera frame grab and display on different threads with safe synchronization
View opencv_webcam_multithread.py
#!/usr/bin/env python
from threading import Thread, Lock
import cv2
class WebcamVideoStream :
def __init__(self, src = 0, width = 320, height = 240) :
self.stream = cv2.VideoCapture(src)
self.stream.set(cv2.cv.CV_CAP_PROP_FRAME_WIDTH, width)
self.stream.set(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT, height)
You can’t perform that action at this time.