Skip to content

Commit

Permalink
Corrected the center of the gaussian function for the 'coloriness' fu…
Browse files Browse the repository at this point in the history
…nction

git-svn-id: svn://localhost:81/cpan/perl5-imager-skindetector@122 d5a6ac26-b448-f74c-955c-92d14582c9b2
  • Loading branch information
cosimo committed Oct 14, 2008
1 parent 9feb55c commit 5f35821
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Imager/SkinDetector.pm
Expand Up @@ -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;

Expand Down

0 comments on commit 5f35821

Please sign in to comment.