Integrate OpenCV into Android Studio
suggest changeVersions
These notes were documented against Android 4.3 through 7.1.
Remarks
The OpenCV libraries can be found on the web by using a search engine.
The Gotchas:
- If you set the target below API 21, some of the OpenCV libraries will no longer compile, specifically the classes related to org.opencv.android.Camera2Renderer and other related classes.
android.hardware.camera2arrived in API 21. You can probably get around this by simply removing the appropriate OpenCV .java files. - A file-loading example is not on this page. Passing a
file://URI to another app throwsFileUriExposedExceptionwhen the app targets API 24 or higher. Reading an app-private absolute path inside the app still works.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents