evaluation of three-dimensional convolutions by use of two-dimensional filtering

5
Evaluation of three-dimensional convolutions by use of two-dimensional filtering Y. B. Karasik A three-dimensional to two-dimensional mapping is proposed that permits the reduction of three- dimensional convolutions– correlations to two-dimensional ones and thereby lays a theoretical foundation for their optical implementation. © 1997 Optical Society of America Key words: Three-dimensional optical image processing, optical correlators. 1. Introduction Optical scientists have paid much attention to three- dimensional ~3-D! optical image formation ~see, e.g., Refs. 1–5!. However, little attention has been paid to 3-D optical image processing. The main hurdle here has been the absence of a practical approach to performing 3-D convolution– correlation optically, which is a key operation in image processing. Cur- rently there is no optical hardware capable of the direct convolution– correlation of 3-D images. Hence we are compelled to make do with the existing two-dimensional ~2-D! optical convolvers– correlators and must find a way to exploit them for performing 3-D convolutions– correlations. A possible solution to this problem is to find a pla- nar encoding of 3-D images such that it would give rise to the reduction of a 3-D convolution– correlation to its corresponding 2-D one. Although some work on transdimensional mappings has been done previ- ously in optics ~see, e.g., Refs. 6 – 8!, almost all dealt with one-dimensional ~1-D! to 2-D and 2-D to 1-D transformations. To the best of my knowledge, only one relevant 3-D to 2-D mapping has been proposed in the past. 9,10 It consisted of sampling one dimension of a 3-D image and recording all obtained 2-D sectional images in one plane. Needless to say, so as not to lose infor- mation the number of 2-D sectional images should be high, and that makes it difficult to place them all in one plane ~i.e., in one frame of an input device such as a spatial light modulator!. In this paper I aim to propose a more subtle planar encoding of 3-D images that, on one hand, does not require multiplexing many 2-D sectional images and, on the other hand, would also give rise to the reduc- tion of a 3-D convolution– correlation to two dimen- sions. Specifically, the proposed planar encoding of 3-D images proceeds as follows. Let us sample a 3-D image at all points ~ x, y! that have rational coordinates ~such a sampling obviously satisfies the sampling theorem because points with rational coordinates constitute an everywhere-dense set!. In other words, of all points ~ x, y, z! of a 3-D image we map to the plane points ~iyj, myn, z! only. Such points are mapped to 2-D points ~iyj 1lz cos a, myn 1lz sin a!, where l. 0 is a scaling factor. If a is such that tan a is irrational, then the above mapping is injective ~i.e., different 3-D points ~iyj, myn, z! are mapped to different 2-D points!. Indeed, let two different points ~i 1 yj 1 , m 1 yn 1 , z 1 ! and ~i 2 yj 2 , m 2 yn 2 , z 2 ! be mapped to the same point in the plane, i.e., i 1 j 1 1 lz 1 cos a 5 i 2 j 2 1 lz 2 cos a, (1) m 1 n 1 1 lz 1 sin a 5 m 2 n 2 1 lz 2 sin a. (2) If i 1 yj 1 i 2 yj 2 , then tan a 5 ~m 1 yn 1 ! 2 ~m 2 yn 2 ! ~i 1 yj 1 ! 2 ~i 2 yj 2 ! , (3) The author is with the Department of Computer Science, Uni- versity of Ottawa, 150 Louis Pasteur Street, Ottawa K1N 6N5, Canada. Received 3 February 1997; revised manuscript received 1 May 1997. 0003-6935y97y297397-05$10.00y0 © 1997 Optical Society of America 10 October 1997 y Vol. 36, No. 29 y APPLIED OPTICS 7397

Upload: y-b

Post on 05-Oct-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Evaluation of three-dimensionalconvolutions by use of two-dimensional filtering

Y. B. Karasik

A three-dimensional to two-dimensional mapping is proposed that permits the reduction of three-dimensional convolutions–correlations to two-dimensional ones and thereby lays a theoretical foundationfor their optical implementation. © 1997 Optical Society of America

