From 7fd3f1e5b661e3457b2adf8b36a70a5211149865 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期二, 14 一月 2020 10:57:31 +0800
Subject: [PATCH] debug

---
 run.go |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/run.go b/run.go
index c31f84a..73abf30 100644
--- a/run.go
+++ b/run.go
@@ -2,12 +2,14 @@
 
 import (
 	"context"
+	"io/ioutil"
 	"unsafe"
 
 	"basic.com/libgowrapper/sdkhelper.git"
 	"basic.com/valib/gogpu.git"
 
 	"basic.com/pubsub/protomsg.git"
+	"basic.com/valib/godraw.git"
 
 	"basic.com/valib/deliver.git"
 	"github.com/gogo/protobuf/proto"
@@ -99,6 +101,9 @@
 			}
 			s.fnLogger("REID~~~~~~Recv Image:", len(i.Data))
 
+			if jpg, err := godraw.ToJpeg(i.Data, int(i.Width), int(i.Height), nil); err == nil {
+				ioutil.WriteFile("./pic.jpg", jpg, 0644)
+			}
 			feat := s.handle.Extract2(unsafe.Pointer(&i.Data[0]), int(i.Width), int(i.Height), 3)
 			if feat == nil {
 				// feat = make([]float32, 1)

--
Gitblit v1.8.0