更新时间:2022-06-03 06:01:46
您正在寻找的是通用霍夫变换,是霍夫变换的通用形式,可以检测任意形状.这样,您可以将形状指定为三角形.
What you are looking for is Generalized Hough Transform which is a generalization of Hough transform to detect arbitrary shapes. This way, you can specify your shape as a triangle.
OpenCV中有一个通用Hough的实现: http://docs.opencv.org/master/d7/dd4/classcv_1_1GeneralizedHough.html您可以使用setTemplate方法定义形状.
There is an implementation of Generalized Hough in OpenCV: http://docs.opencv.org/master/d7/dd4/classcv_1_1GeneralizedHough.html and you can use the setTemplate method to define your shape.