Template for Generalized Hough Transform

asked 2019-04-20 12:22:41 -0600

Hi, I rather confuse how to use generalized hough transform with opencv python. When I set a template with a ROI of grayscale image, it shows error

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

Here is my example code

alg = cv.GeneralizedHoughGuil()
# Simple create template with 1 channel black images with size 5x5
template = np.zeros((5,5))
alg.setTemplate(template)
edit retag flag offensive close merge delete

Comments

Hello! This is because the Generalized Hough was not properly exposed in Python. Youll need to recompile from source with a version after Apr 23 '19, when the pull req was merged: https://github.com/opencv/opencv/pull...

Ciprian Tomoiaga gravatar imageCiprian Tomoiaga ( 2019-06-04 08:11:18 -0600 )edit