vision-camera-ocr icon indicating copy to clipboard operation
vision-camera-ocr copied to clipboard

fix: fix ocr scanning method name mismatch

Open stanleyugwu opened this issue 3 years ago • 1 comments

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

stanleyugwu avatar Jun 22 '22 09:06 stanleyugwu

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);
}, []);

markrickert avatar Aug 16 '22 14:08 markrickert