optical hough transform

5
Optical Hough transform William H. Steier and Raj K. Shori An optical technique is presented for achieving the Hough transform at video rates. Both coherent and incoherent approaches are discussed and analyzed. An incoherent system which combines edge enhance- ment with the Hough transform is also considered. Use of the optical Hough transform for the location of the bridges and roadways in outdoor scenes and for the locations of parts, as used in automated manufacturing, is demonstrated. 1. Introduction The Hough transform is widely used in pattern rec- ognition where it is regarded as a robust and powerful technique for recognizing and locating extended straight line features in scenes.' Since straight line features can be used to recognize roadways, buildings, machined parts, etc., the Hough transform has been used for scene analysis, 2 detection of moving targets, 3 automated vehicle guidance, 4 seismic data analysis, 5 and inspection of materials for automated manufac- turing. 6 ' 7 Almost all these systems for performing the Hough transform have relied on digital techniques which require a large number of calculations and as such are limited to nonreal-time uses. The optical approach discussed here is capable of doing the trans- form at video rates and hence opens numerous new potential applications in real-time systems. Barrett 8 recognized that optics could play a role in Hough transforms and devised an optical system using a flying spot scanner. Recently Gindi and Gmitro 9 devised an incoherent optical approach similar to one used here, and Eichmann and Dong 10 published a somewhat different coherent scheme. The transform first proposed by Hough" and modi- fied by Rosenfeld1 2 transforms the x-y plane into the p,O plane via the relationship p = x cos0 + y sinG. It has such properties that: (1)an x-y point becomes a sinus- oidal curve in p,0; (2) an p,O point becomes a straight line x-y. If the amplitude of the image in the Hough plane UH(p,O) is the cumulative value of all the sinusoi- The authors are with Northrop Research Technology Center, Palos Verdes Peninsula, California 90274. Received 27 January 1986. 0003-6935/86/162734-05$02.00/0. © 1986 Optical Society of America. dal curves passing through p,O, with the amplitude on the sinusoids given by the object Uo(x,y), a Hough image can be defined. From the properties of the Hough transform, the Hough image thus has a bright spot at p,Ocorresponding to a bright line in the x-y plane where the equation of the line is given by p = x cosO + y sinO. It has been recognized that this Hough image is equivalent to the Radon transform 13 UH(p,O) = fZ,,Uo(x,y)ds, where the line integral direction d is along the line p = x cosO + y sinG. This line integral equivalent is the key to the optical realization. II. Coherent Approach Figure 1 shows two orthogonal views of the optical system for achieving the transform using coherent light and a cylindrical lens. In cross section A, the object and image planes are both spaced at the focal length, and the spatial Fourier transform is performed. In cross section B, the object and image planes are both located at 2f, and a 1:1imaging is performed. The on- axis linear detector array thus records the zero-order component of the 1-D Fourier transform which can be shown to be proportional to one line of the Hough transform at a fixed 0 value. The 0 coordinate is realized by rotating the scene with a Dove prism. Be- cause of the transform properties and optical proper- ties of the prism, one frame (-11/2 < 0 < II/2) of the Hough transform is performed on each quarter turn of the prism. By proper synchronization, the p,O trans- form can be displayed on a video monitor or stored on videotape. The analysis of the coherent system followsclassical diffraction theory. 14 If x-y are the rectangular coordi- nates in the scene, and ,n are the coordinates in the detector plane, the optical electric field pattern in the detector plane is UH(M) = -l~exp(n Uo2) x u, -n) exp ( x) dx, where Uo(x,y) = optical field pattern of the scene; 2734 APPLIED OPTICS / Vol. 25, No. 16 / 15 August 1986

Upload: raj-k

Post on 02-Oct-2016

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Optical Hough transform

Optical Hough transform

William H. Steier and Raj K. Shori

An optical technique is presented for achieving the Hough transform at video rates. Both coherent andincoherent approaches are discussed and analyzed. An incoherent system which combines edge enhance-ment with the Hough transform is also considered. Use of the optical Hough transform for the location of thebridges and roadways in outdoor scenes and for the locations of parts, as used in automated manufacturing, isdemonstrated.

1. Introduction

The Hough transform is widely used in pattern rec-ognition where it is regarded as a robust and powerfultechnique for recognizing and locating extendedstraight line features in scenes.' Since straight linefeatures can be used to recognize roadways, buildings,machined parts, etc., the Hough transform has beenused for scene analysis,2 detection of moving targets,3

automated vehicle guidance, 4 seismic data analysis, 5

and inspection of materials for automated manufac-turing.6'7 Almost all these systems for performing theHough transform have relied on digital techniqueswhich require a large number of calculations and assuch are limited to nonreal-time uses. The opticalapproach discussed here is capable of doing the trans-form at video rates and hence opens numerous newpotential applications in real-time systems.

Barrett8 recognized that optics could play a role inHough transforms and devised an optical system usinga flying spot scanner. Recently Gindi and Gmitro9

devised an incoherent optical approach similar to oneused here, and Eichmann and Dong10 published asomewhat different coherent scheme.

The transform first proposed by Hough" and modi-fied by Rosenfeld12 transforms the x-y plane into thep,O plane via the relationship p = x cos0 + y sinG. It hassuch properties that: (1) an x-y point becomes a sinus-oidal curve in p,0; (2) an p,O point becomes a straightline x-y. If the amplitude of the image in the Houghplane UH(p,O) is the cumulative value of all the sinusoi-

The authors are with Northrop Research Technology Center,Palos Verdes Peninsula, California 90274.

Received 27 January 1986.0003-6935/86/162734-05$02.00/0.© 1986 Optical Society of America.

dal curves passing through p,O, with the amplitude onthe sinusoids given by the object Uo(x,y), a Houghimage can be defined. From the properties of theHough transform, the Hough image thus has a brightspot at p,O corresponding to a bright line in the x-yplane where the equation of the line is given by p = xcosO + y sinO. It has been recognized that this Houghimage is equivalent to the Radon transform13 UH(p,O)= fZ,,Uo(x,y)ds, where the line integral direction d isalong the line p = x cosO + y sinG. This line integralequivalent is the key to the optical realization.

II. Coherent Approach

Figure 1 shows two orthogonal views of the opticalsystem for achieving the transform using coherentlight and a cylindrical lens. In cross section A, theobject and image planes are both spaced at the focallength, and the spatial Fourier transform is performed.In cross section B, the object and image planes are bothlocated at 2f, and a 1:1 imaging is performed. The on-axis linear detector array thus records the zero-ordercomponent of the 1-D Fourier transform which can beshown to be proportional to one line of the Houghtransform at a fixed 0 value. The 0 coordinate isrealized by rotating the scene with a Dove prism. Be-cause of the transform properties and optical proper-ties of the prism, one frame (-11/2 < 0 < II/2) of theHough transform is performed on each quarter turn ofthe prism. By proper synchronization, the p,O trans-form can be displayed on a video monitor or stored onvideotape.

The analysis of the coherent system follows classicaldiffraction theory.14 If x-y are the rectangular coordi-nates in the scene, and ,n are the coordinates in thedetector plane, the optical electric field pattern in thedetector plane is

UH(M) = -l~exp(n Uo2) x u, -n) exp ( x) dx,

where Uo(x,y) = optical field pattern of the scene;

2734 APPLIED OPTICS / Vol. 25, No. 16 / 15 August 1986

Page 2: Optical Hough transform

spherical cylindricalscene lens jlens

K

rotating CROSSECTION lineardose COSCIN A detectorpr ism array

CROSSECTION B

Fig. 1. Hough transform using coherent light.

f = focal length (see Fig. 1);X = optical wavelength; andk = 27r/X.

As expected, the system images and inverts in the ydirection and performs a 1-D Fourier transform in thex direction.

If the linear detector array is located at t = 0 (on theoptic axis), the zeroth-order Fourier component, orequivalently the line integrals of Uo(x,y) in the x direc-tions, are recorded by the detectors. Rotation of theDove prism rotates the direction of the line integralsand scans out the 0 coordinate.

Since the detectors record the square of the integralof the electric field, their output is sensitive to phasevariations in the scene. For example, a line with uni-form intensity but with sizable phase variations alongits length will not produce a bright spot in the Houghimage. Thus, if the scene is recorded on film and thenHough transformed, care must be taken to assure thatthe film does not introduce phase variations.

