-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
33 lines (32 loc) · 873 Bytes
/
main.cpp
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
31
32
33
#include <iostream>
#include "AclProcess.h"
#include "opencv2/opencv.hpp"
using namespace std;
using namespace cv;
int main(int argc,char** argv)
{
VideoCapture cap;
cap.open(argv[2]);
cv::VideoWriter video;
video.open( "result.avi",
cv::VideoWriter::fourcc('H', '2', '6', '4'),
60.0,
cv::Size(
static_cast<int>(cap.get(cv::CAP_PROP_FRAME_WIDTH)),
static_cast<int>(cap.get(cv::CAP_PROP_FRAME_HEIGHT))
)
);
AclProcess aclprocess;
aclError ret = aclprocess.Init(0, argv[1]);
if(ret != ACL_ERROR_NONE){
cout << "AclProcess Init faild." << endl;
return -1;
}
Mat img;
while(cap.read(img)){
aclprocess.Process(img);
video.write(img);
// waitKey(1);
}
return 0;
}