-1

I have a problem with my pictures which need to be loaded. The problem is that they are in the asset folder and I tried to load them with the path:

static String objectFilename = "file:///android_asset/sblinksoben.png";

After that I tried to load it into a IplImage:

static IplImage object;
object = cvLoadImage(objectFilename,
                    CV_LOAD_IMAGE_GRAYSCALE);

Everytime when I check it with the debugger it only stands: object = null.

I don't know how to solve this problem...

Sander
  • 73
  • 2
  • 10

1 Answers1

0
static IplImage object;
 static
    {
        object = cvLoadImage(objectFilename,
                    CV_LOAD_IMAGE_GRAYSCALE);
    }
demongolem
  • 9,474
  • 36
  • 90
  • 105
Digit
  • 1,929
  • 1
  • 14
  • 17