Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

it seems, you want to mess with the compression params when saving.

here's it for png:

vector<int> flags; 
flags.push_back(CV_IMWRITE_PNG_COMPRESSION);
flags.push_back(9);  // [0-9] 9 being max compression, default is 3
imwrite("frame.png",frame,flags);

or jpeg:

vector<int> flags; 
flags.push_back(CV_IMWRITE_JPEG_QUALITY);
flags.push_back(99); // [0-99]   99==max_quality==no_compression
imwrite("frame.jpg",frame,flags);