Key words: Three-dimensional optical image processing, optical correlators.

1. Introduction

Optical scientists have paid much attention to three-dimensional ~3-D! optical image formation ~see, e.g.,Refs. 1–5!. However, little attention has been paidto 3-D optical image processing. The main hurdlehere has been the absence of a practical approach toperforming 3-D convolution–correlation optically,which is a key operation in image processing. Cur-rently there is no optical hardware capable of thedirect convolution–correlation of 3-D images.Hence we are compelled to make do with the existingtwo-dimensional ~2-D! optical convolvers–correlatorsand must find a way to exploit them for performing3-D convolutions–correlations.

A possible solution to this problem is to find a pla-nar encoding of 3-D images such that it would giverise to the reduction of a 3-D convolution–correlationto its corresponding 2-D one. Although some workon transdimensional mappings has been done previ-ously in optics ~see, e.g., Refs. 6–8!, almost all dealtwith one-dimensional ~1-D! to 2-D and 2-D to 1-Dtransformations.

To the best of my knowledge, only one relevant 3-Dto 2-D mapping has been proposed in the past.9,10 Itconsisted of sampling one dimension of a 3-D imageand recording all obtained 2-D sectional images inone plane. Needless to say, so as not to lose infor-mation the number of 2-D sectional images should behigh, and that makes it difficult to place them all in

The author is with the Department of Computer Science, Uni-versity of Ottawa, 150 Louis Pasteur Street, Ottawa K1N 6N5,Canada.

Received 3 February 1997; revised manuscript received 1 May1997.

0003-6935y97y297397-05$10.00y0© 1997 Optical Society of America

one plane ~i.e., in one frame of an input device such asa spatial light modulator!.

In this paper I aim to propose a more subtle planarencoding of 3-D images that, on one hand, does notrequire multiplexing many 2-D sectional images and,on the other hand, would also give rise to the reduc-tion of a 3-D convolution–correlation to two dimen-sions. Specifically, the proposed planar encoding of3-D images proceeds as follows.

Let us sample a 3-D image at all points ~x, y! thathave rational coordinates ~such a sampling obviouslysatisfies the sampling theorem because points withrational coordinates constitute an everywhere-denseset!. In other words, of all points ~x, y, z! of a 3-Dimage we map to the plane points ~iyj, myn, z! only.Such points are mapped to 2-D points ~iyj 1 lz cos a,myn 1 lz sin a!, where l . 0 is a scaling factor. Ifa is such that tan a is irrational, then the abovemapping is injective ~i.e., different 3-D points ~iyj,myn, z! are mapped to different 2-D points!.

Indeed, let two different points ~i1yj1, m1yn1, z1!and ~i2yj2, m2yn2, z2! be mapped to the same point inthe plane, i.e.,

i1

j11 lz1 cos a 5

i2

j21 lz2 cos a, (1)

m1

n11 lz1 sin a 5

m2

n21 lz2 sin a. (2)

If i1yj1 Þ i2yj2, then

tan a 5~m1yn1! 2 ~m2yn2!

~i1yj1! 2 ~i2yj2!, (3)

10 October 1997 y Vol. 36, No. 29 y APPLIED OPTICS 7397

which contradicts the assumption that tan a is irra-tional. Hence,

i1

j15

i2

j2. (4)

Taking into account Eq. ~1!, we conclude that

z1 5 z2. (5)

Having substituted Eq. ~5! into Eq. ~2!, we obtain

m1

n15

m2

n2. (6)

Hence, the points ~i1yj1, m1yn1, z1! and ~i2yj2, m2yn2,z2! are identical, and the mapping is really injective.

Inverse mapping can be accomplished as follows:Draw a straight line with a slope a through a point ~a,b! and take that unique point on the line both ofwhose coordinates are rational. Let it be point ~iyj,myn!. Then the sought-for image @X~a, b!, Y~a, b!,Z~a, b!# of a point ~a, b! is $iyj, myn, @~a 2 iyj!2 1 ~b 2myn!2#1y2yl%.

To finalize the description of the proposed 3-D to2-D mapping, it ought to be said that, if the graynessof the point ~iyj, myn, z! is f ~iyj, myn, z!, then thegrayness of the point ~iyj 1 lz cos a, myn 1 lz sin a!is also f ~iyj, myn, z!. In other words, a 3-D imagef ~x, y, z! is mapped to a 2-D image F~x, y! such thatf ~x, y, z! 5 F~x 1 lz cos a, y 1 lz sin a!. Now we arein a position to show that such encoding of 3-D imagesallows one to reduce a 3-D convolution–correlation totwo dimensions.

2. Expression of Three-DimensionalConvolutions–Correlations by Means ofTwo-Dimensional Convolutions–Correlations

Consider the convolution of the 3-D images f ~x, y, z!and g~x, y, z!:

@ f ~x, y, z! p g~x, y, z!#~a, b, c!

5 *** f ~x, y, z!g

3 ~a 2 x, b 2 y, c 2 z!dxdydz. (7)

Our encoding turns f ~x, y, z! and g~x, y, z! into F~x, y!and G~x, y!, respectively, such that

f ~x, y, z! 5 F~x 1 lz cos a, y 1 lz sin a! (8)

g~x, y, z! 5 G~x 1 lz cos a, y 1 lz sin a!, (9)

provided x and y are both rational. Let us assume,however, that relations ~8! and ~9! hold for any ~x, y!~although that is not the case for the arbitrary biva-riate functions f and g!.

7398 APPLIED OPTICS y Vol. 36, No. 29 y 10 October 1997

Then we have

*** f ~x, y, z!g~a 2 x, b 2 y, c 2 z!dxdydz (10)

5 *** F~x 1 lz cos a, y 1 lz sin a!

3 G@a 2 x 1 l~c 2 z!cos a, b 2 y

1 l~c 2 z!sin a#dxdydz. (10)

Change coordinates in the latter integral as follows:

u 5 x 1 lz cos a,

v 5 y 1 lz sin a,

w 5 z. (11)

Then we have

*** F~x 1 lz cos a, y 1 lz sin a!G@a 2 x

1 l~c 2 z!cos a, b 2 y 1 l~c 2 z!sin a#dxdydz

5 *** F~u, v!G~a 1 lc cos a 2 u, b 1 lc sin a 2 v!

3 UD~x, y, z!

D~u, v, w!Ududvdw, (12)

where the Jacobian D~x, y, z!yD~u, v, w! is equal to

I100

010

2l cos a2l sin a

1I , (13)

and its determinant is equal to 1. Hence

*** f ~x, y, z!g~a 2 x, b 2 y, c 2 z!dxdydz

5 ***F~u, v!G~a 1 lc cos a 2 u, b

1 lc sin a 2 v!dudvdw. (14)

Let us assume that functions f and g have boundedsupports ~i.e., they are band limited!. Then F and Galso have bounded supports. Hence

*** F~u, v!G~a 1 lc cos a 2 u, b

1 lc sin a 2 v!dudvdw

5 ~zmax 2 zmin! ** F~u, v!G~a 1 lc cos a 2 u,

3 b 1 lc sin a 2 v!dudv, (15)

where zmax and zmin are the highest and the lowestvalues of z, respectively, for which

f ~x, y, z!g~a 2 x, b 2 y, c 2 z! Þ 0. (16)

Thus we obtain the following theorem:Theorem 1: If functions f ~x, y, z! and g~x, y, z!

have bounded supports ~i.e., are band limited! andthe relations

f ~x, y, z! 5 F~x 1 lz cos a, y 1 lz sin a!,

g~x, y, z! 5 G~x 1 lz cos a, y 1 lz sin a!

hold for any ~x, y, z!, then

@ f ~x, y, z! p g~x, y, z!#~a, b, c! 5 K~ f, g!

3 @F~x, y! p G~x, y!#~a 1 lc cos a, b 1 lc sin a!,

