NAME

Data::TestImage::DB::USC::SIPI - provides access to the USC SIPI test image database

VERSION

version 0.004

SYNOPSIS

use Data::TestImage::DB::USC::SIPI;

# two different ways of referring to the same image
my @mandrill_images = map {
    Data::TestImage::DB::USC::SIPI->get_image($_)
} qw(4.2.03 mandrill);
say join " & ", map { $_->basename } @mandrill_images;
# 4.2.03.tiff & 4.2.03.tiff

Produces the mandrill image.

Mandrill image

INHERITANCE

Data::TestImage::DB

DESCRIPTION

This module installs and provides metadata for the USC SIPI image database. This database is made up of 4 volumes: textures, aerials, miscellaneous, and sequences. By default, only the miscellaneous volume is installed.

METHODS

IMAGE_DB_VOLUME

IMAGE_DB_VOLUME()

Returns a hash containing information about each of the volumes in the image database.

installed_volumes

installed_volumes()

Returns an arrayref of strings indicating which volumes are installed.

get_metadata

get_metadata()

Returns a hashref of metadata about all images in the database (even those not installed). This data includes the size, a textual description, and whether the image is 24 bpp color or 8 bpp monochrome.

get_image

get_image($image_name)

Overrides "get_image" in Data::TestImage::DB to provide the default lookup by filename first and then if the image is not found, search the metadata text.

INSTALLATION

As discussed in Data::TestImage, installing further volumes can be done by setting the PERL_DATA_TESTIMAGE_INSTALL environment variable. The syntax for installing each volume is

USC::SIPI=<volume>,<volume>,<volume>,...

where <volume> is one of the volume names as listed in "DESCRIPTION".

A shortcut for installing all volumes in the database is to use :all as the volume name, that is, set the environment variable to

USC::SIPI=:all

and then install the distribution.

COPYRIGHT INFORMATION

The images in this database are not licensed for commercial use. For more information, see the database website.

The textual descriptions returned by "IMAGE_DB_VOLUME" and "get_metadata" are taken from the database catalog.

SEE ALSO

USC SIPI database, database catalog

AUTHOR

Zakariyya Mughal <zmughal@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Zakariyya Mughal.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.