Explain Hough Transformation

前端 未结 4 1386
无人共我
无人共我 2020-12-22 16:41

I am just being adventurous and taking my first baby step toward computer vision. I tried to implement the Hough Transformation on my own but I just don\'t get the whole pic

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-22 17:34

    The Hough transform is a way of finding the most likely values which represent a line (or a circle, or many other things).

    You give the Hough transform a picture of a line as input. This picture will contain two types of pixels: ones which are part of the line, and ones which are part of the background.

    For each pixel that is part of the line, all possible combinations of parameters are calculated. For example, if the pixel at co-ordinate (1, 100) is part of the line, then that could be part of a line where the gradient (m) = 0 and y-intercept (c) = 100. It could also be part of m = 1, c = 99; or m = 2, c = 98; or m = 3, c = 97; and so on. You can solve the line equation y = mx + c to find all possible combinations.

    Each pixel gives one vote to each of the parameters (m and c) that could explain it. So you can imagine, if your line has 1000 pixels in it, then the correct combination of m and c will have 1000 votes.

    The combination of m and c which has the most votes is what is returned as the parameters for the line.

提交回复
热议问题