Friday 14 February 2014

OpenCV Program: Image Loading

Save image at location where your program is saved.
change the name of the image.

#include "opencv\cv.h"
#include "opencv\highgui.h"
#include <iostream>
int main(int argc, char** argv)
{
IplImage* img = cvLoadImage( "Brain.png" );
cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE );
cvShowImage("Example1", img);
cvWaitKey(0);
cvReleaseImage( &img );
cvDestroyWindow( "Example1" );
return 0;
}

No comments:

Post a Comment

OpenCV Cpp: Crop region of interest using sliding window

#include<opencv2/highgui/highgui.hpp> using namespace cv; using namespace std; Point point1, point2; /* vertical points of the boundi...