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

后端 未结 7 926
慢半拍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 12:43

    I run into the same runtime error "opencv error unspecified error (could not find a writer for the specified extension)". I used the same solution as Pieter, that is in the project setting-->linker-->Input-->Aditional Dependencies, I specified to use the debug version of the opencv libs for MSVS debug cofiguration, and specify to use the release version of the opencv libs for MSVS release configuration. Then the runtime error is gone.

提交回复
热议问题