#include "opencv2/text.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include #include using namespace std; using namespace cv; using namespace cv::text; inline void printHelp() { cout << " Demo of wordspotting CNN for text recognition." << endl; cout << " Max Jaderberg et al.: Reading Text in the Wild with Convolutional Neural Networks, IJCV 2015"<" << endl; cout << " Caffe Model files (dictnet_vgg.caffemodel, dictnet_vgg_deploy.prototxt, dictnet_vgg_labels.txt)"< wordSpotter = OCRHolisticWordRecognizer::create("dictnet_vgg_deploy.prototxt", "dictnet_vgg.caffemodel", "dictnet_vgg_labels.txt"); std::string word; vector confs; wordSpotter->run(image, word, 0, 0, &confs); cout << "Detected word: '" << word << "', confidence: " << confs[0] << endl; }