2013-03-14 17:10:54 +01:00
|
|
|
#include <opencv2/core/utility.hpp>
|
2012-04-13 23:50:59 +02:00
|
|
|
#include <iostream>
|
|
|
|
|
2012-10-17 09:12:04 +02:00
|
|
|
const char* keys =
|
2012-04-13 23:50:59 +02:00
|
|
|
{
|
2012-09-07 11:24:48 +02:00
|
|
|
"{ b build | | print complete build info }"
|
|
|
|
"{ h help | | print this help }"
|
2012-04-13 23:50:59 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
int main(int argc, const char* argv[])
|
|
|
|
{
|
|
|
|
cv::CommandLineParser parser(argc, argv, keys);
|
|
|
|
|
2012-09-07 11:24:48 +02:00
|
|
|
if (parser.has("help"))
|
2012-04-13 23:50:59 +02:00
|
|
|
{
|
2012-09-07 11:24:48 +02:00
|
|
|
parser.printMessage();
|
2012-04-13 23:50:59 +02:00
|
|
|
}
|
2012-09-07 11:24:48 +02:00
|
|
|
else if (!parser.check())
|
|
|
|
{
|
|
|
|
parser.printErrors();
|
|
|
|
}
|
|
|
|
else if (parser.has("build"))
|
2012-04-13 23:50:59 +02:00
|
|
|
{
|
|
|
|
std::cout << cv::getBuildInformation() << std::endl;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-10-17 09:12:04 +02:00
|
|
|
std::cout << "OpenCV " << CV_VERSION << std::endl;
|
2012-04-13 23:50:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
2012-09-07 11:24:48 +02:00
|
|
|
}
|