Search code examples
matlabhough-transform

Hough Transform with Matlab


I'm doing some shape detecting coding with Matlab. I just want to understand the code segment

[H,theta,rho] = hough(BW)

I understand the conversion of the x,y coordinates to the theta,rho coordinate system. What I can't understood is the format of the output of hough(BW) function. Simply the Question is what is the [H,theta,rho]here. It's better I can get a clear idea about the Hough Transformation Matrix (H) with an example.


Solution

  • Please read the documentation of the hough function carefully.
    Here is a clear explanation what is H, theta and rho:

    The function returns H, the Hough transform matrix.
    theta (in degrees) and rho are the arrays of rho and theta values over which hough generates the Hough transform matrix.