Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Image is empty

Hi,

i'm totally new with OpenCV and i'm starting with the Java version.

I'm trying some basics. The first part in the java tutorial was a success. I'm trying the Lena's Face detection. But i've a problem when I'm loading the file :

Mat image = Highgui.imread(getClass().getResource("lena.png").getPath());
System.out.println(image.toString());

Console return :

Mat [ 0*0*CV_8UC1, isCont=false, isSubmat=false, nativeObj=0x1ffed20, dataAddr=0x0 ]

I'm sure the path to the picture is good, if i change it i've a segmentation fault.

If someone have a idea...