Does performance differ between Python or C++ coding of OpenCV?

前端 未结 4 630
南旧
南旧 2020-12-12 09:41

I aim to start opencv little by little but first I need to decide which API of OpenCV is more useful. I predict that Python implementation is shorter but running time will b

4条回答
  •  隐瞒了意图╮
    2020-12-12 10:22

    The answer from sdfgeoff is missing the fact that you can reuse arrays in Python. Preallocate them and pass them in, and they will get used. So:

        image = numpy.zeros(shape=(height, width, 3), dtype=numpy.uint8)
        #....
        retval, _ = cv.VideoCapture.read(image)
    

提交回复
热议问题