Video Analysis底层库拆分,sdk的go封装
zhangmeng
2019-11-15 6099b84752369a1d6c325fa3b419a6aa52d4366a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
// }