HELP ELLIPSE_HOUGH David Young March 1995 LIB * _____________ELLIPSE_HOUGH provides a very simple routine for finding a single instance of an ellipse with _____known axis lengths and orientation in an array, using a Hough transform. A subsdiary routine will find an instance of a circle of known radius. See the note on the limitations at the end of this file. ellipse_hough(_____array, _a, _b, _____alpha) -> (__xc, __yc) [_________procedure] ellipse_hough(_____array, _a, _b, _____alpha, ____bool) -> (__xc, __yc, ___acc) This returns the centre coordinates of the most prominent instance of an ellipse with major semi-axis _a, minor semi-axis _b and orientation _____alpha in the image represented by _____array. The orientation _____alpha is the angle of the major axis measured anticlockwise from the X-axis in right-handed coordinates, clockwise in left-handed coordinates (see *appellipse). The data in _____array must be all numbers, and for efficiency most of these should be zero. The non-zero elements should be positive numbers giving the strength of evidence for edge features. For instance, _____array might be the output of an edge detector such as that provided by the *canny library. For each non-zero element of _____array, say _____array(_x, _y), accumulator array elements lying on an ellipse centred on (_x, _y) are incremented by the value of _____array(_x, _y). The accumulator bins are the same size as the image pixels. The results are the position of the maximum value in the accumulator array, modified by averaging over a 3x3 window. The optional final boolean argument, if given and , causes the accumulator array to be returned also. circle_hough(_____array, _r) -> (__xc, __yc) circle_hough(_____array, _r, ____bool) -> (__xc, __yc, ___acc) This does the same job for a circle of known radius _r. It is just implemented as ellipse_hough(_____array, _r, _r, 0). Note on limitations ------------------- It is necessary to know the size, eccentricity and orientation of the target ellipse, or the radius of the target circle. Routines to find these parameters would need to be considerably more complex. These are simple demonstration routines - they do not use external procedures, so are relatively slow. Also, they do not allow control over bin size or accumulator postprocessing, they only return a single instance of the object without an indication of the strength of evidence, and they do not allow access to the accumulator array. These things could be added, at the expense of more complexity in the arguments and results. --- _____________________________$popvision/help/ellipse_hough --- _________Copyright __________University __of ______Sussex _____1995. ___All ______rights _________reserved.