Last active
June 5, 2016 21:17
-
-
Save ArtBIT/7a1707496b7d4079473f69d8ec97c973 to your computer and use it in GitHub Desktop.
WebCam capture script for HAL9000 and save them to /home/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Check out https://www.raspberrypi.org/documentation/usage/webcams/ for more info | |
| # on using webcams and installing necessary software on your raspberry PI. | |
| IMAGE=/tmp/webcam.jpg | |
| fswebcam \ | |
| -d /dev/video0 \ | |
| -p YUYV \ | |
| -r 1600x1200 \ | |
| --jpeg 85 \ | |
| -F 4 \ | |
| --set Gamma=4 \ | |
| --no-banner \ | |
| $IMAGE | |
| TARGET_DIR="${HOME}/webcam" | |
| if [ ! -d "$TARGET_DIR" ]; then | |
| mkdir -p "$TARGET_DIR" | |
| fi | |
| cp $IMAGE $TARGET_DIR/$(date +\%Y\%m\%d\%H\%M).jpeg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment