package gosdk
|
|
import (
|
"C"
|
)
|
|
// func (s *Goapi) NewAPIFaceFeature(thread_max, gpu_index int) {
|
// detectMinFaces := 20
|
// detectRollAngle := 60
|
// s.NewAPIFaceDetector(thread_max, gpu_index, detectMinFaces, detectRollAngle)
|
|
// s.NewAPIFaceProperty(thread_max)
|
|
// s.NewAPIFaceExtractor(thread_max, gpu_index)
|
// }
|
|
// func (s *Goapi) FaceFeature(d []byte, w, h, channel int) []interface{} {
|
// cres := s.APIFaceDetect(d, w, h, channel)
|
// if cres == nil {
|
// return nil
|
// }
|
// gores := (*CResult)(unsafe.Pointer(cres))
|
|
// count := gores.Count
|
// // count := getResultCount(det)
|
|
// faces := (*CFacePos)(unsafe.Pointer(gores.Data))
|
// fmt.Printf("det count %d", count)
|
// // result := make([]FaceDetectResult, count)
|
|
// // for i := 0; i < count; i++ {
|
// // ext := s.APIFaceExtract(det, i, d, w, h, channel)
|
// // if ext == nil {
|
// // continue
|
// // }
|
|
// // res := FaceDetectResult{}
|
// // }
|
|
// return nil
|
// }
|