From 5f35821822ce31e8abc6d1c5b19bb8218038d996 Mon Sep 17 00:00:00 2001 From: Cosimo Streppone Date: Tue, 14 Oct 2008 20:45:34 +0000 Subject: [PATCH] Corrected the center of the gaussian function for the 'coloriness' function git-svn-id: svn://localhost:81/cpan/perl5-imager-skindetector@122 d5a6ac26-b448-f74c-955c-92d14582c9b2 --- lib/Imager/SkinDetector.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Imager/SkinDetector.pm b/lib/Imager/SkinDetector.pm index 749d677..8387523 100644 --- a/lib/Imager/SkinDetector.pm +++ b/lib/Imager/SkinDetector.pm @@ -37,7 +37,7 @@ sub contains_nudity { my $coloriness = $img->has_different_colors() || 0.0001; # Apply gaussian function to $coloriness - $coloriness = exp(-(($coloriness - 3)**2 / 30)); + $coloriness = exp(-(($coloriness - 0.2)**2 / 20)); my $nudity_factor = $skinniness * $coloriness;