Sunday, 6 November 2011

SIMPLE OPENCV PROGRAM AND ITS EXECUTION

here is a simple OpenCv program to get image from a location in the computer and show it using a windows console


#include "stdafx.h"
#include "stdafx.h"
#include "cv.h"
#include "highgui.h"

int _tmain(int argc, _TCHAR* argv[])
{
 IplImage *image = 0;
 image = cvLoadImage( "" D:/PHOTOES/Images/mylogo2.jpg", 1 );
  cvNamedWindow( "Show", 1 );
  cvShowImage( "Show", image );
  printf( "Press any key to exit\n");
  cvWaitKey(0);
  cvDestroyWindow("result");
  return 0;
}

output
  note:- to compile a program we need to press F5 or go to Debug->Start Debugging




No comments:

Post a Comment