Permalink
Browse files
Correctly terminates on file end
- Loading branch information...
Showing
with
2 additions
and
1 deletion.
-
+2
−1
EyeTab/EyeTab.cpp
|
|
@@ -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