c++ - How to read files in sequence from a directory in OpenCV? -
i new opencv. want read xml files in directory. using findfirstfile, not getting how can file names give input cvload further. here code using:
handle hfind; win32_find_data findfiledata; wchar_t* file = l"d:\\zainb_s\\m.phil\\thesis\\dataset\\dataset_3\\rgb_3\\rgb\\s01_e01- copy\\1_walking\\depth\\*.xml"; hfind = findfirstfile(file, &findfiledata); cout << findfiledata.cfilename[0]; findclose(hfind);
i want have filenames in array read files further process.
if you're using recent version of opencv, you're better off avoiding os-specific methods:
vector<string> fn; // std::string in opencv2.4, cv::string in 3.0 string path = "e:/code/vlc/faces2/*.png"; cv::glob(path,fn,false); // got list of filenames in fn.
(ohh, , again, avoid deprecated c-api functions cvload like hell, please!!)
Comments
Post a Comment