Is it possible to use this project with c++/JNI openCV code?
I just found this project, and it would be a huge boon to me to be able to use this instead of openCV4AndroidSDK
However, most of my openCV code is c++. Is it possible to use this project for that?
Hey @StainlessStlRat , did you manage to use C++ for this?
@skizzo i just used the tried and true method of bringing in the project as a module
@skizzo i just used the tried and true method of bringing in the project as a module
Could you share a code example?
@skizzo I only just realized this was on a non opencv forum. Go to openCV forum, download the openCV4AndroidSDK, follow their instructions for adding it as a module. That'll get you access to the Java part.
For c++ dev, you need to get a reference to the SDK/Libs. Assuming you know how to use CMake, here's what I do to get the reference. Note that ~/dev/OpenCV-... is where my sdk copy is.
set(OpenCVAndroidSDKLocation "~/dev/OpenCV-android-sdk") set(OpenCV_DIR "${OpenCVAndroidSDKLocation}/sdk/native/jni/") message(STATUS "Searching for openCV libs at: ${OpenCV_DIR}") find_package(OpenCV REQUIRED java) message(STATUS "opencv found: ${OpenCV_LIBS}")
Then you can add it to a target like this:
target_link_libraries(OpenCVUtil ${OpenCV_LIBS} )
Hope that helps