A robot vision record can report a line angle that differs by ninety degrees from the visible edge's direction. That can be correct when the stored angle describes the line's normal rather than its tangent.

The signed distance parameter also depends on the chosen coordinate origin. Comparing two line records therefore requires their coordinate conventions, not merely a pair of numbers named distance and angle.

The following example is original plane geometry. It does not represent an image acquisition, a detected workpiece edge, or an executed Hough-transform implementation.

State the normal-form convention

Use coordinates x and y measured in pixels along two declared orthogonal image axes. Define the unit normal n = (cos(theta), sin(theta)). A line satisfies n dot p = rho, where p = (x,y).

Equivalently, x cos(theta) + y sin(theta) = rho. The magnitude of rho is the shortest distance from the origin to the infinite line. Its sign specifies which side of the origin lies in the chosen normal direction.

Here theta describes the direction of n in the declared coordinate axes. It does not directly describe the direction in which a point travels along the line. A tangent direction is perpendicular to n.

OpenCV's Python Hough tutorial describes the signed-rho representation and a restricted angle convention. Its C++ tutorial separately develops the point-to-parameter relationship. Their mathematical descriptions motivate this ledger; all line coefficients, points, and coordinate changes below are independently chosen.

Normalize an original line

Take the line 3x + 4y = 60. The coefficient vector (3,4) has length five, so division by five gives unit normal n = (0.6,0.8) and rho = 12 pixels.

The normal angle is atan2(4,3), approximately 53.130102 degrees. One tangent vector is (−0.8,0.6), whose angle is approximately 143.130102 degrees. Reversing that tangent gives the same undirected line orientation.

The tangent's slope is 0.6/(−0.8) = −0.75, agreeing with y = 15 − 0.75x. Interpreting 53.130102 degrees as the tangent angle would therefore describe the wrong direction.

Points (4,12) and (12,6) both lie on the line: their normal dot products are 2.4 + 9.6 = 12 and 7.2 + 4.8 = 12. Their difference (8,−6) is perpendicular to the normal, as expected for movement along a line.

A parameter pair need not be unique

Negating the normal and rho leaves the same set of points. Thus (rho,theta) = (12,53.130102 degrees) and (−12,233.130102 degrees) represent the same infinite line.

A parameter convention can restrict theta to a half-turn interval while permitting signed rho. Another convention can use a full-turn angle interval with a different distance restriction. Those choices must be reconciled before treating different parameter arrays as different geometry.

This example uses the half-turn, signed-distance interpretation. It does not assert that every Hough tutorial, API, or exported file uses an identical parameter domain.

Measure a point's signed residual

Let Q = (12,8). Its normal dot product is 7.2 + 6.4 = 13.6. Subtracting rho gives signed distance d = 1.6 pixels because n has unit length.

The perpendicular projection onto the line is Q_closest = Q − d n. Substitution gives (12,8) − 1.6(0.6,0.8) = (11.04,6.72).

Checking the original equation gives 3 times 11.04 plus 4 times 6.72 = 33.12 + 26.88 = 60. The projection lies on the line, and the removed displacement has length 1.6 pixels.

If the unnormalized equation 3x+4y−60 were evaluated at Q, it would return eight. That value must be divided by the coefficient norm five to obtain geometric distance. An algebraic residual is not automatically a pixel distance.

Translate the image origin

Now express the same points relative to a new origin at old coordinate o = (5,10). Define p_new = p_old − o, so p_old = p_new + o.

Substitution into n dot p_old = rho gives n dot p_new = rho − n dot o. The normal is unchanged, while rho_new = 12 − (3+8) = 1 pixel.

The old point (4,12) becomes (−1,2), whose normal dot product is −0.6 + 1.6 = 1. The old point (12,6) becomes (7,−4), giving 4.2 − 3.2 = 1.

The geometric line did not move relative to the scene represented by these coordinates. Its numerical distance from the coordinate origin changed because the origin changed. A crop or another origin convention can create this difference without a changed edge orientation.

Distinguish uniform and unequal coordinate scaling

If both new coordinate components are multiplied by two, define p_scaled = 2p_new. The normal direction is unchanged and rho_scaled becomes two pixels in that new coordinate scale.

Unequal scaling behaves differently. Starting from 0.6x_new + 0.8y_new = 1, set X = 2x_new and Y = y_new. The equation becomes 0.3X + 0.8Y = 1.

The new coefficient norm is sqrt(0.73), approximately 0.854400. Renormalizing gives normal (0.3,0.8)/sqrt(0.73) and rho = 1/sqrt(0.73), approximately 1.170411 in the scaled coordinate grid.

Both the normalized direction and distance have changed. Applying only a common rho multiplier would fail because unequal axis scaling changes the coordinate geometry of angles and distances.

Keep detection evidence separate

The equations concern an infinite line. They do not identify endpoints, a visible segment length, a physical part boundary, or a fit confidence. An accumulator peak or reported angle requires its own image evidence and implementation settings.

For robot vision comparisons, retain the origin, axis directions, coordinate scale, parameter convention, and interpretation of theta. The visible edge direction and its reported normal angle can differ consistently, while signed rho changes predictably under a coordinate transformation.

Sources checked October 23, 2026:

OpenCV 4.13.0, Python Hough Line Transform: https://docs.opencv.org/4.13.0/d6/d10/tutorial_py_houghlines.html

OpenCV 4.6.0, Ana Huaman, Hough Line Transform: https://docs.opencv.org/4.6.0/d9/db0/tutorial_hough_lines.html

All lines, points, transformations, and numerical checks are original hypothetical analysis. No vision library was run.

Illustration note: The site-library robot over a bin of metallic parts is a concept illustration providing vision context. It does not display the constructed line or document a detected edge.