ShiqiYu / libfacedetection

An open source library for face detection in images. The face detection speed can reach 1000FPS.
Other
12.27k stars 3.05k forks source link

Go bindings #113

Closed chai2010 closed 4 years ago

chai2010 commented 5 years ago
package main

import (
    "github.com/chai2010/libfacedetection-go"
)

func main() {
    m := GetImage("./libfacedetection/images/keliamoniz2.jpg")
    rgb, w, h := libfacedetection.NewRGBImageFrom(m)

    faces := libfacedetection.DetectFaceRGB(rgb, w, h, w*3)
    fmt.Printf("%#v\n", faces)
}

// output:
// []libfacedetection.Face{
//     libfacedetection.Face{X:183, Y:137, W:150, H:150, Neighbors:94, Angle:0}
// }

ShiqiYu commented 4 years ago

Cool, thank you!