Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-074
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-074
2022-074
Commits
6f538380
Commit
6f538380
authored
Mar 04, 2022
by
IT19165226-Arachchige I.D
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial set up of live feed
parent
5f510779
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
110 additions
and
0 deletions
+110
-0
Head Pose Estimation - Live Analysis.ipynb
Head Pose Estimation - Live Analysis.ipynb
+110
-0
No files found.
Head Pose Estimation - Live Analysis.ipynb
0 → 100644
View file @
6f538380
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "90e3f5ea",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: mediapipe in c:\\users\\isuri\\anaconda3\\lib\\site-packages (0.8.9.1)\n",
"Requirement already satisfied: OpenCV-python in c:\\users\\isuri\\anaconda3\\lib\\site-packages (4.5.5.64)\n",
"Requirement already satisfied: protobuf>=3.11.4 in c:\\users\\isuri\\anaconda3\\lib\\site-packages (from mediapipe) (3.20.1)\n",
"Requirement already satisfied: opencv-contrib-python in c:\\users\\isuri\\anaconda3\\lib\\site-packages (from mediapipe) (4.5.5.64)\n",
"Requirement already satisfied: numpy in c:\\users\\isuri\\anaconda3\\lib\\site-packages (from mediapipe) (1.20.3)\n",
"Requirement already satisfied: absl-py in c:\\users\\isuri\\anaconda3\\lib\\site-packages (from mediapipe) (1.0.0)\n",
"Requirement already satisfied: matplotlib in c:\\users\\isuri\\anaconda3\\lib\\site-packages (from mediapipe) (3.4.3)\n",
"Requirement already satisfied: attrs>=19.1.0 in c:\\users\\isuri\\anaconda3\\lib\\site-packages (from mediapipe) (21.2.0)\n",
"Requirement already satisfied: six in c:\\users\\isuri\\anaconda3\\lib\\site-packages (from absl-py->mediapipe) (1.16.0)\n",
"Requirement already satisfied: python-dateutil>=2.7 in c:\\users\\isuri\\anaconda3\\lib\\site-packages (from matplotlib->mediapipe) (2.8.2)\n",
"Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\isuri\\anaconda3\\lib\\site-packages (from matplotlib->mediapipe) (1.3.1)\n",
"Requirement already satisfied: cycler>=0.10 in c:\\users\\isuri\\anaconda3\\lib\\site-packages (from matplotlib->mediapipe) (0.10.0)\n",
"Requirement already satisfied: pyparsing>=2.2.1 in c:\\users\\isuri\\anaconda3\\lib\\site-packages (from matplotlib->mediapipe) (3.0.4)\n",
"Requirement already satisfied: pillow>=6.2.0 in c:\\users\\isuri\\anaconda3\\lib\\site-packages (from matplotlib->mediapipe) (8.4.0)\n"
]
}
],
"source": [
"!pip install mediapipe OpenCV-python "
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "b6068954",
"metadata": {},
"outputs": [],
"source": [
"import cv2\n",
"import mediapipe as mp\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"#from math import cos, sin, pi, floor\n",
"import math\n",
"import pandas as pd \n",
"import cv2\n",
"import os\n",
"import csv\n",
"mp_drawing = mp.solutions.drawing_utils\n",
"mp_pose = mp.solutions.pose"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "76a5d9fc",
"metadata": {},
"outputs": [],
"source": [
"#Video Feed\n",
"\n",
"#setting up video feed device\n",
"#number in VideoCapture = number of device\n",
"cap = cv2.VideoCapture(0) \n",
"while cap.isOpened():\n",
" ret, frame = cap.read() #get current feed from device\n",
" cv2.imshow('Mediapipe Feed', frame) #pop-up to visualize the feed\n",
"\n",
" if cv2.waitKey(10) & 0xFF == ord('q'): #to close the feed\n",
" break\n",
"\n",
"cap.release() #release the webcam\n",
"cv2.destroyAllWindows()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2dd22017",
"metadata": {},
"outputs": [],
"source": [
"#testblock"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment