[ffc8e0]: utils / matchpoint-complete  Maximize  Restore  History

Download this file

87 lines (59 with data), 2.0 kB


use strict;
use warnings;
use File::Spec::Functions;
use Getopt::Long;
use Pod::Usage;

my $path_output;
my $points = 10;
my $noransac = 0;
my $clean = 0;
my $help = 0;

GetOptions ('o|output=s' => \$path_output,
            'p|points=i' => \$points,
            'n|noransac' => \$noransac,
            'c|clean' => \$clean,
            'h|help' => \$help);

my @paths_input = @ARGV;

my $ransac = 1; $ransac = 0 if $noransac;

pod2usage (-verbose => 2) if $help;
pod2usage (2) unless (defined $path_output and scalar @paths_input > 1);

my @paths_key;

for my $path_input (@paths_input)
    my $path_key = "$path_input.key";
    push @paths_key, $path_key;
    next if (-e $path_key and not $clean);
    system ('matchpoint', $path_input, $path_key);

system ('autopano', '--ransac', $ransac,
    '--maxmatches', $points, $path_output, @paths_key);

for my $path_key (@paths_key)
    unlink $path_key if ($clean);

exit 0;


=head1 NAME

matchpoint-complete - wrapper for matchpoint and autopano


matchpoint-complete [options] --output project.pto image1 image2 [...]

  -o | --output name    Filename of created panorama project
  -p | --points number  Number of generated control points between,
                          each pair, default: 10
  -n | --noransac       No ransac detection, useful for fisheye images
  -c | --clean          Do not reuse keypoints detected in earlier runs,
                          deletes old keypoint files.
  -h | --help           Outputs help documentation.


B<matchpoint-complete> takes a list of image files and creates a hugin
compatible project file containing control points linking the images together.

=head1 LICENSE

This file is licensed under the same terms as matchpoint itself

=head1 SEE ALSO


=head1 AUTHOR

Bruno Postle - April 2008.  Based on autopano-c-complete by Pablo d'Angelo


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks