Ask Your Question

alexiosk's profile - activity

2019-11-26 15:38:17 -0500 received badge  Popular Question (source)
2019-04-01 10:41:12 -0500 received badge  Popular Question (source)
2018-08-07 07:20:57 -0500 received badge  Nice Question (source)
2015-11-02 22:12:29 -0500 received badge  Student (source)
2015-11-02 12:54:11 -0500 asked a question Tutorial for OpenCV' Deep Learning Module for Android

Hi guys,

I prepared a tutorial on how to build an Android app that runs the OpenCV's DNN module. It is for demonstration/educational purposes. Basically it is OpenCV's tutorial on DNN (

Alternatively, you can import the project to you Android Studio and modify accordingly your file paths.

Here is the source code and tutorial:

Best, Alex

2015-10-26 10:17:29 -0500 received badge  Editor (source)
2015-10-26 10:16:42 -0500 asked a question Cannot open file through JNI

I have copied a txt file in my device's sdcard. In the Java side of my Android app (i.e. I can open the file through this code:

    StringBuilder text = new StringBuilder();
    try {
        File sdcard = Environment.getExternalStorageDirectory();
        File file = new File(sdcard,"/android-opencv/file.txt");

        BufferedReader br = new BufferedReader(new FileReader(file));
        String line;
        while ((line = br.readLine()) != null) {
    catch (IOException e) {


In my cpp file I try to open the same file doing the following:

  FILE* file = fopen("/storage/emulated/0/android-opencv/file.txt","r+");
  if (file != NULL)
        return env->NewStringUTF("Opened file");
        return env->NewStringUTF("Error!");

I have added reading permissions in the AndroidManifest.xml:

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

and I have checked the file path of the external storage directory that it is "/storage/emulated/0/"

Any ideas why this might be happening?

2015-10-24 08:48:49 -0500 received badge  Enthusiast
2015-10-22 19:20:45 -0500 received badge  Scholar (source)
2015-10-22 19:20:33 -0500 received badge  Supporter (source)
2015-10-21 11:11:25 -0500 asked a question How to run "" for Android SDK

I have cloned OpenCV (git clone git:// Following the instructions on I built the libraries and modules. Now how can I run "" in "opencv3/platforms/android/" to create the SDK? Runnning "python" requires the following arguments:

usage: [-h] [--ndk_path NDK_PATH] [--sdk_path SDK_PATH] [--sign_with SIGN_WITH] [--build_doc] [--no_ccache] [--extra_pack EXTRA_PACK] work_dir opencv_dir

Are the any examples on how to use this script?

2015-10-12 10:43:45 -0500 asked a question OpenCV Android and Deep Learning Module

I am developing an Android app and I would like to call the deep learning module ( .Is it possible? More importantly are all functions of OpenCV exposed to OpenCV Android?