Webcam Tips

From IARC 207 Wiki
Revision as of 12:18, 20 March 2012 by 137.229.92.243 (talk)
Jump to navigation Jump to search

Here's an easy script to pull images from an Axis Q6032-E pan-tilt-zoom web cam.

#!/bin/bash
## Pan Range:  -180 to +180
## Tilt Range: -20 to +200
## Zoom Range: 1 - 9999
wget --no-check-certificate -O /dev/null https://guruplug:PUlse23@axis-00408cb14f01.iarc.uaf.edu/axis-cgi/com/ptz.cgi?pan=-100&tilt=10&zoom=1 
sleep 5
wget --no-check-certificate -r -O /home/bob/working_files/barrow/webcam1/images/view1.jpg https://axis.iarc.uaf.edu/jpg/image.jpg
wget --no-check-certificate -O /dev/null https://axis.iarc.uaf.edu/axis-cgi/com/ptz.cgi?pan=-120&tilt=10&zoom=01 
sleep 5
wget --no-check-certificate -r -O /home/bob/working_files/barrow/webcam1/images/view2.jpg https://guruplug:PUlse23@axis-00408cb14f01.iarc.uaf.edu/jpg/image.jpg
wget --no-check-certificate -O /dev/null https://axis.iarc.uaf.edu/axis-cgi/com/ptz.cgi?pan=100&tilt=10&zoom=35 
sleep 5
wget --no-check-certificate -r -O /home/bob/working_files/barrow/webcam1/images/view3.jpg https://axis.iarc.uaf.edu/jpg/image.jpg

To view these images on the remote server you're running the script from, presuming imagemagick is installed:
First:

ssh -Y to the server

Second:

$ display view1.jpg