If the detector array is placed above or below theoptic axis, higher-order Fourier components are de-tected, and a modified Hough image can be realized.This modified image may be useful in detecting lineswith periodic amplitude modulation. Such an imagemay be useful in tracking systems or in radar imageanalysis.15

Ill. Incoherent System

Incoherent light can also be used to achieve theHough transform by using slightly different optics anda geometrical optics analysis. Figure 2 shows the inco-herent system using a lens with a different focal lengthin the two cross sections. In cross section B, the sys-tem images, while in cross section A the system is out offocus. Hence a point images into a line, the center ofthe line depending on the height of the point from theoptic axis. The most efficient system makes thelength of this line as short as possible within the con-straint that points at the extremes of the object stillimage into a line that crosses the optic axis. All thepoints distributed along a line anywhere in the scenethus contribute energy to the on-axis detector, and thedetector output is proportional to a modified line inte-gral. The Dove prism rotates the scene and, therefore,rotates the direction of the line integrals and scans the0 coordinate.

scene astigmatictens D

rotng CROSSECTION Ado e fprism,,

I I nO I

lineardetectorarray

CROSSECTION B

Fig. 2. Hough transform using noncoherent light.

The most efficient incoherent design is expressed bythe relationship

A/ B1MB =MBrmax,

2j - MA =

where A = effective diameter of the lens;mB = magnitude of the magnification in plane B;mA = magnitude of the magnification in plane A; and

rmax = maximum radial size of the object.The other parameters of the system can be obtained

from mA, mB, and the given distance from the scene tothe compound lens SO:

SD = mBSO = distance from the lens to the detector;

fB = 1+ mB = focal length in plane B;

fA =So1 A - focal length in plane A.1+ MA

The incoherent system is not sensitive to any phasevariations and thus is easier to implement for a practi-cal system. The coherent system has the advantage ofa larger SNR because all the intensity of a line isfocused into a detector, while in the incoherent systemthis intensity is spread into a line, and only a portion isseen by the detector.

IV. Real-Time Hough Transforms

Figure 3 is a photograph of a real-time optical Houghtransformer using incoherent optics. The synchro-nous motor spins the prism at 900 rpm and thus pro-vides one complete 0 scan (-7r/2 to + 7r/2) in 1/60 s.The Si detector array contains 125 elements and can bescanned in 62.5 Ms. All these numbers are compatiblewith the video display system on which the Houghimages were displayed. For all the results given in thispaper, the objects were on film with a maximum imagesize of 1 X 1.

Figure 4 is a photograph of the video monitor screenwhen the object was a single 50-mm wide line entirelyacross the object field. The individual detectors canbe seen, and it is clear that the line is focused onto asingle detector. The 0 and p calibration of the videoscreen was determined experimentally; the 0 scan waslimited to -70° because of the video retrace time. The

15 August 1986 / Vol. 25, No. 16 / APPLIED OPTICS 2735

Page 3: Optical Hough transform

.90

cw

+45

a

cM

-45

-60

Fig. 3. Real-time Hough transformer.

CW

+45

0

CMW

-45

-70 0 +

Fig. 4. Hough transform of a single line.

positive 0 direction is a clockwise rotation, and thepositive p direction is above the axis of rotation. Thelight pattern around the bright spot is characteristic ofHough transforms and results from the various sinu-soidal curves which all intersect at the one brightestpoint. The symmetry of this halo changes if the linedoes not extend entirely across the scene and thus maybe used to provide information on the quadrant loca-tion of line segments.

V. Combined Edge Enhancement-Hough Transform

By including some appropriate electronic circuitrybetween the detector array and the video formattingcircuits, a simultaneous edge enhancement and Houghtransform can be realized in real time. Gindi andGmitro9 have shown that, if UH(PO) is the Houghtransform of Uo(xy), then OUH(p,0)/Op is the Houghtransform of n VUo(xy), where n is a unit vectordirected perpendicular to the line integrations of theHough transform. However, n VUo(xy) is an edge-enhanced version of Uo(x,y) for edges that are perpen-dicular to n. To convert UH(p,0) into UH(p,0)/ap

