Ask Your Question

dlavy88's profile - activity

2015-11-07 13:17:51 -0500 received badge  Enthusiast
2015-10-22 10:42:53 -0500 answered a question Access violation when using imwrite to save an imageMat

This is the piece of code I used to save a png file:

//Save the output image
cv::Mat frame0; //output of my program
vector<int> compression_params;
compression_params.push_back(CV_IMWRITE_JPEG_QUALITY); // compression technique
compression_params.push_back(98); //compression quality
bool bSuccess = imwrite("hands.png", frame0, compression_params); 

I don't really need to use imencode just those 4 lines.

Hope it helps.