Closed PiotrKalinski closed 1 year ago
Hi,
I think, console.log
overflowing memory.
Please use this code and can you try again?
console.log(imageAsBase64.substring(0, 20))
or This code from my real project and this is running correct.
const processThread = (base64: string) => {
// setImage(base64)
// Get Optic paper with using opencv and c++
runOpticReader(base64, JSON.stringify(fmt), JSON.stringify(options)).then(setImage);
};
const process = useFrameProcessor((frame) => {
'worklet';
// Get QR only qr points
const detectedBarcodes = scanBarcodes(frame, [BarcodeFormat.QR_CODE], {
checkInverted: true,
});
const points = detectedBarcodes[0]?.cornerPoints;
if (points && points[1]) {
fmt.qr = {
x: points[1].x,
y: points[1].y,
};
const base64 = frameToBase64(frame);
REA.runOnJS(processThread)(base64);
}
}, []);
Thanks for help
Hello,
I am using your plugin to catch frame and send it back to my server to process image. But after ~15s app crash due to
is it common issue or am I using it wrong?