openCV imdecode works slowly
I'm working with MJPEG big sequences (e.g. 3000 JPEGs in sequence). I'm holding this JPEG sequence in vector of object containing JPEG data as std::vector<char> vBufferPFDecode
. I want to show this data with openCV hightGUI
methods (imsho开发者_JS百科w), so I have to convert it to cv::Mat
type with method:
cv::Mat pMat=cv::imdecode(cv::Mat(vBufferPFDecode), -1 );
It works, but to slowly - I can only get 8-10 frames per second. Do you know any alternative methods?
I think you are allocating a whole new frame each time, instead of using the data and attaching it to a MatHeader.
Please Post the entire code to confirm.
精彩评论