Issue
First, I'm sorry I can not English well. I gave up googling, I was exhausted. Please give me tips.
I just finished NDK's h, cpp, Android.mk and Applicaiton.mk files and then I ran my application. It works well. But by adding one line Mat mat in cpp file, I got the error right away about cv::Mat~~
I immediately modified Mat
to cv::Mat
but I got other errors about cv::~~
. I think that I have to write using namespace cv;
. But this is Android Studio not C++. What should I do??
Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_LIB_TYPE:=STATIC
LOCAL_C_INCLUDES := C:\opencv-3.2.0-android-sdk\OpenCV-android-sdk\sdk\native\jni\include
LOCAL_MODULE := myCanny
LOCAL_SRC_FILES := myCanny.cpp
include $(BUILD_SHARED_LIBRARY)
Application.mk
APP_ABI := all
APP_MODULED := myCanny
APP_STL := gnustl_shared
APP_CPPFLAGS += -std=c++11
Solution
why don't you just use the java port of openCV? https://opencv-java-tutorials.readthedocs.io/en/latest/
If there is a reason you are using c++ code for image processing, let's talk.
somenamespace::function()
is the same if you set using namespace somenamespace
and just call function()
, so it's not necessary.
please share your cpp code to get more detais. maybe, you've forgot to #include "opencv2/imgcodecs.hpp"
?
Answered By - Va Fu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.