-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvideo.cpp
More file actions
30 lines (24 loc) · 699 Bytes
/
video.cpp
File metadata and controls
30 lines (24 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "Video.h"
Video::Video( )
{
}
void Video::processVideo(string imageFilename) {
cv::namedWindow("Frame");
capture.open(0);
if (!capture.isOpened()) {
//cerr << "Unable to open video file: " << imageFilename << endl;
exit(EXIT_FAILURE);
}
while ((char)keyboard != 'q' && (char)keyboard != 27) {
frame = imread(imageFilename ,1);
if (!frame.empty()){
//cerr << "Unable to read img." << endl;
//cerr << "Exiting..." << endl;
exit(EXIT_FAILURE);
}
imshow("Frame", frame);
}
keyboard = waitKey(1);
//delete capture object
capture.release();
}