霍夫变换源码讲解

Hough Transform source code explanation

hough_in = bwareaopen( bin_im(:,:,n),20);    
% Compute the Hough transform of the image using the hough function
[H,T,R] = hough(hough_in);
P  = houghpeaks(H,3,'threshold',ceil(0.3*max(H(:))));
x = T(P(:,2)); 
y = R(P(:,1));
lines = houghlines(hough_in,T,R,P,'FillGap',5,'MinLength',7);

这里的xy代表什么?

x 包含检测到的线的 thetas 和 y rhos。

请参考:

https://de.mathworks.com/help/images/ref/hough.html

https://de.mathworks.com/help/images/ref/houghpeaks.html