|
|
|
@ -7,12 +7,13 @@ |
|
|
|
|
|
|
|
|
|
const char* keys = |
|
|
|
|
"{ help h | | Print help message. }" |
|
|
|
|
"{ input i | | Path to input image or video file. Skip this argument to capture frames from a camera.}" |
|
|
|
|
"{ device | 0 | camera device number. }" |
|
|
|
|
"{ input i | | Path to input image or video file. Skip this argument to capture frames from a camera. }" |
|
|
|
|
"{ model m | | Path to a binary file of model contains trained weights. " |
|
|
|
|
"It could be a file with extensions .caffemodel (Caffe), " |
|
|
|
|
".pb (TensorFlow), .t7 or .net (Torch), .weights (Darknet) }" |
|
|
|
|
".pb (TensorFlow), .t7 or .net (Torch), .weights (Darknet). }" |
|
|
|
|
"{ config c | | Path to a text file of model contains network configuration. " |
|
|
|
|
"It could be a file with extensions .prototxt (Caffe), .pbtxt (TensorFlow), .cfg (Darknet) }" |
|
|
|
|
"It could be a file with extensions .prototxt (Caffe), .pbtxt (TensorFlow), .cfg (Darknet). }" |
|
|
|
|
"{ framework f | | Optional name of an origin framework of the model. Detect it automatically if it does not set. }" |
|
|
|
|
"{ classes | | Optional path to a text file with names of classes. }" |
|
|
|
|
"{ colors | | Optional path to a text file with colors for an every class. " |
|
|
|
@ -111,7 +112,7 @@ int main(int argc, char** argv) |
|
|
|
|
if (parser.has("input")) |
|
|
|
|
cap.open(parser.get<String>("input")); |
|
|
|
|
else |
|
|
|
|
cap.open(0); |
|
|
|
|
cap.open(parser.get<int>("device")); |
|
|
|
|
//! [Open a video file or an image file or a camera stream]
|
|
|
|
|
|
|
|
|
|
// Process frames.
|
|
|
|
|