I have an app built on React Native whose core functionality is to capture some images, analyse and process the images and return some results. As of now the image analysis was done in the server side using python and opencv. Only the results and the resultant images were returned. Now as per the requirement by the clients, due to privacy concerns, they want the image processing to be done on the mobile app itself. (As the images are medical related and they don't want the images to be sent to the server)
So, my question is, if there is a way I can use my existing python with opencv code and integrate it directly into react-native/android/ios?
Right now what I am doing is using the library react-native-opencv3 , numjs, etc to re-write the algorithm in react-native as I feel comfortable using javascript (I have no experience in swift). However not all opencv, numpy functions are supported by these libraries and it is consuming all the time to re-write the code.
I found about using jython, python-for-android and swift-python-interoperabilityCan I use these to directly integrate python opencv code into my current application? If yes, it would be great if someone can help me with some small example or guidelines as I cannot find anything.
Other method that I considered was:
Re-write the algorithm using native code and opencv-android and opencv-ios sdks and create the react-native bridge to call the algorithm. (I am guessing it will take a lot of time as I have to write in 2 different languages. Time that I don't have)