aboutsummaryrefslogtreecommitdiffstats
path: root/man/webcam.1
blob: 9eb4c52388e7e15e1d8c55eaf5177cef388094ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
.TH webcam 1 "(c) 1998-2000 Gerd Knorr"
.SH NAME
webcam - capture images and upload them to a webserver using ftp
.SH SYNOPSIS
.B webcam [ config file ]
.SH DESCRIPTION
.B webcam
captures images from a video4linux device like bttv, annotates them
and and uploads them to a webserver using ftp in a endless loop.
.SH CONFIGURATION
At startup
.B webcam
reads the configuration from the given config file or ~/.webcamrc if
none is specified in the command line.
.P
The config file has at least two sections.  The "grab" section holds
the capture parameters.  Any other section describes where the image
should be uploaded.  Older versions used "ftp" as name for that
section.  Recently the webcam utility got support for multiple
connections, thus any section name is accepted and you can have more
than one ftp section (you have to use another name for each section
througth, name them by upload servers for example).
.P
Here is an sample config file (the given values are the defaults):
.nf

[grab]
device = /dev/video0
text = "webcam %Y-%m-%d %H:%M:%S"
infofile = filename
fg_red = 255
fg_green = 255
fg_blue = 255
width = 320
height = 240
delay = 3
wait = 0
input = composite1
norm = pal
rotate = 0
top = 0
left = 0
bottom = -1
right = -1
quality = 75
trigger = 0
once = 0

[ftp]
host = www
user = webcam
pass = xxxxxx
dir  = public_html/images
file = webcam.jpeg
tmp  = uploading.jpeg
passive = 1
debug = 0
auto = 0
local = 0
ssh = 0

.fi
The annotation
.B text
is processed with strftime.  Check the strftime(3) or date(1) manpage
to see how you can format the timestamps.  The text can also be read
from a extern file (use
.B infofile
for that).  The default color for the text overlay is white
(RGB=255,255,255). Entries in the range of 0 through 255 for
.B fg_red,
.B fg_green,
and
.B fg_blue
can be used to define a different color.  Likewise
.B bg_red,
.B bg_green,
and
.B bg_blue
can be used to set the background color (which defaults to
transparent).
.P
.B input
is the video source (TV/composite/whatever),
.B norm
the TV norm.
.B delay
is the delay between two images in seconds.
.B wait
is the initial delay before the first image is grabbed (some cameras
need some time for adapting to lightning, thus don't return images with
reasonable quality within the first few seconds ...).
.B quality
is the JPEG quality for the stored images.
.P
.B top, bottom, left,
and 
.B right
in the grab section allow cropping the image after it is grabbed.
They should satisfy 0<=top<bottom<=height and 
0<=left<right<=width.  (0,0 is the top, left corner.)
If
.B rotate
is positive, the output image will be rotated counter-clockwise
90 degrees that number of times (1, 2, or 3).
.P
With
.B trigger
set to a non-zero value webcam will upload the image only if the
content of the image has changed.  It just looks for the maximum
difference between the last uploaded and current image and if it is
greater than the specified value the image will be uploaded.
If 
.B once
is set to 1 webcam will upload a single frame and quit.
.P
.B archive
can be used to create a (local) archive of the webcam images.  Just
specify the filename for the files as argument.  The filename will be
processed with strftime(3), so you can use the place the usual time
format controls into the string to get unique filenames.  Non-existing
directories are created if needed.
.P
If
.B debug
in the ftp section is set to 1 the complete communication between
webcam and the ftp utility is printed to stderr.
.B auto
enables autologin via ~/.netrc (starts the ftp utility without the '-n'
switch, check the ftp(1) man page for more info about the ~/.netrc file).
If
.B local
in the ftp section is non-zero, files will be stored locally (using
the 
.B dir, tmp,
and
.B file
parameters) rather than ftped.
.B ssh
set to non-zero makes webcam use ssh instead of ftp.
.SH CORRECTION OF DISTORTION
contributed by Frederic Helin, the parameters belong into the [grab]
section of the config file too.
.TP
.B distor = 1
If distor param is set to 1, the correction of distortion works. 
.TP
.B distor_k = 700
This is the coefficient of distortion. This algorithm is based on the
paper "Correcting Distortion of Image by Image Registration" of Toru
Tamaki, Tsuyoshi Yamamura and Noboru Ahnishi. More your lens has an
important distortion, more 'distor_k' must be neared of 0. 700 is the
d�fault value. Coefficient k of program is x100 than article.
.TP
.B distor_cx = 192
.TP
.B distor_cy = 144
Coordinates of the lens optical axis: width/2 and height/2 are the
default values. The axis doesn't go through the image center. So, you
can change its coordinates around the center of image to affine
correction.
.TP
.B distor_zoom = 30
Zoom parameter is used to cache the distorted borders of image, if you
don't like this. Default value is 100.
.TP
.B distor_sensorw = 320
.TP
.B distor_sensorh = 240
Dimensions of camera sensor. Default values are for 1/4p sensor. This
parameters used to have the same k coefficient than article.
.SH AUTHOR
Gerd Knorr <kraxel@bytesex.org>
.SH COPYRIGHT
Copyright (C) 1997-2002 Gerd Knorr
.br
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Privacy Policy