Project 2d - Image & video capture
- James Canova
- Sep 18, 2021
- 1 min read
Project start: 15 November 2021
Project finish: 18 December 2021
Last updated: 23 March 2022
Objective: familiarisation with Python and OpenCV
Note: jupyter Notebook files mentioned here can be donwloaded from my GitHub repository: https://github.com/James-Canova/MyMachineLearning
Electrical connections:
ensure the following are plugged-in/connected:
a) monitor
b) keyboard
c) mouse
d) WiFi module
e) power
check camera connection:
cd $HOME
ls /dev/video0
you should see this:
/dev/video0
I use VLC to play video files:
sudo apt-get install vlc
Image capture test:
An image can be captured usIng a function built-in to the Jetson Nano software:
cd $HOME
nvgstcapture-1.0 -m 1
This will produce a *.jpg file in your user home directory
project_2d_image_capture_IMX219.ipynb programatically captures an image.
activate virtual environment:
cd ~/Public/Projects
source myPython36VEnv/bin/activate
In virtual environment run Jupyter Notebook and then open .ipyb file
jupyter-notebook
Once the program starts, push 'q' to capture an image and exit.
This will produce a *.jpg file in the directory in which you ran Jupyter Notebook.
Video capture test:
A video can be captured using a function built-in to the Jetson Nano software:
cd $HOME
nvgstcapture-1.0 -m 2
1 # start video recording
0 # stop video recording
q #to quit
This will produce a *.mp4 file in your user home directory
project_2d_video_capture_IMX219.ipynb programatically captures a video.
In virtual environment run Jupyter Notebook and then open .ipyb file
jupyter-notebook
Once the program starts video recording will start. Push 'q' to end the video capture and exit.
This will produce a *.avi file in the directory in which you ran Jupyter Notebook.
If you have any problems or need clarification please contact me: jscanova@gmail.com
Comentarios