up
zhangmeng
2019-12-19 58a689cabf762c761912b4aa5873a96c2f36310d
gohumantrack/gohumantrack.go
@@ -172,7 +172,7 @@
}
// ProcessImagePointer process
func (h *HumanTracker) ProcessImagePointer(imgs []*ImageHumanTracker, w, h, c int) ([]FgResult, error) {
func (h *HumanTracker) ProcessImagePointer(imgs []*ImageHumanTracker, wid, hei, chn int) ([]FgResult, error) {
   if len(imgs) != h.batchSize {
      return nil, errors.New("input images count doesn't equalize to batchsize")
   }
@@ -181,11 +181,11 @@
      return nil, errors.New("create C images error")
   }
   defer C.free(cImgs)
   fake := make([]byte, wid*hei*chn)
   for k, v := range imgs {
      logo.Infoln("batch~~~~~~", k, " image: ", v)
      if v == nil {
         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))
         C.fill_images(cImgs, C.int(h.batchSize), C.int(k), unsafe.Pointer(&fake[0]), C.int(wid), C.int(hei), C.int(chn))
      } 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))
      }