Bruno Postle > Panotools-Script-0.28 > Panotools::Photos

Download:
Panotools-Script-0.28.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

Panotools::Photos - Photo sets

SYNOPSIS ^

Query sets of photos

DESCRIPTION ^

A collection of photos has possibilities, it could be one or more panoramas or a bracketed set. This module provides some methods for describing groups of photos based on available metadata

USAGE ^

Create a new object like so:

  my $photos = new Panotools::Photos;

Alternatively supply some filenames:

  my $photos = new Panotools::Photos ('DSC_0001.JPG', 'DSC_0002.JPG');

Add to or get the list of image filenames:

  $photos->Paths ('DSC_0003.JPG', 'DSC_0004.JPG');
  my @paths = $photos->Paths;

Construct a stub filename from the names of the first and last images in the list.

  my $stub = $photos->Stub;

e.g. DSC_0001.JPG DSC_0002.JPG DSC_0003.JPG -> DSC_0001-DSC_0003

Query to discover if this is a likely bracketed set. i.e. is the total number of photos divisible by the number of different exposures:

  &do_stuff if ($photos->Bracketed);

Query to discover if this is a layered set, i.e. there is a large exposure difference in the set, but it isn't bracketed.

  &do_stuff if ($photos->Layered);

By default the threshold is 4, e.g. exposures varying between 2 and 1/2 seconds indicate layers. Vary this threshold like so:

  &do_stuff if ($photos->Layered (2));

Get a list of exposure times sorted with longest exposure first

  @speeds = @{$photos->Speeds};

Given a set of photos, split it into a one or more sets by looking at the variation of time interval between shots. e.g. typically the interval between shots in a panorama varies by less than 15 seconds. A variation greater than that indicates the start of the next panorama:

  my @sets = $photos->SplitInterval (15);

Sets with an average interval greater than 4x this variation are not considered panoramas at all and discarded.

Get the average time between shots:

  $average = $photos->AverageInterval;
FOV FocalLength Rotation

Get the Angle of View in degrees of the first photo:

  $photos->FOV;

..or any other photo (-1 is last):

  $photos->FOV (123);

Returns undef if the FOV can't be calculated.

Get an EV value for a photo, this will be guessed from partial EXIF data:

  $photos->Eev ($index);
syntax highlighting: