where should I put my image ?
Here is the code to show the image :
#include "highgui.h"
#include <iostream>
#include <cv.h>
using namespace std;
int main(int argc,char** argv)
{
char filename[]="0.jpg";
IplImage* img = cvLoadImage(filename,CV_LOAD_IMAGE_UNCHANGED);
if(!img){
cout<<"Error: Couldn't open the image file.\n";
}
cvNamedWindow("Example1",CV_WINDOW_AUTOSIZE);
cvShowImage("Example1",img);
cvvWaitKey(0);
cvReleaseImage(&img);
cvDestroyWindow("Example1");
}
>>> char filename[]="0.jpg";
How can it load an image without telling it the direct path of the image? or should I put my image in a default path?