liuxiaolong
2019-06-27 fee90940ff85f4cebabebb411b697e4d37693a70
service/FaceSdkService.go
@@ -29,6 +29,7 @@
   InitService()
   proImg := readImgFile()
   if b, err := proto.Marshal(&proImg);err !=nil{
      fmt.Println("protoImage marshal err")
      return
@@ -70,12 +71,18 @@
      fmt.Println("file not exist")
      return i
   }
   width := int32(picMat.Rows())
   height := int32(picMat.Cols())
   data := picMat.DataPtrUint8()
   fmt.Printf("data.width:%d,height:%d,data.length:%d",width,height,len(data))
   i = protomsg.Image{
      Width:int32(picMat.Rows()),
      Height:int32(picMat.Cols()),
      Timestamp:formatTimeStr,
      Data:[]byte(picMat.DataPtrUint8()),
      Width: width,
      Height: height,
      Timestamp: formatTimeStr,
      Data: data,
      Id: timeUnix,
   }
   fmt.Println("gocv read img completed")
   return i
}