From d9e01c51a525adf4f2393a95f87604e3b6e79ad2 Mon Sep 17 00:00:00 2001 From: sunty <1172534965@qq.com> Date: 星期二, 19 十一月 2019 15:57:19 +0800 Subject: [PATCH] fix all --- service/FaceSdkService.go | 29 +++++++++++++++-------------- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/service/FaceSdkService.go b/service/FaceSdkService.go index 1258f11..366ab3d 100644 --- a/service/FaceSdkService.go +++ b/service/FaceSdkService.go @@ -2,12 +2,11 @@ import ( "basic.com/pubsub/protomsg.git" + "basic.com/valib/logger.git" "github.com/gogo/protobuf/proto" "github.com/pkg/errors" "gocv.io/x/gocv" - "image" "time" - "webserver/extend/logger" ) type FaceSdkService struct { @@ -60,18 +59,20 @@ return nil,err } logger.Debug("picMat.Data.len:", len(picMat.ToBytes())) - newMat := gocv.NewMat() - size := 1024 - if picMat.Rows() > size || picMat.Cols() > size { - fx := float64(size)/float64(picMat.Rows()) - fy := float64(size)/float64(picMat.Cols()) - ff := fx - if fx > fy{ - ff = fy - } - gocv.Resize(picMat,&newMat, image.Pt(0,0), ff, ff, gocv.InterpolationDefault) - picMat = newMat - } + + //鍥剧墖缂╁皬鍒嗚鲸鐜� + //newMat := gocv.NewMat() + //size := 1024 + //if picMat.Rows() > size || picMat.Cols() > size { + // fx := float64(size)/float64(picMat.Rows()) + // fy := float64(size)/float64(picMat.Cols()) + // ff := fx + // if fx > fy{ + // ff = fy + // } + // gocv.Resize(picMat,&newMat, image.Pt(0,0), ff, ff, gocv.InterpolationDefault) + // picMat = newMat + //} defer picMat.Close() -- Gitblit v1.8.0