【问题标题】:Template for Generalized Hough Transform OpenCV Python广义霍夫变换 OpenCV Python 的模板
【发布时间】:2019-04-21 02:17:25
【问题描述】:

我很困惑如何在 openCV Python 中使用广义霍夫变换。当我使用灰度图像的 ROI 设置模板时,它会显示此错误:

Incorrect type of self (must be 'GeneralizedHough' or its derivative)

这是我的示例代码:

alg = cv.GeneralizedHoughGuil()
# Simple create template with 1 channel black images with size 5x5
template = np.zeros((5,5))
alg.setTemplate(template)

【问题讨论】:

    标签: opencv hough-transform


    【解决方案1】:

    致电cv.createGeneralizedHoughGuil 而不是cv.GeneralizedHoughGuil

    alg = cv.createGeneralizedHoughGuil()
    template = np.zeros((5,5))
    alg.setTemplate(template)
    

    【讨论】:

      【解决方案2】:

      据我所知,在这种情况下唯一的出路是使用 CV_EXPORTS_W 和 CV_WRAP 指令重建 OpenCV。 answers.opencv topic

      【讨论】:

        猜你喜欢
        • 2018-01-15
        • 2013-03-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多