From 2d088b5b0d0ce67216d5d03ae73453bd9f944fc6 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期四, 27 六月 2019 17:48:56 +0800
Subject: [PATCH] test

---
 service/FaceSdkService.go |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/service/FaceSdkService.go b/service/FaceSdkService.go
index 3036afc..47d43cf 100644
--- a/service/FaceSdkService.go
+++ b/service/FaceSdkService.go
@@ -71,9 +71,13 @@
 		fmt.Println("file not exist")
 		return i
 	}
-	width := int32(picMat.Rows())
-	height := int32(picMat.Cols())
+	height := int32(picMat.Rows())
+	width := int32(picMat.Cols())
 	data := picMat.ToBytes()
+	//wrMat,_ := gocv.NewMatFromBytes(picMat.Rows(),picMat.Cols(),gocv.MatTypeCV8UC3,data)
+	//
+	//gocv.IMWrite("xxx.jpg", wrMat)
+
 	i = protomsg.Image{
 		Width: width,
 		Height: height,
@@ -139,6 +143,17 @@
 				fmt.Println("Len(sdkInfos)=",len(sdkInfos))
 					for _,swt :=range sdkInfos{
 						fmt.Println("sdkName:",swt.SdkName)
+						if swt.Sdktype =="FaceDetect"{
+							fmt.Println("浜鸿劯妫�娴嬬粨鏋�")
+							var rfd protomsg.ResultFaceDetect
+							err := proto.Unmarshal(swt.Sdkdata, &rfd)
+							if err !=nil {
+								fmt.Println("faceDetect result unmarshal err:",err)
+							} else {
+								fmt.Println("FacePos:",rfd.Pos)
+								fmt.Println("ThftResult:",rfd.Result)
+							}
+						}
 						if swt.Sdktype == "FaceExtract"{
 
 							fmt.Println("sdkData.len:",len(swt.Sdkdata))

--
Gitblit v1.8.0