简体   繁体   中英

Android Studio OpenCV NDK: Unspecified error, The function is not implemented

I write in Android Studio on Windows. And I use OpenCV in my native c++ code.When calling the function, I get this error in logcat:

"OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvShowImage, file /Volumes/Linux/builds/master_pack-android/opencv/modules/highgui/src/window.cpp, line 545".

I found different instructions how to do it in LInux but not any for Windows. Who knows how can I solve this problem?

The error means, that I cannot use opencv's gui / windowing functions on android, since window functions work much different there, than on a desktop pc.

This means, that I cannot use imshow() namedWindow() createTrackBar() or waitKey() , but have to use the native android equivalent

(it's neither a windows, not a linux problem, and recompiling won't change it)

Most likely it is that your library (build from NDK-Build) built wrongly or doesn't exist. Therefore, whichever OpenCV C++ Library you are accessing does not exist.

You will need to JAVAH your java files (whichever that will be having Native C++) code and then NDK-Build the generated CPP files.

Of course, you will require a custom Android.MK and Application.MK which OpenCV documents it at their official website at here!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM