OpenCV (Open Source Computer Vision Library)
OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision.
To Install
Step 0. Get an IDE with a C/C++ compiler
We recommend Code::Blocks for its ease of use.
Step 1. Download OpenCV
The release version (1.1pre1) is currently more stable.
Step 2. Set up your IDE for OpenCV
Set up OpenCV 1.1 with Code::Blocks
References
Visit the OpenCV wiki at Willow Garage
Get the book Learning OpenCV: Computer Vision with the OpenCV Library
Sample Program
/* Image Capture and Display */
/* Here is a quick sample program to get you started. */
#include <iostream>
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
using namespace std;
int main()
{
IplImage* img = cvLoadImage("sample.png");
cvNamedWindow("Image", CV_WINDOW_AUTOSIZE);
cvShowImage("Image", img);
cvWaitKey();
cvDestroyWindow("Image");
cvReleaseImage(&img);
return 0;
}
/* Here is a quick sample program to get you started. */
#include <iostream>
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
using namespace std;
int main()
{
IplImage* img = cvLoadImage("sample.png");
cvNamedWindow("Image", CV_WINDOW_AUTOSIZE);
cvShowImage("Image", img);
cvWaitKey();
cvDestroyWindow("Image");
cvReleaseImage(&img);
return 0;
}