如何在OpenCV中有效地连接两个cv :: String类型的向量? 我有以下方法,使用openCv中的cv :: glob方法返回目录中的所有文件名,方法参数是目录名称的向量。
vector<String> GetTrainingImageFiles(vector<string> directories)
{
vector<cv::String> allFiles; //this will hold all the file names
vector<cv::String> directoryFiles;// this will hold a specific directory files for one iteration
for(string directory : directories)
{
cv::String path(directory + "/*.ppm"); //select only ppm
vector<cv::Mat> data;
cv::glob(path, directoryFiles, false);
//Here the directoryFiles vector should be concatenated to allFiles vector
}
return directoryFiles;
}
关于这个问题的任何想法?