Interfacing with OpenFace: C++ & Terminal
Here I detail my experiments in interfacing with OpenFace using C++ and the terminal.
Last updated
Here I detail my experiments in interfacing with OpenFace using C++ and the terminal.
Last updated
std::string Analyse(std::string body, std::string& randomString)
{
std::cout << "Analysing using OpenFace";
//Build string and download image using curl command
std::string imageName = "Image" + randomString;
std::string curlCommandString = "cd ~/Projects/OpenFace/OpenFace/build/TestImages && curl " + body + " > " + imageName + ".png";
const char * curlCommandChar = curlCommandString.c_str();
system(curlCommandChar);
//Run analysis
system("cd ~/Projects/OpenFace/OpenFace/build/ && ./bin/FaceLandmarkImg -fdir \"TestImages\" -wild");
delete curlCommandChar;
//Get and return contents of generated csv file
return GetCsvContents(imageName);
}