OpenCV - could not find encoder for the specified extension

后端 未结 1 754
北海茫月
北海茫月 2021-02-02 17:00

Here is my code I am using to convert *IplImage to jpg:

IplImage* fIplImageHeader;
fIplImageHeader = cvCreateImageHeader(cvSize(160, 120), 8, 3);
fIplImageHeader         


        
相关标签:
1条回答
  • 2021-02-02 17:19

    Ok. I've figured this out. This works:

    cv::imencode(".jpg", fIplImageHeader, buf, p);
    

    They should mention it somewhere in the documentation that there should be a full stop before extension.

    0 讨论(0)
提交回复
热议问题