Introduction - If you have any usage issues, please Google them yourself
The image is transformed by Hof transform to detect the straight line. Traverse the image, transform the point in polar coordinates to Hof space, accumulate 1 at the same time, and finally count the maximum point in the accumulator array, which corresponds to the straight line in the original picture.