bugs: Advantages for incremental library separation by analogy with incremental
[Ale.git] / ui / help.h
blob5ab3d78fd62e6b57302f9299fce6dc2ad281b058
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 Minimum match percentage; -1 disables check. (-1 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-preferred=x Preferred LOD scale is (2^floor(x))/perturb) (-3 is default)\n"
201 "--min-dimension=x Minimum dimension for reduced LOD is x (10 is default)\n"
202 "--mc <x> Statically sample ~x%% of available pixels (30 is default)\n"
203 BETWEEN_SECTIONS
204 "Certainty-weighted alignment:\n"
205 HEADER_SPACE
206 "--cw Weight alignment error by certainty.\n"
207 "--no-cw Don't weight alignment error by certainty. [default]\n"
208 BETWEEN_SECTIONS
209 "Alignment weight maps:\n"
210 HEADER_SPACE
211 "--wm <f> <x> <y> Use weight map image <f> at offset (<x>, <y>)\n"
212 BETWEEN_SECTIONS
213 "Frequency-weighted alignment:\n"
214 HEADER_SPACE
215 "--fl <h> <v> <a> High-pass filters: horizontal <h>, vertical <v>, average <a>.\n"
216 " Values should fall between 0 (pass all) and 1 (pass none).\n"
217 #ifndef USE_FFTW
218 "\n"
219 " NOTE: since this build of ALE does not link with FFTW,\n"
220 " this option is not supported. To use this option,\n"
221 " first re-build with FFTW support.\n"
222 "\n"
223 #endif
224 "--flshow <o> Write high-pass filtered data to file <o>.\n"
225 BETWEEN_SECTIONS
226 "Algorithmic alignment weighting:\n"
227 HEADER_SPACE
228 "--wmx <e> <r> <d> Write reference <r>, definition <d>, execute `<e> <f> <d>`,\n"
229 " read weights <r> back.\n"
230 #ifndef USE_UNIX
231 "\n"
232 " NOTE: since this build was not configured with\n"
233 " support for --wmx, this option is not supported.\n"
234 " To use this option, re-build with support for --wmx.\n"
235 #endif
236 BETWEEN_SECTIONS
237 "Perturbation Type [experimental]:\n"
238 HEADER_SPACE
239 "--perturb-output Apply perturbations in output image coordinates. [default]\n"
240 "--perturb-source Apply perturbations in source image coordinates.\n"
241 BETWEEN_SECTIONS
242 "Global searching:\n"
243 HEADER_SPACE
244 "--gs <type> Set global search to <type>, one of:\n"
245 " local Local alignment only\n"
246 " inner Alignment reference image inner region\n"
247 " outer Alignment reference image outer region\n"
248 " all Union of inner and outer\n"
249 " central inner if below threshold or better; else, outer.\n"
250 " defaults 'all' if default, 'local' otherwise. [default]\n"
251 " points Align by control points. Ignores gs-mo.\n"
252 "--gs-mo <x> Set <x> pixel min. overlap for global search. (67%% default)\n"
253 " ('x%%' uses a fraction of the total pixel count.)\n"
254 BETWEEN_SECTIONS
255 "Multi-alignment:\n"
256 HEADER_SPACE
257 "--multi <type> Set multi-alignment <type>, one of:\n"
258 " none Single alignment only\n"
259 " local Best local element\n"
260 " fill Best local element followed by filling [default]\n"
261 " llocal Least-size local element\n"
262 " global Best element\n"
263 "--track-none Do not track. [default]\n"
264 "--track-primary Track a primary object.\n"
265 "--track-point x y Track an object about point (x, y).\n"
266 "--md <x> Set element minimum dimension x. (100 is default)\n"
267 "--ma-cert <x> Exposure registration certainty bound. (0.01 is default)\n"
268 "\n"
272 void rendering() {
273 banner("Rendering");
274 fprintf(help_stream,
275 BETWEEN_SECTIONS
276 "Mimicking ALE 0.6.0 merging and drizzling (see --hl for details):\n"
277 HEADER_SPACE
278 " --dchain triangle:2 approximates merging.\n"
279 " --dchain fine:box:1 approximates drizzling.\n"
280 BETWEEN_SECTIONS
281 "Image extents:\n"
282 HEADER_SPACE
283 "--extend Increase image extents to accommodate all pixel data.\n"
284 "--no-extend Don't increase extents; crop to original frame. [default]\n"
285 BETWEEN_SECTIONS
286 "Tunable parameters:\n"
287 HEADER_SPACE
288 "--scale=x Scale images by the factor x, where x > 0. (1 is default)\n"
289 "--threshold=x Min. match threshold; a perfect match is 100. (0 is default)\n"
290 BETWEEN_SECTIONS
291 "Irani-Peleg iterative solver:\n"
292 HEADER_SPACE
293 #define FIXED16 4
294 #if ALE_COLORS == FIXED16
295 "--ips <i> Run <i> iterations. (0 is default)\n"
296 #else
297 "--ips <i> Run <i> iterations. (1 is default)\n"
298 #endif
299 #undef FIXED16
300 "--ip-mean Use the mean correction [default]\n"
301 "--ip-median Use the median correction\n"
302 "--ip-wl <x> Use weight limit <x>\n"
303 "--ip-nowl Use no weight limit [default]\n"
304 #if 0
305 BETWEEN_SECTIONS
306 "Unsharp Mask (was 'High-frequency Enhancement'):\n"
307 HEADER_SPACE
308 "--usm <m> Apply an unsharp mask with multiplier <m>.\n"
309 " (See also --device, --nlpsf, and --lpsf.)\n"
310 #endif
311 BETWEEN_SECTIONS
312 "Bayer pattern:\n"
313 HEADER_SPACE
314 "--bayer <b> Set the Bayer pattern to <b>, one of:\n"
315 " (clockwise from top left pixel)\n"
316 " rgbg Red-green-blue-green\n"
317 " gbgr Green-blue-green-red\n"
318 " grgb Green-red-green-blue\n"
319 " bgrg Blue-green-red-green\n"
320 " none RGB-RGB-RGB-RGB\n"
321 " Default is none or device-specific.\n"
322 BETWEEN_SECTIONS
323 "Color adjustment:\n"
324 HEADER_SPACE
325 "--exp-mult=c,r,b Adjust all channels by <c>, red by <r>, and blue by <b>.\n"
326 "\n"
329 void filtering() {
330 banner("Filtering");
331 fprintf(help_stream,
332 BETWEEN_SECTIONS
333 "Point-spread functions (used with --ips; see --hr):\n"
334 HEADER_SPACE
335 "--lpsf <p> Set linear colorspace point-spread function to <p>\n"
336 "--nlpsf <p> Set non-linear colorspace point-spread function to <p>\n"
337 " Available point-spread functions:\n"
338 " box=<diameter>\n"
339 " circle=<diameter>\n"
340 " gauss=<diameter of one std. deviation>\n"
341 " stdin\n"
342 " stdin_vg\n"
343 " <p>+<p> (summation)\n"
344 " <p>^<p> (convolution)\n"
345 " <n>*<p> (multiplication by a scalar <n>)\n"
346 " Default lpsf is either 'box=1.0' or device-specific.\n"
347 " Default nlpsf is either disabled or device-specific.\n"
348 BETWEEN_SECTIONS
349 "Rendering chains:\n"
350 HEADER_SPACE
351 "--wt <w> Set weight threshold for defined pixels (default is 0.0001).\n"
352 "--dchain <g> Use chain <g> to render the default output.\n"
353 "--ochain <g> <o> Use chain <g> to render output file <o>.\n"
354 "--achain <g> Use chain <g> to render the alignment reference image.\n"
355 "--afilter <s> Use SSF <s> to interpolate points in alignment.\n"
356 "--3d-chain <g> Use chain <g> by default to render 3d output.\n"
357 " Example chains:\n"
358 " triangle:2 ALE 0.6.0 merging (roughly)\n"
359 " fine:box:1 Drizzling (roughly)\n"
360 " fine:sinc*lanc:8 High-frequency preservation\n"
361 " last:nex:sinc*lanc:8 Useful for video stabilization\n"
362 " fine:box:1,triangle:2 Multi-resolution rendering\n"
363 " fine:sinc*lanc:8,sinc*lanc:8 Multi-resolution rendering\n"
364 " auto:box:1,fine:box:1,box:1 Range-resolution rendering.\n"
365 " More precisely, chains <g> are one of:\n"
366 " <g1>,<g2> Chain <g1> where defined; <g2> elsewhere.\n"
367 " <i> Use rendering invariant <i>.\n"
368 " Rendering invariants <i> are:\n"
369 " avg:<e> Avg. (mean) value using SSFE <e>.\n"
370 " avgf:<x>:<e> Avg. first up to weight <x> using SSFE <e>.\n"
371 " first:<e> First defined value using SSFE <e>.\n"
372 " last:<e> Last defined value using SSFE <e>.\n"
373 " max:<e> Maximum defined value using SSFE <e>.\n"
374 " min:<e> Minimum defined value using SSFE <e>.\n"
375 " median:<e> Median value using SSFE <e>.\n"
376 " <e> Same as avg:<e>.\n"
377 " Scaled sampling filters with exclusion (SSFE) <e> are:\n"
378 " ex:<s> Use SSF <s>; honor exclusion regions.\n"
379 " nex:<s> Use SSF <s>; don't honor exclusion regions.\n"
380 " <s> Same as ex:<s>\n"
381 " Scaled sampling filters (SSF) <s> are:\n"
382 " auto:<f> filter <f> from chain suffix resolutions.\n"
383 " fine:<f> filter <f> at output image resolution.\n"
384 " coarse:<f> filter <f> at resolution MIN(in, out).\n"
385 " <f> Same as coarse:<f>.\n"
386 " Sampling filters <f> are:\n"
387 " sinc Sinc filter. (very large diameter)\n"
388 " lanc:<x> Lanczos, diameter <x>.\n"
389 " triangle:<x> Triangle, diameter <x>.\n"
390 " box:<x> Box, diameter <x>.\n"
391 " gauss:<x> Gaussian, standard deviation <x>.\n"
392 " zero Zero function.\n"
393 " <f>*<f> Pointwise multiplication (windowing).\n"
394 " Defaults:\n"
395 " dchain auto:triangle:2,fine:box:1,triangle:2\n"
396 " 3d-chain fine:triangle:2,fine:gauss:0.75,triangle:2\n"
397 " achain triangle:2\n"
398 " afilter internal (approximates triangle:2)\n"
399 "\n"
402 void device() {
403 banner("Device");
404 fprintf(help_stream,
405 BETWEEN_SECTIONS
406 "Device (may set PSF, Bayer pattern, exposure, and view angle):\n"
407 HEADER_SPACE
408 "--device <d> Set the capture device to <d>.\n"
409 " Available devices (* expect linear inputs):\n"
410 " canon_300d *\n"
411 " canon_300d+50mm_1.4 *\n"
412 " canon_300d+50mm_1.4@1.4 *\n"
413 " canon_300d+50mm_1.8 *\n"
414 " canon_300d+85mm_1.8 *\n"
415 " nikon_d50 *\n"
416 " ov7620 *\n"
417 " xvp610_320x240\n"
418 " xvp610_640x480\n"
419 "\n"
422 void exclusion() {
423 banner("Exclusion");
424 fprintf(help_stream,
425 BETWEEN_SECTIONS
426 "Rendering-coordinate exclusion regions:\n"
427 HEADER_SPACE
428 "--ex <args> Exclude a specified volume.\n"
429 " <args> are space-delimited horizontal,\n"
430 " vertical, and frame limits:\n"
431 " <xmin> <xmax> <ymin> <ymax> <fmin> <fmax>\n"
432 " using unscaled rendering spatial coordinates.\n"
433 "--crop <args> Exclude the spatial complement of an area over a\n"
434 " specified set of frames. <args> are:\n"
435 " <xmin> <xmax> <ymin> <ymax> <fmin> <fmax>\n"
436 " using unscaled rendering spatial coordinates.\n"
437 BETWEEN_SECTIONS
438 "Frame-coordinate exclusion regions:\n"
439 HEADER_SPACE
440 "--fex <args> Exclude a specified volume.\n"
441 " <args> are space-delimited horizontal,\n"
442 " vertical, and frame limits:\n"
443 " <xmin> <xmax> <ymin> <ymax> <fmin> <fmax>\n"
444 " using unscaled frame spatial coordinates.\n"
445 "--fcrop <args> Exclude the spatial complement of an area over a\n"
446 " specified set of frames. <args> are:\n"
447 " <xmin> <xmax> <ymin> <ymax> <fmin> <fmax>\n"
448 " using unscaled frame spatial coordinates.\n"
449 "\n"
452 void exposure() {
453 banner("Exposure");
454 fprintf(help_stream,
455 BETWEEN_SECTIONS
456 "Certainty-weighted rendering:\n"
457 HEADER_SPACE
458 "--cx <x> Render with certainty exponent <x>. (default is 1)\n"
459 "--no-cx Render with uniform certainty.\n"
460 BETWEEN_SECTIONS
461 "Exposure registration:\n"
462 HEADER_SPACE
463 "--exp-register Register exposure between frames. [default]\n"
464 "--exp-noregister Assume uniform exposure across all frames.\n"
465 "--exp-meta-only Use only meta-data for registering exposure.\n"
466 BETWEEN_SECTIONS
467 "Range extension:\n"
468 HEADER_SPACE
469 "--exp-extend Extend to include all calculated values.\n"
470 "--exp-noextend Restrict to the original frame's range. [default]\n"
471 BETWEEN_SECTIONS
472 "Exposure value meta-data:\n"
473 HEADER_SPACE
474 "--ev <x> Set ISO 100 equivalent EV <x>. (default is 0)\n"
475 "--black <x> Set black level <x> as a fraction of saturation. (default 0)\n"
476 "\n"
479 void tdf() {
480 banner("Transformation data files");
481 fprintf(help_stream,
482 BETWEEN_SECTIONS
483 "Version 2 syntax overview:\n"
484 HEADER_SPACE
485 "{version string}\n"
486 "{supplemental frame 1 transformation}\n"
487 "{supplemental frame 2 transformation}\n"
488 "...\n"
489 BETWEEN_SECTIONS
490 "Version 3 syntax overview:\n"
491 HEADER_SPACE
492 "{version string}\n"
493 "{original frame transformation}\n"
494 "{supplemental frame 1 transformation}\n"
495 "{supplemental frame 2 transformation}\n"
496 "...\n"
497 BETWEEN_SECTIONS
498 "Version string:\n"
499 HEADER_SPACE
500 "V <x> Transformation data file version <x>.\n"
501 BETWEEN_SECTIONS
502 "Transformation overview:\n"
503 HEADER_SPACE
504 "{barrel/pincushion distortion command (optional; version 3 only)}\n"
505 "{projective, euclidean, or default command}\n"
506 BETWEEN_SECTIONS
507 "Barrel/pincushion distortion (version 3 only):\n"
508 HEADER_SPACE
509 "B <n> <coeff2> <coeff3> ... <coeff(n+1)>\n"
510 BETWEEN_SECTIONS
511 "Projective command:\n"
512 HEADER_SPACE
513 "P <xmax> <ymax> <tlx> <tly> <blx> <bly> <brx> <bry> <trx> <try>\n"
514 BETWEEN_SECTIONS
515 "Euclidean command:\n"
516 HEADER_SPACE
517 "E <xmax> <ymax> <xoffset> <yoffset> <angle>\n"
518 "\n"
519 BETWEEN_SECTIONS
520 "Comments:\n"
521 HEADER_SPACE
522 "# Lines beginning with '#' are comments.\n"
523 BETWEEN_SECTIONS
524 "Example:\n"
525 HEADER_SPACE
526 "# Version 3 transformation data file.\n"
527 "V 3\n"
528 "# Original frame, with barrel/pincushion distortion correction\n"
529 "B 3 0.1 0 -0.1\n"
530 "D\n"
531 "# Supplemental frame 1: shift a 640x480 image right by 100 pixels\n"
532 "E 640 480 100 0 0\n"
533 "\n"
536 void visp() {
537 banner("Video stream processing");
538 fprintf(help_stream,
539 BETWEEN_SECTIONS
540 "Video stream processing [Experimental]:\n"
541 HEADER_SPACE
542 "--visp <args> Process a video sequence.\n"
543 " <args> are:\n"
544 " <chain> <stabilization-type> <prefix> <suffix>\n"
545 " <chain> is a rendering chain. (see --hl)\n"
546 " <stabilization-type> is one of:\n"
547 " ma:<x> Moving average over 2*<x> + 1 frames\n"
548 " sf:<x> Stabilize to single frame number <x>\n"
549 " identity Same as ma:0\n"
550 " <prefix> is an output file prefix\n"
551 " <suffix> is an output file suffix\n"
552 "--visp-scale=<x> Use scale <x> for VISP output. (default is 1.0)\n"
553 "--exshow For single-invariant chains, show --ex regions dimmed.\n"
554 "\n");
556 void interface() {
557 banner("User Interface");
558 fprintf(help_stream,
559 BETWEEN_SECTIONS
560 "User Interfaces:\n"
561 HEADER_SPACE
562 "--ui=<type> Set user interface to <type>, one of:\n"
563 " tty TTY interface\n"
564 " log Logging interface\n"
565 " quiet Suppress output\n"
566 " stream Stream interface\n"
567 #ifndef USE_IOCTL
568 "\n"
569 " NOTE: since ALE was compiled without terminal size check,\n"
570 " --ui=tty will behave identically to --ui=stream.\n"
571 " For additional output, recompile with terminal size check.\n"
572 #endif
573 "\n");
575 void cp() {
576 banner("Control Points");
577 fprintf(help_stream,
578 BETWEEN_SECTIONS
579 "Control point files:\n"
580 HEADER_SPACE
581 "--cpf-load=<f> Load control point data from file <f>\n"
582 "\n");
584 void d3() {
585 banner("3D Modeling [Experimental]");
586 fprintf(help_stream,
587 BETWEEN_SECTIONS
588 "Rendering:\n"
589 HEADER_SPACE
590 "--3dv <n> <o> Render, to file <o>, colors as viewed from frame <n>.\n"
591 "--3dd <n> <o> Render, to file <o>, depths as viewed from frame <n>.\n"
592 "--3dvp <args> <o> Render, to file <o>, colors viewed with projective <args>.\n"
593 "--3ddp <args> <o> Render, to file <o>, depths viewed with projective <args>.\n"
594 " <args> are W H V x y z P Y R:\n"
595 " W image width.\n"
596 " H image height.\n"
597 " V camera view angle.\n"
598 " x translation x component.\n"
599 " y translation y component.\n"
600 " z translation z component.\n"
601 " P rotation around x-axis.\n"
602 " Y rotation around y-axis.\n"
603 " R rotation around z-axis.\n"
604 "--occ-norm Normalize output with accumulated occupancy. [default]\n"
605 "--occ-nonorm Don't normalize output with accumulated occupancy.\n"
606 "--et <x> Set encounter threshold <x> for defined pixels.[default is 0]\n"
607 "--3dpx <args> Exclude a specified spatial volume following full-scene\n"
608 " reconstruction. <args> are:\n"
609 " <xmin> <xmax> <ymin> <ymax> <zmin> <zmax>\n"
610 "--3d-filter Use filtering for 3D color output. [default]\n"
611 "--3d-nofilter Don't use filtering for 3D color output.\n"
612 "--3d-dmr <x> Set radius for filtering median depth to <x> [default 0]\n"
613 "--3d-fmr <x> Set radius for filtering median diff to <x> [default 0]\n"
614 "--focus <ft> <op> Create focus region with type <ft> and options <op>:\n"
615 " Focus type:\n"
616 " d <d> focus at distance <d>\n"
617 " p <x> <y> focus at point (x, y)\n"
618 " Space-separated options may include zero or more of:\n"
619 " ci=<ci> camera index [default 0]\n"
620 " fr=<fr> focal range [default 0]\n"
621 " ht=<ht> horizontal tilt gradient [default 0]\n"
622 " vt=<vt> vertical tilt gradient [default 0]\n"
623 " ap=<ap> aperture diameter [default 3]\n"
624 " sc=<sc> sample count [default 3]\n"
625 " sx=<sx> start x coordinate [default -Inf]\n"
626 " ex=<ex> end x coordinate [default Inf]\n"
627 " sy=<sy> start y coordinate [default -Inf]\n"
628 " ey=<ey> end y coordinate [default Inf]\n"
629 " sd=<sd> start depth [default 0]\n"
630 " ed=<ed> end depth [default Inf]\n"
631 " sr=<sr> view sample randomization:\n"
632 " aperture per aperture [default]\n"
633 " pixel per pixel\n"
634 " fs=<fs> focal statistic, one of:\n"
635 " mean mean of views [default]\n"
636 " median median of views\n"
637 "\n"
638 BETWEEN_SECTIONS
639 "Camera parameters:\n"
640 HEADER_SPACE
641 "--view-angle <x> Set the initial diagonal view angle to <x> degrees.\n"
642 " (Default is 43.7 degrees or device-specific.)\n"
643 "--cpp-upper=<x> Set upper bound <x> for camera parameter perturbation,\n"
644 " in pixels or degrees [default is 32]\n"
645 "--cpp-lower=<x> Set lower bound <x> for camera parameter perturbation,\n"
646 " in pixels or degrees [default is 0.125]\n"
647 "--cpp-err-mean Use RMS error to determine camera parameters. [default]\n"
648 "--cpp-err-median Use median error to determine camera parameters. \n"
649 "--va-upper=<x> View-angle perturbation upper bound in degrees [default 32]\n"
650 "--st <x> Set stereo threshold to <x> pixels. [default is 4]\n"
651 "--vp-adjust Adjust the view point [default]\n"
652 "--vp-noadjust Do not adjust the view point\n"
653 "--vo-adjust Adjust the view orientation [default]\n"
654 "--vo-noadjust Do not adjust the view orientation\n"
655 BETWEEN_SECTIONS
656 "Transformation file operations:\n"
657 HEADER_SPACE
658 "--3d-trans-load=x Load initial transformation settings from file x\n"
659 "--3d-trans-save=x Save final transformation data in file x\n"
660 BETWEEN_SECTIONS
661 "Model rules:\n"
662 HEADER_SPACE
663 "--di-upper <x> Decimate primary input resolution by at most 2^x [default 0]\n"
664 "--di-lower <x> Decimate input resolutions by at least 2^x [default is 0]\n"
665 "--do-try <x> Decimate output resolution by 2^x if possible [default is 0]\n"
666 "--oc Clip scene to output regions.\n"
667 "--no-oc Do not clip scene to output regions. [default]\n"
668 "--fc <x> Set front-clip to <x> (0 < x < 1) [default is 0]\n"
669 "--rc <x> Set rear-clip to <x> (1 < x < inf) [default is inf]\n"
670 "--fx <x> Set falloff exponent to <x> [default is 1]\n"
671 "--tcem <x> Set third-camera error multiplier to <x> [default is 0]\n"
672 "--oui <x> Set occupancy update iterations to <x> [default is 10]\n"
673 "--pa <x> Set pairwise ambiguity to <x> [default is 3]\n"
674 "--pc <type> Set the type of pairwise comparisons:\n"
675 " auto Determine comparisons automatically. [default]\n"
676 " all Perform all comparisons.\n"
677 "\n");
679 void scope() {
680 banner("Argument scope [experimental]");
681 fprintf(help_stream,
682 BETWEEN_SECTIONS
683 "List of arguments admitting scoping:\n"
684 HEADER_SPACE
685 "--gs (see --ha for more details)\n"
686 "--gs-mo (see --ha for more details)\n"
687 "--threads (see --hp for more details)\n"
688 "--per-cpu (see --hp for more details)\n"
689 "--perturb-upper (see --ha for more details)\n"
690 "--ev (see --hx for more details)\n"
691 "--black (see --hx for more details)\n"
692 BETWEEN_SECTIONS
693 "Implicit file scope (implementation may be buggy):\n"
694 HEADER_SPACE
695 "arg1 file1 arg2 <arg2> applies only to files later than <file1>.\n"
696 " Example:\n"
697 "\n"
698 " --ev 10 file1 --ev 20 file2\n"
699 "\n"
700 " (file1 has EV 10; file2 has EV 20.)\n"
701 "\n"
702 BETWEEN_SECTIONS
703 "Hidden scope (implementation may be buggy):\n"
704 HEADER_SPACE
705 "[ args ] Hide the effects of <args> options within [ ... ] scope\n"
706 " Example:\n"
707 "\n"
708 " file1 [ --ev 20 file2 ] file3\n"
709 "\n"
710 " (The EV argument is limited to file2.)\n"
711 "\n"
712 BETWEEN_SECTIONS
713 "Exposed scope (implementation may be buggy):\n"
714 HEADER_SPACE
715 "[ arg1 < arg2 > ] Expose the effects of <arg2> outside of [ ... ] scope\n"
716 BETWEEN_SECTIONS
717 "Fully-exposed scope (implementation may be buggy):\n"
718 HEADER_SPACE
719 "{ arg1 } Same as [ < arg1 > ].\n"
720 "\n");
722 void process() {
723 banner("Process details");
724 fprintf(help_stream,
725 BETWEEN_SECTIONS
726 "Memory:\n"
727 HEADER_SPACE
728 "--resident <x> Max resident megapixels per array; 0 is unlimited (0 default)\n"
729 BETWEEN_SECTIONS
730 "Profiling:\n"
731 HEADER_SPACE
732 "--profile Output performance data\n"
733 BETWEEN_SECTIONS
734 "Thread count:\n"
735 "\n"
736 " If the CPU count cannot be determined, the default thread count\n"
737 " is 4. Otherwise, the default is one thread per CPU.\n"
738 "\n"
739 HEADER_SPACE
740 "--threads <n> Use <n> threads.\n"
741 #ifndef USE_PTHREAD
742 "\n"
743 " NOTE: since this build of ALE does not link with a\n"
744 " threading library, this option is not supported.\n"
745 " To use this option, first rebuild with support\n"
746 " for threads.\n"
747 "\n"
748 #endif
749 "--per-cpu <n> Use <n> threads for each detected CPU.\n"
750 #ifndef USE_PTHREAD
751 "\n"
752 " NOTE: since this build of ALE does not link with a\n"
753 " threading library, this option is not supported.\n"
754 " To use this option, first rebuild with support\n"
755 " for threads.\n"
756 "\n"
757 #endif
758 BETWEEN_SECTIONS
759 "Acceleration:\n"
760 "--accel <type> Use acceleration <type>, one of:\n"
761 " gpu Graphics processor acceleration.\n"
762 " cpu CPU acceleration.\n"
763 " accel Special-purpose accelerator.\n"
764 " auto Select automatically [default]\n"
765 "\n");
767 void undocumented() {
768 banner("Undocumented");
769 fprintf(help_stream,
770 BETWEEN_SECTIONS
771 "Point-spread functions:\n"
772 HEADER_SPACE
773 "--psf-match <args> Can be used to evaluate PSFs. [details are undocumented]\n"
774 " <args> are:\n"
775 " <mr> <mg> <mb> <ar> <ag> <ab>\n"
776 " where:\n"
777 " r[calibrated] = r[input] * <mr> + <ar>\n"
778 BETWEEN_SECTIONS
779 "Projective transformation calculator:\n"
780 HEADER_SPACE
781 "--ptcalc\n"
782 BETWEEN_SECTIONS
783 "Traverse subspaces for 3D candidate selection:\n"
784 HEADER_SPACE
785 "--subspace-traverse\n"
786 "\n"
791 #undef BETWEEN_SECTIONS
792 #undef HEADER_SPACE