allgood / OpenNoteScanner

Android application for scanning and manipulating handwritten notes and documents.
Other
1.37k stars 285 forks source link

Newer version of OpenCV Manager #171

Open ghost opened 5 years ago

ghost commented 5 years ago

Currently latest OpenNoteScanner provide for direct download OpenCV Manager 3.1.0:

Steps to reproduce

Expected behaviour

  1. Proposed OpenCV Manager for direct download should be up to date (but still running on Android 5.0).
  2. Manually installed newer version of OpenCV Manager should be supported by OpenNoteScanner.

Actual behaviour

From README.md

Because of the version of OpenCV that is used in the project it needs to run on Android 5.0 (lollipop) or newer.

In order to capture and manipulate images Open Note Scanner depends on having the OpenCV Manager application installed. If not installed Open Note Scanner will ask to download it from https://github.com/ctodobom/OpenCV-3.1.0-Android or from Google Play Store.

There are few issues:

Would you like to work on the issue?

Testing.

IzzySoft commented 5 years ago

If it's not there (and not in Archive either – just checked, it's not in either): yes, you'd need to file an RFP for it to have it included.

allgood commented 5 years ago

I will correct README.md to reflect the current status. It is only wrong because OpenCV Manager was removed from Google Play.

Newer versions implies in changes on the code, currently suggested use of OpenCV is to embed binaries on the apk, this makes the apk file huge in order to support all architectures (don't know if F-droid allows different apks for different architectures), and, this will also demand setting of an anti-feature on the listing.

I tried to build packages of OpenCV directly from source, without sucess, if somebody helps me on building ONS + OpenCV libs directly from source into an APK of ONS, this help is welcome.

IzzySoft commented 5 years ago

currently suggested use of OpenCV is to embed binaries on the apk

which then renders the app inacceptable for F-Droid, which requires that all is build from source and the source tree has no blobs (apart from "image stuff", i.e. PNG, JPG etc).

allgood commented 5 years ago

@IzzySoft I think that it is possible to build the OpenCV binaries together with the ONS build process, then it is acceptable for f-droid, but I am lacking the knowledge on doing it.

allgood commented 5 years ago

I think it is also possible to compile only the subset of OpenCV C++ native code that Open Note Scanner uses, this way apk would be much smaller, but the amount of work on discovering how to do this is probably huge.

ghost commented 5 years ago

On F-Droid there is Identify Dog Breads app that use some sort of CV engine (OpenCV?) and has no external dependency on OpenCV Manager:

IzzySoft commented 5 years ago

@ctodobom yes, and me too (i.e. it's possible, and I have no idea either, not being an Android dev).

allgood commented 5 years ago

On F-Droid there is Identify Dog Breads app that use some sort of CV engine (OpenCV?) and has no external dependency on OpenCV Manager:

No, it is using the tensorflow Artificial Intelligence API, to which it sends the image in order to get the dog's breed.

allgood commented 5 years ago

Correction... looks like it have a tensorflow dataset inside the app. I do not know how tensorflow AI works, then my previous mistake.

apiraino commented 5 years ago

Hello, found this issue while searching for a solution: I've downloaded Open Note Scanner from F-Droid but I can't download the OpenCV SDK dependency.

Open Note Scanner from Google Play installs a working version of the app. I assume this is the only workaround until a solution is found for this issue?

Thanks

darkdragon-001 commented 5 years ago

@ctodobom I found this tutorial for building a subset of OpenCV and including it in an Android app: https://www.sisik.eu/blog/android/ndk/opencv-without-java

ghost commented 5 years ago

I found this tutorial for building a subset of OpenCV and including it in an Android app:

Cool! And here is example app sources described in this tutorial:

allgood commented 5 years ago

great, bookmarked to take a look.

main problem I think is that the whole build process must be automated to run on f-droid build servers.

best regards, Claudemir

Em qui, 5 de set de 2019 às 14:28, app4soft notifications@github.com escreveu:

I found this tutorial for building a subset of OpenCV and including it in an Android app:

Cool! And here is example app sources described in this tutorial:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ctodobom/OpenNoteScanner/issues/171?email_source=notifications&email_token=ABOKDUEKFGECBQJR3CZDTQTQIE6SZA5CNFSM4ILTIAH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6ABHVY#issuecomment-528487383, or mute the thread https://github.com/notifications/unsubscribe-auth/ABOKDUBFEX4C5LYLB2IGODDQIE6SZANCNFSM4ILTIAHQ .

IzzySoft commented 5 years ago

Yes, there's that. But this part currently missing keeps many F-Droid users from using your app – who otherwise would love to (myself included). So if it is not too much trouble, it would certainly be worth it.

For an interim: If you could get it to build at all, ping me and I could take it into my repo until it's completely ready for the official one. That would at least keep Play Store out of the equation for those who want to keep it out. Of course the final goal should be having it in the official repo.

opusforlife2 commented 4 years ago

@ctodobom Did you get the chance to look at this again?

allgood commented 4 years ago

@opusforlife2 , unfortunately not. Priorities are making me away of ONS development. From time to time I check if there is some contributions and accept pull requests. For now this is all I can do.

xordspar0 commented 4 years ago

don't know if F-droid allows different apks for different architectures

Yes, it runs the build once for each architecture and builds one apk for each one. If we compiled OpenCV as part of the build, we wouldn't have a huge apk that has support for all arches.

xordspar0 commented 4 years ago

That's not quite true, actually. It's possible, but it doesn't happen by default. Here are some issues with more information: