lib/Panotools/Script/Line/Mode.pm

filter: Statementstmt 100% 39 / 39 Branchbran 50.0% 13 / 26 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 2 totaltotal 80.0% 60 / 75 CC 14 SCAR 25.9
CC
14
Cov
80%
Report
19.4
BEGIN
1.0
BEGIN
1.0
CRAP 13.3
« lib/Panotools/Photos.pm ↑ Summary lib/Panotools/Script/Line/Image.pm »
1 package Panotools::Script::Line::Mode;
2  
3 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 11 ▶use Panotools::Script::Line;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 11 ▶use vars qw /@ISA/;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 11 @ISA = qw /Panotools::Script::Line/;
9  
10 =head1 NAME
11  
12 Panotools::Script::Line::Mode - Panotools stitching mode
13  
14 =head1 SYNOPSIS
15  
16 Optional stitching modes are described by an 'm' line
17  
18 =head1 DESCRIPTION
19  
20 m i2
21  
22 g2.5 Set gamma value for internal computations (default 1.0)
23 See <http://www.fh-furtwangen.de/~dersch/gamma/gamma.html>
24 This is especially useful in conjunction with the vignetting correction
25 by division
26  
27 i2 Set interpolator, See <http://www.fh-furtwangen.de/~dersch/interpolator/interpolator.html>
28 one of:
29 0 - poly3 (default)
30 1 - spline16,
31 2 - spline36,
32 3 - sinc256,
33 4 - spline64,
34 5 - bilinear,
35 6 - nearest neighbor,
36 7 - sinc1024
37  
38 m2 Huber Sigma
39  
40 p0.001 Photometric Huber Sigma
41  
42 s1 Photometric Symmetric Error
43  
44 =cut
45  
46 sub _defaults
47 17 ▶{
Subroutine _defaults: called CC=1 SCAR=0.0
48 17 my $self = shift;
49 17 $self->{g} = 1.0;
50 17 $self->{i} = 0;
51 17 $self->{m} = 2;
52 17 $self->{p} = 0.00784314;
53 }
54  
55 26 ▶sub _valid { return '^([fgimps])(.*)' }
Subroutine _valid: called CC=1 SCAR=0.0
56  
57 sub Identifier
58 12 ▶{
Subroutine Identifier: called CC=1 SCAR=0.0
Pod undocumented
59 12 my $self = shift;
60 12 return "m";
61 }
62  
63 sub Report
64 1 ▶{
Subroutine Report: called CC=14 SCAR=29.7
Pod undocumented
65 1 my $self = shift;
66 1 my @report;
67  
68 1 my $interpolator = 'UNKNOWN';
69 1 ▶ $interpolator = 'poly3' if $self->{i} == 0;
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"i"} == 0 0 1 1
70 1 ▶ $interpolator = 'spline16' if $self->{i} == 1;
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"i"} == 1 0 1 1
71 1 ▶ $interpolator = 'spline36' if $self->{i} == 2;
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"i"} == 2 0 1 1
72 1 ▶ $interpolator = 'sinc256' if $self->{i} == 3;
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"i"} == 3 0 1 1
73 1 ▶ $interpolator = 'spline64' if $self->{i} == 4;
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"i"} == 4 1 0 1
74 1 ▶ $interpolator = 'bilinear' if $self->{i} == 5;
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"i"} == 5 0 1 1
75 1 ▶ $interpolator = 'nearest neighbor' if $self->{i} == 6;
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"i"} == 6 0 1 1
76 1 ▶ $interpolator = 'sinc1024' if $self->{i} == 7;
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"i"} == 7 0 1 1
77  
78 1 ▶ push @report, ['Gamma', $self->{g}] if defined $self->{g};
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->{"g"} 1 0 1
79 1 ▶ push @report, ['Interpolator', $interpolator] if defined $self->{i};
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->{"i"} 1 0 1
80 1 ▶ push @report, ['Huber Sigma', $self->{m}] if defined $self->{m};
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->{"m"} 1 0 1
81 1 ▶ push @report, ['Photometric Huber Sigma', $self->{p}] if defined $self->{p};
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->{"p"} 1 0 1
82 1 ▶ push @report, ['Photometric Symmetric Error', $self->{s}] if defined $self->{s};
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->{"s"} 0 1 1
83 1 [@report];
84 }
85  
86 11 1;
« lib/Panotools/Photos.pm ↑ Summary lib/Panotools/Script/Line/Image.pm »