1.流程?
2.使用到的opencv函数是哪几个?
函数比较简单,直接贴代码:
bool ReadMulMatImgs(int nums, string imgPath, vector<cv::Mat>& imgs)
{
cv::Mat img;
std::vector<cv::String> imgFiles;
cv::glob(imgPath, imgFiles);
if (imgFiles.size() == 0)
return false;
for (unsigned int frame = 0; frame < nums; frame++)
{
img = cv::imread(imgFiles[frame], cv::IMREAD_UNCHANGED);
imgs.push_back(img);
}
return true;
}