Ask Your Question

Revision history [back]

simple question:starting with open cv

Hi, I am testing open cv with this simple code:

include <stdio.h>

// A Simple Camera Capture Framework int main() { CvCapture* capture = cvCaptureFromCAM( CV_CAP_ANY ); if ( !capture ) { fprintf( stderr, "ERROR: capture is NULL \n" ); getchar(); return -1; } // Create a window in which the captured images will be presented cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE ); // Show the image captured from the camera in the window and repeat while ( 1 ) { // Get one frame IplImage* frame = cvQueryFrame( capture ); if ( !frame ) { fprintf( stderr, "ERROR: frame is null...\n" ); getchar(); break; } cvShowImage( "mywindow", frame ); // Do not release the frame! //If ESC key pressed, Key=0x10001B under OpenCV 0.9.7(linux version), //remove higher bits using AND operator if ( (cvWaitKey(10) & 255) == 27 ) break; } // Release the capture device housekeeping cvReleaseCapture( &capture ); cvDestroyWindow( "mywindow" ); return 0; }

I build it, then I get this message:

1> stdafx.cpp 1> aver.cpp 1>aver.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification 1> aver.vcxproj -> C:\Users\user\Documents\Visual Studio 2010\Projects\aver_FULL - copia\Debug\aver.exe ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Then I press F5+Ctrl and the console windows opens, and shows a message: press to continue, I press and it stops... Why is that? Is it a problem with my PC? Thanks!

simple question:starting with open cv

Hi, I am testing open cv with this simple code:

include <stdio.h>

#include <stdio.h>  
// A Simple Camera Capture Framework 
int main() {
  CvCapture* capture = cvCaptureFromCAM( CV_CAP_ANY );
  if ( !capture ) {
    fprintf( stderr, "ERROR: capture is NULL \n" );
    getchar();
    return -1;
  }
 // Create a window in which the captured images will be presented
 cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE );
 // Show the image captured from the camera in the window and repeat
 while ( 1 ) {
   // Get one frame
   IplImage* frame = cvQueryFrame( capture );
   if ( !frame ) {
     fprintf( stderr, "ERROR: frame is null...\n" );
     getchar();
     break;
   }
   cvShowImage( "mywindow", frame );
   // Do not release the frame!
   //If ESC key pressed, Key=0x10001B under OpenCV 0.9.7(linux version),
   //remove higher bits using AND operator
   if ( (cvWaitKey(10) & 255) == 27 ) break;
 }
 // Release the capture device housekeeping
 cvReleaseCapture( &capture );
 cvDestroyWindow( "mywindow" );
 return 0;
}

}

I build it, then I get this message:

1> stdafx.cpp 1> aver.cpp 1>aver.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification 1> aver.vcxproj -> C:\Users\user\Documents\Visual Studio 2010\Projects\aver_FULL - copia\Debug\aver.exe ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Then I press F5+Ctrl and the console windows opens, and shows a message: press to continue, I press and it stops... Why is that? Is it a problem with my PC? Thanks!