开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