There are 4 types of usable webcam available in the IPAB teaching lab:
There is also a light silver ball not labeled with IPAB that has been left on the supplies shelf. The current driver is not working for these.
All cameras can capture images with the same commands:
mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0
allows you to preview images on the screen before capture
(NOTE: v-4-el-2, not v-4-one-2). This is useful for
adjusting the camera and target positions until the the full scene is in view.
You can also adjust the focus by twisting the ring around the lens.
When you are satisfied with the position, kill the capture with
CTRL-C.
When you want to capture an image for processing, use:
mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -frames 5 -vo jpeg
This will capture 5 frames into your current directory. The captured frames will be in the
files 0000000X.jpg, where X=1/2/3/4/5.
Check these (using e.g. xv or gimp) and use one of the good images.
If you are doing automatic capture from within a program, then you probably want to use one
of images 4 or 5 as sometimes image 1-3 are corrupted.
> I just wanted to see if I had the right idea about the convolution > formulae on slide 9 > > for the 'mid lecture problem' the mask is [1 2 1] which have to be > indexed -1 0 1, to allow the formulae to sum from -N to N . > > So for example > > Output(5) = weight(-1)*input(5- -1) + weight(0)*input(5-0) +weight(1)*input(5- 1) > > = weight(-1)*input(6) + weight(0)*input(5) + weight(1)*input(4) > > So if the mask was some non symmetric distribution it would be important to > reverse it before placing under the Input when calculating the output > i.e > [20 20 20 20 10 10 10 10] convoled with [0 1 2] is > > [60 60 60 50 30 30] not [60 60 40 30 30 30] Yes - this is correct. There is a related autocorrelation function that does not reverse the mask order, but that this is a different matter.
rbf@inf.ed.ac.uk
, room IF 1.26, ext 513441.
Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail: school-office@inf.ed.ac.uk Please contact our webadmin with any comments or corrections. Logging and Cookies Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh |