Skip to content
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

✨ Add opencv_extras recipe #2209

Merged
merged 4 commits into from
May 28, 2020
Merged

Conversation

opacam
Copy link
Member

@opacam opacam commented May 20, 2020

This recipe allows us to build extra modules from the opencv_contrib repository. It depends on opencv recipe and all the build of the modules will be performed inside opencv build directory.

This closes #2206

Note: I've not tested this recipe at runtime but it builds fine for arm64-v8a in my local tests, plus generates the extra opencv libraries (which are a lot so probably will increase the size of the apk considerably).

See also: https://github.com/opencv/opencv_contrib

@opacam opacam force-pushed the feature-opencv-extras branch from 9f0aa3b to eb6cc6b Compare May 20, 2020 10:19
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, looking good 👏
Ping me once it's no longer WIP so I don't miss it

Makefile Outdated
@@ -38,7 +38,7 @@ testapps-with-numpy/%: virtualenv
$(eval $@_APP_ARCH := $(shell basename $*))
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \
python setup.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
--requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools,numpy \
--requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools,numpy,opencv,opencv_extras \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to have opencv and extras build each time? Or is it just for temporary testing the PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hahaha....this was only to test the build...I will reverse it later (that is why I labeled this PR wip and put the emoji 🚧 in my last commit).

Here are the artifacts for each arch:

https://github.com/kivy/python-for-android/actions/runs/110275077

Btw, it almost doubles the size of the apk...anyway, it may be useful to someone and it doesn't look like hard to maintain.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great that what's I thought, but wasn't sure 👍
I have nothing against merging, ping me for the final review

@SonofPoseidon1982
Copy link

SonofPoseidon1982 commented May 25, 2020

Thanks and well done Opacam. I will keep you up to date on my progress with using this recipe.

@opacam opacam changed the title [WIP] ✨ Add opencv_extras recipe ✨ Add opencv_extras recipe May 28, 2020
AndreMiras
AndreMiras previously approved these changes May 28, 2020
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, is this still in progress?

@@ -32,6 +32,7 @@ class OpenCVRecipe(NDKRecipe):
'libopencv_dnn.so',
'libopencv_imgcodecs.so',
'libopencv_photo.so'
# todo: add opencv_extras libraries
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the story on that one?

Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@opacam
Copy link
Member Author

opacam commented May 28, 2020

Well, the travis error is expected...this recipes compiles an insane number of libraries and it takes too long, anyway, we know that it builds thanks to previous tests with gh-actions, so let's merge this!!

@AndreMiras, thanks for the review!! 😄

@SonofPoseidon1982, thanks for the testing and feedback!! 👍

@opacam opacam merged commit c8c9776 into kivy:develop May 28, 2020
@opacam opacam deleted the feature-opencv-extras branch May 28, 2020 13:11
lerela added a commit to chronolife-rd/python-for-android that referenced this pull request Jun 23, 2020
🔖 v2020.06.02

* Adds missing requests sub dependencies (kivy#2221)
* Bumps to Gradle 6.4.1 (kivy#2222)
* Bumps to Cython==0.29.19 (kivy#2220)
* Updates install and troubleshooting docs (kivy#2219)
* Bumps to Ubuntu 20.04 (kivy#2218)
* Attempt to improve the issue template (kivy#2217)
* Add `opencv_extras` recipe (kivy#2209)
* Split logic for build modes & debug symbols (kivy#2213)
* Troubleshoot SSL error (kivy#2205)
* Remove superfluous recipes fixes (kivy#2202)
* Add tests for hostpython3 recipe (kivy#2196)
* Fix for 'cannot find setuptools module' (kivy#2195)
* Rename `Hostpython3Recipe` class to camel case (kivy#2194)
* Fix `test_should_build` (kivy#2193)
* Add initial tests for python3 recipe (kivy#2192)
* PythonActivityUtil helper for unpacking data (kivy#2189)
* Fixes flake8 errors post update (kivy#2191)
* Share PythonUtil.java between bootstraps (kivy#2188)
* Java code linting using PMD 6.23.0 (kivy#2187)
* Deletes deprecated renpy Python{Activity,Service}.java (kivy#2186)
* Removes java concurrency/ folder (kivy#2185)
* Reuse common AssetExtract.java (kivy#2182)
* Use common Hardware.java (kivy#2183)
* Moves kamranzafar/ java directory to common/ (kivy#2184)
* Updates release documentation (kivy#2177)
* Fixes service only unittest loading (kivy#2181)
* Narrows some context manager scopes (kivy#2179)
* Downgrades to SDL2 2.0.9 (kivy#2180)
* Bump to SDL2 2.0.10 & extract .java from SDL2 tarball (kivy#2113)
* Adds pygame recipe (kivy#2164)
* Adds macOS install instructions (2165)
* Removed python2 support mention from README (kivy#2162)
* Adding more assets (kivy#2132)
* Get --add-source working for dirs in Gradle builds (kivy#2156)
* Fixes python build with macOS venv (kivy#2159)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

My despair at trying to simply import the opencv face class (python-for-android)
3 participants