Here is my code, im not sure why I only run into segmentatin fault when perform reg->run()
void Char_Reg( Mat& img, vector<string>& txt, vector<rect>& loc){ Ptr<text::ocrtesseract> reg; vector<rect> a ; vector<string> b ; vector<float> c ; string num;for(int i=0; i<loc.size(); i++){<="" p="">
Mat plt=img(loc[i]);
cvtColor(plt,plt,CV_8UC1);
adaptiveThreshold(plt,plt, 255, CV_ADAPTIVE_THRESH_GAUSSIAN_C, CV_THRESH_BINARY, 15, 5.5);
imshow("plt",plt);
reg->run(plt, num,&a, &b, &c,5);
cout<<num<<endl; }="" <code="">