where K~ f, g! is, depending on f ~x, y, z! and g~x, y, z!,some constant.

Analogous results for correlations can be obtained asa consequence of theorem 1 in the obvious way.

3. Discussion of the Results

The above results were obtained under the assump-tion that relations

f ~x, y, z! 5 F~x 1 lz cos a, y 1 lz sin a!, (17)

g~x, y, z! 5 G~x 1 lz cos a, y 1 lz sin a! (18)

hold for any ~x, y!. Generally speaking this is notthe case because, for continuous functions f and gwhen x and y are irrational, functions F and G aremultivalued and strictly speaking not defined. Nev-ertheless, if we define F and G at rational values of ~x,y! only, then the reduction of f p g to F p G is still validas some approximation, which can be shown by thefollowing more rigorous derivation.

Instead of functions f ~x, y, z! and g~x, y, z! considertheir sampled versions at nodes ~iH, jH! of a rectan-gular grid with spacing H:

f̃ ~x, y, z! 5 (i, j

f @iH, jH, z 1 Di~x!#

3 rectSx 2 iH2h DrectSy 2 jH

2h D , (19)

g̃~x, y, z! 5 (i, j

g@iH, jH, z 1 Di~x!#

3 rectSx 2 iH2h DrectSy 2 jH

2h D ,

(20)

where

Di~x! 5x 2 iHl cos a

, (21)

l 5H12e

max$uzmaxu, uzminu%, (22)

0 , e , 1, and h 5 kH.

It is easily seen that, for functions f̃ and g̃, thecorresponding bivariate functions F̃ and G̃, defined bythe relations

f̃ ~x, y, z! 5 F̃@x 1 l~H!z cos a, y 1 l~H!z sin a#, (23)

g̃~x, y, z! 5 G̃@x 1 l~H!z cos a, y 1 l~H!z sin a#, (24)

have a single value at any point ~x, y, z!.Indeed, suppose that

F̃@x1 1 l~H!z1 cos a, y1 1 l~H!z1 sin a#

Þ F̃@x2 1 l~H!z2 cos a, y2 1 l~H!z2 sin a#, (25)

but

x1 1 l~H!z1 cos a 5 x2 1 l~H!z2 cos a, (26)

y1 1 l~H!z1 sin a 5 y2 1 l~H!z2 sin a. (27)

Since

F̃@x1 1 l~H!z1 cos a, y1 1 l~H!z1 sin a# 5 f̃ ~x1, y1, z1!

5 f @iH, jH, z1 1 Di~x1!#, (28)

F̃@x2 1 l~H!z2 cos a, y2 1 l~H!z2 sin a# 5 f̃ ~x2, y2, z2!

5 f @iH, jH, z2 1 Di~x2!#, (29)

we conclude that

z1 1 Di~x1! Þ z2 1 Di~x2!. (30)

Having substituted the expression for Di~x! into re-lation ~30!, we find that

x1 1 l~H!z1 cos a Þ x2 1 l~H!z2 cos a, (31)

which contradicts the above assumption that

x1 1 l~H!z1 cos a 5 x2 1 l~H!z2 cos a. (32)

Hence, function F̃ cannot have two values at thesame single point. The same is obviously true forG̃ as well. Thus the technique presented in Sec-tion 2 is applicable to these functions, and we con-clude that

@ f̃ ~x, y, z! p g̃~x, y, z!#~a, b, c! 5 K1@F̃~x, y! p G̃~x, y!#

3 @a 1 l~H!c cos a, b 1 l~H!c sin a#. (33)

Our next objective is to show that

@ f̃ ~x, y, z! p g̃~x, y, z!#~a, b, c!

3K2@ f ~x, y, z! p g~x, y, z!#~a, b, c!, (34)

when the sampling distance H 3 0. Relation ~34!would imply immediately that

@ f ~x, y, z! p g~x, y, z!#~a, b, c!

5 limH30

K1

K2@F̃~x, y! p G̃~x, y!#

3 @a 1 l~H!c cos a, b 1 l~H!c sin a#. (35)

10 October 1997 y Vol. 36, No. 29 y APPLIED OPTICS 7399

So, let us show that

@ f̃ ~x, y, z! p g̃~x, y, z!#~a, b, c!

3K2@ f ~x, y, z!p g~x, y, z!#~a, b, c!. (36)

Indeed,

f̃ ~x, y, z! 5 (i, j

f @iH, jH, z 1 Di~x!#

3 rectSx 2 iH2h DrectSy 2 jH

2h D5 (

i, jf ~iH, jH, z!rectSx 2 iH

2h D3 rectSy 2 jH

2h D 1 (i, j

]f]zU

~iH, jH,z̃!

Di~x!

3 rectSx 2 iH2h DrectSy 2 jH

2h D5 Sf~x, y, z! 1 of~x, y, z!, (37)

where

Sf~x, y, z! 5 (i, j

f ~iH, jH, z!rectSx 2 iH2h D

3 rectSy 2 jH2h D , (38)

of~x, y, z! 5 (i, j

]f]zU

~iH, jH,z̃!

Di~x!rectSx 2 iH2h D

3 rectSy 2 jH2h D . (39)

It is easily seen that

f̃ p g̃ 5 Sf p Sg 1 Sf p og 1 Sg p of 1 og p of. (40)

However,

uSf p ogu # max Sf max og

4h2DxDy

H2 3 0, (41)

when H 3 0, because max og 3 0 and

hH

5 k, (42)

and Dx, Dy are the differences of the limits of inte-gration by x and y, respectively ~which are bounded!.Analogously,

Sg p of 3 0, (43)

og p of 3 0, (44)

when H 3 0. Hence

f̃ p g̃3 Sf p Sg. (45)

7400 APPLIED OPTICS y Vol. 36, No. 29 y 10 October 1997

However,

@Sf p Sg#~a, b, c! 5 FrectSx 2 iH2h D p rectSx 2 mH

2h DG~a!

3 FrectSy 2 jH2h D p rectSy 2 nH

2h DG~b!

3 * f ~iH, jH, z!g~mH, nH, c 2 z!dz

5 (i, j,m,n

max$0, 2h 2 ua 2 iH 2 mHu%

3 max$0, 2h 2 ub 2 jH 2 nHu%

3 * f ~iH, jH, z!g~mH, nH, c 2 z!dz.

(46)

Let ~a, b! be some node of the grid, i.e., a 5 pH 5 ~i 1m!H and b 5 qH 5 ~ j 1 n!H, for some i, j, m, n.Then

@Sf p Sg#~a, b, c! 5 4h2 (i1m5p; j1n5q * f ~iH, jH, z!

3 g~mH, nH, c 2 z!dz

5 4h2 (i, j * f ~iH, jH, z!

3 g~a 2 iH, b 2 jH, c 2 z!dz. (47)

On the other hand,

@ f p g#~a, b, c! 5 limH30

(ij

H2 * f ~iH, jH, z!

3 g~a 2 iH, b 2 jH, c 2 z!dz. (48)

Hence, if ~a, b! are nodes of the grid,

@ f p g#~a, b, c! 5 limH30

H2

4h2 @Sf p Sg#~a, b, c!

5 limH30

H2

4h2 @ f̃ p g̃#~a, b, c!. (49)

Let us now consider that ~a, b! is not a node of thegrid. Then, since

@ f p g#~a, b, c! 5 limH30

@ f p g#SaHH, b

HH, cD, (50)

we conclude that, for any ~a, b!,

@ f p g#~a, b, c! 5 limH30

H2

4h2 @ f̃ p g̃#~a, b, c!. (51)

Taking into account Eq. ~33!, we obtain

@ f ~x, y, z! p g~x, y, z!#~a, b, c!

5 limH30

K1H2

4h2 @F̃~x, y! p G̃~x, y!#

3 @a 1 l~H!c cos a, b 1 l~H!c sin a#. (52)

4. Conclusion

In this paper the problem of computing a 3-Dconvolution–correlation optically with the help of aconventional optical convolver–correlator has beenaddressed. It has been shown that 3-Dconvolutions–correlations can be reduced to 2-Dones. Since the latter can be computed optically, theformer can be computed optically too.

This result may have important practical implica-tions for optical pattern recognition. As is wellknown, optical pattern recognition, starting from theclassic research of VanderLugt11 and continuing upto now ~see, e.g., Refs. 12–14, etc.!, has been restrictedto the recognition of planar images only. The reasonwas the absence of a way to compute the key opera-tion in pattern-recognition correlation optically forimages whose dimensionality is higher than two.This paper indicates such a procedure.

I thank the anonymous reviewers and William T.Rhodes for recommendations on improving the paper.

References1. F. K. Knight, D. I. Klick, D. P. Ryan-Howard, J. R. Theriault,

Jr., B. K. Tussey, and A. M. Beckman, “Three-dimensionalimaging using a single laser pulse,” in Laser Radar IV, R. J.Becherer, ed., Proc. SPIE 1103, 174–189 ~1989!.

2. C. C. Aleksoff, “Interferometric two-dimensional imaging ofrotating objects,” Opt. Lett. 1, 54–55 ~1977!.

3. N. H. Farhat, “Holography, wavelength diversity and inversescattering,” in Optics in Four Dimensions—1980, M. A.

Machado and L. M. Narducci, eds. ~American Institute of Phys-ics, New York, 1981!, pp. 627–642.

4. J. C. Marron and K. S. Schroeder, “Three-dimensional lenslessimaging using laser frequency diversity,” Appl. Opt. 31, 255–262 ~1992!.

5. J. Rosen and A. Yariv, “Three-dimensional imaging of randomradiation sources,” Opt. Lett. 21, 1011–1013 ~1996!.

6. W. W. Stoner, W. J. Miceli, and F. A. Horrigan, “One-dimensional to two-dimensional transformations in signal cor-relation,” in Transformations in Optical Signal Processing,W. T. Rhodes, J. R. Fienup, and B. E. A. Saleh, eds., Proc. SPIE373, 21–30 ~1981!.

7. W. T. Rhodes, “The falling raster in optical signal processing,”in Transformations in Optical Signal Processing, W. T.Rhodes, J. R. Fienup, and B. E. A. Saleh, eds., Proc. SPIE 373,11–20 ~1981!.

8. A. E. Siegman, “Two-dimensional calculations using one-dimensional arrays, or ‘Life on the Skew,’” Comput. Phys.Nov.yDec. 74–75 ~1988!.

9. J. Hofer-Alfeis and R. Bamler, “Three-dimensional and four-dimensional convolutions by coherent optical filtering,” inTransformations in Optical Signal Processing, W. T. Rhodes,J. R. Fienup, and B. E. A. Saleh, eds., Proc. SPIE 373, 77–87~1981!.

10. R. Bamler and J. Hofer-Alfeis, “Three- and four-dimensionalfilter operations by coherent optics,” Opt. Acta 29, 747–757~1982!.

11. A. B. VanderLugt, “Signal detection by complex spatial filter-ing,” IEEE Trans. Inf. Theory IT-10, 139–145 ~1964!.

12. D. Casasent and D. Psaltis, “Position-, rotation-, and scale-invariant optical correlator,” Appl. Opt. 15, 1795–1799~1976!.

13. D. Asselin and H.-H. Arsenault, “Rotation and scale invariancewith polar and log-polar coordinate transformations,” Opt.Commun. 104, 391–404 ~1994!.

14. D. Mendelovic, E. Marom, and N. Konforti, “Scale-invariantpattern recognition,” in Optical Computing ’88 ~Sept. 1988,Toulon, France!, P. Chavel, J. W. Goodman, and G. Roblin,eds., Proc. SPIE 963, 304–310 ~1988!.

10 October 1997 y Vol. 36, No. 29 y APPLIED OPTICS 7401