2.3 opencv。* imread不工作

时间:2022-10-14 21:15:39

I cant get imread to work, its same problem as this guy:

我不能让imread工作,它和这个人的问题是一样的:

OpenCV imwrite 2.2 causes exception with message "OpenCV Error: Unspecified error (could not find a writer for the specified extension)" on Windows 7

在Windows 7上,OpenCV imwrite 2.2导致消息“OpenCV错误:未指定的错误(无法找到指定的扩展名)”引发异常。

I just dont wannt use the workaround. Anyone know the problem?

我只是不愿使用变通方法。谁知道这个问题吗?

Using windows 7 64bit

使用windows 7 64位

2 个解决方案

#1


7  

The problem was due to mixing up debugging and release builds. If building in debug mode, the debug libs are needed. On unix this dont seem to be a problem.

问题在于混合调试和发布版本。如果在调试模式下构建,则需要调试libs。在unix上这似乎不是问题。

#2


6  

imread(filename) doesn't load any data if you use release libraries in debug mode. This is weird, I think it should'n happen but actually it does. Check this question asking about the reason why this is happening.

如果在调试模式下使用发布库,则imread(filename)不会加载任何数据。这很奇怪,我认为它应该发生,但实际上它确实发生了。检查这个问题,询问为什么会发生这种情况。

#1


7  

The problem was due to mixing up debugging and release builds. If building in debug mode, the debug libs are needed. On unix this dont seem to be a problem.

问题在于混合调试和发布版本。如果在调试模式下构建,则需要调试libs。在unix上这似乎不是问题。

#2


6  

imread(filename) doesn't load any data if you use release libraries in debug mode. This is weird, I think it should'n happen but actually it does. Check this question asking about the reason why this is happening.

如果在调试模式下使用发布库,则imread(filename)不会加载任何数据。这很奇怪,我认为它应该发生,但实际上它确实发生了。检查这个问题,询问为什么会发生这种情况。