ptoclean - prune improbable control points
ptoclean [options] --output better.pto notgood.pto
Options: -o | --output Filename of pruned project (can be the the same as the input) -n | --amount Distance factor for pruning (default=2) -f | --fast Don't run the optimiser for each image pair (similar to APClean) -v | --verbose Report some statistics -h | --help Outputs help documentation
ptoclean takes a hugin .pto project and removes inconsistent control-points. 'Bad' points are determined by calculating the average error distance and standard deviation (Sigma), then removing any points with an error distance greater than the average by n * sigma. This pruning is performed on each pair of images in turn and then finally on the project as a whole.
Additionally the autooptimiser tool is run on each pair of images separately before each calculation, so there is no need for the project to be 'nearly aligned' beforehand.
NOTE: although optimisation plays a part in the pruning process, the output project is exactly the same as the input except with 'bad' points removed, you probably want to optimise the geometry of this project with hugin or autooptimiser afterward.
This tool is heavily inspired by APClean, a similar tool for PTGui project files by Fulvio Senore. If you want a similar behaviour to APClean without the optimisation steps, use the --fast option.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Bruno Postle - August 2008.