From 0bad0e6b94c566f63bb97661850899f679fd1d12 Mon Sep 17 00:00:00 2001 From: pans <pans@454eff88-639b-444f-9e54-f578c98de674> Date: 星期三, 04 一月 2017 16:06:48 +0800 Subject: [PATCH] --- RtspFace/demo/src/test.cpp | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/RtspFace/demo/src/test.cpp b/RtspFace/demo/src/test.cpp index f605542..f626a03 100644 --- a/RtspFace/demo/src/test.cpp +++ b/RtspFace/demo/src/test.cpp @@ -6,17 +6,24 @@ using namespace std; -int main(int argc) { +int main(int argc, char *argv[] ) +{ //文件路径 char *db_path = "./out.db"; - char *image_path = "../../test_image/face_04.jpg"; - char *image_list = "../../test_image/imglist"; + char *image_path = argv[1]; + char *image_list = "../test_image/imglist"; cv::Mat bgr_image = cv::imread(image_path); + if(bgr_image.data != NULL) { + cout<<image_path<<endl; + } else { + cout<<"image is null"<<endl; + cout<<image_path<<endl; + } int idx = -11; faceAPI face; idx = face.do_reasch(bgr_image); - cout<<"idx="<<idx<<endl; + cout<<"idx="<<idx<<endl; return 0; } -- Gitblit v1.8.0