| | |
| | | // DEBUG( ":::::::::create folder! error!::::::");
|
| | | // }
|
| | | // }
|
| | | DEBUG("=2==create_path:")
|
| | | DEBUG("=2==create_path:");
|
| | | char DirName[256];
|
| | | strcpy(DirName,path);
|
| | | int i,len = strlen(DirName);
|
| | | if(DirName[len-1]!='/')
|
| | | strcat(DirName,"/");
|
| | | strcat(DirName,"/");
|
| | | len = strlen(DirName);
|
| | | for(i=1;i<len;i++)
|
| | | {
|
| | |
| | | // perror("mkdir error");
|
| | | // }
|
| | | // }
|
| | | DEBUG("=1==create_path:")
|
| | | DEBUG("=1==create_path:");
|
| | | int a = access(DirName, F_OK);
|
| | | if(a ==-1)
|
| | | {
|
| | |
| | | cv::imshow(to_string(1), mat_img);
|
| | | cv::waitKey(0);
|
| | | }
|
| | |
|
| | | cv::VideoWriter writer("/opt/vasystem/valog/01_Scheanve/01_baseDetector.avi", cv::VideoWriter::fourcc('M','J','P','G'),24, cv::Size(800,500), true);
|
| | |
|
| | | void draw_SDK_result(const int cam_id, cv::Mat mat_img, TResult& t_result)
|
| | | {
|
| | | cv::Rect tmp_rect;
|
| | |
|
| | | for (int i = 0; i < t_result.count; ++i)
|
| | | {
|
| | | auto &result = t_result.targets[i];
|
| | | tmp_rect = cv::Rect(result.rect.left,result.rect.top,result.rect.right-result.rect.left,result.rect.bottom-result.rect.top);
|
| | | cv::rectangle(mat_img, tmp_rect , cv::Scalar(50, 200, 50), 2);
|
| | | // cv::putText(mat_img, std::to_string(result.id), Point((result.rect.left+result.rect.right)/2,result.rect.top+150), CV_FONT_HERSHEY_SIMPLEX, 0.8, Scalar(255,255,0), 2);
|
| | | }
|
| | | // delete tmp_rect;
|
| | | cv::resize(mat_img, mat_img, cv::Size(800,500));
|
| | | // cv::imwrite("1111.jpg", mat_img);
|
| | | // cv::imshow("RESULT", mat_img);
|
| | | writer<< mat_img;
|
| | | // cv::waitKey(0);
|
| | | }
|