Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 6

Answer by berak for 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...

$
0
0
"I'm sure the path to the picture is good" let me bet against that ;) getClass().getResource("lena.png").getPath() just try to replace that monster with an absolute path for starters, like: "/home/me/lena.png", or "c:/me/ma/miao/lena.png" // note : "/", not "\" (an empty image is quite typical for imread not finding it)

Viewing all articles
Browse latest Browse all 6

Trending Articles