-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation error #2
Comments
Hi @xkraty. Thanks for opening the issue. This is something I wanted to add in the readme. Getting Opencv package to play nicely with RN out-of-box is almost impossible. Believe me I had tried make it as dummy as possible to the best of my knowledge. But the reality is setting up opencv to work nicely with Android itself is a challenging enough task. I suggest you look at a few examples to understand how OpenCV works with Android first then proceed to manual installation. Try out my Android Native Scan Doc sample if you want to first check out how the scan doc helps you to crop a doc in image. Again, I am open to have some help from the community to improve the package documentation. Thanks for opening the issue. I understand most of the scan doc package out there cost a fortune but OpenCV is no easy thing to deal with and I would like to have some serious help. I myself unfortunately is tied up with other work of my own. Will look into this seriously once I got time and resource. Thanks. |
@xkraty Can you make it work? Thanks. |
@ducpt2 no sorry, we dropped it in favor of scanbot even if it require a license |
@xkraty I was asked to pay 20k Euro a year that is exactly why I started this repo... |
@beast I am sorry I didn't mean minimize your work or blame you since you did a great job here, we just didn't have enough skill/time to dig into Android and the company wanted it fast, so they'll pay for. |
@beast I was following this repo because I'm migrating mobile apps to react native and one feature the Android app has is a document Scanner done with OpenCV. I managed to get it to work in Android and we have released it. I could help if I can. What would you need? I'm thinking that you probably need a installation instructions on how set up the OpenCV library in android and checking that it works ok, anything else? I will try to get into this as soon as I can. |
@khrizt Yes. Please help on the installation instructions. That will be greatly appreciated. Another thing I was wondering is how to get OpenCV installation work with this package automatically. Thanks! |
@beast Ok, I'll look into it and let you know. |
@xkraty No offence taken. I did understand the frustration of people not able to get it working. Unfortunately I couldn't invest more time to explain how exactly this works due to my own work. Really hope I could get some help or I could manage to find some time for this. |
@beast I very appreciated your work :) Thanks. |
Ok, I managed to compile and run the example but with a couple of errors, I found an error here: Also have you considered using the camera built-in in OpenCV instead of a react native module? Sorry I didn't mentioned you @beast |
@khrizt thank you for your effort. Pls let us know if you can fix it :) Thanks. |
@khrizt Thanks for the looking into this. It has been quite a while ago so it could be somewhere down the road of RN changes that this is no longer needed. I did it because back then I had a problem retrieving the activity from Android for RN consumption. I had seen built-in openCV like an iOS lib that does this but the edge detection was pretty bad when I mix with other objects. Anyway, I know my detection code is good in Native Android, see https://github.com/beast/android-opencv-scan-doc And I had built RN lib before, but I am really not sure how to make openCV play nicely with RN. Do you mind sharing what you did with your own project? Thanks. |
Sorry for the late reply, I had a busy week. The main difference between what I've seen in your project and mine is that I added the static {
if(!OpenCVLoader.initDebug()){
Log.d(TAG, "OpenCV not loaded");
// mostrar error
} else {
Log.d(TAG, "OpenCV loaded");
connected = true;
}
} And use OpenCV methods normally. As I said in a previous comment I use the I think that's all, please tell me if you want me to test something, or if you need anything. |
Hi, Today I've been trying to apply my configuration to this project and so far I have been unsuccessful. I really don't understand what's wrong because gradle can't find OpenCV library in the react-native-scan-doc module, even I have it set up just like my project. I'll try some more today and tomorrow and will let you know. |
@beast If I can't make it work, would it be ok for you if I create a new project and set it up again, with newer react and opencv versions and try your code inside? |
@khrizt I'm very appreciated your effort. Can you make a video how to set things up? I will learn a lot from this video (like bridge, setup opencv...)? Thank you so much. |
@khrizt Actually that was the same problem I was facing. I always had hit and misses when I try on my own. So I was not 100% sure what was wrong. Because as you could tell that my android native one will always certainly work... |
@beast There's something there to find out :) I'll try it again soon and try to make some sense of the situation. EDIT: by the way, I found someone who has compiled OpenCV and uploaded to maven, maybe it's something worth trying deeply. I tried with my fork of your project and gave me the same error but that was after 2 hours of struggling with the error we are talking about, so maybe... who knows. @ducpt2 I found a tutorial for setting up OpenCV with android native that works, has video and article: https://www.learn2crack.com/2016/03/setup-opencv-sdk-android-studio.html |
@khrizt oh, many thanks. 👍 |
@khrizt really thanks for the link, also if anyone wants more details ragarding native android opencv integration: https://stackoverflow.com/questions/27406303/opencv-in-android-studio |
Anyone still work on this project? |
any update on this? |
I've found a opencv react native tutorial that may be of some help, if someone wants to take a look: https://brainhub.eu/blog/opencv-react-native-image-processing/ |
Hello,
I've added
"react-native-scan-doc": "git+https://[email protected]/beast/react-native-scan-doc.git"
andnpm install
the package; I both tried manual and linking installation and it fail at compiling, it might something stupid to you but I'm not so used about Android.Console output:
Thanks in advance
Chris
The text was updated successfully, but these errors were encountered: