Top Banner
A new DCT-based algorithm for numerical reconstruction of electronically recorded holograms Leonid Bilevich* a and Leonid Yaroslavsky** a a Department of Physical Electronics, Faculty of Engineering, Tel Aviv University, 69978, Tel Aviv, Israel 1 ABSTRACT A new universal low computational complexity algorithm for numerical reconstruction of holograms recorded in near diffraction zone is presented. The algorithm implements digital convolution in DCT domain, which makes it virtually insensitive to boundary effects. It can be used for reconstruction of holograms for arbitrary ratios of hologram size to the object-to-hologram distance and wavelength to camera pitch and allows image reconstruction in arbitrary scale. 1. INTRODUCTION Numerical reconstruction of images from digital holograms is a fundamental task in digital holography. There exist several methods for hologram reconstruction. The most important methods for reconstruction of holograms, recorded in Fresnel zone, are Fourier reconstruction algorithm and Convolutional reconstruction algorithm [1]. If the image, obtained by hologram reconstruction, has to be scaled by scaling factor σ , then a certain scaling algorithm has to be applied to the reconstructed image. A new reconstruction algorithm with simultaneous scaling is suggested. This algorithm is based on the Inverse Scaled Discrete Fresnel Transform (IScDFrT) that converts the problem of reconstruction and scaling to the problem of convolution. The convolution, in its turn, is computed through the boundary effects free DCT domain convolution consisting of DCT and IDCT transforms only. The IScDFrT reconstruction algorithm is universal. We’ll demonstrate that Fourier reconstruction algorithm and “Central Part” Convolutional reconstruction algorithm are special cases of the IScDFrT reconstruction algorithm. 2. HOLOGRAM RECONSTRUCTION WITH SCALING 2.1 Reconstruction of holograms recorded in near zone [1] Images are reconstructed from near-zone recorded holograms using the Canonical Inverse Discrete Fresnel Transform (IDFrT): ( ) 2 1 0 1 exp N k r r k r a i N N µ µ α π = = , (1) where µ is a focusing parameter defined in terms of the wavelength λ , the hologram-to-observation plane distance Z , the number of hologram samples N and the hologram sampling interval f as: ( ) 2 2 . Z N f µ λ = (2) There exist several algorithms implementing this reconstruction method, among them Fourier reconstruction algorithm, Convolution Discrete Fresnel Transform (ConvDFrT) and its modification “Central Part” Convolutional reconstruction algorithm. The formulae for these algorithms are listed below. 1 *[email protected]; http://www.eng.tau.ac.il/~bilevich/ **[email protected]; http://www.eng.tau.ac.il/~yaro/
11

A new DCT-based algorithm for numerical reconstruction of ...bilevich/Universal_Algorithm_SPIE...The algorithm implements digital convolution in DCT domain, which makes it virtually

Feb 21, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A new DCT-based algorithm for numerical reconstruction of ...bilevich/Universal_Algorithm_SPIE...The algorithm implements digital convolution in DCT domain, which makes it virtually

A new DCT-based algorithm for numerical reconstruction of electronically recorded holograms

Leonid Bilevich*a and Leonid Yaroslavsky**a

aDepartment of Physical Electronics, Faculty of Engineering, Tel Aviv University, 69978, Tel Aviv, Israel1

ABSTRACT

A new universal low computational complexity algorithm for numerical reconstruction of holograms recorded in near diffraction zone is presented. The algorithm implements digital convolution in DCT domain, which makes it virtually insensitive to boundary effects. It can be used for reconstruction of holograms for arbitrary ratios of hologram size to the object-to-hologram distance and wavelength to camera pitch and allows image reconstruction in arbitrary scale.

1. INTRODUCTION Numerical reconstruction of images from digital holograms is a fundamental task in digital holography. There exist several methods for hologram reconstruction. The most important methods for reconstruction of holograms, recorded in Fresnel zone, are Fourier reconstruction algorithm and Convolutional reconstruction algorithm [1]. If the image, obtained by hologram reconstruction, has to be scaled by scaling factor σ , then a certain scaling algorithm has to be applied to the reconstructed image.

A new reconstruction algorithm with simultaneous scaling is suggested. This algorithm is based on the Inverse Scaled Discrete Fresnel Transform (IScDFrT) that converts the problem of reconstruction and scaling to the problem of convolution. The convolution, in its turn, is computed through the boundary effects free DCT domain convolution consisting of DCT and IDCT transforms only.

The IScDFrT reconstruction algorithm is universal. We’ll demonstrate that Fourier reconstruction algorithm and “Central Part” Convolutional reconstruction algorithm are special cases of the IScDFrT reconstruction algorithm.

2. HOLOGRAM RECONSTRUCTION WITH SCALING 2.1 Reconstruction of holograms recorded in near zone [1]

Images are reconstructed from near-zone recorded holograms using the Canonical Inverse Discrete Fresnel Transform (IDFrT):

( )21

0

1exp

N

k rr

k ra i

NN

µ µα π

=

⎛ ⎞−⎜= −⎜ ⎟⎝ ⎠

∑ ⎟ , (1)

where µ is a focusing parameter defined in terms of the wavelength λ , the hologram-to-observation plane distance Z , the number of hologram samples N and the hologram sampling interval f∆ as:

( )22 .Z N fµ λ ⎡ ⎤= ∆⎢ ⎥⎣ ⎦ (2)

There exist several algorithms implementing this reconstruction method, among them Fourier reconstruction algorithm, Convolution Discrete Fresnel Transform (ConvDFrT) and its modification “Central Part” Convolutional reconstruction algorithm. The formulae for these algorithms are listed below. 1 *[email protected]; http://www.eng.tau.ac.il/~bilevich/ **[email protected]; http://www.eng.tau.ac.il/~yaro/

Page 2: A new DCT-based algorithm for numerical reconstruction of ...bilevich/Universal_Algorithm_SPIE...The algorithm implements digital convolution in DCT domain, which makes it virtually

• Fourier reconstruction algorithm:

( )21

0

1exp

N

k rr

k r wa i

NN

µ µα π

=

⎡ ⎤− +⎢ ⎥= −⎢ ⎥⎣ ⎦

∑%

( ) ( )21

0

21 exp exp exp 2N

rr

k k w r w kri iN NN

µ µ µπ α π

=

⎧ ⎫⎡ ⎤⎡ ⎤+ −i

Nπ⎡ ⎤⎪ ⎪⎢ ⎥= − −⎢ ⎥ ⎨ ⎬ ⎢ ⎥⎢ ⎥ ⎣ ⎦⎢ ⎥ ⎪ ⎪⎣ ⎦ ⎣ ⎦⎩ ⎭

∑% %

( ) ( )22exp expr

k k w r wi DFT i

N Nµ µ µ

π α π⎧ ⎫⎡ ⎤⎡ ⎤+ −⎪ ⎢= − −⎢ ⎥ ⎨

⎢ ⎥⎢ ⎥ ⎪ ⎪⎣ ⎦ ⎣ ⎦⎩ ⎭

% % ⎪⎥⎬ , (3)

where w% is the shift parameter defined as:

.2N

=% (4)

This algorithm is used for 1µ ≥ .

• Convolution Discrete Fresnel Transform (ConvDFrT):

( )1 1 2 2

0 0

1 exp 2 expN N

k rs r

k r w s sa iN N

µα π π

− −

= =

⎡ ⎤⎛ ⎞ ⎛ ⎞− += −⎢ ⎥⎜ ⎟ ⎜ ⎟⎜ ⎟⎜ ⎟⎢ ⎥ ⎝ ⎠⎝ ⎠⎣ ⎦

∑ ∑ iN

( ) ( )1 1 12 2

2

0 0 0

1 exp 2 exp frincd ; ;N N N

r rr s r

k r w s si i NN N N

µα π π α µ

− − −

= = =

⎡ ⎤⎛ ⎞ ⎛ ⎞− += − =⎢ ⎥⎜ ⎟ ⎜ ⎟⎜ ⎟⎜ ⎟⎢ ⎥⎝ ⎠⎝ ⎠⎣ ⎦∑ ∑ ∑ k r w− +

( 2frincd ; ;r N r wα µ= ∗ + ) , (5)

where frincd is a discrete-frinc function defined by:

( ) ( ) ( )21 12 22

0 0

21 1frincd ; ; exp exp 2 exp exp 2N N

s s

s w sr w ss rN r w i i i iN N N N N

µµµ π π π

− −

= =

⎛ ⎞−⎛ ⎞⎛ ⎞ + ⎛ ⎞⎜ ⎟+ = − = −⎜ ⎟⎜ ⎟ ⎜ ⎟⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ ⎠⎜ ⎟⎝ ⎠ ⎝ ⎠ ⎝ ⎠∑ ∑ s

( )2 21 exps w s

IDFT iNN

µπ

⎡ ⎤⎛ ⎞−⎢ ⎜= ⎢ ⎜⎜ ⎟⎢ ⎥⎝ ⎠⎣ ⎦

⎥⎟⎥⎟ , (6)

and w is the shift parameter defined as:

.w wµ= % (7)

This algorithm is used for 1≤µ .

• “Central Part” Convolutional reconstruction algorithm:

( ) ( )21

20

21exp exp 2 exp

N

k rr

w k w k rrwa i i i

N N NN

µπ α π π

µ µ

=

⎡ ⎤⎡ ⎤ ⎧ ⎫+ −⎡ ⎤⎪ ⎪ ⎢ ⎥= − −⎢ ⎥ ⎨ ⎬⎢ ⎥ ⎢ ⎥⎪ ⎪⎢ ⎥ ⎣ ⎦⎩ ⎭⎣ ⎦ ⎣ ⎦∑

% % %

Page 3: A new DCT-based algorithm for numerical reconstruction of ...bilevich/Universal_Algorithm_SPIE...The algorithm implements digital convolution in DCT domain, which makes it virtually

( ) 2

2

21 exp exp 2 exp .rw k w rw ri i

N N NN

µπ α π π

µ µ

⎡ ⎤⎡ ⎤i

⎡ ⎤⎧ ⎫+ ⎡ ⎤⎪ ⎪= − ∗ −⎢⎢ ⎥ ⎥⎢ ⎥⎨ ⎬⎢ ⎥⎪ ⎪⎢ ⎢⎢ ⎥ ⎣ ⎦⎩ ⎭ ⎥⎥⎣ ⎦⎣ ⎦ ⎣ ⎦

% % % (8)

This algorithm is used for 1≤µ .

Now let’s present the new algorithm:

• Inverse Scaled Discrete Fresnel Transform (IScDFrT):

( )21

20

1exp ,

N

k rr

k r wa i

NN

σα π

µ

=

⎡ ⎤− +⎢ ⎥= −⎢ ⎥⎣ ⎦

∑ (9)

where rα is the hologram, ka is the image reconstructed from the hologram, σ is the scaling factor and w is the shift parameter. This algorithm is used for any µ .

The reconstructed image ka can be represented as a convolution:

( )( ) ( )( ) ( )( ) ( )21

2 20

1 1 1 11 1 21 exp exp expN

k rr

r w r wk k w k ra i i i

N NN

σ σσπ α π

µ σ µ µ σ

=

⎧ ⎫⎡ ⎤− − + − ⎡ ⎤⎛ ⎞− + −⎪ ⎪⎢ ⎥⎜ ⎟ ⎢ ⎥= − − −⎨ ⎬⎢ ⎥⎜ ⎟ ⎢ ⎥⎪ ⎪⎢ ⎥⎝ ⎠ ⎣ ⎦⎣ ⎦⎩ ⎭

∑ 2 Nπ

( )( )2

1 1 21exp

k k wi

NN

σπ

µ σ

⎛ ⎞− +⎜ ⎟= −⎜ ⎟⎝ ⎠

( )( ) ( )( ) 2

2

1 1 1 1ZP exp exp ,rN

r w r w riN Nσ

σ σα π π

µ µ⎡ ⎤⎢ ⎥

⎡ ⎤⎧ ⎫⎡ ⎤− − + −

2iσ

⎡ ⎤⎢ ⎥⎪ ⎪⎢ ⎥× − ∗ −⎢ ⎥⎨⎢ ⎥⎢ ⎥⎬ ⎢ ⎥⎪ ⎪⎢ ⎥⎣ ⎦⎢ ⎥⎣ ⎦⎩ ⎭⎣ ⎦

(10)

where the zero-padding operator ZP is defined as follows: in case of signal enlargement ( 1>σ ) the hologram rα is zero-padded to size ⎡ Nσ ⎤ , in case of signal reduction ( 1<σ ) the hologram rα is truncated to size ⎡ ⎤Nσ . The convolution, in its turn, is implemented by the complex “centered” DCT convolution algorithm described below.

Eq. (10) defines the IScDFrT reconstruction algorithm, and both Fourier and “Central Part” Convolutional reconstruction algorithms represent its special cases. Indeed, the case 21 µσ = corresponds to the Fourier reconstruction algorithm:

( ) ( )21

0

21 exp exp exp 2N

k rr

k k w r w kra i i iN NN

µ µ µπ α π

=

⎧ ⎫⎡ ⎤⎡ ⎤+ −

Nπ⎡ ⎤⎪ ⎪⎢ ⎥= − −⎢ ⎥ ⎨ ⎬ ⎢ ⎥⎢ ⎥ ⎣ ⎦⎢ ⎥ ⎪ ⎪⎣ ⎦ ⎣ ⎦⎩ ⎭

∑% %

( ) ( )22exp expr

k k w r wi DFT i

N Nµ µ µ

π α π⎧ ⎫⎡ ⎤⎡ ⎤+ −⎪ ⎢= − −⎢ ⎥ ⎨

⎢ ⎥⎢ ⎥ ⎪ ⎪⎣ ⎦ ⎣ ⎦⎩ ⎭

% % ⎪⎥⎬ , (11)

while the case 1=σ corresponds to the “Central Part” Convolutional reconstruction algorithm:

( ) ( )21

20

21exp exp 2 exp

N

k rr

w k w k rrwa i i i

N N NN

µπ α π π

µ µ

=

⎡ ⎤⎡ ⎤ ⎧ ⎫+ −⎡ ⎤⎪ ⎪ ⎢ ⎥= − −⎢ ⎥ ⎨ ⎬⎢ ⎥ ⎢ ⎥⎪ ⎪⎢ ⎥ ⎣ ⎦⎩ ⎭⎣ ⎦ ⎣ ⎦∑

% % %

Page 4: A new DCT-based algorithm for numerical reconstruction of ...bilevich/Universal_Algorithm_SPIE...The algorithm implements digital convolution in DCT domain, which makes it virtually

( ) 2

2

21 exp exp 2 exp .rw k w rw ri i

N N NN

µπ α π π

µ µ

⎡ ⎤⎡ ⎤i

