Data::TestImage::DB::USC::SIPI - provides access to the USC SIPI test image database
version 0.007
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.
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.
IMAGE_DB_VOLUME()
Returns a hash containing information about each of the volumes in the image database.
installed_volumes()
Returns an arrayref of strings indicating which volumes are installed.
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($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.
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
PERL_DATA_TESTIMAGE_INSTALL
USC::SIPI=<volume>,<volume>,<volume>,...
where <volume> is one of the volume names as listed in "DESCRIPTION".
<volume
A shortcut for installing all volumes in the database is to use :all as the volume name, that is, set the environment variable to
:all
USC::SIPI=:all
and then install the distribution.
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.
USC SIPI database, database catalog
Zakariyya Mughal <zmughal@cpan.org>
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.
To install Data::TestImage, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::TestImage
CPAN shell
perl -MCPAN -e shell install Data::TestImage
For more information on module installation, please visit the detailed CPAN module installation guide.