Commit 6ec23cbb169dee619cf4ff444f721ea79e069701

Authored by Hu Chunming
1 parent c8f96ad0

更新demo

build/demo/Makefile
@@ -9,7 +9,7 @@ BIN_PATH = $(PROJ_ALL_PATH)/bin @@ -9,7 +9,7 @@ BIN_PATH = $(PROJ_ALL_PATH)/bin
9 9
10 DEFS=-DOS_LINUX -DENABLE_DVPP_INTERFACE 10 DEFS=-DOS_LINUX -DENABLE_DVPP_INTERFACE
11 11
12 -TARGET = $(BIN_PATH)/start 12 +TARGET = $(BIN_PATH)/demo
13 13
14 ACL_PATH = $(ASCEND_AICPU_PATH)/acllib 14 ACL_PATH = $(ASCEND_AICPU_PATH)/acllib
15 OPENCV_PATH = $(PROJ_ALL_PATH)/3rdparty/opencv_4_1 15 OPENCV_PATH = $(PROJ_ALL_PATH)/3rdparty/opencv_4_1
@@ -62,6 +62,7 @@ SHARED_LIBRARIES_DIRS := $(foreach shared_lib_dir, $(local_shared_libs_dirs), -L @@ -62,6 +62,7 @@ SHARED_LIBRARIES_DIRS := $(foreach shared_lib_dir, $(local_shared_libs_dirs), -L
62 CXXFLAGS= -g -O0 -fPIC $(INCLUDES) $(DEFS) -lpthread -lrt -lz -fexceptions -std=c++11 -DENABLE_DVPP_INTERFACE -D_GLIBCXX_USE_CXX11_ABI=0 -fvisibility=hidden -Wall -Wno-deprecated -Wdeprecated-declarations -Wl,-Bsymbolic -ldl 62 CXXFLAGS= -g -O0 -fPIC $(INCLUDES) $(DEFS) -lpthread -lrt -lz -fexceptions -std=c++11 -DENABLE_DVPP_INTERFACE -D_GLIBCXX_USE_CXX11_ABI=0 -fvisibility=hidden -Wall -Wno-deprecated -Wdeprecated-declarations -Wl,-Bsymbolic -ldl
63 63
64 SRCS := $(wildcard $(CUR_PROJ_PATH)/*.cpp) \ 64 SRCS := $(wildcard $(CUR_PROJ_PATH)/*.cpp) \
  65 + $(wildcard $(CUR_PROJ_PATH)/demo/*.cpp) \
65 $(wildcard $(CUR_PROJ_PATH)/ai_engine_module/*.cpp) \ 66 $(wildcard $(CUR_PROJ_PATH)/ai_engine_module/*.cpp) \
66 $(wildcard $(CUR_PROJ_PATH)/common/*.cpp) \ 67 $(wildcard $(CUR_PROJ_PATH)/common/*.cpp) \
67 $(wildcard $(CUR_PROJ_PATH)/common/dvpp/*.cpp) \ 68 $(wildcard $(CUR_PROJ_PATH)/common/dvpp/*.cpp) \
@@ -83,6 +84,9 @@ $(TARGET):$(OBJS) @@ -83,6 +84,9 @@ $(TARGET):$(OBJS)
83 %.o:$(CUR_PROJ_PATH)/%.cpp 84 %.o:$(CUR_PROJ_PATH)/%.cpp
84 $(XX) $(CXXFLAGS) -c $< 85 $(XX) $(CXXFLAGS) -c $<
85 86
  87 +%.o:$(CUR_PROJ_PATH)/demo/%.cpp
  88 + $(XX) $(CXXFLAGS) -c $<
  89 +
86 %.o:$(CUR_PROJ_PATH)/ai_engine_module/%.cpp 90 %.o:$(CUR_PROJ_PATH)/ai_engine_module/%.cpp
87 $(XX) $(CXXFLAGS) -c $< 91 $(XX) $(CXXFLAGS) -c $<
88 92
src/demo/main.cpp
@@ -4,7 +4,11 @@ int main() { @@ -4,7 +4,11 @@ int main() {
4 4
5 PicAnalysis pic_analysis; 5 PicAnalysis pic_analysis;
6 6
7 - pic_analysis.init(0); 7 + VillageParam param;
  8 + param.dev_id = 0;
  9 + param.db_path = "";
  10 + param.model_path = "";
  11 + pic_analysis.init(param);
8 12
9 vector<string> vec_path; 13 vector<string> vec_path;
10 for (size_t i = 0; i < 1; i++) 14 for (size_t i = 0; i < 1; i++)
@@ -12,7 +16,7 @@ int main() { @@ -12,7 +16,7 @@ int main() {
12 vec_path.push_back("./test_all.jpg"); 16 vec_path.push_back("./test_all.jpg");
13 } 17 }
14 18
15 - pic_analysis.analysis_sync(vec_path); 19 + pic_analysis.analysis_file(vec_path);
16 20
17 // while (getchar() != 'q'); 21 // while (getchar() != 'q');
18 22