[图片]
iOS开发 微信开源扫码引擎普通二维码可以扫,dataMatrix码扫不了?这两个码都扫不了。 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"; }
2021-09-07