Fig. 5. Combined edge enhancement and Hough transform of auniform band. The bright spots are the edges of the band.

+90

cw

+45

p

Fig.6. Combined edge enhancement-Hough transform of the toolin Fig. 7.

requires taking the derivative w.r.t. time of the signalafter the detector, since at that point the p variable isthe time variable. This can be conveniently done byincluding a differentiating circuit after the detector.

The differentiating circuit produces a positive signalfor edges leading from dark to bright and a negativesignal from edges going from bright to dark. By in-cluding a full wave rectifier circuit after the differen-tiator, both signals can be made positive so that bothtypes of edge produce positive signals and bright spotson the video monitor.

Figure 5 is the edge-enhanced Hough transform for auniform band, 1.5 mm wide. The two bright spots arethe two edges of the band. As before, the shape of thespots can be used to infer the quadrant location ofsegments of edges.

The Hough transform can be used for parts recogni-tion and orientation for automated manufacturing.Figure 6 is the Hough transform of the screwdrivershown in Fig. 7. The cluster of spots near 0 = +45 is

2736 APPLIED OPTICS / Vol. 25, No. 16 / 15 August 1986

+90

Page 4: Optical Hough transform

I

Fig. 7. Screwdriver.Fig. 9. Tool amid other parts. The cross marks the center of

rotation.

+90

CW

+45

CCW

-45

P -60

Fig. 8. Combined edge enhancement-Hough transform of the tool 0 +

amid other parts (Figure 9). The cluster of spots near 0 = 45°, p = 0 Pcan be recognized from Fig. 8 as the screwdriver. Fig. 10. Combined edge enhancement-Hough transform of a

highway and highway overpass (Fig. 11). The spots near 0 = 00 are

the road edges and center stripe, and the spots near 0 = -60° areedges of the highway and overpass.

the straight edges of the tool. The three spots in thecorners are the edges of the scene. To demonstrate thepotential of the Hough transform for recognizing thistool within a cluttered background, Fig. 10 shows theHough transform of Fig. 9. The cluster of bright spotsis again the straight edges of the tool, and the scatteredlesser spots are the screws which lack long straightedges.

Figures 10 and 11 demonstrate the ability of theedge-enhanced Hough transform to locate roads andbridges from aerial scenes. The spots near 0 = 0 arethe road edges and center line strip of the highway.The spots near 0 = -60° are the edges of the highwayand overpass.

VI. Summary

The optical system for performing the Hough trans-form which is described here is relatively easy to imple-ment, and because it can use incoherent light, it is alsorelatively easy to align and maintain. Because thetransforms are realized at video rates, numerous new

Fig. 11. Aerial scene of highway and highway overpass. The crossmarks the center of rotation.

15 August 1986 / Vol. 25, No. 16 / APPLIED OPTICS 2737

+90

cw

0+45

Page 5: Optical Hough transform

applications of the Hough transform in image process-ing and robotic vision may now become practical.

The authors would like to recognize the significanttechnical contributions and support provided by E. A.Stappaerts.

This research was performed under NorthropCorp.'s Independent Research and Development Pro-gram.

William Steier is a consultant to Northrup from theDepartment of Electrical Engineering of U. SouthernCalifornia.

References

1. R. 0. Duda and P. E. Hart, "Use of Hough Transformation toDetect Lines and Curves in Pictures," Commun. ACM. 15, 204(1972).

2. S. A. Dudani and A. L. Luk, "Locating st-line Edge Segments onOutdoor Scenes," Pattern Recognition 10, 145 (1978).

3. A. E. Cowart, W. E. Snyder, and W. H. Ruedger, "The Detectionof Unresvolved Targets using Hough Transform," Comput. Vi-sion Graphics, Image Proc. 21, 222 (1983).

4. R. M. Inigo, E. S. McVey, B. J. Berger, and M. J. Wirtz, "Ma-chine Vision Applied to Vehicle Guidance," IEEE Trans. Pat-tern Anal. Machine Intell. PAMI-6, 820 (1984).

5. K. Y. Huang, K. S. Fu, T. H. Sheen, and S. W. Cheng, "ImageProcessing of Seismograms: (A) Hough Transformation for theDetection of Seismic Patterns; (B) Thinning Processing in theSeismogram," Pattern Recognition 18, 429 (1985).

