Open WD-CHINA opened 3 years ago
const video = tf.tidy(() => { const temp = tf.tensor(new Uint8Array(frame.data), [frame.height, frame.width, 4]) const sliceOptions = getFrameSliceOptions(this.cameraPosition, frame.width, frame.height, this.displaySize.width, this.displaySize.height) return temp.slice(sliceOptions.start, sliceOptions.size).resizeBilinear([this.displaySize.height, this.displaySize.width]) })
temp 无法输出直接报angeError length out of range of buffer,ios14.5以上
const temp = tf.tensor(new Uint8Array(frame.data), [frame.height, frame.width, 4]) 在这个方法中,ios14.5以上报rangeError length out of range of buffer错误,其他的没有问题