I am trying to test the cpp version using main.cpp file at this link:
https://github.com/novioleo/crnn.mxnet/blob/master/cpp_invoker/main.cpp
But i am unable to understand how to read file in bytes as const std::vector so that i can pass it to predict function in predictor class.
Please help this is the main function i am using.
int main(int argc, char** argv) {
predictor obj = predictor(argv[2],argv[3]);
// read image here in bytes format
try {
std::string result = obj.predict(image);
}catch(std::exception& e){
std::cout<<e.what()<<std::endl;
}
return 0;
}
and this is my prediction function prototype
std::string predict(const std::vector<uchar> &byte_data);
if above things are unclear i can try to explain again. thank you very much.