In the below example I have resized the frames from the camera to 320 * 480(weight * height)

import cv2
cap = cv2.VideoCapture(0)

while cap.isOpened():
    ret, frame = cap.read()
    image_resized2 = cv2.resize(frame, (480,320))