Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

oh, note, that Mat's created with a 'borrowed' pointer don't release the 'borrowed' memory.

i guess, the err is due to 'recycling' that src mat for the resize operation. so src.release() still thinks, there's nothing to do

please try to use a fresh Mat for the resize:

Mat src(height_,width_,CV_8UC3,(void *)&bits_[0]);
Mat dst;
cv::resize(src, dst, cv::Size(width,height));
BMPImage result (dst);
//src.release(); // no more nessecary, not even for dst
//src = NULL;