Image Load

Feb 28, 2011 by admin    No Comments    Posted under: Programming

Example

just load a simple picture and print “Hello new program”!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 *      Author: Dimitrios Prodromou
 *      office@robotas.at
 */
 
// opencv includes
#include  /* required to use OpenCV */
#include  /* required to use OpenCV's highgui */
 
int main(int argc, char** argv)
 {
		IplImage* img = 0;
		img = cvLoadImage( "test.jpg",1 );
		printf("Hello new program!\n");
		cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE );
		cvShowImage( "Example1", img);
		cvWaitKey(0);
		cvReleaseImage (&img);
		cvDestroyWindow("Example1");
 
	return 0;
 }

Got anything to say? Go ahead and leave a comment!

You must be logged in to post a comment.