Tuesday 15 June 2010

image - Problems with C++ openCV file opening -



image - Problems with C++ openCV file opening -

i have done numerous attempts , can't seem simple code working. have installed libraries correctly, include path correct, have tried visual studio 2012 , on 2010. reason works:

iplimage* img1 = cvloadimage("c:\\users\\mota\\documents\\visual studio 2010\\projects\\stabilization\\stabilization\\law.jpg");

img1 loads correctly.

however, if seek c++:

mat img = imread("c:\\users\\mota\\documents\\visual studio 2010\\projects\\stabilization\\stabilization\\law.jpg");

then application crashes message saying "opencv error: assertion failed (size....) same path, have 2 different results. i've been on problem while now, knows do? there wrong c++ libraries? it's same thing videos, or needs load file.

thanks

you can seek giving path using forwards slash this,

mat img = imread("//home//desktop//opencv//1.jpg")

c++ image visual-studio-2010 opencv visual-studio-2012

No comments:

Post a Comment