ios也闪退
VKSession.runOCR拿不到返回值,安卓端闪退https://developers.weixin.qq.com/miniprogram/dev/api/ai/visionkit/VKSession.runOCR.html const version = wx.isVKSupport('v2') ? 'v2' : (wx.isVKSupport('v1') ? 'v1' : ''); if (version) { const session = wx.createVKSession({ version: version, track: { plane: {mode: 3}, OCR: { mode: 2 } // mode: 1 - 使用摄像头;2 - 手动传入图像 }, }); session.start(errno => { if (errno) { } else { session.runOCR({ frameBuffer:imgData.data.buffer, width: imgData.width, height: imgData.height }) } }); session.on('addAnchors', anchors => { console.log("anchor add", anchors); }) session.on('updateAnchors', anchors => { console.log("anchor updateAnchors", anchors); }); session.on('removeAnchors', anchors => { console.log('anchor remove', anchors); })
05-27