Why can't I open avi video in openCV?

前端 未结 11 1287
一生所求
一生所求 2020-11-29 10:25

I just wrote a simple video reading example with openCV2.3.1, but it seems that I cannot open avi video anyway :(

Vid         


        
11条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-29 10:27

    I'm just adding on to this since I spent more time than I'd like to admit. Not being able to open the file caused a ton of strange exceptions.

    If you find that absolute paths work, while relative paths don't work, another thing to check is to make sure that the working directory set properly.

    In Visual Studio this is Project Properties (Configuration Properties) -> Debugging -> Working Directory. I found mine set to "$(ProjectDir)" by default when I really wanted "$(OutDir)".

提交回复
热议问题