Reading a test image with OpenCV under Android emulation

  android, android-emulator, c++, opencv4android

I need to test native C++ code interfaced to an Android app (Java).

Specifically, I want to call OpenCV’s imread to load an image from a file. I have tried different approaches such as obtaining [what I think to be] the external path (PC emulation side) corresponding to the internal path (Android side), or dropping the file to the device, which seems to send it to /sdcard/Download, among other.

In no case does imread succeed.

What can I do ? Is this a matter of special path naming ? A matter of access protection ?

Please note that I would like to find a solution that works straight from the C++ side if possible.

Source: Windows Questions C++

LEAVE A COMMENT