martin20150405 / opencv4androidwithcmake Goto Github PK
View Code? Open in Web Editor NEWUse Android Studio 3.0 (>=2.2) and Cmake Toolchain to make your Android device fly with Opencv (OpenCV 3.40)
Use Android Studio 3.0 (>=2.2) and Cmake Toolchain to make your Android device fly with Opencv (OpenCV 3.40)
app/CMakeLists.txt line 16 增加:
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp)
然后synchronize一下即可
Hi @Martin20150405 ,
Thx for your work, I used orb-slam2 for android studio , but metting with some problem, can you show us with orb-slam2 in Android studio.
Thx
2021-08-15 19:08:08.065 31485-31485/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.jiangdg.opencv4android, PID: 31485
java.lang.RuntimeException: Unable to resume activity {com.jiangdg.opencv4android/com.jiangdg.opencv4android.imgproc.ImageSmoothActivity}: CvException [org.opencv.core.CvException: cv::Exception: OpenCV(3.4.1) /build/master_pack-android/opencv/modules/imgproc/src/color.cpp:11115: error: (-215) scn == 3 || scn == 4 in function void cv::cvtColor(cv::InputArray, cv::OutputArray, int, int)
]
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4270)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4302)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7562)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: CvException [org.opencv.core.CvException: cv::Exception: OpenCV(3.4.1) /build/master_pack-android/opencv/modules/imgproc/src/color.cpp:11115: error: (-215) scn == 3 || scn == 4 in function void cv::cvtColor(cv::InputArray, cv::OutputArray, int, int)
]
at org.opencv.imgproc.Imgproc.cvtColor_1(Native Method)
at org.opencv.imgproc.Imgproc.cvtColor(Imgproc.java:1896)
at com.jiangdg.opencv4android.imgproc.ImageSmoothActivity$1.onManagerConnected(ImageSmoothActivity.java:64)
at com.jiangdg.opencv4android.imgproc.ImageSmoothActivity.onResume(ImageSmoothActivity.java:109)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1454)
at android.app.Activity.performResume(Activity.java:8050)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4260)
你好,在你的设置opencv cmake的那篇文章中,我按照你的方法,但是最后.apk文件里没有包含那两个.so文件,并且将你的项目下载下来,发现jniLibs这个文件夹优点特殊,貌似被认为是某种resource folder或assets folder,请问你是怎么让.so文件自动复制到.apk文件里的啊?谢谢
你好, 在编译时报这个错
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.