Permalink
Browse files

Simple wrapper script

git-svn-id: svn://localhost:81/cpan/perl5-imager-skindetector@118 d5a6ac26-b448-f74c-955c-92d14582c9b2
  • Loading branch information...
1 parent 606c02d commit a65919ab89066b9465a5c8fd666c77f70f7a6e68 @cosimo committed Oct 14, 2008
Showing with 27 additions and 0 deletions.
  1. +27 −0 examples/contains_nudity.pl
@@ -0,0 +1,27 @@
+#!/usr/bin/env perl
+#
+# Tries to tell you if the picture could
+# contain nudity. It's a rough attempt.
+# Don't expect miracles.
+#
+# Usage:
+# perl contains_nudity.pl <some_png_picture>
+#
+# Example:
+# perl contains_nudity.pl ferrari.png
+#
+# $Id: is_skinny.pl 117 2008-10-11 12:09:21Z Cosimo $
+
+use strict;
+use Imager::SkinDetector;
+
+my $name = $ARGV[0]
+ or die "Usage: $0 <picture_filename>\n";
+
+my $img = Imager::SkinDetector->new(file => $name)
+ or die "Can't load image '$name'.\n";
+
+my $prob = $img->contains_nudity();
+
+printf "Contains nudity: %3.2f%%\n", ($prob * 100);
+

0 comments on commit a65919a

Please sign in to comment.