cv::imwrite could not find a writer for the specified extension

后端 未结 7 942
慢半拍i
慢半拍i 2020-12-25 12:24

The following command causes an exception.

cv::imwrite(\"test.jpg\", diffImg);

I also tried numerous variations on this, including absolute

7条回答
  •  余生分开走
    2020-12-25 13:04

    Before trying anything else, be sure you are setting up OpenCV and the VS project according to this answer, and be carefully not to mix OpenCV release libraries with the debug libraries.

    There are a couple of things you might try:

    • If you are on Windows 7 64 bits, you might want to follow this or this instructions.

    • I noticed a similar question on javacv wiki and this is another possible solution:

    1. Head over to this page, follow the instructions to setup opencv 2.3.1 till Step 2. (Use 32-bit mode)

    2. Download the latest version of TBB for Windows from here.

    3. Extract the TBB zip file and copy all .dll files inside / bin / ia32 / vc10 and all .dll files in / bin / ia32 / vc10 / irml into your C:\ OpenCV 2.3.1\ build\ x86\ vc10\ bin

    Let us know how you did.

提交回复
热议问题