adamgf / react-native-opencv3

react-native-opencv3 wraps functionality from OpenCV Java SDK 3.4.4 + contrib modules and iOS OpenCV 3.4.1 + contrib modules for use in React-Native apps. Please enjoy!
Other
192 stars 65 forks source link

To update openCv libraries to the latest (i.e. 4.5.1) #42

Open iuri opened 3 years ago

iuri commented 3 years ago

Hello Adam, We've successfully installed react-native-opencv3-tests, and all modules worked fine in my Android device (Motorola). Unfortunately, the didn't work in a Samsung device. We have no clue what's causing the problem. All App modules (i.e. CvCameraPreview, CvFaceDetection, ...) just stop, and all of sudden the app shuts down and the screen close after 1 or 2 minutes later, while executing, displaying a warning message.

In the apk release installation, the behavior is a bit different. The app just restart after 1 or 2 minutes later when running FaceDetection Screen for instance.

As this problems is present in all modules, we believe it's located at react-native-opencv3 module. We wondered if upgrading openCv libraries from 3 to the latest (i.e. 4.5.1) would fix the bug.

if so, How could we upgrade OpenCV kernel ? How could we just replace openCv3 kernel to 4.5.1?

Best wishes, I

iuri commented 3 years ago

So far, we found a thread in StackOverflow Forum, where we could match similarities in the process of importing OpenCV lib to RN, and from there start to evolve in our upgrading openCV core's task.
https://stackoverflow.com/questions/59800761/how-can-i-import-opencv-library-to-react-native-project?rq=1

However, this thread is related to another RN OpenCV provider/module (i.e. react-native-opencv-tutorial) from BrainHub website, thus we`re still stuck https://github.com/brainhubeu/react-native-opencv-tutorial/tree/master/android/app/src/main/java/com/reactlibrary

We've downloaded OpenCV SDK v.4.5.3 https://opencv.org/releases/ and now we are investigating (ad-hoc process) how could we import this newest SDK into RN using directly Android Studio.

All that has been done, based in the assumption that upgrading OpenCV to 4.5.3 will solve the "unwanted shutdown" problem of the app.

Meaning, we don`t know 100% of th cause.

Were 100% that the problem is in react-native-openCV3 module, but we dont know where.
Perhaps it could be a hardware constraint of Samsung devices, since the app works ust fine in the Motorola's

iuri commented 3 years ago

Nice and Official Documentation https://opencv.org/android/