# Rho and Theta resolution in Hough Transform

Hello,

One of the parameters in Hough Transform is the distance (rho) resolution. In OpenCV documentation (https://github.com/card-io/card.io-dm...) it is defined as

```
numrho = cvRound(((width + height) * 2 + 1) / rho)
```

But I don't really understand two things:

1) Why is there width + height instead of sqrt(width^2+height^2)

and, more importantly:

2) Why does the amount of detected lines grow along with increasing the rho resolution? For me it is completly illogical - higher resolution should result in lowering this amount, as there are less possible values for rho to be obtained. Could you please explain me where did I go wrong?

EDIT: ad. 2): does it work in this way, that the max distance is always equal to a diagonal of an image, hence doubling a rho resolution results in "inspissating" this distance to be still equal to a diagonal, so in fact there 2x more possible values that rho (resolution) can take?

anyone who could help?

The rho parameter is for my knowledge, is the "jumps" between one dot of the line to the second who come after it. It defends in the specific picture.

Read Here: https://docs.opencv.org/master/d9/db0...

Warning: I'm also a noob,so take my opinion carefully.