doc.go 954 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2011 The Graphics-Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. /*
  5. Package detect implements an object detector cascade.
  6. The technique used is a degenerate tree of Haar-like classifiers, commonly
  7. used for face detection. It is described in
  8. P. Viola, M. Jones.
  9. Rapid Object Detection using a Boosted Cascade of Simple Features, 2001
  10. IEEE Conference on Computer Vision and Pattern Recognition
  11. A Cascade can be constructed manually from a set of Classifiers in stages,
  12. or can be loaded from an XML file in the OpenCV format with
  13. classifier, _, err := detect.ParseOpenCV(r)
  14. The classifier can be used to determine if a full image is detected as an
  15. object using Detect
  16. if classifier.Match(m) {
  17. // m is an image of a face.
  18. }
  19. It is also possible to search an image for occurrences of an object
  20. objs := classifier.Find(m)
  21. */
  22. package detect