Created
November 9, 2020 03:15
-
-
Save juliussin/c441284e282c3a70d8415751132213b8 to your computer and use it in GitHub Desktop.
Rescale frame OpenCV
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
import cv2 | |
import numpy as np | |
def rescale_frame(frame, percent=75): | |
width = int(frame.shape[1] * percent / 100) | |
height = int(frame.shape[0] * percent / 100) | |
dim = (width, height) | |
return cv2.resize(frame, dim, interpolation=cv2.INTER_AREA) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment