Яка різниця між перетвореннями Хога і Радона?


34

Мені знайоме перетворення Радона, коли я дізнався про КТ, але не про перетворення Хауфа. У Вікіпедії йдеться

Площину (r, θ) іноді називають простором Хауфа для безлічі прямих у двох вимірах. Це уявлення робить перетворення Хаффа концептуально дуже близьким до двовимірного перетворення Радона. (Їх можна розглядати як різні способи погляду на одну і ту ж трансформацію. [5])

Їхній результат мені схожий:

бічні сторони rho vs theta сюжети для перетворення Хауфа та Радона

Тож я не розумію, в чому різниця. Чи вони просто одне й те саме бачать по-різному? Які переваги кожного різного погляду? Чому вони не об'єднуються в "трансформацію Хаф-Радона"?


М×3

@DumpsterDoofus Я думаю, що я не опублікував це, тому що це хитро, і я хотів спочатку відполірувати його, але оскільки ще цього не зробив: не-безірська версія тут gist.github.com/endolith/2879736, і спроба Безьє тут є суть .github.com / ендоліти / ef948b924abf289287bd також використовується тут flic.kr/p/dWSfUd
ендоліти

RGB(x)=((2x)xBoole[0x1]x2Boole[1x1]x(x+2)Boole[1x0]).
DumpsterDoofus

@DumpsterDoofus Feel free to clean up my code :)
endolith

Відповіді:


31

The Hough transform and the Radon transform are indeed very similar to each other and their relation can be loosely defined as the former being a discretized form of the latter.

The Radon transform is a mathematical integral transform, defined for continuous functions on Rn on hyperplanes in Rn. The Hough transform, on the other hand, is inherently a discrete algorithm that detects lines (extendable to other shapes) in an image by polling and binning (or voting).

I think a reasonable analogy for the difference between the two would be like the difference between

  1. calculating the characteristic function of a random variable as the Fourier transform of its probability density function (PDF) and
  2. generating a random sequence, calculating its empirical PDF by histogram binning and then transforming it appropriately.

However, the Hough transform is a quick algorithm that can be prone to certain artifacts. Radon, being more mathematically sound, is more accurate but slower. You can in fact see the artifacts in your Hough transform example as vertical striations. Here's another quick example in Mathematica:

img = Import["http://i.stack.imgur.com/mODZj.gif"];
radon = Radon[img, Method -> "Radon"];
hough = Radon[img, Method -> "Hough"];
GraphicsRow[{#1, #2, ColorNegate@ImageDifference[#1, #2]} & @@ {radon,hough}]

The last image is really faint, even though I negated it to show the striations in dark color, but it is there. Tilting the monitor will help. You can click all figures for a larger image.

Part of the reason why the similarity between the two is not very well known is because different fields of science & engineering have historically used only one of these two for their needs. For example, in tomography (medical, seismic, etc.), microscopy, etc., Radon transform is perhaps used exclusively. I think the reason for this is that keeping artifacts to a minimum is of utmost importance (an artifact could be a misdiagnosed tumor). On the other hand, in image processing, computer vision, etc., it is the Hough transform that is used because speed is primary.


You might find this article quite interesting and topical:

M. van Ginkel, C. L. Luengo Hendriks and L. J. van Vliet, A short introduction to the Radon and Hough transforms and how they relate to each other, Quantitative Imaging Group, Imaging Science & Technology Department, TU Delft

The authors argue that although the two are very closely related (in their original definitions) and equivalent if you write the Hough transform as a continuous transform, the Radon has the advantage of being more intuitive and having a solid mathematical basis.


There is also the generalized Radon transform similar to the generalized Hough transform, which works with parametrized curves instead of lines. Here is a reference that deals with it:

Toft, P. A., "Using the generalized Radon transform for detection of curves in noisy images", IEEE ICASSP-96, Vol. 4, 2219-2222 (1996)


Oh, I thought those were added to the image intentionally. Didn't realize they're artifacts. So Radon is to Hough as DFT is to FFT? But there's also generalized Hough transform that can find circles and stuff, and maybe similar things for Radon transform?
endolith

1
Yeah, there's the generalized Radon transform that works for parametrized curves. I would assume it's harder to do so for completely arbitrary curves, but I do not know that much about it. I've added a reference to my answer.
Lorem Ipsum

The Radon transform can be sped up with FFT methods, too. I'm guessing the Hough can't be? Is Hough still faster? I'm guessing it depends on image size?
endolith

1
@endolith It's my experience that Hough is faster. However, my use of these two is to detect the few odd lines in something I'm fiddling around with. Never used it in serious work, nor have I implemented my own. So I would suggest asking that as a new question, as I cannot answer with certainty.
Lorem Ipsum

6

Additionally to Lorem Ipsum's answer explaining the Hough transform as a discretized form of Radon transform, I like this descriptive explanation - also according to Ginkel and others:

Both Radon and Hough are a mapping from the image space to a parameter space of ρ and θ, but they differ in their point of view. While the Radon transform derives a point in parameter space from image space (the reading paradigm), the Hough transform explicitly maps data points from image space to parameter space (the writing paradigm).

This becomes clear by comparing their (discrete) algorithms. For each θ in parameter space Radon projects the image points on a line described by (its angle) θ using buckets of size Δρ. Hough on the other hand takes each image point (x,y) and adds the appropriate intensity to all corresponding parameter space bins.

As a result Hough suffers artifacts whereas Radon allows for high resolution in parameter space (by adjusting Δθ and Δρ and dividing pixels into subpixels).

Hough is usually faster though the whole transformation needs to be performed (which is the intention in most cases anyway). Radon allows to compute only a short interval (in θ) of the parameter space due to the reading paradigm. This can significantly reduce computation time if you have some a priori knowledge (like in which θ intervals your peaks probably are).

I guess Hough is dominant in many fields because of its simple algorithm, whereas Radon is used where accuracy is crucial or a priori knowledge available.

See also Matlab references (expand the Algorithm tab):

www.mathworks.com/help/images/ref/radon.html

www.mathworks.com/help/images/ref/hough.html

Використовуючи наш веб-сайт, ви визнаєте, що прочитали та зрозуміли наші Політику щодо файлів cookie та Політику конфіденційності.
Licensed under cc by-sa 3.0 with attribution required.