Skip to content

abend/Image-Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NAME
    Image::Classifier - A silhouette-based image classifier.

SYNOPSIS
      use Image::Classifier;
      my $classifier = Image::Classifier->new({training_dir => "/path/to/known/types",
                                               work_dir => "/writable/directory"});
      my ($type, $confidence) = $classifier->classify($candidate_filename);

DESCRIPTION
    Classify an image by silhouette into a category, based on sets of images
    of known categories.

    It requires a training directory with several subdirectories, one for
    each category. The subdirectory name is the category name. It contains
    images whose silhouettes match that category. The candidate image is
    compared to each of the training images by matching corner features on
    the silhouettes.

USAGE
      use Image::Classifier;
      my $classifier = Image::Classifier->new({training_dir => "/path/to/known/types",
                                               work_dir => "/writable/directory"});
      my ($type, $confidence) = $classifier->classify($candidate_filename);

BUGS
    You tell me.

AUTHOR
        Sasha Kovar
        CPAN ID: ABEND
        sasha-cpan@arcocene.org

COPYRIGHT
    This program is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

    The full text of the license can be found in the LICENSE file included
    with this module.

SEE ALSO
    Image::EdgeDetect Image::CornerDetect

  my $classifier = Image::Classifier->new(\%args)
    Create a new classifier, passing in parameters as follows:

      training_dir - Path to a directory containing training images,
          organized by subdirectory.

      work_dir - Path to a writable directory for placing working files.
          Defaults to training_dir.

      force_refresh - If true, ignore cached corner data files and
          regenerate.

      debug_images - Write out images from intermediate stages in the
          classification process to the work_dir.

  ($type, $confidence) = $classifier->classify($candidate_filename);
    Classify the input image, returning the closest match type and
    confidence level.

About

A silhouette-based image classifier.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages