This is a release of TkHough. I haven't worked on this program in a while but it still may be of some use. If you are not familiar with the hough transform or xhoughtool, please have a look at the houghtool page.
A quick overview of the interface follows. A screen shot is below:

[initial screen view]


(1) is the `edges' display. Edge images are typically generated by a process such as the Canny edge detector; they are in pgm rawbits format. A value of zero (black) is assumed to be an `off-bit,' everything else is `on.'

Pressing the first mouse button here causes a file browser to appear in (4), which is used to select a new image.

(2) is the `output' display. Lines parameterized by the Hough transform are shown here as they would appear on the edges display; they may be in either `segment' form, `complete' form, or both. Additionally, an underlapping greyscale image may be loaded into display; the most common use of this would be to compare the Hough lines to the actual lines in the original image, before any edge detection.

The first mouse button in this window causes a file list to appear in (4), where one may choose the underlapping image. Double-clicking the first button will cause a choice of transforms to appear in (4). The second mouse button causes a display and transform parameter control to appear in (4), and the third mouse button runs the selected transform on the current edge image (1).

(3) is a display of Hough transform data structures. For example, the first mouse button displays the accumulator when available.

(4) is a control panel. Depending on other actions, this may be a file browser or an array of widgets (for changing parameters, for example).

(5) is for diagnostic output of the hough transform and interface.

(6) is a row of buttons for those who either don't have a three-button mouse, or can't get used to the multi-button operation of (1), (2), and (3). This also provides the user's only button for quitting, aside from anything that some misanthrope might want to "send" to your poor, suffering tkhough.

(7) is a one-line summary of the current edge file and transform.

(8) changes according to the position of the mouse pointer, and tells you what the mouse buttons would do if you pressed them. The screen shot above was taken with the pointer over (2).


The particular goal of this interface is to minimize the time spent with it. Dialog boxes are deliberately avoided. An experienced user will need only a three-button mouse and to move within the triangle formed by (1), (3), and (4). The above is not a final design; in particular, one should be able to swap (4) and (5) in order to accomodate a lefty or people who just like it that way.


Here is the standard Hough transform put to work on a simple test set of lines. Note the accumulator.

[initial screen view]

Here is the randomized Hough transform on the house example that comes with xhoughtool.

[initial screen view]

To Do

Plenty of odds and ends.


Here is the current version.

To install

(Yes, I know I should make more complete instructions) Build the executables. Edit tkhough and tkhough_config.tcl to change your location of wish and your location of the various directories, respectively. If you don't have pnmscale, build the version that has been included..

You need Tk4.0 or up.