1Panotools::Photos(3) User Contributed Perl Documentation Panotools::Photos(3)
2
3
4
6 Panotools::Photos - Photo sets
7
9 Query sets of photos
10
12 A collection of photos has possibilities, it could be one or more
13 panoramas or a bracketed set. This module provides some methods for
14 describing groups of photos based on available metadata
15
17 Create a new object like so:
18
19 my $photos = new Panotools::Photos;
20
21 Alternatively supply some filenames:
22
23 my $photos = new Panotools::Photos ('DSC_0001.JPG', 'DSC_0002.JPG');
24
25 Paths
26 Add to or get the list of image filenames:
27
28 $photos->Paths ('DSC_0003.JPG', 'DSC_0004.JPG');
29 my @paths = $photos->Paths;
30
31 Stub
32 Construct a stub filename from the names of the first and last
33 images in the list.
34
35 my $stub = $photos->Stub;
36
37 e.g. DSC_0001.JPG DSC_0002.JPG DSC_0003.JPG -> DSC_0001-DSC_0003
38
39 Bracketed
40 Query to discover if this is a likely bracketed set. i.e. is the
41 total number of photos divisible by the number of different
42 exposures:
43
44 &do_stuff if ($photos->Bracketed);
45
46 Layered
47 Query to discover if this is a layered set, i.e. there is a large
48 exposure difference in the set, but it isn't bracketed.
49
50 &do_stuff if ($photos->Layered);
51
52 By default the threshold is 4, e.g. exposures varying between 2 and
53 1/2 seconds indicate layers. Vary this threshold like so:
54
55 &do_stuff if ($photos->Layered (2));
56
57 Speeds
58 Get a list of exposure times sorted with longest exposure first
59
60 @speeds = @{$photos->Speeds};
61
62 SplitInterval
63 Given a set of photos, split it into a one or more sets by looking
64 at the variation of time interval between shots. e.g. typically
65 the interval between shots in a panorama varies by less than 15
66 seconds. A variation greater than that indicates the start of the
67 next panorama:
68
69 my @sets = $photos->SplitInterval (15);
70
71 Sets with an average interval greater than 4x this variation are
72 not considered panoramas at all and discarded.
73
74 AverageInterval
75 Get the average time between shots:
76
77 $average = $photos->AverageInterval;
78
79 FOV FocalLength Rotation
80 Get the Angle of View in degrees of the first photo:
81
82 $photos->FOV;
83
84 ..or any other photo (-1 is last):
85
86 $photos->FOV (123);
87
88 Returns undef if the FOV can't be calculated.
89
90 Eev Get an EV value for a photo, this will be guessed from partial EXIF
91 data:
92
93 $photos->Eev ($index);
94
95 AverageRGB
96 Find the mean average colour balance for all photos:
97
98 ($red, $green, $blue) = $photos->AverageRGB;
99
100
101
102perl v5.32.1 2021-01-27 Panotools::Photos(3)