Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在一些 Aruco 文件中发现了奇怪的语法:
vector< cv::Mat > thres_images(n_param1);
似乎thres_images是函数,但如果是,那么vector< cv::Mat >它前面是什么?它不是声明也不是定义。后来它被用作数组:
thres_images
vector< cv::Mat >
thres = thres_images[n_param1 / 2];
PS:完整代码可以在这里找到
thres_images是一个向量,它的 ctorn_param1作为初始容器大小传递。这个 ctor 被称为填充 ctor。
n_param1