vision-camera-ocr
vision-camera-ocr copied to clipboard
fix: fix ocr scanning method name mismatch
The global __scanOCR method specified in babel.config.js does not match the method called in the example scanOCR.
It throws error saying Can't find variable: scanOCR
I actually think that the import is incorrect in the readme example. It's referencing an import from vision-camera-image-labeler instead of this library.
import { labelImage } from "vision-camera-image-labeler";
// ...
const frameProcessor = useFrameProcessor((frame) => {
'worklet';
const scannedOcr = scanOCR(frame);
}, []);
should be:
import { scanOCR } from 'vision-camera-ocr';
// ...
const frameProcessor = useFrameProcessor((frame) => {
'worklet';
const scannedOcr = scanOCR(frame);
}, []);