Download a YouTube video and extract frames for analysis.
-
Install python 3.x
-
Verify CLT installed
brew config
and check for CLT not 'N/A' if so,xcode-select --install
-
Install the latest version of OpenCV. Note, this will take a awhile as homebrew downaloads and compiles the source and all supportiung libraries
brew install opencv
-
create a project dir
mkdir ~/projects/xxx
-
Setup a python virtual env (3.6.4)
-
install python libs
pip install numpy
pip install matplotlib
-
Activate python env and verify setup
>source ./env/bin/activate (env)>python Python 3.7.2 (default, Jan 13 2019, 12:50:01) [Clang 10.0.0 (clang-1000.11.45.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import cv2 >>> import numpy as np >>> import matplotlib as mplot >>>
-
Download a subject file for analysis (note, may be 100MB+)
(env)>python download_video <youtube_url>
-
Extract frames for review
(env)>python extract_frames.py <path>
-
Examine images in ./data folder