From 56def8d41711125189536c87796af2d6702a21f9 Mon Sep 17 00:00:00 2001
From: Scheaven <xuepengqiang>
Date: 星期五, 29 一月 2021 19:00:45 +0800
Subject: [PATCH] update para

---
 /dev/null                   |  134 ---------------------------------
 h_interface.cpp             |    2 
 CMakeLists.txt              |    8 +-
 lib/utils/geometry_util.cpp |   51 ------------
 4 files changed, 5 insertions(+), 190 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b65a988..f2a2450 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 3.5)
 
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}   -fvisibility=hidden -DEIGEN_MAX_ALIGN_BYTES=32 -DEIGEN_DONT_VECTORIZE -fPIC -march=native -DGPU -DCUDNN -DOPENCV -g -W -O0 -pthread -DS_DEBUG")
-#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}   -fvisibility=hidden -DEIGEN_MAX_ALIGN_BYTES=32 -DEIGEN_DONT_VECTORIZE -fPIC -march=native -DGPU -DCUDNN -DOPENCV -g -W -O0 -pthread -DS_DEBUG -DS_SERVER")
+#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}   -fvisibility=hidden -DEIGEN_MAX_ALIGN_BYTES=32 -DEIGEN_DONT_VECTORIZE -fPIC -march=native -DGPU -DCUDNN -DOPENCV -g -W -O0 -pthread -DS_DEBUG")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}   -fvisibility=hidden -DEIGEN_MAX_ALIGN_BYTES=32 -DEIGEN_DONT_VECTORIZE -fPIC -march=native -DGPU -DCUDNN -DOPENCV -g -W -O0 -pthread -DS_SERVER")
 #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}   -fvisibility=hidden -DEIGEN_MAX_ALIGN_BYTES=32 -DEIGEN_DONT_VECTORIZE -fPIC -lm -march=native -DGPU -DCUDNN -DOPENCV -g -W -O0 -pthread -Wl,--no-as-needed")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -fvisibility=hidden -DGPU -DCUDNN -DOPENCV -g  -lm -fPIC -W -O0 -Wl,--no-as-needed")  # 缂栬瘧C鑴氭湰鏃惰皟鐢℅PU鐜淇℃伅
 #set(CMAKE_C_FLAGS "-fvisibility=hidden")
@@ -122,8 +122,8 @@
 #娣诲姞瑕佺紪璇戠殑鍙墽琛屾枃浠�
 #cuda_add_executable(${PROJECT_NAME}
 
-cuda_add_executable(${PROJECT_NAME} SDK_main.cpp ${sources} ${CURRENT_HEADERS})
-#cuda_add_library(${PROJECT_NAME} SHARED ${sources} ${CURRENT_HEADERS})
+#cuda_add_executable(${PROJECT_NAME} SDK_main.cpp ${sources} ${CURRENT_HEADERS})
+cuda_add_library(${PROJECT_NAME} SHARED ${sources} ${CURRENT_HEADERS})
 
 #璁剧疆 target 闇�瑕侀摼鎺ョ殑搴�
 target_link_libraries(${PROJECT_NAME} ${LIBS})
diff --git a/h_interface.cpp b/h_interface.cpp
index 35f6c81..0dc786f 100644
--- a/h_interface.cpp
+++ b/h_interface.cpp
@@ -26,4 +26,4 @@
 YOLOTRACK_API void release(void* handle)
 {
     manager_release(handle);
-}
\ No newline at end of file
+}
diff --git a/lib/utils/geometry_util.cpp b/lib/utils/geometry_util.cpp
index 40bcfe4..6363b31 100644
--- a/lib/utils/geometry_util.cpp
+++ b/lib/utils/geometry_util.cpp
@@ -22,57 +22,6 @@
     return len;
 }
 