6. C. R. Dyer, "Gauge Inspection Using Hough Transform," IEEETrans. Pattern Anal. Machine Intell. PAMI-5, 621 (1983).

7. L. Vanderkeydt, A. Oosterlinck, and H. Van den Berghe, "Ex-periments of Computer Vision Techniques for Industrial Appli-cations," in Proceedings, IEEE Comp Society Conference onIndustrial Applications of Machine Vision, Research TrianglePark, NC, 3-5 May (1982), pp. 21-24.

8. H. H. Barrett, "Optical Processing in Radon Space," Opt. Lett.,7, 248 (1982).

9. G. R. Gindi and A. F. Gmitro, "Optical Feature Extraction viathe Radon Transform," Opt. Eng. 23,499 (1984).

10. G. Eichmann and B. Z. Dong, "Coherent Optical Production ofthe Hough Transform," Appl. Opt., 22, 830 (1983).

11. P. V. C. Hough, "Methods and Means of Recognizing ComplexPatterns," U.S. Patent 3,069,654 (18 Dec. 1962).

12. A. Rosenfeld, Picture Processing by Computers (Academic,New York, 1969).

13. S. R. Deans, "Hough Transform from the Radon Transform,"IEEE Trans. Pattern Anal. Machine Intell. PAMI-3,185 (1981).

14. J. W. Goodman, Introduction To Fourier Optics (McGraw-Hill, New York, 1968).

15. D. G. Falconer, "Target Tracking with a Fourier-Hough Trans-form," in Proceedings, Thirteenth Asilomar Conference on Cir-cuits, Systems, and Computers, Pacific Grove, CA, 5-7 Nov.(1979), pp. 479-482.

OSA Meetings Schedule

OPTICAL SOCIETY OF AMERICA

1816 Jefferson Place N.W.

Washington, DC 20036

8-12 September 1986 GAS FLOW AND CHEMICAL LA-SERS, SIXTH INTERNATIONAL SYMPOSIUM, Jerusa-lem Information: S. Rosenwaks, Ben-Gurion U., Phys-ics Department, P.O. Box 653, 84105-Beer Sheva, Israel

7-9 October 1986 OPTICAL FIBER SENSORS, FOURTH IN-TERNATIONAL CONFERENCE, Tokyo Information:Meetings Department at OSA

19-24 October 1986 ANNUAL MEETING OPTICAL SOCIETYOF AMERICA, Seattle Information: Meetings Depart-ment at OSA

20-22 October 1986 MULTIPLE EXCITATIONS OF ATOMSTOPICAL MEETING, Seattle Information: Meetings De-partment at OSA

20-24 October 1986 INTERNATIONAL LASER SCIENCECONFERENCE, Seattle Information: Meetings Depart-ment at OSA

21-23 October 1986 OSA WORKSHOP ON OPTICAL FAB-RICATION AND TESTING, Seattle Information: Meet-ings Department at OSA

14-16 January 1987 PICOSECOND AND OPTOELECTRON-ICS TOPICAL MEETING, Lake Tahoe Information:Meetings Department at OSA

19-22 January 1987 CONFERENCE ON OPTICAL FIBERCOMMUNICATION/INTERNATIONAL CONFERENCE ONINTEGRATED OPTICS AND OPTICAL FIBER COMMUNI-CATION, Reno Information: Meetings Department atOSA

26-28 January 1987 NONINVASIVE ASSESSMENT OF THEVISUAL SYSTEM TOPICAL MEETING, Lake Tahoe In-formation: Meetings Department at OSA

26-29 January 1987 LASER APPLICATIONS TO CHEMICALANALYSIS TOPICAL MEETING, Lake Tahoe Informa-tion: Meetings Department at OSA

9-13 February 1987 SOUTHWEST CONFERENCE ON OP-TICS, Albuquerque Information: Meetings Departmentat OSA

9-10 February 1987 SOUTHWEST CONFERENCE SHORTCOURSES, Albuquerque Information: Meetings De-partment at OSA

continued on page 2746

2738 APPLIED OPTICS / Vol. 25, No. 16 / 15 August 1986