派生自 Algorithm/baseDetector

Scheaven
2021-06-03 7e5f7f3f140b048d97f751b2e148065eb039a572
main.cpp
@@ -5,14 +5,8 @@
#include "std_target.h"
#include "time.h"
#ifdef OPENCV
#include <opencv2/opencv.hpp>         // C++
#pragma comment(lib, "opencv_core249.lib")
#pragma comment(lib, "opencv_imgproc249.lib")
#pragma comment(lib, "opencv_highgui249.lib")
#endif   // OPENCV
using namespace std;
using namespace cv;
void* handle;
@@ -39,7 +33,7 @@
    TImage *img = new TImage();
    TImage *img2 = new TImage();
    int i = 0;
    cap = VideoCapture("/data/disk2/01_dataset/03_human/34983128.mp4");
    cap = VideoCapture("/data/disk2/01_Scheaven/data/cam_53.avi");
    // string path="/data/disk1/workspace/07_CPP/build/re";
    // std::vector<string> video_path_vec;
@@ -48,7 +42,8 @@
    // for (auto& file:video_path_vec)
    // {
    while(1){        /* code */
    while(1)
    {        /* code */
        // printf("----start--%s\n", file);
        // cout<<"----------------\n\n"<<file<<endl;
        // frame = imread(file);
@@ -68,7 +63,6 @@
            cout << "=======t_result->count==" << t_result->count  << endl;
            for (int i=0; i<t_result->count; i++)
                cout << "====1111111111===confidence:" << t_result->targets[i].confidence << endl;
            // if (t_result->count>0)
            // {
            //    imwrite("/data/disk2/01_dataset/03_human/02_person/positive/"+file.substr(file.find_last_of("/")), frame);
@@ -76,7 +70,6 @@
            // {
            //     imwrite("/data/disk2/01_dataset/03_human/02_person/negate/"+file.substr(file.find_last_of("/")), frame);
            // }
        }else{
            cout << "-----------------------over--" << endl;
@@ -86,7 +79,7 @@
        }
        clock_t t_strat3 = clock();
        cout << "rps---"<< CLOCKS_PER_SEC/(t_strat3 - t_strat2)  <<endl;
        cout << "rps---"<< CLOCKS_PER_SEC/(t_strat3 - t_strat2) <<endl;
    }
    return 0;
}