From 31a9d64a0cc99011263c4516dfaac5c9879a0c45 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期四, 27 六月 2019 16:51:33 +0800
Subject: [PATCH] test

---
 service/FaceSdkService.go |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/service/FaceSdkService.go b/service/FaceSdkService.go
index 93935d1..2737ff4 100644
--- a/service/FaceSdkService.go
+++ b/service/FaceSdkService.go
@@ -27,9 +27,9 @@
 
 func TestPushImgMsg() {
 	InitService()
-	proImg := readImgFile()
 
-	if b, err := proto.Marshal(&proImg);err !=nil{
+	i := readImgFile()
+	if b, err := proto.Marshal(&i);err !=nil{
 		fmt.Println("protoImage marshal err")
 		return
 	} else {
@@ -70,12 +70,18 @@
 		fmt.Println("file not exist")
 		return i
 	}
+	width := int32(picMat.Rows())
+	height := int32(picMat.Cols())
+	data := picMat.DataPtrUint8()
+	fmt.Printf("width:%d,height:%d,data.length:%d,timestamp:%s",width,height,len(data),formatTimeStr)
 	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
 }
 

--
Gitblit v1.8.0