收藏
回答

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
回答关注问题邀请回答
收藏

1 个回答

  • 白昼
    白昼
    2021-09-07

    2021-09-07
    有用
    回复
登录 后发表内容