⎡ ⎤⎧ ⎫+ ⎡ ⎤⎪ ⎪= − ∗ −⎢⎢ ⎥ ⎥⎢ ⎥⎨ ⎬⎢ ⎥⎪ ⎪⎢ ⎢⎢ ⎥ ⎣ ⎦⎩ ⎭ ⎥⎥⎣ ⎦⎣ ⎦ ⎣ ⎦

% % % (12)

Now let’s describe the DCT-domain convolution algorithm that is used in the implementation of the IScDFrT reconstruction algorithm.

3. BOUNDARY EFFECT SAFE DIGITAL CONVOLUTION IN DCT DOMAIN The DCT-domain boundary-effects free convolution algorithm [2-4] is given by the following formula:

( ){ }( ) ( ){ }( )2 22 IDCT DCT Re DFT ZP IDcST DCT Im DFT ZPk k N k ka N a h a h⎡ ⎤⎡ ⎤ ⎡= +⎡ ⎤ ⎡ ⎤⎣ ⎦ ⎣ ⎦⎣ ⎦ ⎣⎢ ⎥⎣ ⎦% N k ⎤⎦ , (13)

where , , and are the Discrete Fourier Transform, Discrete Cosine Transform, Inverse Discrete Cosine Transform and Inverse Discrete Cosine-Sine Transform defined by:

DFT DCT IDCT IDcST

( ) ( )1

0

1DFT exp 2N

DFTr k k

k

kra a iNN

α−

=

⎛= ≡ ⎜⎝ ⎠∑ π ⎞

⎟ , (14)

( ) ( ) ( )1

0

1 22DCT cosN

DCTr k k

k

k ra a

N Nα

=

⎛ ⎞+= ≡ ⎜⎜

⎝ ⎠∑ π ⎟⎟ , (15)

( )( ) ( ) ( ) ( )1

01

1 21IDCT 2 cos2

NDCTDCT DCT

k r rr

k ra

NNα α α π

=

⎧ ⎫⎛ ⎞+⎪ ⎪= ≡ + ⎜ ⎟⎨ ⎬⎜ ⎟⎪ ⎪⎝ ⎠⎩ ⎭∑ , (16)

( )( ) ( ) ( ) ( ) ( )1

1

1 21IDcST 1 2 sin2

Nk DSTDST DST

k r N rr

k ra

NNα α α π

=

⎧ ⎫⎛ ⎞+⎪ ⎪= ≡ − + ⎜ ⎟⎨ ⎬⎜ ⎟⎪ ⎪⎝ ⎠⎩ ⎭∑ ; (17)

( )•Re denotes the real part, denotes the imaginary party, and ( )•Im ( )kN h2ZP denotes a zero-padding of { }kh to double length. This convolution, consisting of transforms of 4 different types, can be converted to the form consisting of DCT and IDCT transforms only. Let’s present this convolution.

Let’s start with the 1D convolution.

The “DCT-only” form of DCT convolution (1D case)

The “DCT-only” form of DCT convolution is given by:

( ) { }{ ( ) ( )( ) ( )12 r r

kC CCI SIk r r N r

Na IDCT IDCTα η α η− }⎡ ⎤⎡ ⎤= + −⎣ ⎦ ⎢ ⎥⎣ ⎦

% , (18)

where

