这两个码都扫不了。
string detect_prototxt = [[[NSBundle mainBundle] pathForResource:@"detect" ofType:@"prototxt"] UTF8String];
string detect_caffe_model = [[[NSBundle mainBundle] pathForResource:@"detect" ofType:@"caffemodel"] UTF8String];
string sr_prototxt = [[[NSBundle mainBundle] pathForResource:@"sr" ofType:@"prototxt"] UTF8String];
string sr_caffe_model = [[[NSBundle mainBundle] pathForResource:@"sr" ofType:@"caffemodel"] UTF8String];
shared_ptr detector;
detector = makePtr(detect_prototxt, detect_caffe_model, sr_prototxt, sr_caffe_model);
Mat imgMat;
UIImageToMat([UIImage imageNamed:@"dataMatrix_rgb"], imgMat);
vector vPoints;
vector strDecoded = detector->detectAndDecode(imgMat, vPoints);
for (int i = 0; i < strDecoded.size(); i ++) {
string str = strDecoded[i];
cout << str;
cout << "\n";
}