Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

your code works nicely here on win / vs2008

i bet a beer, that it just could not find your image ;)

src = imread( "lena.bmp",1 );
if ( src.empty() )
{
    cerr << "you owe me one!" << endl;
    return -1;
}

ah, idea... if you start your prog from the ide, by default it starts from debug or release folder, not your solution/proj folder. (might explain, why it found it on linux, but not on win like this)

you can adjust that from the debug settings in your proj.

your code works nicely here on win / vs2008

i bet a beer, that it just could not find your image ;)

src = imread( "lena.bmp",1 );
if ( src.empty() )
{
    cerr << "you owe me one!" << endl;
    return -1;
}

ah, idea... if you start your prog from the ide, by default it starts from debug or release folder, not your solution/proj folder. (might explain, why it found it on linux, but not on win like this)

you can adjust that from the debug settings in your proj.


oh, also you don't need cvtColor( src, src_gray, CV_BGR2GRAY ); twice ..