From b15fc98d35ab86d83e94040d8a6c34cc0fc40722 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Tue, 16 Jan 2024 23:03:33 +0100 Subject: [PATCH] add argument to the main function for headless and some optimization --- arucoDetector.cpp | 98 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 74 insertions(+), 24 deletions(-) diff --git a/arucoDetector.cpp b/arucoDetector.cpp index 9d62040..a341bca 100644 --- a/arucoDetector.cpp +++ b/arucoDetector.cpp @@ -1,16 +1,45 @@ #include #include -int main() +#include "utils/utils.h" + +int main(int argc, char *argv[]) { - cv::VideoCapture cap(2); // Open default camera (change the argument if using a different camera) + if (argc < 2) { + std::cout << "Usage: " << argv[0] << "