opencv iplimage转jpg

IplImage* iplimage

cv::Mat tempMat(iplimage);

vector buff;
cv::imencode(".jpg",tempMat,buff);
CxImage xImg(&buff[0],buff.size(),CXIMAGE_FORMAT_JPG);

uint8_t *pJpgDataTemp = NULL;
int32_t lJpgSize = 0;

xImg.Encode(pJpgDataTemp,lJpgSize,CXIMAGE_FORMAT_JPG);


free(pJpgDataTemp);

你可能感兴趣的:(opencv iplimage转jpg)