OpenCV imread hanging when called from a web request

前端 未结 2 1315
忘了有多久
忘了有多久 2020-12-08 22:30

This is probably one of the strangest errors that I have ever ran into when using OpenCV. There is a lot going on, so let me try to explain this to the best of my ability.

2条回答
  •  半阙折子戏
    2020-12-08 23:00

    Wrong

    imagePath = os.path.dirname(__file__) + "/1.jpg"
    

    Right

    from os.path import abspath, join, dirname
    
    imagePath = abspath( join(dirname(__file__), "1.jpg") )
    

提交回复
热议问题