-/*
-濡傛灉浠庣偣P浣滄按骞冲悜宸︾殑灏勭嚎鐨勮瘽锛屽亣璁綪鍦ㄥ杈瑰舰鍐呴儴锛岄偅涔堣繖鏉″皠绾夸笌澶氳竟褰㈢殑浜ょ偣蹇呬负濂囨暟锛屽鏋淧鍦ㄥ杈瑰舰澶栭儴锛屽垯浜ょ偣涓暟蹇呬负鍋舵暟锛�0涔熷湪鍐咃級銆傛墍浠ワ紝鎴戜滑鍙互椤哄簭锛堥『鏃堕拡鎴栭�嗘椂閽堬級鑰冭檻澶氳竟褰㈢殑姣忔潯杈癸紝姹傚嚭浜ょ偣鐨勬�讳釜鏁般�傝繕鏈変竴浜涚壒娈婃儏鍐佃鑰冭檻銆傚亣濡傝�冭檻杈�(P1,P2)锛�
-1) 濡傛灉灏勭嚎姝eソ绌胯繃P1鎴栬�匬2,閭d箞杩欎釜浜ょ偣浼氳绠椾綔2娆★紝澶勭悊鍔炴硶鏄鏋淧鐨勪粠鍧愭爣涓嶱1,P2涓緝灏忕殑绾靛潗鏍囩浉鍚岋紝鍒欑洿鎺ュ拷鐣ヨ繖绉嶆儏鍐�
-2) 濡傛灉灏勭嚎姘村钩锛屽垯灏勭嚎瑕佷箞涓庡叾鏃犱氦鐐癸紝瑕佷箞鏈夋棤鏁颁釜锛岃繖绉嶆儏鍐典篃鐩存帴蹇界暐銆�
-3) 濡傛灉灏勭嚎绔栫洿锛岃�孭鐨勬í鍧愭爣灏忎簬P1,P2鐨勬í鍧愭爣锛屽垯蹇呯劧鐩镐氦銆�
-4) 鍐嶅垽鏂浉浜や箣鍓嶏紝鍏堝垽鏂璓鏄惁鍦ㄨ竟(P1,P2)鐨勪笂闈紝濡傛灉鍦紝鍒欑洿鎺ュ緱鍑虹粨璁猴細P鍐嶅杈瑰舰鍐呴儴銆�
- * */
-//bool Pt_in_Polygon(SPoint point, RegInfo* polygon)
-//{
-//    int nCross = 0;
-//    for (int i = 0; i < polygon->count; ++i)
-//    {
-//        SPoint p1 = polygon[i];
-//        SPoint p2 = polygon[(i+1)%polygon->count];
-//
-//        if ( p1.y == p2.y )
-//            continue;
-//        if ( p.y < min(p1.y, p2.y) )
-//            continue;
-//        if ( p.y >= max(p1.y, p2.y) )
-//            continue;
-//
-//        // 姹備氦鐐圭殑x鍧愭爣锛堢敱鐩寸嚎涓ょ偣寮忔柟绋嬭浆鍖栬�屾潵锛�
-//        float x = (float)(p.y - p1.y) * (float)(p2.x - p1.x) / (float)(p2.y - p1.y) + p1.x;
-//
-//        // 鍙粺璁1p2涓巔鍚戝彸灏勭嚎鐨勪氦鐐�
-//        if ( x > p.x )
-//        {
-//            nCross++;
-//        }
-//
-//    }
-//
-//    // 浜ょ偣涓哄伓鏁帮紝鐐瑰湪澶氳竟褰箣澶�
-//    // 浜ょ偣涓哄鏁帮紝鐐瑰湪澶氳竟褰箣鍐�
-//    if ((nCross % 2) == 1)
-//    {
-//        return true; //鍦ㄥ唴閮�
-//    }
-//    else
-//    {
-//        return false; //鍦ㄥ閮�
-//    }
-
-//}
-
-
-/*
- * 澶氳竟褰㈤儴鍒嗭紝鍒ゆ柇澶氳竟褰㈤噸鍙犵巼鐨勮绠�
- */
-
 float computeArea(const SPoint * pt,int n ) {
     float area0 = 0.f;
     for (int i = 0 ; i < n ; i++ )
diff --git a/lib/utils/stack_util.hpp b/lib/utils/stack_util.hpp
deleted file mode 100644
index 08c4d33..0000000
--- a/lib/utils/stack_util.hpp
+++ /dev/null
@@ -1,134 +0,0 @@
-//
-// Created by Scheaven on 2020/6/8.
-//
-
-#ifndef _STACK_UTIL_H
-#define _STACK_UTIL_H
-
-#include <algorithm>
-#include <memory.h>
-#include <iostream>
-#include <fstream>
-#include <string>
-#include <iomanip>
-#include <stdlib.h>
-#include <vector>
-#include <stack>
-#include <cstdio>
-
-using namespace std;
-
-/**瀹炵幇鏈�澶у�兼爤
-浠(1)鐨勬椂闂存煡璇㈡爤涓殑鏈�澶у��.
-绠楁硶鎬濊矾
-缁存姢涓�涓渶澶у�兼爤锛屽湪鍘熸爤涓暟鎹彂鐢熸敼鍙樻椂鏈�澶у�兼爤涔熻窡鐫�鏀瑰彉銆�
-姣忔杈撳叆涓�涓暟鎹紝鑻ユ渶澶у�兼爤涓虹┖锛屽垯姣旇緝鏈�澶у�兼爤鏍堥《鍜屽綋鍓嶅厓绱狅紝濡傛灉褰撳墠鍏冪礌杈冨ぇ鎴栫浉绛夛紝灏辨妸褰撳墠鍏冪礌鎺ㄥ叆鏍堜腑锛屽弽涔嬪嚭鏍堟椂锛屽鏋滃嚭鏍堝厓绱犲拰褰撳墠鍏冪礌鐩哥瓑锛屽垯鎶婃渶澶у�兼爤涓厓绱犱篃鎺ㄥ嚭鏍堛��
- */
-
-template <typename T> //娉ㄦ剰 娉涘瀷妯℃澘蹇呴』鎶婂疄鐜版柟娉曠洿鎺ュ啓鍦ㄥご鏂囦欢閲� 鍚﹀垯鎵句笉鍒版枃浠跺畾涔�
-class MaxStack
-{
-private:
-    stack<T> max_stack;
-    stack<T> _data;
-
-public:
-    MaxStack(){};
-    ~MaxStack(){};
-
-
-    void push(T ele) //鍘嬪叆
-    {
-        _data.push(ele);
-        if(max_stack.empty() || ele>=max_stack.top())
-        {
-            max_stack.push(ele);
-        }
-    };
-
-    void pop() //寮瑰嚭
-    {
-        T tem = _data.top();
-        _data.pop();
-        if(tem==max_stack.top())
-        {
-            max_stack.pop();
-        }
-    };
-
-    T top() //鑾峰彇绗竴涓厓绱�
-    {
-        return _data.top();
-
-    };
-
-    bool isEmpty()
-    {
-        return _data.empty();
-    };
-
-    T maxItem() //鍙栨渶澶у厓绱�
-    {
-        return max_stack.top();
-    };
-
-    int size() //涓暟
-    {
-        return _data.size();
-    };
-};
-
-
-template <typename T> //娉ㄦ剰 娉涘瀷妯℃澘蹇呴』鎶婂疄鐜版柟娉曠洿鎺ュ啓鍦ㄥご鏂囦欢閲� 鍚﹀垯鎵句笉鍒版枃浠跺畾涔�
-class MinStack
-{
-private:
-    stack<T> min_stack;
-    stack<T> _data;
-
-public:
-    MinStack(){};
-    ~MinStack(){};
-
-    void push(T ele) //鍘嬪叆
-    {
-        _data.push(ele);
-        if(min_stack.empty() || ele<=min_stack.top())
-        {
-            min_stack.push(ele);
-        }
-    };
-
-    void pop() //寮瑰嚭
-    {
-        T tem = _data.top();
-        _data.pop();
-        if(tem==min_stack.top())
-        {
-            min_stack.pop();
-        }
-    };
-
-    T top() //鑾峰彇绗竴涓厓绱�
-    {
-        return _data.top();
-
-    };
-
-    bool isEmpty()
-    {
-        return _data.empty();
-    };
-
-    T minItem() //鍙栨渶澶у厓绱�
-    {
-        return min_stack.top();
-    };
-
-    int size() //涓暟
-    {
-        return _data.size();
-    };
-};
-
-#endif //INC_05_MAX_STACK_QUEUE_STACK_UTIL_H

--
Gitblit v1.8.0