From 78578898784e04000490af1939b112dae0ac1d13 Mon Sep 17 00:00:00 2001 From: Joao Gaspar <61797706+jgaspar10@users.noreply.github.com> Date: Tue, 7 Nov 2023 18:48:08 +0000 Subject: [PATCH 1/2] Update Action Detection Tutorial.ipynb To resize the webcam window to a custom size that you want. In this case it is 1280, 720. --- Action Detection Tutorial.ipynb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Action Detection Tutorial.ipynb b/Action Detection Tutorial.ipynb index f1604195f..cb65d1f00 100644 --- a/Action Detection Tutorial.ipynb +++ b/Action Detection Tutorial.ipynb @@ -1182,6 +1182,25 @@ "threshold = 0.8\n", "\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", From e726555e6b483446b0021f1ff8901ad024bf7f8f Mon Sep 17 00:00:00 2001 From: Joao Gaspar <61797706+jgaspar10@users.noreply.github.com> Date: Tue, 7 Nov 2023 18:52:11 +0000 Subject: [PATCH 2/2] Update Action Detection Tutorial.ipynb Added comments to the changes made --- Action Detection Tutorial.ipynb | 1 + 1 file changed, 1 insertion(+) diff --git a/Action Detection Tutorial.ipynb b/Action Detection Tutorial.ipynb index cb65d1f00..109daaf77 100644 --- a/Action Detection Tutorial.ipynb +++ b/Action Detection Tutorial.ipynb @@ -1181,6 +1181,7 @@ "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",