d2::align: Cast with lrint() for lod count, as plain (unsigned int) seems to be broke...
[Ale.git] / ui / help.h
blob37c18800493361aef543b1c8d3b26c09f3fac36b
1 // Copyright 2002, 2003, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
2 // <dhilvert@ugcs.caltech.edu>
4 /* This file is part of the Anti-Lamenessing Engine.
6 The Anti-Lamenessing Engine is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 The Anti-Lamenessing Engine is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with the Anti-Lamenessing Engine; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * Help messages
25 #define BETWEEN_SECTIONS "\n"
26 #define HEADER_SPACE ""
28 class help {
29 private:
30 const char *package;
31 const char *version;
32 const char *invocation;
33 FILE *help_stream;
36 * Stars
38 * This function produces a line of stars for banner output.
40 void stars(unsigned int n) {
41 for (unsigned int i = 0; i < n; i++) {
42 fprintf(help_stream, "*");
44 fprintf(help_stream, "\n");
49 * Banner
51 * This function aids in locating the start of help output.
53 void banner(const char *name) {
54 const char *package_banner = " Help Text, version ";
55 const char *section_banner = "Section: ";
57 int plen = strlen(package) + strlen(package_banner) + strlen(version);
58 int slen = strlen(section_banner) + strlen(name);
59 int len = (plen > slen) ? plen : slen;
61 fprintf(help_stream, BETWEEN_SECTIONS);
62 stars(len);
63 fprintf(help_stream, "%s%s%s\n", package, package_banner, version);
64 fprintf(help_stream, "%s%s\n", section_banner, name);
65 stars(len);
68 public:
69 help(const char *package, const char *invocation, const char *version) {
70 this->invocation = invocation;
71 this->package = package;
72 this->version = version;
73 this->help_stream = stdout;
77 * Describe how to use this program
79 void usage() {
80 banner("Usage");
81 fprintf(help_stream,
82 BETWEEN_SECTIONS
83 "Usage: %s [<options>] <original-frame> [<supplemental-frame> ...] <output-file>\n"
84 " or: %s [<help option> ...]\n"
85 " or: %s --version\n"
86 BETWEEN_SECTIONS
87 "Help options:\n"
88 HEADER_SPACE
89 "--hu Usage (this message).\n"
90 "--hf Image files.\n"
91 "--he Exclusion regions.\n"
92 "--ha Alignment (not exposure-related).\n"
93 "--hr Rendering (not exposure-related).\n"
94 "--hx Exposure.\n"
95 "--ht Transformation data files.\n"
96 "--hc Control points.\n"
97 "--hl Filtering (PSFs, rendering chains).\n"
98 "--hd Devices.\n"
99 "--hi User Interfaces.\n"
100 "--hp Process details.\n"
101 "--hs Argument scope (Experimental).\n"
102 "--hv Video stream processing (Experimental).\n"
103 "--h3 3D Modeling (Experimental).\n"
104 "--hz Undocumented options.\n"
105 "--hA Concatenate all help pages.\n"
106 "\n",
107 invocation, invocation, invocation);
110 void defaults() {
111 banner("Defaults");
112 fprintf(help_stream,
113 BETWEEN_SECTIONS
114 "Default settings:\n"
115 HEADER_SPACE
116 "--q* options are no longer recognized.\n"
117 "\n"
121 void file() {
122 banner("File");
123 fprintf(help_stream,
124 BETWEEN_SECTIONS
125 "Cache options:\n"
126 HEADER_SPACE
127 "--cache <size> Cache up to <size> megabytes of image data. (256 is default)\n"
128 BETWEEN_SECTIONS
129 "Bit depth options:\n"
130 HEADER_SPACE
131 "--8bpc Write 8 bit per channel output\n"
132 "--16bpc Write 16 bit per channel output [default]\n"
133 BETWEEN_SECTIONS
134 "Output format options:\n"
135 HEADER_SPACE
136 #ifdef USE_MAGICK
137 "--auto Determine output file type automatically [default]\n"
138 "--raw Write raw PPM output\n"
139 "--plain Write plain PPM output\n"
140 #else
141 "--raw Write raw PPM output [default]\n"
142 "--plain Write plain PPM output\n"
143 #endif
144 BETWEEN_SECTIONS
145 "Incremental output:\n"
146 HEADER_SPACE
147 "--inc Produce rough incremental output.\n"
148 "--no-inc Don't produce any incremental output. [default]\n"
150 BETWEEN_SECTIONS
151 "Undefined values:\n"
152 HEADER_SPACE
153 "--def-nn <R> Use nearest-neighbor defined values within\n"
154 " radius <R>, zero outside. Default radius is 0.\n"
155 "\n"
158 void alignment() {
159 banner("Alignment");
160 fprintf(help_stream,
161 BETWEEN_SECTIONS
162 "Alignment channel options:\n"
163 HEADER_SPACE
164 "--align-all Align images using all color channels\n"
165 "--align-green Align images using the green channel\n"
166 "--align-sum Align images using a sum of channels [default]\n"
167 BETWEEN_SECTIONS
168 "Transformation options:\n"
169 HEADER_SPACE
170 "--translation Only adjust the position of images\n"
171 "--euclidean Adjust the position and orientation of images [default]\n"
172 "--projective Use projective transformations. Best quality, but slow.\n"
173 BETWEEN_SECTIONS
174 "Alignment following:\n"
175 HEADER_SPACE
176 "--follow Frames align closely with their predecessor. [default]\n"
177 "--identity Frames align closely with the original frame.\n"
178 BETWEEN_SECTIONS
179 "Alignment failure:\n"
180 HEADER_SPACE
181 "--fail-optimal Frames beneath threshold are aligned optimally. [default]\n"
182 "--fail-default Frames beneath threshold keep their default alignment.\n"
183 BETWEEN_SECTIONS
184 "Transformation file operations:\n"
185 HEADER_SPACE
186 "--trans-load <x> Load initial transformation settings from file <x>\n"
187 "--trans-save <x> Save final transformation data in file <x>\n"
188 BETWEEN_SECTIONS
189 "Tunable parameters:\n"
190 HEADER_SPACE
191 "--metric=x Set the alignment error metric exponent. (2 is default)\n"
192 "--threshold=x Min. match threshold; a perfect match is 100. (0 is default)\n"
193 "--perturb-upper=x Perturbation upper bound pixels/arclength (14%% is default)\n"
194 " ('x%%' uses a fraction of the smallest image dimension.)\n"
195 "--perturb-lower=x Perturbation lower bound pixels/arclength (.125 is default)\n"
196 " ('x%%' uses a fraction of the smallest image dimension.)\n"
197 "--rot-upper=x Rotation-specific upper bound in degrees (32.0 is default)\n"
198 "--bda-mult=x Barrel distortion adjustment multiplier (2.0 is default)\n"
199 "--bda-rate=x Barrel distortion rate of change maximum (8.0 is default)\n"
200 "--lod-max=x LOD scale factor is max(1, (2^floor(x))/perturb) (1 is def.)\n"
201 BETWEEN_SECTIONS
202 "Certainty-weighted alignment:\n"
203 HEADER_SPACE
204 "--cw Weight alignment error by certainty.\n"
205 "--no-cw Don't weight alignment error by certainty. [default]\n"
206 BETWEEN_SECTIONS
207 "Alignment weight maps:\n"
208 HEADER_SPACE
209 "--wm <f> <x> <y> Use weight map image <f> at offset (<x>, <y>)\n"
210 BETWEEN_SECTIONS
211 "Frequency-weighted alignment:\n"
212 HEADER_SPACE
213 "--fl <h> <v> <a> High-pass filters: horizontal <h>, vertical <v>, average <a>.\n"
214 " Values should fall between 0 (pass all) and 1 (pass none).\n"
215 #ifndef USE_FFTW
216 "\n"
217 " NOTE: since this build of ALE does not link with FFTW,\n"
218 " this option is not supported. To use this option,\n"
219 " first re-build with FFTW support.\n"
220 "\n"
221 #endif
222 "--flshow <o> Write high-pass filtered data to file <o>.\n"
223 BETWEEN_SECTIONS
224 "Algorithmic alignment weighting:\n"
225 HEADER_SPACE
226 "--wmx <e> <r> <d> Write reference <r>, definition <d>, execute `<e> <f> <d>`,\n"
227 " read weights <r> back.\n"
228 #ifndef USE_UNIX
229 "\n"
230 " NOTE: since this build was not configured with\n"
231 " support for --wmx, this option is not supported.\n"
232 " To use this option, re-build with support for --wmx.\n"
233 #endif
234 BETWEEN_SECTIONS
235 "Perturbation Type [experimental]:\n"
236 HEADER_SPACE
237 "--perturb-output Apply perturbations in output image coordinates. [default]\n"
238 "--perturb-source Apply perturbations in source image coordinates.\n"
239 BETWEEN_SECTIONS
240 "Global searching:\n"
241 HEADER_SPACE
242 "--gs <type> Set global search to <type>, one of:\n"
243 " local Local alignment only\n"
244 " inner Alignment reference image inner region\n"
245 " outer Alignment reference image outer region\n"
246 " all Union of inner and outer\n"
247 " central inner if below threshold or better; else, outer.\n"
248 " defaults 'all' if default, 'local' otherwise. [default]\n"
249 " points Align by control points. Ignores gs-mo.\n"
250 "--gs-mo <x> Set <x> pixel min. overlap for global search. (67%% default)\n"
251 " ('x%%' uses a fraction of the total pixel count.)\n"
252 BETWEEN_SECTIONS
253 "Multi-alignment [algorithms are not fully implemented]:\n"
254 HEADER_SPACE
255 "--ma-card <x> Maximum number of multi-alignment elements. (1 is default)\n"
256 "--ma-cont <x> Minimum contiguous area of each MA region. (100 is default)\n"
257 "\n"
261 void rendering() {
262 banner("Rendering");
263 fprintf(help_stream,
264 BETWEEN_SECTIONS
265 "Mimicking ALE 0.6.0 merging and drizzling (see --hl for details):\n"
266 HEADER_SPACE
267 " --dchain triangle:2 approximates merging.\n"
268 " --dchain fine:box:1 approximates drizzling.\n"
269 BETWEEN_SECTIONS
270 "Image extents:\n"
271 HEADER_SPACE
272 "--extend Increase image extents to accommodate all pixel data.\n"
273 "--no-extend Don't increase extents; crop to original frame. [default]\n"
274 BETWEEN_SECTIONS
275 "Tunable parameters:\n"
276 HEADER_SPACE
277 "--scale=x Scale images by the factor x, where x > 0. (1 is default)\n"
278 "--threshold=x Min. match threshold; a perfect match is 100. (0 is default)\n"
279 BETWEEN_SECTIONS
280 "Irani-Peleg iterative solver:\n"
281 HEADER_SPACE
282 "--ips <i> Run <i> iterations. (1 is default)\n"
283 "--ip-mean Use the mean correction [default]\n"
284 "--ip-median Use the median correction\n"
285 "--ip-wl <x> Use weight limit <x>\n"
286 "--ip-nowl Use no weight limit [default]\n"
287 #if 0
288 BETWEEN_SECTIONS
289 "Unsharp Mask (was 'High-frequency Enhancement'):\n"
290 HEADER_SPACE
291 "--usm <m> Apply an unsharp mask with multiplier <m>.\n"
292 " (See also --device, --nlpsf, and --lpsf.)\n"
293 #endif
294 BETWEEN_SECTIONS
295 "Bayer pattern:\n"
296 HEADER_SPACE
297 "--bayer <b> Set the Bayer pattern to <b>, one of:\n"
298 " (clockwise from top left pixel)\n"
299 " rgbg Red-green-blue-green\n"
300 " gbgr Green-blue-green-red\n"
301 " grgb Green-red-green-blue\n"
302 " bgrg Blue-green-red-green\n"
303 " none RGB-RGB-RGB-RGB\n"
304 " Default is none or device-specific.\n"
305 BETWEEN_SECTIONS
306 "Color adjustment:\n"
307 HEADER_SPACE
308 "--exp-mult=c,r,b Adjust all channels by <c>, red by <r>, and blue by <b>.\n"
309 "\n"
312 void filtering() {
313 banner("Filtering");
314 fprintf(help_stream,
315 BETWEEN_SECTIONS
316 "Point-spread functions (used with --ips; see --hr):\n"
317 HEADER_SPACE
318 "--lpsf <p> Set linear colorspace point-spread function to <p>\n"
319 "--nlpsf <p> Set non-linear colorspace point-spread function to <p>\n"
320 " Available point-spread functions:\n"
321 " box=<diameter>\n"
322 " circle=<diameter>\n"
323 " gauss=<diameter of one std. deviation>\n"
324 " stdin\n"
325 " stdin_vg\n"
326 " <p>+<p> (summation)\n"
327 " <p>^<p> (convolution)\n"
328 " <n>*<p> (multiplication by a scalar <n>)\n"
329 " Default lpsf is either 'box=1.0' or device-specific.\n"
330 " Default nlpsf is either disabled or device-specific.\n"
331 BETWEEN_SECTIONS
332 "Rendering chains:\n"
333 HEADER_SPACE
334 "--wt <w> Set weight threshold for defined pixels (default is 0.0001).\n"
335 "--dchain <g> Use chain <g> to render the default output.\n"
336 "--ochain <g> <o> Use chain <g> to render output file <o>.\n"
337 "--achain <g> Use chain <g> to render the alignment reference image.\n"
338 "--afilter <s> Use SSF <s> to interpolate points in alignment.\n"
339 "--3d-chain <g> Use chain <g> by default to render 3d output.\n"
340 " Example chains:\n"
341 " triangle:2 ALE 0.6.0 merging (roughly)\n"
342 " fine:box:1 Drizzling (roughly)\n"
343 " fine:sinc*lanc:8 High-frequency preservation\n"
344 " last:nex:sinc*lanc:8 Useful for video stabilization\n"
345 " fine:box:1,triangle:2 Multi-resolution rendering\n"
346 " fine:sinc*lanc:8,sinc*lanc:8 Multi-resolution rendering\n"
347 " auto:box:1,fine:box:1,box:1 Range-resolution rendering.\n"
348 " More precisely, chains <g> are one of:\n"
349 " <g1>,<g2> Chain <g1> where defined; <g2> elsewhere.\n"
350 " <i> Use rendering invariant <i>.\n"
351 " Rendering invariants <i> are:\n"
352 " avg:<e> Avg. (mean) value using SSFE <e>.\n"
353 " avgf:<x>:<e> Avg. first up to weight <x> using SSFE <e>.\n"
354 " first:<e> First defined value using SSFE <e>.\n"
355 " last:<e> Last defined value using SSFE <e>.\n"
356 " max:<e> Maximum defined value using SSFE <e>.\n"
357 " min:<e> Minimum defined value using SSFE <e>.\n"
358 " median:<e> Median value using SSFE <e>.\n"
359 " <e> Same as avg:<e>.\n"
360 " Scaled sampling filters with exclusion (SSFE) <e> are:\n"
361 " ex:<s> Use SSF <s>; honor exclusion regions.\n"
362 " nex:<s> Use SSF <s>; don't honor exclusion regions.\n"
363 " <s> Same as ex:<s>\n"
364 " Scaled sampling filters (SSF) <s> are:\n"
365 " auto:<f> filter <f> from chain suffix resolutions.\n"
366 " fine:<f> filter <f> at output image resolution.\n"
367 " coarse:<f> filter <f> at resolution MIN(in, out).\n"
368 " <f> Same as coarse:<f>.\n"
369 " Sampling filters <f> are:\n"
370 " sinc Sinc filter. (very large diameter)\n"
371 " lanc:<x> Lanczos, diameter <x>.\n"
372 " triangle:<x> Triangle, diameter <x>.\n"
373 " box:<x> Box, diameter <x>.\n"
374 " gauss:<x> Gaussian, standard deviation <x>.\n"
375 " zero Zero function.\n"
376 " <f>*<f> Pointwise multiplication (windowing).\n"
377 " Defaults:\n"
378 " dchain auto:triangle:2,fine:triangle:2,triangle:2\n"
379 " 3d-chain fine:triangle:2,fine:gauss:0.75,triangle:2\n"
380 " achain triangle:2\n"
381 " afilter internal (approximates triangle:2)\n"
382 "\n"
385 void device() {
386 banner("Device");
387 fprintf(help_stream,
388 BETWEEN_SECTIONS
389 "Device (may set PSF, Bayer pattern, exposure, and view angle):\n"
390 HEADER_SPACE
391 "--device <d> Set the capture device to <d>.\n"
392 " Available devices (* expect linear inputs):\n"
393 " canon_300d *\n"
394 " canon_300d+50mm_1.4 *\n"
395 " canon_300d+50mm_1.4@1.4 *\n"
396 " canon_300d+50mm_1.8 *\n"
397 " canon_300d+85mm_1.8 *\n"
398 " nikon_d50 *\n"
399 " ov7620 *\n"
400 " xvp610_320x240\n"
401 " xvp610_640x480\n"
402 "\n"
405 void exclusion() {
406 banner("Exclusion");
407 fprintf(help_stream,
408 BETWEEN_SECTIONS
409 "Rendering-coordinate exclusion regions:\n"
410 HEADER_SPACE
411 "--ex <args> Exclude a specified volume.\n"
412 " <args> are space-delimited horizontal,\n"
413 " vertical, and frame limits:\n"
414 " <xmin> <xmax> <ymin> <ymax> <fmin> <fmax>\n"
415 " using unscaled rendering spatial coordinates.\n"
416 "--crop <args> Exclude the spatial complement of an area over a\n"
417 " specified set of frames. <args> are:\n"
418 " <xmin> <xmax> <ymin> <ymax> <fmin> <fmax>\n"
419 " using unscaled rendering spatial coordinates.\n"
420 BETWEEN_SECTIONS
421 "Frame-coordinate exclusion regions:\n"
422 HEADER_SPACE
423 "--fex <args> Exclude a specified volume.\n"
424 " <args> are space-delimited horizontal,\n"
425 " vertical, and frame limits:\n"
426 " <xmin> <xmax> <ymin> <ymax> <fmin> <fmax>\n"
427 " using unscaled frame spatial coordinates.\n"
428 "--fcrop <args> Exclude the spatial complement of an area over a\n"
429 " specified set of frames. <args> are:\n"
430 " <xmin> <xmax> <ymin> <ymax> <fmin> <fmax>\n"
431 " using unscaled frame spatial coordinates.\n"
432 "\n"
435 void exposure() {
436 banner("Exposure");
437 fprintf(help_stream,
438 BETWEEN_SECTIONS
439 "Certainty-weighted rendering:\n"
440 HEADER_SPACE
441 "--cx <x> Render with certainty exponent <x>. (default is 1)\n"
442 "--no-cx Render with uniform certainty.\n"
443 BETWEEN_SECTIONS
444 "Exposure registration:\n"
445 HEADER_SPACE
446 "--exp-register Register exposure between frames. [default]\n"
447 "--exp-noregister Assume uniform exposure across all frames.\n"
448 "--exp-meta-only Use only meta-data for registering exposure.\n"
449 BETWEEN_SECTIONS
450 "Range extension:\n"
451 HEADER_SPACE
452 "--exp-extend Extend to include all calculated values.\n"
453 "--exp-noextend Restrict to the original frame's range. [default]\n"
454 BETWEEN_SECTIONS
455 "Exposure value meta-data:\n"
456 HEADER_SPACE
457 "--ev <x> Set ISO 100 equivalent EV <x>. (default is 0)\n"
458 "--black <x> Set black level <x> as a fraction of saturation. (default 0)\n"
459 "\n"
462 void tdf() {
463 banner("Transformation data files");
464 fprintf(help_stream,
465 BETWEEN_SECTIONS
466 "Version 2 syntax overview:\n"
467 HEADER_SPACE
468 "{version string}\n"
469 "{supplemental frame 1 transformation}\n"
470 "{supplemental frame 2 transformation}\n"
471 "...\n"
472 BETWEEN_SECTIONS
473 "Version 3 syntax overview:\n"
474 HEADER_SPACE
475 "{version string}\n"
476 "{original frame transformation}\n"
477 "{supplemental frame 1 transformation}\n"
478 "{supplemental frame 2 transformation}\n"
479 "...\n"
480 BETWEEN_SECTIONS
481 "Version string:\n"
482 HEADER_SPACE
483 "V <x> Transformation data file version <x>.\n"
484 BETWEEN_SECTIONS
485 "Transformation overview:\n"
486 HEADER_SPACE
487 "{barrel/pincushion distortion command (optional; version 3 only)}\n"
488 "{projective, euclidean, or default command}\n"
489 BETWEEN_SECTIONS
490 "Barrel/pincushion distortion (version 3 only):\n"
491 HEADER_SPACE
492 "B <n> <coeff2> <coeff3> ... <coeff(n+1)>\n"
493 BETWEEN_SECTIONS
494 "Projective command:\n"
495 HEADER_SPACE
496 "P <xmax> <ymax> <tlx> <tly> <blx> <bly> <brx> <bry> <trx> <try>\n"
497 BETWEEN_SECTIONS
498 "Euclidean command:\n"
499 HEADER_SPACE
500 "E <xmax> <ymax> <xoffset> <yoffset> <angle>\n"
501 "\n"
502 BETWEEN_SECTIONS
503 "Comments:\n"
504 HEADER_SPACE
505 "# Lines beginning with '#' are comments.\n"
506 BETWEEN_SECTIONS
507 "Example:\n"
508 HEADER_SPACE
509 "# Version 3 transformation data file.\n"
510 "V 3\n"
511 "# Original frame, with barrel/pincushion distortion correction\n"
512 "B 3 0.1 0 -0.1\n"
513 "D\n"
514 "# Supplemental frame 1: shift a 640x480 image right by 100 pixels\n"
515 "E 640 480 100 0 0\n"
516 "\n"
519 void visp() {
520 banner("Video stream processing");
521 fprintf(help_stream,
522 BETWEEN_SECTIONS
523 "Video stream processing [Experimental]:\n"
524 HEADER_SPACE
525 "--visp <args> Process a video sequence.\n"
526 " <args> are:\n"
527 " <chain> <stabilization-type> <prefix> <suffix>\n"
528 " <chain> is a rendering chain. (see --hl)\n"
529 " <stabilization-type> is one of:\n"
530 " ma:<x> Moving average over 2*<x> + 1 frames\n"
531 " sf:<x> Stabilize to single frame number <x>\n"
532 " identity Same as ma:0\n"
533 " <prefix> is an output file prefix\n"
534 " <suffix> is an output file suffix\n"
535 "--visp-scale=<x> Use scale <x> for VISP output. (default is 1.0)\n"
536 "--exshow For single-invariant chains, show --ex regions dimmed.\n"
537 "\n");
539 void interface() {
540 banner("User Interface");
541 fprintf(help_stream,
542 BETWEEN_SECTIONS
543 "User Interfaces:\n"
544 HEADER_SPACE
545 "--ui=<type> Set user interface to <type>, one of:\n"
546 " quiet\n"
547 " stream\n"
548 " tty [default]\n"
549 " log\n"
550 #ifndef USE_IOCTL
551 "\n"
552 " NOTE: since ALE was compiled without terminal size check,\n"
553 " --ui=tty will behave identically to --ui=stream.\n"
554 " For additional output, recompile with terminal size check.\n"
555 #endif
556 "\n");
558 void cp() {
559 banner("Control Points");
560 fprintf(help_stream,
561 BETWEEN_SECTIONS
562 "Control point files:\n"
563 HEADER_SPACE
564 "--cpf-load=<f> Load control point data from file <f>\n"
565 "\n");
567 void d3() {
568 banner("3D Modeling [Experimental]");
569 fprintf(help_stream,
570 BETWEEN_SECTIONS
571 "Rendering:\n"
572 HEADER_SPACE
573 "--3dv <n> <o> Render, to file <o>, colors as viewed from frame <n>.\n"
574 "--3dd <n> <o> Render, to file <o>, depths as viewed from frame <n>.\n"
575 "--3dvp <args> <o> Render, to file <o>, colors viewed with projective <args>.\n"
576 "--3ddp <args> <o> Render, to file <o>, depths viewed with projective <args>.\n"
577 " <args> are W H V x y z P Y R:\n"
578 " W image width.\n"
579 " H image height.\n"
580 " V camera view angle.\n"
581 " x translation x component.\n"
582 " y translation y component.\n"
583 " z translation z component.\n"
584 " P rotation around x-axis.\n"
585 " Y rotation around y-axis.\n"
586 " R rotation around z-axis.\n"
587 "--occ-norm Normalize output with accumulated occupancy. [default]\n"
588 "--occ-nonorm Don't normalize output with accumulated occupancy.\n"
589 "--et <x> Set encounter threshold <x> for defined pixels.[default is 0]\n"
590 "--3dpx <args> Exclude a specified spatial volume following full-scene\n"
591 " reconstruction. <args> are:\n"
592 " <xmin> <xmax> <ymin> <ymax> <zmin> <zmax>\n"
593 "--3d-filter Use filtering for 3D color output. [default]\n"
594 "--3d-nofilter Don't use filtering for 3D color output.\n"
595 "--3d-dmr <x> Set radius for filtering median depth to <x> [default 0]\n"
596 "--3d-fmr <x> Set radius for filtering median diff to <x> [default 0]\n"
597 "--focus <ft> <op> Create focus region with type <ft> and options <op>:\n"
598 " Focus type:\n"
599 " d <d> focus at distance <d>\n"
600 " p <x> <y> focus at point (x, y)\n"
601 " Space-separated options may include zero or more of:\n"
602 " ci=<ci> camera index [default 0]\n"
603 " fr=<fr> focal range [default 0]\n"
604 " ht=<ht> horizontal tilt gradient [default 0]\n"
605 " vt=<vt> vertical tilt gradient [default 0]\n"
606 " ap=<ap> aperture diameter [default 3]\n"
607 " sc=<sc> sample count [default 3]\n"
608 " sx=<sx> start x coordinate [default -Inf]\n"
609 " ex=<ex> end x coordinate [default Inf]\n"
610 " sy=<sy> start y coordinate [default -Inf]\n"
611 " ey=<ey> end y coordinate [default Inf]\n"
612 " sd=<sd> start depth [default 0]\n"
613 " ed=<ed> end depth [default Inf]\n"
614 " sr=<sr> view sample randomization:\n"
615 " aperture per aperture [default]\n"
616 " pixel per pixel\n"
617 " fs=<fs> focal statistic, one of:\n"
618 " mean mean of views [default]\n"
619 " median median of views\n"
620 "\n"
621 BETWEEN_SECTIONS
622 "Camera parameters:\n"
623 HEADER_SPACE
624 "--view-angle <x> Set the initial diagonal view angle to <x> degrees.\n"
625 " (Default is 43.7 degrees or device-specific.)\n"
626 "--cpp-upper=<x> Set upper bound <x> for camera parameter perturbation,\n"
627 " in pixels or degrees [default is 32]\n"
628 "--cpp-lower=<x> Set lower bound <x> for camera parameter perturbation,\n"
629 " in pixels or degrees [default is 0.125]\n"
630 "--cpp-err-mean Use RMS error to determine camera parameters. [default]\n"
631 "--cpp-err-median Use median error to determine camera parameters. \n"
632 "--va-upper=<x> View-angle perturbation upper bound in degrees [default 32]\n"
633 "--st <x> Set stereo threshold to <x> pixels. [default is 4]\n"
634 "--vp-adjust Adjust the view point [default]\n"
635 "--vp-noadjust Do not adjust the view point\n"
636 "--vo-adjust Adjust the view orientation [default]\n"
637 "--vo-noadjust Do not adjust the view orientation\n"
638 BETWEEN_SECTIONS
639 "Transformation file operations:\n"
640 HEADER_SPACE
641 "--3d-trans-load=x Load initial transformation settings from file x\n"
642 "--3d-trans-save=x Save final transformation data in file x\n"
643 BETWEEN_SECTIONS
644 "Model rules:\n"
645 HEADER_SPACE
646 "--di-upper <x> Decimate primary input resolution by at most 2^x [default 0]\n"
647 "--di-lower <x> Decimate input resolutions by at least 2^x [default is 0]\n"
648 "--do-try <x> Decimate output resolution by 2^x if possible [default is 0]\n"
649 "--oc Clip scene to output regions.\n"
650 "--no-oc Do not clip scene to output regions. [default]\n"
651 "--fc <x> Set front-clip to <x> (0 < x < 1) [default is 0]\n"
652 "--rc <x> Set rear-clip to <x> (1 < x < inf) [default is inf]\n"
653 "--fx <x> Set falloff exponent to <x> [default is 1]\n"
654 "--tcem <x> Set third-camera error multiplier to <x> [default is 0]\n"
655 "--oui <x> Set occupancy update iterations to <x> [default is 10]\n"
656 "--pa <x> Set pairwise ambiguity to <x> [default is 3]\n"
657 "--pc <type> Set the type of pairwise comparisons:\n"
658 " auto Determine comparisons automatically. [default]\n"
659 " all Perform all comparisons.\n"
660 "\n");
662 void scope() {
663 banner("Argument scope [experimental]");
664 fprintf(help_stream,
665 BETWEEN_SECTIONS
666 "List of arguments admitting scoping:\n"
667 HEADER_SPACE
668 "--gs (see --ha for more details)\n"
669 "--gs-mo (see --ha for more details)\n"
670 "--threads (see --hp for more details)\n"
671 "--per-cpu (see --hp for more details)\n"
672 "--perturb-upper (see --ha for more details)\n"
673 "--ev (see --hx for more details)\n"
674 "--black (see --hx for more details)\n"
675 BETWEEN_SECTIONS
676 "Implicit file scope (implementation may be buggy):\n"
677 HEADER_SPACE
678 "arg1 file1 arg2 <arg2> applies only to files later than <file1>.\n"
679 " Example:\n"
680 "\n"
681 " --ev 10 file1 --ev 20 file2\n"
682 "\n"
683 " (file1 has EV 10; file2 has EV 20.)\n"
684 "\n"
685 BETWEEN_SECTIONS
686 "Hidden scope (implementation may be buggy):\n"
687 HEADER_SPACE
688 "[ args ] Hide the effects of <args> options within [ ... ] scope\n"
689 " Example:\n"
690 "\n"
691 " file1 [ --ev 20 file2 ] file3\n"
692 "\n"
693 " (The EV argument is limited to file2.)\n"
694 "\n"
695 BETWEEN_SECTIONS
696 "Exposed scope (implementation may be buggy):\n"
697 HEADER_SPACE
698 "[ arg1 < arg2 > ] Expose the effects of <arg2> outside of [ ... ] scope\n"
699 BETWEEN_SECTIONS
700 "Fully-exposed scope (implementation may be buggy):\n"
701 HEADER_SPACE
702 "{ arg1 } Same as [ < arg1 > ].\n"
703 "\n");
705 void process() {
706 banner("Process details");
707 fprintf(help_stream,
708 BETWEEN_SECTIONS
709 "Profiling:\n"
710 HEADER_SPACE
711 "--profile Output performance data\n"
712 BETWEEN_SECTIONS
713 "Thread count:\n"
714 "\n"
715 " If the CPU count cannot be determined, the default thread count\n"
716 " is 4. Otherwise, the default is one thread per CPU.\n"
717 "\n"
718 HEADER_SPACE
719 "--threads <n> Use <n> threads.\n"
720 #ifndef USE_PTHREAD
721 "\n"
722 " NOTE: since this build of ALE does not link with a\n"
723 " threading library, this option is not supported.\n"
724 " To use this option, first rebuild with support\n"
725 " for threads.\n"
726 "\n"
727 #endif
728 "--per-cpu <n> Use <n> threads for each detected CPU.\n"
729 #ifndef USE_PTHREAD
730 "\n"
731 " NOTE: since this build of ALE does not link with a\n"
732 " threading library, this option is not supported.\n"
733 " To use this option, first rebuild with support\n"
734 " for threads.\n"
735 "\n"
736 #endif
737 "\n");
739 void undocumented() {
740 banner("Undocumented");
741 fprintf(help_stream,
742 BETWEEN_SECTIONS
743 "Point-spread functions:\n"
744 HEADER_SPACE
745 "--psf-match <args> Can be used to evaluate PSFs. [details are undocumented]\n"
746 " <args> are:\n"
747 " <mr> <mg> <mb> <ar> <ag> <ab>\n"
748 " where:\n"
749 " r[calibrated] = r[input] * <mr> + <ar>\n"
750 BETWEEN_SECTIONS
751 "Projective transformation calculator:\n"
752 HEADER_SPACE
753 "--ptcalc\n"
754 BETWEEN_SECTIONS
755 "Traverse subspaces for 3D candidate selection:\n"
756 HEADER_SPACE
757 "--subspace-traverse\n"
758 "\n"
763 #undef BETWEEN_SECTIONS
764 #undef HEADER_SPACE