From 6a413e1d7d485f506e81c669bc692868c29cefb9 Mon Sep 17 00:00:00 2001
From: sunty <1172534965@qq.com>
Date: 星期四, 18 七月 2019 17:37:25 +0800
Subject: [PATCH] fix sdkcompare

---
 dbpersoninfo.go |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/dbpersoninfo.go b/dbpersoninfo.go
index 1488601..a16d34c 100644
--- a/dbpersoninfo.go
+++ b/dbpersoninfo.go
@@ -53,7 +53,7 @@
         	for _, value := range escache{
 
         	    // 濡傛灉娌℃湁tableid  鍒�  tableidstring = capturetable
-                if value.Tableid == nil{
+                if value.Tableid == ""{
                     tableidstring="capturetable"
                 }else{
                     tableidstring = value.Tableid
@@ -75,7 +75,7 @@
     fmt.Println()
 }
 
-func GetComparePersonBaseInfo(tableid []string, faceFeature []byte, compareThreshold int) []byte {
+func GetComparePersonBaseInfo(tableid []string, faceFeature []byte, compareThreshold float32) []byte {
 
     totalmap := make(map[string]float32)
 
@@ -85,17 +85,18 @@
 
     if tableid == nil {
         //瀵规瘮鍏ㄩ儴
-        for _, val := range cache.Cmap.Cam {
+        for _, val := range Cmap.Cam {
             tmpmap := val.Walk(Printest, faceFeature)
             for key, sec := range tmpmap {
-                if sec > 70*0.01 {
+                if sec > 50*0.01 {
+					fmt.Println("map涓�",totalmap[key],sec)
                     totalmap[key] = sec
                 }
             }
         }
     } else {
         for _, tid := range tableid {
-            shardins, ok := cache.Cmap.Cam[tid]
+            shardins, ok := Cmap.Cam[tid]
             fmt.Println(ok)
             if !ok {
                 fmt.Println("get shad error by id", shardins)
@@ -103,12 +104,14 @@
             }
             tmpmap := shardins.Walk(Printest, faceFeature)
             for key, sec := range tmpmap {
-                if compareThreshold > 70{
+                if compareThreshold > 50*0.01{
                     if sec > compareThreshold {
+                    	fmt.Println("map涓�",totalmap[key],sec)
                         totalmap[key] = sec
                     }
                 }else {
-                    if sec > 70*0.01 {
+                    if sec > 50*0.01 {
+						fmt.Println("map涓�",totalmap[key],sec)
                         totalmap[key] = sec
                     }
                 }
@@ -137,5 +140,6 @@
     }
 
     sec := gosdk.FaceCompare(ci, co_d)
+    fmt.Println("姣斿寰楀垎涓猴細",sec)
     return sec
 }

--
Gitblit v1.8.0