diff --git a/Action Detection Tutorial.ipynb b/Action Detection Tutorial.ipynb index f1604195f..109daaf77 100644 --- a/Action Detection Tutorial.ipynb +++ b/Action Detection Tutorial.ipynb @@ -1181,7 +1181,27 @@ "sentence = []\n", "threshold = 0.8\n", "\n", + "# Set the webcam window to custom size to fit more words, in this case (1280, 720)\n", "cap = cv2.VideoCapture(0)\n", + "def make_1080p():\n", + " cap.set(3, 1920)\n", + " cap.set(4, 1080)\n", + "\n", + "def make_720p():\n", + " cap.set(3, 1280)\n", + " cap.set(4, 720)\n", + "\n", + "def make_480p():\n", + " cap.set(3, 640)\n", + " cap.set(4, 480)\n", + "\n", + "def change_res(width, height):\n", + " cap.set(3, width)\n", + " cap.set(4, height)\n", + "\n", + "make_720p()\n", + "change_res(1280, 720)\n", + "\n", "# Set mediapipe model \n", "with mp_holistic.Holistic(min_detection_confidence=0.5, min_tracking_confidence=0.5) as holistic:\n", " while cap.isOpened():\n",