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