-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathavi.cpp
More file actions
30 lines (26 loc) · 658 Bytes
/
avi.cpp
File metadata and controls
30 lines (26 loc) · 658 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 "avi.hpp"
/* aviWriter::aviWriter() {{{*/
aviWriter::aviWriter()
{
}
/* }}} */
/* aviWriter::aviWriter( string path, int fps, cv::Size vidSiz ) {{{*/
aviWriter::aviWriter( string path, int fps, cv::Size vidSiz )
{
this->path = path;
this->fps = fps;
this->vidSiz = vidSiz;
this->writer.open( path, CV_FOURCC( 'D', 'I', 'V', 'X' ), fps, vidSiz );
}
/* }}} */
/* void aviWriter::operator << ( cv::Mat mat ) {{{*/
void aviWriter::operator << ( cv::Mat mat )
{
CV_Assert( mat.size() == this->vidSiz );
if ( mat.channels() == 1 )
{
cv::cvtColor( mat, mat, CV_GRAY2RGB );
}
this->writer << mat;
}
/* }}} */