Closed pepperav closed 5 months ago
hi, I put how to solve this here #9
I didn't test it again to see if how now the vision camera is working fine with the runAsync function but you can always modify in the native side
Thank you for the quick reply 🙂
I did the refactor suggested by you on #9
/** Process camera frames */
const frameProcessor = useFrameProcessor(
(frame) => {
'worklet'
runAsync(frame, () => {
'worklet'
/** Scanner */
runAtTargetFps(10, () => {
'worklet'
/** Scan text */
const text: TextDataMap = scanText(frame, { language: 'latin' })
console.log(text)
})
})
},
[scanData],
)
plus babel.js config, and I get a strange error:
Frame Processor Error: Exception in HostFunction: java.lang.ClassNotFoundException: Didn't find class "com.facebook.jni.MapIteratorHelper" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/system/lib64, /system/product/lib64, /system/lib64, /system/product/lib64]], js engine: VisionCamera
Any tips here?
EDIT:
Updating react-native-worklet-core
to 0.3.0
it was fixed and also the lag! 🎊
Thank you @ismaelsousa and keep going on! 💪
cool 😎
Hello @ismaelsousa, I'd like to thank you for supporting this project. I added it to my app and I am glad to you about the constant maintenance that you do frequently.
I recently upgraded from
visioncamera 3.6.4
andismaelsousa/vision-camera-ocr 2.1.1
tovisioncamera 3.9.0
withismaelsousa/vision-camera-ocr 2.2.3
.Well, unfortunately, the same code on the same Android phone (no issues on iPhone) I saw a deep slowing performaces when calling
const scannedOcr = scanOCR(frame);
Basically everything starts to lag and run slowly!
I've also tested with
ismaelsousa/vision-camera-ocr 2.3.0
but without success.What has changed so much to have such an impact on responsiveness?