I developed a real time camera application that uses android, python and opencv. The app crashes because of this instruction cv2.imshow("Frame", clone). The logcat shows that :
com.chaquo.python.PyException: error: OpenCV(3.4.2) /home/smith/git/chaquo/python/server/pypi/packages/opencv-python/build/3.4.2.16/cp36-cp36m-android_15_armeabi_v7a/src/opencv/modules/highgui/src/window.cpp:632: error: (-2: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 function 'cvShowImage'
When I replace it with plt.imshow(...,...) then plt.show() the app runs but dosn't show any detection because matplotlib.pyplot is not designed to show real time detection
Is there any solution?
As mentioned here, OpenCV doesn't directly support any Android user interface features. The easiest solution is probably to do the reverse of your other question, and transfer the image back to Java as a byte array.