Permalink
Browse files

Correctly terminates on file end

  • Loading branch information...
1 parent f2dc929 commit ec6b3bc3159337ce8ee792d5cbc243639d576359 @errollw committed Feb 25, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 EyeTab/EyeTab.cpp
View
@@ -44,8 +44,9 @@ int main(int argc, const char** argv)
while(cap.isOpened()) {
clock_t start = clock();
- // read in a new image frame
+ // read in a new image frame, break at end of file
cap >> captureFrame;
+ if (captureFrame.empty()) break;
// convert captured image to equalized gray scale
cvtColor(captureFrame, grayscaleFrame, CV_BGR2GRAY);

0 comments on commit ec6b3bc

Please sign in to comment.