Last active
October 21, 2018 17:47
-
-
Save rsnk96/69dae8b5dac689ce3e7fc19afa83b905 to your computer and use it in GitHub Desktop.
Outline of a normal video processing code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def process_video(): | |
cap = cv2.VideoCapture("input_file.mp4") # Define the input video handler | |
out = cv2.VideoWriter("output_file.avi", ...) # Define the output video handler | |
while (cap.isOpened()): # Loop through the video frames | |
ret, frame = cap.read() # Read a frame | |
# ... DO SOME STUFF TO frame... # # Perform some operation | |
out.write(frame) # Define the input video handler | |
process_video() # Call the actual function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment