mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge branch 4.x
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include <opencv2/calib.hpp>
|
||||
#include <opencv2/cvconfig.h>
|
||||
#include <opencv2/highgui.hpp>
|
||||
|
||||
#include <opencv2/videoio/registry.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -24,9 +24,25 @@
|
||||
|
||||
using namespace calib;
|
||||
|
||||
const std::string keys =
|
||||
static std::string getVideoIoBackendsString()
|
||||
{
|
||||
std::string result;
|
||||
auto backs = cv::videoio_registry::getBackends();
|
||||
for (const auto& b: backs)
|
||||
{
|
||||
if (!result.empty())
|
||||
result += ", ";
|
||||
|
||||
result += cv::videoio_registry::getBackendName(b);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
const char* keys =
|
||||
"{v | | Input from video file }"
|
||||
"{ci | 0 | Default camera id }"
|
||||
"{ci | 0 | Camera id }"
|
||||
"{vb | | Video I/O back-end. One of: %s }"
|
||||
"{flip | false | Vertical flip of input frames }"
|
||||
"{t | circles | Template for calibration (circles, chessboard, dualCircles, charuco, symcircles) }"
|
||||
"{sz | 16.3 | Distance between two nearest centers of circles or squares on calibration board}"
|
||||
@@ -96,11 +112,13 @@ static void undistortButton(int state, void* data)
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
cv::CommandLineParser parser(argc, argv, keys);
|
||||
cv::CommandLineParser parser(argc, argv, cv::format(keys, getVideoIoBackendsString().c_str()));
|
||||
|
||||
if(parser.has("help")) {
|
||||
parser.printMessage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::cout << consoleHelp << std::endl;
|
||||
parametersController paramsController;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user