I am trying to read "classifications.xml" and "images.xml" from a tutorial which was working fine in a VisualStudio project. How do I point the C++ library in my Swift XCode project to the files now? Drag and dropping them into the project did not work.
Here is the original code. How do I point cv::Filestorage class to the files in my project? Right now it returns an error
cv::Mat matClassificationInts; // we will read the classification numbers into this variable as though it is a vector
cv::FileStorage fsClassifications("classifications.xml", cv::FileStorage::READ); // open the classifications file
if (fsClassifications.isOpened() == false) { // if the file was not opened successfully
std::cout << "error, unable to open training classifications file, exiting program\n\n"; // show error message
return(0); // and exit program
}
fsClassifications["classifications"] >> matClassificationInts; // read classifications section into Mat classifications variable
fsClassifications.release(); // close the classifications file