Skip to content

Commit

Permalink
add String()
Browse files Browse the repository at this point in the history
  • Loading branch information
koyachi committed May 7, 2014
1 parent de797a6 commit dc6d6b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions example/region/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@ func main() {
log.Fatal(err)
}
fmt.Printf("isNude = %v\n", isNude)
fmt.Printf("%s\n", n)
drawImageAndRegions(imagePath, n.SkinRegions)
}
4 changes: 4 additions & 0 deletions nude.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ func (a *Analyzer) analyzeRegions() bool {
return a.result
}

func (a *Analyzer) String() string {
return fmt.Sprintf("#<nude.Analyzer result=%t, message=%s>", a.result, a.message)
}

// A Survey on Pixel-Based Skin Color Detection Techniques
func classifySkin(r, g, b uint32) bool {
rgbClassifier := r > 95 &&
Expand Down

0 comments on commit dc6d6b8

Please sign in to comment.