Commit fbb6b6f9 authored by Alexey Spizhevoy's avatar Alexey Spizhevoy

fixed compile bug under g++

parent a275e515
...@@ -148,7 +148,7 @@ Settings Settings::Read(int argc, char** argv) ...@@ -148,7 +148,7 @@ Settings Settings::Read(int argc, char** argv)
else if (key == "-win_stride_width") settings.win_stride_width = atoi(val.c_str()); else if (key == "-win_stride_width") settings.win_stride_width = atoi(val.c_str());
else if (key == "-win_stride_height") settings.win_stride_height = atoi(val.c_str()); else if (key == "-win_stride_height") settings.win_stride_height = atoi(val.c_str());
else if (key == "-gr_threshold") settings.gr_threshold = atoi(val.c_str()); else if (key == "-gr_threshold") settings.gr_threshold = atoi(val.c_str());
else throw exception((string("Unknown key: ") + key).c_str()); else throw runtime_error((string("Unknown key: ") + key));
} }
cout << "Command args are parsed\n"; cout << "Command args are parsed\n";
...@@ -221,14 +221,14 @@ void App::RunOpencvGui() ...@@ -221,14 +221,14 @@ void App::RunOpencvGui()
{ {
vc.open(settings.src.c_str()); vc.open(settings.src.c_str());
if (!vc.isOpened()) if (!vc.isOpened())
throw exception(string("Can't open video file: " + settings.src).c_str()); throw runtime_error(string("Can't open video file: " + settings.src));
vc >> frame; vc >> frame;
} }
else else
{ {
frame = imread(settings.src); frame = imread(settings.src);
if (frame.empty()) if (frame.empty())
throw exception(string("Can't open image file: " + settings.src).c_str()); throw runtime_error(string("Can't open image file: " + settings.src));
} }
Mat img_aux, img, img_to_show; Mat img_aux, img, img_to_show;
......
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