( )kC aDCTr =)(α (19)

( ) ( )( ){ }( ) cos sin 12 2

kCIr k

N r

r rDCT h DCT hN N

η π π−

⎛ ⎞ ⎛ ⎞= + −⎜ ⎟ ⎜ ⎟⎝ ⎠ ⎝ ⎠

k (20)

( )( ){ } ( )( ) cos 1 sin2 2

kSIr k

N r

r DCT h DCT hN N

η π π−

⎛ ⎞ ⎛ ⎞= − −⎜ ⎟ ⎜ ⎟⎝ ⎠ ⎝ ⎠

kr . (21)

“Centered” DCT convolution (1D case)

Page 5: A new DCT-based algorithm for numerical reconstruction of ...bilevich/Universal_Algorithm_SPIE...The algorithm implements digital convolution in DCT domain, which makes it virtually

The DCT convolution provides a result shifted by half a kernel size from its “true” position. The “centered” DCT convolution will compensate this shift. Suppose that the kernel is of the size not exceeding kh hN N (the size of signal

), that is, . Suppose that the size of the input image is ka NN h ≤ ka N and the size of the kernel is

( ). Let’s denote by the zero-padded version of : kh hN

NN h ≤ kh% kh

, 0, ,

0, , , 1k

kh

h k Nh

k N N1h= −⎧

≡ ⎨ = −⎩

K%K

. (22)

Then we’ll obtain the centered result using the previously described algorithm with the following modifications of

the terms and : ka%

)(CIrη

)( SIrη

• Use instead of . kh% kh

• For odd : change hN cos2rN

π⎛ ⎞⎜ ⎟⎝ ⎠

to cos2

hN rN

π⎛ ⎞⎜ ⎟⎝ ⎠

, sin2rN

π⎛ ⎞⎜ ⎟⎝ ⎠

to sin2

hN rN

π⎛ ⎞⎜ ⎟⎝ ⎠

.

• For even : change hN cos2rN

π⎛ ⎞⎜ ⎟⎝ ⎠

to ( )1

cos2hN r

Nπ⎛ ⎞+⎜ ⎟⎜ ⎟⎝ ⎠

, sin2rN

π⎛ ⎞⎜ ⎟⎝ ⎠

to ( )1

sin2hN r

Nπ⎛ ⎞+⎜ ⎟⎜ ⎟⎝ ⎠

.

Complex convolution (1D case)

If the input signal, the kernel and the output signal consist of complex-valued samples:

, (23) , ,re im re im re imk k k k k k k k ka a ia h h ih a a ia= + = + = +% % %

then the complex convolution

1

0

N

k n kn

a a h−

n−=

= ∑% (24)

can be computed in the following way:

( ) { }{ },( ) ,( ) ,( ) ,( ) ,( ) ,( ) ,( ) ,( )12 r r r r r r r r

kre C re CI im C im CI re C re SI im C im SIk N r

Na IDCT IDCTα η α η α η α η−

⎡ ⎤⎡ ⎤= − + − −⎣ ⎦ ⎢ ⎥⎣ ⎦%

( ) { }{ },( ) ,( ) ,( ) ,( ) ,( ) ,( ) ,( ) ,( )12 r r r r r r r r

kre C im CI im C re CI re C im SI im C re SI

N r

Ni IDCT IDCTα η α η α η α η−

⎡ ⎤⎡ ⎤+ + + − +⎣ ⎦ ⎢ ⎥⎣ ⎦, (25)

where denote transforms of real/imaginary parts of the complex signal and kernel:

)(,)(,)(,)(,)(,)(, ,,,,, SIimSIreCIimCIreCimCrerrrrrr ηηηηαα

( )rek

Cre aDCTr =)(,α (26)

( )imk

Cim aDCTr =)(,α (27)

( ) ( )( ){ } rNrek

krek

CIrer hDCT

NrhDCT

Nr

−−⎟⎠⎞

⎜⎝⎛+⎟

⎠⎞

⎜⎝⎛= 1

2sin

2cos)(, ππη (28)

( ) ( )( ){ } rNimk

kimk

CIimr hDCT

NrhDCT

Nr

−−⎟⎠⎞

⎜⎝⎛+⎟

⎠⎞

⎜⎝⎛= 1

2sin

2cos)(, ππη (29)

Page 6: A new DCT-based algorithm for numerical reconstruction of ...bilevich/Universal_Algorithm_SPIE...The algorithm implements digital convolution in DCT domain, which makes it virtually

( )( ){ } ( )rekrN

rek

kSIrer hDCT

NrhDCT

Nr

⎟⎠⎞

⎜⎝⎛−−⎟

⎠⎞

⎜⎝⎛= − 2

sin12

cos)(, ππη (30)

( )( ){ } ( )imkrN

imk

kSIimr hDCT

NrhDCT

Nr

⎟⎠⎞

⎜⎝⎛−−⎟

⎠⎞

⎜⎝⎛= − 2

sin12

cos)(, ππη . (31)

Now let’s consider the 2D convolution that is a generalization of a 1D convolution.

The “DCT-only” form of DCT convolution (2D case)

The “DCT-only” form of DCT convolution is given by:

( ) ( ) { }1 2

1 2 ( , ) ( , ) ( , ) ( , ), , , , , ,

12

k lC C CI CI C C SI SIk l r s r s r s r s N r N s

N Na IDCT IDCTα η α η+

− −

⎧ ⎡ ⎤= + −⎨ ⎢ ⎥⎣ ⎦⎩%

( ) { } ( ) { }1 2

( , ) ( , ) ( , ) ( , ), , , ,, ,

1 1k lC C SI CI C C CI SIr s r s r s r sN r s r N s

IDCT IDCTα η α η− −

⎫⎡ ⎤ ⎡+ − + − ⎬⎢ ⎥ ⎢⎣ ⎦ ⎣ ⎭

⎤⎥⎦

, (32)

where

( ),( , )

,r sC C

k lDCT aα = (33)

( ) ( )( ){ }1

( , ), ,

,1 2 1 2cos cos sin cos 1

2 2 2 2kCI CI

r s k l k lN r s

r s r sDCT h DCT hN N N N

η π π π π−

⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞= +⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟

⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠,− (34)

( )( ){ } ( )( ){ }2 1 2

, ,, ,1 2 1 2

cos sin 1 sin sin 12 2 2 2

l kk l k l

r N s N r N s

r s r sDCT h DCT hN N N N

π π π π + l

− − −

⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞+ − + −⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟

⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠

( ) ( )( ){ }1

( , ), , ,

,1 2 1 2sin sin cos sin 1

2 2 2 2kSI SI

r s k l k lN r s

r s r sDCT h DCT hN N N N

η π π π π−

⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞= − −⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟

⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ (35)

( )( ){ } ( )( ){ }2 1 2

, ,, ,1 2 1 2

sin cos 1 cos cos 12 2 2 2

l kk l k l

r N s N r N s

r s r sDCT h DCT hN N N N

π π π π + l

− − −

⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞− − + −⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟

⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠

( ) ( )( ){ }1

( , ), , ,

,1 2 1 2sin cos cos cos 1

2 2 2 2kSI CI

r s k l k lN r s

r s r sDCT h DCT hN N N N

η π π π π−

⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞= − + −⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟

⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ (36)

( )( ){ } ( )( ){ }2 1 2

, ,, ,1 2 1 2

sin sin 1 cos sin 12 2 2 2

l kk l k l

r N s N r N s

r s r sDCT h DCT hN N N N

π π π π + l

− − −

⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞− − + −⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟

⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠

( ) ( )( ){ }1

( , ), , ,

,1 2 1 2cos sin sin sin 1

2 2 2 2kCI SI

r s k l k lN r s

r s r sDCT h DCT hN N N N

η π π π π−

⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞= − − −⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟

⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ (37)

( )( ){ } ( )( ){ }1 2

, ,, ,1 2 1 2

cos cos 1 sin cos 12 2 2 2

l kk l k l

r N s N r N s

r s r sDCT h DCT hN N N N

π π π π + l

− − −

⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞+ − + −⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟

⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠

“Centered” DCT convolution (2D case)

Suppose that the size of the input image is and the size of the kernel is ( ). The zero-padded kernel is defined as:

lka , 21 NN × lkh , 21 hh NN ×

2211 , NNNN hh ≤≤

Page 7: A new DCT-based algorithm for numerical reconstruction of ...bilevich/Universal_Algorithm_SPIE...The algorithm implements digital convolution in DCT domain, which makes it virtually

, 1

1 1 2,

1 2

1 1 2 2

, 0, , 1, 0, ,

0, , , 1, 0, , 10, 0, , 1, , , 10, , , 1, , , 1

k l h h

hk l

h h

h h

h k N l N

k N N l Nhk N l N N

k N N l N N

⎧ = − = −⎪⎪

2

2

1

h= − = −≡ ⎨= − = −⎪

⎪ = − = −⎩

K K

K K%

K K

K K

. (38)

Then we’ll obtain the centered result using the previously described algorithm with the following modifications of

the terms , , and : ,k la%

),(,

CICIsrη

),(,

SISIsrη

),(,

CISIsrη

),(,

SICIsrη

• Use instead of . ,k lh% lkh ,

• For odd : change hN cos2rN

π⎛ ⎞⎜ ⎟⎝ ⎠

to cos2

hN rN

π⎛ ⎞⎜ ⎟⎝ ⎠

, sin2rN

π⎛ ⎞⎜ ⎟⎝ ⎠

to sin2

hN rN

π⎛ ⎞⎜ ⎟⎝ ⎠

.

• For even : change hN cos2rN

π⎛ ⎞⎜ ⎟⎝ ⎠

to ( )1

cos2hN r

Nπ⎛ ⎞+⎜ ⎟⎜ ⎟⎝ ⎠

, sin2rN

π⎛ ⎞⎜ ⎟⎝ ⎠

to ( )1

sin2hN r

Nπ⎛ ⎞+⎜ ⎟⎜ ⎟⎝ ⎠

.

(For rows use instead of and instead of 1hN hN 1N N . For columns use instead of and instead of

2hN hN 2NN .)

Complex convolution (2D case)

If the input signal, the kernel and the output signal consist of complex-valued samples:

, (39) , , , , , , , ,, ,re im re im re imk l k l k l k l k l k l k l k l k la a ia h h ih a a ia= + = + = +% % % ,

,

then the complex convolution

1 21 1

, ,0 0

N N

k l m n k m l nm n

a a h− −

− −= =

= ∑ ∑% (40)

can be computed in the following way:

( ) (( ){1 2 ,( , ) ,( , ) ,( , ) ,( , ), , , ,2

re C C im C C re CI CI im CI CIk l r s r s r s r s

N Na IDCT i iα α η η= + +% ),

( ) ( ) ( ){ }1 2

,( , ) ,( , ) ,( , ) ,( , ), , , ,

,1 k l re C C im C C re SI SI im SI SI

r s r s r s r sN r N s

IDCT i iα α η η+

− −

⎡ ⎤+ − + +⎢ ⎥

⎣ ⎦

( ) ( ) ({ }1

,( , ) ,( , ) ,( , ) ,( , ), , , ,

,1 k re C C im C C re SI CI im SI CI

r s r s r s r sN r s

IDCT i iα α η η−

⎡ ⎤+ − + +⎢ ⎥

⎣ ⎦)

( ) ( ) ( ){ }2

,( , ) ,( , ) ,( , ) ,( , ), , , ,

,1 l re C C im C C re CI SI im CI SI

r s r s r s r sr N s

IDCT i iα α η η−

⎫⎡ ⎤⎪+ − + + ⎬⎢ ⎥⎪⎣ ⎦⎭

( ){1 2 ,( , ) ,( , ) ,( , ) ,( , ), , , ,2

re C C re CI CI im C C im CI CIr s r s r s r s

N NIDCT α η α η= −

( ) { }1 2

,( , ) ,( , ) ,( , ) ,( , ), , , , ,

1 k l re C C re SI SI im C C im SI SIr s r s r s r s N r N s

IDCT α η α η+

− −

⎡ ⎤+ − −⎢ ⎥⎣ ⎦

( ) { }1

,( , ) ,( , ) ,( , ) ,( , ), , , , ,

1 k re C C re SI CI im C C im SI CIr s r s r s r s N r s

IDCT α η α η−

⎡ ⎤+ − −⎢ ⎥⎣ ⎦

Page 8: A new DCT-based algorithm for numerical reconstruction of ...bilevich/Universal_Algorithm_SPIE...The algorithm implements digital convolution in DCT domain, which makes it virtually

( ) { }2

,( , ) ,( , ) ,( , ) ,( , ), , , , ,

1 l re C C re CI SI im C C im CI SIr s r s r s r s r N s

IDCT α η α η−

⎫⎡ ⎤+ − − ⎬⎢ ⎥⎣ ⎦⎭

( ){1 2 ,( , ) ,( , ) ,( , ) ,( , ), , , ,2

re C C im CI CI im C C re CI CIr s r s r s r s

N Ni IDCT α η α η+ +

( ) { }1 2

,( , ) ,( , ) ,( , ) ,( , ), , , , ,

1 k l re C C im SI SI im C C re SI SIr s r s r s r s N r N s

IDCT α η α η+

− −

⎡ ⎤+ − +⎢ ⎥⎣ ⎦

( ) { }1

,( , ) ,( , ) ,( , ) ,( , ), , , , ,

1 k re C C im SI CI im C C re SI CIr s r s r s r s N r s

IDCT α η α η−

⎡ ⎤+ − +⎢ ⎥⎣ ⎦

( ) {2

,( , ) ,( , ) ,( , ) ,( , ), , , , ,

1 l re C C im CI SI im C C re CI SIr s r s r s r s r N s

IDCT α η α η−

⎫⎡ ⎤+ − + ⎬⎢ ⎥⎣ ⎦⎭} , (41)

where the transforms of real/imaginary parts of signal and kernel are denoted by subscripts ( ) / ( ) (similarly to the complex convolution for the 1D case).

re• im•

4. RESULTS Let’s define the modified version of the IScDFrT with the scaling factor:

2σ µ σ=% (42)

and the shift parameter:

.w

=% (43)

Substituting 2σ σ µ= % and w wµ= % into Eq. (9), we obtain the modified version of the IScDFrT:

( )21

0

expN

k rr

k r wa i

Nµ σ µ

α π−

=

⎡ ⎤− +⎢ ⎥= −⎢ ⎥⎣ ⎦

∑%%

. (44)

Let’s illustrate the relative sizes of different images that are reconstructed from holograms with different methods and then show methods for removing “ringing artifacts”.

The modified IScDFrT with scaling factor 1σ =% corresponds to the Fourier reconstruction algorithm (Figure 1(a,c)), and with scaling factor 2σ µ=% it corresponds to the “Central Part” Convolutional reconstruction algorithm (Figure 1(c,d)). For reference, the ConvDFrT-reconstructed image (of size N ) is shown in (Figure 1(b)). The central part (of size 2 Nµ ) of the ConvDFrT reconstructed image is approximated by the “Central Part” Convolutional reconstruction

algorithm. For comparison, the ConvDFrT reconstruction with scaling 21σ µ=% is shown in Figure 1(d). The reconstruction and scaling were done in two separate steps; the scaling was done using sinc-interpolation [4].

Page 9: A new DCT-based algorithm for numerical reconstruction of ...bilevich/Universal_Algorithm_SPIE...The algorithm implements digital convolution in DCT domain, which makes it virtually

(a) Fourier reconstruction algorithm. (b) ConvDFrT reconstruction algorithm.

(c) IScDFrT reconstruction algorithm ( 21σ µ=% ). (d) ConvDFrT reconstruction algorithm followed by scaling by factor 21σ µ=% .

Figure 1. Comparison of “raw” images reconstructed from holograms using Fourier, ConvDFrT and IScDFrT reconstruction algorithms ( 2 0.6580µ = ). (a) - Fourier reconstruction algorithm. (b) - ConvDFrT reconstruction algorithm.

(c) – IScDFrT reconstruction algorithm ( 21σ µ=% ). (d) - ConvDFrT reconstruction algorithm followed by scaling by

factor 21σ µ=% . The sizes of image features in (a),(c) and (d) are identical. The large “ringing artifacts” are evident.

In Figure 1 the “raw” images with “ringing artifacts” were shown. The choice of method for elimination of “ringing” artifacts depends on the value of the focusing parameter µ .

Case 1: 1µ > . In this case there are no “ringing artifacts” for both the IScDFrT and the Fourier reconstruction algorithms. The images reconstructed with IScDFrT with 1σ =% and with the Fourier reconstruction algorithm are shown in Figure 2.

Page 10: A new DCT-based algorithm for numerical reconstruction of ...bilevich/Universal_Algorithm_SPIE...The algorithm implements digital convolution in DCT domain, which makes it virtually

(a) Fourier reconstruction algorithm.

(b) IScDFrT reconstruction algorithm ( 1σ =% ).

Figure 2. Comparison of images reconstructed from holograms for the case 1µ > . The focusing parameter is: 2 14.0907µ = .

(a) - Fourier reconstruction algorithm. (b) – IScDFrT reconstruction algorithm ( 1σ =% ).

Case 2: 1µ < . In this case the “ringing artifacts” are present in the “raw” reconstructed images, as was demonstrated in

Figure 1. In order to eliminate these “ringing artifacts”, it is recommended to retain the central part of size 2 Nµ σ⎡ ⎤⎢ ⎥% of

the reconstructed image. If the required size of the output image is N , then the reconstructed image has to be scaled by the factor 21 µ and then truncated (pruned) to the size N . Also, it is recommended to eliminate the near-border pixels of the image that contain the residual “ringing artifacts”.

• For Fourier reconstruction algorithm: the image reconstruction is followed by scaling ( 21σ µ=% ) and then pruning to size N :

( )({ 21k Na ZM PRUN SC FourierReconµ α∆ ) }r⎡ ⎤= ⎣ ⎦

, (45)

where FourierRecon denotes the Fourier reconstruction algorithm, 21SC µ , denotes scaling by the factor 21 µ , denotes the extraction of NPRUN N central samples of its argument and denotes the zero-

masking of the ZM∆

∆ leftmost and the ∆ rightmost samples. The parameter ∆ is small with respect to N (for example, in Figure 2 the following values were used: 50∆ = and 512N = ).

• For ConvDFrT reconstruction algorithm: the image reconstruction is followed by scaling ( 41σ µ=% ) and then pruning to size N :

( )( )41k N ra PRUN SC ConvReconµ α⎡ ⎤= ⎣ ⎦ , (46)

where denotes the ConvDFrT reconstruction algorithm. The zero-masking is not needed. The scaling factor is

ConvRecon41 µ and not 21 µ due to the difference between the “scales” of the ConvDFrT

reconstruction and the Fourier reconstruction, as was demonstrated in Figure 1.

• For IScDFrT: the image reconstruction is followed by pruning to size N :

( ){ }k Na ZM PRUN IScDFrT α∆ r⎡ ⎤= ⎣ ⎦ . (47)

Page 11: A new DCT-based algorithm for numerical reconstruction of ...bilevich/Universal_Algorithm_SPIE...The algorithm implements digital convolution in DCT domain, which makes it virtually

For this method (unlike the previous two) the “stand-alone” scaling operation 21SC µ is not needed, because the

scaling is embedded into the IScDFrT.

The results of reconstruction with algorithms Eqs. (45), (46), (47) are shown in Figure 3. For all 3 methods we obtain similar results. The Fourier reconstruction and the IScDFrT results are almost identical, while the ConvDFrT has larger field of view.

(a) Fourier reconstruction

algorithm followed by scaling by factor 21σ µ=% .

(b) ConvDFrT reconstruction

algorithm followed by scaling by factor 41σ µ=% .

(c) IScDFrT reconstruction method ( 21σ µ=% ).

Figure 3. Comparison of images reconstructed from holograms for the case 1µ < . The focusing parameter is: 2 0.6580µ = .

(a) - Fourier reconstruction algorithm followed by scaling by factor 21σ µ=% . (b) - Convolutional reconstruction

algorithm followed by scaling by factor 41σ µ=% . (c) - IScDFrT reconstruction algorithm ( 21σ µ=% ).

5. CONCLUSIONS The algorithm for the hologram reconstruction with simultaneous scaling is presented. The universality of this algorithm and its relation to the Fourier and “Central Part” Convolutional reconstruction algorithms is shown. The algorithm is implemented through the boundary effect-free DCT-domain convolution. Thanks to the availability of fast FFT-type algorithms for computing DCT and IDCT transforms involved in the reconstruction algorithm, the suggested IScDFrT reconstruction method represents a valuable alternative to DFT-domain reconstruction methods in real-time video processing applications.

6. REFERENCES [1] Yaroslavsky, L., “Introduction to digital holography,” in [Digital Signal Processing in Experimental Research],

Yaroslavsky, L. and Astola, J., eds., Bentham E-book Series, 1–187 (2009). [2] Yaroslavsky, L., “Discrete transforms, fast algorithms, and point spread functions of numerical reconstruction

of digitally recorded holograms,” in [Advances in Signal Transforms: Theory and Applications], Astola, J. and Yaroslavsky, L., eds., EURASIP Book Series on Signal Processing and Communications 7, 93–141, Hindawi (2007).

[3] Yaroslavsky, L., “Boundary effect free and adaptive discrete signal sinc-interpolation algorithms for signal and image resampling,” Appl. Opt. 42, 4166–4175 (July 2003).

[4] Yaroslavsky, L., [Digital Holography and Digital Image Processing: Principles, Methods, Algorithms], Kluwer Academic Publishers (2004).