Commit 159ea22b authored by berak's avatar berak

dnn: add a check for webcam properties in ssd_mobilenet sample

parent 7ae19467
......@@ -115,10 +115,12 @@ int main(int argc, char** argv)
(inVideoSize.height - cropSize.height) / 2),
cropSize);
double fps = cap.get(CV_CAP_PROP_FPS);
int fourcc = static_cast<int>(cap.get(CV_CAP_PROP_FOURCC));
VideoWriter outputVideo;
outputVideo.open(parser.get<String>("out") ,
static_cast<int>(cap.get(CV_CAP_PROP_FOURCC)),
cap.get(CV_CAP_PROP_FPS), cropSize, true);
(fourcc != 0 ? fourcc : VideoWriter::fourcc('M','J','P','G')),
(fps != 0 ? fps : 10.0), cropSize, true);
for(;;)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment