Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 28th, 2012  |  syntax: None  |  size: 0.30 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to check if an opencv window is closed
  2. cvNamedWindow("main", 1);
  3.  
  4. while(!cvWindowIsClosed("main"))
  5. {
  6.     cvShowImage("main", myImage);  
  7. }
  8.        
  9. char exit_key_press = 0;
  10. while (exit_key_press != 'q') // or key != ESC
  11. {
  12.    // retrieve frame
  13.  
  14.    // display frame
  15.  
  16.    exit_key_press = cvWaitKey(10);
  17. }