Python OpenCV Box2D

前端 未结 2 1402
有刺的猬
有刺的猬 2021-02-14 15:56

I am trying to call OpenCV function MinAreaRect2 from within python. I use OpenCV 2.4.2 with python 2.7 and numpy 1.6. I went this far :

import cv

def nda2ipl(a         


        
2条回答
  •  梦如初夏
    2021-02-14 16:17

    As stated in the documentation to which you linked, MinAreaRect2 returns a Box2D object:

    A CvBox2D object is defined by its center, size and angle, as you correctly assumed, as described here.

    Generally speaking, the documentation of the Python wrapper is rather poor. Your best bet is to refer to the C++ documentation and to read the source code.

提交回复
热议问题