-
Notifications
You must be signed in to change notification settings - Fork 284
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
Move OpenCV to this app and statically link, then remove unused funtions #237
Comments
Do you mean transplant opencv source code? If yes, I tought of this before, but I wasn't capable of build it myself. My idea was to build a custom opencv only with functions needed by ONS and use it.
The aditional download is already solved on embedded-opencv branch and is this one that goes to Google Play and to the releases section of project, with optimiz ed package size. Unfortunately f-droid doesn't support splitted builds yet.
Em 11 de outubro de 2020 15:33:09 BRT, Emmanuel <notifications@github.com> escreveu:
…Move OpenCV to this app and statically link, then remove unused
funtions. This would allow for a smaller APK, and the need to download
another app.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#237
--
E-mail enviado do meu celular Android usando K-9 Mail. Por favor, desculpe minha brevidade.
|
Not really, I mean the library, statically linked to another library, that would then be shipped in the app. What did you try? |
This is already done in the embedded-opencv branch. Is is not on master because f-droid doesn't support splitted builds and the apk in fdroid would be huge be cause it needs to contain opencv for every arch supported.
Em 11 de outubro de 2020 17:49:05 BRT, Emmanuel <notifications@github.com> escreveu:
…> Do you mean transplant opencv source code? If yes, I tought of this
before, but I wasn't capable of build it myself.
Not really, I mean the library, statically linked to another library,
that would then be shipped in the app.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#237 (comment)
--
E-mail enviado do meu celular Android usando K-9 Mail. Por favor, desculpe minha brevidade.
|
Why is it so heavy? Couldn't you just strip unused functions on the second library? |
I think I'm understanding now what you suggesting. It is to create a new library that will compile and statically link to the used opencv functions, generating a smaller binary that then will be called from ons. Did I got it?
Do you know how to do this? I tried to build opencv myself without success, so to me it appears to be very hard!
On the embedded-opencv branch, all I did was include the official opencv dynamic libraries inside the apk.
Em 11 de outubro de 2020 19:03:53 BRT, Emmanuel <notifications@github.com> escreveu:
…> This is already done in the embedded-opencv branch. Is is not on
master because f-droid doesn't support splitted builds and the apk in
fdroid would be huge be cause it needs to contain opencv for every arch
supported.
Why is it so heavy? Couldn't you just strip unused functions on the
second library?
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#237 (comment)
--
E-mail enviado do meu celular Android usando K-9 Mail. Por favor, desculpe minha brevidade.
|
Yes.
I know how to compile and install opencv on Ubuntu, and I know how to dinamically link to opencv with a program written in C++. Not much after that. I'll see if I can learn how to do it in the next few days. |
this guide shows how to use the dynamic libraries built by opencv project, this is already done in the embedded-opencv (with a different approach, through the inclusion of a maven dependency that includes the libraries). Main problem is on how to build a custom opencv dynamic library only with functions needed by Open Note Scanner. I tried to build OpenCV libraries from source without success. |
The sdk has the static libraries at sdk/natives/staticlibs/*, no need to recompile OpenCV. |
Great, please work on this in a branch, since I will try to propagate changes already made on master branch to the other ones. I think that main problem can be publishing on f-droid, they don't like code with binaries and static libraries used on build may be activate some antifeatures there, if it is included through maven from another project, it is ok. |
I am stuck, having these two issues: Build statically, missing cv::countNonZero(cv::_InputArray const&) and Building OpenCV statically in app fails “error: undefined reference to 'ippicvsRound_64f'”. The time for this project has ended, but will update if some answers come back. |
my 50ct regarding this discussion:
|
@whatever42 ... this is already done on the apks available in the releases section of the project and also for app through Google Play... unfortunately F-Droid doesn't allow package bundles and on F-Droid this solution would embed on one apk all the versions of OpenCV. |
Move OpenCV to this app and statically link, then remove unused funtions. This would allow for a smaller APK, and the need to download another app.
The text was updated successfully, but these errors were encountered: