Commit 6ec23cbb169dee619cf4ff444f721ea79e069701
1 parent
c8f96ad0
更新demo
Showing
2 changed files
with
11 additions
and
3 deletions
build/demo/Makefile
... | ... | @@ -9,7 +9,7 @@ BIN_PATH = $(PROJ_ALL_PATH)/bin |
9 | 9 | |
10 | 10 | DEFS=-DOS_LINUX -DENABLE_DVPP_INTERFACE |
11 | 11 | |
12 | -TARGET = $(BIN_PATH)/start | |
12 | +TARGET = $(BIN_PATH)/demo | |
13 | 13 | |
14 | 14 | ACL_PATH = $(ASCEND_AICPU_PATH)/acllib |
15 | 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 | 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 | 64 | SRCS := $(wildcard $(CUR_PROJ_PATH)/*.cpp) \ |
65 | + $(wildcard $(CUR_PROJ_PATH)/demo/*.cpp) \ | |
65 | 66 | $(wildcard $(CUR_PROJ_PATH)/ai_engine_module/*.cpp) \ |
66 | 67 | $(wildcard $(CUR_PROJ_PATH)/common/*.cpp) \ |
67 | 68 | $(wildcard $(CUR_PROJ_PATH)/common/dvpp/*.cpp) \ |
... | ... | @@ -83,6 +84,9 @@ $(TARGET):$(OBJS) |
83 | 84 | %.o:$(CUR_PROJ_PATH)/%.cpp |
84 | 85 | $(XX) $(CXXFLAGS) -c $< |
85 | 86 | |
87 | +%.o:$(CUR_PROJ_PATH)/demo/%.cpp | |
88 | + $(XX) $(CXXFLAGS) -c $< | |
89 | + | |
86 | 90 | %.o:$(CUR_PROJ_PATH)/ai_engine_module/%.cpp |
87 | 91 | $(XX) $(CXXFLAGS) -c $< |
88 | 92 | ... | ... |
src/demo/main.cpp
... | ... | @@ -4,7 +4,11 @@ int main() { |
4 | 4 | |
5 | 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 | 13 | vector<string> vec_path; |
10 | 14 | for (size_t i = 0; i < 1; i++) |
... | ... | @@ -12,7 +16,7 @@ int main() { |
12 | 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 | 21 | // while (getchar() != 'q'); |
18 | 22 | ... | ... |