Dipl.-Phys. Ing. Gordon Taft
OpenCV
OpenCV is a library of programming functions mainly aimed at real time computer vision, developed by Intel and now supported by Willow Garage. It is free for use under the open source BSD license. The library is cross-platform. It focuses mainly on real-time image processing. If the library finds Intel's Integrated Performance Primitives on the system, it will use these commercial optimized routines to accelerate itself.
[Source:Wikipedia]


Example: Show webcam output


#include <iostream>
#include "cv.h"
#include "highgui.h"

int main()
{
    CvCapture *capture = 0;
    IplImage  *frame   = 0;
   
int        key     = 0;

    capture = cvCaptureFromCAM( 0 );        
// initialize camera

    if ( !capture ) {                        // always check
        std::cerr << "Cannot open webcam!\n";
       
return 1;
    }

   
// create a window for the video
    cvNamedWindow( "result", CV_WINDOW_AUTOSIZE );

   
while( key != 'q' ) {
        frame = cvQueryFrame( capture );    
// get a frame
        if( !frame ) break;                  // always check

        cvShowImage( "result", frame );      // display current frame

        key = cvWaitKey( 1 );                // exit if user press 'q'
    }

   
// free memory
    cvDestroyWindow( "result" );
    cvReleaseCapture( &capture );

   
return 0;
}

Download 64Bit