MCPcopy Create free account
hub / github.com/Smorodov/Multitarget-tracker / main

Function main

example/main.cpp:48–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46// ----------------------------------------------------------------------
47
48int main(int argc, char** argv)
49{
50 cv::CommandLineParser parser(argc, argv, keys);
51
52 Help();
53 parser.printMessage();
54
55 bool useOCL = parser.get<int>("gpu") != 0;
56 cv::ocl::setUseOpenCL(useOCL);
57 std::cout << (cv::ocl::useOpenCL() ? "OpenCL is enabled" : "OpenCL not used") << std::endl;
58
59 int exampleNum = parser.get<int>("example");
60 int asyncPipeline = parser.get<int>("async");
61
62 std::unique_ptr<VideoExample> detector;
63
64 switch (exampleNum)
65 {
66 case 0:
67 MouseTracking(parser);
68 break;
69
70 case 1:
71 detector = std::make_unique<MotionDetectorExample>(parser);
72 break;
73
74 case 2:
75 detector = std::make_unique<FaceDetectorExample>(parser);
76 break;
77
78 case 3:
79 detector = std::make_unique<PedestrianDetectorExample>(parser);
80 break;
81
82 case 4:
83 detector = std::make_unique<OpenCVDNNExample>(parser);
84 break;
85
86#ifdef BUILD_YOLO_LIB
87 case 5:
88 detector = std::make_unique<YoloDarknetExample>(parser);
89 break;
90#endif
91
92#ifdef BUILD_YOLO_TENSORRT
93 case 6:
94 detector = std::make_unique<YoloTensorRTExample>(parser);
95 break;
96#endif
97
98#ifdef BUILD_CARS_COUNTING
99 case 7:
100 {
101 auto carsCounting = new CarsCounting(parser);
102 detector = std::unique_ptr<CarsCounting>(carsCounting);
103 break;
104 }
105#endif

Callers

nothing calls this directly

Calls 5

MouseTrackingFunction · 0.85
AsyncProcessMethod · 0.80
SyncProcessMethod · 0.80
HelpFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected