Update to 2.0.0 tree from current Fremantle build
[opencv] / debian / opencv-createsamples.1
1 .TH "OPENCV\-CREATESAMPLES" "1" "May 2008" "OpenCV" "User Commands"
2
3
4 .SH NAME
5 opencv-createsamples \- create training and testing samples
6
7
8 .SH SYNOPSIS
9 .B opencv\-createsamples [options]
10
11
12 .SH DESCRIPTION
13 .PP
14 .B opencv\-createsamples
15 creates positive samples from a single object image or a collection of
16 positive images.
17 .PP
18 The scheme of test samples creation is similar to training samples creation
19 since each test sample is a background image into which a randomly
20 distorted and randomly scaled instance of the object picture is pasted at a
21 random position.
22
23
24 .SH OPTIONS
25 .PP
26 .B opencv\-createsamples
27 supports the following options:
28
29 .PP
30 .TP
31 .BI "\-info " collection_file_name
32 A database of positive source images. Use it together with
33 .B \-img
34 to create test samples instead.
35
36 .TP
37 .BI "\-img " image_file_name
38 A positive source image. Use it together with
39 .B \-info
40 to create test samples instead.
41
42 .TP
43 .BI "\-vec " vec_file_name
44 The output file name containing the generated positive samples for training.
45
46 .TP
47 .BI "\-bg " background_file_name
48 The background description file (the negative sample set). It contains a list
49 of images into which randomly distorted versions of the object are pasted for
50 positive sample generation.
51
52 .TP
53 .BI "\-num " number_of_samples
54 The number of positive samples to generate/train. The default is
55 .IR 1000 .
56
57 .TP
58 .BI "\-bgcolor " background_color
59 The background color (currently grayscale images are assumed); the background
60 color denotes the transparent color. The default is
61 .IR 0 .
62 .\" TODO: What does 0 mean? How are colors expressed with integers?
63
64 .TP
65 .BI "\-bgthresh " background_color_threshold
66 The amount of color tolerance 
67 The background color threshold. Pixels whose colors are in range \[+-]
68 .I background_color_threshold
69 are considered as transparent.
70
71 .TP
72 .B \-inv
73 Invert the colors.
74 .TP
75 .B \-randinv
76 Invert the colors randomly.
77
78 .TP
79 .BI "\-maxidev " max_intensity_deviation
80 The desired maximum intensity deviation of foreground samples pixels. The
81 default is
82 .IR 40 .
83
84 .TP
85 .BI "\-maxxangle " max_x_rotation_angle
86 The maximum rotation angle in x-direction in radians. The default is
87 .IR 1.1 .
88
89 .TP
90 .BI "\-maxyangle " max_y_rotation_angle
91 The maximum rotation angle in y-direction in radians. The default is 
92 .IR 1.1 .
93
94 .TP
95 .BI "\-maxzangle " max_z_rotation_angle
96 The maximum rotation angle in z-direction in radians. The default is 
97 .IR 0.5 .
98
99 .TP
100 .BI "\-show [" scale_factor "]"
101 Show each created sample during the creation process. Optionally a scaling
102 factor can be defined. The default is
103 .IR 4.0 .
104 .IP
105 If <\fBESC\fR> is pressed, the creation process will continue without showing
106 the samples. This can be useful for debugging purposes.
107
108 .TP
109 .BI "\-h " sample_height
110 For the creation of training samples, it is the resulting sample height.
111 The default is
112 .IR 24 .
113 .IP
114 In case of creating test samples, it is the minimal height of placed object 
115 picture.
116
117 .TP
118 .BI "\-w " sample_width
119 For the creation of training samples, it is the resulting sample width.
120 The default is
121 .IR 24 .
122 .IP
123 In case of creating test samples, it is the minimal width of placed object
124 picture.
125
126 .PP
127 The same information is shown, if
128 .B opencv\-createsamples
129 is called without any arguments/options.
130
131
132 .SH EXAMPLES
133 .PP
134 To create training samples from one image applying distortions and show the
135 results:
136 .IP
137 .B opencv\-createsamples -img source.png -num 10 -bg negatives.dat -vec samples_out.vec -show
138 .PP
139 To create training samples of size 40x40 from some images without applying
140 distortions:
141 .IP
142 .B opencv\-creasamples -info source.dat -vec samples_out.vec -w 40 -h 40
143
144
145 .SH SEE ALSO
146 .PP
147 .BR opencv\-haartraing (1),
148 .BR opencv\-performance (1)
149 .PP
150 More information and examples can be found in the OpenCV documentation.
151
152
153 .SH AUTHORS
154 .PP
155 This manual page was written by \fBDaniel Leidert\fR <\&daniel.leidert@wgdd.de\&>
156 for the Debian project (but may be used by others).