zhangmeng
2019-12-19 40548939ef77b6971adafc5e2a1db7e571f31139
update
2个文件已修改
7 ■■■■■ 已修改文件
gohumantrack/gohumantrack.go 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
work/sdk/humantrack.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
gohumantrack/gohumantrack.go
@@ -172,7 +172,7 @@
}
// ProcessImagePointer process
func (h *HumanTracker) ProcessImagePointer(imgs []*ImageHumanTracker) ([]FgResult, error) {
func (h *HumanTracker) ProcessImagePointer(imgs []*ImageHumanTracker, w, h, c int) ([]FgResult, error) {
    if len(imgs) != h.batchSize {
        return nil, errors.New("input images count doesn't equalize to batchsize")
    }
@@ -184,7 +184,8 @@
    for k, v := range imgs {
        logo.Infoln("batch~~~~~~", k, " image: ", v)
        if v == nil {
            C.fill_images(cImgs, C.int(h.batchSize), C.int(k), nil, 0, 0, 0)
            fake := make([]byte, w*h*c)
            C.fill_images(cImgs, C.int(h.batchSize), C.int(k), unsafe.Pointer(&fake[0]), C.int(w), C.int(h), C.int(c))
        } else {
            C.fill_images(cImgs, C.int(h.batchSize), C.int(k), unsafe.Pointer(&v.Data[0]), C.int(v.Width), C.int(v.Height), C.int(v.Channel))
        }
work/sdk/humantrack.go
@@ -176,7 +176,7 @@
        }
    }
    res, err := t.tracker.ProcessImagePointer(pimg)
    res, err := t.tracker.ProcessImagePointer(pimg, rw, rh, 3)
    t.recvImageCount = 0
    if err != nil {